Brendan Doyle SMI European Software Centre writes:
> 
> Well for one 'program_invocation_short_name' I know there are 
> alternatives to
> this, but I'm trying to avoid solaris specific #defines in the source.

Filing an RFE is probably the better alternative for something simple
like that.

Of course, if this were my code, I'd do something like this instead:

        if ((cp = strrchr(argv[0], '/')) == NULL)
                cp = argv[0];
        else
                cp++;

That should work on any system, and doesn't require reaching for a
non-portable construct like 'program_invocation_short_name'.

As for the #defines issue, well, writing portable code can sometimes
be hard, but I think it beats trying to coerce all systems to look the
same.

-- 
James Carlson, Solaris Networking              <james.d.carlson at sun.com>
Sun Microsystems / 35 Network Drive        71.232W   Vox +1 781 442 2084
MS UBUR02-212 / Burlington MA 01803-2757   42.496N   Fax +1 781 442 1677

Reply via email to