apenwarr-redo/docs/cookbook/c/rc/printf_lld.rc.od
Avery Pennarun 1a3c11f220 redoconf: a stub rc_include() now sources ./redoconf.rc automatically.
This lets us remove the awkward ". ./redoconf.rc" line from zillions
of .od scripts, without paying the price of *always* including that
whole file every time default.do.sh is used.
2019-03-02 04:24:58 -05:00

15 lines
324 B
Text

rc_include rc/CC.rc rc/windows.h.rc rc/Wall.rc
appendln CPPFLAGS "-Werror" # abort if any warnings
prog='
#include <stdio.h>
void test() { printf("%lld", (long long)1); }
'
x=
if ! rc_compile cc link "$prog"; then
x="-D__USE_MINGW_ANSI_STDIO=1"
rc_appendln CPPFLAGS "$x"
rc_compile cc link "$prog"
fi
rc_save