projects
/
pspp
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6310d57
)
localename: Avoid gcc warning.
author
Bruno Haible
<bruno@clisp.org>
Fri, 1 Jan 2010 09:33:57 +0000
(10:33 +0100)
committer
Bruno Haible
<bruno@clisp.org>
Fri, 1 Jan 2010 09:34:40 +0000
(10:34 +0100)
ChangeLog
patch
|
blob
|
history
lib/localename.c
patch
|
blob
|
history
diff --git
a/ChangeLog
b/ChangeLog
index 787617bd3a63e6a2cad9072ae39cf06d833228d9..147dfec09719152bbd0d4b914132a063ba43fea2 100644
(file)
--- a/
ChangeLog
+++ b/
ChangeLog
@@
-1,3
+1,9
@@
+2010-01-01 Bruno Haible <bruno@clisp.org>
+
+ localename: Avoid gcc warning.
+ * lib/localename.c (gl_locale_name_thread_unsafe): Don't define this
+ function if it is not used.
+
2010-01-01 Jim Meyering <meyering@redhat.com>
version-etc: set COPYRIGHT_YEAR to 2010
2010-01-01 Jim Meyering <meyering@redhat.com>
version-etc: set COPYRIGHT_YEAR to 2010
diff --git
a/lib/localename.c
b/lib/localename.c
index 03328b9ec1675ee01b53bce5f5ce69e97f21b5c9..c124da9b0493216c2e7605261f8e245e017e73c5 100644
(file)
--- a/
lib/localename.c
+++ b/
lib/localename.c
@@
-1,5
+1,5
@@
/* Determine name of the currently selected locale.
/* Determine name of the currently selected locale.
- Copyright (C) 1995-1999, 2000-20
09
Free Software Foundation, Inc.
+ Copyright (C) 1995-1999, 2000-20
10
Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU Library General Public License as published
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU Library General Public License as published
@@
-2592,20
+2592,22
@@
struniq (const char *string)
#endif
#endif
+#if defined IN_LIBINTL || HAVE_USELOCALE
+
/* Like gl_locale_name_thread, except that the result is not in storage of
indefinite extent. */
/* Like gl_locale_name_thread, except that the result is not in storage of
indefinite extent. */
-#if !defined IN_LIBINTL
+#
if !defined IN_LIBINTL
static
static
-#endif
+#
endif
const char *
gl_locale_name_thread_unsafe (int category, const char *categoryname)
{
const char *
gl_locale_name_thread_unsafe (int category, const char *categoryname)
{
-#if HAVE_USELOCALE
+#
if HAVE_USELOCALE
{
locale_t thread_locale = uselocale (NULL);
if (thread_locale != LC_GLOBAL_LOCALE)
{
{
locale_t thread_locale = uselocale (NULL);
if (thread_locale != LC_GLOBAL_LOCALE)
{
-# if __GLIBC__ >= 2
+#
if __GLIBC__ >= 2
/* Work around an incorrect definition of the _NL_LOCALE_NAME macro in
glibc < 2.12.
See <http://sourceware.org/bugzilla/show_bug.cgi?id=10968>. */
/* Work around an incorrect definition of the _NL_LOCALE_NAME macro in
glibc < 2.12.
See <http://sourceware.org/bugzilla/show_bug.cgi?id=10968>. */
@@
-2616,8
+2618,8
@@
gl_locale_name_thread_unsafe (int category, const char *categoryname)
nl_langinfo (_NL_LOCALE_NAME (category)). */
name = thread_locale->__names[category];
return name;
nl_langinfo (_NL_LOCALE_NAME (category)). */
name = thread_locale->__names[category];
return name;
-# endif
-# if defined __APPLE__ && defined __MACH__ /* MacOS X */
+#
endif
+#
if defined __APPLE__ && defined __MACH__ /* MacOS X */
/* The locale name is found deep in an undocumented data structure.
Since it's stored in a buffer of size 32 and newlocale() rejects
locale names of length > 31, we can assume that it is NUL terminated
/* The locale name is found deep in an undocumented data structure.
Since it's stored in a buffer of size 32 and newlocale() rejects
locale names of length > 31, we can assume that it is NUL terminated
@@
-2715,13
+2717,15
@@
gl_locale_name_thread_unsafe (int category, const char *categoryname)
default: /* We shouldn't get here. */
return "";
}
default: /* We shouldn't get here. */
return "";
}
-# endif
+#
endif
}
}
}
}
-#endif
+#
endif
return NULL;
}
return NULL;
}
+#endif
+
const char *
gl_locale_name_thread (int category, const char *categoryname)
{
const char *
gl_locale_name_thread (int category, const char *categoryname)
{