mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 00:30:53 +00:00
Improve native locale integration and mswindows usability.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@24871 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
e8ee87fd0d
commit
2aa7b2026c
6 changed files with 7112 additions and 6821 deletions
13
ChangeLog
13
ChangeLog
|
@ -1,3 +1,16 @@
|
||||||
|
2007-03-14 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
|
* configure.ac: By default disable the GNUSTEP_CONFIOG_FILE
|
||||||
|
environment variable on windows so that we don't accidentally
|
||||||
|
use the development config file (with unix style paths) when
|
||||||
|
we want to be using runtime config (with windows paths).
|
||||||
|
* configure: Regenerate
|
||||||
|
* Source/GSPrivate.h: New private function to determine native
|
||||||
|
C-string encoding.
|
||||||
|
* Source/Additions/Unicode.m: ditto
|
||||||
|
* Source/GSLocale.m: Use native C-String encoding to handle locale
|
||||||
|
information strings.
|
||||||
|
|
||||||
2007-03-14 Nicola Pero <nicola.pero@meta-innovation.com>
|
2007-03-14 Nicola Pero <nicola.pero@meta-innovation.com>
|
||||||
|
|
||||||
* Source/NSUserDefaults.m ([+standardUserDefaults]): Manually
|
* Source/NSUserDefaults.m ([+standardUserDefaults]): Manually
|
||||||
|
|
|
@ -134,6 +134,11 @@ static GSLazyLock *local_lock = nil;
|
||||||
|
|
||||||
typedef unsigned char unc;
|
typedef unsigned char unc;
|
||||||
static NSStringEncoding defEnc = GSUndefinedEncoding;
|
static NSStringEncoding defEnc = GSUndefinedEncoding;
|
||||||
|
#if defined(__MINGW32__)
|
||||||
|
static NSStringEncoding natEnc = GSUnicodeStringEncoding
|
||||||
|
#else
|
||||||
|
static NSStringEncoding natEnc = GSUndefinedEncoding;
|
||||||
|
#endif
|
||||||
static NSStringEncoding *_availableEncodings = 0;
|
static NSStringEncoding *_availableEncodings = 0;
|
||||||
|
|
||||||
struct _strenc_ {
|
struct _strenc_ {
|
||||||
|
@ -2028,6 +2033,118 @@ GSPrivateDefaultCStringEncoding()
|
||||||
return defEnc;
|
return defEnc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (natEnc == GSUndefinedEncoding)
|
||||||
|
{
|
||||||
|
/* Encoding not set */
|
||||||
|
#if HAVE_LANGINFO_CODESET
|
||||||
|
/* Take it from the system locale information. */
|
||||||
|
encoding = nl_langinfo(CODESET);
|
||||||
|
/*
|
||||||
|
* First handle the fallback response from nl_langinfo() ...
|
||||||
|
* if we are getting the default value we can't assume that
|
||||||
|
* the user has set anything up at all, so we must use the
|
||||||
|
* OpenStep/GNUstep default encopding ... latin1, even though
|
||||||
|
* the nl_langinfo() stuff would say default is ascii.
|
||||||
|
*/
|
||||||
|
if (strcmp(encoding, "ANSI_X3.4-1968") == 0 /* glibc */
|
||||||
|
|| strcmp(encoding, "ISO_646.IRV:1983") == 0 /* glibc */
|
||||||
|
|| strcmp(encoding, "646") == 0 /* Solaris NetBSD */)
|
||||||
|
natEnc = NSISOLatin1StringEncoding;
|
||||||
|
else if (strcmp(encoding, "EUC-JP") == 0 /* glibc */
|
||||||
|
/* HP-UX IRIX OSF/1 Solaris NetBSD */
|
||||||
|
|| strcmp(encoding, "eucJP") == 0
|
||||||
|
|| strcmp(encoding, "IBM-eucJP") == 0 /* AIX */)
|
||||||
|
natEnc = NSJapaneseEUCStringEncoding;
|
||||||
|
else if (strcmp(encoding, "UTF-8") == 0 /* glibc AIX OSF/1 Solaris */
|
||||||
|
|| strcmp(encoding, "utf8") == 0 /* HP-UX */)
|
||||||
|
natEnc = NSUTF8StringEncoding;
|
||||||
|
else if (strcmp(encoding, "ISO-8859-1") == 0 /* glibc */
|
||||||
|
/* AIX IRIX OSF/1 Solaris NetBSD */
|
||||||
|
|| strcmp(encoding, "ISO8859-1") == 0
|
||||||
|
|| strcmp(encoding, "iso88591") == 0 /* HP-UX */)
|
||||||
|
natEnc = NSISOLatin1StringEncoding;
|
||||||
|
else if (strcmp(encoding, "IBM-932") == 0 /* AIX */
|
||||||
|
|| strcmp(encoding, "SJIS") == 0 /* HP-UX OSF/1 NetBSD */
|
||||||
|
|| strcmp(encoding, "PCK") == 0 /* Solaris */)
|
||||||
|
natEnc = NSShiftJISStringEncoding;
|
||||||
|
else if (strcmp(encoding, "ISO-8859-2") == 0 /* glibc */
|
||||||
|
/* AIX IRIX OSF/1 Solaris NetBSD */
|
||||||
|
|| strcmp(encoding, "ISO8859-2") == 0
|
||||||
|
|| strcmp(encoding, "iso88592") == 0 /* HP-UX */)
|
||||||
|
natEnc = NSISOLatin2StringEncoding;
|
||||||
|
else if (strcmp(encoding, "CP1251") == 0 /* glibc */
|
||||||
|
|| strcmp(encoding, "ansi-1251") == 0 /* Solaris */)
|
||||||
|
natEnc = NSWindowsCP1251StringEncoding;
|
||||||
|
else if (strcmp(encoding, "CP1252") == 0 /* */
|
||||||
|
|| strcmp(encoding, "IBM-1252") == 0 /* AIX */)
|
||||||
|
natEnc = NSWindowsCP1252StringEncoding;
|
||||||
|
else if (strcmp(encoding, "ISO-8859-5") == 0 /* glibc */
|
||||||
|
/* AIX IRIX OSF/1 Solaris NetBSD */
|
||||||
|
|| strcmp(encoding, "ISO8859-5") == 0
|
||||||
|
|| strcmp(encoding, "iso88595") == 0 /* HP-UX */)
|
||||||
|
natEnc = NSISOCyrillicStringEncoding;
|
||||||
|
else if (strcmp(encoding, "KOI8-R") == 0 /* glibc */
|
||||||
|
|| strcmp(encoding, "koi8-r") == 0 /* Solaris */)
|
||||||
|
natEnc = NSKOI8RStringEncoding;
|
||||||
|
else if (strcmp(encoding, "ISO-8859-3") == 0 /* glibc */
|
||||||
|
|| strcmp(encoding, "ISO8859-3") == 0 /* Solaris */)
|
||||||
|
natEnc = NSISOLatin3StringEncoding;
|
||||||
|
else if (strcmp(encoding, "ISO-8859-4") == 0 /* */
|
||||||
|
|| strcmp(encoding, "ISO8859-4") == 0 /* OSF/1 Solaris NetBSD */)
|
||||||
|
natEnc = NSISOLatin4StringEncoding;
|
||||||
|
else if (strcmp(encoding, "ISO-8859-6") == 0 /* glibc */
|
||||||
|
|| strcmp(encoding, "ISO8859-6") == 0 /* AIX Solaris */
|
||||||
|
|| strcmp(encoding, "iso88596") == 0 /* HP-UX */)
|
||||||
|
natEnc = NSISOArabicStringEncoding;
|
||||||
|
else if (strcmp(encoding, "ISO-8859-7") == 0 /* glibc */
|
||||||
|
|| strcmp(encoding, "ISO8859-7") == 0 /* AIX IRIX OSF/1 Solaris */
|
||||||
|
|| strcmp(encoding, "iso88597") == 0 /* HP-UX */)
|
||||||
|
natEnc = NSISOGreekStringEncoding;
|
||||||
|
else if (strcmp(encoding, "ISO-8859-8") == 0 /* glibc */
|
||||||
|
|| strcmp(encoding, "ISO8859-8") == 0 /* AIX OSF/1 Solaris */
|
||||||
|
|| strcmp(encoding, "iso88598") == 0 /* HP-UX */)
|
||||||
|
natEnc = NSISOHebrewStringEncoding;
|
||||||
|
else if (strcmp(encoding, "ISO-8859-9") == 0 /* glibc */
|
||||||
|
|| strcmp(encoding, "ISO8859-9") == 0 /* AIX IRIX OSF/1 Solaris */
|
||||||
|
|| strcmp(encoding, "iso88599") == 0 /* HP-UX */)
|
||||||
|
natEnc = NSISOLatin5StringEncoding;
|
||||||
|
else if (strcmp(encoding, "ISO-8859-10") == 0 /* */
|
||||||
|
|| strcmp(encoding, "ISO8859-10") == 0 /* */)
|
||||||
|
natEnc = NSISOLatin6StringEncoding;
|
||||||
|
else if (strcmp(encoding, "TIS-620") == 0 /* glibc AIX */
|
||||||
|
|| strcmp(encoding, "tis620") == 0 /* HP-UX */
|
||||||
|
|| strcmp(encoding, "TIS620.2533") == 0 /* Solaris */
|
||||||
|
|| strcmp(encoding, "TACTIS") == 0 /* OSF/1 */)
|
||||||
|
natEnc = NSISOThaiStringEncoding;
|
||||||
|
else if (strcmp(encoding, "ISO-8859-13") == 0 /* glibc */
|
||||||
|
|| strcmp(encoding, "ISO8859-13") == 0 /* */
|
||||||
|
|| strcmp(encoding, "IBM-921") == 0 /* AIX */)
|
||||||
|
natEnc = NSISOLatin7StringEncoding;
|
||||||
|
else if (strcmp(encoding, "ISO-8859-14") == 0 /* glibc */
|
||||||
|
|| strcmp(encoding, "ISO8859-14") == 0 /* */)
|
||||||
|
natEnc = NSISOLatin8StringEncoding;
|
||||||
|
else if (strcmp(encoding, "ISO-8859-15") == 0 /* glibc */
|
||||||
|
/* AIX OSF/1 Solaris NetBSD */
|
||||||
|
|| strcmp(encoding, "ISO8859-15") == 0
|
||||||
|
|| strcmp(encoding, "iso885915") == 0 /* HP-UX */)
|
||||||
|
natEnc = NSISOLatin9StringEncoding;
|
||||||
|
else if (strcmp(encoding, "GB2312") == 0 /* glibc */
|
||||||
|
|| strcmp(encoding, "gb2312") == 0 /* Solaris */
|
||||||
|
|| strcmp(encoding, "eucCN") == 0 /* IRIX NetBSD */
|
||||||
|
|| strcmp(encoding, "IBM-eucCN") == 0 /* AIX */
|
||||||
|
|| strcmp(encoding, "hp15CN") == 0 /* HP-UX */)
|
||||||
|
natEnc = NSGB2312StringEncoding;
|
||||||
|
else if (strcmp(encoding, "BIG5") == 0 /* glibc Solaris NetBSD */
|
||||||
|
|| strcmp(encoding, "big5") == 0 /* AIX HP-UX OSF/1 */)
|
||||||
|
natEnc = NSBIG5StringEncoding;
|
||||||
|
else if (strcmp(encoding, "EUC-KR") == 0 /* glibc */
|
||||||
|
|| strcmp(encoding, "eucKR") == 0 /* HP-UX IRIX OSF/1 NetBSD */
|
||||||
|
|| strcmp(encoding, "IBM-eucKR") == 0 /* AIX */
|
||||||
|
|| strcmp(encoding, "5601") == 0 /* Solaris */)
|
||||||
|
natEnc = NSKoreanEUCStringEncoding;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
encoding = getenv("GNUSTEP_STRING_ENCODING");
|
encoding = getenv("GNUSTEP_STRING_ENCODING");
|
||||||
if (encoding != 0)
|
if (encoding != 0)
|
||||||
{
|
{
|
||||||
|
@ -2053,116 +2170,11 @@ GSPrivateDefaultCStringEncoding()
|
||||||
}
|
}
|
||||||
if (defEnc == GSUndefinedEncoding)
|
if (defEnc == GSUndefinedEncoding)
|
||||||
{
|
{
|
||||||
/* Encoding not set */
|
defEnc = natEnc;
|
||||||
#if HAVE_LANGINFO_CODESET
|
}
|
||||||
/* Take it from the system locale information. */
|
if (defEnc == GSUndefinedEncoding)
|
||||||
encoding = nl_langinfo(CODESET);
|
{
|
||||||
/*
|
defEnc = NSISOLatin1StringEncoding;
|
||||||
* First handle the fallback response from nl_langinfo() ...
|
|
||||||
* if we are getting the default value we can't assume that
|
|
||||||
* the user has set anything up at all, so we must use the
|
|
||||||
* OpenStep/GNUstep default encopding ... latin1, even though
|
|
||||||
* the nl_langinfo() stuff would say default is ascii.
|
|
||||||
*/
|
|
||||||
if (strcmp(encoding, "ANSI_X3.4-1968") == 0 /* glibc */
|
|
||||||
|| strcmp(encoding, "ISO_646.IRV:1983") == 0 /* glibc */
|
|
||||||
|| strcmp(encoding, "646") == 0 /* Solaris NetBSD */)
|
|
||||||
defEnc = NSISOLatin1StringEncoding;
|
|
||||||
else if (strcmp(encoding, "EUC-JP") == 0 /* glibc */
|
|
||||||
/* HP-UX IRIX OSF/1 Solaris NetBSD */
|
|
||||||
|| strcmp(encoding, "eucJP") == 0
|
|
||||||
|| strcmp(encoding, "IBM-eucJP") == 0 /* AIX */)
|
|
||||||
defEnc = NSJapaneseEUCStringEncoding;
|
|
||||||
else if (strcmp(encoding, "UTF-8") == 0 /* glibc AIX OSF/1 Solaris */
|
|
||||||
|| strcmp(encoding, "utf8") == 0 /* HP-UX */)
|
|
||||||
defEnc = NSUTF8StringEncoding;
|
|
||||||
else if (strcmp(encoding, "ISO-8859-1") == 0 /* glibc */
|
|
||||||
/* AIX IRIX OSF/1 Solaris NetBSD */
|
|
||||||
|| strcmp(encoding, "ISO8859-1") == 0
|
|
||||||
|| strcmp(encoding, "iso88591") == 0 /* HP-UX */)
|
|
||||||
defEnc = NSISOLatin1StringEncoding;
|
|
||||||
else if (strcmp(encoding, "IBM-932") == 0 /* AIX */
|
|
||||||
|| strcmp(encoding, "SJIS") == 0 /* HP-UX OSF/1 NetBSD */
|
|
||||||
|| strcmp(encoding, "PCK") == 0 /* Solaris */)
|
|
||||||
defEnc = NSShiftJISStringEncoding;
|
|
||||||
else if (strcmp(encoding, "ISO-8859-2") == 0 /* glibc */
|
|
||||||
/* AIX IRIX OSF/1 Solaris NetBSD */
|
|
||||||
|| strcmp(encoding, "ISO8859-2") == 0
|
|
||||||
|| strcmp(encoding, "iso88592") == 0 /* HP-UX */)
|
|
||||||
defEnc = NSISOLatin2StringEncoding;
|
|
||||||
else if (strcmp(encoding, "CP1251") == 0 /* glibc */
|
|
||||||
|| strcmp(encoding, "ansi-1251") == 0 /* Solaris */)
|
|
||||||
defEnc = NSWindowsCP1251StringEncoding;
|
|
||||||
else if (strcmp(encoding, "CP1252") == 0 /* */
|
|
||||||
|| strcmp(encoding, "IBM-1252") == 0 /* AIX */)
|
|
||||||
defEnc = NSWindowsCP1252StringEncoding;
|
|
||||||
else if (strcmp(encoding, "ISO-8859-5") == 0 /* glibc */
|
|
||||||
/* AIX IRIX OSF/1 Solaris NetBSD */
|
|
||||||
|| strcmp(encoding, "ISO8859-5") == 0
|
|
||||||
|| strcmp(encoding, "iso88595") == 0 /* HP-UX */)
|
|
||||||
defEnc = NSISOCyrillicStringEncoding;
|
|
||||||
else if (strcmp(encoding, "KOI8-R") == 0 /* glibc */
|
|
||||||
|| strcmp(encoding, "koi8-r") == 0 /* Solaris */)
|
|
||||||
defEnc = NSKOI8RStringEncoding;
|
|
||||||
else if (strcmp(encoding, "ISO-8859-3") == 0 /* glibc */
|
|
||||||
|| strcmp(encoding, "ISO8859-3") == 0 /* Solaris */)
|
|
||||||
defEnc = NSISOLatin3StringEncoding;
|
|
||||||
else if (strcmp(encoding, "ISO-8859-4") == 0 /* */
|
|
||||||
|| strcmp(encoding, "ISO8859-4") == 0 /* OSF/1 Solaris NetBSD */)
|
|
||||||
defEnc = NSISOLatin4StringEncoding;
|
|
||||||
else if (strcmp(encoding, "ISO-8859-6") == 0 /* glibc */
|
|
||||||
|| strcmp(encoding, "ISO8859-6") == 0 /* AIX Solaris */
|
|
||||||
|| strcmp(encoding, "iso88596") == 0 /* HP-UX */)
|
|
||||||
defEnc = NSISOArabicStringEncoding;
|
|
||||||
else if (strcmp(encoding, "ISO-8859-7") == 0 /* glibc */
|
|
||||||
|| strcmp(encoding, "ISO8859-7") == 0 /* AIX IRIX OSF/1 Solaris */
|
|
||||||
|| strcmp(encoding, "iso88597") == 0 /* HP-UX */)
|
|
||||||
defEnc = NSISOGreekStringEncoding;
|
|
||||||
else if (strcmp(encoding, "ISO-8859-8") == 0 /* glibc */
|
|
||||||
|| strcmp(encoding, "ISO8859-8") == 0 /* AIX OSF/1 Solaris */
|
|
||||||
|| strcmp(encoding, "iso88598") == 0 /* HP-UX */)
|
|
||||||
defEnc = NSISOHebrewStringEncoding;
|
|
||||||
else if (strcmp(encoding, "ISO-8859-9") == 0 /* glibc */
|
|
||||||
|| strcmp(encoding, "ISO8859-9") == 0 /* AIX IRIX OSF/1 Solaris */
|
|
||||||
|| strcmp(encoding, "iso88599") == 0 /* HP-UX */)
|
|
||||||
defEnc = NSISOLatin5StringEncoding;
|
|
||||||
else if (strcmp(encoding, "ISO-8859-10") == 0 /* */
|
|
||||||
|| strcmp(encoding, "ISO8859-10") == 0 /* */)
|
|
||||||
defEnc = NSISOLatin6StringEncoding;
|
|
||||||
else if (strcmp(encoding, "TIS-620") == 0 /* glibc AIX */
|
|
||||||
|| strcmp(encoding, "tis620") == 0 /* HP-UX */
|
|
||||||
|| strcmp(encoding, "TIS620.2533") == 0 /* Solaris */
|
|
||||||
|| strcmp(encoding, "TACTIS") == 0 /* OSF/1 */)
|
|
||||||
defEnc = NSISOThaiStringEncoding;
|
|
||||||
else if (strcmp(encoding, "ISO-8859-13") == 0 /* glibc */
|
|
||||||
|| strcmp(encoding, "ISO8859-13") == 0 /* */
|
|
||||||
|| strcmp(encoding, "IBM-921") == 0 /* AIX */)
|
|
||||||
defEnc = NSISOLatin7StringEncoding;
|
|
||||||
else if (strcmp(encoding, "ISO-8859-14") == 0 /* glibc */
|
|
||||||
|| strcmp(encoding, "ISO8859-14") == 0 /* */)
|
|
||||||
defEnc = NSISOLatin8StringEncoding;
|
|
||||||
else if (strcmp(encoding, "ISO-8859-15") == 0 /* glibc */
|
|
||||||
/* AIX OSF/1 Solaris NetBSD */
|
|
||||||
|| strcmp(encoding, "ISO8859-15") == 0
|
|
||||||
|| strcmp(encoding, "iso885915") == 0 /* HP-UX */)
|
|
||||||
defEnc = NSISOLatin9StringEncoding;
|
|
||||||
else if (strcmp(encoding, "GB2312") == 0 /* glibc */
|
|
||||||
|| strcmp(encoding, "gb2312") == 0 /* Solaris */
|
|
||||||
|| strcmp(encoding, "eucCN") == 0 /* IRIX NetBSD */
|
|
||||||
|| strcmp(encoding, "IBM-eucCN") == 0 /* AIX */
|
|
||||||
|| strcmp(encoding, "hp15CN") == 0 /* HP-UX */)
|
|
||||||
defEnc = NSGB2312StringEncoding;
|
|
||||||
else if (strcmp(encoding, "BIG5") == 0 /* glibc Solaris NetBSD */
|
|
||||||
|| strcmp(encoding, "big5") == 0 /* AIX HP-UX OSF/1 */)
|
|
||||||
defEnc = NSBIG5StringEncoding;
|
|
||||||
else if (strcmp(encoding, "EUC-KR") == 0 /* glibc */
|
|
||||||
|| strcmp(encoding, "eucKR") == 0 /* HP-UX IRIX OSF/1 NetBSD */
|
|
||||||
|| strcmp(encoding, "IBM-eucKR") == 0 /* AIX */
|
|
||||||
|| strcmp(encoding, "5601") == 0 /* Solaris */)
|
|
||||||
defEnc = NSKoreanEUCStringEncoding;
|
|
||||||
else
|
|
||||||
#endif
|
|
||||||
defEnc = NSISOLatin1StringEncoding;
|
|
||||||
}
|
}
|
||||||
else if (GSPrivateIsEncodingSupported(defEnc) == NO)
|
else if (GSPrivateIsEncodingSupported(defEnc) == NO)
|
||||||
{
|
{
|
||||||
|
@ -2172,6 +2184,12 @@ GSPrivateDefaultCStringEncoding()
|
||||||
" NSISOLatin1StringEncoding set as default.\n");
|
" NSISOLatin1StringEncoding set as default.\n");
|
||||||
defEnc = NSISOLatin1StringEncoding;
|
defEnc = NSISOLatin1StringEncoding;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (natEnc == GSUndefinedEncoding)
|
||||||
|
{
|
||||||
|
natEnc = defEnc;
|
||||||
|
}
|
||||||
|
|
||||||
[local_lock unlock];
|
[local_lock unlock];
|
||||||
}
|
}
|
||||||
return defEnc;
|
return defEnc;
|
||||||
|
@ -2197,4 +2215,15 @@ GSPrivateIsByteEncoding(NSStringEncoding encoding)
|
||||||
return encodingTable[encoding]->eightBit;
|
return encodingTable[encoding]->eightBit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NSStringEncoding
|
||||||
|
GSPrivateNativeCStringEncoding()
|
||||||
|
{
|
||||||
|
if (natEnc == GSUndefinedEncoding)
|
||||||
|
{
|
||||||
|
/* GSPrivateDefaultCStringEncoding() will actually set the encoding.
|
||||||
|
*/
|
||||||
|
GSPrivateDefaultCStringEncoding();
|
||||||
|
}
|
||||||
|
return natEnc;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -82,7 +82,7 @@ GSSetLocale(int category, NSString *locale)
|
||||||
}
|
}
|
||||||
|
|
||||||
#define GSLanginfo(value) [NSString stringWithCString: nl_langinfo (value) \
|
#define GSLanginfo(value) [NSString stringWithCString: nl_langinfo (value) \
|
||||||
encoding: [NSString defaultCStringEncoding]]
|
encoding: GSPrivateNativeCStringEncoding()]
|
||||||
|
|
||||||
|
|
||||||
/* Creates a locale dictionary from information provided by i18n functions.
|
/* Creates a locale dictionary from information provided by i18n functions.
|
||||||
|
|
|
@ -353,6 +353,13 @@ GSPrivateLoadModule(NSString *filename, FILE *errorStream,
|
||||||
void (*loadCallback)(Class, struct objc_category *),
|
void (*loadCallback)(Class, struct objc_category *),
|
||||||
void **header, NSString *debugFilename) GS_ATTRIB_PRIVATE;
|
void **header, NSString *debugFilename) GS_ATTRIB_PRIVATE;
|
||||||
|
|
||||||
|
/* Get the native C-string encoding as used by locale specific code in the
|
||||||
|
* operating system. This may differ from the default C-string encoding
|
||||||
|
* if the latter has bewen set via an environment variable.
|
||||||
|
*/
|
||||||
|
NSStringEncoding
|
||||||
|
GSPrivateNativeCStringEncoding() GS_ATTRIB_PRIVATE;
|
||||||
|
|
||||||
/* Function used by the NSRunLoop and friends for processing
|
/* Function used by the NSRunLoop and friends for processing
|
||||||
* queued notifications which should be processed at the first safe moment.
|
* queued notifications which should be processed at the first safe moment.
|
||||||
*/
|
*/
|
||||||
|
|
11
configure.ac
11
configure.ac
|
@ -132,7 +132,16 @@ AC_MSG_RESULT($GNUSTEP_CONFIG_FILE)
|
||||||
|
|
||||||
#-----------------------------------------------------------------
|
#-----------------------------------------------------------------
|
||||||
# Whether the GNUstep.conf file path can be set in the environment
|
# Whether the GNUstep.conf file path can be set in the environment
|
||||||
|
# By default this is enabled on unix, but disabled on mswindows
|
||||||
|
# since the normal setup on mswindows is to have the config file
|
||||||
|
# located with the base library dll for runtime configuration and
|
||||||
|
# use the environment variable to control the developer config file
|
||||||
|
# location (used by gnustep-make when building).
|
||||||
#-----------------------------------------------------------------
|
#-----------------------------------------------------------------
|
||||||
|
case "$target_os" in
|
||||||
|
mingw*) enable_env_config=no;;
|
||||||
|
*) enable_env_config=yes;;
|
||||||
|
esac
|
||||||
AC_MSG_CHECKING([whether the GNUstep.conf file path can be set in the environment])
|
AC_MSG_CHECKING([whether the GNUstep.conf file path can be set in the environment])
|
||||||
AC_ARG_ENABLE(environment-config-file,
|
AC_ARG_ENABLE(environment-config-file,
|
||||||
[ --disable-environment-config-file
|
[ --disable-environment-config-file
|
||||||
|
@ -146,7 +155,7 @@ AC_ARG_ENABLE(environment-config-file,
|
||||||
configuration.
|
configuration.
|
||||||
Normally this should be left enabled.],
|
Normally this should be left enabled.],
|
||||||
ac_cv_environment_config_file=$enableval,
|
ac_cv_environment_config_file=$enableval,
|
||||||
ac_cv_environment_config_file="yes")
|
ac_cv_environment_config_file=$enable_env_config)
|
||||||
if test "$ac_cv_environment_config_file" = "yes"; then
|
if test "$ac_cv_environment_config_file" = "yes"; then
|
||||||
AC_DEFINE(OPTION_NO_ENVIRONMENT, 0,
|
AC_DEFINE(OPTION_NO_ENVIRONMENT, 0,
|
||||||
[Enable GNUSTEP_CONFIG_FILE environment variable])
|
[Enable GNUSTEP_CONFIG_FILE environment variable])
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue