From e2085327a231c5eed96f3dd2e3ec93f1bef27a0e Mon Sep 17 00:00:00 2001 From: Sebastian Wilhelmi Date: Thu, 5 Oct 2000 09:07:53 +0000 Subject: [PATCH] Changed alloca stuff a bit: when we have a working alloca.h, we're not 2000-10-05 Sebastian Wilhelmi * glib.h: Changed alloca stuff a bit: when we have a working alloca.h, we're not messing with alloca any further. Should fix a bug reported by Bernd Demian . --- ChangeLog | 6 ++++++ ChangeLog.pre-2-0 | 6 ++++++ ChangeLog.pre-2-10 | 6 ++++++ ChangeLog.pre-2-12 | 6 ++++++ ChangeLog.pre-2-2 | 6 ++++++ ChangeLog.pre-2-4 | 6 ++++++ ChangeLog.pre-2-6 | 6 ++++++ ChangeLog.pre-2-8 | 6 ++++++ glib.h | 35 ++++++++++++++++------------------- glib/glib.h | 35 ++++++++++++++++------------------- 10 files changed, 80 insertions(+), 38 deletions(-) diff --git a/ChangeLog b/ChangeLog index d718745..7d32295 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2000-10-05 Sebastian Wilhelmi + + * glib.h: Changed alloca stuff a bit: when we have a working + alloca.h, we're not messing with alloca any further. Should fix a + bug reported by Bernd Demian . + 2000-09-29 Jonathan Blandford * gnode.c (g_node_insert_after): Added function to keep symetry diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index d718745..7d32295 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,9 @@ +2000-10-05 Sebastian Wilhelmi + + * glib.h: Changed alloca stuff a bit: when we have a working + alloca.h, we're not messing with alloca any further. Should fix a + bug reported by Bernd Demian . + 2000-09-29 Jonathan Blandford * gnode.c (g_node_insert_after): Added function to keep symetry diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index d718745..7d32295 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,9 @@ +2000-10-05 Sebastian Wilhelmi + + * glib.h: Changed alloca stuff a bit: when we have a working + alloca.h, we're not messing with alloca any further. Should fix a + bug reported by Bernd Demian . + 2000-09-29 Jonathan Blandford * gnode.c (g_node_insert_after): Added function to keep symetry diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index d718745..7d32295 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,9 @@ +2000-10-05 Sebastian Wilhelmi + + * glib.h: Changed alloca stuff a bit: when we have a working + alloca.h, we're not messing with alloca any further. Should fix a + bug reported by Bernd Demian . + 2000-09-29 Jonathan Blandford * gnode.c (g_node_insert_after): Added function to keep symetry diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index d718745..7d32295 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,9 @@ +2000-10-05 Sebastian Wilhelmi + + * glib.h: Changed alloca stuff a bit: when we have a working + alloca.h, we're not messing with alloca any further. Should fix a + bug reported by Bernd Demian . + 2000-09-29 Jonathan Blandford * gnode.c (g_node_insert_after): Added function to keep symetry diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index d718745..7d32295 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,9 @@ +2000-10-05 Sebastian Wilhelmi + + * glib.h: Changed alloca stuff a bit: when we have a working + alloca.h, we're not messing with alloca any further. Should fix a + bug reported by Bernd Demian . + 2000-09-29 Jonathan Blandford * gnode.c (g_node_insert_after): Added function to keep symetry diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index d718745..7d32295 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,9 @@ +2000-10-05 Sebastian Wilhelmi + + * glib.h: Changed alloca stuff a bit: when we have a working + alloca.h, we're not messing with alloca any further. Should fix a + bug reported by Bernd Demian . + 2000-09-29 Jonathan Blandford * gnode.c (g_node_insert_after): Added function to keep symetry diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index d718745..7d32295 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,9 @@ +2000-10-05 Sebastian Wilhelmi + + * glib.h: Changed alloca stuff a bit: when we have a working + alloca.h, we're not messing with alloca any further. Should fix a + bug reported by Bernd Demian . + 2000-09-29 Jonathan Blandford * gnode.c (g_node_insert_after): Added function to keep symetry diff --git a/glib.h b/glib.h index 7ba589b..a59779c 100644 --- a/glib.h +++ b/glib.h @@ -333,30 +333,27 @@ extern "C" { #endif /* __i386__ */ /* g_alloca handling */ -#ifdef GLIB_HAVE_ALLOCA_H -#include -#endif - -#include -#ifdef __GNUC__ -/* glibc already does this for us */ -#ifndef alloca -# define alloca(size) __builtin_alloca (size) -#endif -#else +#ifdef __GNUC__ +/* GCC does the right thing */ +# undef alloca +# define alloca(size) __builtin_alloca (size) +#elif defined (GLIB_HAVE_ALLOCA_H) +/* a native and working alloca.h is there */ +# include +#else /* !__GNUC__ && !GLIB_HAVE_ALLOCA_H */ # ifdef _MSC_VER # include # define alloca _alloca -# else -# ifdef _AIX +# else /* !_MSC_VER */ +# ifdef _AIX #pragma alloca -# else -# ifndef alloca /* predefined by HP cc +Olibcalls */ +# else /* !_AIX */ +# ifndef alloca /* predefined by HP cc +Olibcalls */ char *alloca (); -# endif -# endif -# endif -#endif +# endif /* !alloca */ +# endif /* !_AIX */ +# endif /* !_MSC_VER */ +#endif /* !__GNUC__ && !GLIB_HAVE_ALLOCA_H */ #define g_alloca(size) alloca (size) /* End g_alloca handling */ diff --git a/glib/glib.h b/glib/glib.h index 7ba589b..a59779c 100644 --- a/glib/glib.h +++ b/glib/glib.h @@ -333,30 +333,27 @@ extern "C" { #endif /* __i386__ */ /* g_alloca handling */ -#ifdef GLIB_HAVE_ALLOCA_H -#include -#endif - -#include -#ifdef __GNUC__ -/* glibc already does this for us */ -#ifndef alloca -# define alloca(size) __builtin_alloca (size) -#endif -#else +#ifdef __GNUC__ +/* GCC does the right thing */ +# undef alloca +# define alloca(size) __builtin_alloca (size) +#elif defined (GLIB_HAVE_ALLOCA_H) +/* a native and working alloca.h is there */ +# include +#else /* !__GNUC__ && !GLIB_HAVE_ALLOCA_H */ # ifdef _MSC_VER # include # define alloca _alloca -# else -# ifdef _AIX +# else /* !_MSC_VER */ +# ifdef _AIX #pragma alloca -# else -# ifndef alloca /* predefined by HP cc +Olibcalls */ +# else /* !_AIX */ +# ifndef alloca /* predefined by HP cc +Olibcalls */ char *alloca (); -# endif -# endif -# endif -#endif +# endif /* !alloca */ +# endif /* !_AIX */ +# endif /* !_MSC_VER */ +#endif /* !__GNUC__ && !GLIB_HAVE_ALLOCA_H */ #define g_alloca(size) alloca (size) /* End g_alloca handling */ -- 2.7.4