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: Bruno Haible
Subject: Re: Port getprogname module to SCO OpenServer
Date: Sun, 04 Oct 2020 04:48:10 +0200
User-agent: KMail/5.1.3 (Linux/4.4.0-189-generic; KDE/5.18.0; x86_64; ; )

Tim Rice wrote:
> 
> Hi Bruno,
> 
> On Sat, 3 Oct 2020, Bruno Haible wrote:
> 
> > Tim Rice wrote:
> > > > +# 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__
> > 
> > If the code depends only on the operating system, let's use a #if for
> > the operating system, not for the compilers (__USLC__). Because the day
> > clang gets ported to that operating systems, the condition would not
> > work any more.
> > 
> > https://sourceforge.net/p/predef/wiki/OperatingSystems/ says that
> > _SCO_DS can be used to test for SCO OpenServer. It seems that you say that
> > __SCO_VERSION__  works as well. So let's use one of these.

> As to __SCO_VERSION__ vs __USLC__ for native compiler, I am fine
> with __SCO_VERSION__ in this case.

Good.

> _SCO_DS is only for Openserver 5 (which the proposed patch will not work for)
> and __SCO_VERSION__ only works for the native compiler on OpenServer 6 and
> UnixWare 7. Sorry I did not make that clear before.
> __sysv5__ works for the GCC 7.3.0 on 6 and 7. If clang is ported, chances
> are extremely high it will also include the __sysv5__ manifest define.

OK. And what about __UNIXWARE__ and __OPENSERVER__ that I see being used [1]?
On which versions are they defined?

As it starts to get confusing, maybe you can clarify things by filling in this
table?

                |  OpenServer 5    |  OpenServer 6   |  UnixWare 7     |
                |                  |                 |                 |
                | native  |  gcc   | native  |  gcc  | native  |  gcc  |
                |         |        |         |       |         |       |
----------------+---------+--------+---------+-------+---------+-------+
_SCO_DS         |         |        |         |       |         |       |
                |         |        |         |       |         |       |
__SCO_VERSION__ |         |        |         |       |         |       |
                |         |        |         |       |         |       |
__UNIXWARE__    |         |        |         |       |         |       |
                |         |        |         |       |         |       |
__OPENSERVER__  |         |        |         |       |         |       |
                |         |        |         |       |         |       |
__sysv5__       |         |        |         |       |         |       |
----------------+---------+--------+---------+-------+---------+-------+

Bruno

[1] 
https://opensource.apple.com/source/X11misc/X11misc-10.1/makedepend/makedepend-1.0.1/imakemdep.h.auto.html




reply via email to

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