From: Bruno Haible Date: Fri, 15 Aug 2003 13:12:44 +0000 (+0000) Subject: Update from gnulib. X-Git-Tag: v0.13~362 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dbaa31bf36d09d4644e331d16b5a623e5f965924;p=thirdparty%2Fgettext.git Update from gnulib. --- diff --git a/gettext-tools/lib/ChangeLog b/gettext-tools/lib/ChangeLog index 2f73dab47..64157391e 100644 --- a/gettext-tools/lib/ChangeLog +++ b/gettext-tools/lib/ChangeLog @@ -1,3 +1,11 @@ +2003-05-28 Paul Eggert + + * safe-read.c (CHAR_BIT): Don't define, since is guaranteed + to do that. + * safe-read.c (INT_MAX): Don't define, since 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 * copy-file.c: Include , for size_t. diff --git a/gettext-tools/lib/copy-file.c b/gettext-tools/lib/copy-file.c index 7de2ca63d..198a01417 100644 --- a/gettext-tools/lib/copy-file.c +++ b/gettext-tools/lib/copy-file.c @@ -26,6 +26,7 @@ #include #include +#include #include #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) diff --git a/gettext-tools/lib/safe-read.c b/gettext-tools/lib/safe-read.c index c84c79b92..c21d1cf19 100644 --- a/gettext-tools/lib/safe-read.c +++ b/gettext-tools/lib/safe-read.c @@ -45,22 +45,6 @@ extern int errno; #include -#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