bug-gnulib
[Top][All Lists]
Advanced

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

Re: Port getprogname module to SCO OpenServer


From: Tim Rice
Subject: Re: Port getprogname module to SCO OpenServer
Date: Thu, 1 Oct 2020 11:59:47 -0700 (PDT)
User-agent: Alpine 2.11 (UW2 23 2013-08-11)

Hi Benji,

On Wed, 30 Sep 2020, Benji Wiebe wrote:

> I ported the getprogname module to SCO OpenServer 6 (should also work on OSR5
> and UnixWare). It prevents several OSS packages from building.

No proc filesystem on Openserver 5 so it will not work there. Would
need a different "#ifdef" for 5 anyway.


> I just made it read from /proc/<pid>/cmdline to get the command name. The
> patch is below. Comments are welcome. Thanks!

Note reading /proc/<pid>/cmdline will limit you to a 79 char pathname.
And your program limits to 49.

> 
> +# elif defined __SCO_VERSION__ /* SCO OpenServer/UnixWare */

While __SCO_VERSION__ covers Openserver 6 and UnixWare 7,
what is normally used for 6 and 7 is __USLC__  for the native compiler
and __sysv5__ for gcc

Ie.
# elif defined __USLC__ || defined __sysv5__

-- 
Tim Rice                                Multitalents
tim@multitalents.net





reply via email to

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