diff -ur /gs5.10/gp_unifn.c gs5.10/gp_unifn.c
--- /gs5.10/gp_unifn.c	Fri Sep 06 05:02:04 1996
+++ gs5.10/gp_unifn.c	Fri May 22 15:47:56 1998
@@ -26,14 +26,24 @@
 
 /* Define the string to be concatenated with the file mode */
 /* for opening files without end-of-line conversion. */
+#ifdef __CYGWIN32__
+const char gp_fmode_binary_suffix[] = "b";
+#else
 const char gp_fmode_binary_suffix[] = "";
+#endif
 /* Define the file modes for binary reading or writing. */
+#ifdef __CYGWIN32__
+const char gp_fmode_rb[] = "rb";
+const char gp_fmode_wb[] = "wb";
+#else
 const char gp_fmode_rb[] = "r";
 const char gp_fmode_wb[] = "w";
+#endif
 
 /* Answer whether a file name contains a directory/device specification, */
 /* i.e. is absolute (not directory- or device-relative). */
 bool
+#ifndef __CYGWIN32__
 gp_file_name_is_absolute(const char *fname, unsigned len)
 {	/* A file name is absolute if it starts with a 0 or more .s */
 	/* followed by a /. */
@@ -41,6 +51,18 @@
 	  ++fname, --len;
 	return (len && *fname == '/');
 }
+#else
+gp_file_name_is_absolute(const char *fname, uint len)
+{	/* A file name is absolute if it contains a drive specification */
+	/* (second character is a :) or if it start with 0 or more .s */
+	/* followed by a / or \. */
+	if ( len >= 2 && fname[1] == ':' )
+	  return true;
+	while ( len && *fname == '.' )
+	  ++fname, --len;
+	return (len && (*fname == '/' || *fname == '\\'));
+}
+#endif
 
 /* Answer the string to be used for combining a directory/device prefix */
 /* with a base file name.  The file name is known to not be absolute. */
diff -ur /gs5.10/time_.h gs5.10/time_.h
--- /gs5.10/time_.h	Wed Aug 06 22:04:13 1997
+++ gs5.10/time_.h	Fri May 22 15:54:35 1998
@@ -31,7 +31,7 @@
 /* The HAVE_SYS_TIME_H switch in gconfig_.h reflects this. */
 #ifdef HAVE_SYS_TIME_H
 #  include <sys/time.h>
-#  if defined(M_UNIX) || defined(_IBMR2) || defined(_SEQUENT_)	/* SCO, AIX and Sequent's DYNIX/ptx need both time.h and sys/time.h! */
+#  if defined(M_UNIX) || defined(_IBMR2) || defined(_SEQUENT_) || defined(__CYGWIN32__)	/* SCO, AIX and Sequent's DYNIX/ptx need both time.h and sys/time.h! */
 #    include <time.h>
 #  endif
 #else
diff -ur /gs5.10/unix-gcc.mak gs5.10/unix-gcc.mak
--- /gs5.10/unix-gcc.mak	Tue Nov 25 05:29:01 1997
+++ gs5.10/unix-gcc.mak	Fri May 22 15:43:32 1998
@@ -138,7 +138,7 @@
 # You may need to change this if the libpng version changes.
 # See libpng.mak for more information.
 
-PSRCDIR=libpng
+PSRCDIR=libpng-0.96
 PVERSION=96
 
 # Choose whether to use a shared version of the PNG library, and if so,
@@ -151,7 +151,7 @@
 # Define the directory where the zlib sources are stored.
 # See zlib.mak for more information.
 
-ZSRCDIR=zlib
+ZSRCDIR=zlib-1.0.4
 
 # Choose whether to use a shared version of the zlib library, and if so,
 # what its name is (usually libz, but sometimes libgz).
@@ -187,8 +187,8 @@
 # To work around the gcc 2.7.x optimizer bug,
 # add -Dconst= and remove -Wcast-qual and -Wwrite-strings.
 
-#GCFLAGS=-Wall -Wcast-qual -Wpointer-arith -Wstrict-prototypes -Wwrite-strings
-GCFLAGS=-Dconst= -Wall -Wpointer-arith -Wstrict-prototypes
+GCFLAGS=-Wall -Wcast-qual -Wpointer-arith -Wstrict-prototypes -Wwrite-strings
+#GCFLAGS=-Dconst= -Wall -Wpointer-arith -Wstrict-prototypes
 
 # Define the other compilation flags.  Add at most one of the following:
 #	-DBSD4_2 for 4.2bsd systems.
@@ -203,7 +203,7 @@
 #   gcc to accept ANSI-style function prototypes and function definitions.
 XCFLAGS=
 
-CFLAGS=-O $(GCFLAGS) $(XCFLAGS)
+CFLAGS=-O2 $(GCFLAGS) $(XCFLAGS)
 
 # Define platform flags for ld.
 # SunOS 4.n may need -Bstatic.
@@ -228,7 +228,7 @@
 # Note that x_.h expects to find the header files in $(XINCLUDE)/X11,
 # not in $(XINCLUDE).
 
-XINCLUDE=-I/usr/local/X/include
+XINCLUDE=-I/usr/X11/include
 
 # Define the directory/ies and library names for the X11 library files.
 # XLIBDIRS is for ld and should include -L; XLIBDIR is for LD_RUN_PATH
@@ -240,12 +240,12 @@
 #XLIBDIRS=-L/usr/openwin/lib
 #XLIBDIR=/usr/openwin/lib
 # X11R6 (on any platform) may need
-#XLIBS=Xt SM ICE Xext X11
+XLIBS=Xt SM ICE Xext X11
 
 #XLIBDIRS=-L/usr/local/X/lib
 XLIBDIRS=-L/usr/X11/lib
 XLIBDIR=
-XLIBS=Xt Xext X11
+#XLIBS=Xt Xext X11
 
 # Define whether this platform has floating point hardware:
 #	FPU_TYPE=2 means floating point is faster than fixed point.
@@ -361,8 +361,8 @@
 CMD=
 O=-o ./
 OBJ=o
-XE=
-XEAUX=
+XE=.exe
+XEAUX=.exe
 
 # Define the current directory prefix and command invocations.
 
@@ -5539,7 +5539,7 @@
 # The "else true; is required because Ultrix's implementation of sh -e
 # terminates execution of a command if any error occurs, even if the command
 # traps the error with ||.
-INCLUDE=/usr/include
+INCLUDE=/usr/H-i386-cygwin32/i386-cygwin32/include
 gconfig_.h: $(UNIXTAIL_MAK) $(ECHOGS_XE)
 	./echogs -w gconfig_.h -x 2f2a -s This file was generated automatically. -s -x 2a2f
 	if ( test -f $(INCLUDE)/dirent.h ); then ./echogs -a gconfig_.h -x 23 define HAVE_DIRENT_H; else true; fi
