Commit ebf8529b authored by Erwin Janssen's avatar Erwin Janssen

Replace checks for <stdint.h> and <inttypes.h>

Instead of checking for the availability of stdint.h and inttypes.h with HAVE_STDINT_H and HAVE_INTTYPES_H, simply include stdint.h. The header stdint.h is part of the C99 standard, so it can be safely assumed that this header is present.
inttypes.h contains everything stdint.h includes, but in all cases here, stdint.h suffices.
parent ab00f27f
......@@ -42,12 +42,7 @@
#include "config.h"
#include <stdio.h>
#ifdef HAVE_STDINT_H
#include <stdint.h>
#endif
#ifdef HAVE_INTTYPES_H
#include <inttypes.h>
#endif
#include "SFinternal.h"
#include "xstat.h"
#include <X11/StringDefs.h>
......
......@@ -62,12 +62,7 @@ extern void qsort ();
#include "SFDecls.h"
#ifdef HAVE_STDINT_H
#include <stdint.h>
#endif
#ifdef HAVE_INTTYPES_H
#include <inttypes.h>
#endif
#ifdef HAVE_INTPTR_T
#define INT2PTR(t,v) ((t)(intptr_t)(v))
#define PTR2INT(v) ((Sflong_t)(intptr_t)(v))
......
......@@ -103,12 +103,7 @@ extern char *getwd (char *);
#include <stdlib.h>
#ifdef HAVE_STDINT_H
#include <stdint.h>
#endif
#ifdef HAVE_INTTYPES_H
#include <inttypes.h>
#endif
#ifdef HAVE_INTPTR_T
#define INT2PTR(t,v) ((t)(intptr_t)(v))
#define PTR2INT(v) ((Sflong_t)(intptr_t)(v))
......
......@@ -425,9 +425,9 @@ dnl -----------------------------------
dnl Checks for header files
# AC_HEADER_STDC
AC_CHECK_HEADERS(stdarg.h stddef.h stddef.h stdint.h malloc.h \
AC_CHECK_HEADERS(stdarg.h stddef.h stddef.h malloc.h \
fcntl.h search.h pthread.h values.h float.h limits.h termios.h \
errno.h time.h unistd.h fenv.h strings.h inttypes.h setjmp.h \
errno.h time.h unistd.h fenv.h strings.h setjmp.h \
sys/time.h sys/times.h sys/types.h sys/select.h fpu_control.h \
sys/fpu.h sys/socket.h sys/stat.h sys/mman.h \
sys/ioctl.h sys/inotify.h langinfo.h libintl.h crt_externs.h)
......@@ -3039,12 +3039,7 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>
AC_MSG_CHECKING(if intptr_t is declared)
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdlib.h>
#if HAVE_STDINT_H
#include <stdint.h>
#endif
#if HAVE_INTTYPES_H
#include <inttypes.h>
#endif
#include <stdint.h>
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
......
......@@ -36,12 +36,7 @@
#else
#define assert(x)
#endif
#ifdef HAVE_STDINT_H
#include <stdint.h>
#endif
#ifdef HAVE_INTTYPES_H
#include <inttypes.h>
#endif
#ifndef streq
#define streq(s,t) ((*s == *t) && !strcmp((s),(t)))
......
......@@ -18,12 +18,7 @@
#include "config.h"
#include <stdlib.h>
#ifdef HAVE_STDINT_H
#include <stdint.h>
#endif
#ifdef HAVE_INTTYPES_H
#include <inttypes.h>
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
......
......@@ -14,12 +14,7 @@ extern "C" {
/* needed for intptr_t */
#include "config.h"
#ifdef HAVE_STDINT_H
#include <stdint.h>
#endif
#if HAVE_INTTYPES_H
#include <inttypes.h>
#endif
#include "misc.h"
......
......@@ -12,12 +12,7 @@
*************************************************************************/
#include "config.h"
#ifdef HAVE_STDINT_H
#include <stdint.h>
#endif
#if HAVE_INTTYPES_H
#include <inttypes.h>
#endif
#ifdef HAVE_INTPTR_T
#define INT2PTR(t,v) ((t)(intptr_t)(v))
#else
......
......@@ -13,12 +13,7 @@
#include "config.h"
#ifdef HAVE_STDINT_H
#include <stdint.h>
#endif
#ifdef HAVE_INTTYPES_H
#include <inttypes.h>
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
......
......@@ -18,12 +18,7 @@
#endif
#include <stdlib.h>
#include <stddef.h>
#ifdef HAVE_STDINT_H
#include <stdint.h>
#endif
#ifdef HAVE_INTTYPES_H
#include <inttypes.h>
#endif
#include <string.h>
#include <fcntl.h>
......
......@@ -14,12 +14,7 @@
#include "config.h"
#include <stdlib.h>
#ifdef HAVE_STDINT_H
#include <stdint.h>
#endif
#ifdef HAVE_INTTYPES_H
#include <inttypes.h>
#endif
#include <sys/stat.h>
#include "gvplugin_loadimage.h"
......
......@@ -13,12 +13,7 @@
#include "config.h"
#ifdef HAVE_STDINT_H
#include <stdint.h>
#endif
#ifdef HAVE_INTTYPES_H
#include <inttypes.h>
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
......
......@@ -174,9 +174,6 @@
/* Define if intptr_t is declared */
#define HAVE_INTPTR_T 1
/* Define to 1 if you have the <inttypes.h> header file. */
//#define HAVE_INTTYPES_H 1
/* Define to 1 if you have the <langinfo.h> header file. */
/* #undef HAVE_LANGINFO_H */
......@@ -282,9 +279,6 @@
/* Define to 1 if you have the <stddef.h> header file. */
#define HAVE_STDDEF_H 1
/* Define to 1 if you have the <stdint.h> header file. */
//#define HAVE_STDINT_H 1
/* Define to 1 if you have the `strcasecmp' function. */
//#define HAVE_STRCASECMP 1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment