From bdd7c906182c19b2317fa80fc6b00f0a7ad39158 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Tue, 12 Oct 1993 02:37:45 +0000 Subject: [PATCH] GNU shell utilities --- lib/getdate.y | 19 +++++++++++++++++++ lib/posixtm.y | 28 +++++++++++++++++----------- 2 files changed, 36 insertions(+), 11 deletions(-) diff --git a/lib/getdate.y b/lib/getdate.y index e15a886a0..df1a08a98 100644 --- a/lib/getdate.y +++ b/lib/getdate.y @@ -31,6 +31,25 @@ #undef static #endif +/* The following block of alloca-related preprocessor directives is here + solely to allow compilation by non GNU-C compilers of the C parser + produced from this file by old versions of bison. Newer versions of + bison include a block similar to this one in bison.simple. */ + +#ifdef __GNUC__ +#define alloca __builtin_alloca +#else +#ifdef HAVE_ALLOCA_H +#include +#else +#ifdef _AIX + #pragma alloca +#else +void *alloca (); +#endif +#endif +#endif + #ifdef __GNUC__ #undef alloca #define alloca __builtin_alloca diff --git a/lib/posixtm.y b/lib/posixtm.y index ea81ef134..678c74afe 100644 --- a/lib/posixtm.y +++ b/lib/posixtm.y @@ -17,6 +17,23 @@ /* Written by Jim Kingdon and David MacKenzie. */ %{ + +#ifdef HAVE_CONFIG_H +#if defined (CONFIG_BROKETS) +/* We use instead of "config.h" so that a compilation + using -I. -I will use ./config.h rather than /config.h + (which it would do because it found this file in ). */ +#include +#else +#include "config.h" +#endif +#endif + +/* The following block of alloca-related preprocessor directives is here + solely to allow compilation by non GNU-C compilers of the C parser + produced from this file by old versions of bison. Newer versions of + bison include a block similar to this one in bison.simple. */ + #ifdef __GNUC__ #define alloca __builtin_alloca #else @@ -31,17 +48,6 @@ void *alloca (); #endif #endif -#ifdef HAVE_CONFIG_H -#if defined (CONFIG_BROKETS) -/* We use instead of "config.h" so that a compilation - using -I. -I will use ./config.h rather than /config.h - (which it would do because it found this file in ). */ -#include -#else -#include "config.h" -#endif -#endif - #include #include -- 2.11.0