diff options
author | midipix <writeonce@midipix.org> | 2018-12-22 17:35:24 -0500 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2018-12-22 19:22:26 -0500 |
commit | f66c30c7adb4abbbf89dda560b5e125f4db2b78f (patch) | |
tree | 4741aa921ed92bd5c2705f44420638d5ef3defe3 /sofort | |
parent | 2c68336b5c66fc89a1f906b62ca34b4fa717067e (diff) | |
download | sbpython2-f66c30c7adb4abbbf89dda560b5e125f4db2b78f.tar.bz2 sbpython2-f66c30c7adb4abbbf89dda560b5e125f4db2b78f.tar.xz |
sofort: cfgtest.sh: added cfgtest_code_snippet().
Diffstat (limited to 'sofort')
-rw-r--r-- | sofort/cfgtest.sh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/sofort/cfgtest.sh b/sofort/cfgtest.sh index 7f1555b..b8821bb 100644 --- a/sofort/cfgtest.sh +++ b/sofort/cfgtest.sh @@ -257,6 +257,26 @@ cfgtest_type_size() } +cfgtest_code_snippet() +{ + mb_internal_cflags='' + mb_internal_test="$@" + + for mb_header in $mb_cfgtest_headers; do + mb_internal_cflags="$mb_internal_cflags --include=$mb_header" + done + + printf '%s' "$mb_internal_test" \ + | $mb_cfgtest_cc -S -xc - -o - \ + $mb_cfgtest_cflags \ + $mb_internal_cflags \ + > /dev/null 2>/dev/null \ + || return 1 + + return 0 +} + + cfgtest_library_presence() { printf 'int main(void){return 0;}' \ |