yayahjb / cbflib

CBFlib repository cloned from SF CBFlib repository as of 1 Dec 15
8 stars 20 forks source link

Automatic detection of CBF_DONT_USE_LONG_LONG #24

Open ketsubouchi opened 3 years ago

ketsubouchi commented 3 years ago

CBF_DONT_USE_LONG_LONG could be automated.

Create this checkint.c

include

if LONG_MAX == LLONG_MAX

error LONG=LLONG

endif

Detect by return code such as

$(CC) -E checkint.c || echo #define CBF_DONT_USE_LONG_LONG >> longflag.h

and add #include "longflag.h" to cbf.h