On 05/12/09 12:49, James Carlson wrote: > Brendan Doyle writes: > >> James Carlson wrote: >> >>> These variables are GNU extensions, and should not be used in >>> programs intended to be portable. >>> >>> >> Yeah I'm aware of that, but I didn't write the lib. I'm just trying to >> port it and then >> contribute it back to an Open Source community that currently doesn't >> support Solaris, >> and is resistant to any OS specific #defines. >> > > They've already got OS-specific code. The only question is what to do > about it. > OK non Linux compatible code. I agree it was a poor choice by the initial implementer to use this var. > >> I guess I may have to do this or something like it, I was trying to >> avoid adding >> Solaris specific (I guess to be more correct non GNU specific) stuff to >> the source >> though. >> > > Another possibility would be to define your own global variable called > program_invocation_short_name and create a non-GNU function that > initializes it. You can then use "-zinitarray=yourfunction" when > linking the program to arrange to have that function called before > anything else is called. > >
Yeah that's along the lines of what I was thinking. >>> Still another way to deal with it would be to file an RFE and change >>> libc to include this "feature" ... >>> >>> >> Will do, but what are the chances of that getting done any time soon? >> > > Better if you find a volunteer. But (as another poster pointed out) > it's likely that it would end up only in OpenSolaris. I don't know > what your plans are, but if they include only OpenSolaris, that might > not be too much of a problem. > > That's Not a problem for us, we'll be just doing binary release via the download website to provide support on S10. We'll take the source and do what we need to to make it work for that (we do this already by having a 'compatibility' library that provides missing functions). But I'm guessing even Open Solaris REF won't make it in time time, so interim will be a work around, and then replace when the RFE is available. Thanks -- -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/tools-compilers/attachments/20090512/4b50ead6/attachment.html>