bug-gnulib
[Top][All Lists]
Advanced

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

[bug-gnulib] getopt depending on gettext


From: Werner LEMBERG
Subject: [bug-gnulib] getopt depending on gettext
Date: Mon, 30 May 2005 15:37:51 +0200 (CEST)

I think it is a *bad* idea to make getopt depend on gettext
unconditionally.  I suggest a patch similar to the one below.

BTW, Nelson Beebe tested a prerelease of groff 1.19.2 on his zoo of
Unix platforms.  He writes:

  Builds with C++ compilers fail in compiling getopt.c; it is too bad
  that that simple file could not have been written more portably.  It
  has been the cause of C++ build failures on several other packages.

I'll analyze his failure reports (which arrive in the next days, I
think) and send my conclusions to you -- hopefully we finally get a
version which works everywhere!


    Werner


======================================================================


--- getopt.c.orig       2005-05-14 09:15:14.000000000 +0200
+++ getopt.c    2005-05-30 15:27:01.578335784 +0200
@@ -50,8 +50,12 @@
 #ifdef _LIBC
 # include <libintl.h>
 #else
-# include "gettext.h"
-# define _(msgid) gettext (msgid)
+# ifdef NO_GETTEXT
+#  define _(msgid) (msgid)
+# else
+#  include "gettext.h"
+#  define _(msgid) gettext (msgid)
+# endif
 #endif
 
 #if defined _LIBC && defined USE_IN_LIBIO




reply via email to

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