From 356b01119ea843f0c72a6c8257b5d310454d53bc Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 15 Sep 2001 06:11:37 +0000 Subject: [PATCH] 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. --- lib/print-copyr.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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) -- 2.44.0