From: Paul Eggert Date: Sat, 15 Sep 2001 06:11:37 +0000 (+0000) Subject: Include stddef.h, for size_t. X-Git-Url: https://git.dogcows.com/gitweb?a=commitdiff_plain;h=356b01119ea843f0c72a6c8257b5d310454d53bc;p=chaz%2Ftar Include stddef.h, for size_t. Include langinfo.h if needed. Use locale_charset only if USE_INCLUDED_LIBINTL; if not, use nl_langinfo (CODESET) if available. --- diff --git a/lib/print-copyr.c b/lib/print-copyr.c index 1ec02ef..7bbb2c0 100644 --- a/lib/print-copyr.c +++ b/lib/print-copyr.c @@ -21,9 +21,15 @@ # include #endif +#include + #if HAVE_ICONV # include +# if ! USE_INCLUDED_LIBINTL && HAVE_LANGINFO_CODESET +# include +# endif + # if HAVE_STDLIB_H # include # 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)