Index: ChangeLog from Benoît Perrot benoit@lrde.epita.fr 2004-10-31 Benoît Perrot benoit@lrde.epita.fr
* configure.ac: Check <sys/int_limits.h> presence. * src/stdint_.h: Use <sys/int_limits.h> when it is present to define limit macros. A problem occured on our SunOS: <stdint_.h> includes <sys/int_limits.h> through several files, leading to a macro definition clash.
2004-10-30 Benoît Perrot benoit@lrde.epita.fr 2004-10-30 Benoît Perrot benoit@lrde.epita.fr 2004-10-30 Benoît Perrot benoit@lrde.epita.fr
Index: src/stdint_.h --- src/stdint_.h (revision 143) +++ src/stdint_.h (revision 144) @@ -138,6 +138,10 @@
#if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS)
+#if defined(HAVE_SYS_INT_LIMITS_H) +# include <sys/int_limits.h> +#else + /* 7.18.2.1. Limits of exact-width integer types */
#define INT8_MIN -128 @@ -225,6 +229,8 @@ /* wchar_t limits already defined in <stddef.h>. */ /* wint_t limits already defined in <wchar.h>. */
+#endif /* !HAVE_SYS_INT_LIMITS_H */ + #endif
/* 7.18.4. Macros for integer constants */ Index: configure.ac --- configure.ac (revision 143) +++ configure.ac (revision 144) @@ -43,6 +43,8 @@ ## Development environment ------------- CXXFLAGS="${CXXFLAGS} -ansi -Wall -W -D__STDC_LIMIT_MACROS"
+# Check presence of stdint.h +AC_CHECK_HEADERS([sys/int_limits.h]) gl_STDINT_H
## Epilogue ----------------------------