From: erg Date: Fri, 4 May 2007 18:38:09 +0000 (+0000) Subject: Fix sfio to build on Windows. X-Git-Tag: LAST_LIBGRAPH~32^2~5586 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=673b9f1a7dbde9c9cc5d9a2a22ee835a08ab40ab;p=graphviz Fix sfio to build on Windows. --- diff --git a/lib/sfio/sfhdr.h b/lib/sfio/sfhdr.h index 0288ff4a1..fccd18bc3 100644 --- a/lib/sfio/sfhdr.h +++ b/lib/sfio/sfhdr.h @@ -984,9 +984,11 @@ extern "C" { /* for portable encoding of double values */ #if !__STDC__ +#ifndef WIN32 extern double frexp _ARG_((double, int *)); extern double ldexp _ARG_((double, int)); #endif +#endif #if !_hdr_mman && !_sys_mman extern Void_t *mmap _ARG_((Void_t *, size_t, int, int, int, off_t)); @@ -1019,6 +1021,11 @@ extern "C" { #endif #endif /* !__STDC__ && !_hdr_stdlib */ +#ifdef WIN32 +#undef SF_ERROR +#include +#define SF_ERROR 0000400 /* an error happened */ +#else #if !_hdr_unistd extern int close _ARG_((int)); extern ssize_t read _ARG_((int, void *, size_t)); @@ -1040,6 +1047,7 @@ extern "C" { #endif #endif /*_hdr_unistd*/ +#endif /* WIN32 */ #if _lib_bcopy && !_proto_bcopy extern void bcopy _ARG_((const void *, void *, size_t)); @@ -1050,7 +1058,9 @@ extern "C" { extern time_t time _ARG_((time_t *)); extern int waitpid _ARG_((int, int *, int)); +#ifndef WIN32 extern void _exit _ARG_((int)); +#endif typedef int (*Onexit_f) _ARG_((void)); extern Onexit_f onexit _ARG_((Onexit_f));