From e452a97e2293f262a2c87f25a0954d0944afa3c5 Mon Sep 17 00:00:00 2001 From: Larry Masinter Date: Thu, 24 Dec 2020 01:55:27 +0000 Subject: [PATCH] setup for cygwin (compiles but crashes) --- bin/makefile-cygwin.x86_64-x | 54 ++++++++++++++++++++++++++++++++++++ bin/osversion | 1 + src/timer.c | 2 ++ 3 files changed, 57 insertions(+) create mode 100644 bin/makefile-cygwin.x86_64-x diff --git a/bin/makefile-cygwin.x86_64-x b/bin/makefile-cygwin.x86_64-x new file mode 100644 index 0000000..abcef97 --- /dev/null +++ b/bin/makefile-cygwin.x86_64-x @@ -0,0 +1,54 @@ +# Options for Linux, Intel x86_64 and X-Window + +#CC = gcc -m64 $(GCC_CFLAGS) -fno-omit-frame-pointer -Wall -Wextra -fno-aggressive-loop-optimizations +CC = clang -m64 $(CLANG_CFLAGS) + +XFILES = $(OBJECTDIR)xmkicon.o \ + $(OBJECTDIR)xbbt.o \ + $(OBJECTDIR)dspif.o \ + $(OBJECTDIR)xinit.o \ + $(OBJECTDIR)xscroll.o \ + $(OBJECTDIR)xcursor.o \ + $(OBJECTDIR)xlspwin.o \ + $(OBJECTDIR)xrdopt.o \ + $(OBJECTDIR)xwinman.o + + +XFLAGS = -DXWINDOW -DNOPIXRECT + +# This is to make the %$#@! Apollo cc happy +OEXT = .o +# OPTFLAGS is normally -O2. +OPTFLAGS = -O2 -g3 +DISPOPTFLAGS = -O2 -g3 +FPFLAGS = +DFLAGS = -DNEW_STORAGE -DLINUX -DAIX -DOLD_CURSOR \ + -DBYTESWAP -DFORKCOMM -DNOFORN -DLOGINT $(XFLAGS) \ + -DRELEASE=351 -DSYSVSIGNALS -DSYSVONLY \ + -D_GNU_SOURCE + +LDFLAGS = -L/usr/X11/lib -lX11 -lc -lm -lcrypt +LDELDFLAGS = -L/usr/X11/lib -lX11 -lc -lm -lcrypt + +INLINE = # $(SRCDIR)dspSPARC.il +BITBLTFILE = # $(OBJECTDIR)bbtSPARC.o +BYTESWAPFILES = $(OBJECTDIR)byteswap.o + +OBJECTDIR = ../$(RELEASENAME)/ + +default : ../$(OSARCHNAME)/lde + +############ +# +# SPECIAL xc.o for debugging +# +############ +$(OBJECTDIR)xc.o: $(SRCDIR)xc.c $(INCDIR)lispemul.h $(INCDIR)emlglob.h \ + $(INCDIR)address.h \ + $(INCDIR)adr68k.h $(INCDIR)stack.h $(INCDIR)lspglob.h \ + $(INCDIR)lsptypes.h $(INCDIR)lispmap.h $(INCDIR)cell.h \ + $(INCDIR)initatms.h $(INCDIR)gcdata.h \ + $(INCDIR)arith.h $(INCDIR)stream.h \ + $(INCDIR)tos1defs.h $(INCDIR)tosret.h \ + $(INCDIR)tosfns.h $(INCDIR)inlineC.h + $(CC) $(DISPRFLAGS) -UOPDISP $(SRCDIR)xc.c -I$(INCDIR) -o $(OBJECTDIR)xc.o diff --git a/bin/osversion b/bin/osversion index edb4add..4d0cfae 100755 --- a/bin/osversion +++ b/bin/osversion @@ -9,6 +9,7 @@ case "$os" in *-*-linux*) echo linux ;; *-*-openbsd*) echo openbsd ;; *-*-freebsd*) echo freebsd ;; + *-*-cygwin*) echo cygwin ;; esac ### Don't leave the variable set. unset os diff --git a/src/timer.c b/src/timer.c index 3ac5867..2ad1681 100644 --- a/src/timer.c +++ b/src/timer.c @@ -617,6 +617,7 @@ static void int_io_init() { #ifndef DOS SIGERRCHK(sigset(SIGIO, getsignaldata), "sigset io"); #ifdef XWINDOW +#ifndef __CYGWIN__ #ifdef LINUX if (fcntl(ConnectionNumber(currentdsp->display_id), F_SETSIG, 0) < 0) perror("fcntl on X fd - SETSIG for input handling failed"); @@ -624,6 +625,7 @@ static void int_io_init() { if (ioctl(ConnectionNumber(currentdsp->display_id), I_SETSIG, S_INPUT) < 0) perror("ioctl on X fd - SETSIG for input handling failed"); #endif +#endif /* __CYGWIN__ */ #endif /* XWINDOW */ #ifdef USE_DLPI