bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gettext patches for cygwin #2: autoconf warnings, cygwin/getopt


From: Charles Wilson
Subject: gettext patches for cygwin #2: autoconf warnings, cygwin/getopt
Date: Sat, 19 Nov 2005 23:32:36 -0500
User-agent: Mozilla Thunderbird 1.0.6 (Windows/20050716)

On cygwin, the builtin getopt function has POSIXLY_CORRECT hardcoded to 1. This causes some of the gettext self-tests to fail, as they rely on argument reordering which is only allowed by getopt when not POSIXLY_CORRECT. Plus, clean up some autoconf warnings since AH_BOTTOM/AH_TOP are deprecated.

--
Chuck

2005-11-20  Charles Wilson  <address@hidden>

        * gettext-runtime/configure.ac: silence autoconf warnings by
        replacing deprecated AH_BOTTOM with AH_VERBATIM.
        * gettext-tools/configure.ac: silence autoconf warnings by
        replacing deprecated AH_TOP and AH_BOTTOM with AH_VERBATIM
        and AC_DEFINE.  On cygwin/mingw, force gl_GETOPT_SUBSTITUTE.

diff -urN gettext-0.14.5-orig/gettext-runtime/configure.ac 
gettext-0.14.5/gettext-runtime/configure.ac
--- gettext-0.14.5-orig/gettext-runtime/configure.ac    2005-05-20 
16:10:40.000000000 -0400
+++ gettext-0.14.5/gettext-runtime/configure.ac 2005-11-11 00:04:25.781250000 
-0500
@@ -102,15 +102,17 @@
 AM_GNU_GETTEXT(use-libtool, need-ngettext)
 
 dnl Put some default definitions into config.h.
-AH_BOTTOM([
-/* On Windows, variables that may be in a DLL must be marked specially.  */
+AH_VERBATIM([DEF_DLLVAR],
+[/* On Windows, variables that may be in a DLL must be marked specially.  */
 #if defined _MSC_VER && defined _DLL
 # define DLL_VARIABLE __declspec (dllimport)
 #else
 # define DLL_VARIABLE
 #endif
+])
 
-/* Extra OS/2 (emx+gcc) defines.  */
+AH_VERBATIM([DEF_OS2],
+[/* Extra OS/2 (emx+gcc) defines.  */
 #ifdef __EMX__
 # include "intl/os2compat.h"
 #endif
diff -urN gettext-0.14.5-orig/gettext-tools/configure.ac 
gettext-0.14.5/gettext-tools/configure.ac
--- gettext-0.14.5-orig/gettext-tools/configure.ac      2005-05-20 
16:15:10.000000000 -0400
+++ gettext-0.14.5/gettext-tools/configure.ac   2005-11-11 00:26:09.359375000 
-0500
@@ -31,6 +31,10 @@
 dnl Prefer modern Filesystem Hierarchy Standard over antiquated GNU standards.
 test "$mandir" != '${prefix}/man' || mandir='${datadir}/man'
 
+# Header stuff
+AC_DEFINE([DEFAULT_OUTPUT_ALIGNMENT],1,
+[Default value for alignment of strings in .mo file.])
+
 dnl Checks for programs.
 AC_PROG_CC
 AC_PROG_INSTALL
@@ -130,13 +134,22 @@
 gl_EXITFAIL
 gl_FUNC_FNMATCH_POSIX
 gl_GETOPT
+
+case $host in
+  dnl On cygwin and mingw, the system getopt is hardcoded to use
+  dnl POSIXLY_CORRECT -- which causes some gettext selftests to fail.
+  dnl Therefore, we always use the replacement version (symbol clash
+  dnl avoided because gnulib redefines the names to rpl_*)
+  *cygwin* | *mingw* ) gl_GETOPT_SUBSTITUTE ;;
+esac
+
 gl_FUNC_EACCESS
 gl_FUNC_STPNCPY
 gl_STRCASE
 gl_FUNC_STRTOUL
 gl_MBSWIDTH
 gt_PREREQ_BACKUPFILE
-AC_FUNC_VFORK
+AC_FUNC_VFORK([])
 gt_UNION_WAIT
 gt_TMPDIR
 gt_FUNC_MKDTEMP
@@ -162,13 +175,8 @@
 dnl (OK, not quite, the AC_CONFIG_FILES has also some parts.)
 AM_GNU_GETTEXT(use-libtool, need-ngettext)
 
-dnl Put some default definitions into config.h.
-AH_TOP([
-/* Default value for alignment of strings in .mo file.  */
-#define DEFAULT_OUTPUT_ALIGNMENT 1
-])
-AH_BOTTOM([
-/* A file name cannot consist of any character possible.  INVALID_PATH_CHAR
+AH_VERBATIM([DEF_INVALID_PATH_CHAR],
+[/* A file name cannot consist of any character possible.  INVALID_PATH_CHAR
    contains the characters not allowed.  */
 #if defined _MSC_VER || defined __MINGW32__
 /* Woe32.  This string is valid for Windows NT/2000.  On Windows 95/98/ME some
@@ -182,24 +190,28 @@
 /* Unix.  */
 # define INVALID_PATH_CHAR 
"\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037
 \177/"
 #endif
+])
 
-/* This is the page width for the message_print function.  It should
-   not be set to more than 79 characters (Emacs users will appreciate
-   it).  It is used to wrap the msgid and msgstr strings, and also to
-   wrap the file position (#:) comments.  */
-#define PAGE_WIDTH 79
+AC_DEFINE([PAGE_WIDTH],[79],
+[This is the page width for the message_print function.  It should
+not be set to more than 79 characters (Emacs users will appreciate
+it).  It is used to wrap the msgid and msgstr strings, and also to
+wrap the file position (#:) comments.])
 
-/* On Windows, variables that may be in a DLL must be marked specially.  */
+AH_VERBATIM([DEF_OS2],
+[/* Extra OS/2 (emx+gcc) defines.  */
+#ifdef __EMX__
+# include "intl/os2compat.h"
+#endif
+])
+
+AH_VERBATIM([DEF_DLLVAR],
+[/* On Windows, variables that may be in a DLL must be marked specially.  */
 #if defined _MSC_VER && defined _DLL
 # define DLL_VARIABLE __declspec (dllimport)
 #else
 # define DLL_VARIABLE
 #endif
-
-/* Extra OS/2 (emx+gcc) defines.  */
-#ifdef __EMX__
-# include "intl/os2compat.h"
-#endif
 ])
 
 dnl Check for the expat XML parser.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]