Thread: snprintf.c on win32 does not compile..
.... there is no sys/ioctl.h. Trivial patch below: diff -c -r1.6 snprintf.c *** snprintf.c 22 Feb 2005 04:57:24 -0000 1.6 --- snprintf.c 27 Feb 2005 17:05:54 -0000 *************** *** 40,46 **** --- 40,48 ---- Your platform must have a thread-safe snprintf() to compile with threads. #endif + #ifndef WIN32 #include <sys/ioctl.h> + #endif #include <sys/param.h>
Patch applied. Thanks. --------------------------------------------------------------------------- Magnus Hagander wrote: > .... there is no sys/ioctl.h. Trivial patch below: > > diff -c -r1.6 snprintf.c > *** snprintf.c 22 Feb 2005 04:57:24 -0000 1.6 > --- snprintf.c 27 Feb 2005 17:05:54 -0000 > *************** > *** 40,46 **** > --- 40,48 ---- > Your platform must have a thread-safe snprintf() to compile with > threads. > #endif > > + #ifndef WIN32 > #include <sys/ioctl.h> > + #endif > #include <sys/param.h> > > ---------------------------(end of broadcast)--------------------------- > TIP 7: don't forget to increase your free space map settings > -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073
> > .... there is no sys/ioctl.h. Trivial patch below: > > I don't think this header is needed on any platform. If it > were, you certainly couldn't just remove it. Not so. On win32 we pull in <windows.h>, which contains a lot of the definitions that are present in various other header files on unix. It's possible it's not needed on other platforms, but the fact that I can remove it on win32 does not prove that. //Magnus
Magnus Hagander wrote: > .... there is no sys/ioctl.h. Trivial patch below: I don't think this header is needed on any platform. If it were, you certainly couldn't just remove it. -- Peter Eisentraut http://developer.postgresql.org/~petere/