aboutsummaryrefslogtreecommitdiff
path: root/gcc/gansidecl.h
diff options
context:
space:
mode:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>1998-02-01 00:48:06 +0000
committerJeff Law <law@gcc.gnu.org>1998-01-31 17:48:06 -0700
commita81fb89ebed2978466d24ea372dac5adc36337ec (patch)
tree3ce8146b54371c3e1f123fd38bfcb7b686a4b330 /gcc/gansidecl.h
parentf65a7138c4a7858f606aeaa17c6f7b6abd42d928 (diff)
downloadgcc-a81fb89ebed2978466d24ea372dac5adc36337ec.zip
gcc-a81fb89ebed2978466d24ea372dac5adc36337ec.tar.gz
gcc-a81fb89ebed2978466d24ea372dac5adc36337ec.tar.bz2
aclocal.m4 (GCC_NEED_DECLARATION): Modify macro to accept a shell variable argument instead of only hard coded...
* aclocal.m4 (GCC_NEED_DECLARATION): Modify macro to accept a shell variable argument instead of only hard coded functions. (GCC_NEED_DECLARATIONS): New macro to accept multiple functions. * configure.in: Collapse multiple calls to AC_CHECK_FUNCS into one call. Collapse multiple calls to GCC_NEED_DECLARATION into one call to GCC_NEED_DECLARATIONS (new macro.) Check if we need declarations for bcopy, bcmp and bzero. * acconfig.h: Add stubs for bcopy, bcmp and bzero declarations. * gansidecl.h: If we have bcopy but don't declare it, then do so. Likewise for bcmp and bzero. Only define macros for bcopy, bcmp, bzero, index and rindex if they aren't already present. From-SVN: r17563
Diffstat (limited to 'gcc/gansidecl.h')
-rw-r--r--gcc/gansidecl.h54
1 files changed, 44 insertions, 10 deletions
diff --git a/gcc/gansidecl.h b/gcc/gansidecl.h
index 1135db9..83625aa 100644
--- a/gcc/gansidecl.h
+++ b/gcc/gansidecl.h
@@ -1,5 +1,5 @@
-/* ANSI and traditional C compatability macros.
- Copyright (C) 1996 Free Software Foundation, Inc.
+/* ANSI and traditional C compatibility macros.
+ Copyright (C) 1996, 1997 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -46,14 +46,6 @@ Boston, MA 02111-1307, USA. */
#endif
#endif
-#ifndef STDIO_PROTO
-#ifdef BUFSIZ
-#define STDIO_PROTO(ARGS) PROTO(ARGS)
-#else
-#define STDIO_PROTO(ARGS) ()
-#endif
-#endif
-
/* Define a generic NULL if one hasn't already been defined. */
#ifndef NULL
@@ -85,4 +77,46 @@ Boston, MA 02111-1307, USA. */
#endif /* ! __STDC__ */
+#ifdef HAVE_BCOPY
+# ifdef NEED_DECLARATION_BCOPY
+void bcopy ();
+# endif
+#else
+# ifndef bcopy
+# define bcopy(src,dst,len) memcpy ((dst),(src),(len))
+# endif
+#endif
+
+#ifdef HAVE_BZERO
+# ifdef NEED_DECLARATION_BZERO
+void bzero ();
+# endif
+#else
+# ifndef bzero
+# define bzero(dst,len) memset ((dst),0,(len))
+# endif
+#endif
+
+#ifdef HAVE_BCMP
+# ifdef NEED_DECLARATION_BCMP
+int bcmp ();
+# endif
+#else
+# ifndef bcmp
+# 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 /* ANSIDECL_H */