[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: size_max: remove it?
From: |
Simon Josefsson |
Subject: |
Re: size_max: remove it? |
Date: |
Thu, 27 Apr 2006 18:24:40 +0200 |
User-agent: |
Gnus/5.110005 (No Gnus v0.5) Emacs/22.0.50 (gnu/linux) |
Simon Josefsson <address@hidden> writes:
> There is size_max, which does:
>
> # include <limits.h>
> # if HAVE_STDINT_H
> # include <stdint.h>
> # endif
>
> that doesn't seem compatible with the stdint.h module (I'm assuming
> that the stdint module doesn't define HAVE_STDINT_H). So if there is
> no stdint.h, and limits.h doesn't define SIZE_MAX, this module doesn't
> work.
>
> Is there a reason to keep size_max?
Sorry, I didn't read size_max.m4 which seem to be doing some
interesting things.
Still, is there a reason the size_max.m4 magic shouldn't be merged
into the stdint module?
> The stdint module defines SIZE_MAX too, and appear to be more robust.
>
> Alternatively, I think the size_max.h should contain:
>
> #ifndef SIZE_MAX
> # define SIZE_MAX ((size_t)~(size_t)0)
> #endif
>
> too.
>
> address@hidden:~/src/gnulib$ grep size_max modules/*
> modules/gettext:m4/size_max.m4
> modules/size_max:m4/size_max.m4
> modules/size_max:lib/size_max.h
> modules/size_max:lib_SOURCES += size_max.h
> modules/size_max:#include "size_max.h"
> modules/xsize:size_max
> address@hidden:~/src/gnulib$
Re: size_max: remove it?, Bruno Haible, 2006/04/27