From 511a4370313100c793b53bed34c101909016ba32 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Mon, 6 Jan 2003 12:38:36 +0000 Subject: [PATCH] More consistent inttypes.h / stdint.h handling. --- lib/human.h | 4 ++++ lib/strtoimax.c | 6 +++++- lib/tempname.c | 3 +++ lib/xstrtoimax.c | 6 +++++- lib/xstrtol.h | 9 +++++++-- lib/xstrtoumax.c | 6 +++++- 6 files changed, 29 insertions(+), 5 deletions(-) diff --git a/lib/human.h b/lib/human.h index 4ec9f0da8..84d745e3d 100644 --- a/lib/human.h +++ b/lib/human.h @@ -7,6 +7,10 @@ # if HAVE_INTTYPES_H # include +# else +# if HAVE_STDINT_H +# include +# endif # endif /* A conservative bound on the maximum length of a human-readable string. diff --git a/lib/strtoimax.c b/lib/strtoimax.c index 0f03ca174..6bddf9a87 100644 --- a/lib/strtoimax.c +++ b/lib/strtoimax.c @@ -1,5 +1,5 @@ /* Convert string representation of a number into an intmax_t value. - Copyright 1999, 2001 Free Software Foundation, Inc. + Copyright 1999, 2001, 2002 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -23,6 +23,10 @@ #if HAVE_INTTYPES_H # include +#else +# if HAVE_STDINT_H +# include +# endif #endif #if HAVE_STDLIB_H diff --git a/lib/tempname.c b/lib/tempname.c index 43e9425f0..e30872a70 100644 --- a/lib/tempname.c +++ b/lib/tempname.c @@ -61,6 +61,9 @@ #if HAVE_STDINT_H || _LIBC # include #endif +#if HAVE_INTTYPES_H +# include +#endif #if HAVE_UNISTD_H || _LIBC # include diff --git a/lib/xstrtoimax.c b/lib/xstrtoimax.c index 8937862c2..138be7cf6 100644 --- a/lib/xstrtoimax.c +++ b/lib/xstrtoimax.c @@ -1,5 +1,5 @@ /* xstrtoimax.c -- A more useful interface to strtoimax. - Copyright 2001 Free Software Foundation, Inc. + Copyright 2001-2002 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -23,6 +23,10 @@ #if HAVE_INTTYPES_H # include +#else +# if HAVE_STDINT_H +# include +# endif #endif #define __strtol strtoimax diff --git a/lib/xstrtol.h b/lib/xstrtol.h index 513855f14..a1ad32dd5 100644 --- a/lib/xstrtol.h +++ b/lib/xstrtol.h @@ -1,5 +1,5 @@ /* A more useful interface to strtol. - Copyright 1995, 1996, 1998, 1999, 2001 Free Software Foundation, Inc. + Copyright 1995, 1996, 1998, 1999, 2001, 2002 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -18,8 +18,13 @@ #ifndef XSTRTOL_H_ # define XSTRTOL_H_ 1 +/* Get uintmax_t. */ # if HAVE_INTTYPES_H -# include /* for uintmax_t */ +# include +# else +# if HAVE_STDINT_H +# include +# endif # endif # ifndef PARAMS diff --git a/lib/xstrtoumax.c b/lib/xstrtoumax.c index 04d7cf98a..3237f8533 100644 --- a/lib/xstrtoumax.c +++ b/lib/xstrtoumax.c @@ -1,5 +1,5 @@ /* xstrtoumax.c -- A more useful interface to strtoumax. - Copyright 1999 Free Software Foundation, Inc. + Copyright 1999, 2002 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -23,6 +23,10 @@ #if HAVE_INTTYPES_H # include +#else +# if HAVE_STDINT_H +# include +# endif #endif #define __strtol strtoumax -- 2.11.0