bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-gnulib] Re: automatic prototypes


From: Simon Josefsson
Subject: [bug-gnulib] Re: automatic prototypes
Date: Fri, 17 Dec 2004 17:22:00 +0100
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (gnu/linux)

Paul Eggert <address@hidden> writes:

> Something like that might work, I suppose.  Perhaps you could try
> it for a while in one of your packages, and see how well it works
> in practice?

It is now part of todays Shishi release, which built on many
platforms.  Let's see if anyone complains...  However, I don't think
anyone that uses Shishi have a system without strdup.

I think getline would be a better test of this approach.  However, the
getline prototype uses (s)size_t, so config.h would have to #include
<sys/types.h>.  I'm not sure that is a good idea...

Including sys/types.h in config.h probably means config.h must also
contain the contents of alloca.h to make sure it is parsed before
sys/types.h.  This is a slippery slope.

OTOH, alloca.h has always seemed a bit fragile to me, and it might
actually be better to move that definition to config.h.  Further, I
believe alloca is standard in GNU, so following my preferences would
mean that '#include "alloca.h"' inside my core application make the
code unreadable.  So it seems I would actually want the alloca.h
content in config.h.

I'm going to experiment with this approach for alloca and getline.  It
should trigger problems more easily.  If it appears to work, I think
this could be a useful _optional_ feature in gnulib.

Thanks,
Simon





reply via email to

[Prev in Thread] Current Thread [Next in Thread]