From c4acdea0ab754512f0edbb32c0d6b068405f1c28 Mon Sep 17 00:00:00 2001 From: mycroft Date: Sun, 18 May 1997 11:27:06 +0000 Subject: [PATCH] Make sure we get all the .h files we need so this compiles. --- gnu/usr.bin/bc/bcdefs.h | 4 +--- gnu/usr.bin/bc/getopt.c | 7 ++----- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/gnu/usr.bin/bc/bcdefs.h b/gnu/usr.bin/bc/bcdefs.h index 97d7c81b4381..b11a2f8ddf4d 100644 --- a/gnu/usr.bin/bc/bcdefs.h +++ b/gnu/usr.bin/bc/bcdefs.h @@ -33,9 +33,7 @@ #include #include #include -#ifdef STRINGS_H -#include -#else +#ifdef HAVE_STRING_H #include #endif #ifdef HAVE_LIMITS_H diff --git a/gnu/usr.bin/bc/getopt.c b/gnu/usr.bin/bc/getopt.c index 71134cca5c31..b8c404437530 100644 --- a/gnu/usr.bin/bc/getopt.c +++ b/gnu/usr.bin/bc/getopt.c @@ -159,13 +159,14 @@ static enum /* Value of POSIXLY_CORRECT environment variable. */ static char *posixly_correct; -#ifdef __GNU_LIBRARY__ +#if defined(__GNU_LIBRARY__) || defined(__NetBSD__) /* We want to avoid inclusion of string.h with non-GNU libraries because there are many ways it can cause trouble. On some systems, it contains special magic macros that don't work in GCC. */ #include #define my_index strchr +#include #else /* Avoid depending on library functions or files @@ -189,9 +190,6 @@ my_index (str, chr) /* If using GCC, we can safely declare strlen this way. If not using GCC, it is ok not to declare it. */ -#ifdef __NetBSD__ -#include -#else #ifdef __GNUC__ /* Note that Motorola Delta 68k R3V7 comes with GCC but not stddef.h. That was relevant to code that was here before. */ @@ -203,7 +201,6 @@ extern int strlen (const char *); #endif /* __GNUC__ */ #endif /* not __GNU_LIBRARY__ */ -#endif /* Handle permutation of arguments. */