Remove HAVE_STDLIB_H

The C89 and later standard defines the `<stdlib.h>` header as part of
the standard headers [1] and on current systems it is always present
and the `HAVE_STDLIB_H` symbol can be removed.

Also Autoconf suggests doing this and relying on C89 or above [2] and [3].

[1] https://port70.net/~nsz/c/c89/c89-draft.html#4.1.2
[2] http://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/headers.m4
[3] https://www.gnu.org/software/autoconf/manual/autoconf-2.69/autoconf.html
master
Peter Kokot 2018-09-06 16:24:45 +02:00 committed by Mike Frysinger
parent d8ead0b8e0
commit 5dc2dd8b49
7 changed files with 1 additions and 16 deletions

View File

@ -899,9 +899,6 @@ $COPY SYS$INPUT [.SRC]CONFIG.H
/* Define to 1 if you have the <stdint.h> header file. */
//#define HAVE_STDINT_H 1
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1

View File

@ -3,7 +3,6 @@
check_include_files(dirent.h HAVE_DIRENT_H)
check_include_files(inttypes.h HAVE_INTTYPES_H)
check_include_files(stdint.h HAVE_STDINT_H)
check_include_files(stdlib.h HAVE_STDLIB_H)
check_include_files(strings.h HAVE_STRINGS_H)
check_include_files(unistd.h HAVE_UNISTD_H)

View File

@ -62,7 +62,6 @@ AC_CHECK_HEADERS_ONCE(m4_flatten([
dirent.h
inttypes.h
stdint.h
stdlib.h
strings.h
unistd.h
sys/stat.h

View File

@ -75,9 +75,6 @@
/* Define to 1 if you have the <stdint.h> header file. */
#cmakedefine HAVE_STDINT_H
/* Define to 1 if you have the <stdlib.h> header file. */
#cmakedefine HAVE_STDLIB_H
/* Define to 1 if you have the <strings.h> header file. */
#cmakedefine HAVE_STRINGS_H

View File

@ -47,11 +47,6 @@
# define HAVE_BOOLEAN
#endif
/* JCE undef symbols that we don't need anymore but which are
may be defined in config.h from ./configure but which are
redefined incompatibly in jpeglib.h */
#undef HAVE_STDLIB_H
/* 1.8.1: remove dependency on jinclude.h */
#include "jpeglib.h"
#include "jerror.h"

View File

@ -6,9 +6,7 @@
#include <stdarg.h>
#include <errno.h>
#include <stdio.h>
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#include <string.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>

View File

@ -9,7 +9,7 @@ LIBVER=3.0.1
# Misc. config flags.
CDEFS=-DHAVE_ICONV -DHAVE_ICONV_H \
-DHAVE_ICONV_T_DEF -DHAVE_INTTYPES_H \
-DHAVE_STDINT_H -DHAVE_STDLIB_H -DHAVE_VISIBILITY -DICONV_CONST
-DHAVE_STDINT_H -DHAVE_VISIBILITY -DICONV_CONST
# GnuWin32 libs should all be installed in one place.
GNUDIR=/c/tools/GnuWin32