diff --git a/ChangeLog b/ChangeLog index 735eba261..a030a3285 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,40 @@ +Mon May 27 09:57:34 1996 Andrew McCallum + + * src/x-cbs.m.in: Prepend missing `o-' in #include. + * src/x-bas.m.in: Likewise. + +Mon May 20 16:53:57 1996 Adam Fedor + + * src/include/NSGeometry.h: Include NSString functions only if + compiling in Objective-C mode (using "#ifdef __OBJC__"). + +Tue May 14 20:03:55 1996 Scott Christley + + * INSTALL.WIN32: Correct grammatical errors. + * Makefile.sed.nt: Sed script now handles install and all + targets for top level Makefile. + * checks/Makefile.sed.nt: Corrections to handle changes + to checks/Makefile.in. + * configure.bat: Corrections to handle the different + directory structure for the header files. + * src/BinaryCStream: Eliminate header files not needed on WIN32. + * src/Makefile.in (ALL_INCLUDE_FLAGS): Eliminate -I./include flag. + (FORCE): New Target. + * src/Makefile.sed.nt: New file; somehow got lost. + * src/RunLoop.m: Eliminate header files not needed on WIN32. + * src/TcpPort.m: Likewise. + * src/UdpPort.m: Likewise. + * src/include/TcpPort.h: Likewise. + * src/include/config-nt.h: New file, got lost during restructuring. + * src/include/config-nt.sed: New file, got lost during restructuring. + * src/libgnustep-base-entry.c: New file. + * src/libgnustep-base.top: New file. + +Wed May 22 06:56:49 1996 Andrew McCallum + + * doc/install.texi: Say that the objc patch will be part of gcc + 2.8.0. + Mon May 13 09:03:55 1996 Andrew McCallum * src/Makefile.in (FILE_AUTHORS): Added "Scott Christley". diff --git a/Headers/gnustep/base/TcpPort.h b/Headers/gnustep/base/TcpPort.h index fa7bd2547..72559ea58 100644 --- a/Headers/gnustep/base/TcpPort.h +++ b/Headers/gnustep/base/TcpPort.h @@ -27,9 +27,11 @@ #include #include #include +#ifndef WIN32 #include #include #include +#endif /* !WIN32 */ #include /* A concrete implementation of a Port object implemented on top of diff --git a/Headers/gnustep/base/config-nt.h b/Headers/gnustep/base/config-nt.h index 4e66ee93d..3054b723d 100644 --- a/Headers/gnustep/base/config-nt.h +++ b/Headers/gnustep/base/config-nt.h @@ -11,3 +11,18 @@ # endif # define popen _popen #endif + +#define BITSPERBYTE 8 + +/* WIN32 extra config stuff */ + +// +// WIN32 +// +#ifdef WIN32 +# include +# ifndef vm_page_size +# define vm_page_size 4096 +# endif +# define popen _popen +#endif diff --git a/Headers/gnustep/base/config-nt.sed b/Headers/gnustep/base/config-nt.sed index e3fdb834b..1852bcca8 100644 --- a/Headers/gnustep/base/config-nt.sed +++ b/Headers/gnustep/base/config-nt.sed @@ -1,2 +1,4 @@ s/@NeXT_runtime@/0/ s/@NeXT_cc@/0/ +s/@NeXT_runtime@/0/ +s/@NeXT_cc@/0/ diff --git a/INSTALL.WIN32 b/INSTALL.WIN32 index 97dd43551..20a4ff5f8 100644 --- a/INSTALL.WIN32 +++ b/INSTALL.WIN32 @@ -1,15 +1,15 @@ Installing on Windows NT/95 *************************** -This file is maintained by Scott Christley . +This file is maintained by Scott Christley . If you have questions about the installation procedure on WIN32, please contact Scott. -The system requires that you have headers and for the WIN32 API -and ANSI-C. If you are have a working bash shell then -you should run the normal Unix ./configure shell script; otherwise, -you can follow these instructions and run the configure.bat batch file. +The system requires that you have headers and libraries for the WIN32 +API and ANSI-C. If you have a working bash shell then you should run +the normal Unix ./configure shell script; otherwise, you can follow +these instructions and run the configure.bat batch file. Quick installation instructions: @@ -31,17 +31,17 @@ you can follow these instructions and run the configure.bat batch file. 'includedir' where to install the headers 'install' make rules to install libobjects - 4. Run 'configure.bat' to create the Makefiles, and the header configuration - file 'src/objects/config.h' + 3. Run 'configure.bat' to create the Makefiles, and the header configuration + file 'src/include/config.h' - 5. Type `make' to compile the package. If you want, you can override + 4. Type `make' to compile the package. If you want, you can override the `make' variables `CFLAGS' like this: make CFLAGS=-O2 - 6. Type `make install' to install the library, data files, header + 5. Type `make install' to install the library, data files, header files, and documentation. - 7. You can remove the program binaries and object files from the + 6. You can remove the program binaries and object files from the source directory by typing `make clean'. To also remove the Makefile(s), and `config.status' (all the files that `configure' created), type `make distclean'. diff --git a/Makefile.sed.nt b/Makefile.sed.nt index 1dd9c1a48..099e253e3 100644 --- a/Makefile.sed.nt +++ b/Makefile.sed.nt @@ -7,9 +7,12 @@ s/@srcdir@/./ $(MAKE) - $(MAKEFLAGS) $(MAKEDEFINES) $* & \\\ cd .. ) /install uninstall TAGS:/,/done/c\ -install uninstall TAGS: \ +install uninstall TAGS: FORCE\ for %i in ( $(SUBDIRS) ) do \\\ ( cd %i & \\\ $(MAKE) - $(MAKEFLAGS) $(MAKEDEFINES) $@ & \\\ cd .. ) +/src doc checks examples:/,/$(MAKEDEFINES)/c\ +src doc checks examples: FORCE \ + cd $@ & $(MAKE) $(MAKEDEFINES) diff --git a/Source/BinaryCStream.m b/Source/BinaryCStream.m index ee5b130a6..fe7544b90 100644 --- a/Source/BinaryCStream.m +++ b/Source/BinaryCStream.m @@ -29,8 +29,10 @@ #include #include #include +#ifndef WIN32 #include // This gets BITSPERBYTE on Solaris #include // for byte-conversion +#endif /* !WIN32 */ #define DEFAULT_FORMAT_VERSION 0 diff --git a/Source/Makefile.in b/Source/Makefile.in index 14ce8f0df..82ce5fec3 100644 --- a/Source/Makefile.in +++ b/Source/Makefile.in @@ -85,7 +85,7 @@ NEXT_NEXT_INCLUDES = -I/usr/include GNU_NEXT_INCLUDES = -I$(srcdir) NEXT_INCLUDES = @NEXT_INCLUDES@ -ALL_INCLUDE_FLAGS = -I. -I./include $(NEXT_INCLUDES) $(INCLUDEFLAGS) +ALL_INCLUDE_FLAGS = -I. $(NEXT_INCLUDES) $(INCLUDEFLAGS) ALL_CPPFLAGS = $(ALL_INCLUDE_FLAGS) $(CPPFLAGS) ALL_CFLAGS = $(CFLAGS) ALL_OBJCFLAGS = $(CFLAGS) -Wno-protocol @@ -670,3 +670,5 @@ copy-dist: $(DIST_FILES) ln $$file ../snap/src/$$file ; \ done ln AUTHORS ../snap + +FORCE: diff --git a/Source/Makefile.sed.nt b/Source/Makefile.sed.nt index fbfe0d28d..4ce27cc48 100644 --- a/Source/Makefile.sed.nt +++ b/Source/Makefile.sed.nt @@ -1,5 +1,155 @@ s/@configure_input@/ Generated from Makefile.in by configure.bat/ s/@srcdir@/./ +s/@prefix@/$(MB_DEV)/ +s/@exec_prefix@/$(prefix)/ +s/libdir = $(exec_prefix)\/lib/libdir = $(MB_DEV)\/$(MB_LIB)/ +s/includedir = $(prefix)\/include/includedir = $(MB_DEV)\/$(MB_H)\/$(MB_OS)/ +s/CC = @CC@ -pipe/CC = gcc -fgnu-runtime/ +s/@RANLIB@/touch/ +s/@INSTALL@/cp/ +s/@INSTALL_PROGRAM@/$(INSTALL)/ +s/@INSTALL_DATA@/$(INSTALL)/ +s/AR = ar/AR = lib/ +s/ARFLAGS = rc/ARFLAGS = / +s/AROUT =/AROUT = -out:/ +s/@LN_S@/cp/ +s/@SHARED_LIBRARY@/libgnustep-base.dll/ +s/CFLAGS = -g -O -Wall -Wno-implicit/CFLAGS = -O -Wall -Wno-implicit/ +s/LEXFLAGS =/LEXFLAGS = -L/ +s/EXEEXT =/EXEEXT = .exe/ +s/OEXT = .o/OEXT = .obj/ +s/LIBEXT = .a/LIBEXT = .lib/ +s/@DEFS@/-DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_TIMES=1 -DHAVE_VSPRINTF=1 -Dvm_page_size=4096 -D__MS_WIN32__\ +\ +##################################################################\ +#\ +# NT specifics\ +#\ +WIN32_GCC_INCLUDE = \ +INIT_FILE = init_gnustep_base_runtime\ +INIT_FILE_OBJ = $(INIT_FILE)$(OEXT)/ +s/@DYNAMIC_LINKER@/null/ +s/@NEXT_INCLUDES@// +s/@HEADERS_INSTALL@/$(GNU_HEADERS) $(NEXTSTEP_HEADERS) $(GNUSTEP_HEADERS)/ +s/@OBJS_INSTALL@/$(GNU_OBJS) $(NEXTSTEP_OBJS) $(GNUSTEP_OBJS)/ +s/@LIBOBJECTS_SO@// +/lib$(LIBRARY_NAME)$(LIBEXT):/,/$(RANLIB) lib$(LIBRARY_NAME)$(LIBEXT)/c\ +lib$(LIBRARY_NAME)$(LIBEXT): $(HEADERS_INSTALL) $(OBJS_INSTALL) $(INIT_FILE_OBJ)\ + $(AR) $(ARFLAGS) $(AROUT)lib1$(LIBEXT) $(GNU_OBJS)\ + $(AR) $(ARFLAGS) $(AROUT)lib2$(LIBEXT) $(NEXTSTEP_OBJS) $(INIT_FILE_OBJ)\ + $(AR) $(ARFLAGS) $(AROUT)lib3$(LIBEXT) $(GNUSTEP_OBJS)\ + $(AR) $(ARFLAGS) $(AROUT)lib$(LIBRARY_NAME)$(LIBEXT) \\\ + lib1$(LIBEXT) lib2$(LIBEXT) lib3$(LIBEXT)\ + rm lib1$(LIBEXT) lib2$(LIBEXT) lib3$(LIBEXT) +/NSVALUE_MFILES =/c\ +NSVALUE_CLUSTER = 0 1 2 3 4 \ +NSVALUE_OFILES = \\\ + NSValue0$(OEXT) NSValue1$(OEXT) NSValue2$(OEXT) NSValue3$(OEXT) \\\ + NSValue4$(OEXT) \ +NSVALUE_MFILES = \\ +/NSNUMBER_MFILES =/c\ +NSNUMBER_CLUSTER = 0 1 2 3 4 5 6 7 8 9 10 11 12 \ +NSNUMBER_OFILES = \\\ + NSNumber0$(OEXT) NSNumber1$(OEXT) NSNumber2$(OEXT) \\\ + NSNumber3$(OEXT) NSNumber4$(OEXT) NSNumber5$(OEXT) \\\ + NSNumber6$(OEXT) NSNumber7$(OEXT) NSNumber8$(OEXT) \\\ + NSNumber9$(OEXT) NSNumber10$(OEXT) NSNumber11$(OEXT) \\\ + NSNumber12$(OEXT) \ +NSNUMBER_MFILES = \\ +/$(NSVALUE_MFILES) : NSCTemplateValue.m/,/cat $(srcdir)\/NSConcreteNumber/c\ +# Compilation of class clusters \ +$(NSVALUE_OFILES) : NSCTemplateValue.m \ + for %i in ( ${NSVALUE_CLUSTER} ) do \\\ + ( cp NSCTemplateValue.m NSCTemplateValue%i.m & \\\ + $(CC) -c $(ALL_CPPFLAGS) $(DEFS) $(ALL_OBJCFLAGS) \\\ + -DTYPE_ORDER=%i NSCTemplateValue%i.m \\\ + -o NSValue%i$(OEXT) & \\\ + rm -f NSCTemplateValue%i.m ) \ +\ +$(NSNUMBER_OFILES) : NSConcreteNumber.m \ + for %i in ( ${NSNUMBER_CLUSTER} ) do \\\ + ( cp NSConcreteNumber.m NSConcreteNumber%i.m & \\\ + $(CC) -c $(ALL_CPPFLAGS) $(DEFS) $(ALL_OBJCFLAGS) \\\ + -DTYPE_ORDER=%i -c NSConcreteNumber%i.m \\\ + -o NSNumber%i$(OEXT) & \\\ + rm -f NSConcreteNumber%i.m ) +/GNUSTEP_OBJS =/,/$(NSNUMBER_MFILES:.m=/c\ +GNUSTEP_OBJS = \\\ + $(GNUSTEP_MFILES:.m=$(OEXT)) \\\ + $(GNUSTEP_CFILES:.c=$(OEXT)) \\\ + $(NSVALUE_OFILES) $(NSNUMBER_OFILES) +/installdirs:/,/$(includedir)\/Foundation/c\ +installdirs:\ + IF NOT EXIST $(MB_DEV)\\$(MB_H)\\$(MB_OS)\\gnustep mkdir $(MB_DEV)\\$(MB_H)\\$(MB_OS)\\gnustep\ + IF NOT EXIST $(MB_DEV)\\$(MB_H)\\$(MB_OS)\\gnustep\\base mkdir $(MB_DEV)\\$(MB_H)\\$(MB_OS)\\gnustep\\base\ + IF NOT EXIST $(MB_DEV)\\$(MB_H)\\$(MB_OS)\\objc mkdir $(MB_DEV)\\$(MB_H)\\$(MB_OS)\\objc +/install: installdirs all/,/cd $(includedir)\/objc; rm -f README/c\ +$(INIT_FILE_OBJ): $(OBJS_INSTALL)\ + nm $(GNU_OBJS) | grep " __GLOBAL_" > tmpinit.c\ + nm $(GNUSTEP_OBJS) | grep " __GLOBAL_" >> tmpinit.c\ + nm $(NEXTSTEP_OBJS) | grep " __GLOBAL_" >> tmpinit.c\ + collect tmpinit.c $(INIT_FILE)\ + $(CC) -c $(ALL_CPPFLAGS) $(DEFS) $(ALL_OBJCFLAGS) $(INIT_FILE).c\ + rm tmpinit.c\ +\ +lib$(LIBRARY_NAME)-dll$(LIBEXT): $(HEADERS_INSTALL) $(OBJS_INSTALL) $(INIT_LIB_OBJ) lib$(LIBRARY_NAME).def\ + lib -machine:i386 -def:lib$(LIBRARY_NAME).def \\\ + lib$(LIBRARY_NAME)$(LIBEXT) \\\ + -out:lib$(LIBRARY_NAME)-dll$(LIBEXT)\ +\ +lib$(LIBRARY_NAME).dll: $(HEADERS_INSTALL) $(OBJS_INSTALL) $(INIT_LIB_OBJ) lib$(LIBRARY_NAME)-dll$(LIBEXT) lib$(LIBRARY_NAME)-entry$(OEXT)\ + link -out:lib$(LIBRARY_NAME).dll $(DLLFLAGS) \\\ + lib$(LIBRARY_NAME)-dll.exp \\\ + lib$(LIBRARY_NAME)$(LIBEXT) \\\ + lib$(LIBRARY_NAME)-entry$(OEXT) libgcc.lib libobjc.lib \\\ + libcmt.lib oldnames.lib user32.lib kernel32.lib wsock32.lib\ +\ +lib$(LIBRARY_NAME).def: lib$(LIBRARY_NAME)$(LIBEXT)\ + nm libgnustep-base.lib | grep "g e" | grep ".text" | gawk "{print $$6}" | gawk "{print substr($$1,2,length($$1)-1)}" > libgnustep-base.lst\ + cat libgnustep-base.top libgnustep-base.lst > libgnustep-base.def\ + rm libgnustep-base.lst\ +\ +lib$(LIBRARY_NAME)-entry$(OEXT): lib$(LIBRARY_NAME)-entry.c\ + $(CC) -c $(ALL_CPPFLAGS) $(DEFS) $(ALL_CFLAGS) -o $*$(OEXT) $<\ +\ +install: installdirs all\ + $(INSTALL_DATA) lib$(LIBRARY_NAME)$(LIBEXT) $(libdir)\ + $(INSTALL_DATA) lib$(LIBRARY_NAME)-dll$(LIBEXT) $(libdir)\ + $(INSTALL_DATA) lib$(LIBRARY_NAME).dll $(MB_DEV)/$(MB_BIN)\ + $(INSTALL_DATA) $(srcdir)/gnustep/base/*.h $(includedir)/gnustep/base\ + $(INSTALL_DATA) $(srcdir)/objc/*.h $(includedir)/objc\ + $(INSTALL_DATA) include/config.h $(includedir)/gnustep/base/config.h\ + cp -r $(includedir)/gnustep/base $(includedir)/Foundation +/for file in $(NEXTSTEP_HEADERS); do/,/done/c\ + for %i in ( ${NEXTSTEP_HEADERS} ) do \\\ + rm -f $(includedir)/%i +/gnustep\/base:/,/ln -s $(srcdir)\/include Foundation/c\ +gnustep/base: FORCE\ + -rm -rf gnustep\ + -mkdir gnustep\ + -mkdir gnustep\\base\ + cp include/* gnustep/base\ +# This deletion is necessary, because the CVS repository contains\ +# an emtpy `Foundation' directory that used to hold the OpenStep headers.\ +Foundation: FORCE\ + -rm -rf Foundation\ + -mkdir Foundation\ + cp include/* Foundation +/clean: mostlyclean/,/rm -f dynamic-load.h/c\ +clean: mostlyclean\ + rm -f lib$(LIBRARY_NAME)$(LIBEXT) *${OEXT}\ + rm -f $(NSVALUE_MFILES) $(NSNUMBER_MFILES)\ + rm -f init_gnustep_base_runtime.c\ + rm -f libgnustep-base-dll.*\ + rm -f libgnustep-base.def\ +distclean: clean\ + rm -f Makefile\ + rm -f 0 1 2 3 4 5 6 7 8 9 10 11 12\ + rm -rf gnustep\ + rm -rf Foundation\ + rm -f dynamic-load.h +s/@configure_input@/ Generated from Makefile.in by configure.bat/ +s/@srcdir@/./ s/@prefix@/\/MB\/Headers/ s/@exec_prefix@/$(prefix)/ s/libdir = $(exec_prefix)\/lib/libdir = \/MB\/Libraries/ diff --git a/Source/RunLoop.m b/Source/RunLoop.m index f4d0c2d07..0662c4072 100644 --- a/Source/RunLoop.m +++ b/Source/RunLoop.m @@ -59,7 +59,9 @@ #include #include #include +#ifndef WIN32 #include +#endif /* !WIN32 */ #include #include /* for memset() */ diff --git a/Source/TcpPort.m b/Source/TcpPort.m index d7ff50338..2cc9fb7e8 100644 --- a/Source/TcpPort.m +++ b/Source/TcpPort.m @@ -40,9 +40,11 @@ #include #include #include +#ifndef WIN32 #include /* for gethostname() */ #include /* for MAXHOSTNAMELEN */ #include /* for inet_ntoa() */ +#endif /* !WIN32 */ #include /* for memset() */ #ifndef WIN32 #include diff --git a/Source/UdpPort.m b/Source/UdpPort.m index 8be92a33e..974b9a0e9 100644 --- a/Source/UdpPort.m +++ b/Source/UdpPort.m @@ -31,7 +31,9 @@ #include #include #include +#ifndef WIN32 #include /* for MAXHOSTNAMELEN */ +#endif /* !WIN32 */ #if _AIX #include #endif /* _AIX */ diff --git a/Testing/Makefile.sed.nt b/Testing/Makefile.sed.nt index d3222d42b..635ca0b7d 100644 --- a/Testing/Makefile.sed.nt +++ b/Testing/Makefile.sed.nt @@ -1,13 +1,16 @@ s/@srcdir@/./ -s/@CC@/gcc -fgnu-runtime/ +s/@CC@/gcc -fgnu-runtime -D__MS_WIN32__/ s/@DYNAMIC_BUNDLER_LINKER@// s/@DYNAMIC_LDFLAGS@// s/@DYNAMIC_CFLAGS@// -s/LIBS = -L..\/src -lobjects @LIBOBJC@ @LIBS@ -lm/LIBS = ..\/src\/libobjects.lib libobjc.lib libgcc.lib libc.lib oldnames.lib user32.lib wsock32.lib/ +s/LIBS = -L..\/src -l$(LIBRARY_NAME) @LIBOBJC@ @LIBS@ -lm/LIBS = ..\/src\/lib$(LIBRARY_NAME).lib libobjc.lib libgcc.lib libc.lib oldnames.lib user32.lib wsock32.lib/ s/@NEXT_INCLUDES@// -s/CFLAGS = -Wall -Wno-implicit -g -O/CFLAGS = -Wall -Wno-implicit -O/ +s/CFLAGS = -Wall -Wno-implicit -Wno-format -g -O/CFLAGS = -Wall -Wno-implicit -Wno-format -O/ s/EXEEXT =/EXEEXT = .exe/ s/OEXT = .o/OEXT = .obj/ s/LIBEXT = .a/LIBEXT = .lib/ s/@DEFS@/-DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_TIMES=1 -DHAVE_VSPRINTF=1 -Dvm_page_size=4096/ -s/LINK_CMD = $(CC) $(ALL_CFLAGS) $@$(OEXT) -o $@ $(ALL_LDFLAGS)/LINK_CMD = nm $@$(OEXT) | grep " __GLOBAL_" > tmpinit.c \& collect tmpinit.c init_$@ \& $(CC) -c init_$@.c \& rm tmpinit.c \& ld $@$(OEXT) init_$@$(OEXT) -o $@$(EXEEXT) $(ALL_LDFLAGS)/ +/%: %$(OEXT)/,/$(CC) $(ALL_CFLAGS) $@$(OEXT)/c\ +LINK_CMD = nm $@$(OEXT) | grep " __GLOBAL_" > tmpinit.c \& collect tmpinit.c init_$@ \& $(CC) -c init_$@.c \& rm tmpinit.c \& ld $@$(OEXT) init_$@$(OEXT) -o $@$(EXEEXT) $(ALL_LDFLAGS)\ +%: %$(OEXT) ../src/lib$(LIBRARY_NAME)$(LIBEXT)\ + $(LINK_CMD) diff --git a/configure.bat b/configure.bat index a30697d98..aefd0a0f1 100644 --- a/configure.bat +++ b/configure.bat @@ -1,13 +1,14 @@ @echo off rem rem configure.bat -rem Configuration program for libobjects for Window NT +rem Configuration program for GNUstep Base Library +rem on WIN32 operating systems using Microsoft tools. rem rem Copyright (C) 1996 Free Software Foundation, Inc. rem rem Written by: Scott Christley rem -rem This file is part of the GNU Objective-C Class library. +rem This file is part of the GNUstep Base Library. rem rem This library is free software; you can redistribute it and/or rem modify it under the terms of the GNU Library General Public @@ -49,8 +50,8 @@ touch 9 touch 10 touch 11 touch 12 -echo "objects subdirectory" -cd objects +echo "include subdirectory" +cd include rm -f config.h sed -f config-nt.sed config.h.in >>config.h cat config-nt.h >>config.h