X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Flocalcharset.c;h=fb4951912885620ca9329a04ac30122254dcb9b5;hb=d9b9f07a096ccd2e94339f7b531e4ef0b9290019;hp=08daf7353a2e23431da0cc94149ccb4d125ab5ec;hpb=1c08859b486db8ce18311bb05901b3f583154e5c;p=gnulib.git diff --git a/lib/localcharset.c b/lib/localcharset.c index 08daf7353..fb4951912 100644 --- a/lib/localcharset.c +++ b/lib/localcharset.c @@ -1,6 +1,6 @@ /* Determine a canonical name for the current locale's character encoding. - Copyright (C) 2000-2006 Free Software Foundation, Inc. + Copyright (C) 2000-2006, 2008 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -18,26 +18,15 @@ /* Written by Bruno Haible . */ -#ifdef HAVE_CONFIG_H -# include -#endif +#include /* Specification. */ #include "localcharset.h" -#if HAVE_STDDEF_H -# include -#endif - +#include #include -#if HAVE_STRING_H -# include -#else -# include -#endif -#if HAVE_STDLIB_H -# include -#endif +#include +#include #if defined _WIN32 || defined __WIN32__ # define WIN32_NATIVE @@ -45,14 +34,16 @@ #if defined __EMX__ /* Assume EMX program runs on OS/2, even if compiled under DOS. */ -# define OS2 +# ifndef OS2 +# define OS2 +# endif #endif #if !defined WIN32_NATIVE # if HAVE_LANGINFO_CODESET # include # else -# if HAVE_SETLOCALE +# if 0 /* see comment below */ # include # endif # endif @@ -75,6 +66,11 @@ # define relocate(pathname) (pathname) #endif +/* Get LIBDIR. */ +#ifndef LIBDIR +# include "configmake.h" +#endif + #if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__ /* Win32, Cygwin, OS/2, DOS */ # define ISSLASH(C) ((C) == '/' || (C) == '\\') @@ -357,7 +353,7 @@ locale_charset (void) (like SunOS 4 or DJGPP) have only the C locale. Therefore we don't use setlocale here; it would return "C" when it doesn't support the locale name the user has set. */ -# if HAVE_SETLOCALE && 0 +# if 0 locale = setlocale (LC_CTYPE, NULL); # endif if (locale == NULL || locale[0] == '\0')