+2006-08-26 Bruno Haible <bruno@clisp.org>
+
+ * modules/inttypes (Files): Add lib/inttypes_.h, remove lib/inttypes.h.
+ Add m4/inttypes.m4, remove m4/_inttypes_h.m4 and m4/include_next.m4.
+ (Makefile.am): Create inttypes.h from inttypes_.h.
+ * modules/stdint (Makefile.am): Substitute also ABSOLUTE_INTTYPES_H.
+
+ * modules/imaxabs: New file.
+
+ * modules/imaxdiv: New file.
+
2006-08-25 Paul Eggert <eggert@cs.ucla.edu>
New config-h module, so that "make" output needn't be cluttered
+2006-08-26 Bruno Haible <bruno@clisp.org>
+
+ * inttypes_.h: New file.
+ * inttypes.h: Remove file.
+ * stdint_.h: Include <inttypes.h> through its absolute filename.
+
+ * imaxabs.c: New file.
+
+ * imaxdiv.c: New file.
+
2006-08-22 Bruno Haible <bruno@clisp.org>
* readutmp.h: Skip most definitions if neither <utmp.h> nor
/* In OpenBSD 3.8, <inttypes.h> includes <machine/types.h>, which defines
int{8,16,32,64}_t, uint{8,16,32,64}_t and __BIT_TYPES_DEFINED__.
<inttypes.h> also defines intptr_t and uintptr_t. */
-# include <inttypes.h>
+# include @ABSOLUTE_INTTYPES_H@
#elif @HAVE_SYS_INTTYPES_H@
/* Solaris 7 <sys/inttypes.h> has the types except the *_fast*_t types, and
the macros except for *_FAST*_*, INTPTR_MIN, PTRDIFF_MIN, PTRDIFF_MAX. */
+2006-08-26 Bruno Haible <bruno@clisp.org>
+
+ * inttypes.m4: New file.
+ * _inttypes_h.m4: Remove file.
+ * inttypes-pri.m4 (gt_INTTYPES_PRI): Also AC_SUBST PRI_MACROS_BROKEN.
+ * stdint.m4 (gl_STDINT_H): Define also ABSOLUTE_INTTYPES_H.
+
+ * imaxabs.m4: New file.
+
+ * imaxdiv.m4: New file.
+
2006-08-25 Paul Eggert <eggert@cs.ucla.edu>
* config-h.m4: New file.
-# inttypes-pri.m4 serial 2 (gettext-0.15)
+# inttypes-pri.m4 serial 3 (gettext-0.15.1)
dnl Copyright (C) 1997-2002, 2006 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
if test "$gt_cv_inttypes_pri_broken" = yes; then
AC_DEFINE_UNQUOTED(PRI_MACROS_BROKEN, 1,
[Define if <inttypes.h> exists and defines unusable PRI* macros.])
+ PRI_MACROS_BROKEN=1
+ else
+ PRI_MACROS_BROKEN=0
fi
+ AC_SUBST([PRI_MACROS_BROKEN])
])
-# stdint.m4 serial 18
+# stdint.m4 serial 19
dnl Copyright (C) 2001-2002, 2004-2006 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl Check for <inttypes.h>.
dnl AC_INCLUDES_DEFAULT defines $ac_cv_header_inttypes_h.
if test $ac_cv_header_inttypes_h = yes; then
+ gl_ABSOLUTE_HEADER([inttypes.h])
+ ABSOLUTE_INTTYPES_H=\"$gl_cv_absolute_inttypes_h\"
HAVE_INTTYPES_H=1
else
+ ABSOLUTE_INTTYPES_H=\"no/such/file/inttypes.h\"
HAVE_INTTYPES_H=0
fi
+ AC_SUBST([ABSOLUTE_INTTYPES_H])
AC_SUBST([HAVE_INTTYPES_H])
dnl Check for <sys/types.h>.
Description:
-A wrapper C99 <inttypes.h> header which will always include <stdint.h>
-(possibly the *almost* C99 compliant GNULIB <stdint.h>) and prototypes for the
-strtoimax & strtoumax functions.
+An <inttypes.h> that nearly conforms to C99.
Files:
-lib/inttypes.h
-m4/include_next.m4
+lib/inttypes_.h
m4/absolute-header.m4
-m4/_inttypes_h.m4
+m4/inttypes-pri.m4
+m4/inttypes.m4
Depends-on:
+stdint
configure.ac:
gl_INTTYPES_H
Makefile.am:
-EXTRA_DIST += inttypes.h
+BUILT_SOURCES += $(INTTYPES_H)
+EXTRA_DIST += inttypes_.h
+
+# We need the following in order to create <inttypes.h> when the system
+# doesn't have one that works with the given compiler.
+inttypes.h: inttypes_.h
+ sed -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \
+ -e 's/@''ABSOLUTE_INTTYPES_H''@/$(ABSOLUTE_INTTYPES_H)/g' \
+ -e 's/@''PRI_MACROS_BROKEN''@/$(PRI_MACROS_BROKEN)/g' \
+ -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \
+ -e 's/@''PRIPTR_PREFIX''@/$(PRIPTR_PREFIX)/g' \
+ -e 's/@''HAVE_DECL_IMAXABS''@/$(HAVE_DECL_IMAXABS)/g' \
+ -e 's/@''HAVE_DECL_IMAXDIV''@/$(HAVE_DECL_IMAXDIV)/g' \
+ -e 's/@''HAVE_DECL_STRTOIMAX''@/$(HAVE_DECL_STRTOIMAX)/g' \
+ -e 's/@''HAVE_DECL_STRTOUMAX''@/$(HAVE_DECL_STRTOUMAX)/g' \
+ < $(srcdir)/inttypes_.h > $@-t
+ mv $@-t $@
+MOSTLYCLEANFILES += inttypes.h inttypes.h-t
Include:
#include <inttypes.h>
stdint.h: stdint_.h
sed -e 's/@''HAVE_WCHAR_H''@/$(HAVE_WCHAR_H)/g' \
-e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \
- -e 's/@''HAVE_SYS_TYPES_H''@/$(HAVE_SYS_TYPES_H)/g' \
-e 's|@''ABSOLUTE_STDINT_H''@|$(ABSOLUTE_STDINT_H)|g' \
+ -e 's/@''HAVE_SYS_TYPES_H''@/$(HAVE_SYS_TYPES_H)/g' \
-e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \
+ -e 's|@''ABSOLUTE_INTTYPES_H''@|$(ABSOLUTE_INTTYPES_H)|g' \
-e 's/@''HAVE_SYS_INTTYPES_H''@/$(HAVE_SYS_INTTYPES_H)/g' \
-e 's/@''HAVE_SYS_BITYPES_H''@/$(HAVE_SYS_BITYPES_H)/g' \
-e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \