[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gettext cvs
From: |
Charles Wilson |
Subject: |
Re: gettext cvs |
Date: |
Fri, 05 May 2006 23:10:01 -0400 |
User-agent: |
Thunderbird 1.5.0.2 (Windows/20060308) |
Charles Wilson wrote:
Bruno Haible wrote:
I've been trying to get cvs gettext to compile on cygwin.
Welcome! I do still have your mail and patch from 2005-11-27, but I'm
wondering which parts of the patch are still needed after we discussed
the first round in four or five parallel threads.
Very little, actually. I did try to summarize the results of that
multi-thread conversation here:
http://lists.gnu.org/archive/html/bug-gnu-utils/2005-11/msg00102.html
The changes I now need against current CVS are mostly unrelated to those
old issues, and have more to do with the introduction of explicit
declspec(dllimport) decorators.
Okay, I've finally managed to get gettext-0.15-pre2 to compile on
cygwin, with all appropriate patches so that the vast majority of the
test suite passes. (testsuite 'summary' attached)
Structure:
-------------
In order to make this apply to CVS relatively cleanly, I tried to only
retain the patches that touch files which are inputs to autoconfery.
That is, Makefile.am but not Makefile.in.
The following recipe builds successfully for me:
unpack pre2 tarball
apply attached patch
./autogen.sh # which has been hacked to update libtool.m4
# These libtool changes are minimal, will be in 1.5.24
# just FYI, that patch is also attached
cd build_dir
src_dir/configure \
--with-included-gettext --disable-rpath \
--without-emacs --disable-native-java
make aliaspath=${.....} EMACS=no
make install DESTDIR= works, as does make dist-bzip2.
The Patch
----------------
(1) autoconfery: hack so that autogen.sh updates libtool. There's no way
any sane maintainer would apply this, but I'm including it for
completeness. Basically, libtool needs to use -DDLL_EXPORT everywhere
mingw does.
(2) autoconfery2: gettext-tools/configure.ac,
gettext-runtime/configure.ac, and associated config.h.in files: Define
DLL_VARIABLE on cygwin, too. Define specific per-library versions of
DLL_VARIABLE (LIBGETTEXTSRC_DLL_VARIABLE and LIBGETTEXTLIB_DLL_VARIABLE)
whose value depends on BUILDING_LIBGETTEXT[SRC|LIB] and DLL_VARIABLE.
Change AM conditional from MINGW to WOE32GCC. New AM conditional
WOE32GCC_SHLIBS.
(3) automakery1: gettext-tools/[lib|src]/Makefile.am, gettext-tools
libgrep/Makefile.am, and gettext-tools/test/Makefile,am: add
-DBUILDING_LIBGETTEXT[LIB|SRC] to libgettext[lib|src]_la_CFLAGS. Change
conditional from MINGW to WOE32GCC. If conditional WOE32GCC true, add
'-DDLL_EXPORT -D_DLL' to all per-executable *_CPPFLAGS.
Also, when generating po-gram-gen2.h, use LIBGETTEXTSRC_DLL_VARIABLE not
DLL_VARIABLE
(4) various .h files in gettext-tools/lib: use
LIBGETTEXTLIB_DLL_VARIABLE instead of DLL_VARIABLE
(5) various .h files in gettext-tools/src: use
LIBGETTEXTSRC_DLL_VARIABLE instead of DLL_VARIABLE
(6) various:
progreloc.c: Use access() on cygwin
write-mo.h: don't use DLL_VARIABLE (or any form of it) at all. It's
not included by any file that goes into a DLL. It's only included by
msgfmt.c and write-mo.c, both of which are direct sources for
msgfmt.exe. Therefore, the symbols in write-mo.h should never be
declspec(anything).
filters.h: Add C++ guards since apps on mingw/cygwin are compiled by
g++.
Hopefully you will find this useful for the next release of gettext.
Attached: changelog, patch, patch-to-libtool, and regression test
"analysis" (such as it is).
--
Chuck
2006-05-02 Charles Wilson <address@hidden>
* autogen.sh: add stupid hack to force manual
update of build-aux/ltmain.sh and m4/libtool.m4
* gettext-tools/configure.ac: also define DLL_VARIABLE
on cygwin. Define per-library DLL_VARIABLE macros depending
on value of DLL_VARIABLE and BUILDING_*. Also use -no-undefined
on mingw and cygwin. Change conditional name from MINGW to
WOE32GCC. New conditional WOE32GCC_SHLIBS.
* gettext-tools/config.h.in: regenerate due to above
* gettext-tools/Makefile.am: ensure $(top_builddir)/windows
exists when creating windows/stdbool.h
* gettext-runtime/libasprintf/configure.ac: also use
-no-undefined on mingw
* gettext-runtime/configure.ac: also define DLL_VARIABLE
on cygwin. Placeholder definitions of per-lib DLL_VARIABLE macros.
* gettext-runtime/config.h.in: regenerate due to above
* gettext-tools/lib/Makefile.am: add -DBUILDING_LIBGETTEXTLIB to
libgettextlib_la_CFLAGS
* gettext-tools/src/Makefile.am: add -DBUILDING_LIBGETTEXTSRC to
libgettextsrc_la_CFLAGS. Change conditional from MINGW to WOE32GCC.
If conditional WOE32GCC true, add -DDLL_EXPORT -D_DLL to CPPFLAGS
for all executable targets.
(po-gram-gen2.h): use LIBGETTEXTSRC_DLL_VARIABLE not DLL_VARIABLE.
* gettext-tools/libgrep/Makefile.am: If conditional WOE32GCC true,
add -DDLL_EXPORT -D_DLL to CPPFLAGS for all executable targets.
* gettext-tools/tests/Makefile.am: If conditional WOE32GCC true,
add -DDLL_EXPORT -D_DLL to CPPFLAGS for all executable targets.
* gettext-tools/lib/argmatch.h: Use LIBGETTEXTLIB_DLL_VARIABLE
* gettext-tools/lib/backupfile.h: Use LIBGETTEXTLIB_DLL_VARIABLE
* gettext-tools/lib/error-progname.h: Use LIBGETTEXTLIB_DLL_VARIABLE
* gettext-tools/lib/error.h: Use LIBGETTEXTLIB_DLL_VARIABLE
* gettext-tools/lib/exitfail.h: Use LIBGETTEXTLIB_DLL_VARIABLE
* gettext-tools/lib/getopt_.h: Use LIBGETTEXTLIB_DLL_VARIABLE
* gettext-tools/lib/obstack.h: Use LIBGETTEXTLIB_DLL_VARIABLE
* gettext-tools/lib/progname.h: Use LIBGETTEXTLIB_DLL_VARIABLE
* gettext-tools/lib/progreloc.c: Use access() on cygwin
* gettext-tools/src/filters.h: Add C++ guards
* gettext-tools/src/format.h: Use LIBGETTEXTSRC_DLL_VARIABLE
* gettext-tools/src/lang-table.h: Do not use DLL_VARIABLE
* gettext-tools/src/message.h: Use LIBGETTEXTSRC_DLL_VARIABLE
* gettext-tools/src/msgl-cat.h: Use LIBGETTEXTSRC_DLL_VARIABLE
* gettext-tools/src/plural-table.h: Use LIBGETTEXTSRC_DLL_VARIABLE
* gettext-tools/src/po-charset.h: Use LIBGETTEXTSRC_DLL_VARIABLE
* gettext-tools/src/po-error.h: Use LIBGETTEXTSRC_DLL_VARIABLE
* gettext-tools/src/po-gram-gen2.h: Use LIBGETTEXTSRC_DLL_VARIABLE
* gettext-tools/src/po-lex.h: Use LIBGETTEXTSRC_DLL_VARIABLE
* gettext-tools/src/po-xerror.h: Use LIBGETTEXTSRC_DLL_VARIABLE
* gettext-tools/src/read-po.h: Use LIBGETTEXTSRC_DLL_VARIABLE
* gettext-tools/src/write-mo.h: Do not use DLL_VARIABLE
diff -urN gettext-0.15-pre2-orig/autogen.sh gettext-0.15-pre2/autogen.sh
--- gettext-0.15-pre2-orig/autogen.sh 2005-08-30 16:33:04.000000000 -0400
+++ gettext-0.15-pre2/autogen.sh 2006-05-02 01:43:21.890625000 -0400
@@ -21,6 +21,22 @@
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
aclocal
+
+libtoolize --automake --copy --force
+
+## HACK: because we don't actually USE libtool in top-level configure.ac,
+## but libtoolize must be invoked at the toplevel, m4/libtool.m4
+## does not get updated. So, manually copy...
+aclocaldir=/usr/share/aclocal/
+libtool_m4=libtool.m4
+cd m4
+if { ( cd $aclocaldir 2>/dev/null && tar chf - $libtool_m4 2>/dev/null; ) \
+ | (umask 0 && tar xf - > /dev/null 2>&1; ); } ; then :
+elif cp $aclocaldir/$libtool_m4 $libtool_m4 ; then :
+else echo "could not copy \`$aclocaldir/$libtool_m4' to m4/$libtool_m4" 1>&2
+fi
+cd ..
+
autoconf
automake
diff -urN gettext-0.15-pre2-orig/gettext-runtime/config.h.in
gettext-0.15-pre2/gettext-runtime/config.h.in
--- gettext-0.15-pre2-orig/gettext-runtime/config.h.in 2006-04-20
09:26:00.000000000 -0400
+++ gettext-0.15-pre2/gettext-runtime/config.h.in 2006-05-02
02:38:49.890625000 -0400
@@ -526,11 +526,20 @@
/* On Windows, variables that may be in a DLL must be marked specially. */
-#if (defined _MSC_VER && defined _DLL) || (defined __MINGW32__ && defined
DLL_EXPORT)
+#if (defined _MSC_VER && defined _DLL) || ((defined __MINGW32__ || defined
__CYGWIN__) && defined DLL_EXPORT)
# define DLL_VARIABLE __declspec (dllimport)
#else
# define DLL_VARIABLE
#endif
+/* Shouldn't use DLL_VARIABLE directly; see gettext-tools/configure.ac
+ for example of defining per-library-specific macros. However, because
+ libgrt (always static) builds some files from gettext-tools/lib and
+ gettext-tools/src, we must ensure that those per-library-specific
+ macros are defined here, for gettext-runtime */
+#define LIBGETTEXTSRC_DLL_VARIABLE
+#define LIBGETTEXTLIB_DLL_VARIABLE
+
+
/* Extra OS/2 (emx+gcc) defines. */
#ifdef __EMX__
diff -urN gettext-0.15-pre2-orig/gettext-runtime/configure.ac
gettext-0.15-pre2/gettext-runtime/configure.ac
--- gettext-0.15-pre2-orig/gettext-runtime/configure.ac 2006-04-03
07:27:40.000000000 -0400
+++ gettext-0.15-pre2/gettext-runtime/configure.ac 2006-05-02
02:12:35.093750000 -0400
@@ -107,11 +107,20 @@
dnl Put some default definitions into config.h.
AH_BOTTOM([
/* On Windows, variables that may be in a DLL must be marked specially. */
-#if (defined _MSC_VER && defined _DLL) || (defined __MINGW32__ && defined
DLL_EXPORT)
+#if (defined _MSC_VER && defined _DLL) || ((defined __MINGW32__ || defined
__CYGWIN__) && defined DLL_EXPORT)
# define DLL_VARIABLE __declspec (dllimport)
#else
# define DLL_VARIABLE
#endif
+/* Shouldn't use DLL_VARIABLE directly; see gettext-tools/configure.ac
+ for example of defining per-library-specific macros. However, because
+ libgrt (always static) builds some files from gettext-tools/lib and
+ gettext-tools/src, we must ensure that those per-library-specific
+ macros are defined here, for gettext-runtime */
+#define LIBGETTEXTSRC_DLL_VARIABLE
+#define LIBGETTEXTLIB_DLL_VARIABLE
+
+
/* Extra OS/2 (emx+gcc) defines. */
#ifdef __EMX__
diff -urN gettext-0.15-pre2-orig/gettext-runtime/libasprintf/configure.ac
gettext-0.15-pre2/gettext-runtime/libasprintf/configure.ac
--- gettext-0.15-pre2-orig/gettext-runtime/libasprintf/configure.ac
2005-12-05 06:55:30.000000000 -0500
+++ gettext-0.15-pre2/gettext-runtime/libasprintf/configure.ac 2006-05-02
03:02:17.890625000 -0400
@@ -42,6 +42,7 @@
AC_PROG_LIBTOOL
case "$host_os" in
beos*) LTNOUNDEF='-no-undefined' ;;
+ *mingw* | *cygwin* ) LTNOUNDEF='-no-undefined' ;;
*) LTNOUNDEF='' ;;
esac
AC_SUBST([LTNOUNDEF])
diff -urN gettext-0.15-pre2-orig/gettext-tools/Makefile.am
gettext-0.15-pre2/gettext-tools/Makefile.am
--- gettext-0.15-pre2-orig/gettext-tools/Makefile.am 2006-04-20
09:24:32.000000000 -0400
+++ gettext-0.15-pre2/gettext-tools/Makefile.am 2006-05-02 02:23:35.781250000
-0400
@@ -231,8 +231,12 @@
< $(srcdir)/config.h.in > $@
windows/stdbool.h: lib/stdbool_.h
+ if [ ! -d $(top_builddir)/windows ] ; then \
+ mkdir -p $(top_builddir)/windows ; \
+ fi
sed -e 's/@''HAVE__BOOL''@/0/' < $(srcdir)/lib/stdbool_.h > $@
+
all-local : windows/stdbool.h
EXTRA_DIST += README.woe32 Makefile.msvc config.h.msvc windows/alloca.h
windows/fnmatch.h windows/getopt.h windows/stdbool.h windows/gettextlib.def
windows/gettextsrc.def windows/gettextpo.def windows/gettextlib.rc
windows/gettextsrc.rc windows/gettextpo.rc
diff -urN gettext-0.15-pre2-orig/gettext-tools/config.h.in
gettext-0.15-pre2/gettext-tools/config.h.in
--- gettext-0.15-pre2-orig/gettext-tools/config.h.in 2006-04-20
09:26:47.000000000 -0400
+++ gettext-0.15-pre2/gettext-tools/config.h.in 2006-05-02 02:39:35.406250000
-0400
@@ -815,11 +815,35 @@
#define PAGE_WIDTH 79
/* On Windows, variables that may be in a DLL must be marked specially. */
-#if (defined _MSC_VER && defined _DLL) || (defined __MINGW32__ && defined
DLL_EXPORT)
+#if (defined _MSC_VER && defined _DLL) || ((defined __MINGW32__ || defined
__CYGWIN__) && defined DLL_EXPORT)
+/* However, note that we are actually using _DLL and DLL_EXPORT in a
non-standard way.
+ These symbols are only defined if *THIS* target is a shared library.
However,
+ we do not need to mark symbols with dllexport -- it's dllimport that is a
problem.
+ For mingw/cygwin, it works like this: DLL_EXPORT is defined by libtool
whenever
+ it builds a PIC object. It builds PIC objects when compiling objects for a
+ DLL. With some automake magic, we also define DLL_EXPORT when compiling the
+ program_SOURCES but only if we know we will be linking them to DLLs. In
this
+ way, we use DLL_EXPORT to indicate that *LINKED-TO* objects are DLLs, so
THEIR
+ symbols (not mine) should be decorated with dllimport. It works similarly
with
+ the _DLL symbol and MSVC.
+ */
# define DLL_VARIABLE __declspec (dllimport)
#else
# define DLL_VARIABLE
#endif
+#if defined(BUILDING_LIBGETTEXTSRC)
+# define LIBGETTEXTSRC_DLL_VARIABLE
+#else
+/* if not building libgettextsrc, then decorate my variables for use by others
*/
+# define LIBGETTEXTSRC_DLL_VARIABLE DLL_VARIABLE
+#endif
+#if defined(BUILDING_LIBGETTEXTLIB)
+# define LIBGETTEXTLIB_DLL_VARIABLE
+#else
+/* if not building libgettextlib, then decorate my variables for use by others
*/
+# define LIBGETTEXTLIB_DLL_VARIABLE DLL_VARIABLE
+#endif
+
/* Extra OS/2 (emx+gcc) defines. */
#ifdef __EMX__
diff -urN gettext-0.15-pre2-orig/gettext-tools/configure.ac
gettext-0.15-pre2/gettext-tools/configure.ac
--- gettext-0.15-pre2-orig/gettext-tools/configure.ac 2006-04-20
09:24:32.000000000 -0400
+++ gettext-0.15-pre2/gettext-tools/configure.ac 2006-05-02
02:20:02.656250000 -0400
@@ -99,6 +99,7 @@
AC_PROG_LIBTOOL
case "$host_os" in
beos*) LTNOUNDEF='-no-undefined' ;;
+ *mingw* | *cygwin* ) LTNOUNDEF='-no-undefined' ;;
*) LTNOUNDEF='' ;;
esac
AC_SUBST([LTNOUNDEF])
@@ -201,13 +202,23 @@
gt_PREREQ_HOSTNAME
-dnl Compilation on mingw needs special Makefile rules, because of variables
-dnl being exported from or imported into shared libraries.
+dnl Compilation on mingw or cygwin needs special Makefile rules, because of
+dnl variables being exported from or imported into shared libraries.
case "$host_os" in
- mingw*) is_mingw=yes ;;
- *) is_mingw=no ;;
+ mingw* | cygwin* )
+ is_woe32gcc=yes
+ if test "$enable_shared" = yes ; then
+ woe32gcc_with_shlibs=yes
+ else
+ woe32gcc_with_shlibs=no
+ fi
+ ;;
+ *) is_woe32gcc=no
+ woe32gcc_with_shlibs=no
+ ;;
esac
-AM_CONDITIONAL([MINGW], [test $is_mingw = yes])
+AM_CONDITIONAL([WOE32GCC], [test $is_woe32gcc = yes])
+AM_CONDITIONAL([WOE32GCC_SHLIBS], [test $woe32gcc_with_shlibs = yes])
dnl Put some default definitions into config.h.
AH_TOP([
@@ -240,11 +251,35 @@
#define PAGE_WIDTH 79
/* On Windows, variables that may be in a DLL must be marked specially. */
-#if (defined _MSC_VER && defined _DLL) || (defined __MINGW32__ && defined
DLL_EXPORT)
+#if (defined _MSC_VER && defined _DLL) || ((defined __MINGW32__ || defined
__CYGWIN__) && defined DLL_EXPORT)
+/* However, note that we are actually using _DLL and DLL_EXPORT in a
non-standard way.
+ These symbols are only defined if *THIS* target is a shared library.
However,
+ we do not need to mark symbols with dllexport -- it's dllimport that is a
problem.
+ For mingw/cygwin, it works like this: DLL_EXPORT is defined by libtool
whenever
+ it builds a PIC object. It builds PIC objects when compiling objects for a
+ DLL. With some automake magic, we also define DLL_EXPORT when compiling the
+ program_SOURCES but only if we know we will be linking them to DLLs. In
this
+ way, we use DLL_EXPORT to indicate that *LINKED-TO* objects are DLLs, so
THEIR
+ symbols (not mine) should be decorated with dllimport. It works similarly
with
+ the _DLL symbol and MSVC.
+ */
# define DLL_VARIABLE __declspec (dllimport)
#else
# define DLL_VARIABLE
#endif
+#if defined(BUILDING_LIBGETTEXTSRC)
+# define LIBGETTEXTSRC_DLL_VARIABLE
+#else
+/* if not building libgettextsrc, then decorate my variables for use by others
*/
+# define LIBGETTEXTSRC_DLL_VARIABLE DLL_VARIABLE
+#endif
+#if defined(BUILDING_LIBGETTEXTLIB)
+# define LIBGETTEXTLIB_DLL_VARIABLE
+#else
+/* if not building libgettextlib, then decorate my variables for use by others
*/
+# define LIBGETTEXTLIB_DLL_VARIABLE DLL_VARIABLE
+#endif
+
/* Extra OS/2 (emx+gcc) defines. */
#ifdef __EMX__
diff -urN gettext-0.15-pre2-orig/gettext-tools/examples/Makefile.am
gettext-0.15-pre2/gettext-tools/examples/Makefile.am
diff -urN gettext-0.15-pre2-orig/gettext-tools/lib/Makefile.am
gettext-0.15-pre2/gettext-tools/lib/Makefile.am
--- gettext-0.15-pre2-orig/gettext-tools/lib/Makefile.am 2006-04-19
07:40:28.000000000 -0400
+++ gettext-0.15-pre2/gettext-tools/lib/Makefile.am 2006-05-02
02:23:54.328125000 -0400
@@ -125,6 +125,7 @@
libgettextlib_la_LDFLAGS = \
-release @VERSION@ \
@LTLIBINTL@ @LTLIBICONV@ -lc @LTNOUNDEF@
+libgettextlib_la_CFLAGS = -DBUILDING_LIBGETTEXTLIB $(AM_CFLAGS)
# No need to install libgettextlib.a, except on AIX.
install-exec-local: install-libLTLIBRARIES install-exec-clean
diff -urN gettext-0.15-pre2-orig/gettext-tools/lib/argmatch.h
gettext-0.15-pre2/gettext-tools/lib/argmatch.h
--- gettext-0.15-pre2-orig/gettext-tools/lib/argmatch.h 2005-05-20
17:06:01.000000000 -0400
+++ gettext-0.15-pre2/gettext-tools/lib/argmatch.h 2006-05-02
02:34:44.515625000 -0400
@@ -59,7 +59,7 @@
return. By default, this is a function that calls ARGMATCH_DIE which
in turn defaults to `exit (exit_failure)'. */
typedef void (*argmatch_exit_fn) (void);
-extern DLL_VARIABLE argmatch_exit_fn argmatch_die;
+extern LIBGETTEXTLIB_DLL_VARIABLE argmatch_exit_fn argmatch_die;
/* Report on stderr why argmatch failed. Report correct values. */
diff -urN gettext-0.15-pre2-orig/gettext-tools/lib/backupfile.h
gettext-0.15-pre2/gettext-tools/lib/backupfile.h
--- gettext-0.15-pre2-orig/gettext-tools/lib/backupfile.h 2005-05-20
17:06:01.000000000 -0400
+++ gettext-0.15-pre2/gettext-tools/lib/backupfile.h 2006-05-02
02:34:44.640625000 -0400
@@ -47,7 +47,7 @@
|| (Type) == numbered_existing \
|| (Type) == numbered)
-extern DLL_VARIABLE char const *simple_backup_suffix;
+extern LIBGETTEXTLIB_DLL_VARIABLE char const *simple_backup_suffix;
extern char *find_backup_file_name (char const *file,
enum backup_type backup_type);
diff -urN gettext-0.15-pre2-orig/gettext-tools/lib/error-progname.h
gettext-0.15-pre2/gettext-tools/lib/error-progname.h
--- gettext-0.15-pre2-orig/gettext-tools/lib/error-progname.h 2005-05-20
17:06:02.000000000 -0400
+++ gettext-0.15-pre2/gettext-tools/lib/error-progname.h 2006-05-02
02:34:44.734375000 -0400
@@ -38,7 +38,7 @@
Default is true.
A reason to omit the prefix is for better interoperability with Emacs'
compile.el. */
-extern DLL_VARIABLE bool error_with_progname;
+extern LIBGETTEXTLIB_DLL_VARIABLE bool error_with_progname;
/* Print program_name prefix on stderr if and only if error_with_progname
is true. */
diff -urN gettext-0.15-pre2-orig/gettext-tools/lib/error.h
gettext-0.15-pre2/gettext-tools/lib/error.h
--- gettext-0.15-pre2-orig/gettext-tools/lib/error.h 2005-05-20
17:06:02.000000000 -0400
+++ gettext-0.15-pre2/gettext-tools/lib/error.h 2006-05-02 02:34:44.843750000
-0400
@@ -50,14 +50,14 @@
/* If NULL, error will flush stdout, then print on stderr the program
name, a colon and a space. Otherwise, error will call this
function without parameters instead. */
-extern DLL_VARIABLE void (*error_print_progname) (void);
+extern LIBGETTEXTLIB_DLL_VARIABLE void (*error_print_progname) (void);
/* This variable is incremented each time `error' is called. */
-extern DLL_VARIABLE unsigned int error_message_count;
+extern LIBGETTEXTLIB_DLL_VARIABLE unsigned int error_message_count;
/* Sometimes we want to have at most one error per line. This
variable controls whether this mode is selected or not. */
-extern DLL_VARIABLE int error_one_per_line;
+extern LIBGETTEXTLIB_DLL_VARIABLE int error_one_per_line;
#ifdef __cplusplus
}
diff -urN gettext-0.15-pre2-orig/gettext-tools/lib/exitfail.h
gettext-0.15-pre2/gettext-tools/lib/exitfail.h
--- gettext-0.15-pre2-orig/gettext-tools/lib/exitfail.h 2005-05-20
17:06:02.000000000 -0400
+++ gettext-0.15-pre2/gettext-tools/lib/exitfail.h 2006-05-02
02:34:44.968750000 -0400
@@ -17,4 +17,4 @@
If not, write to the Free Software Foundation,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
-extern DLL_VARIABLE int volatile exit_failure;
+extern LIBGETTEXTLIB_DLL_VARIABLE int volatile exit_failure;
diff -urN gettext-0.15-pre2-orig/gettext-tools/lib/getopt_.h
gettext-0.15-pre2/gettext-tools/lib/getopt_.h
--- gettext-0.15-pre2-orig/gettext-tools/lib/getopt_.h 2005-10-10
07:00:57.000000000 -0400
+++ gettext-0.15-pre2/gettext-tools/lib/getopt_.h 2006-05-02
02:34:45.031250000 -0400
@@ -121,7 +121,7 @@
Also, when `ordering' is RETURN_IN_ORDER,
each non-option ARGV-element is returned here. */
-extern DLL_VARIABLE char *optarg;
+extern LIBGETTEXTLIB_DLL_VARIABLE char *optarg;
/* Index in ARGV of the next element to be scanned.
This is used for communication to and from the caller
@@ -135,16 +135,16 @@
Otherwise, `optind' communicates from one call to the next
how much of ARGV has been scanned so far. */
-extern DLL_VARIABLE int optind;
+extern LIBGETTEXTLIB_DLL_VARIABLE int optind;
/* Callers store zero here to inhibit the error message `getopt' prints
for unrecognized options. */
-extern DLL_VARIABLE int opterr;
+extern LIBGETTEXTLIB_DLL_VARIABLE int opterr;
/* Set to an option character which was unrecognized. */
-extern DLL_VARIABLE int optopt;
+extern LIBGETTEXTLIB_DLL_VARIABLE int optopt;
#ifndef __need_getopt
/* Describe the long-named options requested by the application.
diff -urN gettext-0.15-pre2-orig/gettext-tools/lib/obstack.h
gettext-0.15-pre2/gettext-tools/lib/obstack.h
--- gettext-0.15-pre2-orig/gettext-tools/lib/obstack.h 2005-05-20
17:06:02.000000000 -0400
+++ gettext-0.15-pre2/gettext-tools/lib/obstack.h 2006-05-02
02:34:45.125000000 -0400
@@ -197,10 +197,10 @@
more memory. This can be set to a user defined function which
should either abort gracefully or use longjump - but shouldn't
return. The default action is to print a message and abort. */
-extern DLL_VARIABLE void (*obstack_alloc_failed_handler) (void);
+extern LIBGETTEXTLIB_DLL_VARIABLE void (*obstack_alloc_failed_handler) (void);
/* Exit value used when `print_and_abort' is used. */
-extern DLL_VARIABLE int obstack_exit_failure;
+extern LIBGETTEXTLIB_DLL_VARIABLE int obstack_exit_failure;
/* Pointer to beginning of object being allocated or to be allocated next.
Note that this might not be the final address of the object
diff -urN gettext-0.15-pre2-orig/gettext-tools/lib/progname.h
gettext-0.15-pre2/gettext-tools/lib/progname.h
--- gettext-0.15-pre2-orig/gettext-tools/lib/progname.h 2005-05-20
17:06:02.000000000 -0400
+++ gettext-0.15-pre2/gettext-tools/lib/progname.h 2006-05-02
02:34:45.218750000 -0400
@@ -30,7 +30,7 @@
/* String containing name the program is called with. */
-extern DLL_VARIABLE const char *program_name;
+extern LIBGETTEXTLIB_DLL_VARIABLE const char *program_name;
/* Set program_name, based on argv[0]. */
extern void set_program_name (const char *argv0);
diff -urN gettext-0.15-pre2-orig/gettext-tools/lib/progreloc.c
gettext-0.15-pre2/gettext-tools/lib/progreloc.c
--- gettext-0.15-pre2-orig/gettext-tools/lib/progreloc.c 2005-12-29
12:22:55.000000000 -0500
+++ gettext-0.15-pre2/gettext-tools/lib/progreloc.c 2006-05-02
01:20:25.578125000 -0400
@@ -91,7 +91,7 @@
static bool
maybe_executable (const char *filename)
{
-#if !defined WIN32
+#if (!defined WIN32) || defined __CYGWIN__
if (access (filename, X_OK) < 0)
return false;
diff -urN gettext-0.15-pre2-orig/gettext-tools/libgrep/Makefile.am
gettext-0.15-pre2/gettext-tools/libgrep/Makefile.am
--- gettext-0.15-pre2-orig/gettext-tools/libgrep/Makefile.am 2005-05-20
17:06:02.000000000 -0400
+++ gettext-0.15-pre2/gettext-tools/libgrep/Makefile.am 2006-05-02
02:24:01.140625000 -0400
@@ -49,6 +49,13 @@
AM_CPPFLAGS = -I.. -I../lib -I$(top_srcdir)/lib -I../intl
+if WOE32GCC_SHLIBS
+ PROGCPPFLAGSEX = -DDLL_EXPORT -D_DLL
+else
+ PROGCPPFLAGSEX =
+endif
+libgrep_a_CPPFLAGS = $(PROGCPPFLAGSEX) $(AM_CPPFLAGS)
+
# VMS support.
diff -urN gettext-0.15-pre2-orig/gettext-tools/src/Makefile.am
gettext-0.15-pre2/gettext-tools/src/Makefile.am
--- gettext-0.15-pre2-orig/gettext-tools/src/Makefile.am 2006-03-29
06:29:20.000000000 -0500
+++ gettext-0.15-pre2/gettext-tools/src/Makefile.am 2006-05-02
02:30:12.343750000 -0400
@@ -91,11 +91,16 @@
CSHARPCOMP = $(SHELL) ../lib/csharpcomp.sh
CSHARPCOMPFLAGS = @CSHARPCOMPFLAGS@
-# Linking with C++ libraries is needed _only_ on mingw.
-if !MINGW
address@hidden@CXXLINK = $(LINK)
+# Linking with C++ libraries is needed _only_ on mingw and cygwin
+if !WOE32GCC
address@hidden@CXXLINK = $(LINK)
endif
+if WOE32GCC_SHLIBS
+ PROGCPPFLAGSEX = -DDLL_EXPORT -D_DLL
+else
+ PROGCPPFLAGSEX =
+endif
# All programs deal with message lists.
# All programs must read PO files. (msgunfmt also, for read-java.c,
@@ -143,7 +148,7 @@
msgfmt_SOURCES += \
write-mo.c write-java.c write-csharp.c write-resources.c write-tcl.c \
write-qt.c ../../gettext-runtime/intl/hash-string.c
-if !MINGW
+if !WOE32GCC
msgmerge_SOURCES = msgmerge.c
else
msgmerge_SOURCES = ../mingw/c++msgmerge.cc
@@ -152,7 +157,7 @@
msgunfmt_SOURCES = msgunfmt.c
msgunfmt_SOURCES += \
read-mo.c read-java.c read-csharp.c read-resources.c read-tcl.c
-if !MINGW
+if !WOE32GCC
xgettext_SOURCES = xgettext.c
else
xgettext_SOURCES = ../mingw/c++xgettext.cc
@@ -161,46 +166,46 @@
x-c.c x-po.c x-sh.c x-python.c x-lisp.c x-elisp.c x-librep.c x-scheme.c \
x-smalltalk.c x-java.c x-csharp.c x-awk.c x-ycp.c x-tcl.c x-perl.c x-php.c \
x-rst.c x-glade.c
-if !MINGW
+if !WOE32GCC
msgattrib_SOURCES = msgattrib.c
else
msgattrib_SOURCES = ../mingw/c++msgattrib.cc
endif
-if !MINGW
+if !WOE32GCC
msgcat_SOURCES = msgcat.c
else
msgcat_SOURCES = ../mingw/c++msgcat.cc
endif
-if !MINGW
+if !WOE32GCC
msgcomm_SOURCES = msgcomm.c
else
msgcomm_SOURCES = ../mingw/c++msgcomm.cc
endif
-if !MINGW
+if !WOE32GCC
msgconv_SOURCES = msgconv.c
else
msgconv_SOURCES = ../mingw/c++msgconv.cc
endif
-if !MINGW
+if !WOE32GCC
msgen_SOURCES = msgen.c
else
msgen_SOURCES = ../mingw/c++msgen.cc
endif
msgexec_SOURCES = msgexec.c
-if !MINGW
+if !WOE32GCC
msgfilter_SOURCES = msgfilter.c
else
msgfilter_SOURCES = ../mingw/c++msgfilter.cc
endif
msgfilter_SOURCES += filter-sr-latin.c
-if !MINGW
+if !WOE32GCC
msggrep_SOURCES = msggrep.c
else
msggrep_SOURCES = ../mingw/c++msggrep.cc
endif
msginit_SOURCES = msginit.c
msginit_SOURCES += lang-table.c plural-count.c
../../gettext-runtime/intl/localealias.c
-if !MINGW
+if !WOE32GCC
msguniq_SOURCES = msguniq.c
else
msguniq_SOURCES = ../mingw/c++msguniq.cc
@@ -217,14 +222,15 @@
libgettextsrc_la_LDFLAGS = \
-release @VERSION@ \
../lib/libgettextlib.la @LTLIBINTL@ @LTLIBICONV@ -lc @LTNOUNDEF@
+libgettextsrc_la_CFLAGS = -DBUILDING_LIBGETTEXTSRC $(AM_CFLAGS)
# Special rules for mingw.
-if MINGW
+if WOE32GCC
format_CFLAGS = -x c++
# Work around an automake 1.9 bug: *_CFLAGS settings are ignored for elements
# of a libtool library.
format.lo: format.c
- $(LTCOMPILE) $(format_CFLAGS) -c -o format.lo format.c
+ $(LTCOMPILE) $(format_CFLAGS) -c -o format.lo `test -f 'format.c' ||
echo '$(srcdir)/'`format.c
endif
# No need to install libgettextsrc.a, except on AIX.
@@ -268,24 +274,24 @@
recode_sr_latin_LDADD = ../lib/libgettextlib.la @INTL_MACOSX_LIBS@
# Specify installation directory, for --enable-relocatable.
-msgcmp_CPPFLAGS = $(AM_CPPFLAGS) -DINSTALLDIR=\"$(bindir)\"
-msgfmt_CPPFLAGS = $(AM_CPPFLAGS) -DINSTALLDIR=\"$(bindir)\"
-msgmerge_CPPFLAGS = $(AM_CPPFLAGS) -DINSTALLDIR=\"$(bindir)\"
-msgunfmt_CPPFLAGS = $(AM_CPPFLAGS) -DINSTALLDIR=\"$(bindir)\"
-xgettext_CPPFLAGS = $(AM_CPPFLAGS) -DINSTALLDIR=\"$(bindir)\"
-msgattrib_CPPFLAGS = $(AM_CPPFLAGS) -DINSTALLDIR=\"$(bindir)\"
-msgcat_CPPFLAGS = $(AM_CPPFLAGS) -DINSTALLDIR=\"$(bindir)\"
-msgcomm_CPPFLAGS = $(AM_CPPFLAGS) -DINSTALLDIR=\"$(bindir)\"
-msgconv_CPPFLAGS = $(AM_CPPFLAGS) -DINSTALLDIR=\"$(bindir)\"
-msgen_CPPFLAGS = $(AM_CPPFLAGS) -DINSTALLDIR=\"$(bindir)\"
-msgexec_CPPFLAGS = $(AM_CPPFLAGS) -DINSTALLDIR=\"$(bindir)\"
-msgfilter_CPPFLAGS = $(AM_CPPFLAGS) -DINSTALLDIR=\"$(bindir)\"
-msggrep_CPPFLAGS = $(AM_CPPFLAGS) -DINSTALLDIR=\"$(bindir)\"
-msginit_CPPFLAGS = $(AM_CPPFLAGS) -DINSTALLDIR=\"$(bindir)\"
-msguniq_CPPFLAGS = $(AM_CPPFLAGS) -DINSTALLDIR=\"$(bindir)\"
-recode_sr_latin_CPPFLAGS = $(AM_CPPFLAGS) -DINSTALLDIR=\"$(bindir)\"
-hostname_CPPFLAGS = $(AM_CPPFLAGS) -DINSTALLDIR=\"$(pkglibdir)\"
-urlget_CPPFLAGS = $(AM_CPPFLAGS) -DINSTALLDIR=\"$(pkglibdir)\"
+msgcmp_CPPFLAGS = $(PROGCPPFLAGSEX) $(AM_CPPFLAGS) -DINSTALLDIR=\"$(bindir)\"
+msgfmt_CPPFLAGS = $(PROGCPPFLAGSEX) $(AM_CPPFLAGS) -DINSTALLDIR=\"$(bindir)\"
+msgmerge_CPPFLAGS = $(PROGCPPFLAGSEX) $(AM_CPPFLAGS) -DINSTALLDIR=\"$(bindir)\"
+msgunfmt_CPPFLAGS = $(PROGCPPFLAGSEX) $(AM_CPPFLAGS) -DINSTALLDIR=\"$(bindir)\"
+xgettext_CPPFLAGS = $(PROGCPPFLAGSEX) $(AM_CPPFLAGS) -DINSTALLDIR=\"$(bindir)\"
+msgattrib_CPPFLAGS = $(PROGCPPFLAGSEX) $(AM_CPPFLAGS)
-DINSTALLDIR=\"$(bindir)\"
+msgcat_CPPFLAGS = $(PROGCPPFLAGSEX) $(AM_CPPFLAGS) -DINSTALLDIR=\"$(bindir)\"
+msgcomm_CPPFLAGS = $(PROGCPPFLAGSEX) $(AM_CPPFLAGS) -DINSTALLDIR=\"$(bindir)\"
+msgconv_CPPFLAGS = $(PROGCPPFLAGSEX) $(AM_CPPFLAGS) -DINSTALLDIR=\"$(bindir)\"
+msgen_CPPFLAGS = $(PROGCPPFLAGSEX) $(AM_CPPFLAGS) -DINSTALLDIR=\"$(bindir)\"
+msgexec_CPPFLAGS = $(PROGCPPFLAGSEX) $(AM_CPPFLAGS) -DINSTALLDIR=\"$(bindir)\"
+msgfilter_CPPFLAGS = $(PROGCPPFLAGSEX) $(AM_CPPFLAGS)
-DINSTALLDIR=\"$(bindir)\"
+msggrep_CPPFLAGS = $(PROGCPPFLAGSEX) $(AM_CPPFLAGS) -DINSTALLDIR=\"$(bindir)\"
+msginit_CPPFLAGS = $(PROGCPPFLAGSEX) $(AM_CPPFLAGS) -DINSTALLDIR=\"$(bindir)\"
+msguniq_CPPFLAGS = $(PROGCPPFLAGSEX) $(AM_CPPFLAGS) -DINSTALLDIR=\"$(bindir)\"
+recode_sr_latin_CPPFLAGS = $(PROGCPPFLAGSEX) $(AM_CPPFLAGS)
-DINSTALLDIR=\"$(bindir)\"
+hostname_CPPFLAGS = $(PROGCPPFLAGSEX) $(AM_CPPFLAGS)
-DINSTALLDIR=\"$(pkglibdir)\"
+urlget_CPPFLAGS = $(PROGCPPFLAGSEX) $(AM_CPPFLAGS)
-DINSTALLDIR=\"$(pkglibdir)\"
if RELOCATABLE_VIA_LD
msgcmp_LDFLAGS = `$(RELOCATABLE_LDFLAGS) $(bindir)`
msgfmt_LDFLAGS = `$(RELOCATABLE_LDFLAGS) $(bindir)`
@@ -314,7 +320,7 @@
po-lex.o po-lex.lo: po-gram-gen2.h
po-gram-gen2.h: po-gram-gen.h
- $(SED) -e 's/yy/po_gram_/g' -e 's/extern /extern DLL_VARIABLE /'
$(srcdir)/po-gram-gen.h > address@hidden
+ $(SED) -e 's/yy/po_gram_/g' -e 's/extern /extern
LIBGETTEXTSRC_DLL_VARIABLE /' $(srcdir)/po-gram-gen.h > address@hidden
mv address@hidden $@
diff -urN gettext-0.15-pre2-orig/gettext-tools/src/filters.h
gettext-0.15-pre2/gettext-tools/src/filters.h
--- gettext-0.15-pre2-orig/gettext-tools/src/filters.h 2006-03-27
17:55:36.000000000 -0500
+++ gettext-0.15-pre2/gettext-tools/src/filters.h 2006-05-02
02:34:45.281250000 -0400
@@ -17,6 +17,10 @@
#include <stddef.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* Convert a string INPUT of INPUT_LEN bytes containing Serbian input
to Latin script (not Latin language :-)), converting Cyrillic letters to
Latin letters.
@@ -25,3 +29,8 @@
Input and output are in UTF-8 encoding. */
extern void serbian_to_latin (const char *input, size_t input_len,
char **output_p, size_t *output_len_p);
+
+#ifdef __cplusplus
+}
+#endif
+
diff -urN gettext-0.15-pre2-orig/gettext-tools/src/format.h
gettext-0.15-pre2/gettext-tools/src/format.h
--- gettext-0.15-pre2-orig/gettext-tools/src/format.h 2006-02-13
08:06:23.000000000 -0500
+++ gettext-0.15-pre2/gettext-tools/src/format.h 2006-05-02
02:34:45.343750000 -0400
@@ -73,30 +73,30 @@
};
/* Format string parsers, each defined in its own file. */
-extern DLL_VARIABLE struct formatstring_parser formatstring_c;
-extern DLL_VARIABLE struct formatstring_parser formatstring_objc;
-extern DLL_VARIABLE struct formatstring_parser formatstring_sh;
-extern DLL_VARIABLE struct formatstring_parser formatstring_python;
-extern DLL_VARIABLE struct formatstring_parser formatstring_lisp;
-extern DLL_VARIABLE struct formatstring_parser formatstring_elisp;
-extern DLL_VARIABLE struct formatstring_parser formatstring_librep;
-extern DLL_VARIABLE struct formatstring_parser formatstring_scheme;
-extern DLL_VARIABLE struct formatstring_parser formatstring_smalltalk;
-extern DLL_VARIABLE struct formatstring_parser formatstring_java;
-extern DLL_VARIABLE struct formatstring_parser formatstring_csharp;
-extern DLL_VARIABLE struct formatstring_parser formatstring_awk;
-extern DLL_VARIABLE struct formatstring_parser formatstring_pascal;
-extern DLL_VARIABLE struct formatstring_parser formatstring_ycp;
-extern DLL_VARIABLE struct formatstring_parser formatstring_tcl;
-extern DLL_VARIABLE struct formatstring_parser formatstring_perl;
-extern DLL_VARIABLE struct formatstring_parser formatstring_perl_brace;
-extern DLL_VARIABLE struct formatstring_parser formatstring_php;
-extern DLL_VARIABLE struct formatstring_parser formatstring_gcc_internal;
-extern DLL_VARIABLE struct formatstring_parser formatstring_qt;
-extern DLL_VARIABLE struct formatstring_parser formatstring_boost;
+extern LIBGETTEXTSRC_DLL_VARIABLE struct formatstring_parser formatstring_c;
+extern LIBGETTEXTSRC_DLL_VARIABLE struct formatstring_parser formatstring_objc;
+extern LIBGETTEXTSRC_DLL_VARIABLE struct formatstring_parser formatstring_sh;
+extern LIBGETTEXTSRC_DLL_VARIABLE struct formatstring_parser
formatstring_python;
+extern LIBGETTEXTSRC_DLL_VARIABLE struct formatstring_parser formatstring_lisp;
+extern LIBGETTEXTSRC_DLL_VARIABLE struct formatstring_parser
formatstring_elisp;
+extern LIBGETTEXTSRC_DLL_VARIABLE struct formatstring_parser
formatstring_librep;
+extern LIBGETTEXTSRC_DLL_VARIABLE struct formatstring_parser
formatstring_scheme;
+extern LIBGETTEXTSRC_DLL_VARIABLE struct formatstring_parser
formatstring_smalltalk;
+extern LIBGETTEXTSRC_DLL_VARIABLE struct formatstring_parser formatstring_java;
+extern LIBGETTEXTSRC_DLL_VARIABLE struct formatstring_parser
formatstring_csharp;
+extern LIBGETTEXTSRC_DLL_VARIABLE struct formatstring_parser formatstring_awk;
+extern LIBGETTEXTSRC_DLL_VARIABLE struct formatstring_parser
formatstring_pascal;
+extern LIBGETTEXTSRC_DLL_VARIABLE struct formatstring_parser formatstring_ycp;
+extern LIBGETTEXTSRC_DLL_VARIABLE struct formatstring_parser formatstring_tcl;
+extern LIBGETTEXTSRC_DLL_VARIABLE struct formatstring_parser formatstring_perl;
+extern LIBGETTEXTSRC_DLL_VARIABLE struct formatstring_parser
formatstring_perl_brace;
+extern LIBGETTEXTSRC_DLL_VARIABLE struct formatstring_parser formatstring_php;
+extern LIBGETTEXTSRC_DLL_VARIABLE struct formatstring_parser
formatstring_gcc_internal;
+extern LIBGETTEXTSRC_DLL_VARIABLE struct formatstring_parser formatstring_qt;
+extern LIBGETTEXTSRC_DLL_VARIABLE struct formatstring_parser
formatstring_boost;
/* Table of all format string parsers. */
-extern DLL_VARIABLE struct formatstring_parser *formatstring_parsers[NFORMATS];
+extern LIBGETTEXTSRC_DLL_VARIABLE struct formatstring_parser
*formatstring_parsers[NFORMATS];
/* Returns an array of the ISO C 99 <inttypes.h> format directives and other
format flags or directives with a system dependent expansion contained in
diff -urN gettext-0.15-pre2-orig/gettext-tools/src/lang-table.h
gettext-0.15-pre2/gettext-tools/src/lang-table.h
--- gettext-0.15-pre2-orig/gettext-tools/src/lang-table.h 2005-10-09
14:49:56.000000000 -0400
+++ gettext-0.15-pre2/gettext-tools/src/lang-table.h 2006-05-02
02:34:45.406250000 -0400
@@ -27,7 +27,7 @@
const char *english;
};
-extern DLL_VARIABLE struct language_table_entry language_table[];
-extern DLL_VARIABLE const size_t language_table_size;
+extern struct language_table_entry language_table[];
+extern const size_t language_table_size;
#endif /* _LANG_TABLE_H */
diff -urN gettext-0.15-pre2-orig/gettext-tools/src/message.h
gettext-0.15-pre2/gettext-tools/src/message.h
--- gettext-0.15-pre2-orig/gettext-tools/src/message.h 2006-03-13
07:25:14.000000000 -0500
+++ gettext-0.15-pre2/gettext-tools/src/message.h 2006-05-02
02:34:45.437500000 -0400
@@ -67,8 +67,8 @@
format_boost
};
#define NFORMATS 21 /* Number of format_type enum values. */
-extern DLL_VARIABLE const char *const format_language[NFORMATS];
-extern DLL_VARIABLE const char *const format_language_pretty[NFORMATS];
+extern LIBGETTEXTSRC_DLL_VARIABLE const char *const format_language[NFORMATS];
+extern LIBGETTEXTSRC_DLL_VARIABLE const char *const
format_language_pretty[NFORMATS];
/* Is current msgid a format string? */
enum is_format
diff -urN gettext-0.15-pre2-orig/gettext-tools/src/msgl-cat.h
gettext-0.15-pre2/gettext-tools/src/msgl-cat.h
--- gettext-0.15-pre2-orig/gettext-tools/src/msgl-cat.h 2005-05-20
17:06:04.000000000 -0400
+++ gettext-0.15-pre2/gettext-tools/src/msgl-cat.h 2006-05-02
02:34:45.546875000 -0400
@@ -31,20 +31,20 @@
/* These variables control which messages are selected. */
-extern DLL_VARIABLE int more_than;
-extern DLL_VARIABLE int less_than;
+extern LIBGETTEXTSRC_DLL_VARIABLE int more_than;
+extern LIBGETTEXTSRC_DLL_VARIABLE int less_than;
/* If true, use the first available translation.
If false, merge all available translations into one and fuzzy it. */
-extern DLL_VARIABLE bool use_first;
+extern LIBGETTEXTSRC_DLL_VARIABLE bool use_first;
/* If true, merge like msgcomm.
If false, merge like msgcat and msguniq. */
-extern DLL_VARIABLE bool msgcomm_mode;
+extern LIBGETTEXTSRC_DLL_VARIABLE bool msgcomm_mode;
/* If true, omit the header entry.
If false, keep the header entry present in the input. */
-extern DLL_VARIABLE bool omit_header;
+extern LIBGETTEXTSRC_DLL_VARIABLE bool omit_header;
extern msgdomain_list_ty *
catenate_msgdomain_list (string_list_ty *file_list,
diff -urN gettext-0.15-pre2-orig/gettext-tools/src/plural-table.h
gettext-0.15-pre2/gettext-tools/src/plural-table.h
--- gettext-0.15-pre2-orig/gettext-tools/src/plural-table.h 2005-05-20
17:06:04.000000000 -0400
+++ gettext-0.15-pre2/gettext-tools/src/plural-table.h 2006-05-02
02:34:45.593750000 -0400
@@ -28,7 +28,7 @@
const char *value;
};
-extern DLL_VARIABLE struct plural_table_entry plural_table[];
-extern DLL_VARIABLE const size_t plural_table_size;
+extern LIBGETTEXTSRC_DLL_VARIABLE struct plural_table_entry plural_table[];
+extern LIBGETTEXTSRC_DLL_VARIABLE const size_t plural_table_size;
#endif /* _PLURAL_TABLE_H */
diff -urN gettext-0.15-pre2-orig/gettext-tools/src/po-charset.h
gettext-0.15-pre2/gettext-tools/src/po-charset.h
--- gettext-0.15-pre2-orig/gettext-tools/src/po-charset.h 2006-03-13
07:25:14.000000000 -0500
+++ gettext-0.15-pre2/gettext-tools/src/po-charset.h 2006-05-02
02:34:45.671875000 -0400
@@ -38,10 +38,10 @@
extern const char *po_charset_canonicalize (const char *charset);
/* The canonicalized encoding name for ASCII. */
-extern DLL_VARIABLE const char *po_charset_ascii;
+extern LIBGETTEXTSRC_DLL_VARIABLE const char *po_charset_ascii;
/* The canonicalized encoding name for UTF-8. */
-extern DLL_VARIABLE const char *po_charset_utf8;
+extern LIBGETTEXTSRC_DLL_VARIABLE const char *po_charset_utf8;
/* Test for ASCII compatibility. */
extern bool po_charset_ascii_compatible (const char *canon_charset);
@@ -65,15 +65,15 @@
/* The PO file's encoding, as specified in the header entry. */
-extern DLL_VARIABLE const char *po_lex_charset;
+extern LIBGETTEXTSRC_DLL_VARIABLE const char *po_lex_charset;
#if HAVE_ICONV
/* Converter from the PO file's encoding to UTF-8. */
-extern DLL_VARIABLE iconv_t po_lex_iconv;
+extern LIBGETTEXTSRC_DLL_VARIABLE iconv_t po_lex_iconv;
#endif
/* If no converter is available, some information about the structure of the
PO file's encoding. */
-extern DLL_VARIABLE bool po_lex_weird_cjk;
+extern LIBGETTEXTSRC_DLL_VARIABLE bool po_lex_weird_cjk;
/* Initialize the PO file's encoding. */
extern void po_lex_charset_init (void);
diff -urN gettext-0.15-pre2-orig/gettext-tools/src/po-error.h
gettext-0.15-pre2/gettext-tools/src/po-error.h
--- gettext-0.15-pre2-orig/gettext-tools/src/po-error.h 2005-05-20
17:06:04.000000000 -0400
+++ gettext-0.15-pre2/gettext-tools/src/po-error.h 2006-05-02
02:34:45.734375000 -0400
@@ -30,10 +30,10 @@
- The functions must increment the error_message_count variable declared
in error.h. */
-extern DLL_VARIABLE
+extern LIBGETTEXTSRC_DLL_VARIABLE
void (*po_error) (int status, int errnum,
const char *format, ...);
-extern DLL_VARIABLE
+extern LIBGETTEXTSRC_DLL_VARIABLE
void (*po_error_at_line) (int status, int errnum,
const char *filename, unsigned int lineno,
const char *format, ...);
@@ -43,9 +43,9 @@
- multiline_error must increment the error_message_count variable declared
in error.h if prefix != NULL. */
-extern DLL_VARIABLE
+extern LIBGETTEXTSRC_DLL_VARIABLE
void (*po_multiline_warning) (char *prefix, char *message);
-extern DLL_VARIABLE
+extern LIBGETTEXTSRC_DLL_VARIABLE
void (*po_multiline_error) (char *prefix, char *message);
diff -urN gettext-0.15-pre2-orig/gettext-tools/src/po-gram-gen2.h
gettext-0.15-pre2/gettext-tools/src/po-gram-gen2.h
--- gettext-0.15-pre2-orig/gettext-tools/src/po-gram-gen2.h 2005-10-06
08:00:15.000000000 -0400
+++ gettext-0.15-pre2/gettext-tools/src/po-gram-gen2.h 2006-05-02
03:06:26.125000000 -0400
@@ -25,6 +25,6 @@
# define STRING 266
-extern DLL_VARIABLE YYSTYPE po_gram_lval;
+extern LIBGETTEXTSRC_DLL_VARIABLE YYSTYPE po_gram_lval;
#endif /* not BISON_PO_GRAM_GEN_H */
diff -urN gettext-0.15-pre2-orig/gettext-tools/src/po-lex.h
gettext-0.15-pre2/gettext-tools/src/po-lex.h
--- gettext-0.15-pre2-orig/gettext-tools/src/po-lex.h 2005-09-19
12:00:25.000000000 -0400
+++ gettext-0.15-pre2/gettext-tools/src/po-lex.h 2006-05-02
02:34:45.781250000 -0400
@@ -40,15 +40,15 @@
/* Global variables from po-lex.c. */
/* Current position within the PO file. */
-extern DLL_VARIABLE lex_pos_ty gram_pos;
-extern DLL_VARIABLE int gram_pos_column;
+extern LIBGETTEXTSRC_DLL_VARIABLE lex_pos_ty gram_pos;
+extern LIBGETTEXTSRC_DLL_VARIABLE int gram_pos_column;
/* Number of parse errors within a PO file that cause the program to
terminate. Cf. error_message_count, declared in <error.h>. */
-extern DLL_VARIABLE unsigned int gram_max_allowed_errors;
+extern LIBGETTEXTSRC_DLL_VARIABLE unsigned int gram_max_allowed_errors;
/* True if obsolete entries shall be considered as valid. */
-extern DLL_VARIABLE bool pass_obsolete_entries;
+extern LIBGETTEXTSRC_DLL_VARIABLE bool pass_obsolete_entries;
/* Prepare lexical analysis. */
diff -urN gettext-0.15-pre2-orig/gettext-tools/src/po-xerror.h
gettext-0.15-pre2/gettext-tools/src/po-xerror.h
--- gettext-0.15-pre2-orig/gettext-tools/src/po-xerror.h 2005-09-17
08:18:29.000000000 -0400
+++ gettext-0.15-pre2/gettext-tools/src/po-xerror.h 2006-05-02
02:34:45.843750000 -0400
@@ -44,7 +44,7 @@
multiple lines of text, each terminated with a newline, otherwise
usually a single line).
Must not return if SEVERITY is PO_SEVERITY_FATAL_ERROR. */
-extern DLL_VARIABLE
+extern LIBGETTEXTSRC_DLL_VARIABLE
void (*po_xerror) (int severity,
const struct message_ty *message,
const char *filename, size_t lineno, size_t column,
@@ -54,7 +54,7 @@
Similar to two calls to po_xerror.
If possible, a "..." can be appended to MESSAGE_TEXT1 and prepended to
MESSAGE_TEXT2. */
-extern DLL_VARIABLE
+extern LIBGETTEXTSRC_DLL_VARIABLE
void (*po_xerror2) (int severity,
const struct message_ty *message1,
const char *filename1, size_t lineno1, size_t
column1,
diff -urN gettext-0.15-pre2-orig/gettext-tools/src/read-po.h
gettext-0.15-pre2/gettext-tools/src/read-po.h
--- gettext-0.15-pre2-orig/gettext-tools/src/read-po.h 2005-10-06
07:08:06.000000000 -0400
+++ gettext-0.15-pre2/gettext-tools/src/read-po.h 2006-05-02
02:34:45.890625000 -0400
@@ -154,15 +154,15 @@
/* If nonzero, remember comments for file name and line number for each
msgid, if present in the reference input. Defaults to true. */
-extern DLL_VARIABLE int line_comment;
+extern LIBGETTEXTSRC_DLL_VARIABLE int line_comment;
/* If false, duplicate msgids in the same domain and file generate an error.
If true, such msgids are allowed; the caller should treat them
appropriately. Defaults to false. */
-extern DLL_VARIABLE bool allow_duplicates;
+extern LIBGETTEXTSRC_DLL_VARIABLE bool allow_duplicates;
/* Expected syntax of the input files. */
-extern DLL_VARIABLE input_syntax_ty input_syntax;
+extern LIBGETTEXTSRC_DLL_VARIABLE input_syntax_ty input_syntax;
/* Read the input file from a stream. Returns a list of messages. */
extern msgdomain_list_ty *read_po (FILE *fp, const char *real_filename,
diff -urN gettext-0.15-pre2-orig/gettext-tools/src/write-mo.h
gettext-0.15-pre2/gettext-tools/src/write-mo.h
--- gettext-0.15-pre2-orig/gettext-tools/src/write-mo.h 2005-08-26
07:04:53.000000000 -0400
+++ gettext-0.15-pre2/gettext-tools/src/write-mo.h 2006-05-02
02:34:45.953125000 -0400
@@ -25,13 +25,13 @@
#include "message.h"
/* Alignment of strings in resulting .mo file. */
-extern DLL_VARIABLE size_t alignment;
+extern size_t alignment;
/* True if writing a .mo file in opposite endianness than the host. */
-extern DLL_VARIABLE bool byteswap;
+extern bool byteswap;
/* True if no hash table in .mo is wanted. */
-extern DLL_VARIABLE bool no_hash_table;
+extern bool no_hash_table;
/* Write a GNU mo file. mlp is a list containing the messages to be output.
domain_name is the domain name, file_name is the desired file name.
diff -urN gettext-0.15-pre2-orig/gettext-tools/tests/Makefile.am
gettext-0.15-pre2/gettext-tools/tests/Makefile.am
--- gettext-0.15-pre2-orig/gettext-tools/tests/Makefile.am 2006-03-29
06:29:20.000000000 -0500
+++ gettext-0.15-pre2/gettext-tools/tests/Makefile.am 2006-05-02
02:24:08.734375000 -0400
@@ -179,6 +179,13 @@
-I.. \
-I../lib -I$(top_srcdir)/lib \
-I../intl
+
+if WOE32GCC_SHLIBS
+ PROGCPPFLAGSEX = -DDLL_EXPORT -D_DLL
+else
+ PROGCPPFLAGSEX =
+endif
+
DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
# INTL_MACOSX_LIBS is needed because the programs depend on libintl.la
# but libtool doesn't put -Wl,-framework options into .la files.
@@ -188,35 +195,47 @@
noinst_PROGRAMS = tstgettext tstngettext testlocale gettext-3-prg
gettext-4-prg gettext-5-prg gettext-6-prg gettext-7-prg cake fc3 fc4 fc5
tstgettext_SOURCES = tstgettext.c setlocale.c
tstgettext_CFLAGS = -DINSTALLDIR=\".\"
+tstgettext_CPPFLAGS = $(PROGCPPFLAGSEX) $(AM_CPPFLAGS)
tstgettext_LDADD = ../lib/libgettextlib.la $(LDADD)
tstngettext_SOURCES = tstngettext.c setlocale.c
tstngettext_CFLAGS = -DINSTALLDIR=\".\"
+tstngettext_CPPFLAGS = $(PROGCPPFLAGSEX) $(AM_CPPFLAGS)
tstngettext_LDADD = ../lib/libgettextlib.la $(LDADD)
testlocale_SOURCES = testlocale.c
+testlocale_CPPFLAGS = $(PROGCPPFLAGSEX) $(AM_CPPFLAGS)
gettext_3_prg_SOURCES = gettext-3-prg.c
gettext_3_prg_LDADD = ../lib/libgettextlib.la $(LDADD)
+gettext_3_CPPFLAGS = $(PROGCPPFLAGSEX) $(AM_CPPFLAGS)
gettext_4_prg_SOURCES = gettext-4-prg.c
gettext_4_prg_LDADD = ../lib/libgettextlib.la $(LDADD)
+gettext_4_CPPFLAGS = $(PROGCPPFLAGSEX) $(AM_CPPFLAGS)
gettext_5_prg_SOURCES = gettext-5-prg.c
gettext_5_prg_LDADD = ../lib/libgettextlib.la $(LDADD)
+gettext_5_CPPFLAGS = $(PROGCPPFLAGSEX) $(AM_CPPFLAGS)
gettext_6_prg_SOURCES = gettext-6-prg.c
gettext_6_prg_CFLAGS = $(address@hidden@)
gettext_6_prg_CFLAGS_yes = -DUSE_POSIX_THREADS
+gettext_6_CPPFLAGS = $(PROGCPPFLAGSEX) $(AM_CPPFLAGS)
gettext_6_prg_LDADD = $(address@hidden@)
gettext_6_prg_LDADD_yes = ../lib/libgettextlib.la $(LDADD) -lpthread
gettext_7_prg_SOURCES = gettext-7-prg.c
gettext_7_prg_CFLAGS = $(address@hidden@)
gettext_7_prg_CFLAGS_yes = -DUSE_POSIX_THREADS
+gettext_7_CPPFLAGS = $(PROGCPPFLAGSEX) $(AM_CPPFLAGS)
gettext_7_prg_LDADD = $(address@hidden@)
gettext_7_prg_LDADD_yes = ../lib/libgettextlib.la $(LDADD) -lpthread
cake_SOURCES = plural-1-prg.c setlocale.c
cake_LDADD = ../lib/libgettextlib.la $(LDADD)
+cake_CPPFLAGS = $(PROGCPPFLAGSEX) $(AM_CPPFLAGS)
fc3_SOURCES = format-c-3-prg.c setlocale.c
fc3_LDADD = ../lib/libgettextlib.la $(LDADD)
+fc3_CPPFLAGS = $(PROGCPPFLAGSEX) $(AM_CPPFLAGS)
fc4_SOURCES = format-c-4-prg.c setlocale.c
fc4_LDADD = ../lib/libgettextlib.la $(LDADD)
+fc4_CPPFLAGS = $(PROGCPPFLAGSEX) $(AM_CPPFLAGS)
fc5_SOURCES = format-c-5-prg.c
fc5_LDADD = ../lib/libgettextlib.la $(LDADD)
+fc5_CPPFLAGS = $(PROGCPPFLAGSEX) $(AM_CPPFLAGS)
# Clean up after Solaris cc.
clean-local:
diff -urN -x .build -x .inst -x .sinst -x '*~' libtool-1.5.22-orig/libtool.m4
libtool-1.5.22/libtool.m4
--- libtool-1.5.22-orig/libtool.m4 2005-12-18 16:53:17.000000000 -0500
+++ libtool-1.5.22/libtool.m4 2006-04-19 01:16:17.234375000 -0400
@@ -4838,12 +4838,14 @@
# like `-m68040'.
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32
-malways-restore-a4'
;;
- beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
# PIC is the default for these OSes.
;;
- mingw* | os2* | pw32*)
+ mingw* | cygwin* | os2* | pw32*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
+ # Even tho PIC is default for cygwin, still need this for old-style
+ # (--disable-auto-import) libraries
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
;;
darwin* | rhapsody*)
@@ -5111,13 +5113,15 @@
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32
-malways-restore-a4'
;;
- beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
# PIC is the default for these OSes.
;;
- mingw* | pw32* | os2*)
+ mingw* | cygwin* | pw32* | os2*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
+ # Even tho PIC is default for cygwin, still need this for old-style
+ # (--disable-auto-import) libraries
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
;;
@@ -5185,9 +5189,11 @@
esac
;;
- mingw* | pw32* | os2*)
+ mingw* | cygwin* | pw32* | os2*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
+ # Even tho PIC is default for cygwin, still need this for old-style
+ # (--disable-auto-import) libraries
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
;;
gettext-tools
===================================================================
FAIL 0 SKIP 0 PASS 1 : TOTAL 1
FAIL 2 SKIP 26 PASS 256 : TOTAL 296
FAIL: recode-sr-latin-2
FAIL: gettext-4
SKIP: gettext-3, -5, -6, -7
SKIP: msgunfmt-csharp-1
SKIP: msgunfmt-java-1
SKIP: recode-sr-latin-1
SKIP: lang-* PASS: lang-elisp, lang-ycp
gettext-3: skipped on non-glibc systems
gettext-4: should be skipped if de_DE.ISO-8859-1 locale is not installed
it isn't, so testlocale should fail leading to a SKIP, but it doesn;t
gettext-5: skipped on non-glibc systems
gettext-6: skipped on non-glibc systems
gettext-7: skipped on non-glibc systems
msgunfmt-csharp-1: skipped because csharp not available
msgunfmt-java-1: skipped because java support not built
recode-sr-latin-1: dunno - like gettext-4 it should be skipped
recode-sr-latin-2: ditto
Note that ALL of the lang- tests are now skipped (or, if not skipped,
they should have been skipped). It's not clear why they weren't skipped
in previous releases, as I can't see where the relevant code
(in newlib, or the tests) have changed: cygwin's setlocale() function
checks that the argument is either "C" or "" (or is in a slightly
larger list if cygwin1.dll was compiled with _MB_CAPABLE), and fails
otherwise. The properly-written properly-written lang- tests check
the return value of setlocale, and if it fails (which it does), then
the test itself is skipped.
This is a shame, because the underlying bindtextdomain stuff actually
works and it would be nice to verify that using the testsuite. Oh
well.
gettext-runtime
===================================================================
FAIL 0 SKIP 0 PASS 1 : TOTAL 1
FAIL 0 SKIP 0 PASS 1 : TOTAL 1
gettext-rpath
===================================================================
FAIL 0 SKIP 0 PASS 1 : TOTAL 1
FAIL 6 SKIP 0 PASS 40 : TOTAL 46
FAIL: rpath-2aac
FAIL: rpath-2abc
FAIL: rpath-3aac
FAIL: rpath-3aaf
FAIL: rpath-3abc
FAIL: rpath-3abf
These are known (and expected) failures on cygwin; you can't create
a shared library that depends on a static lib.
- Re: gettext cvs,
Charles Wilson <=
- Re: gettext cvs, Charles Wilson, 2006/05/05
- Re: gettext cvs, Bruno Haible, 2006/05/08
- Re: gettext cvs, woe32 dlls, Bruno Haible, 2006/05/10
- Re: gettext cvs, woe32 dlls, Charles Wilson, 2006/05/10
- Re: gettext cvs, woe32 dlls, Bruno Haible, 2006/05/12
- Re: gettext cvs, woe32 dlls, Charles Wilson, 2006/05/12
- Re: gettext cvs, woe32 dlls, Bruno Haible, 2006/05/15
- Re: gettext cvs, woe32 dlls, Charles Wilson, 2006/05/15
Message not available
Re: gettext cvs, Bruno Haible, 2006/05/12