[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [6/7] Proposed patches to remove several inttypes-related dependenci
From: |
Paul Eggert |
Subject: |
Re: [6/7] Proposed patches to remove several inttypes-related dependencies |
Date: |
Fri, 22 Apr 2011 11:40:33 -0700 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.14) Gecko/20110223 Thunderbird/3.1.8 |
On 04/22/11 03:31, Eric Blake wrote:
> An alternative might be to have a new module, inttypes-h, which provides
> the shell replacement header, and keep inttypes as the module that pulls
> in everything C99 related
Yes, thanks, that would be more backward-compatible.
Here's a further patch that does that.
>From 2d615caaac20430b0b94a00798274a37a270d1c7 Mon Sep 17 00:00:00 2001
From: Paul Eggert <address@hidden>
Date: Fri, 22 Apr 2011 11:32:24 -0700
Subject: [PATCH] inttypes-h: new module, containing stripped-down inttypes
* modules/inttypes-h: New file, containing the old inttypes
but without the PRI* and SCN* stuff.
* modules/inttypes: Move most of the contents to modules/inttypes-h.
Replace with a simple dependency on inttypes-h and inttypes-pri-scn.
* modules/imaxabs, modules/imaxdiv, modules/inttostr-tests:
* modules/inttypes-pri-scn, modules/strtoimax, modules/strtoumax:
* modules/xstrtol, modules/xstrtol-tests, modules/xstrtoll-tests:
Depend on inttypes-h, not inttypes.
* NEWS: Update as per above.
---
ChangeLog | 11 ++++++++
NEWS | 5 +---
modules/imaxabs | 2 +-
modules/imaxdiv | 2 +-
modules/inttostr-tests | 2 +-
modules/inttypes | 45 +-------------------------------
modules/inttypes-h | 62 ++++++++++++++++++++++++++++++++++++++++++++++
modules/inttypes-pri-scn | 2 +-
modules/strtoimax | 2 +-
modules/strtoumax | 2 +-
modules/xstrtol | 2 +-
modules/xstrtol-tests | 2 +-
modules/xstrtoll-tests | 2 +-
13 files changed, 85 insertions(+), 56 deletions(-)
create mode 100644 modules/inttypes-h
diff --git a/ChangeLog b/ChangeLog
index fa00429..5d1259f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,16 @@
2011-04-22 Paul Eggert <address@hidden>
+ inttypes-h: new module, containing stripped-down inttypes
+ * modules/inttypes-h: New file, containing the old inttypes
+ but without the PRI* and SCN* stuff.
+ * modules/inttypes: Move most of the contents to modules/inttypes-h.
+ Replace with a simple dependency on inttypes-h and inttypes-pri-scn.
+ * modules/imaxabs, modules/imaxdiv, modules/inttostr-tests:
+ * modules/inttypes-pri-scn, modules/strtoimax, modules/strtoumax:
+ * modules/xstrtol, modules/xstrtol-tests, modules/xstrtoll-tests:
+ Depend on inttypes-h, not inttypes.
+ * NEWS: Update as per above.
+
strtoimax, strtoumax: simplify, port to HP-UX 11.00 64-bit
This supports apps that need pointers to strtoimax and strtoumax,
and ports to HP-UX 11.00 64.bit, which has macros that expand to
diff --git a/NEWS b/NEWS
index 79146b5..3141bf2 100644
--- a/NEWS
+++ b/NEWS
@@ -15,10 +15,7 @@ Date Modules Changes
2011-04-22 inttypes This module no longer arranges for <inttypes.h>
to declare imaxabs; that has been moved to the
imaxabs module. Similarly for imaxdiv, strtoimax,
- and strtoumax. Also, this module no longer
- arranges for <inttypes.h> to define the PRI* and
- SCN* macros correctly; that has been moved to the
- new module inttypes-pri-scn.
+ and strtoumax.
2011-04-19 close-hook This module has been renamed to 'fd-hook' and
generalized.
diff --git a/modules/imaxabs b/modules/imaxabs
index 481486d..7766b82 100644
--- a/modules/imaxabs
+++ b/modules/imaxabs
@@ -6,7 +6,7 @@ lib/imaxabs.c
m4/imaxabs.m4
Depends-on:
-inttypes
+inttypes-h
configure.ac:
gl_FUNC_IMAXABS
diff --git a/modules/imaxdiv b/modules/imaxdiv
index 7eacbc7..24644bd 100644
--- a/modules/imaxdiv
+++ b/modules/imaxdiv
@@ -6,7 +6,7 @@ lib/imaxdiv.c
m4/imaxdiv.m4
Depends-on:
-inttypes
+inttypes-h
configure.ac:
gl_FUNC_IMAXDIV
diff --git a/modules/inttostr-tests b/modules/inttostr-tests
index 48dbe50..f4dc08b 100644
--- a/modules/inttostr-tests
+++ b/modules/inttostr-tests
@@ -4,7 +4,7 @@ tests/test-inttostr.c
Depends-on:
intprops
-inttypes
+inttypes-h
snprintf
configure.ac:
diff --git a/modules/inttypes b/modules/inttypes
index 09442d8..fb7f926 100644
--- a/modules/inttypes
+++ b/modules/inttypes
@@ -2,55 +2,14 @@ Description:
An <inttypes.h> that nearly conforms to C99.
Files:
-lib/inttypes.in.h
-m4/inttypes.m4
Depends-on:
-arg-nonnull
-include_next
-multiarch
-stdint
-warn-on-use
+inttypes-h
+inttypes-pri-scn
configure.ac:
-gl_INTTYPES_H
Makefile.am:
-BUILT_SOURCES += 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.in.h $(top_builddir)/config.status $(WARN_ON_USE_H)
$(ARG_NONNULL_H)
- $(AM_V_GEN)rm -f address@hidden $@ && \
- { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
- sed -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \
- -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
- -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
- -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
- -e 's|@''NEXT_INTTYPES_H''@|$(NEXT_INTTYPES_H)|g' \
- -e 's/@''PRI_MACROS_BROKEN''@/$(PRI_MACROS_BROKEN)/g' \
- -e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \
- -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \
- -e
's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \
- -e 's/@''PRIPTR_PREFIX''@/$(PRIPTR_PREFIX)/g' \
- -e 's/@''GNULIB_IMAXABS''@/$(GNULIB_IMAXABS)/g' \
- -e 's/@''GNULIB_IMAXDIV''@/$(GNULIB_IMAXDIV)/g' \
- -e 's/@''GNULIB_STRTOIMAX''@/$(GNULIB_STRTOIMAX)/g' \
- -e 's/@''GNULIB_STRTOUMAX''@/$(GNULIB_STRTOUMAX)/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' \
- -e 's/@''INT32_MAX_LT_INTMAX_MAX''@/$(INT32_MAX_LT_INTMAX_MAX)/g'
\
- -e 's/@''INT64_MAX_EQ_LONG_MAX''@/$(INT64_MAX_EQ_LONG_MAX)/g' \
- -e
's/@''UINT32_MAX_LT_UINTMAX_MAX''@/$(UINT32_MAX_LT_UINTMAX_MAX)/g' \
- -e 's/@''UINT64_MAX_EQ_ULONG_MAX''@/$(UINT64_MAX_EQ_ULONG_MAX)/g'
\
- -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
- -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
- < $(srcdir)/inttypes.in.h; \
- } > address@hidden && \
- mv address@hidden $@
-MOSTLYCLEANFILES += inttypes.h inttypes.h-t
Include:
<inttypes.h>
diff --git a/modules/inttypes-h b/modules/inttypes-h
new file mode 100644
index 0000000..ce33791
--- /dev/null
+++ b/modules/inttypes-h
@@ -0,0 +1,62 @@
+Description:
+An GNU-like <inttypes.h>.
+
+Files:
+lib/inttypes.in.h
+m4/inttypes.m4
+
+Depends-on:
+arg-nonnull
+include_next
+multiarch
+stdint
+warn-on-use
+
+configure.ac:
+gl_INTTYPES_H
+
+Makefile.am:
+BUILT_SOURCES += 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.in.h $(top_builddir)/config.status $(WARN_ON_USE_H)
$(ARG_NONNULL_H)
+ $(AM_V_GEN)rm -f address@hidden $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ sed -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+ -e 's|@''NEXT_INTTYPES_H''@|$(NEXT_INTTYPES_H)|g' \
+ -e 's/@''PRI_MACROS_BROKEN''@/$(PRI_MACROS_BROKEN)/g' \
+ -e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \
+ -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \
+ -e
's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \
+ -e 's/@''PRIPTR_PREFIX''@/$(PRIPTR_PREFIX)/g' \
+ -e 's/@''GNULIB_IMAXABS''@/$(GNULIB_IMAXABS)/g' \
+ -e 's/@''GNULIB_IMAXDIV''@/$(GNULIB_IMAXDIV)/g' \
+ -e 's/@''GNULIB_STRTOIMAX''@/$(GNULIB_STRTOIMAX)/g' \
+ -e 's/@''GNULIB_STRTOUMAX''@/$(GNULIB_STRTOUMAX)/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' \
+ -e 's/@''INT32_MAX_LT_INTMAX_MAX''@/$(INT32_MAX_LT_INTMAX_MAX)/g'
\
+ -e 's/@''INT64_MAX_EQ_LONG_MAX''@/$(INT64_MAX_EQ_LONG_MAX)/g' \
+ -e
's/@''UINT32_MAX_LT_UINTMAX_MAX''@/$(UINT32_MAX_LT_UINTMAX_MAX)/g' \
+ -e 's/@''UINT64_MAX_EQ_ULONG_MAX''@/$(UINT64_MAX_EQ_ULONG_MAX)/g'
\
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+ < $(srcdir)/inttypes.in.h; \
+ } > address@hidden && \
+ mv address@hidden $@
+MOSTLYCLEANFILES += inttypes.h inttypes.h-t
+
+Include:
+<inttypes.h>
+
+License:
+LGPLv2+
+
+Maintainer:
+all
diff --git a/modules/inttypes-pri-scn b/modules/inttypes-pri-scn
index 76026c5..5295ade 100644
--- a/modules/inttypes-pri-scn
+++ b/modules/inttypes-pri-scn
@@ -6,7 +6,7 @@ m4/inttypes-pri.m4
m4/inttypes-pri-scn.m4
Depends-on:
-inttypes
+inttypes-h
multiarch
configure.ac:
diff --git a/modules/strtoimax b/modules/strtoimax
index df6c88a..8bf32fc 100644
--- a/modules/strtoimax
+++ b/modules/strtoimax
@@ -11,7 +11,7 @@ m4/strtoll.m4
Depends-on:
verify
-inttypes
+inttypes-h
stdint
configure.ac:
diff --git a/modules/strtoumax b/modules/strtoumax
index 4ff989d..11399ce 100644
--- a/modules/strtoumax
+++ b/modules/strtoumax
@@ -12,7 +12,7 @@ m4/strtoull.m4
m4/strtoumax.m4
Depends-on:
-inttypes
+inttypes-h
stdint
verify
diff --git a/modules/xstrtol b/modules/xstrtol
index 3ce76a8..dd725e6 100644
--- a/modules/xstrtol
+++ b/modules/xstrtol
@@ -14,7 +14,7 @@ error
getopt-gnu
gettext-h
intprops
-inttypes
+inttypes-h
configure.ac:
gl_XSTRTOL
diff --git a/modules/xstrtol-tests b/modules/xstrtol-tests
index 1fa29ab..0908770 100644
--- a/modules/xstrtol-tests
+++ b/modules/xstrtol-tests
@@ -5,7 +5,7 @@ tests/test-xstrtoul.c
tests/test-xstrtol.sh
Depends-on:
-inttypes
+inttypes-h
configure.ac:
diff --git a/modules/xstrtoll-tests b/modules/xstrtoll-tests
index bef462a..4cdb260 100644
--- a/modules/xstrtoll-tests
+++ b/modules/xstrtoll-tests
@@ -6,7 +6,7 @@ tests/test-xstrtoull.c
tests/test-xstrtoll.sh
Depends-on:
-inttypes
+inttypes-h
configure.ac:
--
1.7.4.4
- Proposed patches to remove several inttypes-related dependencies, Paul Eggert, 2011/04/22
- Re: Proposed patches to remove several inttypes-related dependencies, Eric Blake, 2011/04/22
- Re: [1/7] Proposed patches to remove several inttypes-related dependencies, Eric Blake, 2011/04/22
- Re: [2/7] Proposed patches to remove several inttypes-related dependencies, Eric Blake, 2011/04/22
- Re: [3/7] Proposed patches to remove several inttypes-related dependencies, Eric Blake, 2011/04/22
- Re: [6/7] Proposed patches to remove several inttypes-related dependencies, Eric Blake, 2011/04/22
- Re: Proposed patches to remove several inttypes-related dependencies, Eric Blake, 2011/04/22
- Re: [1/7] Proposed patches to remove several inttypes-related dependencies, Bruno Haible, 2011/04/24
- Re: [2/7][7/7] Proposed patches to remove several inttypes-related dependencies, Bruno Haible, 2011/04/24
- Re: [3/7][4/7][5/7] Proposed patches to remove several inttypes-related dependencies, Bruno Haible, 2011/04/24
- Re: [6/7] Proposed patches to remove several inttypes-related dependencies, Bruno Haible, 2011/04/24