Remove HAVE_LIMITS_H

The `<limits.h>` header file is part of the standard C89 headers [1] and
on current systems there is no need to manually check if header is
present anymore.

Since the libgd requires at least C89 or greater, the `HAVE_LIMITS_H`
symbol defined by Autoconf in configure.ac [2], and Cmake build system
files can be removed and simplifed.

Refs:
[1] https://port70.net/~nsz/c/c89/c89-draft.html#4.1.2
[2] https://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/headers.m4
master
Peter Kokot 2018-09-05 22:35:09 +02:00 committed by Mike Frysinger
parent 1e7f93922f
commit d81a1383d7
6 changed files with 1 additions and 15 deletions

View File

@ -889,12 +889,6 @@ $COPY SYS$INPUT [.SRC]CONFIG.H
/* Define to 1 if you have the <libpng/png.h> header file. */
/* #undef HAVE_LIBPNG_PNG_H */
/* Define to 1 if you have the <limits.h> header file. */
//#define HAVE_LIMITS_H 1
/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1

View File

@ -2,7 +2,6 @@
check_include_files(dirent.h HAVE_DIRENT_H)
check_include_files(inttypes.h HAVE_INTTYPES_H)
check_include_files(limits.h HAVE_LIMITS_H)
check_include_files(stddef.h HAVE_STDDEF_H)
check_include_files(stdint.h HAVE_STDINT_H)
check_include_files(stdlib.h HAVE_STDLIB_H)

View File

@ -61,7 +61,6 @@ AC_HEADER_STDC
AC_CHECK_HEADERS_ONCE(m4_flatten([
dirent.h
inttypes.h
limits.h
stddef.h
stdint.h
stdlib.h

View File

@ -60,9 +60,6 @@
/* Define if you have zlib */
#cmakedefine HAVE_LIBZ
/* Define to 1 if you have the <limits.h> header file. */
#cmakedefine HAVE_LIMITS_H
/* Define to 1 if you have the <memory.h> header file. */
#cmakedefine HAVE_MEMORY_H

View File

@ -1,10 +1,7 @@
#ifndef GD_INTERN_H
#define GD_INTERN_H
#ifdef HAVE_LIMITS_H
#include <limits.h>
#endif
#ifndef MAXPATHLEN
# ifdef PATH_MAX

View File

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