From d9f4391e36bebc596fb9e0043b9fa2974f494de9 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sat, 5 May 2018 10:36:24 +0200 Subject: [PATCH] Simplify code. Drop support for Borland C++ on Windows. * gettext-runtime/intl/dcigettext.c: Simplify 'defined _WIN32 || defined __WIN32__' to just 'defined _WIN32'. * gettext-runtime/intl/l10nflist.c: Likewise. * gettext-runtime/intl/langprefs.c: Likewise. * gettext-runtime/intl/libgnuintl.in.h: Likewise. * gettext-runtime/intl/loadinfo.h: Likewise. * gettext-runtime/intl/setlocale.c: Likewise. * gettext-runtime/intl/printf-parse.c: Likewise. * gettext-runtime/libasprintf/printf-parse.c: Likewise. * gettext-tools/src/format-c-parse.h: Likewise. * gettext-tools/src/hostname.c: Likewise. * gnulib-local/lib/basename.c: Likewise. --- gettext-runtime/intl/dcigettext.c | 4 ++-- gettext-runtime/intl/l10nflist.c | 4 ++-- gettext-runtime/intl/langprefs.c | 4 ++-- gettext-runtime/intl/libgnuintl.in.h | 4 ++-- gettext-runtime/intl/loadinfo.h | 4 ++-- gettext-runtime/intl/printf-parse.c | 4 ++-- gettext-runtime/intl/setlocale.c | 10 +++++----- gettext-runtime/libasprintf/printf-parse.c | 4 ++-- gettext-tools/src/format-c-parse.h | 4 ++-- gettext-tools/src/hostname.c | 4 ++-- gnulib-local/lib/basename.c | 4 ++-- 11 files changed, 25 insertions(+), 25 deletions(-) diff --git a/gettext-runtime/intl/dcigettext.c b/gettext-runtime/intl/dcigettext.c index e81fdafd2..f4df41645 100644 --- a/gettext-runtime/intl/dcigettext.c +++ b/gettext-runtime/intl/dcigettext.c @@ -1,5 +1,5 @@ /* Implementation of the internal dcigettext function. - Copyright (C) 1995-2017 Free Software Foundation, Inc. + Copyright (C) 1995-2018 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -209,7 +209,7 @@ static void *mempcpy (void *dest, const void *src, size_t n); it may be concatenated to a directory pathname. IS_PATH_WITH_DIR(P) tests whether P contains a directory specification. */ -#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__ +#if defined _WIN32 || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__ /* Win32, Cygwin, OS/2, DOS */ # define ISSLASH(C) ((C) == '/' || (C) == '\\') # define HAS_DEVICE(P) \ diff --git a/gettext-runtime/intl/l10nflist.c b/gettext-runtime/intl/l10nflist.c index 7e52b13a1..b60bbe917 100644 --- a/gettext-runtime/intl/l10nflist.c +++ b/gettext-runtime/intl/l10nflist.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995-2016 Free Software Foundation, Inc. +/* Copyright (C) 1995-2016, 2018 Free Software Foundation, Inc. Contributed by Ulrich Drepper , 1995. This program is free software: you can redistribute it and/or modify @@ -65,7 +65,7 @@ static char *stpcpy (char *dest, const char *src); IS_ABSOLUTE_PATH(P) tests whether P is an absolute path. If it is not, it may be concatenated to a directory pathname. */ -#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__ +#if defined _WIN32 || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__ /* Win32, Cygwin, OS/2, DOS */ # define ISSLASH(C) ((C) == '/' || (C) == '\\') # define HAS_DEVICE(P) \ diff --git a/gettext-runtime/intl/langprefs.c b/gettext-runtime/intl/langprefs.c index c04b7a30e..3761b56e6 100644 --- a/gettext-runtime/intl/langprefs.c +++ b/gettext-runtime/intl/langprefs.c @@ -1,5 +1,5 @@ /* Determine the user's language preferences. - Copyright (C) 2004-2007, 2015-2016 Free Software Foundation, Inc. + Copyright (C) 2004-2007, 2015-2016, 2018 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -32,7 +32,7 @@ extern void _nl_locale_name_canonicalize (char *name); #endif -#if defined _WIN32 || defined __WIN32__ +#if defined _WIN32 # define WIN32_NATIVE #endif diff --git a/gettext-runtime/intl/libgnuintl.in.h b/gettext-runtime/intl/libgnuintl.in.h index 95dcc16ca..a27c23d71 100644 --- a/gettext-runtime/intl/libgnuintl.in.h +++ b/gettext-runtime/intl/libgnuintl.in.h @@ -1,5 +1,5 @@ /* Message catalogs for internationalization. - Copyright (C) 1995-1997, 2000-2016 Free Software Foundation, Inc. + Copyright (C) 1995-1997, 2000-2016, 2018 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -427,7 +427,7 @@ extern int vswprintf (wchar_t *, size_t, const wchar_t *, va_list); /* Support for the locale chosen by the user. */ -#if (defined __APPLE__ && defined __MACH__) || defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ +#if (defined __APPLE__ && defined __MACH__) || defined _WIN32 || defined __CYGWIN__ #ifndef GNULIB_defined_setlocale /* don't override gnulib */ #undef setlocale diff --git a/gettext-runtime/intl/loadinfo.h b/gettext-runtime/intl/loadinfo.h index 2e15f93aa..d968a778b 100644 --- a/gettext-runtime/intl/loadinfo.h +++ b/gettext-runtime/intl/loadinfo.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-2016 Free Software Foundation, Inc. +/* Copyright (C) 1996-2016, 2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1996. @@ -45,7 +45,7 @@ #endif /* Separator in PATH like lists of pathnames. */ -#if ((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) || defined __EMX__ || defined __DJGPP__ +#if (defined _WIN32 && !defined __CYGWIN__) || defined __EMX__ || defined __DJGPP__ /* Win32, OS/2, DOS */ # define PATH_SEPARATOR ';' #else diff --git a/gettext-runtime/intl/printf-parse.c b/gettext-runtime/intl/printf-parse.c index ebcb4840b..49827a3b4 100644 --- a/gettext-runtime/intl/printf-parse.c +++ b/gettext-runtime/intl/printf-parse.c @@ -1,5 +1,5 @@ /* Formatted output to strings. - Copyright (C) 1999-2000, 2002-2003, 2006-2008, 2011, 2015-2016 Free Software + Copyright (C) 1999-2000, 2002-2003, 2006-2008, 2011, 2015-2016, 2018 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -420,7 +420,7 @@ PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a) cp++; } #endif -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ /* On native Win32, PRIdMAX is defined as "I64d". We cannot change it to "lld" because PRIdMAX must also be understood by the system's printf routines. */ diff --git a/gettext-runtime/intl/setlocale.c b/gettext-runtime/intl/setlocale.c index 07c23056e..d271e1b97 100644 --- a/gettext-runtime/intl/setlocale.c +++ b/gettext-runtime/intl/setlocale.c @@ -1,5 +1,5 @@ /* setlocale() function that respects the locale chosen by the user. - Copyright (C) 2009, 2015-2016 Free Software Foundation, Inc. + Copyright (C) 2009, 2015-2016, 2018 Free Software Foundation, Inc. Written by Bruno Haible , 2009. This program is free software: you can redistribute it and/or modify @@ -42,7 +42,7 @@ #include "gettextP.h" -#if (defined __APPLE__ && defined __MACH__) || defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ +#if (defined __APPLE__ && defined __MACH__) || defined _WIN32 || defined __CYGWIN__ # undef setlocale # undef newlocale @@ -81,7 +81,7 @@ category_to_name (int category) return retval; } -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +# if defined _WIN32 && ! defined __CYGWIN__ /* The native Win32 setlocale() function expects locale names of the form "German" or "German_Germany" or "DEU", but not "de" or "de_DE". We need @@ -854,7 +854,7 @@ libintl_setlocale (int category, const char *locale) if (setlocale_unixlike (LC_ALL, base_name) == NULL) goto fail; -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +# if defined _WIN32 && ! defined __CYGWIN__ /* On native Windows, setlocale(LC_ALL,...) may succeed but set the LC_CTYPE category to an invalid value ("C") when it does not support the specified encoding. Report a failure instead. */ @@ -910,7 +910,7 @@ libintl_setlocale (int category, const char *locale) } else { -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +# if defined _WIN32 && ! defined __CYGWIN__ if (category == LC_ALL && locale != NULL && strchr (locale, '.') != NULL) { char *saved_locale; diff --git a/gettext-runtime/libasprintf/printf-parse.c b/gettext-runtime/libasprintf/printf-parse.c index ebcb4840b..49827a3b4 100644 --- a/gettext-runtime/libasprintf/printf-parse.c +++ b/gettext-runtime/libasprintf/printf-parse.c @@ -1,5 +1,5 @@ /* Formatted output to strings. - Copyright (C) 1999-2000, 2002-2003, 2006-2008, 2011, 2015-2016 Free Software + Copyright (C) 1999-2000, 2002-2003, 2006-2008, 2011, 2015-2016, 2018 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -420,7 +420,7 @@ PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a) cp++; } #endif -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ /* On native Win32, PRIdMAX is defined as "I64d". We cannot change it to "lld" because PRIdMAX must also be understood by the system's printf routines. */ diff --git a/gettext-tools/src/format-c-parse.h b/gettext-tools/src/format-c-parse.h index e90e5fd2c..ab7bb9404 100644 --- a/gettext-tools/src/format-c-parse.h +++ b/gettext-tools/src/format-c-parse.h @@ -1,5 +1,5 @@ /* Parsing C format strings. - Copyright (C) 2001-2004, 2006-2007, 2009-2010, 2015-2016 Free Software + Copyright (C) 2001-2004, 2006-2007, 2009-2010, 2015-2016, 2018 Free Software Foundation, Inc. Written by Bruno Haible , 2001. @@ -630,7 +630,7 @@ format_parse_entrails (const char *format, bool translated, size = FAT_SIZE_SIZE_T; else if (*format == 't') size = FAT_SIZE_PTRDIFF_T; -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ else if (SYSDEP_SEGMENTS_PROCESSED && *format == 'I' && format[1] == '6' diff --git a/gettext-tools/src/hostname.c b/gettext-tools/src/hostname.c index 399edf00c..8dedd07b1 100644 --- a/gettext-tools/src/hostname.c +++ b/gettext-tools/src/hostname.c @@ -1,5 +1,5 @@ /* Display hostname in various forms. - Copyright (C) 2001-2003, 2006-2007, 2012, 2015-2016 Free Software + Copyright (C) 2001-2003, 2006-2007, 2012, 2015-2016, 2018 Free Software Foundation, Inc. Written by Bruno Haible , 2001. @@ -28,7 +28,7 @@ #include #include -#if defined _WIN32 || defined __WIN32__ +#if defined _WIN32 # define WIN32_NATIVE #endif diff --git a/gnulib-local/lib/basename.c b/gnulib-local/lib/basename.c index 3518ade04..2c1270f8b 100644 --- a/gnulib-local/lib/basename.c +++ b/gnulib-local/lib/basename.c @@ -1,5 +1,5 @@ /* Return the name-within-directory of a file name. - Copyright (C) 1996-2002, 2004, 2006, 2010, 2012, 2015-2016 Free Software + Copyright (C) 1996-2002, 2004, 2006, 2010, 2012, 2015-2016, 2018 Free Software Foundation, Inc. NOTE: The canonical source of this file is maintained with the GNU C Library. @@ -28,7 +28,7 @@ #include #include -#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__ +#if defined _WIN32 || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__ /* Win32, Cygwin, OS/2, DOS */ # define HAS_DEVICE(P) \ ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \ -- 2.47.3