Minor locale patch

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@19746 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-Macdonald 2004-07-18 10:48:19 +00:00
parent 20f3612fce
commit d08e9b2f90
2 changed files with 6 additions and 4 deletions

View file

@ -1,3 +1,7 @@
2004-07-15 Mateu Batle <mateu.batle@tragnarion.com>
* Source/GSLocale.m: Patch to use locale when no langinfo available
2004-07-15 Richard Frith-Macdonald <rfm@gnu.org>
* NSTimeZones/NSTimeZones.tar: regenerated

View file

@ -88,7 +88,6 @@ GSSetLocale(int category, NSString *locale)
NSDictionary *
GSDomainFromDefaultLocale(void)
{
#ifdef HAVE_LANGINFO_H
static NSDictionary *saved = nil;
int i;
struct lconv *lconv;
@ -102,6 +101,7 @@ GSDomainFromDefaultLocale(void)
dict = [NSMutableDictionary dictionary];
#ifdef HAVE_LANGINFO_H
/* Time/Date Information */
arr = [NSMutableArray arrayWithCapacity: 7];
for (i = 0; i < 7; i++)
@ -145,6 +145,7 @@ GSDomainFromDefaultLocale(void)
forKey: NSShortDateFormatString];
[dict setObject: GSLanginfo(T_FMT)
forKey: NSTimeFormatString];
#endif /* HAVE_LANGINFO_H */
lconv = localeconv();
@ -210,9 +211,6 @@ GSDomainFromDefaultLocale(void)
}
[gnustep_global_lock unlock];
return saved;
#else /* HAVE_LANGINFO_H */
return nil;
#endif
}
#else /* HAVE_LOCALE_H */