diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2001-09-15 06:11:37 +0000 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2001-09-15 06:11:37 +0000 |
commit | 356b01119ea843f0c72a6c8257b5d310454d53bc (patch) | |
tree | 31c518de10ac77173cb80c16972fa06f45add43b | |
parent | 698e5f95bf0fea224ba82f8113d5cbbd20fad49f (diff) | |
download | tar-356b01119ea843f0c72a6c8257b5d310454d53bc.tar.gz |
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.
-rw-r--r-- | lib/print-copyr.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/print-copyr.c b/lib/print-copyr.c index 1ec02efa..7bbb2c06 100644 --- a/lib/print-copyr.c +++ b/lib/print-copyr.c @@ -21,9 +21,15 @@ # 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) |