Hallo, dies ist ein Test.
PWD: /www/data-lst1/unixsoft/unixsoft/kaempfer/.public_html
Running in File Mode
Relative path: ./../../../../../../usr/include/sys/ccompile.h
Real path: /usr/include/sys/ccompile.h
Zurück
/* * Copyright (c) 2004, 2023, Oracle and/or its affiliates. */ #ifndef _SYS_CCOMPILE_H #define _SYS_CCOMPILE_H /* * This file contains definitions designed to enable different compilers * to be used harmoniously on Solaris systems. */ #ifdef __cplusplus extern "C" { #endif #include <sys/note.h> /* * Allow for version tests for compiler bugs and features. */ #if defined(__GNUC__) #define __GNUC_VERSION \ (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) #else #define __GNUC_VERSION 0 #endif /* * The SUSv4 (XPG7, UNIX V7) POSIX Conformance Test Suite * does not expect __attribute__ and it causes spurious test failures. */ #if (defined(_XOPEN_SOURCE) || defined(_POSIX_C_SOURCE)) && \ !defined(__cplusplus) && !defined(__EXTENSIONS__) && \ !defined(__ATTRIBUTE_DISABLED) #define __ATTRIBUTE_DISABLED #endif #if (defined(__ATTRIBUTE_IMPLEMENTED) || defined(__GNUC__)) && \ !defined(__ATTRIBUTE_DISABLED) /* * analogous to lint's PRINTFLIKEn */ #define __sun_attr___PRINTFLIKE__(__n) \ __attribute__((__format__(printf, __n, (__n)+1))) #define __sun_attr___VPRINTFLIKE__(__n) \ __attribute__((__format__(printf, __n, 0))) #define __sun_attr___GETTEXTLIKE__(__n) \ __attribute__((__format_arg__(__n))) /* * Handle the kernel printf routines that can take '%b' too */ #if __GNUC_VERSION < 30402 /* * XX64 at least this doesn't work correctly yet with 3.4.1 anyway! */ #define __sun_attr___KPRINTFLIKE__ __sun_attr___PRINTFLIKE__ #define __sun_attr___KVPRINTFLIKE__ __sun_attr___VPRINTFLIKE__ #else #define __sun_attr___KPRINTFLIKE__(__n) \ __attribute__((__format__(cmn_err, __n, (__n)+1))) #define __sun_attr___KVPRINTFLIKE__(__n) \ __attribute__((__format__(cmn_err, __n, 0))) #endif #else /* __ATTRIBUTE_IMPLEMENTED || __GNUC__ */ /* * Studio does not yet implement printf attributes */ #define __sun_attr___PRINTFLIKE__(__n) #define __sun_attr___VPRINTFLIKE__(__n) #define __sun_attr___KPRINTFLIKE__(__n) #define __sun_attr___KVPRINTFLIKE__(__n) #define __sun_attr___GETTEXTLIKE__(__n) #endif /* * Studio does support some attributes in Studio 12 & later releases. */ #if (defined(__ATTRIBUTE_IMPLEMENTED) || defined(__GNUC__) || \ (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))) && \ !defined(__ATTRIBUTE_DISABLED) && defined(__STDC__) /* * This one's pretty obvious -- the function never returns */ #define __sun_attr___noreturn__ __attribute__((__noreturn__)) /* * This is an appropriate label for functions that do not * modify their arguments, e.g. strlen() */ #define __sun_attr___pure__ __attribute__((__pure__)) /* * This is a stronger form of __pure__. Can be used for functions * that do not modify their arguments and don't depend on global * memory. */ #define __sun_attr___const__ __attribute__((__const__)) /* * structure packing like #pragma pack(1) */ #define __sun_attr___packed__ __attribute__((__packed__)) /* The deprecated attribute was added in later Studio releases */ #if (defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x5130))) #define __sun_attr___deprecated__ __attribute__((__deprecated__)) #else #define __sun_attr___deprecated__ /* not available */ #endif /* * Alignment attribute, roughly equivalent to #pragma align */ #define __sun_attr___align__(__n) __attribute__((aligned(__n))) #define ___sun_attr_inner(__a) __sun_attr_##__a #define __sun_attr__(__a) ___sun_attr_inner __a #else /* __ATTRIBUTE_IMPLEMENTED || __GNUC__ || __SUNPRO_C >= 0x590 */ #define __sun_attr__(__a) #endif /* __ATTRIBUTE_IMPLEMENTED || __GNUC__ || __SUNPRO_C >= 0x590 */ /* * Shorthand versions for readability, and to bring in lint annotations * when applicable. * * Put __PRINTFLIKE(n), __VPRINTFLIKE(n), and the K* variants immediately * before the declaration, e.g. * * __PRINTFLIKE(1) int printf(const char *, ...); * * __PRINTFLIKE(1) * int * printf(const char *fmt, ...) * { * ... * } */ #define __PRINTFLIKE(__n) __sun_attr__((__PRINTFLIKE__(__n))) \ _NOTE(PRINTFLIKE(__n)) #define __VPRINTFLIKE(__n) __sun_attr__((__VPRINTFLIKE__(__n))) #define __KPRINTFLIKE(__n) __sun_attr__((__KPRINTFLIKE__(__n))) #define __KVPRINTFLIKE(__n) __sun_attr__((__KVPRINTFLIKE__(__n))) #define __GETTEXTLIKE(__n) __sun_attr__((__GETTEXTLIKE__(__n))) #define __NORETURN __sun_attr__((__noreturn__)) #define __CONST __sun_attr__((__const__)) #define __PURE __sun_attr__((__pure__)) #define __PACKED __sun_attr__((__packed__)) /* __DEPRECATED conflicts with a g++ builtin definition */ #define __ATTR_DEPRECATED __sun_attr__((__deprecated__)) #define __ALIGN(__n) __sun_attr__((__align__(__n))) /* * Macros for suppressing GCC diagnostics. * * Note that GCC_DIAG_RESTORE restores the command line flags to avoid * inadvertently masking additional errors later in the same file, rather than * using the push/pop mechanism. * * _Pragma() is only available in C99 or later. * These pragmas are available in GCC 4.6.4 and later. */ #if __GNUC_VERSION >= 40604 && __STDC_VERSION__ >= 199901L #define __GCC_PRAGMA(x) _Pragma(#x) #define __GCC_DIAG_IGNORED(x) __GCC_PRAGMA(GCC diagnostic ignored #x) #define __GCC_DIAG_RESTORE _Pragma("GCC diagnostic pop") #else #define __GCC_DIAG_IGNORED(x) /* Nothing */ #define __GCC_DIAG_RESTORE /* Nothing */ #endif /* * Used Static: Variables declared static at file scope are subject to being * optimized away by the compiler. __USTATIC prevents such optimizations. * While 'static volatile' can be used directly for this, the use of * __USTATIC also serves as documentation. * * volatile can generate slower code. This is generally not important for * tunables, but is a consideration for those accessed in hot code paths. */ #define __USTATIC static volatile #ifdef __cplusplus } #endif #endif /* _SYS_CCOMPILE_H */