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:
fedor 2000-10-30 05:03:28 +00:00
parent 379795ebe4
commit 01fe40bbac
7 changed files with 33 additions and 7 deletions

View file

@ -1,3 +1,14 @@
2000-10-29 Adam Fedor <fedor@gnu.org>
* configure.in: Check for langinfo.
* Source/GSLocale.m (GSDomainFromDefaultLocale): Return nil
dict if langinfo info not available.
* acconfig.h: Add HAVE_DLADDR
* Headers/gnustep/base/config.h.in: Regenerate.
* Source/simple-load.h (__objc_dynamic_get_symbol_path): Return
nil if not HAVE_DLADDR.
2000-10-29 Richard Frith-Macdonald <rfm@gnu.org>
* Source/GSString.m: New inline string classes added to avoid calls

View file

@ -24,6 +24,9 @@
#undef VSPRINTF_RETURNS_LENGTH
#undef VASPRINTF_RETURNS_LENGTH
/* Define if you have the dladdr function. */
#undef HAVE_DLADDR
/* Define if your system needs to have short/int word aligned */
#undef NEED_WORD_ALIGNMENT
@ -132,9 +135,6 @@
/* Define if you have the vsprintf function. */
#undef HAVE_VSPRINTF
/* Define if you have the dladdr function. */
#undef HAVE_DLADDR
/* Define if you have the <dirent.h> header file. */
#undef HAVE_DIRENT_H
@ -144,6 +144,9 @@
/* Define if you have the <grp.h> header file. */
#undef HAVE_GRP_H
/* Define if you have the <langinfo.h> header file. */
#undef HAVE_LANGINFO_H
/* Define if you have the <libxml/xmlversion.h> header file. */
#undef HAVE_LIBXML_XMLVERSION_H

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 */

View file

@ -9,6 +9,9 @@
#undef VSPRINTF_RETURNS_LENGTH
#undef VASPRINTF_RETURNS_LENGTH
/* Define if you have the dladdr function. */
#undef HAVE_DLADDR
/* Define if your system needs to have short/int word aligned */
#undef NEED_WORD_ALIGNMENT

2
configure vendored
View file

@ -2825,7 +2825,7 @@ else
fi
done
for ac_hdr in sys/mount.h sys/types.h windows.h locale.h
for ac_hdr in sys/mount.h sys/types.h windows.h locale.h langinfo.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6

View file

@ -548,7 +548,7 @@ AC_CHECK_HEADERS(values.h)
# Header files and functions for files and filesystems
#--------------------------------------------------------------------
AC_CHECK_HEADERS(sys/stat.h sys/vfs.h sys/statfs.h sys/statvfs.h pwd.h grp.h)
AC_CHECK_HEADERS(sys/mount.h sys/types.h windows.h locale.h)
AC_CHECK_HEADERS(sys/mount.h sys/types.h windows.h locale.h langinfo.h)
saved_LIBS="$LIBS"
LIBS="$LIBS -lm"
AC_CHECK_FUNCS(statvfs symlink readlink geteuid rint)