mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 08:25:20 +09:00
Rename def.h to constants.h
The name "def.h" originates from before the rule of "no needless abbreviations" was established. Let's rename the file to clarify that it contains a collection of various semi-related constants.
This commit is contained in:
@@ -9,32 +9,9 @@
|
||||
#include <sys/sysmacros.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "constants.h"
|
||||
#include "macro-fundamental.h"
|
||||
|
||||
#if !defined(HAS_FEATURE_MEMORY_SANITIZER)
|
||||
# if defined(__has_feature)
|
||||
# if __has_feature(memory_sanitizer)
|
||||
# define HAS_FEATURE_MEMORY_SANITIZER 1
|
||||
# endif
|
||||
# endif
|
||||
# if !defined(HAS_FEATURE_MEMORY_SANITIZER)
|
||||
# define HAS_FEATURE_MEMORY_SANITIZER 0
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if !defined(HAS_FEATURE_ADDRESS_SANITIZER)
|
||||
# ifdef __SANITIZE_ADDRESS__
|
||||
# define HAS_FEATURE_ADDRESS_SANITIZER 1
|
||||
# elif defined(__has_feature)
|
||||
# if __has_feature(address_sanitizer)
|
||||
# define HAS_FEATURE_ADDRESS_SANITIZER 1
|
||||
# endif
|
||||
# endif
|
||||
# if !defined(HAS_FEATURE_ADDRESS_SANITIZER)
|
||||
# define HAS_FEATURE_ADDRESS_SANITIZER 0
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Note: on GCC "no_sanitize_address" is a function attribute only, on llvm it may also be applied to global
|
||||
* variables. We define a specific macro which knows this. Note that on GCC we don't need this decorator so much, since
|
||||
* our primary usecase for this attribute is registration structures placed in named ELF sections which shall not be
|
||||
|
||||
Reference in New Issue
Block a user