+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.
* 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.
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
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
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":
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:
# 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
/* 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
/* 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
# 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
/* 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. */