diff options
author | Kaveh R. Ghazi <ghazi@caip.rutgers.edu> | 1998-04-06 14:01:33 +0000 |
---|---|---|
committer | Kaveh Ghazi <ghazi@gcc.gnu.org> | 1998-04-06 14:01:33 +0000 |
commit | 944fc8abefc438b7087db07cdf81c1bbcb0faf26 (patch) | |
tree | 705fdf7fa2c894b86921a9d5b3c46a2bd38525cb /gcc/cexp.c | |
parent | 3286ab57366ae3422fdacff3c2e605ea81a29c44 (diff) | |
download | gcc-944fc8abefc438b7087db07cdf81c1bbcb0faf26.tar.gz |
More system.h cutover patches:
* c-parse.in: Include system.h, and remove stuff now made redundant.
* cccp.c: Likewise.
* cexp.y: Likewise.
* protoize.c: Likewise. Properly check for cpp stringification.
* Makefile.in (c-parse.o, cccp.o, cexp.o, protoize.o, unprotoize.o):
Depend on system.h.
* objc/Make-lang.in (objc-parse.o): Likewise.
From-SVN: r19020
Diffstat (limited to 'gcc/cexp.c')
-rw-r--r-- | gcc/cexp.c | 62 |
1 files changed, 24 insertions, 38 deletions
diff --git a/gcc/cexp.c b/gcc/cexp.c index de021e09559..4e3a1467d14 100644 --- a/gcc/cexp.c +++ b/gcc/cexp.c @@ -22,28 +22,38 @@ #line 27 "cexp.y" #include "config.h" -#include <setjmp.h> -/* #define YYDEBUG 1 */ - - -#ifdef HAVE_STRING_H -# include <string.h> +#if defined (__STDC__) && defined (HAVE_VPRINTF) +# include <stdarg.h> +# define VA_START(va_list, var) va_start (va_list, var) +# define PRINTF_ALIST(msg) char *msg, ... +# define PRINTF_DCL(msg) +# define PRINTF_PROTO(ARGS, m, n) PROTO (ARGS) __attribute__ ((format (__printf__, m, n))) +#else +# include <varargs.h> +# define VA_START(va_list, var) va_start (va_list) +# define PRINTF_ALIST(msg) msg, va_alist +# define PRINTF_DCL(msg) char *msg; va_dcl +# define PRINTF_PROTO(ARGS, m, n) () __attribute__ ((format (__printf__, m, n))) +# define vfprintf(file, msg, args) \ + { \ + char *a0 = va_arg(args, char *); \ + char *a1 = va_arg(args, char *); \ + char *a2 = va_arg(args, char *); \ + char *a3 = va_arg(args, char *); \ + fprintf (file, msg, a0, a1, a2, a3); \ + } #endif -#ifdef HAVE_STDLIB_H -# include <stdlib.h> -#endif +#define PRINTF_PROTO_1(ARGS) PRINTF_PROTO(ARGS, 1, 2) -#ifdef HAVE_LIMITS_H -# include <limits.h> -#endif +#include "system.h" +#include <setjmp.h> +/* #define YYDEBUG 1 */ #ifdef MULTIBYTE_CHARS #include <locale.h> #endif -#include <stdio.h> - typedef unsigned char U_CHAR; /* This is used for communicating lists of keywords with cccp.c. */ @@ -117,30 +127,6 @@ struct arglist { # endif #endif -#if defined (__STDC__) && defined (HAVE_VPRINTF) -# include <stdarg.h> -# define VA_START(va_list, var) va_start (va_list, var) -# define PRINTF_ALIST(msg) char *msg, ... -# define PRINTF_DCL(msg) -# define PRINTF_PROTO(ARGS, m, n) PROTO (ARGS) __attribute__ ((format (__printf__, m, n))) -#else -# include <varargs.h> -# define VA_START(va_list, var) va_start (va_list) -# define PRINTF_ALIST(msg) msg, va_alist -# define PRINTF_DCL(msg) char *msg; va_dcl -# define PRINTF_PROTO(ARGS, m, n) () __attribute__ ((format (__printf__, m, n))) -# define vfprintf(file, msg, args) \ - { \ - char *a0 = va_arg(args, char *); \ - char *a1 = va_arg(args, char *); \ - char *a2 = va_arg(args, char *); \ - char *a3 = va_arg(args, char *); \ - fprintf (file, msg, a0, a1, a2, a3); \ - } -#endif - -#define PRINTF_PROTO_1(ARGS) PRINTF_PROTO(ARGS, 1, 2) - HOST_WIDE_INT parse_c_expression PROTO((char *, int)); static int yylex PROTO((void)); |