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.
This commit is contained in:
@@ -21,9 +21,15 @@
|
|||||||
# include <config.h>
|
# include <config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <stddef.h>
|
||||||
|
|
||||||
#if HAVE_ICONV
|
#if HAVE_ICONV
|
||||||
# include <iconv.h>
|
# include <iconv.h>
|
||||||
|
|
||||||
|
# if ! USE_INCLUDED_LIBINTL && HAVE_LANGINFO_CODESET
|
||||||
|
# include <langinfo.h>
|
||||||
|
# endif
|
||||||
|
|
||||||
# if HAVE_STDLIB_H
|
# if HAVE_STDLIB_H
|
||||||
# include <stdlib.h>
|
# include <stdlib.h>
|
||||||
# endif
|
# endif
|
||||||
@@ -44,8 +50,14 @@ copyright_symbol (char *buf, size_t bufsize)
|
|||||||
|
|
||||||
if (! (outcharset && *outcharset))
|
if (! (outcharset && *outcharset))
|
||||||
{
|
{
|
||||||
|
#if USE_INCLUDED_LIBINTL
|
||||||
extern char const *locale_charset (void);
|
extern char const *locale_charset (void);
|
||||||
outcharset = locale_charset ();
|
outcharset = locale_charset ();
|
||||||
|
#else
|
||||||
|
# if HAVE_LANGINFO_CODESET
|
||||||
|
outcharset = nl_langinfo (CODESET);
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
if (*outcharset)
|
if (*outcharset)
|
||||||
|
|||||||
Reference in New Issue
Block a user