CVS head broken on win32?
I'm trying to compile CVS HEAD on Win32.
./configure --enable-integer-datetimes
make
...
It ends with:
postmaster/SUBSYS.o(.text+0x9d7):fork_process.c: undefined reference to
`fork'
gcc --version and uname -a
gcc.exe (GCC) 3.4.1 (mingw special)
MINGW32_NT-5.1 THHALHOME3 1.0.11(0.46/3/2) 2004-03-30 07:29 i686 unknown
Regards,
Thomas Hallgren
Thomas Hallgren <thhal@mailblocks.com> writes:
I'm trying to compile CVS HEAD on Win32.
postmaster/SUBSYS.o(.text+0x9d7):fork_process.c: undefined reference to
`fork'
Um. Shouldn't that whole file be #ifndef EXEC_BACKEND?
regards, tom lane
Tom Lane wrote:
Um. Shouldn't that whole file be #ifndef EXEC_BACKEND?
Woops, sorry about that.
We can't make the file #ifndef EXEC_BACKEND since fork_process() is used
by the Unix implementation of internal_forkexec(), but #ifndef WIN32
should work. I've applied the attached patch to HEAD.
-Neil
Attachments:
win32_forkprocess.patchtext/x-patch; name=win32_forkprocess.patchDownload
Index: src/backend/postmaster/fork_process.c
===================================================================
RCS file: /var/lib/cvs/pgsql/src/backend/postmaster/fork_process.c,v
retrieving revision 1.2
diff -c -r1.2 fork_process.c
*** src/backend/postmaster/fork_process.c 13 Mar 2005 23:27:38 -0000 1.2
--- src/backend/postmaster/fork_process.c 15 Mar 2005 23:53:32 -0000
***************
*** 16,21 ****
--- 16,22 ----
#include <sys/time.h>
#include <unistd.h>
+ #ifndef WIN32
/*
* Wrapper for fork(). Return values are the same as those for fork():
* -1 if the fork failed, 0 in the child process, and the PID of the
***************
*** 80,82 ****
--- 81,84 ----
return result;
}
+ #endif /* ! WIN32 */