[Geany-devel] Adding size_t before release

Lex Trotman elextr at xxxxx
Thu Sep 15 09:52:38 UTC 2011

2011/9/15 Enrico Tröger <enrico.troeger at uvena.de>:
> On Thu, 15 Sep 2011 19:01:55 +1000, Lex wrote:
>>On 15 September 2011 18:50, Thomas Martitz
>><thomas.martitz at student.htw-berlin.de> wrote:
>>> Am 15.09.2011 02:39, schrieb Matthew Brush:
>>>> What I'd like to know is where is size_t defined?  According to
>>>> what I've read, it's supposed to be in stddef.h but I can't find it
>>>> anywhere in GNU libc downloaded the other day.
>>> Should be (also) in string.h, since that's what strlen() returns.
>>Hey Thomas,
>>On my system string.h includes stddef.h with a comment that it is to
>>get the definitions of size_t and NULL.  So it isn't repeated.
> But stddef.h defines the type only if __need_size_t is defined.

I suspect that this is so most of stddef.h can be used for cross
compiles, and only a few peculiar things like size_t need to be
defined by the cross compile headers.

> I personally don't feel like fiddling with this weird stuff and would
> prefer a rather pragmatically solution like:
> a) manually add the size_t definition with some ANSI C default or so

Thats the pragmatic short term answer, so long as it is known for
highlighting purposes.

> b) don't generate c99.tags automatically at all and rather use the
> current one and maybe strip unnecessary stuff out. Most of the contents
> should be rather static as the standard doesn't change that much :)

Yes for C, but C++ also needs size_t defined, and its moving towards
C++11 so things are likely to be changing.

> c) someone else maintains that file :D
> Regards,
> Enr - feeling more and more scared by C - ico

Time to learn Lisp, Haskell, ML, etc?? :)


More information about the Devel mailing list