bug-gnulib
[Top][All Lists]
Advanced

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

Re: sig2str and str2sig use in C++


From: Bruce Korb
Subject: Re: sig2str and str2sig use in C++
Date: Thu, 13 Jun 2013 13:34:09 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130510 Thunderbird/17.0.6

On 06/13/13 12:32, Daniel J Sebald wrote:
derived from the attached files?

That's pretty nice Bruce.  Please explain how this will be used
in the build process, just so I understand.

Not all users of gnulib necessarily have code generation tools,
so the generated file needs to get checked into gnulib.
I've attached a full patch this time.  So the generated file
("sig2str-def.c") gets built by gnulib maintainers whenever they
need to modify the signal list or change the format of the
resulting sig2str-def.c file.

...  If I'm following,
the first stage is that autoconf (?) will look through all
definitions for those beginning with SIG and then create

Nope.  The thing gets nailed down at compile time based on
what SIGxxx macros get defined in signal.h.  The offsets
to every string are computed by the compiler based on the
text the C pre-processor lets the compiler see.  The list
of potential signals needs to be known by gnulib maintainers.

It feels that we are working toward creating a table that
doesn't group according to the signal number (i.e., synonyms),

Correct.  It is basically unordered, though it is close to
numerical order.  But since it's not 100%, you have to treat
it as unordered.  The ordering is actually the order of the
definitions in sig2str.def.

I suppose that is a more initial
 expectation for how such a thing would be organized.

It does feel a little unusual.

Cheers - Bruce

Attachment: 0001-make-strings-static-const-data-minimizing-fixup.patch
Description: Text Data


reply via email to

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