I concur with Andreas: unconditionally including <sys/fcntl.h> is not

portable.  Seems to have been added for O_BINARY, which is only needed
for __CYGWIN32__, so include it here only in that case.
This commit is contained in:
Tom Lane 2000-07-17 04:35:55 +00:00
parent 436d04435d
commit ba87ab548e
1 changed files with 2 additions and 2 deletions

View File

@ -8,7 +8,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $Id: c.h,v 1.79 2000/07/17 03:05:20 tgl Exp $ * $Id: c.h,v 1.80 2000/07/17 04:35:55 tgl Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -49,12 +49,12 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <sys/fcntl.h>
#include <stddef.h> #include <stddef.h>
#include <stdarg.h> #include <stdarg.h>
#ifdef __CYGWIN32__ #ifdef __CYGWIN32__
#include <errno.h> #include <errno.h>
#include <sys/fcntl.h> /* ensure O_BINARY is available */
#endif #endif
/* ---------------------------------------------------------------- /* ----------------------------------------------------------------