[Top][All Lists]

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

[patch] gettext-0.15, cygwin

From: Charles Wilson
Subject: [patch] gettext-0.15, cygwin
Date: Sun, 22 Oct 2006 22:21:16 -0400
User-agent: Thunderbird (Windows/20060909)

The attached patch fixes two problems on cygwin:

(1) building out-of-tree fails because the gettext-tools directory in the source tree needs to be in the include path for the gettext-tools/lib and gettext-tools/src subdirectories.

(2) When building relocatable on cygwin, config.h defines DLL_VARIABLE as declspec(dllimport). This is the desired behavior for the main libraries and non-wrapper applications, and works fine thanks to the *.exports magic. However, unlike MSVC and mingw, on cygwin we also build the wrapper exe's.

relocwrapper.c includes config.h -- so via progname.h it gets a definition of the "program_name" variable that is declspec(dllimport). However, install-reloc builds the wrapper by directly compiling all relevant .c files into the wrapper -- therefore the actual symbol is _program_name, not __imp_program_name.

Because relocwrapper is always and only compiled by install-reloc in exactly the same way -- direct compilation of a list of .c's with no dependent librareis -- it should never need to worry about dllimport/dllexport issues. So, after #including config.h but before #including any other headers, the following is safe and effective:



2006-10-21  Charles Wilson  <...>

        * gettext-tools/lib/Makefile.am: add $(srcdir)/.. to -I path
        * gettext-tools/src/Makefile.am: add $(srcdir)/.. to -I path
        * gettext-tools/lib/relocwrapper.c: make sure DLL_VARIABLE is
        defined appropriately.
diff -urN origsrc/gettext-0.15/gettext-tools/lib/Makefile.am 
--- origsrc/gettext-0.15/gettext-tools/lib/Makefile.am  2006-07-14 
09:31:55.000000000 -0400
+++ src/gettext-0.15/gettext-tools/lib/Makefile.am      2006-10-22 
19:59:45.093750000 -0400
@@ -167,7 +167,7 @@
   gen-lbrkprop.c 3level.h Combining.txt \
-AM_CPPFLAGS = -I. -I$(srcdir) -I.. -I../intl -I$(top_srcdir)/intl
+AM_CPPFLAGS = -I. -I$(srcdir) -I.. -I$(srcdir)/.. -I../intl 
 DEFS = \
   -DPKGDATADIR=\"$(pkgdatadir)\" \
diff -urN origsrc/gettext-0.15/gettext-tools/src/Makefile.am 
--- origsrc/gettext-0.15/gettext-tools/src/Makefile.am  2006-07-20 
14:50:33.000000000 -0400
+++ src/gettext-0.15/gettext-tools/src/Makefile.am      2006-10-22 
19:59:45.140625000 -0400
@@ -66,7 +66,7 @@
   -I. -I$(srcdir) \
-  -I.. \
+  -I.. -I$(srcdir)/.. \
   -I$(top_srcdir)/libgrep \
   -I$(top_srcdir)/libuniname \
   -I../lib -I$(top_srcdir)/lib \
diff -urN origsrc/gettext-0.15/gettext-tools/lib/relocwrapper.c 
--- origsrc/gettext-0.15/gettext-tools/lib/relocwrapper.c       2005-12-05 
06:55:31.000000000 -0500
+++ src/gettext-0.15/gettext-tools/lib/relocwrapper.c   2006-10-22 
19:59:45.140625000 -0400
@@ -54,6 +54,8 @@
 #include <errno.h>
 #include "progname.h"
 #include "relocatable.h"
 #include "setenv.h"

reply via email to

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