aboutsummaryrefslogtreecommitdiffstats
path: root/hard-locale.h
diff options
context:
space:
mode:
Diffstat (limited to 'hard-locale.h')
-rw-r--r--hard-locale.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/hard-locale.h b/hard-locale.h
index 0f4986ba..ea19605a 100644
--- a/hard-locale.h
+++ b/hard-locale.h
@@ -21,6 +21,11 @@
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+/* Declare at file scope for stupid compilers. */
+#if !( defined __GLIBC__ && __GLIBC__ >= 2 )
+static ptr_t xmalloc PARAMS ((size_t n));
+#endif
+
/* Return nonzero if the current CATEGORY locale is hard, i.e. if you
can't get away with assuming traditional C or POSIX behavior. */
@@ -40,8 +45,6 @@ hard_locale (int category)
if (strcmp (p, "C") == 0 || strcmp (p, "POSIX") == 0)
hard = 0;
# else
- static ptr_t xmalloc PARAMS ((size_t n));
-
char *locale = xmalloc (strlen (p) + 1);
strcpy (locale, p);