[svn-commits] tilghman: branch 10 r363212 - in /branches/10: ./ main/astfd.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon Apr 23 11:06:55 CDT 2012


Author: tilghman
Date: Mon Apr 23 11:06:53 2012
New Revision: 363212

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=363212
Log:
On some platforms, O_RDONLY is not a flag to be checked, but merely the absence of O_RDWR and O_WRONLY.

The POSIX specification does not mandate how these 3 flags must be specified,
only that one of the three must be specified in every call.
........

Merged revisions 363209 from http://svn.asterisk.org/svn/asterisk/branches/1.8

Modified:
    branches/10/   (props changed)
    branches/10/main/astfd.c

Propchange: branches/10/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.

Modified: branches/10/main/astfd.c
URL: http://svnview.digium.com/svn/asterisk/branches/10/main/astfd.c?view=diff&rev=363212&r1=363211&r2=363212
==============================================================================
--- branches/10/main/astfd.c (original)
+++ branches/10/main/astfd.c Mon Apr 23 11:06:53 2012
@@ -95,7 +95,11 @@
 				flags & O_NONBLOCK ? "|O_NONBLOCK" : "",
 				flags & O_TRUNC ? "|O_TRUNC" : "",
 				flags & O_RDWR ? "|O_RDWR" : "",
+#if O_RDONLY == 0
+				!(flags & (O_WRONLY | O_RDWR)) ? "|O_RDONLY" : "",
+#else
 				flags & O_RDONLY ? "|O_RDONLY" : "",
+#endif
 				flags & O_WRONLY ? "|O_WRONLY" : "",
 				"");
 			flags &= ~(O_CREAT | O_APPEND | O_EXCL | O_NONBLOCK | O_TRUNC | O_RDWR | O_RDONLY | O_WRONLY);




More information about the svn-commits mailing list