]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
More Woe32/MSVC support.
authorBruno Haible <bruno@clisp.org>
Mon, 31 Mar 2003 20:02:54 +0000 (20:02 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:10:18 +0000 (12:10 +0200)
gettext-runtime/intl/ChangeLog
gettext-runtime/intl/Makefile.in
gettext-runtime/intl/Makefile.msvc
gettext-runtime/intl/dcigettext.c
gettext-runtime/intl/loadmsgcat.c
gettext-runtime/intl/localealias.c
gettext-runtime/intl/relocatable.h

index 3a075857062189945dace3809370f398d437bb68..e68b8fd570cdb7b321be199aec2bdaa1347f174a 100644 (file)
@@ -1,3 +1,7 @@
+2003-03-30  Bruno Haible  <bruno@clisp.org>
+
+       * Makefile.in (INCLUDES): Mention the current directory first.
+
 2003-03-17  Bruno Haible  <bruno@clisp.org>
 
        Native Woe32/MSVC support.
@@ -5,12 +9,17 @@
        * Makefile.msvc: New file.
        * README.woe32: New file.
        * Makefile.in (HEADERS): Remove libgnuintl.h, add libgnuintl.h.in.
-       (DISTFILES.gettext): Add Makefile.msvc.
+       (DISTFILES.gettext): Add libgnuintl.h.msvc-shared, README.woe32,
+       Makefile.msvc.
        (DISTFILES.obsolete): Add libgnuintl.h.
        (libgnuintl.h): New rule.
        (libintl.h, $(OBJECTS)): Expect libgnuintl.h in builddir, not in
        srcdir.
        (mostlyclean): Also remove libgnuintl.h.
+       * dcigettext.c (alloca): Add support for MSVC.
+       * loadmsgcat.c (alloca): Likewise.
+       * localealias.c (alloca): Likewise.
+       * relocatable.h (RELOCATABLE_DLL_EXPORTED): New macro.
 
        * Makefile.in (loadmsgcat.$lo): Depend on hash-string.h.
 
index 57407e12464a7d8ff6998e5c79771488d7d5a3a0..85fea19a1f3f89a9be5f0a6b5362f143746a6d96 100644 (file)
@@ -123,7 +123,8 @@ DISTFILES.common = Makefile.in \
 config.charset locale.alias ref-add.sin ref-del.sin $(HEADERS) $(SOURCES)
 DISTFILES.generated = plural.c
 DISTFILES.normal = VERSION
-DISTFILES.gettext = COPYING.LIB-2.0 COPYING.LIB-2.1 libintl.glibc Makefile.msvc
+DISTFILES.gettext = COPYING.LIB-2.0 COPYING.LIB-2.1 libintl.glibc \
+libgnuintl.h.msvc-shared README.woe32 Makefile.msvc
 DISTFILES.obsolete = xopen-msg.sed linux-msg.sed po2tbl.sed.in cat-compat.c \
 COPYING.LIB-2 gettext.h libgettext.h plural-eval.c libgnuintl.h
 
@@ -217,7 +218,7 @@ ref-del.sed: $(srcdir)/ref-del.sin
        sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $(srcdir)/ref-del.sin > t-ref-del.sed
        mv t-ref-del.sed ref-del.sed
 
-INCLUDES = -I.. -I. -I$(srcdir)
+INCLUDES = -I. -I$(srcdir) -I..
 
 libgnuintl.h: $(srcdir)/libgnuintl.h.in
        cp $(srcdir)/libgnuintl.h.in libgnuintl.h
index e3801dbba3e989b51e81c90ed57550543e631d6f..69f77220c02916ce19983b8686ad3f07b1a677fa 100644 (file)
@@ -36,6 +36,14 @@ includedir = $(prefix)\include
 datadir = $(prefix)\share
 localedir = $(datadir)\locale
 aliaspath =
+IIprefix = c:\\usr
+IIexec_prefix = $(IIprefix)
+IIbindir = $(IIexec_prefix)\\bin
+IIlibdir = $(IIexec_prefix)\\lib
+IIincludedir = $(IIprefix)\\include
+IIdatadir = $(IIprefix)\\share
+IIlocaledir = $(IIdatadir)\\locale
+IIaliaspath =
 
 # Programs used by "make":
 
@@ -60,9 +68,11 @@ OPTIMFLAGS = -Od -Z7
 OPTIMFLAGS = -D_NDEBUG -O1
 !endif
 
-CFLAGS = $(MFLAGS) $(WARN_CFLAGS) $(OPTIMFLAGS) -DHAVE_CONFIG_H -DLOCALEDIR=\"$(localedir)\" -DLOCALE_ALIAS_PATH=\"$(aliaspath)\" -DIN_LIBINTL -DENABLE_RELOCATABLE=1 -DIN_LIBRARY -DINSTALLDIR=\"$(bindir)\" -DNO_XMALLOC -Dset_relocation_prefix=libintl_set_relocation_prefix -Drelocate=libintl_relocate
+# -DBUILDING_LIBINTL: Change expansion of LIBINTL_DLL_EXPORTED macro.
+# -DBUILDING_DLL: Change expansion of RELOCATABLE_DLL_EXPORTED macro.
+CFLAGS = $(MFLAGS) $(WARN_CFLAGS) $(OPTIMFLAGS) -DHAVE_CONFIG_H -DBUILDING_LIBINTL -DBUILDING_DLL -DLOCALEDIR=\"$(IIlocaledir)\" -DLOCALE_ALIAS_PATH=\"$(IIaliaspath)\" -DIN_LIBINTL -DENABLE_RELOCATABLE=1 -DIN_LIBRARY -DINSTALLDIR=\"$(IIbindir)\" -DNO_XMALLOC -Dset_relocation_prefix=libintl_set_relocation_prefix -Drelocate=libintl_relocate
 
-INCLUDES = -I..
+INCLUDES = -I. -I.. -I$(includedir)
 
 AR = lib
 AR_FLAGS = /out:
@@ -168,7 +178,7 @@ intl.lib : $(OBJECTS)
 
 # intl.dll and intl.lib are created together.
 intl.lib : $(OBJECTS) $(RESOURCES)
-       $(CC) $(MFLAGS) -LD $(OBJECTS) $(RESOURCES)
+       $(CC) $(MFLAGS) -LD $(OBJECTS) $(libdir)\iconv.lib $(RESOURCES) -Feintl.dll
 
 intl.res : $(srcdir)\..\windows\intl.rc
        rc -Fo intl.res $(srcdir)\..\windows\intl.rc
index 593adb09fa867cc67e1b4c00a99512a93d77ce9d..f6edb95c005996f72716d29a35fa3918752c49f5 100644 (file)
@@ -1,5 +1,5 @@
 /* Implementation of the internal dcigettext function.
-   Copyright (C) 1995-1999, 2000-2002 Free Software Foundation, Inc.
+   Copyright (C) 1995-1999, 2000-2003 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify it
    under the terms of the GNU Library General Public License as published
 # define alloca __builtin_alloca
 # define HAVE_ALLOCA 1
 #else
-# if defined HAVE_ALLOCA_H || defined _LIBC
-#  include <alloca.h>
+# ifdef _MSC_VER
+#  include <malloc.h>
+#  define alloca _alloca
 # else
-#  ifdef _AIX
- #pragma alloca
+#  if defined HAVE_ALLOCA_H || defined _LIBC
+#   include <alloca.h>
 #  else
-#   ifndef alloca
+#   ifdef _AIX
+ #pragma alloca
+#   else
+#    ifndef alloca
 char *alloca ();
+#    endif
 #   endif
 #  endif
 # endif
index a07d9de8a081d9717d2db5fd63bd52d903683e30..8509bd34587e46cf8187c146c770b1e804bb2a6e 100644 (file)
@@ -1,5 +1,5 @@
 /* Load needed message catalogs.
-   Copyright (C) 1995-1999, 2000-2002 Free Software Foundation, Inc.
+   Copyright (C) 1995-1999, 2000-2003 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify it
    under the terms of the GNU Library General Public License as published
 # define alloca __builtin_alloca
 # define HAVE_ALLOCA 1
 #else
-# if defined HAVE_ALLOCA_H || defined _LIBC
-#  include <alloca.h>
+# ifdef _MSC_VER
+#  include <malloc.h>
+#  define alloca _alloca
 # else
-#  ifdef _AIX
- #pragma alloca
+#  if defined HAVE_ALLOCA_H || defined _LIBC
+#   include <alloca.h>
 #  else
-#   ifndef alloca
+#   ifdef _AIX
+ #pragma alloca
+#   else
+#    ifndef alloca
 char *alloca ();
+#    endif
 #   endif
 #  endif
 # endif
index 12ad821e691edeb10ab1d6dfafd6ec530a01290b..7c4ce58f2a67ee15e50113a77d1a68dc6452b4c1 100644 (file)
 # define alloca __builtin_alloca
 # define HAVE_ALLOCA 1
 #else
-# if defined HAVE_ALLOCA_H || defined _LIBC
-#  include <alloca.h>
+# ifdef _MSC_VER
+#  include <malloc.h>
+#  define alloca _alloca
 # else
-#  ifdef _AIX
- #pragma alloca
+#  if defined HAVE_ALLOCA_H || defined _LIBC
+#   include <alloca.h>
 #  else
-#   ifndef alloca
+#   ifdef _AIX
+ #pragma alloca
+#   else
+#    ifndef alloca
 char *alloca ();
+#    endif
 #   endif
 #  endif
 # endif
index 9ca617ada0e28b7da27acfb8fda31e22561f4781..d141200a64235d6820be3406436f839632e775c8 100644 (file)
 /* This can be enabled through the configure --enable-relocatable option.  */
 #if ENABLE_RELOCATABLE
 
+/* When building a DLL, we must export some functions.  Note that because
+   this is a private .h file, we don't need to use __declspec(dllimport)
+   in any case.  */
+#if defined _MSC_VER && BUILDING_DLL
+# define RELOCATABLE_DLL_EXPORTED __declspec(dllexport)
+#else
+# define RELOCATABLE_DLL_EXPORTED
+#endif
+
 /* Sets the original and the current installation prefix of the package.
    Relocation simply replaces a pathname starting with the original prefix
    by the corresponding pathname with the current prefix instead.  Both
    prefixes should be directory names without trailing slash (i.e. use ""
    instead of "/").  */
-extern void set_relocation_prefix (const char *orig_prefix,
-                                  const char *curr_prefix);
+extern RELOCATABLE_DLL_EXPORTED void
+       set_relocation_prefix (const char *orig_prefix,
+                             const char *curr_prefix);
 
 /* Returns the pathname, relocated according to the current installation
    directory.  */