I concur with Andreas: unconditionally including <sys/fcntl.h> is not
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 17 Jul 2000 04:35:55 +0000 (04:35 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 17 Jul 2000 04:35:55 +0000 (04:35 +0000)
portable.  Seems to have been added for O_BINARY, which is only needed
for __CYGWIN32__, so include it here only in that case.

src/include/c.h

index c01c5f0ad7f91e0e6decbd8e60d1dcc094767b32..e1b6f07dbf19abdd6d7d389318c0fceafdb0aaec 100644 (file)
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include <sys/fcntl.h>
 #include <stddef.h>
 #include <stdarg.h>
 
 #ifdef __CYGWIN32__
 #include <errno.h>
+#include <sys/fcntl.h>         /* ensure O_BINARY is available */
 #endif
 
 /* ----------------------------------------------------------------