[Geany-devel] Adding size_t before release

Enrico Tröger enrico.troeger at xxxxx
Thu Sep 15 09:38:39 UTC 2011


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.
As I previously created the c99.tags, I tried to find out what's going
on but it just turns out weird, read I think I don't understand all of
what is happening with this stuff.
I have a stddef.h in /usr/include/linux but this is mostly empty, it
really only defines NULL.
Then I have
a /usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.6/include/stddef.h
which actually has a definition of size_t as:

#define __SIZE_TYPE__ long unsigned int
...
typedef __SIZE_TYPE__ size_t;

But this definition is surrounded by many ifdefs and I guess since
Geany does -undef in the preprocessing of the tag generation, some of
those ifdef's fails and so the definition of size_t is missing.

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

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 :)

c) someone else maintains that file :D

Regards,
Enr - feeling more and more scared by C - ico

-- 
Get my GPG key from http://www.uvena.de/pub.asc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.geany.org/pipermail/devel/attachments/20110915/62299b66/attachment.pgp>


More information about the Devel mailing list