Changeset View
Changeset View
Standalone View
Standalone View
sys/sys/cdefs.h
Show First 20 Lines • Show All 625 Lines • ▼ Show 20 Lines | |||||
#ifndef __DEVOLATILE | #ifndef __DEVOLATILE | ||||
#define __DEVOLATILE(type, var) ((type)(__uintptr_t)(volatile void *)(var)) | #define __DEVOLATILE(type, var) ((type)(__uintptr_t)(volatile void *)(var)) | ||||
#endif | #endif | ||||
#ifndef __DEQUALIFY | #ifndef __DEQUALIFY | ||||
#define __DEQUALIFY(type, var) ((type)(__uintptr_t)(const volatile void *)(var)) | #define __DEQUALIFY(type, var) ((type)(__uintptr_t)(const volatile void *)(var)) | ||||
#endif | #endif | ||||
#if !defined(_STANDALONE) && !defined(_KERNEL) | |||||
#if defined(__GNUC__) || defined(__PCC__) | |||||
#define __RENAME(x) __asm(__STRING(x)) | |||||
#else | |||||
#error "No function renaming possible" | |||||
imp: I'm torn on this #else...
It means that no compilers that don't define __PCC__ nor __GNUC__… | |||||
#endif /* __GNUC__ */ | |||||
#else /* _STANDALONE || _KERNEL */ | |||||
#define __RENAME(x) no renaming in kernel/standalone environment | |||||
#endif | |||||
/*- | /*- | ||||
* The following definitions are an extension of the behavior originally | * The following definitions are an extension of the behavior originally | ||||
* implemented in <sys/_posix.h>, but with a different level of granularity. | * implemented in <sys/_posix.h>, but with a different level of granularity. | ||||
* POSIX.1 requires that the macros we test be defined before any standard | * POSIX.1 requires that the macros we test be defined before any standard | ||||
* header file is included. | * header file is included. | ||||
* | * | ||||
* Here's a quick run-down of the versions: | * Here's a quick run-down of the versions: | ||||
* defined(_POSIX_SOURCE) 1003.1-1988 | * defined(_POSIX_SOURCE) 1003.1-1988 | ||||
▲ Show 20 Lines • Show All 273 Lines • Show Last 20 Lines |
I'm torn on this #else...
It means that no compilers that don't define PCC nor GNUC will be an automatic error
EVEN IF THEY DONT USE __RENAME()
So that's bad, right? I'd be tempted to either leave it undefined or # it like you do for kernel standalone....