[Top][All Lists]

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

Re: sig2str and str2sig use in C++

From: Daniel J Sebald
Subject: Re: sig2str and str2sig use in C++
Date: Wed, 05 Jun 2013 11:24:25 -0500
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20111108 Fedora/3.1.16-1.fc14 Thunderbird/3.1.16

On 06/04/2013 12:35 PM, Daniel J Sebald wrote:
On 06/04/2013 02:47 AM, Thien-Thi Nguyen wrote:
() Paul Eggert<address@hidden>
() Mon, 03 Jun 2013 15:28:24 -0700

extern char const allsigstr[];

This would consist of a concatenation of null-terminated strings,
one per name, terminated by an empty string.

[compile time wins]

I seem to recall a paper several years back that argued against this
approach based on ldso issues. Drat, can't dredge the details...

I tried searching the Internet for such issues, but couldn't find any.
What do you recall as being the loader problem? The "extern" part? Or
use of a null string for termination?

I'm just thinking, Paul, if the null termination/index pointer idea were
used throughout the string array, one could continue to use the

int sig2str (int, char *);

function in a backward compatible way.

What was I thinking? That wouldn't be backward compatible. sig2str is copying onto the passed into character string pointer.


reply via email to

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