From 8587a2d6ee65135d4b243749dac39f059ac39a23 Mon Sep 17 00:00:00 2001 From: mccallum Date: Sat, 3 May 1997 18:13:17 +0000 Subject: [PATCH] Changes from Mark Kettenis. See ChangeLog Mar 23 git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@2304 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 16 ++++++++++++++++ Source/Makefile.in | 8 ++++---- Source/NSDate.m | 10 +++++++--- configure.in | 2 +- 4 files changed, 28 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4246c6818..49ffb78b4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ Sat May 3 12:28:48 1997 Andrew McCallum + * src/Makefile.in (UNICODE_HEADERS): New variable. + (DIST_FILES): Add UNICODE_HEADERS. + (copy-dist): Create directory for unicode. + * examples/Makefile.in (RCS_FILES): Added custom-zone.m. * examples/custom-zone.m: New file. @@ -18,6 +22,18 @@ Sat May 3 12:28:48 1997 Andrew McCallum Use NSBundle's pathForResource:ofType:inDirectory method properly. (Reported by Stevo Crvenkovski .) +Sun Mar 23 19:55:19 1997 Mark Kettenis + + * src/Makefile.in: Update config.h.in in $(srcdir)/src/include. + * configure.in: Look for config.guess in $(srcdir). + +Sat Mar 22 18:25:43 1997 Mark Kettenis + + * src/NSDate.m ([NSDate +timeIntervalSinceReferenceDate]): Don't + use struct timezone. + ([NSDate -timeIntervalSince1970]): New method. + ([NSDate -isEqual:]): Correct bug if other specifies a later date. + Sun Mar 23 22:14:21 1997 Stevo Crvenkovski * src/NSGString.m: New file Initial implementation of Unicode diff --git a/Source/Makefile.in b/Source/Makefile.in index fc2d4984a..d283f0726 100644 --- a/Source/Makefile.in +++ b/Source/Makefile.in @@ -676,10 +676,10 @@ include/o_map.h: include/o_map_bas.h include/o_map_cbs.h include/o_hash.h Makefile: $(srcdir)/Makefile.in ../config.status cd ..; $(SHELL) config.status ../config.status: - cd ..; $(SHELL) configure --no-create -include/config.h.in: $(srcdir)/../configure.in $(srcdir)/../acconfig.h - cd ..; $(SHELL) autoheader -include/config.h: include/config.h.in + cd ..; $(SHELL) $(srcdir)/configure --no-create +$(srcdir)/include/config.h.in: $(srcdir)/../configure.in $(srcdir)/../acconfig.h + cd $(srcdir)/..; $(SHELL) autoheader +include/config.h: $(srcdir)/include/config.h.in TAGS: $(DIST_FILES) etags $(DIST_FILES) diff --git a/Source/NSDate.m b/Source/NSDate.m index 249c515a3..09798c831 100644 --- a/Source/NSDate.m +++ b/Source/NSDate.m @@ -65,10 +65,9 @@ #ifndef __WIN32__ volatile NSTimeInterval interval; struct timeval tp; - struct timezone tzp; interval = UNIX_REFERENCE_INTERVAL; - gettimeofday (&tp, &tzp); + gettimeofday (&tp, NULL); interval += tp.tv_sec; interval += (double)tp.tv_usec / 1000000.0; @@ -262,6 +261,11 @@ return seconds_since_ref - UNIX_REFERENCE_INTERVAL; } +- (NSTimeInterval) timeIntervalSince1970 +{ + return seconds_since_ref - UNIX_REFERENCE_INTERVAL; +} + - (NSTimeInterval) timeIntervalSinceDate: (NSDate*)otherDate { return seconds_since_ref - [otherDate timeIntervalSinceReferenceDate]; @@ -301,7 +305,7 @@ - (BOOL) isEqual: (id)other { if ([other isKindOf: [NSDate class]] - && 1.0 > (seconds_since_ref - [other timeIntervalSinceReferenceDate])) + && 1.0 > ABS(seconds_since_ref - [other timeIntervalSinceReferenceDate])) return YES; return NO; } diff --git a/configure.in b/configure.in index eee6795ac..67864752a 100644 --- a/configure.in +++ b/configure.in @@ -183,7 +183,7 @@ OBJC_SYS_DYNAMIC_FLAGS() # Determine the target platform #-------------------------------------------------------------------- if test "x$target" = "xNONE"; then - PLATFORM_OS=`config.guess` + PLATFORM_OS=`$srcdir/config.guess` else PLATFORM_OS="$target" fi