List up #define list in C code of my system - githeim/windheim_archive GitHub Wiki

List up #define list in C code of my system

μžμ‹ μ˜ μ‹œμŠ€ν…œμ—μ„œ μ–΄λ–€ system #define이 κ±Έλ €μžˆλŠ”μ§€ μ•Œκ³  싢을 λ•Œκ°€ μžˆλ‹€.

크둜슀 ν”Œλž«νΌ 지원 μ• ν”Œλ¦¬μΌ€μ΄μ…˜ 섀계 μ‹œ μ΄λŸ¬ν•œ macro λ³€μˆ˜ ν™œμš©μ΄ ν•„μš”ν•˜λ‹€.

There are times when you want to know which system #defines are running on your system.

When designing cross-platform support applications, it is necessary to utilize these macro variables.

$ touch foo.h; cpp -dM foo.h
#define __SSP_STRONG__ 3                                                                                                                                                                                                                                                          
#define __DBL_MIN_EXP__ (-1021)                                                                                                                                                                                                                                                   
#define __UINT_LEAST16_MAX__ 0xffff                                                                                                                                                                                                                                               
#define __ATOMIC_ACQUIRE 2                                                                                                                                                                                                                                                        
#define __FLT128_MAX_10_EXP__ 4932                                                                                                                                                                                                                                                
#define __FLT_MIN__ 1.17549435082228750796873653722224568e-38F                                                                                                                                                                                                                    
#define __GCC_IEC_559_COMPLEX 2                                                                                                                                                                                                                                                   
#define __UINT_LEAST8_TYPE__ unsigned char  
...

in case of x86

$ touch foo.h; x86_64-linux-gnu-cpp-11 -dM foo.h 
...
#define __x86_64__ 1
...

in case of aarch64

$  touch foo.h; /opt/toolchains/gcc-linaro-6.5.0-2018.12-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-cpp -dM foo.h
...
#define __aarch64__ 1  
...