]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Update from gnulib.
authorBruno Haible <bruno@clisp.org>
Fri, 15 Aug 2003 13:12:44 +0000 (13:12 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:10:49 +0000 (12:10 +0200)
gettext-tools/lib/ChangeLog
gettext-tools/lib/copy-file.c
gettext-tools/lib/safe-read.c

index 2f73dab47b324b0db6f296fe881cc7058099bb57..64157391ec9d21b72ee1fb98d13e5fce7640bf3e 100644 (file)
@@ -1,3 +1,11 @@
+2003-05-28  Paul Eggert  <eggert@twinsun.com>
+
+       * safe-read.c (CHAR_BIT): Don't define, since <limits.h> is guaranteed
+       to do that.
+       * safe-read.c (INT_MAX): Don't define, since <limits.h> does that.
+       * safe-read.c (TYPE_MINIMUM, TYPE_MAXIMUM): Remove; no longer needed.
+       * safe-read.c: Remove TYPE_SIGNED; no longer needed.
+
 2003-04-25  Bruno Haible  <bruno@clisp.org>
 
        * copy-file.c: Include <stddef.h>, for size_t.
index 7de2ca63d84bc4aac632011dfe81a3ee5bfdf6e2..198a01417f648e7f09b8ea94411a9416bcbfb71c 100644 (file)
@@ -26,6 +26,7 @@
 
 #include <errno.h>
 #include <fcntl.h>
+#include <stddef.h>
 #include <sys/stat.h>
 
 #ifdef HAVE_UNISTD_H
@@ -57,7 +58,7 @@ copy_file_preserving (const char *src_filename, const char *dest_filename)
   int mode;
   int dest_fd;
   char buf[4096];
-  const int buf_size = sizeof (buf);
+  const size_t buf_size = sizeof (buf);
 
   src_fd = open (src_filename, O_RDONLY | O_BINARY);
   if (src_fd < 0 || fstat (src_fd, &statbuf) < 0)
index c84c79b924bdd43b98fd73ad8e9502b8e57a5c25..c21d1cf194004aa02ca07673d8d89d1f9add95c7 100644 (file)
@@ -45,22 +45,6 @@ extern int errno;
 
 #include <limits.h>
 
-#ifndef CHAR_BIT
-# define CHAR_BIT 8
-#endif
-
-/* The extra casts work around common compiler bugs.  */
-#define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
-/* The outer cast is needed to work around a bug in Cray C 5.0.3.0.
-   It is necessary at least when t == time_t.  */
-#define TYPE_MINIMUM(t) ((t) (TYPE_SIGNED (t) \
-                             ? ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1) : (t) 0))
-#define TYPE_MAXIMUM(t) ((t) (~ (t) 0 - TYPE_MINIMUM (t)))
-
-#ifndef INT_MAX
-# define INT_MAX TYPE_MAXIMUM (int)
-#endif
-
 #ifdef SAFE_WRITE
 # define safe_rw safe_write
 # define rw write