WinNT and thread-related odifications from Scott Christley

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@915 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Andrew McCallum 1996-02-13 15:43:30 +00:00
parent c8de6a4002
commit 8c940cb2bb
23 changed files with 250 additions and 83 deletions

View file

@ -1,5 +1,51 @@
Mon Feb 12 22:03:05 1996 Andrew McCallum <mccallum@cs.rochester.edu>
* src/Makefile.in: Fix patch rejects.
(GNUSTEP_MFILES): Added NSHashTable.m and NSMapTable.m.
(GNUSTEP_HEADERS): Added Foundation/NSHashTable.h and
Foundation/NSMapTable.h.
Mon Feb 12 21:14:58 1996 Albin L. Jones <ajones@coos.dartmouth.edu>
* src/Makefile.in (GNU_MFILES, GNU_CFILES, GNU_HEADERS): Added
the above to the appropriate lists. (GNU_BASICS_CFILES): Created
this variable to hold a list of `...-basics.c' files to be made.
(GNU_BASICS_HFILES): Similarly. (GNU_CALLBACKS_CFILES): Created
this variable to hold a list of `...-callbacks.c' files to be
make. (GNU_CALLBACKS_HFILES): Similarly. (GNU_OTHER_SRCFILES):
Needed to add `x-basics.c.in', `x-callbacks.c.in',
`objects/x-basics.h.in' and `objects/x-callbacks.h.in' to this
list. (GNUSTEP_HEADERS): Added `Foundation/atoz.h'. (%-basics.c,
%-callbacks.c, objects/%-basics.h, objects/%-callbacks.h): Added
these make targets. (array.o, data.o, hash.o, list.o, map.o,
objects/array.h, objects/data.h, objects/hash.h, objects/list.h,
objects/map.h): Added these make targets.
* src/NSHashTable.m, src/NSMapTable.m,
src/Foundation/NSHashTable.h,
src/Foundation/NSMapTable.h,
src/Foundation/atoz.h: Added these.
* src/objects/abort.h, src/objects/allocs.h,
src/objects/array.h, src/objects/bitops.h,
src/objects/callbacks.h, src/objects/data.h,
src/objects/hash.h, src/objects/list.h, src/objects/magic.h,
src/objects/magic.h, src/objects/minmax.h,
src/objects/number.h: Added these.
* src/abort.c, src/allocs.c, src/array.c, src/atoz.m,
src/callbacks-char_p.c, src/callbacks-id.m, src/callbacks-int.c,
src/callbacks-int_p.c, src/callbacks-void_p.c, src/callbacks.c,
src/hash.c, src/list.c, src/map.c, src/md5.c, src/md5.h,
src/number.c: Added these.
Mon Feb 12 20:50:05 1996 Andrew McCallum <mccallum@cs.rochester.edu>
* src/Makefile.in (GNUSTEP_MFILES): Added NSHashTable.m and
NSMapTable.m.
(GNUSTEP_HEADERS): Added Foundation/NSHashTable.h and
Foundation/NSMapTable.h.
* checks/invocation.m: New file.
* checks/Makefile.in (SRCS): Add invocation.m.
@ -33,6 +79,58 @@ Thu Feb 1 17:04:17 1996 Andrew McCallum <mccallum@eeyore.cs.rochester>
Use -subclassResponsibility instead of -notImplemented
where appropriate.
Mon Feb 5 10:08:56 1996 Scott Christley (scottc@net-community.com)
* checks/diningPhilosophers.m: New file
* checks/Makefile.in: add diningPhilosophers.m
* src/Foundation/NSGeometry.h: Add NSZeroPoint, NSZeroSize,
and NSZeroRect constants.
Sun Feb 4 18:43:41 1996 Scott Christley (scottc@net-community.com)
* checks/Makefile.sed.nt: New file
* configure.bat: Added configuration of checks makefile
* checks/Makefile.in (RCS_FILES): Add file Makefile.sed.nt
Add $(EXEEXT), $(OEXT), $(LIBEXT) extensions
* test01.m: Different random() for WIN32
* src/Foundation/NSZone.h: include <objects/config.h>
Sat Feb 3 22:28:52 1996 Scott Christley (scottc@net-community.com)
* src/NSLock.m: New file
* src/Foundation/NSLock.h: New file
* src/NSThread.m: New file
* src/Foundation/NSThread.h: New file
* src/Makefile.in (GNUSTEP_MFILES): Add NSLock.m, NSThread.m
(GNUSTEP_HEADERS): Add Foundation/NSLock.h, Foundation/NSThread.h
Fri Feb 2 15:44:20 1996 Scott Christley (scottc@net-community.com)
* src/Makefile.in (uninstall): Only uninstall NEXTSTEP_HEADERS
Thu Feb 1 19:42:09 1996 Scott Christley (scottc@net-community.com)
* src/objects/SocketPort.h: Exclude non-existent headers for WIN32
* src/objects/Time.h: Likewise
* src/SocketPort.m: Likewise
* src/NSBundle.m: Likewise
* src/objects/NSCoder.h: fixed mispelled file name
* src/NSCoder.m: remove inclusion of non-existent file
* src/Date.m: Exclude non-existent headers for WIN32
* src/NSProcessInfo.m: Likewise
* src/find_exec.c: Likewise
* Makefile.in (RCS_FILES): Add file configure.bat, Makefile.sed.nt
Add $(EXEEXT), $(OEXT), $(LIBEXT) extensions
* configure.bat: New file
* Makefile.sed.nt: New file
* src/Makefile.sed.nt: New file
* src/objects/config-nt.h: New file
* src/objects/config-nt.sed: New file
* src/objc-load.c: Runtime include file changed "objc/list.h"
to "objc/objc-list.h"
* src/objects/stdobject.h.in: Likewise
Wed Jan 31 22:29:57 1996 Andrew McCallum <mccallum@cs.rochester.edu>
* Makefile.in (DIST_FILES): Add file STATUS.

View file

@ -50,6 +50,11 @@ typedef enum {
NSMaxYEdge
} NSRectEdge;
/* Standard zero structures */
const NSPoint NSZeroPoint;
const NSRect NSZeroRect;
const NSSize NSZeroSize;
/* Create Basic Structures */
extern NSPoint NSMakePoint(float x, float y);
extern NSSize NSMakeSize(float w, float h);

View file

@ -31,6 +31,7 @@
#else
#include <stdio.h>
#include <stdlib.h>
#include <objects/config.h>
/*
* This the NeXTStep zone typedef. It is nothing like the implementation

View file

@ -28,8 +28,11 @@
#include <objects/Port.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#ifndef WIN32
# include <sys/socket.h>
# include <netinet/in.h>
#endif /* !WIN32 */
typedef struct sockaddr_in sockport_t;

View file

@ -28,8 +28,11 @@
#include <objects/stdobjects.h>
#include <objects/Magnitude.h>
#ifndef WIN32
#include <sys/time.h>
#include <sys/resource.h>
#endif
#ifdef _SEQUENT_
/* Include needed for getclock() in our replacement for gettimeofday() */

View file

@ -54,7 +54,7 @@
#include <objc/objc-api.h>
#include <objc/encoding.h>
#include <objc/sarray.h>
#include <objc/list.h>
#include <objc/objc-list.h>
#endif
#include <Foundation/NSObject.h>

View file

@ -54,7 +54,7 @@
#include <objc/objc-api.h>
#include <objc/encoding.h>
#include <objc/sarray.h>
#include <objc/list.h>
#include <objc/objc-list.h>
#endif
#include <Foundation/NSObject.h>

View file

@ -39,6 +39,7 @@ SUBDIRS = src doc checks examples NSCharacterSets admin
RCS_FILES = \
Makefile.in Makeconf configure.in aclocal.m4 \
configure.bat Makefile.sed.nt \
config/config.nested.c config/config.nextcc.h config/config.nextrt.m
DIST_FILES = \

View file

@ -40,6 +40,7 @@ INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
AR = ar
AROUT =
ARFLAGS = rc
LN_S = @LN_S@
MAKEINFO = makeinfo
@ -49,9 +50,14 @@ LEXFLAGS =
DEFS = @DEFS@
# File name extensions
OEXT = .o
EXEEXT =
LIBEXT = .a
# All these are optional. You can redefine CFLAGS, CPPFLAGS and
# INCLUDEFLAGS on the command line however you like.
CFLAGS = -Wno-implicit -g -O
CFLAGS = -Wno-implicit -O
CPPFLAGS =
INCLUDEFLAGS =
@ -87,14 +93,14 @@ MAKEDEFINES = CC='$(CC)' CFLAGS='$(CFLAGS)' CPPFLAGS='$(CPPFLAGS)' \
INCLUDEFLAGS='$(INCLUDEFLAGS)' DEFS='$(DEFS)'
.SUFFIXES: .m
.m.o:
.m$(OEXT):
$(CC) -c $(ALL_CPPFLAGS) $(DEFS) $(ALL_OBJCFLAGS) -o $@ $<
.c.o:
.c$(OEXT):
$(CC) -c $(ALL_CPPFLAGS) $(DEFS) $(ALL_CFLAGS) -o $@ $<
%_pic.o: %.m
%_pic$(OEXT): %.m
$(CC) -c $(ALL_CPPFLAGS) -fPIC -DPIC $(DEFS) \
$(ALL_OBJCFLAGS) -o $@ $<
%_pic.o: %.c
%_pic$(OEXT): %.c
$(CC) -c $(ALL_CPPFLAGS) -fPIC -DPIC $(DEFS) \
$(ALL_CFLAGS) -o $@ $<
@ -212,10 +218,10 @@ objects/x-basics.h.in \
objects/x-callbacks.h.in
GNU_OBJS = \
$(GNU_MFILES:.m=.o) \
$(GNU_BASICS_CFILES:.c=.o) \
$(GNU_CALLBACKS_CFILES:.c=.o) \
$(GNU_CFILES:.c=.o)
$(GNU_MFILES:.m=$(OEXT)) \
$(GNU_BASICS_CFILES:.c=$(OEXT)) \
$(GNU_CALLBACKS_CFILES:.c=$(OEXT)) \
$(GNU_CFILES:.c=$(OEXT))
GNU_HEADERS = \
objects/Archiver.h \
@ -327,9 +333,9 @@ NEXTSTEP_OTHER_SRCFILES = \
NXStringTable_scan.l
NEXTSTEP_OBJS = \
$(NEXTSTEP_MFILES:.m=.o) \
$(NEXTSTEP_CFILES:.c=.o) \
$(NEXTSTEP_DERIVED_CFILES:.c=.o)
$(NEXTSTEP_MFILES:.m=$(OEXT)) \
$(NEXTSTEP_CFILES:.c=$(OEXT)) \
$(NEXTSTEP_DERIVED_CFILES:.c=$(OEXT))
NEXTSTEP_HEADERS = \
objc/HashTable.h \
@ -367,6 +373,7 @@ NSGCString.m \
NSGData.m \
NSGDictionary.m \
NSGSet.m \
NSLock.m \
NSHashTable.m \
NSMapTable.m \
NSMethodSignature.m \
@ -377,6 +384,7 @@ NSProcessInfo.m \
NSRange.m \
NSSet.m \
NSString.m \
NSThread.m \
NSTimeZone.m \
NSValue.m
@ -403,10 +411,10 @@ null-load.h \
simple-load.h
GNUSTEP_OBJS = \
$(GNUSTEP_MFILES:.m=.o) \
$(GNUSTEP_CFILES:.c=.o) \
$(NSVALUE_MFILES:.m=.o) \
$(NSNUMBER_MFILES:.m=.o)
$(GNUSTEP_MFILES:.m=$(OEXT)) \
$(GNUSTEP_CFILES:.c=$(OEXT)) \
$(NSVALUE_MFILES:.m=$(OEXT)) \
$(NSNUMBER_MFILES:.m=$(OEXT))
GNUSTEP_HEADERS = \
Foundation/NSArchiver.h \
@ -428,6 +436,7 @@ Foundation/NSGArray.h \
Foundation/NSGCString.h \
Foundation/NSGData.h \
Foundation/NSGDictionary.h \
Foundation/NSLock.h \
Foundation/NSGSet.h \
Foundation/NSHashTable.h \
Foundation/NSInvocation.h \
@ -440,6 +449,7 @@ Foundation/NSRange.h \
Foundation/NSSerialization.h \
Foundation/NSSet.h \
Foundation/NSString.h \
Foundation/NSThread.h \
Foundation/NSUtilities.h \
Foundation/NSValue.h \
Foundation/NSZone.h \
@ -450,7 +460,7 @@ HEADERS_INSTALL = @HEADERS_INSTALL@ \
$(GNU_BASICS_HFILES) $(GNU_CALLBACKS_HFILES) \
objects/stdobjects.h
OBJS_INSTALL = @OBJS_INSTALL@
OBJS_INSTALL_PIC = $(OBJS_INSTALL:.o=_pic.o)
OBJS_INSTALL_PIC = $(OBJS_INSTALL:$(OEXT)=_pic$(OEXT))
DIST_FILES = \
Makefile.in AUTHORS \
@ -485,7 +495,7 @@ RCS_FILES = \
$(GNUSTEP_HEADERS) \
$(GNUSTEP_OTHER_SRCFILES)
all: libobjects.a @LIBOBJECTS_SO@
all: libobjects$(LIBEXT) @LIBOBJECTS_SO@
libobjects.so.$(OBJECTS_VERSION): objects/stdobjects.h $(OBJS_INSTALL_PIC)
$(CC) -shared -o libobjects.so.$(OBJECTS_VERSION) \
@ -498,14 +508,14 @@ libobjects.so.$(OBJECTS_VERSION): objects/stdobjects.h $(OBJS_INSTALL_PIC)
ln -s libobjects.so.$(OBJECTS_MAJOR_VERSION) \
libobjects.so
libobjects.a: objects/stdobjects.h $(OBJS_INSTALL)
$(AR) $(ARFLAGS) libobjects.a $(OBJS_INSTALL)
$(RANLIB) libobjects.a
libobjects$(LIBEXT): objects/stdobjects.h $(OBJS_INSTALL)
$(AR) $(ARFLAGS) $(AROUT)libobjects$(LIBEXT) $(OBJS_INSTALL)
$(RANLIB) libobjects$(LIBEXT)
install: installdirs all
# Install the library
$(INSTALL_DATA) libobjects.a $(libdir)
$(RANLIB) $(libdir)/libobjects.a; \
$(INSTALL_DATA) libobjects$(LIBEXT) $(libdir)
$(RANLIB) $(libdir)/libobjects$(LIBEXT); \
if [ -n "@LIBOBJECTS_SO@" ]; then \
$(INSTALL_DATA) libobjects.so.$(OBJECTS_VERSION) $(libdir) ; \
rm -f $(libdir)/libobjects.so.$(OBJECTS_MAJOR_VERSION) ; \
@ -531,29 +541,31 @@ installdirs:
$(includedir)/Foundation
uninstall:
rm -f $(libdir)/libobjects.a
rm -f $(libdir)/libobjects$(LIBEXT)
rm -rf $(includedir)/objects \
$(includedir)/objc \
$(includedir)/Foundation
for file in $(NEXTSTEP_HEADERS); do \
rm -f $(includedir)/$$file ; \
done
# Creation of NSValue and NSNumber concrete classes from templates
$(NSVALUE_MFILES) : NSCTemplateValue.m
rm -f $@
echo '#define TYPE_ORDER' `echo $@ | sed -e 's,[^0-9],,g'` >$@
echo '#define TYPE_ORDER' `echo $@ | sed -e "s,[^0-9],,g"` >$@
cat $(srcdir)/NSCTemplateValue.m >> $@
$(NSNUMBER_MFILES) : NSConcreteNumber.m
rm -f $@
echo '#define TYPE_ORDER' `echo $@ | sed -e 's,[^0-9],,g'` >$@
echo '#define TYPE_ORDER' `echo $@ | sed -e "s,[^0-9],,g"` >$@
cat $(srcdir)/NSConcreteNumber.m >> $@
NXStringTable_scan.c: NXStringTable_scan.l
$(LEX) $(LEXFLAGS) -t $(srcdir)/NXStringTable_scan.l \
> NXStringTable_scan.temp
sed 's/yy/NXlex_/g' < NXStringTable_scan.temp \
sed "s/yy/NXlex_/g" < NXStringTable_scan.temp \
> NXStringTable_scan.c
$(RM) -f NXStringTable_scan.temp
objc-load.o: dynamic-load.h
objc-load$(OEXT): dynamic-load.h
dynamic-load.h: ../config.status
rm -f dynamic-load.h
@ -561,14 +573,14 @@ dynamic-load.h: ../config.status
objects/stdobjects.h: $(srcdir)/../Version $(srcdir)/objects/stdobjects.h.in
rm -f $(srcdir)/objects/stdobjects.h
sed -e 's/@OBJECTS_VERSION@/$(OBJECTS_VERSION)/' \
sed -e "s/@OBJECTS_VERSION@/$(OBJECTS_VERSION)/" \
< $(srcdir)/objects/stdobjects.h.in | \
sed -e 's/@OBJECTS_MAJOR_VERSION@/$(OBJECTS_MAJOR_VERSION)/' | \
sed -e 's/@OBJECTS_MINOR_VERSION@/$(OBJECTS_MINOR_VERSION)/' | \
sed -e 's/@OBJECTS_SUBMINOR_VERSION@/$(OBJECTS_SUBMINOR_VERSION)/' | \
sed -e 's/@OBJECTS_GCC_VERSION@/$(OBJECTS_GCC_VERSION)/' \
sed -e "s/@OBJECTS_MAJOR_VERSION@/$(OBJECTS_MAJOR_VERSION)/" | \
sed -e "s/@OBJECTS_MINOR_VERSION@/$(OBJECTS_MINOR_VERSION)/" | \
sed -e "s/@OBJECTS_SUBMINOR_VERSION@/$(OBJECTS_SUBMINOR_VERSION)/" | \
sed -e "s/@OBJECTS_GCC_VERSION@/$(OBJECTS_GCC_VERSION)/" \
> $(srcdir)/objects/stdobjects.h
stdobjects.o: objects/stdobjects.h
stdobjects$(OEXT): objects/stdobjects.h
# The Xs and Ys...
@ -624,7 +636,7 @@ mostlyclean:
Foundation/*~ \
objc/*~
clean: mostlyclean
rm -f libobjects.a *.o
rm -f libobjects$(LIBEXT) *$(OEXT)
rm -f $(NSVALUE_MFILES) $(NSNUMBER_MFILES)
rm -f $(GNU_BASICS_CFILES) $(GNU_CALLBACKS_CFILES)
rm -f $(GNU_BASICS_HFILES) $(GNU_CALLBACKS_HFILES)

View file

@ -23,8 +23,12 @@
*/
#include <assert.h>
#ifndef WIN32
#include <unistd.h>
#include <sys/param.h> /* Needed by sys/stat */
#endif
#include <sys/stat.h>
#include <objc/objc-api.h>
#include <objects/stdobjects.h>

View file

@ -24,7 +24,6 @@
#include <objects/stdobjects.h>
#include <Foundation/NSCoder.h>
#include <Foundation/NSGCoder.h>
#include <objects/NSCoder.h>
@implementation NSCoder

View file

@ -29,7 +29,11 @@
#include <Foundation/NSDate.h>
#include <Foundation/NSString.h>
#ifndef WIN32
#include <sys/time.h>
#endif /* WIN32 */
#include <time.h>
#include <stdio.h>
#include <stdlib.h>

View file

@ -53,8 +53,10 @@
*************************************************************************/
/* One of these two should have MAXHOSTNAMELEN */
#ifndef WIN32
#include <sys/param.h>
#include <netdb.h>
#endif /* WIN32 */
#include <string.h>
#include <Foundation/NSString.h>

View file

@ -22,11 +22,15 @@
*/
#include <objects/SocketPort.h>
#ifndef WIN32
#include <netdb.h>
#include <sys/time.h>
#endif /* !WIN32 */
#include <objc/hash.h>
#include <objects/Lock.h>
#include <objc/List.h>
#include <sys/time.h>
#include <objects/Connection.h>
#include <objects/Coder.h>
#include <objects/ConnectedCoder.h>

View file

@ -31,11 +31,21 @@
#include <sys/types.h>
#include <sys/stat.h>
#ifdef WIN32
#include <limits.h>
#define S_IFLNK 0120000
int readlink(char *path, char *buf, int bufsiz) { return (-1); }
int lstat(char *path, struct stat *buf) { return (-1); }
#define MAXPATHLEN 255
#else
#include <sys/file.h>
#include <sys/param.h>
#include <unistd.h>
#endif /* WIN32 */
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#define DEFAULT_PATH ".:~/bin::/usr/local/bin:/usr/new:/usr/ucb:/usr/bin:/bin:/usr/hosts"

View file

@ -32,7 +32,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <objc/objc-api.h>
#include <objc/list.h>
#include <objc/objc-list.h>
#include <Foundation/objc-load.h>
/* include the interface to the dynamic linker */

View file

@ -29,7 +29,7 @@
#include <objects/stdobjects.h>
#include <objects/Coding.h>
#include <Foundation/NSGCoder.h>
#include <Foundation/NSCoder.h>
@interface NSCoder (GNU) <Encoding, Decoding>
@end

View file

@ -28,8 +28,11 @@
#include <objects/Port.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#ifndef WIN32
# include <sys/socket.h>
# include <netinet/in.h>
#endif /* !WIN32 */
typedef struct sockaddr_in sockport_t;

View file

@ -28,8 +28,11 @@
#include <objects/stdobjects.h>
#include <objects/Magnitude.h>
#ifndef WIN32
#include <sys/time.h>
#include <sys/resource.h>
#endif
#ifdef _SEQUENT_
/* Include needed for getclock() in our replacement for gettimeofday() */

View file

@ -54,7 +54,7 @@
#include <objc/objc-api.h>
#include <objc/encoding.h>
#include <objc/sarray.h>
#include <objc/list.h>
#include <objc/objc-list.h>
#endif
#include <Foundation/NSObject.h>

View file

@ -40,6 +40,10 @@ DYNAMIC_CFLAGS=@DYNAMIC_CFLAGS@
DEFS = @DEFS@
LIBS = -L../src -lobjects @LIBOBJC@ @LIBS@ -lm
EXEEXT =
OEXT = .o
LIBEXT = .a
#### End of system configuration section. ####
include $(srcdir)/../Makeconf
@ -56,10 +60,10 @@ ALL_OBJCFLAGS = $(CFLAGS) -Wno-protocol
ALL_LDFLAGS = $(LDFLAGS) $(LIBS)
.SUFFIXES: .m
.m.o:
$(CC) -c $(ALL_CPPFLAGS) $(DEFS) $(ALL_OBJCFLAGS) $< -o $*.o
.c.o:
$(CC) -c $(ALL_CPPFLAGS) $(DEFS) $(ALL_CFLAGS) $< -o $*.o
.m$(OEXT):
$(CC) -c $(ALL_CPPFLAGS) $(DEFS) $(ALL_OBJCFLAGS) $< -o $*$(OEXT)
.c$(OEXT):
$(CC) -c $(ALL_CPPFLAGS) $(DEFS) $(ALL_CFLAGS) $< -o $*$(OEXT)
SRCS = \
test01.m \
@ -84,7 +88,8 @@ nsdictionary.m \
nsset.m \
nsprocessinfo.m \
nsarchiver.m \
invocation.m
invocation.m \
diningPhilophers.m
# nsarchiving.m
@ -92,6 +97,7 @@ HDRS = \
server.h
EXCS = $(SRCS:.m=)
EXECS = $(SRCS:.m=$(EXEEXT))
BUNDLE_NAME=LoadMe
DYNAMIC_MFILES = \
@ -104,65 +110,67 @@ LoadMe.h \
MyCategory.h \
SecondClass.h
DYNAMIC_OFILES = $(DYNAMIC_MFILES:.m=.o)
DYNAMIC_OFILES = $(DYNAMIC_MFILES:.m=$(OEXT))
RCS_FILES = $(SRCS) $(HDRS) $(DYNAMIC_MFILES) $(DYNAMIC_HFILES) \
Makefile.in NXStringTable.example
Makefile.in NXStringTable.example Makefile.sed.nt
DIST_FILES = $(RCS_FILES)
# type 'make bundles' if you also want to check bundles.
all: $(EXCS)
# This works for GNU make, but not others.
# %: %.o $(srcdir)/../src/libobjects.a
# %: %$(OEXT) $(srcdir)/../src/libobjects$(LIBEXT)
# $(CC) $(ALL_CFLAGS) $< -o $@ $(ALL_LDFLAGS)
# How can I do this in a better way than the ugliness below?
# (but also have it work on old-style /bin/make)
LINK_CMD = $(CC) $(ALL_CFLAGS) $@.o -o $@ $(ALL_LDFLAGS)
test01: test01.o ../src/libobjects.a
LINK_CMD = $(CC) $(ALL_CFLAGS) $@$(OEXT) -o $@ $(ALL_LDFLAGS)
test01: test01$(OEXT) ../src/libobjects$(LIBEXT)
$(LINK_CMD)
test02: test02.o ../src/libobjects.a
test02: test02$(OEXT) ../src/libobjects$(LIBEXT)
$(LINK_CMD)
test03: test03.o ../src/libobjects.a
test03: test03$(OEXT) ../src/libobjects$(LIBEXT)
$(LINK_CMD)
test04: test04.o ../src/libobjects.a
test04: test04$(OEXT) ../src/libobjects$(LIBEXT)
$(LINK_CMD)
test05: test05.o ../src/libobjects.a
test05: test05$(OEXT) ../src/libobjects$(LIBEXT)
$(LINK_CMD)
test06: test06.o ../src/libobjects.a
test06: test06$(OEXT) ../src/libobjects$(LIBEXT)
$(LINK_CMD)
test07: test07.o ../src/libobjects.a
test07: test07$(OEXT) ../src/libobjects$(LIBEXT)
$(LINK_CMD)
test10: test10.o ../src/libobjects.a
test10: test10$(OEXT) ../src/libobjects$(LIBEXT)
$(LINK_CMD)
test11: test11.o ../src/libobjects.a
test11: test11$(OEXT) ../src/libobjects$(LIBEXT)
$(LINK_CMD)
test12: test12.o ../src/libobjects.a
test12: test12$(OEXT) ../src/libobjects$(LIBEXT)
$(LINK_CMD)
test13: test13.o ../src/libobjects.a
test13: test13$(OEXT) ../src/libobjects$(LIBEXT)
$(LINK_CMD)
pipes: pipes.o ../src/libobjects.a
pipes: pipes$(OEXT) ../src/libobjects$(LIBEXT)
$(LINK_CMD)
server: server.o ../src/libobjects.a
server: server$(OEXT) ../src/libobjects$(LIBEXT)
$(LINK_CMD)
client: client.o ../src/libobjects.a
client: client$(OEXT) ../src/libobjects$(LIBEXT)
$(LINK_CMD)
string: string.o ../src/libobjects.a
string: string$(OEXT) ../src/libobjects$(LIBEXT)
$(LINK_CMD)
values: values.o ../src/libobjects.a
values: values$(OEXT) ../src/libobjects$(LIBEXT)
$(LINK_CMD)
nsarray: nsarray.o ../src/libobjects.a
nsarray: nsarray$(OEXT) ../src/libobjects$(LIBEXT)
$(LINK_CMD)
nsbundle: nsbundle.o ../src/libobjects.a
$(CC) $(ALL_CFLAGS) $(DYNAMIC_LDFLAGS) $@.o -o $@ $(ALL_LDFLAGS)
nsdictionary: nsdictionary.o ../src/libobjects.a
nsbundle: nsbundle$(OEXT) ../src/libobjects$(LIBEXT)
$(CC) $(ALL_CFLAGS) $(DYNAMIC_LDFLAGS) $@$(OEXT) -o $@ $(ALL_LDFLAGS)
nsdictionary: nsdictionary$(OEXT) ../src/libobjects$(LIBEXT)
$(LINK_CMD)
nsset: nsset.o ../src/libobjects.a
nsset: nsset$(OEXT) ../src/libobjects$(LIBEXT)
$(LINK_CMD)
nsprocessinfo: nsprocessinfo.o ../src/libobjects.a
nsprocessinfo: nsprocessinfo$(OEXT) ../src/libobjects$(LIBEXT)
$(LINK_CMD)
nsarchiver: nsarchiver.o ../src/libobjects.a
nsarchiver: nsarchiver$(OEXT) ../src/libobjects$(LIBEXT)
$(LINK_CMD)
diningPhilosophers: diningPhilosophers$(OEXT) ../src/libobjects$(LIBEXT)
$(LINK_CMD)
invocation: invocation.o ../src/libobjects.a
$(LINK_CMD)
@ -181,7 +189,7 @@ bundles: $(BUNDLE_NAME).bundle/$(BUNDLE_NAME)
$(DYNAMIC_OFILES): $(DYNAMIC_MFILES) $(DYNAMIC_HFILES)
$(CC) -c $(ALL_CPPFLAGS) $(DEFS) $(DYNAMIC_CFLAGS) $(ALL_OBJCFLAGS) \
$(srcdir)/$*.m -o $*.o
$(srcdir)/$*.m -o $*$(OEXT)
$(BUNDLE_NAME).bundle/$(BUNDLE_NAME): $(DYNAMIC_OFILES)
-mkdir $(BUNDLE_NAME).bundle
@ -194,7 +202,7 @@ mostlyclean:
rm -f core *~ test08.data textcoder.txt
clean: mostlyclean
rm -f *.o $(EXCS)
rm -f *$(OEXT) $(EXECS)
rm -rf $(BUNDLE_NAME).bundle
distclean: clean

View file

@ -6,8 +6,12 @@
long lrand48();
#define random lrand48
#else
#if WIN32
#define random rand
#else
long random();
#endif
#endif
@interface Collection (TestingExtras)
- printCount;

View file

@ -2,13 +2,16 @@
#include <objects/objects.h>
#define N 20
#if (sun && __svr4__) || defined(__hpux) || defined(_SEQUENT_)
long lrand48();
#define random lrand48
#else
#if WIN32
#define random rand
#else
long random();
#endif
#endif
int main()
{