From 0e63b2bbff555e46a8e60baff135a9696e746aa8 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Mon, 9 Jan 2006 13:23:24 +0000 Subject: [PATCH] Cosmetic tweak of SIZE_MAX. --- lib/ChangeLog | 5 +++++ lib/stdint_.h | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/ChangeLog b/lib/ChangeLog index ab6e1a968a..ab57e7952a 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,8 @@ +2006-01-09 Bruno Haible + + * stdint_.h (SIZE_MAX): Write the value without involving negative + numbers. + 2005-10-16 Bruno Haible * stdint_.h: On Linux libc4 and libc5, include and diff --git a/lib/stdint_.h b/lib/stdint_.h index f7d037c253..83073eb118 100644 --- a/lib/stdint_.h +++ b/lib/stdint_.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2001-2002, 2004-2005 Free Software Foundation, Inc. +/* Copyright (C) 2001-2002, 2004-2006 Free Software Foundation, Inc. Written by Bruno Haible, Sam Steingold, Peter Burwood. This file is part of gnulib. @@ -244,8 +244,8 @@ typedef uint32_t uintmax_t; #define SIG_ATOMIC_MIN 0 #define SIG_ATOMIC_MAX 127 -#ifndef SIZE_MAX -# define SIZE_MAX ((size_t) -1) +#ifndef SIZE_MAX /* SIZE_MAX may also be defined in config.h. */ +# define SIZE_MAX (size_t)~(size_t)0) #endif /* wchar_t limits already defined in . */ -- 2.30.2