[asterisk-commits] tilghman: trunk r363215 - in /trunk: ./ main/astfd.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Apr 23 11:08:37 CDT 2012
Author: tilghman
Date: Mon Apr 23 11:08:33 2012
New Revision: 363215
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=363215
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
........
Merged revisions 363212 from http://svn.asterisk.org/svn/asterisk/branches/10
Modified:
trunk/ (props changed)
trunk/main/astfd.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-10-merged' - no diff available.
Modified: trunk/main/astfd.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/astfd.c?view=diff&rev=363215&r1=363214&r2=363215
==============================================================================
--- trunk/main/astfd.c (original)
+++ trunk/main/astfd.c Mon Apr 23 11:08:33 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 asterisk-commits
mailing list