]> Dogcows Code - chaz/tar/commitdiff
Include stddef.h, for size_t.
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 15 Sep 2001 06:11:37 +0000 (06:11 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 15 Sep 2001 06:11:37 +0000 (06:11 +0000)
Include langinfo.h if needed.
Use locale_charset only if USE_INCLUDED_LIBINTL;
if not, use nl_langinfo (CODESET) if available.

lib/print-copyr.c

index 1ec02efa2cddac199ca6dc3107ff28a7e3756e39..7bbb2c0667ec6eceadd5b0cd487ac8951ea7cdd9 100644 (file)
 # include <config.h>
 #endif
 
+#include <stddef.h>
+
 #if HAVE_ICONV
 # include <iconv.h>
 
+# if ! USE_INCLUDED_LIBINTL && HAVE_LANGINFO_CODESET
+#  include <langinfo.h>
+# endif
+
 # if HAVE_STDLIB_H
 #  include <stdlib.h>
 # endif
@@ -44,8 +50,14 @@ copyright_symbol (char *buf, size_t bufsize)
 
   if (! (outcharset && *outcharset))
     {
+#if USE_INCLUDED_LIBINTL
       extern char const *locale_charset (void);
       outcharset = locale_charset ();
+#else
+# if HAVE_LANGINFO_CODESET
+      outcharset = nl_langinfo (CODESET);
+# endif
+#endif
     }
 
   if (*outcharset)
This page took 0.024146 seconds and 4 git commands to generate.