#ifndef ____DECC_TYPES_LOADED /* ** Note, that for decc$types.h header we cannot use the name of the header ** file with leading underscores as protecting macro, as we usually do in ** our public header files, because the file name contains dollar sign which ** is not allowed in identifier in strict ANSI mode. This is why we use ** ____DECC_TYPES_LOADED instead of ____DECC$TYPES_LOADED . */ #define ____DECC_TYPES_LOADED /**************************************************************************** ** ** This header file is included by all header files. The purpose of this ** header file is to include those things which are either done by all ** header files or introduce no name space violations by doing so. ** ***************************************************************************** ** Header not defined by any specification or standard ***************************************************************************** **/ /* ************************************************************************* */ /* * * */ /* * HPE CONFIDENTIAL. This software is confidential proprietary software * */ /* * licensed by Hewlett Packard Enterprise Development, LP, and is not * */ /* * authorized to be used, duplicated or disclosed to anyone without the * */ /* * prior written permission of HPE. * */ /* * Copyright 2017 Hewlett Packard Enterprise Development, LP * */ /* * * */ /* * VMS SOFTWARE, INC. CONFIDENTIAL. This software is confidential * */ /* * proprietary software licensed by VMS Software, Inc., and is not * */ /* * authorized to be used, duplicated or disclosed to anyone without * */ /* * the prior written permission of VMS Software, Inc. * */ /* * Copyright 2017-2022 VMS Software, Inc. * */ /* * * */ /* ************************************************************************* */ #pragma __nostandard #define __preferred_base_alignment __quadword /* ** Set up feature test macros */ # if defined _XOPEN_SOURCE_EXTENDED && !defined _XOPEN_SOURCE # define _XOPEN_SOURCE # endif # if defined _XOPEN_SOURCE # if !defined _POSIX_C_SOURCE # define _POSIX_C_SOURCE 2 # endif # if _POSIX_C_SOURCE < 2 # undef _POSIX_C_SOURCE # define _POSIX_C_SOURCE 2 # endif # endif # if defined _POSIX_SOURCE # if !defined _POSIX_C_SOURCE # define _POSIX_C_SOURCE 1 # endif # if _POSIX_C_SOURCE < 1 # undef _POSIX_C_SOURCE /* Use _POSIX_C_SOURCE with a value of 1 */ # define _POSIX_C_SOURCE 1 /* instead of _POSIX_SOURCE (obsolete) */ # endif # endif # if defined _POSIX_C_SOURCE && !defined _ANSI_C_SOURCE # define _ANSI_C_SOURCE # endif # if defined __HIDE_FORBIDDEN_NAMES && !defined _ANSI_C_SOURCE # define _ANSI_C_SOURCE # endif /* ** Define __CRTL_VER_OVERRIDE on the compiler command line to ** override the value of __CRTL_VER. Defining __CRTL_VER_OVERRIDE ** without a value sets __CRTL_VER to the maximum value. */ # if defined __CRTL_VER_OVERRIDE # if __CRTL_VER_OVERRIDE == 1 # undef __CRTL_VER_OVERRIDE # define __CRTL_VER_OVERRIDE 0x7fffffff # endif # if __CRTL_VER_OVERRIDE # if defined __CRTL_VER # undef __CRTL_VER # endif # define __CRTL_VER __CRTL_VER_OVERRIDE # endif # endif /* ** Define __VMS_VER_OVERRIDE on the compiler command line to ** override the value of __VMS_VER. Defining __VMS_VER_OVERRIDE ** without a value sets __VMS_VER to the maximum value. */ # ifdef __VMS_VER_OVERRIDE # if __VMS_VER_OVERRIDE == 1 # undef __VMS_VER_OVERRIDE # define __VMS_VER_OVERRIDE 0x7fffffff # endif # if __VMS_VER_OVERRIDE # ifndef __VMS_VER # undef __VMS_VER # endif # define __VMS_VER __VMS_VER_OVERRIDE # endif # endif /* ** On development versions of OpenVMS the C compiler ** may not be able to set __VMS_VER. ** ** Assume that this version is the highest version ** supported by the C Run-time library. */ # ifndef __VMS_VER # define __VMS_VER 0x7fffffff # endif /* ** If the compiler was not already given a definition for __CRTL_VER, then ** define it now. */ # ifndef __CRTL_VER # if (__VMS_VER > 70260300 && __VMS_VER < 70300000) # define __CRTL_VER 70301000 # else # define __CRTL_VER __VMS_VER # endif # endif /* ** __CRTL_VER was mistakenly set to 70300010 in some ** DECC$SHR images released for VMS 7.2-6C1. In this case ** set __CRTL_VER to 70301000. ** */ # if __CRTL_VER == 70300010 # undef __CRTL_VER # define __CRTL_VER 70301000 # endif /* ** The DEC C RTL relies on the use of extern_prefix support in the compilers. ** The scenario of a customer getting these new headers via DEC C++, while at ** the same time using a compiler before DEC C V5.2 is still supported. */ # if defined(__DECC_VER) # if (__DECC_VER > 50230003) # define __CAN_USE_EXTERN_PREFIX 1 # endif # else # if defined(__DECCXX) # define __CAN_USE_EXTERN_PREFIX 1 # endif # endif /* ** Support for the 'restrict' type qualifier is defined here. ** Define __IOSC_RESTRICT and __XOPEN_RESTRICT appropriately. */ #if __STDC_VERSION__ >= 199901 /* The compiler being used supports the restrict keyword. */ /* Standard C APIs will use the restrict keyword. */ # define __ISOC_RESTRICT restrict # if defined(_XOPEN_SOURCE) && ((_XOPEN_SOURCE + 0) >= 600) /* XOPEN extensions to standard C will use the restrict keyword. */ # define __XOPEN_RESTRICT restrict # else /* Older XOPEN extension APIs do not use the restrict keyword. */ # define __XOPEN_RESTRICT # endif #else /* The compiler being used may not support the restrict keyword. */ # define __ISOC_RESTRICT # define __XOPEN_RESTRICT #endif #if defined(__clang__) # if defined (__cplusplus) # define __WCHAR_T # endif # define __int32 int # define __int64 long long #endif /* ** _USE_STD_STAT: The new standardized stat structure takes the place of ** all prior versions, if you compile with _USE_STD_STAT defined. */ #if defined(_USE_STD_STAT) /* ** The _USE_STD_STAT feature requires extern prefixing support. */ # if !__CAN_USE_EXTERN_PREFIX && !__clang__ # error "_USE_STD_STAT feature macro requires extern prefixing support, unavailable on this platform" # endif /* ** The _USE_STD_STAT feature uses UTC time. Therefore we cannot compile ** this header with _VMS_V6_SOURCE enabled. _VMS_V6_SOURCE implies localtime. */ # if defined(_VMS_V6_SOURCE) # error "Incompatible feature macros: _USE_STD_STAT and _VMS_V6_SOURCE" # endif /* ** The _USE_STD_STAT feature does not honor requests ** for source-code compatibility with DEC C Version 4.0. */ # if defined(_DECC_V4_SOURCE) # error "Incompatible feature macros: _USE_STD_STAT and _DECC_V4_SOURCE" # endif /* ** _USE_STD_STAT implies 64-bit file offsets. */ # define __USE_OFF64_T 1 /* ** _USE_STD_STAT implies 32-bit uid/gid. ** Feature macro _DECC_SHORT_GID_T is inconsistent with __USE_LONG_GID_T, ** but we don't flag it, as the former is overridden by the latter anyway. */ # define __USE_LONG_GID_T 1 /* ** _USE_STD_STAT provides standardized implementations of the following types, ** which are used as the types of some stat (and dirent) structure members. */ typedef unsigned __int64 __dev_t; /* device id */ typedef unsigned __int64 __ino_t; /* file ino */ typedef __int64 blksize_t; /* block size */ typedef __int64 blkcnt_t; /* block count */ /* ** _USE_STD_STAT implies the potential for 64-bit time_t fields. ** We provide a macro for that support here. ** This macro is used in the stat.h header file. ** It should be turned on here if 64-bit time support is implemented. */ # define __USING_64BIT_TIME_T 0 /* ** Set the macro which controls further compilation of this feature. */ # define __USING_STD_STAT 1 #endif #if defined(__clang__) typedef unsigned int fsblkcnt_t, fsfilcnt_t; #else typedef unsigned long fsblkcnt_t, fsfilcnt_t; #endif /* ** In OpenVMS Alpha V7.2-6C1, support for POSIX-style GID/UID ** was introduced with the intention to merge this functionality ** into some future (currently unspecified) release of OpenVMS ** following OpenVMS Alpha V7.3. ** ** POSIX-style GID requires 32-bit gid_t datatype. On a version of ** OpenVMS which supports POSIX-style GID/UID, 32-bit gid_t ** becomes a default meaning, that unless _DECC_SHORT_GID_T, ** _VMS_V6_SOURCE or _DECC_V4_SOURCE macro is defined, __gid_t is declared ** as 'unsigned int' rather than 'unsigned short'. ** ** Since the exact version of OpenVMS Alpha into which the support for ** POSIX-style GID/UID will be merged into has not been determined yet, ** we provide __COE_SYSTEM macro which allows to request 32-bit gid_t ** datatype on a version of VMS other than OpenVMS Alpha V7.2-6C1. Note, ** that defining the __COE_SYSTEM macro on a system that does not support ** POSIX-style GID/UID, can result in generating code which may not ** execute correctly. ** ** Note also, that 32-bit gid_t datatype requires a version of the ** C compiler that supports external prefixing. */ # ifndef __USE_LONG_GID_T # if (__CRTL_VER >= 70301000) && __CAN_USE_EXTERN_PREFIX && \ !defined(_DECC_SHORT_GID_T) && !defined(_VMS_V6_SOURCE) && !defined(_DECC_V4_SOURCE) # define __USE_LONG_GID_T 1 # else # define __USE_LONG_GID_T 0 # endif # endif /* ** On some OpenVMS systems support for files larger than 2 gigabyte ** is available. This feature is enabled by specifying the MACRO _LARGEFILE. ** When enabled all file offsets are accepted and returned as 64-bit values. ** ** This feature requires a version of the C compiler with support ** for #pragma __extern_prefix. ** */ # if __CAN_USE_EXTERN_PREFIX && !defined(_DECC_V4_SOURCE) # ifndef __USE_OFF64_T # if defined(_LARGEFILE) # define __USE_OFF64_T 1 # else # define __USE_OFF64_T 0 # endif # endif # else # undef __USE_OFF64_T # define __USE_OFF64_T 0 # if defined(_LARGEFILE) # error " Support for large files not available before OpenVMS Alpha V7.2" # endif # endif /* ** Support for cname headers is available starting with Version V7.1 of the ** hp C++ compiler. This support can be disabled by defining the macro ** __NONAMESPACE_STD either on CXX command line or in the source file prior ** to inclusion any of C or C++ header file. */ #if (__DECCXX_VER >= 70100000) && !defined(__STD_CFRONT) # if !defined __NONAMESPACE_STD # define __NAMESPACE_STD # endif #endif /* ** Define typedefs which are used throughout the header files. Pointer size ** is only allowed on OpenVMS after V7.0. */ #if __INITIAL_POINTER_SIZE # if (__CRTL_VER < 70000000) # error " Pointer size usage not permitted before OpenVMS Alpha V7.0" # endif # pragma __pointer_size __save # pragma __pointer_size 32 #endif /* ** In ANSI C++, a wchar_t is a builtin type and __WCHAR_T is defined. ** This is only defined in such compilers (> V6.0 C++). */ # ifdef __WCHAR_T # define __wchar_t wchar_t # else typedef unsigned int __wchar_t; # endif typedef unsigned int __id_t; # if defined(__clang__) typedef unsigned long __size_t; typedef long __ssize_t; # else typedef unsigned int __size_t; typedef int __ssize_t; # endif typedef unsigned int __u_int; typedef unsigned int __uid_t; typedef unsigned int __useconds_t; #ifdef __SIGNED_INT_TIME_T /* ** Unix comptability feature. ** This can change behavior of programs relying on the sign bit. */ typedef int __time_t; #else # if defined(__clang__) typedef unsigned int __time_t; # else typedef unsigned long __time_t; # endif #endif typedef unsigned short __gid16_t; typedef unsigned int __gid32_t; # if __USE_LONG_GID_T typedef __gid32_t __gid_t; # else typedef __gid16_t __gid_t; # endif #if !__USING_STD_STAT typedef unsigned short __ino_t; #endif typedef unsigned short __ino16_t; typedef unsigned int __ino32_t; #ifndef ____SIGSET_T # define ____SIGSET_T 1 typedef struct __sigset {unsigned int _set[2];} __sigset_t; #endif typedef unsigned __int64 __ino64_t; #if defined(__clang__) typedef int __key_t; #else typedef long __key_t; #endif typedef unsigned short __mode_t; typedef int __nlink_t; # if __USE_OFF64_T typedef __int64 __off_t; # else typedef int __off_t; # endif typedef int __off32_t; typedef unsigned int __uoff32_t; typedef __int64 __off64_t; typedef unsigned __int64 __uoff64_t; typedef int __pid_t; typedef char *__caddr_t; #if !__USING_STD_STAT typedef char *__dev_t; #endif typedef unsigned int __dev32_t; typedef unsigned __int64 __dev64_t; typedef unsigned int __in_addr_t; typedef unsigned short __in_port_t; typedef unsigned char __sa_family_t; typedef unsigned char __u_char; typedef unsigned short __u_short; typedef unsigned int __u_int; typedef unsigned long __u_long; typedef __wchar_t * __wchar_ptr32; typedef const __wchar_t * __const_wchar_ptr32; typedef int __wint_t; typedef int __wctrans_t; typedef int __wctype_t; struct _iobuf; typedef struct _iobuf *__FILE; typedef __FILE * __FILE_ptr32; typedef char * __char_ptr32; typedef const char * __const_char_ptr32; typedef void * __void_ptr32; typedef const void * __const_void_ptr32; typedef void ** __void_ptr_ptr32; typedef void * const * __void_ptr_const_ptr32; typedef short * __short_ptr32; typedef const short * __const_short_ptr32; typedef unsigned short * __unsigned_short_ptr32; typedef const unsigned short * __const_unsigned_short_ptr32; typedef char ** __char_ptr_ptr32; typedef char * const * __char_ptr_const_ptr32; typedef __u_char * __u_char_ptr32; typedef const __u_char * __const_u_char_ptr32; typedef __u_short * __u_short_ptr32; typedef const __u_short * __const_u_short_ptr32; typedef __u_long * __u_long_ptr32; typedef const __u_long * __const_u_long_ptr32; typedef __int64 * __int64_ptr32; typedef const __int64 * __const_int64_ptr32; typedef unsigned int * __u_int_ptr32; typedef const unsigned int * __const_u_int_ptr32; typedef int * __int_ptr32; typedef const int * __const_int_ptr32; # ifndef __NULL # if defined(__DECCXX) && (__DECCXX_VER >= 60000000) # define __NULL 0 # elif defined(__cplusplus) && defined(__clang__) # define __NULL nullptr # else # define __NULL ((void *) 0) # endif # endif /* ** The ANSI standard defines EOF as a negative integral constant expression. */ # ifndef __EOF # define __EOF (-1) # endif #if defined(__x86_64) /* Verified for x86, John Reagan */ # if defined(__clang__) typedef __builtin_va_list __va_list; # else /* pointer must be 64-bits regardless */ # pragma __required_pointer_size __save # pragma __required_pointer_size __long typedef char *__va_list; # pragma __required_pointer_size __restore # endif #else typedef char *__va_list; #endif #if __INITIAL_POINTER_SIZE # pragma __pointer_size 64 #endif typedef __FILE * __FILE_ptr64; typedef char * __char_ptr64; typedef const char * __const_char_ptr64; typedef char ** __char_ptr_ptr64; typedef char * const * __char_ptr_const_ptr64; typedef void * __void_ptr64; typedef const void * __const_void_ptr64; typedef void ** __void_ptr_ptr64; typedef void * const * __void_ptr_const_ptr64; typedef __size_t * __size_t_ptr64; typedef const __size_t * __const_size_t_ptr64; typedef __wchar_t * __wchar_ptr64; typedef const __wchar_t * __const_wchar_ptr64; typedef __u_char * __u_char_ptr64; typedef const __u_char * __const_u_char_ptr64; typedef __u_short * __u_short_ptr64; typedef const __u_short * __const_u_short_ptr64; typedef __u_long * __u_long_ptr64; typedef const __u_long * __const_u_long_ptr64; typedef unsigned int * __u_int_ptr64; typedef const unsigned int * __const_u_int_ptr64; typedef int * __int_ptr64; typedef const int * __const_int_ptr64; #if __INITIAL_POINTER_SIZE # pragma __pointer_size __restore #endif # pragma __standard # endif /* ____DECC_TYPES_LOADED */