[Expat-checkins] expat/xmlwf xmlfile.c,1.9,1.10
fdrake@users.sourceforge.net
fdrake@users.sourceforge.net
Wed Jun 12 19:53:02 2002
Update of /cvsroot/expat/expat/xmlwf
In directory usw-pr-cvs1:/tmp/cvs-serv29036/xmlwf
Modified Files:
xmlfile.c
Log Message:
Include unistd.h when HAVE_UNISTD_H is defined, not _POSIX_SOURCE.
This requires that expat_config.h or winconfig.h has been included.
Using unistd.h avoids warnings about close() and read() not being defined
on some platforms.
This closes SF bug #563184.
Index: xmlfile.c
===================================================================
RCS file: /cvsroot/expat/expat/xmlwf/xmlfile.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- xmlfile.c 19 Apr 2002 21:41:54 -0000 1.9
+++ xmlfile.c 13 Jun 2002 02:52:09 -0000 1.10
@@ -8,6 +8,11 @@
#include <stddef.h>
#include <string.h>
#include <fcntl.h>
+#ifdef COMPILED_FROM_DSP
+#include "winconfig.h"
+#else
+#include "expat_config.h"
+#endif
#include "expat.h"
#include "xmlfile.h"
#include "xmltchar.h"
@@ -17,7 +22,7 @@
#include <io.h>
#endif
-#ifdef _POSIX_SOURCE
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif