]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
Remove index/rindex and bcmp/bcopy/bzero references.
authorJim Meyering <jim@meyering.net>
Sat, 11 Feb 1995 13:53:39 +0000 (13:53 +0000)
committerJim Meyering <jim@meyering.net>
Sat, 11 Feb 1995 13:53:39 +0000 (13:53 +0000)
Separate errno declaration from STDC_HEADERS.

src/system.h

index 5e49683c242776ca1b8d561e5da1b6ad11cfb9da..f67bbf014863fe19d038a2f54989d1ec79762c21 100644 (file)
@@ -149,32 +149,27 @@ struct utimbuf
 };
 #endif
 
+/* Don't use bcopy!  Use memmove if source and destination may overlap,
+   memcpy otherwise.  */
+
 #ifdef HAVE_STRING_H
 # include <string.h>
-# ifndef bcopy
-#  define bcopy(from, to, len) memcpy ((to), (from), (len))
-# endif
-# ifndef bzero
-#  define bzero(s, n) memset ((s), 0, (n))
-# endif
 #else
 # include <strings.h>
-# ifndef strrchr
-#  define strrchr rindex
-# endif
-# ifndef strchr
-#  define strchr index
-# endif
+char *memchr ();
 #endif
 
 #include <errno.h>
+#ifndef errno
+extern int errno;
+#endif
+
 #ifdef STDC_HEADERS
 #define getopt system_getopt
 #include <stdlib.h>
 #undef getopt
 #else /* not STDC_HEADERS */
 char *getenv ();
-extern int errno;
 #endif /* STDC_HEADERS */
 
 #ifdef HAVE_FCNTL_H