From 51db713ffd51965e1e25638542f31197fe02f2d8 Mon Sep 17 00:00:00 2001 From: "Kaveh R. Ghazi" Date: Tue, 30 Jun 1998 06:11:43 +0000 Subject: [PATCH] Remove autoconf things and OS header stuff (namely NULL) from gansidecl.h: * gansidecl.h (ATTRIBUTE_UNUSED): Use __unused__ not `unused'. Don't define NULL here. Also, remove all vestiges of autoconf based checks for bcmp/bcopy/bzero/index/rindex. * system.h: Immediately after including stdio.h, check for and if necessary provide a default definition of NULL. From-SVN: r20814 --- gcc/ChangeLog | 9 ++++++++ gcc/gansidecl.h | 55 +------------------------------------------------ gcc/system.h | 6 ++++++ 3 files changed, 16 insertions(+), 54 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d87c539ee71..f23fca6645f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +Tue Jun 30 08:59:15 1998 Kaveh R. Ghazi + + * gansidecl.h (ATTRIBUTE_UNUSED): Use __unused__ not `unused'. + Don't define NULL here. Also, remove all vestiges of autoconf + based checks for bcmp/bcopy/bzero/index/rindex. + + * system.h: Immediately after including stdio.h, check for and if + necessary provide a default definition of NULL. + Tue Jun 30 08:22:05 1998 Michael Meissner * reload1.c (reload_cse_simplify_operands): Call diff --git a/gcc/gansidecl.h b/gcc/gansidecl.h index f994b2d5c3e..4f4bb422f1f 100644 --- a/gcc/gansidecl.h +++ b/gcc/gansidecl.h @@ -51,7 +51,7 @@ Boston, MA 02111-1307, USA. */ #endif #ifndef ATTRIBUTE_UNUSED -#define ATTRIBUTE_UNUSED __attribute__ ((unused)) +#define ATTRIBUTE_UNUSED __attribute__ ((__unused__)) #endif /* ATTRIBUTE_UNUSED */ #ifndef ATTRIBUTE_PRINTF @@ -63,12 +63,6 @@ Boston, MA 02111-1307, USA. */ #define ATTRIBUTE_PRINTF_5 ATTRIBUTE_PRINTF(5, 6) #endif /* ATTRIBUTE_PRINTF */ -/* Define a generic NULL if one hasn't already been defined. */ - -#ifndef NULL -#define NULL 0 -#endif - #ifndef GENERIC_PTR #if defined (USE_PROTOTYPES) ? USE_PROTOTYPES : defined (__STDC__) #define GENERIC_PTR void * @@ -94,51 +88,4 @@ Boston, MA 02111-1307, USA. */ #endif /* ! __STDC__ */ -/* We don't have autoconf for libgcc2.c since it's a target, so don't - define these functions, which aren't used there anyway. */ -#ifndef IN_LIBGCC2 -#ifndef bcopy -# ifdef HAVE_BCOPY -# ifdef NEED_DECLARATION_BCOPY -void bcopy (); -# endif -# else -# define bcopy(src,dst,len) memcpy ((dst),(src),(len)) -# endif -#endif - -#ifndef bzero -# ifdef HAVE_BZERO -# ifdef NEED_DECLARATION_BZERO -void bzero (); -# endif -# else -# define bzero(dst,len) memset ((dst),0,(len)) -# endif -#endif - -#ifndef bcmp -# ifdef HAVE_BCMP -# ifdef NEED_DECLARATION_BCMP -int bcmp (); -# endif -# else -# define bcmp(left,right,len) memcmp ((left),(right),(len)) -# endif -#endif - -#ifndef HAVE_RINDEX -# ifndef rindex -# define rindex strrchr -# endif -#endif - -#ifndef HAVE_INDEX -# ifndef index -# define index strchr -# endif -#endif - -#endif /* IN_LIBGCC2 */ - #endif /* ANSIDECL_H */ diff --git a/gcc/system.h b/gcc/system.h index 79e1e279ae2..acb195f2e39 100644 --- a/gcc/system.h +++ b/gcc/system.h @@ -8,6 +8,12 @@ #define __GCC_SYSTEM_H__ #include + +/* Define a generic NULL if one hasn't already been defined. */ +#ifndef NULL +#define NULL 0 +#endif + #include /* Jim Meyering writes: -- 2.30.2