From 8fbcd0a5c71e657b2a97a91f4c8579ada33461af Mon Sep 17 00:00:00 2001 From: "Fred L. Drake, Jr." Date: Thu, 13 Jun 2002 02:52:09 +0000 Subject: [PATCH] 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. --- expat/xmlwf/xmlfile.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/expat/xmlwf/xmlfile.c b/expat/xmlwf/xmlfile.c index f73cc0cb..edbd216c 100755 --- a/expat/xmlwf/xmlfile.c +++ b/expat/xmlwf/xmlfile.c @@ -8,6 +8,11 @@ See the file COPYING for copying permission. #include #include #include +#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 @@ See the file COPYING for copying permission. #include #endif -#ifdef _POSIX_SOURCE +#ifdef HAVE_UNISTD_H #include #endif