On Thu, 17 May 2001, Jarkko Hietaniemi wrote:

> > >defined(__osf__) && defined(__alpha), I'll fiddle that in.
> > 
> > Is that enough to get it working only on 4.0 and up? Dave said that the 
> 
> Unfortunately I don't think there is a cpp symbol symbol for the OS
> release.  Doesn't seem to be any in either 4.0D or 4.0F.

FWIW: In working with analogs of the predefined macros for CC V5.5-002 on
VMS:

               Traditional spelling      New spelling
                    vms                   __vms
                    VMS                   __VMS
                    vms_version           __vms_VERSION
                    VMS_VERSION           __VMS_VERSION
                                          __VMS_VER
                                          __DECC_VER
                                          __DECCXX_VER
                    vaxc                  __vaxc
                    VAXC                  __VAXC
                    vax11c                __vax11C
                    VAX11C                __VAX11C
                     ---                  __DECC
                     ---                  __STDC__
                                          __MIA

I find that for:

 $ cc -V | awk '/(Compaq|DEC) C/ {print $3}'
 V5.6-082

The following macros do not seem to be defined:

 __OSF_VER __OSF_VERSION __osf_ver __osf_version osf_ver osf_version 

but the following is defined with the aforementioned compiler and is not
documented in the cc man page on Digital UNIX V4.0D  (Rev. 878):

 __DECC_VER == 50690082

it seems to work just like __DECC_VER on VMS.

With cc V6.3-025 on Compaq Tru64 UNIX V5.1 (Rev. 732) I find

 __DECC_VER == 60390025

Peter Prymmer


Reply via email to