diff options
author | Timothy Pearson <[email protected]> | 2011-12-07 18:20:23 -0600 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2011-12-07 18:20:23 -0600 |
commit | a9eaee5264ab9f85e01789409ff3c6239262fe82 (patch) | |
tree | 2f3f4114a8a97613c81392c69fa26a2353716f37 /gen_art_config.sh.in | |
download | libart-lgpl-a9eaee5264ab9f85e01789409ff3c6239262fe82.tar.gz libart-lgpl-a9eaee5264ab9f85e01789409ff3c6239262fe82.zip |
Initial import of libart 2.3.21
Diffstat (limited to 'gen_art_config.sh.in')
-rw-r--r-- | gen_art_config.sh.in | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/gen_art_config.sh.in b/gen_art_config.sh.in new file mode 100644 index 0000000..79843bc --- /dev/null +++ b/gen_art_config.sh.in @@ -0,0 +1,43 @@ +#!/bin/sh + +# A little utility function to generate header info. +# +# The output of this program is generally written to art_config.h, +# which is installed in libart's include dir. + + +echo "/* Automatically generated by gen_art_config */" +echo +echo "#define ART_SIZEOF_CHAR @ART_SIZEOF_CHAR@" +echo "#define ART_SIZEOF_SHORT @ART_SIZEOF_SHORT@" +echo "#define ART_SIZEOF_INT @ART_SIZEOF_INT@" +echo "#define ART_SIZEOF_LONG @ART_SIZEOF_LONG@" +echo + +if test @ART_SIZEOF_CHAR@ -eq 1; then + echo "typedef unsigned char art_u8;" +else + echo 1>&2 "sizeof(char) != 1" + exit 1 +fi + +if test @ART_SIZEOF_SHORT@ -eq 2; then + echo "typedef unsigned short art_u16;" +else + echo 1>&2 "sizeof(short) != 2" + exit 2 +fi + +if test @ART_SIZEOF_INT@ -eq 4; then + echo "typedef unsigned int art_u32;" +else + if test @ART_SIZEOF_LONG@ -eq 4; then + echo "typedef unsigned long art_u32;" + else + echo 1>&2 "sizeof(int) != 4 and sizeof(long) != 4" + exit 3 + fi +fi + +exit 0 +} |