Check for lanfinfo, Update DLADDR check

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@7929 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Adam Fedor 2000-10-30 05:03:28 +00:00
parent 1937407bdf
commit 4a05253a48
7 changed files with 33 additions and 7 deletions

View file

@ -67,14 +67,16 @@ GSSetLocale(NSString *locale)
NSDictionary *
GSDomainFromDefaultLocale(void)
{
#ifdef HAVE_LANGINFO_H
int i;
struct lconv *lconv;
NSMutableDictionary *dict;
NSMutableArray *arr;
NSString *str1, *str2;
/* Time/Date Information */
dict = [NSMutableDictionary dictionary];
/* Time/Date Information */
arr = [NSMutableArray arrayWithCapacity: 7];
for (i = 0; i < 7; i++)
[arr addObject: GSLanginfo(DAY_1+i)];
@ -136,6 +138,9 @@ GSDomainFromDefaultLocale(void)
[dict setObject: str2 forKey: NSLanguageName];
return dict;
#else /* HAVE_LANGINFO_H */
return nil;
#endif
}
NSString *
@ -144,7 +149,7 @@ GSLanguageFromLocale(NSString *locale)
NSString *language = nil;
NSString *aliases = nil;
if (locale == nil)
if (locale == nil || [locale isEqual: @"C"] || [locale isEqual: @"POSIX"])
return @"English";
aliases = [NSBundle pathForGNUstepResource: @"Locale"

View file

@ -87,6 +87,7 @@ __objc_dynamic_list_undefined_symbols(void)
static char *
__objc_dynamic_get_symbol_path(dl_handle_t handle, dl_symbol_t symbol)
{
#ifdef HAVE_DLADDR
dl_symbol_t sym;
Dl_info info;
@ -99,6 +100,9 @@ __objc_dynamic_get_symbol_path(dl_handle_t handle, dl_symbol_t symbol)
return NULL;
return info.dli_fname;
#else
return NULL;
#endif
}
#endif /* __sunos_load_h_INCLUDE */