From 3c19c663deb225966569f29ef191106948fd2775 Mon Sep 17 00:00:00 2001 From: Adam Fedor Date: Fri, 25 May 2001 15:59:06 +0000 Subject: [PATCH] Use NSCParameterAssert, -lobjc with NeXT_RUNTIME git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@10023 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 7 +++++++ Headers/gnustep/base/behavior.h | 4 ++++ Source/GSFormat.m | 6 +++--- configure | 2 +- configure.in | 2 +- 5 files changed, 16 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 29b597558..18031a898 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2001-05-25 Adam Fedor + + * configure.in: Use -lobjc with NeXT_RUNTIME. + * Headers/gnustep/base/behavior.h: Include objc.h on NeXT_RUNTIME. + + * Source/GSFormat.m: Replace assert with NSCParameterAssert + 2001-05-23 Adam Fedor * configure.in: Check for libgiconv diff --git a/Headers/gnustep/base/behavior.h b/Headers/gnustep/base/behavior.h index adaaec2d0..bb450b5c6 100644 --- a/Headers/gnustep/base/behavior.h +++ b/Headers/gnustep/base/behavior.h @@ -24,7 +24,11 @@ #ifndef __behavior_h_GNUSTEP_BASE_INCLUDE #define __behavior_h_GNUSTEP_BASE_INCLUDE +#if NeXT_RUNTIME +#include +#else #include +#endif /* Call this method from CLASS's +initialize method to add a behavior to CLASS. A "behavior" is like a protocol with an implementation. diff --git a/Source/GSFormat.m b/Source/GSFormat.m index 15e219458..3467c5235 100644 --- a/Source/GSFormat.m +++ b/Source/GSFormat.m @@ -611,7 +611,7 @@ parse_one_spec (const unichar *format, size_t posn, struct printf_spec *spec, case 'z': case 'Z': /* ints are size_ts. */ - assert (sizeof (size_t) <= sizeof (unsigned long long int)); + NSCParameterAssert (sizeof (size_t) <= sizeof (unsigned long long int)); #if defined(LONG_LONG_MAX) #if LONG_MAX != LONG_LONG_MAX spec->info.is_long_double = sizeof (size_t) > sizeof (unsigned long int); @@ -620,7 +620,7 @@ parse_one_spec (const unichar *format, size_t posn, struct printf_spec *spec, spec->info.is_long = sizeof (size_t) > sizeof (unsigned int); break; case 't': - assert (sizeof (ptrdiff_t) <= sizeof (long long int)); + NSCParameterAssert (sizeof (ptrdiff_t) <= sizeof (long long int)); #if defined(LONG_LONG_MAX) #if LONG_MAX != LONG_LONG_MAX spec->info.is_long_double = (sizeof (ptrdiff_t) > sizeof (long int)); @@ -629,7 +629,7 @@ parse_one_spec (const unichar *format, size_t posn, struct printf_spec *spec, spec->info.is_long = sizeof (ptrdiff_t) > sizeof (int); break; case 'j': - assert (sizeof (uintmax_t) <= sizeof (unsigned long long int)); + NSCParameterAssert (sizeof (uintmax_t) <= sizeof (unsigned long long int)); #if defined(LONG_LONG_MAX) #if LONG_MAX != LONG_LONG_MAX spec->info.is_long_double = (sizeof (uintmax_t) diff --git a/configure b/configure index 184e1448d..1db0d0f1e 100755 --- a/configure +++ b/configure @@ -1187,7 +1187,7 @@ echo $ac_n "checking the Objective-C runtime""... $ac_c" 1>&6 echo "configure:1188: checking the Objective-C runtime" >&5 if test "$OBJC_RUNTIME_LIB" = "nx"; then echo "$ac_t""NeXT" 1>&6 - LIBOBJC='' + LIBOBJC='-lobjc' CPPFLAGS="$CPPFLAGS -fnext-runtime -DNeXT_RUNTIME" else echo "$ac_t""GNU" 1>&6 diff --git a/configure.in b/configure.in index 3aa0d70ff..ea203f451 100644 --- a/configure.in +++ b/configure.in @@ -85,7 +85,7 @@ OBJC_RUNTIME_LIB=`echo $LIBRARY_COMBO | tr '-' ' ' | awk '{print $1}'` AC_MSG_CHECKING(the Objective-C runtime) if test "$OBJC_RUNTIME_LIB" = "nx"; then AC_MSG_RESULT(NeXT) - LIBOBJC='' + LIBOBJC='-lobjc' CPPFLAGS="$CPPFLAGS -fnext-runtime -DNeXT_RUNTIME" else AC_MSG_RESULT(GNU)