summaryrefslogtreecommitdiff
path: root/sofort
diff options
context:
space:
mode:
Diffstat (limited to 'sofort')
-rw-r--r--sofort/cfgtest.sh20
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;}' \