This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
intl patches (12)
- From: Bruno Haible <bruno at clisp dot org>
- To: libc-alpha at sources dot redhat dot com
- Date: Mon, 28 Apr 2003 13:14:06 +0200 (CEST)
- Subject: intl patches (12)
gettext-0.12 also compiles and runs on Woe32 systems. It turns out that
the standard template for alloca() support was missing support for this
platform's main compiler. Here is the fix. Inside libc, nothing changes.
2003-03-17 Bruno Haible <bruno at clisp dot org>
* intl/dcigettext.c (alloca): Add support for MSVC.
* intl/loadmsgcat.c (alloca): Likewise.
* intl/localealias.c (alloca): Likewise.
diff -r -c3 glibc-20030425.orig/intl/dcigettext.c glibc-20030425/intl/dcigettext.c
--- glibc-20030425.orig/intl/dcigettext.c Mon Dec 16 12:45:53 2002
+++ glibc-20030425/intl/dcigettext.c Sun Apr 27 13:07:10 2003
@@ -34,14 +34,19 @@
# 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
diff -r -c3 glibc-20030425.orig/intl/loadmsgcat.c glibc-20030425/intl/loadmsgcat.c
--- glibc-20030425.orig/intl/loadmsgcat.c Mon Dec 16 12:45:53 2002
+++ glibc-20030425/intl/loadmsgcat.c Sun Apr 27 13:06:48 2003
@@ -1,5 +1,5 @@
/* Load needed message catalogs.
- Copyright (C) 1995-1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1995-1999, 2000-2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -39,14 +39,19 @@
# 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
diff -r -c3 glibc-20030425.orig/intl/localealias.c glibc-20030425/intl/localealias.c
--- glibc-20030425.orig/intl/localealias.c Fri Nov 22 14:22:20 2002
+++ glibc-20030425/intl/localealias.c Sun Apr 27 13:07:23 2003
@@ -40,14 +40,19 @@
# 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