From: Rainer Orth Date: Fri, 26 Sep 2003 20:15:12 +0000 (+0000) Subject: Consolidate alloca support. X-Git-Tag: before-retrans-udp-tcp-split~88 X-Git-Url: https://git.fsl.cs.sunysb.edu/?a=commitdiff_plain;h=f12c01db1176e2b74eb87e568a94b4546f1dd119;p=am-utils-6.0.git Consolidate alloca support. * amd/amq_svc.c: Move alloca support ... * include/am_defs.h: ... here. * amd/conf_parse.y: Remove alloca support. * fsinfo/fsi_gram.y: Likewise. --- diff --git a/ChangeLog b/ChangeLog index 64edcd6..ea40f30 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2003-09-26 Rainer Orth + + Consolidate alloca support. + + * amd/amq_svc.c: Move alloca support ... + * include/am_defs.h: ... here. + * amd/conf_parse.y: Remove alloca support. + * fsinfo/fsi_gram.y: Likewise. + 2003-09-25 Rainer Orth Handle Solaris 10. diff --git a/amd/amq_svc.c b/amd/amq_svc.c index 2795bd1..007b556 100644 --- a/amd/amq_svc.c +++ b/amd/amq_svc.c @@ -37,7 +37,7 @@ * SUCH DAMAGE. * * - * $Id: amq_svc.c,v 1.13 2003/09/25 20:19:08 ro Exp $ + * $Id: amq_svc.c,v 1.14 2003/09/26 20:15:13 ro Exp $ * */ @@ -47,26 +47,6 @@ #include #include -/* AIX requires this to be the first thing in the file. */ -#ifndef __GNUC__ -# if HAVE_ALLOCA_H -# include -# else /* not HAVE_ALLOCA_H */ -# ifdef _AIX -/* - * This pragma directive is indented so that pre-ANSI C compilers will - * ignore it, rather than choke on it. - */ - #pragma alloca -# else /* not _AIX */ -# ifndef alloca -/* predefined by HP cc +Olibcalls */ -voidp alloca(); -# endif /* not alloca */ -# endif /* not _AIX */ -# endif /* not HAVE_ALLOCA_H */ -#endif /* not __GNUC__ */ - /* typedefs */ typedef char *(*amqsvcproc_t)(voidp, struct svc_req *); diff --git a/amd/conf_parse.y b/amd/conf_parse.y index b90b58c..a3e2517 100644 --- a/amd/conf_parse.y +++ b/amd/conf_parse.y @@ -37,7 +37,7 @@ * SUCH DAMAGE. * * - * $Id: conf_parse.y,v 1.11 2003/07/13 19:11:19 ezk Exp $ + * $Id: conf_parse.y,v 1.12 2003/09/26 20:15:13 ro Exp $ * */ @@ -48,26 +48,6 @@ #include #include -/* AIX requires this to be the first thing in the file. */ -#ifndef __GNUC__ -# if HAVE_ALLOCA_H -# include -# else /* not HAVE_ALLOCA_H */ -# ifdef _AIX -/* - * This pragma directive is indented so that pre-ANSI C compilers will - * ignore it, rather than choke on it. - */ - #pragma alloca -# else /* not _AIX */ -# ifndef alloca -/* predefined by HP cc +Olibcalls */ -voidp alloca(); -# endif /* not alloca */ -# endif /* not _AIX */ -# endif /* not HAVE_ALLOCA_H */ -#endif /* not __GNUC__ */ - extern char *yytext; extern int ayylineno; extern int yylex(void); diff --git a/fsinfo/fsi_gram.y b/fsinfo/fsi_gram.y index b11074c..3105919 100644 --- a/fsinfo/fsi_gram.y +++ b/fsinfo/fsi_gram.y @@ -37,7 +37,7 @@ * SUCH DAMAGE. * * - * $Id: fsi_gram.y,v 1.9 2002/12/27 22:44:07 ezk Exp $ + * $Id: fsi_gram.y,v 1.10 2003/09/26 20:15:14 ro Exp $ * */ @@ -49,26 +49,6 @@ #include #include -/* AIX requires this to be the first thing in the file. */ -#ifndef __GNUC__ -# if HAVE_ALLOCA_H -# include -# else /* not HAVE_ALLOCA_H */ -# ifdef _AIX -/* - * This pragma directive is indented so that pre-ANSI C compilers will - * ignore it, rather than choke on it. - */ - #pragma alloca -# else /* not _AIX */ -# ifndef alloca -/* predefined by HP cc +Olibcalls */ -voidp alloca(); -# endif /* not alloca */ -# endif /* not _AIX */ -# endif /* not HAVE_ALLOCA_H */ -#endif /* not __GNUC__ */ - extern qelem *list_of_hosts, *list_of_automounts; %} diff --git a/include/am_defs.h b/include/am_defs.h index ba13bf9..35e042d 100644 --- a/include/am_defs.h +++ b/include/am_defs.h @@ -37,7 +37,7 @@ * SUCH DAMAGE. * * - * $Id: am_defs.h,v 1.43 2003/08/02 18:56:33 ezk Exp $ + * $Id: am_defs.h,v 1.44 2003/09/26 20:15:13 ro Exp $ * */ @@ -68,6 +68,26 @@ char *strchr(), *strrchr(), *strdup(); #endif /* not STDC_HEADERS */ +/* AIX requires this to be the first thing in the file. */ +#ifndef __GNUC__ +# if HAVE_ALLOCA_H +# include +# else /* not HAVE_ALLOCA_H */ +# ifdef _AIX +/* + * This pragma directive is indented so that pre-ANSI C compilers will + * ignore it, rather than choke on it. + */ + #pragma alloca +# else /* not _AIX */ +# ifndef alloca +/* predefined by HP cc +Olibcalls */ +voidp alloca(); +# endif /* not alloca */ +# endif /* not _AIX */ +# endif /* not HAVE_ALLOCA_H */ +#endif /* not __GNUC__ */ + /* * Handle gcc __attribute__ if available. */