[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
size_max: remove it?
From: |
Simon Josefsson |
Subject: |
size_max: remove it? |
Date: |
Thu, 27 Apr 2006 18:00:11 +0200 |
User-agent: |
Gnus/5.110005 (No Gnus v0.5) Emacs/22.0.50 (gnu/linux) |
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?
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$
- size_max: remove it?,
Simon Josefsson <=
Re: size_max: remove it?, Bruno Haible, 2006/04/27