projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
stat: Bypass buggy override in mingw64.
[gnulib.git]
/
lib
/
localcharset.c
diff --git
a/lib/localcharset.c
b/lib/localcharset.c
index
cd97e6c
..
d41f346
100644
(file)
--- a/
lib/localcharset.c
+++ b/
lib/localcharset.c
@@
-13,8
+13,7
@@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ with this program; if not, see <http://www.gnu.org/licenses/>. */
/* Written by Bruno Haible <bruno@clisp.org>. */
/* Written by Bruno Haible <bruno@clisp.org>. */
@@
-34,7
+33,7
@@
#endif
#if defined _WIN32 || defined __WIN32__
#endif
#if defined _WIN32 || defined __WIN32__
-# define WIN
32
_NATIVE
+# define WIN
DOWS
_NATIVE
#endif
#if defined __EMX__
#endif
#if defined __EMX__
@@
-44,7
+43,7
@@
# endif
#endif
# endif
#endif
-#if !defined WIN
32
_NATIVE
+#if !defined WIN
DOWS
_NATIVE
# include <unistd.h>
# if HAVE_LANGINFO_CODESET
# include <langinfo.h>
# include <unistd.h>
# if HAVE_LANGINFO_CODESET
# include <langinfo.h>
@@
-57,7
+56,7
@@
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
# endif
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
# endif
-#elif defined WIN
32
_NATIVE
+#elif defined WIN
DOWS
_NATIVE
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
#endif
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
#endif
@@
-83,7
+82,7
@@
#endif
#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__
#endif
#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__
- /*
Win32
, Cygwin, OS/2, DOS */
+ /*
Native Windows
, Cygwin, OS/2, DOS */
# define ISSLASH(C) ((C) == '/' || (C) == '\\')
#endif
# define ISSLASH(C) ((C) == '/' || (C) == '\\')
#endif
@@
-123,7
+122,7
@@
get_charset_aliases (void)
cp = charset_aliases;
if (cp == NULL)
{
cp = charset_aliases;
if (cp == NULL)
{
-#if !(defined DARWIN7 || defined VMS || defined WIN
32
_NATIVE || defined __CYGWIN__)
+#if !(defined DARWIN7 || defined VMS || defined WIN
DOWS
_NATIVE || defined __CYGWIN__)
const char *dir;
const char *base = "charset.alias";
char *file_name;
const char *dir;
const char *base = "charset.alias";
char *file_name;
@@
-308,7
+307,7
@@
get_charset_aliases (void)
"DECKOREAN" "\0" "EUC-KR" "\0";
# endif
"DECKOREAN" "\0" "EUC-KR" "\0";
# endif
-# if defined WIN
32
_NATIVE || defined __CYGWIN__
+# if defined WIN
DOWS
_NATIVE || defined __CYGWIN__
/* To avoid the troubles of installing a separate file in the same
directory as the DLL and of retrieving the DLL's directory at
runtime, simply inline the aliases here. */
/* To avoid the troubles of installing a separate file in the same
directory as the DLL and of retrieving the DLL's directory at
runtime, simply inline the aliases here. */
@@
-360,7
+359,7
@@
locale_charset (void)
const char *codeset;
const char *aliases;
const char *codeset;
const char *aliases;
-#if !(defined WIN
32
_NATIVE || defined OS2)
+#if !(defined WIN
DOWS
_NATIVE || defined OS2)
# if HAVE_LANGINFO_CODESET
# if HAVE_LANGINFO_CODESET
@@
-407,10
+406,10
@@
locale_charset (void)
}
}
}
}
- /*
Woe32 has a function returning the locale's codepage as a number:
- GetACP(). This encoding is used by Cygwin, unless the user has set
- the environment variable CYGWIN=codepage:oem (which very few people
- do).
+ /*
The Windows API has a function returning the locale's codepage as a
+ number: GetACP(). This encoding is used by Cygwin, unless the user
+ has set the environment variable CYGWIN=codepage:oem (which very few
+
people
do).
Output directed to console windows needs to be converted (to
GetOEMCP() if the console is using a raster font, or to
GetConsoleOutputCP() if it is using a TrueType font). Cygwin does
Output directed to console windows needs to be converted (to
GetOEMCP() if the console is using a raster font, or to
GetConsoleOutputCP() if it is using a TrueType font). Cygwin does
@@
-453,12
+452,12
@@
locale_charset (void)
# endif
# endif
-#elif defined WIN
32
_NATIVE
+#elif defined WIN
DOWS
_NATIVE
static char buf[2 + 10 + 1];
static char buf[2 + 10 + 1];
- /*
Woe32 has a function returning the locale's codepage as a number:
- GetACP().
+ /*
The Windows API has a function returning the locale's codepage as a
+
number:
GetACP().
When the output goes to a console window, it needs to be provided in
GetOEMCP() encoding if the console is using a raster font, or in
GetConsoleOutputCP() encoding if it is using a TrueType font.
When the output goes to a console window, it needs to be provided in
GetOEMCP() encoding if the console is using a raster font, or in
GetConsoleOutputCP() encoding if it is using a TrueType font.