Derek Price <[EMAIL PROTECTED]> writes:

> Simon Josefsson wrote:
>
>>Derek Price <[EMAIL PROTECTED]> writes:
>>  
>>
>>>may not be defined.  I've installed the attached patch, ripped verbatim
>>>from serveral other modules.
>>>    
>>>
>>
>>Shouldn't we use the size_max module instead?
>>  
>>
>
> I'm not sure.  Some 18 modules currently don't, defining SIZE_MAX
> themselves.  Do you know why not?  I seem to recall a past discussion on
> this list that decided that replacing 3 lines of code wasn't worth the
> module dependancy, I thought in regards to this module, though I can't
> find the thread.  I think the size_max module is only important if you
> want to use SIZE_MAX as part of a preprocessor conditional - otherwise
> this definition works fine.

Yes, you are right.

> [EMAIL PROTECTED] gnulib]$ fgrep -w 'define SIZE_MAX' lib/*.[hc]
> lib/argp-help.c:# define SIZE_MAX ((size_t) -1)
> lib/backupfile.c:# define SIZE_MAX ((size_t) -1)
> lib/error.c:#  define SIZE_MAX ((size_t) -1)
> lib/fnmatch.c:# define SIZE_MAX ((size_t) -1)
> lib/fts.c:# define SIZE_MAX ((size_t) -1)
> lib/getdelim.c:# define SIZE_MAX ((size_t) -1)
> lib/getndelim2.c:# define SIZE_MAX ((size_t) -1)
> lib/hash.c:# define SIZE_MAX ((size_t) -1)
> lib/human.c:# define SIZE_MAX ((size_t) -1)
> lib/iconvme.c:# define SIZE_MAX ((size_t) -1)
> lib/mountlist.c:# define SIZE_MAX ((size_t) -1)
> lib/quotearg.c:# define SIZE_MAX ((size_t) -1)
> lib/readutmp.c:# define SIZE_MAX ((size_t) -1)
> lib/regex_internal.h:# define SIZE_MAX ((size_t) -1)
> lib/stdint_.h:#define SIZE_MAX (~(size_t)0)
> lib/utimecmp.c:# define SIZE_MAX ((size_t) -1)
> lib/xmalloc.c:# define SIZE_MAX ((size_t) -1)
> lib/xreadlink.c:# define SIZE_MAX ((size_t) -1)
> [EMAIL PROTECTED] gnulib]$
>
>
> Incidentally, the "#define SIZE_MAX (~(size_t)0)" in lib/stdint_.h may
> not be portable:
> <http://lists.gnu.org/archive/html/bug-gnulib/2004-03/msg00022.html>.
>
> Regards,
>
> Derek
>
> -- 
> Derek R. Price
> CVS Solutions Architect
> Ximbiot <http://ximbiot.com>
> v: +1 717.579.6168
> f: +1 717.234.3125
> <mailto:[EMAIL PROTECTED]>


_______________________________________________
bug-gnulib mailing list
bug-gnulib@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-gnulib

Reply via email to