cpp -dM
を使います。
$ printf '#include <sys/stat.h>' | cpp -dM - | head -5
#define __S_IFBLK 0060000
#define S_ISCHR(mode) __S_ISTYPE((mode), __S_IFCHR)
#define __DBL_MIN_EXP__ (-1021)
#define __UINT_LEAST16_MAX__ 65535
#define __ATOMIC_ACQUIRE 2
マクロ定義を先につけるとプリプロセッサ実行時に適用されます。
$ printf '#include <sys/stat.h>' | cpp -dM - | wc -l
477
$ printf '#define _GNU_SOURCE\n#include <sys/stat.h>' | cpp -dM - | wc -l
495