From aba913436a8521abe405a04ed71388989e1d646f Mon Sep 17 00:00:00 2001 From: Andrew Shadura Date: Sat, 25 Jul 2015 14:44:29 +0200 Subject: Imported Upstream version 0.25.0 --- scripts/mkc_check_sizeof | 108 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100755 scripts/mkc_check_sizeof (limited to 'scripts/mkc_check_sizeof') diff --git a/scripts/mkc_check_sizeof b/scripts/mkc_check_sizeof new file mode 100755 index 0000000..5b35387 --- /dev/null +++ b/scripts/mkc_check_sizeof @@ -0,0 +1,108 @@ +#!/bin/sh + +############################################################ +# Copyright (c) 2009-2010 by Aleksey Cheusov +# +# See LICENSE file in the distribution. +############################################################ + +set -e + +LC_ALL=C +export LC_ALL + +################################################## +# options +usage (){ + cat <" + done > "$tmpc" + cat >> "$tmpc" <"${tmperr}"; then + return 0 + else + return 1 + fi +} + +check_itself (){ + if try_it 2147483647 "$@" + then + for sz in 4 8 2 1 16 12 3 5 6 7 9 10 11 13 14 15; do + if try_it $sz "$@" + then + : + else + echo $sz + return + fi + done + fi + echo failed +} + +check_and_cache "checking for sizeof ${type}" "$cache" "$@" + +################################################## +# clean-ups + +cleanup + +################################################## +# finishing + +printme "$ret\n" 1>&2 +echo $ret -- cgit v1.2.3