mirror of
https://git.savannah.gnu.org/git/make.git
synced 2025-01-12 08:40:55 +00:00
Include <strings.h> globally
Various code uses str{,n}casecmp() so include <strings.h>, if it exists, everywhere. * configure.ac: Check for <strings.h> explicitly. * src/makeint.h: Include it if HAVE_STRINGS_H, for str{,n}casecmp(). * src/job.c: Remove include of <strings.h>. * src/main.c: Ditto.
This commit is contained in:
parent
31a1337c23
commit
1656cd051c
4 changed files with 6 additions and 10 deletions
|
@ -64,9 +64,9 @@ AC_SEARCH_LIBS([getpwnam], [sun])
|
||||||
AC_HEADER_DIRENT
|
AC_HEADER_DIRENT
|
||||||
AC_HEADER_STAT
|
AC_HEADER_STAT
|
||||||
|
|
||||||
AC_CHECK_HEADERS([stdlib.h locale.h unistd.h limits.h fcntl.h string.h \
|
AC_CHECK_HEADERS([stdlib.h string.h strings.h locale.h unistd.h limits.h \
|
||||||
memory.h sys/param.h sys/resource.h sys/timeb.h sys/time.h \
|
memory.h sys/param.h sys/resource.h sys/timeb.h sys/time.h \
|
||||||
sys/select.h sys/file.h spawn.h])
|
sys/select.h sys/file.h fcntl.h spawn.h])
|
||||||
|
|
||||||
AM_PROG_CC_C_O
|
AM_PROG_CC_C_O
|
||||||
AC_C_CONST
|
AC_C_CONST
|
||||||
|
|
|
@ -30,9 +30,6 @@ this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
/* Default shell to use. */
|
/* Default shell to use. */
|
||||||
#ifdef WINDOWS32
|
#ifdef WINDOWS32
|
||||||
# ifdef HAVE_STRINGS_H
|
|
||||||
# include <strings.h> /* for strcasecmp, strncasecmp */
|
|
||||||
# endif
|
|
||||||
# include <windows.h>
|
# include <windows.h>
|
||||||
|
|
||||||
const char *default_shell = "sh.exe";
|
const char *default_shell = "sh.exe";
|
||||||
|
|
|
@ -34,9 +34,6 @@ this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||||
#ifdef WINDOWS32
|
#ifdef WINDOWS32
|
||||||
# include <windows.h>
|
# include <windows.h>
|
||||||
# include <io.h>
|
# include <io.h>
|
||||||
#ifdef HAVE_STRINGS_H
|
|
||||||
# include <strings.h> /* for strcasecmp */
|
|
||||||
#endif
|
|
||||||
# include "pathstuff.h"
|
# include "pathstuff.h"
|
||||||
# include "sub_proc.h"
|
# include "sub_proc.h"
|
||||||
# include "w32err.h"
|
# include "w32err.h"
|
||||||
|
|
|
@ -251,8 +251,6 @@ extern int vms_unix_simulation;
|
||||||
# ifdef HAVE_STRING_H
|
# ifdef HAVE_STRING_H
|
||||||
# include <string.h>
|
# include <string.h>
|
||||||
# define ANSI_STRING 1
|
# define ANSI_STRING 1
|
||||||
# else
|
|
||||||
# include <strings.h>
|
|
||||||
# endif
|
# endif
|
||||||
# ifdef HAVE_MEMORY_H
|
# ifdef HAVE_MEMORY_H
|
||||||
# include <memory.h>
|
# include <memory.h>
|
||||||
|
@ -296,6 +294,10 @@ char *strerror (int errnum);
|
||||||
# include <stdint.h>
|
# include <stdint.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if HAVE_STRINGS_H
|
||||||
|
# include <strings.h> /* Needed for strcasecmp / strncasecmp. */
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined _MSC_VER || defined __MINGW32__
|
#if defined _MSC_VER || defined __MINGW32__
|
||||||
# define MK_PRI64_PREFIX "I64"
|
# define MK_PRI64_PREFIX "I64"
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Reference in a new issue