changeset 5003:d3dbed4f82b1

* inttostr.h: Assume C89 for <limits.h> and CHAR_BIT. Include <stdint.h> if available.
author Paul Eggert <eggert@cs.ucla.edu>
date Mon, 12 Apr 2004 06:47:06 +0000
parents a74897f80b60
children 0d750c5a291b
files lib/ChangeLog lib/inttostr.h
diffstat 2 files changed, 12 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/lib/ChangeLog
+++ b/lib/ChangeLog
@@ -1,6 +1,12 @@
+2004-04-11  Paul Eggert  <eggert@twinsun.com>
+
+	* inttostr.h: Include <limits.h> unconditionally, since we assume C89.
+	(CHAR_BIT): Remove, since we assume C89.
+	Include <stdint.h> if available, as per current Autoconf CVS advice.
+
 2004-03-30  Paul Eggert  <eggert@twinsun.com>
 
-	* lib/cloexec.h, lib/cloexec.c (set_cloexec_flag): Return int
+	* cloexec.h, cloexec.c (set_cloexec_flag): Return int
 	not bool, to be more consistent with Unix conventions.
 	Suggested by Bruno Haible.
 
--- a/lib/inttostr.h
+++ b/lib/inttostr.h
@@ -1,6 +1,6 @@
 /* inttostr.h -- convert integers to printable strings
 
-   Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2002, 2003, 2004 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
@@ -25,13 +25,11 @@
 #if HAVE_INTTYPES_H
 # include <inttypes.h>
 #endif
-
-#if HAVE_LIMITS_H
-# include <limits.h>
+#if HAVE_STDINT_H
+# include <stdint.h>
 #endif
-#ifndef CHAR_BIT
-# define CHAR_BIT 8
-#endif
+
+#include <limits.h>
 
 #if HAVE_SYS_TYPES_H
 # include <sys/types.h>