Hi Hugo,

I succeeded in compiling postgres on Windows NT using EGCS 1.1 for CygWin32
B19. Below are in short the things I had to do to get that done. Notice that
I only had to modify 1 source file to get it done (c.h). Maybe even that was
not needed.

To get it running will take me some more time.

For questions: email me.

Joost


cannot find a template: cygwin32_nt
used : generic -> copied it to cygwin32_nt

configure script:

ECHO_N_OUT=`echo -n "" | wc -c`
ECHO_C_OUT=`echo "\c" | wc -c`

if test "$ECHO_N_OUT" -eq 0; then
	DASH_N='-n'
	BACKSLASH_C=
else
	if test "ECHO_C_OUT" -eq 0; then
		DASH_N=
		BACKSLASH_C='\\\\c'
	else
		{ echo "configure: error: "echo behaviour undetermined"" 1>&2; exit 1; }
	fi
fi

to

ECHO_N_OUT=`echo -n "" | wc -c`
ECHO_C_OUT=`echo "\c" | wc -c`

if test $ECHO_N_OUT -eq 0; then
	DASH_N='-n'
	BACKSLASH_C=
else
	if test $ECHO_C_OUT -eq 0; then
		DASH_N=
		BACKSLASH_C='\\\\c'
	else
		{ echo "configure: error: "echo behaviour undetermined"" 1>&2; exit 1; }
	fi
fi

error:

creating include/config.h
linking ./backend/port/tas/dummy.s to backend/port/tas.s
linking ./backend/port/dynloader/win.c to backend/port/dynloader.c
configure: error: ./backend/port/dynloader/win.c: File not found

idem for /pgsql/src/backend/port/dynloader/win.h

idem for /pgsql/src/include/port/win.h

idem for /pgsql/src/makefiles/makefile.win


Missing header files:

copied <sys/ipc.h> and <sys/un.h> from the UWIN package to the <sys>
directorie. For file improvement see the files themselves

had to solve a bison.hairy and bison.simple problem due to my installation
by mounting d:/Unix/Cygnus/b19/share to /cygnus/b19/share

created <endian.h> that says BYTE_ORDER == LITTLE_ENDIAN

copied <tcp.h> from UWin (according to Hugo it can be commented out?

copied <sys/sem.h> from CygWin32_ipc package, added the library to linker
flags

copied <sys/shm.h> idem
configured again

added to c.h (which is included in every c file) becuase otherwise a linker
error occured:

#ifdef __CYGWIN32__
#include <errno.h>
#endif

created win.h with:
#define pg_dlopen       dlopen
#define pg_dlsym        dlsym
#define pg_dlclose      dlclose
#define pg_dlerror      dlerror


Fri, 11 Sep 1998 19:04:35 +0200
"Joost Kraaijeveld" <JKraaijeveld@askesis.nl>
Postgres compiled on Windopws NT