From: H.G. Muller Date: Sat, 2 May 2009 17:13:41 +0000 (-0700) Subject: HGM fixed cygwin compile for winboard X-Git-Tag: v4.2.8 X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=2ffe5cbbbec01e48d66d490d14de3dcfb49a2703;p=xboard.git HGM fixed cygwin compile for winboard --- diff --git a/winboard/config.h b/winboard/config.h index b9bbca5..0c8f231 100644 --- a/winboard/config.h +++ b/winboard/config.h @@ -1,133 +1,130 @@ -/* config.h.in. Generated automatically from configure.in by autoheader. */ - -/* Define if you have that is POSIX.1 compatible. */ -/*#undef HAVE_SYS_WAIT_H*/ - -/* Define if you need to in order for stat and other things to work. */ -/*#undef _POSIX_SOURCE*/ - -/* Define as the return type of signal handlers (int or void). */ -/*#undef RETSIGTYPE*/ - -/* Define if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define if you can safely include both and . */ -/*#undef TIME_WITH_SYS_TIME*/ - -/* Define if lex declares yytext as a char * by default, not a char[]. */ -/*#undef YYTEXT_POINTER*/ - -/*#define FIRST_PTY_LETTER 'p'*/ - -#define HAVE_FCNTL_H 1 - -#define HAVE_GETHOSTNAME 0 - -#define HAVE_GETTIMEOFDAY 0 - -/* Use our own random() defined in winboard.c. */ -#define HAVE_RANDOM 1 -#define random myrandom -#define srandom mysrandom - -#define HAVE_SYS_SOCKET_H 0 - -/*#undef IBMRTAIX*/ - -#define LAST_PTY_LETTER 'q' - -#define PATCHLEVEL "8pre" - -#define PRODUCT "WinBoard" - -#define PTY_ITERATION - -#define PTY_NAME_SPRINTF - -#define PTY_TTY_NAME_SPRINTF - -#define REMOTE_SHELL "" - -/*#undef RTU*/ - -/*#undef UNIPLUS*/ - -#define USE_PTYS 0 - -#define VERSION "4.2" - -/*#undef X_WCHAR*/ - -#ifndef __BORLANDC__ -#define WIN32 1 -#else -#define WIN32 -#endif - -#define ZIPPY 1 - -/* Define if you have the _getpty function. */ -/*#undef HAVE__GETPTY*/ - -/* Define if you have the ftime function. */ -#define HAVE_FTIME 1 - -/* Define if you have the grantpt function. */ -/*#undef HAVE_GRANTPT*/ - -/* Define if you have the rand48 function. */ -/*#undef HAVE_RAND48*/ - -/* Define if you have the sysinfo function. */ -/*#undef HAVE_SYSINFO*/ - -/* Define if you have the header file. */ -/*#undef HAVE_LAN_SOCKET_H*/ - -/* Define if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define if you have the header file. */ -/*#undef HAVE_STROPTS_H*/ - -/* Define if you have the header file. */ -#define HAVE_SYS_FCNTL_H 0 - -/* Define if you have the header file. */ -/*#undef HAVE_SYS_SYSTEMINFO_H*/ - -/* Define if you have the header file. */ -/*#undef HAVE_SYS_TIME_H*/ - -/* Define if you have the header file. */ -/*#undef HAVE_UNISTD_H*/ - -/* Define if you have the i library (-li). */ -/*#undef HAVE_LIBI*/ - -/* Define if you have the seq library (-lseq). */ -/*#undef HAVE_LIBSEQ*/ - -/* - Options - -DEMULATE_RSH -DREMOTE_SHELL=\"\" is necessary on Windows 95, because it - does not have its own rsh command. It works better this way on NT too, - because the NT rsh does not propagate signals to the remote process. - -DATTENTION is included even though I haven't been able to send signals to - child processes on Windows, because at least I can send them over rsh to - Unix programs. On Windows I send a newline instead, which wakes up the - chess program if it's polling. On my GNU Chess port the newline actually - works even for Move Now. -*/ -#define EMULATE_RSH 1 -#define ATTENTION 1 - -#ifdef __BORLANDC__ -#define _strdup(x) strdup(x) -#define STRICT -#define _winmajor 3 /* windows 95 */ -#define SCF_DEFAULT 0x0000 -#define SCF_ALL 0x0004 -#endif - +/* config.h.in. Generated automatically from configure.in by autoheader. */ + +/* Define if you have that is POSIX.1 compatible. */ +/*#undef HAVE_SYS_WAIT_H*/ + +/* Define if you need to in order for stat and other things to work. */ +/*#undef _POSIX_SOURCE*/ + +/* Define as the return type of signal handlers (int or void). */ +/*#undef RETSIGTYPE*/ + +/* Define if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Define if you can safely include both and . */ +/*#undef TIME_WITH_SYS_TIME*/ + +/* Define if lex declares yytext as a char * by default, not a char[]. */ +/*#undef YYTEXT_POINTER*/ + +/*#define FIRST_PTY_LETTER 'p'*/ + +#define HAVE_FCNTL_H 1 + +#define HAVE_GETHOSTNAME 0 + +#define HAVE_GETTIMEOFDAY 0 + +/* Use our own random() defined in winboard.c. */ +#define HAVE_RANDOM 0 + +#define HAVE_SYS_SOCKET_H 0 + +/*#undef IBMRTAIX*/ + +#define LAST_PTY_LETTER 'q' + +#define PATCHLEVEL "8pre" + +#define PRODUCT "WinBoard" + +#define PTY_ITERATION + +#define PTY_NAME_SPRINTF + +#define PTY_TTY_NAME_SPRINTF + +#define REMOTE_SHELL "" + +/*#undef RTU*/ + +/*#undef UNIPLUS*/ + +#define USE_PTYS 0 + +#define VERSION "4.2" + +/*#undef X_WCHAR*/ + +#ifndef __BORLANDC__ +#define WIN32 1 +#else +#define WIN32 +#endif + +#define ZIPPY 1 + +/* Define if you have the _getpty function. */ +/*#undef HAVE__GETPTY*/ + +/* Define if you have the ftime function. */ +#define HAVE_FTIME 1 + +/* Define if you have the grantpt function. */ +/*#undef HAVE_GRANTPT*/ + +/* Define if you have the rand48 function. */ +/*#undef HAVE_RAND48*/ + +/* Define if you have the sysinfo function. */ +/*#undef HAVE_SYSINFO*/ + +/* Define if you have the header file. */ +/*#undef HAVE_LAN_SOCKET_H*/ + +/* Define if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define if you have the header file. */ +/*#undef HAVE_STROPTS_H*/ + +/* Define if you have the header file. */ +#define HAVE_SYS_FCNTL_H 0 + +/* Define if you have the header file. */ +/*#undef HAVE_SYS_SYSTEMINFO_H*/ + +/* Define if you have the header file. */ +/*#undef HAVE_SYS_TIME_H*/ + +/* Define if you have the header file. */ +/*#undef HAVE_UNISTD_H*/ + +/* Define if you have the i library (-li). */ +/*#undef HAVE_LIBI*/ + +/* Define if you have the seq library (-lseq). */ +/*#undef HAVE_LIBSEQ*/ + +/* + Options + -DEMULATE_RSH -DREMOTE_SHELL=\"\" is necessary on Windows 95, because it + does not have its own rsh command. It works better this way on NT too, + because the NT rsh does not propagate signals to the remote process. + -DATTENTION is included even though I haven't been able to send signals to + child processes on Windows, because at least I can send them over rsh to + Unix programs. On Windows I send a newline instead, which wakes up the + chess program if it's polling. On my GNU Chess port the newline actually + works even for Move Now. +*/ +#define EMULATE_RSH 1 +#define ATTENTION 1 + +#ifdef __BORLANDC__ +#define _strdup(x) strdup(x) +#define STRICT +#define _winmajor 3 /* windows 95 */ +#define SCF_DEFAULT 0x0000 +#define SCF_ALL 0x0004 +#endif diff --git a/winboard/cygwin.mak b/winboard/cygwin.mak index c83f0a7..401c161 100644 --- a/winboard/cygwin.mak +++ b/winboard/cygwin.mak @@ -1,91 +1,91 @@ -# -# Makefile for WinBoard, using the GNU Cygwin toolset -# - -# Uncomment both lines to turn on debugging symbols ####### -cdebug= -g -linkdebug= -g -####################################################### - -proj=winboard -allobj= winboard.o backend.o parser.o moves.o lists.o \ - gamelist.o pgntags.o wedittags.o wgamelist.o zippy.o \ - wsockerr.o wbres.o wclipbrd.o woptions.o - -dotc= winboard.c backend.c parser.c moves.c lists.c \ - gamelist.c pgntags.c wedittags.c wgamelist.c zippy.c \ - wsockerr.c winboard.rc wclipbrd.c woptions.c - -# Currently WinBoard will build either with or without -mno-cygwin -# however, a Cygwin bug in forming the command line to WinMain() is -# exposed if -mno-cygwin is not used. -cygwin= -mno-cygwin - -VPATH= .:.. -CFLAGS= $(cdebug) -INCLUDES= -I. -I.. -CVARS= $(INCLUDES) $(cygwin) -CC = gcc $(CVARS) -WCC = $(CC) -mwindows $(linkdebug) -HC="/c/program files/help workshop/hcrtf.exe" -xn - -all: $(proj).exe - -depend: $(dotc) - makedepend -Y -f cygwin.mak $(INCLUDES) $^ - -clean: - rm -f *.obj *~ $(proj).exe $(proj).err $(proj).rbj \ - $(proj).RES $(proj).res $(proj).ini *.sbr *.bsc *.o \ - *.plg *.opt *.ncb *.debug *.bak *.gid *.GID - -maintainer-clean: clean - rm -f parser.c *.hlp *.HLP - -# Update the help file if necessary -$(proj).hlp : $(proj).rtf - $(HC) $(proj).hpj - cat $(proj).err - -# Update the resource if necessary -wbres.o: $(proj).rc $(proj).h resource.h - windres --use-temp-file --include-dir .. $< -O coff -o $@ - -# Update the object files if necessary - -parser.c: parser.l - flex -oparser.c -L $< - -$(proj).exe: $(allobj) $(proj).hlp $(proj).rc - $(WCC) $(guiflags) $(allobj) \ - -lwsock32 -lwinmm \ - -o $(proj).exe - -# DO NOT DELETE - -winboard.o: config.h ../common.h winboard.h resource.h ../frontend.h -winboard.o: ../backend.h ../lists.h ../moves.h wclipbrd.h wgamelist.h -winboard.o: wedittags.h woptions.h wsockerr.h defaults.h -backend.o: config.h ../common.h ../frontend.h ../backend.h ../lists.h -backend.o: ../parser.h ../moves.h ../zippy.h ../backendz.h -parser.o: config.h ../common.h ../backend.h ../lists.h ../frontend.h -parser.o: ../parser.h ../moves.h -moves.o: config.h ../common.h ../backend.h ../lists.h ../frontend.h -moves.o: ../moves.h ../parser.h -lists.o: config.h ../common.h ../lists.h -gamelist.o: config.h ../common.h ../frontend.h ../backend.h ../lists.h -gamelist.o: ../parser.h -pgntags.o: config.h ../common.h ../frontend.h ../backend.h ../lists.h -pgntags.o: ../parser.h -wedittags.o: config.h ../common.h winboard.h resource.h ../frontend.h -wedittags.o: ../backend.h ../lists.h -wgamelist.o: config.h ../common.h winboard.h resource.h ../frontend.h -wgamelist.o: ../backend.h ../lists.h -zippy.o: config.h ../common.h ../zippy.h ../frontend.h ../backend.h -zippy.o: ../lists.h ../backendz.h -wsockerr.o: wsockerr.h -winboard.o: resource.h -wclipbrd.o: config.h ../common.h winboard.h resource.h ../frontend.h -wclipbrd.o: ../backend.h ../lists.h wclipbrd.h -woptions.o: config.h ../common.h winboard.h resource.h ../backend.h -woptions.o: ../lists.h ../frontend.h woptions.h defaults.h wedittags.h +# +# Makefile for WinBoard, using the GNU Cygwin toolset +# + +# Uncomment both lines to turn on debugging symbols ####### +cdebug= -g +linkdebug= -g +####################################################### + +proj=winboard +allobj= winboard.o backend.o parser.o moves.o lists.o \ + gamelist.o pgntags.o wedittags.o wgamelist.o zippy.o \ + wsockerr.o wbres.o wclipbrd.o woptions.o + +dotc= winboard.c backend.c parser.c moves.c lists.c \ + gamelist.c pgntags.c wedittags.c wgamelist.c zippy.c \ + wsockerr.c winboard.rc wclipbrd.c woptions.c + +# Currently WinBoard will build either with or without -mno-cygwin +# however, a Cygwin bug in forming the command line to WinMain() is +# exposed if -mno-cygwin is not used. +cygwin= -mno-cygwin + +VPATH= .:.. +CFLAGS= $(cdebug) +INCLUDES= -I. -I.. +CVARS= $(INCLUDES) $(cygwin) +CC = gcc $(CVARS) +WCC = $(CC) -mwindows $(linkdebug) +HC="c:/program files/help workshop/hcrtf.exe" -xn + +all: $(proj).exe + +depend: $(dotc) + makedepend -Y -f cygwin.mak $(INCLUDES) $^ + +clean: + rm -f *.obj *~ $(proj).exe $(proj).err $(proj).rbj \ + $(proj).RES $(proj).res $(proj).ini *.sbr *.bsc *.o \ + *.plg *.opt *.ncb *.debug *.bak *.gid *.GID + +maintainer-clean: clean + rm -f parser.c *.hlp *.HLP + +# Update the help file if necessary +$(proj).hlp : $(proj).rtf + $(HC) $(proj).hpj + cat $(proj).err + +# Update the resource if necessary +wbres.o: $(proj).rc $(proj).h resource.h + windres --use-temp-file --include-dir .. $< -O coff -o $@ + +# Update the object files if necessary + +parser.c: parser.l + flex -oparser.c -L $< + +$(proj).exe: $(allobj) $(proj).hlp $(proj).rc + $(WCC) $(guiflags) $(allobj) \ + -lwsock32 -lwinmm \ + -o $(proj).exe + +# DO NOT DELETE + +winboard.o: config.h ../common.h winboard.h resource.h ../frontend.h +winboard.o: ../backend.h ../lists.h ../moves.h wclipbrd.h wgamelist.h +winboard.o: wedittags.h woptions.h wsockerr.h defaults.h +backend.o: config.h ../common.h ../frontend.h ../backend.h ../lists.h +backend.o: ../parser.h ../moves.h ../zippy.h ../backendz.h +parser.o: config.h ../common.h ../backend.h ../lists.h ../frontend.h +parser.o: ../parser.h ../moves.h +moves.o: config.h ../common.h ../backend.h ../lists.h ../frontend.h +moves.o: ../moves.h ../parser.h +lists.o: config.h ../common.h ../lists.h +gamelist.o: config.h ../common.h ../frontend.h ../backend.h ../lists.h +gamelist.o: ../parser.h +pgntags.o: config.h ../common.h ../frontend.h ../backend.h ../lists.h +pgntags.o: ../parser.h +wedittags.o: config.h ../common.h winboard.h resource.h ../frontend.h +wedittags.o: ../backend.h ../lists.h +wgamelist.o: config.h ../common.h winboard.h resource.h ../frontend.h +wgamelist.o: ../backend.h ../lists.h +zippy.o: config.h ../common.h ../zippy.h ../frontend.h ../backend.h +zippy.o: ../lists.h ../backendz.h +wsockerr.o: wsockerr.h +winboard.o: resource.h +wclipbrd.o: config.h ../common.h winboard.h resource.h ../frontend.h +wclipbrd.o: ../backend.h ../lists.h wclipbrd.h +woptions.o: config.h ../common.h winboard.h resource.h ../backend.h +woptions.o: ../lists.h ../frontend.h woptions.h defaults.h wedittags.h