Remove some static initialization.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@10018 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Adam Fedor 2001-05-23 14:32:56 +00:00
parent 601ca7eb92
commit 10061bbcde
9 changed files with 307 additions and 233 deletions

View file

@ -1,3 +1,12 @@
2001-05-22 Adam Fedor <fedor@gnu.org>
* configure.in: Check CPP handling of LONG_LONG_MAX
* Source/GSFormat.m: Undef LONG_LONG_MAX if not handled
* Source/GSeq.h: Set static selectors to NULL.
* Source/NSString.m (+initialize): Set selectors here instead.
* Source/GSString.m (setup): ...And here.
2001-05-22 Richard Frith-Macdonald <rfm@gnu.org>
* Headers/Foundation/NSSet.h: Added ([-setSet:])
* Source/GSSet.m: Optimise ([-unionSet:])

View file

@ -56,6 +56,7 @@
#undef HAVE_PTS_STREAM_MODULES
#undef HAVE_UINTMAX_T
#undef HANDLE_LONG_LONG_MAX
/* The number of bytes in a double. */
#undef SIZEOF_DOUBLE
@ -285,6 +286,9 @@
/* Define if you have the iconv library (-liconv). */
#undef HAVE_LIBICONV
/* Define if you have the m library (-lm). */
#undef HAVE_LIBM
/* Define if system supports the /proc filesystem */
#undef HAVE_PROCFS

View file

@ -80,6 +80,11 @@ typedef gsu32 wint_t;
typedef unsigned long long uintmax_t;
#endif
/* Darwin 1.0 CPP can't handle this */
#ifndef HANDLE_LONG_LONG_MAX
#undef LONG_LONG_MAX
#endif
#include <base/behavior.h>
#include <base/Unicode.h>

View file

@ -261,6 +261,10 @@ setup()
hashImp = (unsigned (*)(id, SEL))
[NSStringClass instanceMethodForSelector: hashSel];
caiSel = @selector(characterAtIndex:);
gcrSel = @selector(getCharacters:range:);
ranSel = @selector(rangeOfComposedCharacterSequenceAtIndex:);
/*
* Cache the default string encoding.
*/

View file

@ -40,11 +40,12 @@
#define __GSeq_h_GNUSTEP_BASE_INCLUDE
/*
* Some standard selectors for frequently used methods.
* Some standard selectors for frequently used methods. Set in NSString
* +initialize.
*/
static SEL caiSel = @selector(characterAtIndex:);
static SEL gcrSel = @selector(getCharacters:range:);
static SEL ranSel = @selector(rangeOfComposedCharacterSequenceAtIndex:);
static SEL caiSel = NULL;
static SEL gcrSel = NULL;
static SEL ranSel = NULL;
/*
* The maximum decompostion level for composite unicode characters.

View file

@ -330,6 +330,10 @@ handle_printf_atsign (FILE *stream,
beenHere = YES;
plSel = @selector(initWithCharacters:length:);
cMemberSel = @selector(characterIsMember:);
caiSel = @selector(characterAtIndex:);
gcrSel = @selector(getCharacters:range:);
ranSel = @selector(rangeOfComposedCharacterSequenceAtIndex:);
_DefaultStringEncoding = GetDefEncoding();
NSStringClass = self;
[self setVersion: 1];

View file

@ -147,6 +147,7 @@
#undef HAVE_PTS_STREAM_MODULES
#undef HAVE_UINTMAX_T
#undef HANDLE_LONG_LONG_MAX
/* Define if wchar.h header available */
#undef HAVE_WCHAR_H

488
configure vendored

File diff suppressed because it is too large Load diff

View file

@ -72,8 +72,6 @@ if test $gcc_nested = 0; then
echo "this machine. "
echo "Read the bug-report instructions in the GCC texinfo manual"
echo "and submit a bug report."
echo "I'm not even sure gstep-base uses nested functions anymore"
echo "but if it does, gstep-base will not compile. Try it"
echo "The program this configure script used to test nested functions"
echo "can be found in the file 'config/config.nested.c'"
else
@ -531,6 +529,20 @@ else
AC_MSG_RESULT([not found])
fi
AC_MSG_CHECKING([whether precompiler handles LONG_LONG_MAX])
AC_TRY_CPP([#include <stdint.h>
#include <limits.h>
#if defined(LONG_LONG_MAX)
#if LONG_MAX != LONG_LONG_MAX
#endif
#endif
], llmax=yes, llmax=no)
if test $llmax = yes; then
AC_MSG_RESULT(yes)
AC_DEFINE(HANDLE_LONG_LONG_MAX)
else
AC_MSG_RESULT(no)
fi
AC_CHECK_HEADERS(wchar.h)
#--------------------------------------------------------------------