2021-07-29 05:44:12 -07:00
|
|
|
#!/usr/bin/env sh
|
2024-03-26 15:08:14 -07:00
|
|
|
# YES_ZSH YES_BASH YES_DASH YES_ASH
|
2021-07-29 00:37:35 -07:00
|
|
|
|
2021-07-30 17:57:08 -07:00
|
|
|
pre() { ### @-
|
|
|
|
### dump all the `#define`s that `$CC $CPPFLAGS $CFLAGS $LDFLAGS` would result in.
|
|
|
|
###
|
2021-08-01 09:27:25 -07:00
|
|
|
### ```
|
|
|
|
### $ pre | shuf | head -n10
|
|
|
|
### #define __GNUC_MINOR__ 3
|
|
|
|
### #define __SIZEOF_LONG__ 4
|
|
|
|
### #define __UINT_LEAST16_TYPE__ short unsigned int
|
|
|
|
### #define __ORDER_BIG_ENDIAN__ 4321
|
|
|
|
### #define __SIZEOF_FLOAT__ 4
|
|
|
|
### #define __INTMAX_MAX__ 0x7fffffffffffffffLL
|
|
|
|
### #define __INT64_C(c) c ## LL
|
|
|
|
### #define __UINT16_MAX__ 0xffff
|
|
|
|
### #define __DEC64_MANT_DIG__ 16
|
|
|
|
### #define __DBL_HAS_INFINITY__ 1
|
|
|
|
### ```
|
2021-07-29 00:37:35 -07:00
|
|
|
if [ -n "${ZSH_VERSION:-}" ]; then
|
|
|
|
${CC:-gcc} -dM -E - $=CPPFLAGS $=CFLAGS $=LDFLAGS < /dev/null
|
|
|
|
else
|
|
|
|
${CC:-gcc} -dM -E - $CPPFLAGS $CFLAGS $LDFLAGS < /dev/null
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2021-08-02 13:48:46 -07:00
|
|
|
[ -n "${preload+-}" ] || pre "$@"
|