diff options
author | Stephane Glondu <steph@glondu.net> | 2020-01-24 15:00:44 +0100 |
---|---|---|
committer | Stéphane Glondu <steph@glondu.net> | 2020-01-24 15:00:44 +0100 |
commit | 9dd9cc8be5d69b3a49571d5c892eddf8ad40b4fd (patch) | |
tree | 3b8f94127fd0263f45176504efe895e60e99ac63 | |
parent | 86309805de3fbfa36807a14a35d9d5ddf1e71766 (diff) |
New upstream version 2.1.0
46 files changed, 860 insertions, 2356 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3e257fa --- /dev/null +++ b/.gitignore @@ -0,0 +1,24 @@ +*~ +*.cmi +*.cmo +*.cmx +*.cma +*.cmxa +*.o +*.a +*.so +*.opt + +/autom4te.cache +/bitstring-objinfo +/bitstring_config.ml +/cil-tools/Makefile +/config.h +/config.log +/config.status +/create_test_pattern +/META +/Makefile +/tests/80_testdata/*.actual +/tests/test.bmpp +byteswap.h diff --git a/CHANGES b/CHANGES deleted file mode 100644 index d7bb4c9..0000000 --- a/CHANGES +++ /dev/null @@ -1,1812 +0,0 @@ ------------------------------------------------------------------------- -r197 | richard.wm.jones@gmail.com | 2012-08-10 12:52:44 +0100 (Fri, 10 Aug 2012) | 1 line -Changed paths: - M /trunk/Makefile.in - M /trunk/configure.ac - -Stable OCaml dependencies. ------------------------------------------------------------------------- -r196 | richard.wm.jones@gmail.com | 2012-08-10 12:44:18 +0100 (Fri, 10 Aug 2012) | 31 lines -Changed paths: - M /trunk/bitstring_c.c - -Fix memory leaks and alignment issues (thanks rixed at happyleptic.org) - -First one: a huge memory leak when bitmatching on int64. The reason is -that on my arch (MIPS), which is a ARCH_ALIGN_INT64 arch, the function -to extract int64 calls caml_copy_int64 but you are not supposed to do -that since all functions are declared noalloc (should segfault but -merely leaks memory on my program). See this message of Xavier for -more explanations as to why it's a bug: - -http://caml.inria.fr/pub/ml-archives/caml-list/2010/03/2e386c384c04f4a424acc44a1 -fae3abd.en.html - -So the easy fix would be to remove the noallocs for the int64 functions, -but there is a better way around the issue: instead of assigning a int64 -onto a possibly non 8 bytes aligned memory location we can merely memcpy -the value in there, thus avoiding the extra allocation and the -caml_c_call wrapper. - -While looking at this I stumbled upon the other bug: bitstring_c.c -extract values by assigning a casted rvalue into a properly -stack-allocated local variable. You cannot do that, this is undefined -behavior since it assumes that unaligned reads are permitted. Again, on -my MIPS such unaligned access are (by default) diverted to an exception -handler which (slowly!) fix them on the fly (one can see the errorcount in -/proc/kernel/debug/mips/unaligned_instructions), but on other archs it -could as well result in a sigbus. I believe this would be a problem on -ARM as well. Again, memcpy comes to the rescue. - -The attached patch fixes both issues. - - ------------------------------------------------------------------------- -r195 | richard.wm.jones@gmail.com | 2012-07-20 09:06:08 +0100 (Fri, 20 Jul 2012) | 3 lines -Changed paths: - M /trunk/META.in - -META: Add -parser and -printer options. - - ------------------------------------------------------------------------- -r194 | richard.wm.jones@gmail.com | 2012-04-04 10:40:42 +0100 (Wed, 04 Apr 2012) | 4 lines -Changed paths: - M /trunk/bitstring.ml - -takebits/dropbits: check that n >= 0 -http://code.google.com/p/bitstring/issues/detail?id=18 - - ------------------------------------------------------------------------- -r193 | richard.wm.jones@gmail.com | 2012-03-30 13:49:30 +0100 (Fri, 30 Mar 2012) | 4 lines -Changed paths: - M /trunk/bitstring.ml - -Permissive subbitstring allows a segmentation fault (issue #16). -Fix by mrvn. - - ------------------------------------------------------------------------- -r192 | richard.wm.jones@gmail.com | 2012-01-17 13:24:46 +0000 (Tue, 17 Jan 2012) | 3 lines -Changed paths: - M /trunk/MANIFEST - -Update MANIFEST. - - ------------------------------------------------------------------------- -r191 | richard.wm.jones@gmail.com | 2012-01-17 13:21:57 +0000 (Tue, 17 Jan 2012) | 3 lines -Changed paths: - M /trunk/.depend - M /trunk/configure.ac - -Version 2.0.3. - - ------------------------------------------------------------------------- -r190 | richard.wm.jones@gmail.com | 2012-01-17 13:20:53 +0000 (Tue, 17 Jan 2012) | 5 lines -Changed paths: - M /trunk/bitstring.ml - A /trunk/tests/test_91_concat.ml - -Fix concatenation of non-aligned bitstrings (thanks Phil Tomson). - -This commit includes a regression test. - - ------------------------------------------------------------------------- -r189 | richard.wm.jones@gmail.com | 2012-01-17 13:02:18 +0000 (Tue, 17 Jan 2012) | 5 lines -Changed paths: - M /trunk/pa_bitstring.ml - A /trunk/tests/test_90_bind_as.ml - -In a '{...} as foo' binding, save the original bitstring offset and -length as 'foo'. Before we were saving the running offset and length. -This commit also adds a regression test. (Bug found by Matej Kosik). - - ------------------------------------------------------------------------- -r188 | richard.wm.jones@gmail.com | 2012-01-17 12:44:36 +0000 (Tue, 17 Jan 2012) | 3 lines -Changed paths: - M /trunk/Makefile.in - M /trunk/README - -Add 'make check' as a synonym for 'make test'. - - ------------------------------------------------------------------------- -r187 | richard.wm.jones@gmail.com | 2012-01-17 12:39:09 +0000 (Tue, 17 Jan 2012) | 3 lines -Changed paths: - D /trunk/tests/01_load.ml - D /trunk/tests/02_run.ml - D /trunk/tests/10_match_bits.ml - D /trunk/tests/11_match_ints.ml - D /trunk/tests/15_extract_int.ml - D /trunk/tests/18_extract_32_64_int.ml - D /trunk/tests/20_varsize.ml - D /trunk/tests/30_bitbuffer.ml - D /trunk/tests/31_bitstring_concat.ml - D /trunk/tests/32_bitstring_compare.ml - D /trunk/tests/33_substring.ml - D /trunk/tests/34_takebits.ml - D /trunk/tests/35_load_from_file.ml - D /trunk/tests/40_endianexpr.ml - D /trunk/tests/50_named_pattern.ml - D /trunk/tests/51_open_pattern.ml - D /trunk/tests/60_simple_offset.ml - D /trunk/tests/61_offset_string.ml - D /trunk/tests/62_offset_padding.ml - D /trunk/tests/65_save_offset_to.ml - D /trunk/tests/70_check_and_bind.ml - D /trunk/tests/80_hexdump.ml - A /trunk/tests/test_01_load.ml (from /trunk/tests/01_load.ml:186) - A /trunk/tests/test_02_run.ml (from /trunk/tests/02_run.ml:186) - A /trunk/tests/test_10_match_bits.ml (from /trunk/tests/10_match_bits.ml:186) - A /trunk/tests/test_11_match_ints.ml (from /trunk/tests/11_match_ints.ml:186) - A /trunk/tests/test_15_extract_int.ml (from /trunk/tests/15_extract_int.ml:186) - A /trunk/tests/test_18_extract_32_64_int.ml (from /trunk/tests/18_extract_32_64_int.ml:186) - A /trunk/tests/test_20_varsize.ml (from /trunk/tests/20_varsize.ml:186) - A /trunk/tests/test_30_bitbuffer.ml (from /trunk/tests/30_bitbuffer.ml:186) - A /trunk/tests/test_31_bitstring_concat.ml (from /trunk/tests/31_bitstring_concat.ml:186) - A /trunk/tests/test_32_bitstring_compare.ml (from /trunk/tests/32_bitstring_compare.ml:186) - A /trunk/tests/test_33_substring.ml (from /trunk/tests/33_substring.ml:186) - A /trunk/tests/test_34_takebits.ml (from /trunk/tests/34_takebits.ml:186) - A /trunk/tests/test_35_load_from_file.ml (from /trunk/tests/35_load_from_file.ml:186) - A /trunk/tests/test_40_endianexpr.ml (from /trunk/tests/40_endianexpr.ml:186) - A /trunk/tests/test_50_named_pattern.ml (from /trunk/tests/50_named_pattern.ml:186) - A /trunk/tests/test_51_open_pattern.ml (from /trunk/tests/51_open_pattern.ml:186) - A /trunk/tests/test_60_simple_offset.ml (from /trunk/tests/60_simple_offset.ml:186) - A /trunk/tests/test_61_offset_string.ml (from /trunk/tests/61_offset_string.ml:186) - A /trunk/tests/test_62_offset_padding.ml (from /trunk/tests/62_offset_padding.ml:186) - A /trunk/tests/test_65_save_offset_to.ml (from /trunk/tests/65_save_offset_to.ml:186) - A /trunk/tests/test_70_check_and_bind.ml (from /trunk/tests/70_check_and_bind.ml:186) - A /trunk/tests/test_80_hexdump.ml (from /trunk/tests/80_hexdump.ml:186) - -Rename test programs so the name is a valid OCaml module name. - - ------------------------------------------------------------------------- -r186 | richard.wm.jones | 2010-02-05 14:01:53 +0000 (Fri, 05 Feb 2010) | 2 lines -Changed paths: - M /trunk/TODO - -TODO: Added more suggested features based on feedback from hivex. - ------------------------------------------------------------------------- -r185 | richard.wm.jones | 2010-01-11 13:05:01 +0000 (Mon, 11 Jan 2010) | 2 lines -Changed paths: - M /trunk/META.in - -Fix issue 5: Bitstring cannot be used with other syntax extensions when using ocamlfind - ------------------------------------------------------------------------- -r184 | richard.wm.jones | 2010-01-08 15:13:13 +0000 (Fri, 08 Jan 2010) | 1 line -Changed paths: - M /trunk/configure.ac - -Version 2.0.2 for release. ------------------------------------------------------------------------- -r183 | richard.wm.jones | 2010-01-08 15:10:04 +0000 (Fri, 08 Jan 2010) | 2 lines -Changed paths: - M /trunk/Makefile.in - M /trunk/configure.ac - -Fix handling of OCAML_PKG_* macros for new OCaml autoconf. - ------------------------------------------------------------------------- -r182 | richard.wm.jones | 2010-01-08 14:44:42 +0000 (Fri, 08 Jan 2010) | 2 lines -Changed paths: - M /trunk/configure.ac - -Version 2.0.1 for release. - ------------------------------------------------------------------------- -r181 | richard.wm.jones | 2010-01-08 14:43:45 +0000 (Fri, 08 Jan 2010) | 2 lines -Changed paths: - M /trunk/cil-tools/ext3.c - -CIL example: <linux/fs.h> is now required for <linux/ext3_fs.h> - ------------------------------------------------------------------------- -r180 | richard.wm.jones | 2010-01-08 14:43:07 +0000 (Fri, 08 Jan 2010) | 2 lines -Changed paths: - M /trunk/cil-tools/Makefile.in - -CIL: Include dynlink for OCaml 3.11. - ------------------------------------------------------------------------- -r179 | richard.wm.jones | 2010-01-08 14:28:17 +0000 (Fri, 08 Jan 2010) | 2 lines -Changed paths: - M /trunk/pa_bitstring.ml - -Fix empty case for OCaml 3.11 and above. - ------------------------------------------------------------------------- -r178 | richard.wm.jones | 2010-01-08 14:27:38 +0000 (Fri, 08 Jan 2010) | 2 lines -Changed paths: - M /trunk/Makefile.in - -Fix handling of dynlink in OCaml 3.11 and above. - ------------------------------------------------------------------------- -r177 | richard.wm.jones | 2010-01-08 14:26:23 +0000 (Fri, 08 Jan 2010) | 2 lines -Changed paths: - M /trunk/aclocal.m4 - -Update aclocal.m4 to latest OCaml autoconf macros. - ------------------------------------------------------------------------- -r176 | richard.wm.jones | 2009-07-10 13:22:45 +0100 (Fri, 10 Jul 2009) | 2 lines -Changed paths: - M /trunk/bitstring_c.c - -Fix for ARCH_ALIGN_INT64 platforms (Stephane Glondu). - ------------------------------------------------------------------------- -r175 | richard.wm.jones | 2008-10-17 09:58:29 +0100 (Fri, 17 Oct 2008) | 2 lines -Changed paths: - M /trunk/configure.ac - -Version 2.0.0 for release. - ------------------------------------------------------------------------- -r174 | richard.wm.jones | 2008-10-17 09:58:16 +0100 (Fri, 17 Oct 2008) | 2 lines -Changed paths: - M /trunk/MANIFEST - A /trunk/tests/18_extract_32_64_int.ml - -Add regression test for 32/64-bit aligned fastpath extraction. - ------------------------------------------------------------------------- -r173 | richard.wm.jones | 2008-10-17 09:57:43 +0100 (Fri, 17 Oct 2008) | 2 lines -Changed paths: - M /trunk/pa_bitstring.ml - -On fastpath, 32/64 bit zeros must be allocated each time (Hans Ole Rafaelsen). - ------------------------------------------------------------------------- -r172 | richard.wm.jones | 2008-10-06 09:43:14 +0100 (Mon, 06 Oct 2008) | 1 line -Changed paths: - M /trunk/bitstring.ml - -Fix index checks in get/put functions (jessicah) ------------------------------------------------------------------------- -r171 | toots@rastageeks.org | 2008-08-28 17:44:07 +0100 (Thu, 28 Aug 2008) | 1 line -Changed paths: - M /trunk/Makefile.in - A /trunk/bootstrap - -Added bootstrap and uninstall target ------------------------------------------------------------------------- -r170 | richard.wm.jones | 2008-08-28 10:11:25 +0100 (Thu, 28 Aug 2008) | 1 line -Changed paths: - M /trunk/configure.ac - -Version 1.9.9 for release. ------------------------------------------------------------------------- -r169 | richard.wm.jones | 2008-08-27 14:04:46 +0100 (Wed, 27 Aug 2008) | 1 line -Changed paths: - M /trunk/MANIFEST - -Updated manifest file. ------------------------------------------------------------------------- -r168 | richard.wm.jones | 2008-08-27 14:01:46 +0100 (Wed, 27 Aug 2008) | 1 line -Changed paths: - M /trunk/coverage-report/file0000.html - M /trunk/coverage-report/file0001.html - M /trunk/coverage-report/file0002.html - M /trunk/coverage-report/file0003.html - M /trunk/coverage-report/index.html - -Updated test coverage report. ------------------------------------------------------------------------- -r167 | richard.wm.jones | 2008-08-27 13:58:25 +0100 (Wed, 27 Aug 2008) | 2 lines -Changed paths: - A /trunk/tests/80_hexdump.ml - A /trunk/tests/80_testdata - A /trunk/tests/80_testdata/hex1.expected - A /trunk/tests/80_testdata/hex10.expected - A /trunk/tests/80_testdata/hex1000.expected - A /trunk/tests/80_testdata/hex11.expected - A /trunk/tests/80_testdata/hex12.expected - A /trunk/tests/80_testdata/hex127.expected - A /trunk/tests/80_testdata/hex128.expected - A /trunk/tests/80_testdata/hex13.expected - A /trunk/tests/80_testdata/hex14.expected - A /trunk/tests/80_testdata/hex15.expected - A /trunk/tests/80_testdata/hex16.expected - A /trunk/tests/80_testdata/hex2.expected - A /trunk/tests/80_testdata/hex200.expected - A /trunk/tests/80_testdata/hex3.expected - A /trunk/tests/80_testdata/hex31.expected - A /trunk/tests/80_testdata/hex32.expected - A /trunk/tests/80_testdata/hex33.expected - A /trunk/tests/80_testdata/hex34.expected - A /trunk/tests/80_testdata/hex4.expected - A /trunk/tests/80_testdata/hex47.expected - A /trunk/tests/80_testdata/hex48.expected - A /trunk/tests/80_testdata/hex49.expected - A /trunk/tests/80_testdata/hex5.expected - A /trunk/tests/80_testdata/hex50.expected - A /trunk/tests/80_testdata/hex500.expected - A /trunk/tests/80_testdata/hex6.expected - A /trunk/tests/80_testdata/hex63.expected - A /trunk/tests/80_testdata/hex64.expected - A /trunk/tests/80_testdata/hex65.expected - A /trunk/tests/80_testdata/hex66.expected - A /trunk/tests/80_testdata/hex67.expected - A /trunk/tests/80_testdata/hex7.expected - A /trunk/tests/80_testdata/hex8.expected - A /trunk/tests/80_testdata/hex9.expected - A /trunk/tests/80_testdata/rnd1 - A /trunk/tests/80_testdata/rnd10 - A /trunk/tests/80_testdata/rnd1000 - A /trunk/tests/80_testdata/rnd11 - A /trunk/tests/80_testdata/rnd12 - A /trunk/tests/80_testdata/rnd127 - A /trunk/tests/80_testdata/rnd128 - A /trunk/tests/80_testdata/rnd13 - A /trunk/tests/80_testdata/rnd14 - A /trunk/tests/80_testdata/rnd15 - A /trunk/tests/80_testdata/rnd16 - A /trunk/tests/80_testdata/rnd2 - A /trunk/tests/80_testdata/rnd200 - A /trunk/tests/80_testdata/rnd3 - A /trunk/tests/80_testdata/rnd31 - A /trunk/tests/80_testdata/rnd32 - A /trunk/tests/80_testdata/rnd33 - A /trunk/tests/80_testdata/rnd34 - A /trunk/tests/80_testdata/rnd4 - A /trunk/tests/80_testdata/rnd47 - A /trunk/tests/80_testdata/rnd48 - A /trunk/tests/80_testdata/rnd49 - A /trunk/tests/80_testdata/rnd5 - A /trunk/tests/80_testdata/rnd50 - A /trunk/tests/80_testdata/rnd500 - A /trunk/tests/80_testdata/rnd6 - A /trunk/tests/80_testdata/rnd63 - A /trunk/tests/80_testdata/rnd64 - A /trunk/tests/80_testdata/rnd65 - A /trunk/tests/80_testdata/rnd66 - A /trunk/tests/80_testdata/rnd67 - A /trunk/tests/80_testdata/rnd7 - A /trunk/tests/80_testdata/rnd8 - A /trunk/tests/80_testdata/rnd9 - -Test the hexdump function. - ------------------------------------------------------------------------- -r166 | richard.wm.jones | 2008-08-27 13:56:49 +0100 (Wed, 27 Aug 2008) | 2 lines -Changed paths: - A /trunk/tests/15_extract_int.ml - -Comprehensive test of fixed-size int construct & extract functions. - ------------------------------------------------------------------------- -r165 | richard.wm.jones | 2008-08-27 13:56:11 +0100 (Wed, 27 Aug 2008) | 2 lines -Changed paths: - A /trunk/tests/33_substring.ml - A /trunk/tests/34_takebits.ml - -Test the subbitstring and takebits functions. - ------------------------------------------------------------------------- -r164 | richard.wm.jones | 2008-08-27 13:55:34 +0100 (Wed, 27 Aug 2008) | 1 line -Changed paths: - M /trunk/bitstring.ml - -Fix buggy construct_int64_ne_unsigned and construct_int64_ee_unsigned functions. ------------------------------------------------------------------------- -r163 | richard.wm.jones | 2008-08-27 13:54:57 +0100 (Wed, 27 Aug 2008) | 2 lines -Changed paths: - M /trunk/bitstring_config.ml.in - M /trunk/configure.ac - -Check for 'diff' program (now required to run tests). - ------------------------------------------------------------------------- -r162 | richard.wm.jones | 2008-08-27 12:28:42 +0100 (Wed, 27 Aug 2008) | 1 line -Changed paths: - M /trunk/coverage-report/file0000.html - M /trunk/coverage-report/file0001.html - M /trunk/coverage-report/file0002.html - M /trunk/coverage-report/file0003.html - M /trunk/coverage-report/index.html - -Update coverage report. ------------------------------------------------------------------------- -r161 | richard.wm.jones | 2008-08-27 12:28:18 +0100 (Wed, 27 Aug 2008) | 1 line -Changed paths: - A /trunk/tests/31_bitstring_concat.ml - A /trunk/tests/32_bitstring_compare.ml - A /trunk/tests/35_load_from_file.ml - -Add tests for compare, load, etc. ------------------------------------------------------------------------- -r160 | richard.wm.jones | 2008-08-27 12:27:47 +0100 (Wed, 27 Aug 2008) | 1 line -Changed paths: - M /trunk/Makefile.in - -Fix 'make test' rule. ------------------------------------------------------------------------- -r159 | richard.wm.jones | 2008-08-27 12:26:45 +0100 (Wed, 27 Aug 2008) | 6 lines -Changed paths: - M /trunk/bitstring.ml - M /trunk/bitstring.mli - -Added: - - Bitstring.compare, Bitstring.equals - - Bitstring.t as a synonym for Bitstring.bitstring type - - get and set functions for mutating individual bits (rarely used) - - Bitstring.concat - ------------------------------------------------------------------------- -r158 | richard.wm.jones | 2008-08-26 15:18:50 +0100 (Tue, 26 Aug 2008) | 1 line -Changed paths: - M /trunk/Makefile.in - M /trunk/cil-tools/Makefile.in - -'make clean' rules remove more generated files. ------------------------------------------------------------------------- -r157 | richard.wm.jones | 2008-08-26 10:43:14 +0100 (Tue, 26 Aug 2008) | 1 line -Changed paths: - M /trunk/configure.ac - -Version 1.9.8 for release. ------------------------------------------------------------------------- -r156 | richard.wm.jones | 2008-08-26 10:42:05 +0100 (Tue, 26 Aug 2008) | 2 lines -Changed paths: - M /trunk - M /trunk/MANIFEST - M /trunk/Makefile.in - M /trunk/bitstring.ml - M /trunk/cil-tools/Makefile.in - M /trunk/configure.ac - A /trunk/coverage-report - A /trunk/coverage-report/file0000.html - A /trunk/coverage-report/file0001.html - A /trunk/coverage-report/file0002.html - A /trunk/coverage-report/file0003.html - A /trunk/coverage-report/index.html - A /trunk/coverage-report/style.css - M /trunk/tests - -Use ocaml-bisect to compute coverage of tests. - ------------------------------------------------------------------------- -r155 | richard.wm.jones | 2008-08-26 09:26:23 +0100 (Tue, 26 Aug 2008) | 2 lines -Changed paths: - M /trunk/MANIFEST - -Add byteswap.in.h - ------------------------------------------------------------------------- -r154 | richard.wm.jones | 2008-08-26 09:25:42 +0100 (Tue, 26 Aug 2008) | 1 line -Changed paths: - M /trunk - -Ignore *.so files. ------------------------------------------------------------------------- -r153 | richard.wm.jones | 2008-08-26 09:24:31 +0100 (Tue, 26 Aug 2008) | 2 lines -Changed paths: - M /trunk/Makefile.in - M /trunk/bitstring.ml - M /trunk/bitstring.mli - M /trunk/bitstring_c.c - A /trunk/byteswap.in.h - M /trunk/configure.ac - M /trunk/pa_bitstring.ml - -This patch completes the optimization / fastpaths in C enhancement. - ------------------------------------------------------------------------- -r152 | richard.wm.jones | 2008-08-26 09:22:42 +0100 (Tue, 26 Aug 2008) | 3 lines -Changed paths: - M /trunk/bitstring.ml - M /trunk/bitstring.mli - M /trunk/pa_bitstring.ml - -This large, but mostly mechanical, patch removes an unnecessary tuple -allocation from generated code. - ------------------------------------------------------------------------- -r151 | richard.wm.jones | 2008-08-26 09:21:43 +0100 (Tue, 26 Aug 2008) | 4 lines -Changed paths: - M /trunk/bitstring_persistent.ml - -This patch improves the string_of_* functions in Bitmatch_persistent -so that they can print (many) expressions. At the moment they can -only print stuff like "bind ([expr])" for most expressions. - ------------------------------------------------------------------------- -r150 | richard.wm.jones | 2008-08-26 09:20:41 +0100 (Tue, 26 Aug 2008) | 2 lines -Changed paths: - M /trunk/MANIFEST - M /trunk/Makefile.in - M /trunk/bitstring.ml - A /trunk/bitstring_c.c - -This patch adds the framework for including C code in bitstring. - ------------------------------------------------------------------------- -r149 | richard.wm.jones | 2008-08-26 09:16:01 +0100 (Tue, 26 Aug 2008) | 2 lines -Changed paths: - M /trunk/MANIFEST - A /trunk/benchmarks - A /trunk/benchmarks/parse_ext3_superblock.ml - -Include benchmarks directory. - ------------------------------------------------------------------------- -r148 | richard.wm.jones | 2008-08-26 09:13:48 +0100 (Tue, 26 Aug 2008) | 2 lines -Changed paths: - M /trunk/Makefile.in - M /trunk/configure.ac - -This adds the outline of a benchmark suite to bitstring. - ------------------------------------------------------------------------- -r147 | richard.wm.jones | 2008-08-26 09:13:07 +0100 (Tue, 26 Aug 2008) | 4 lines -Changed paths: - M /trunk/pa_bitstring.ml - -The attached patch is necessary to work around a bug in the parsing in -OCaml 3.10.0 (fixed in 3.10.2 and later). It doesn't affect -performance of the generated code. - ------------------------------------------------------------------------- -r146 | richard.wm.jones | 2008-08-20 17:58:33 +0100 (Wed, 20 Aug 2008) | 2 lines -Changed paths: - M /trunk/bitstring.ml - M /trunk/bitstring.mli - -Added little-endian constructors (thanks to Romain Beauxis and Samuel Mimram). - ------------------------------------------------------------------------- -r145 | richard.wm.jones | 2008-07-17 16:58:23 +0100 (Thu, 17 Jul 2008) | 1 line -Changed paths: - M /trunk/Makefile.in - -Document the bitmatch compatibility library. ------------------------------------------------------------------------- -r142 | richard.wm.jones | 2008-07-17 16:45:56 +0100 (Thu, 17 Jul 2008) | 2 lines -Changed paths: - M /trunk - M /trunk/.depend - M /trunk/MANIFEST - M /trunk/META.in - M /trunk/Makefile.in - M /trunk/README - A /trunk/bitmatch.ml - M /trunk/bitstring.ml - M /trunk/bitstring.mli - M /trunk/bitstring_config.ml.in - M /trunk/bitstring_objinfo.ml - M /trunk/bitstring_persistent.ml - M /trunk/bitstring_persistent.mli - M /trunk/bitstring_types.ml - M /trunk/cil-tools - M /trunk/cil-tools/.depend - M /trunk/cil-tools/Makefile.in - M /trunk/cil-tools/bitstring-import-prefix.h - M /trunk/cil-tools/bitstring_import_c.ml - M /trunk/cil-tools/ext3.c - M /trunk/cil-tools/ext3.ml - M /trunk/cil-tools/task_struct.c - M /trunk/cil-tools/task_struct.ml - M /trunk/configure.ac - M /trunk/create_test_pattern.ml - M /trunk/examples/elf.ml - M /trunk/examples/ext3_superblock.ml - M /trunk/examples/gif.ml - M /trunk/examples/ipv4_header.ml - M /trunk/examples/libpcap.ml - M /trunk/examples/make_ipv4_header.ml - M /trunk/examples/ping.ml - M /trunk/pa_bitstring.ml - M /trunk/tests/01_load.ml - M /trunk/tests/02_run.ml - M /trunk/tests/10_match_bits.ml - M /trunk/tests/11_match_ints.ml - M /trunk/tests/20_varsize.ml - M /trunk/tests/30_bitbuffer.ml - M /trunk/tests/40_endianexpr.ml - M /trunk/tests/50_named_pattern.ml - M /trunk/tests/51_open_pattern.ml - M /trunk/tests/60_simple_offset.ml - M /trunk/tests/61_offset_string.ml - M /trunk/tests/62_offset_padding.ml - M /trunk/tests/65_save_offset_to.ml - M /trunk/tests/70_check_and_bind.ml - -Renaming bitmatch -> bitstring. - ------------------------------------------------------------------------- -r141 | richard.wm.jones | 2008-07-17 16:09:05 +0100 (Thu, 17 Jul 2008) | 1 line -Changed paths: - D /trunk/bitmatch.ml - D /trunk/bitmatch.mli - D /trunk/bitmatch_config.ml.in - D /trunk/bitmatch_objinfo.ml - D /trunk/bitmatch_persistent.ml - D /trunk/bitmatch_persistent.mli - D /trunk/bitmatch_types.ml - A /trunk/bitstring.ml (from /trunk/bitmatch.ml:140) - A /trunk/bitstring.mli (from /trunk/bitmatch.mli:140) - A /trunk/bitstring_config.ml.in (from /trunk/bitmatch_config.ml.in:140) - A /trunk/bitstring_objinfo.ml (from /trunk/bitmatch_objinfo.ml:140) - A /trunk/bitstring_persistent.ml (from /trunk/bitmatch_persistent.ml:140) - A /trunk/bitstring_persistent.mli (from /trunk/bitmatch_persistent.mli:140) - A /trunk/bitstring_types.ml (from /trunk/bitmatch_types.ml:140) - D /trunk/cil-tools/bitmatch-import-prefix.h - D /trunk/cil-tools/bitmatch_import_c.ml - A /trunk/cil-tools/bitstring-import-prefix.h (from /trunk/cil-tools/bitmatch-import-prefix.h:140) - A /trunk/cil-tools/bitstring_import_c.ml (from /trunk/cil-tools/bitmatch_import_c.ml:140) - D /trunk/pa_bitmatch.ml - A /trunk/pa_bitstring.ml (from /trunk/pa_bitmatch.ml:140) - -Rename files and libraries from bitmatch* to bitstring* ------------------------------------------------------------------------- -r140 | richard.wm.jones | 2008-07-17 13:10:58 +0100 (Thu, 17 Jul 2008) | 1 line -Changed paths: - M /trunk/TODO - -Updated TODO file. ------------------------------------------------------------------------- -r139 | richard.wm.jones | 2008-07-17 13:10:05 +0100 (Thu, 17 Jul 2008) | 3 lines -Changed paths: - M /trunk/MANIFEST - M /trunk/configure.ac - -Version 1.9.6 for release. - - Updated MANIFEST. - ------------------------------------------------------------------------- -r138 | richard.wm.jones | 2008-07-17 12:58:14 +0100 (Thu, 17 Jul 2008) | 1 line -Changed paths: - M /trunk/tests/70_check_and_bind.ml - -Improved test. ------------------------------------------------------------------------- -r137 | richard.wm.jones | 2008-07-17 12:56:05 +0100 (Thu, 17 Jul 2008) | 3 lines -Changed paths: - M /trunk/bitmatch.mli - M /trunk/bitmatch_persistent.ml - M /trunk/bitmatch_persistent.mli - M /trunk/pa_bitmatch.ml - M /trunk/tests - A /trunk/tests/70_check_and_bind.ml - -Implement check() and bind() qualifiers. - - Previously check() was called when(). - ------------------------------------------------------------------------- -r136 | richard.wm.jones | 2008-07-17 12:27:13 +0100 (Thu, 17 Jul 2008) | 2 lines -Changed paths: - M /trunk/bitmatch.mli - M /trunk/bitmatch_persistent.ml - M /trunk/bitmatch_persistent.mli - M /trunk/pa_bitmatch.ml - M /trunk/tests - A /trunk/tests/65_save_offset_to.ml - -Implement save_to_offset() and partially implement when() and bind(). - ------------------------------------------------------------------------- -r135 | richard.wm.jones | 2008-07-17 11:33:49 +0100 (Thu, 17 Jul 2008) | 2 lines -Changed paths: - M /trunk/tests/62_offset_padding.ml - -Fix an error message. - ------------------------------------------------------------------------- -r134 | richard.wm.jones | 2008-07-17 09:55:00 +0100 (Thu, 17 Jul 2008) | 2 lines -Changed paths: - M /trunk/TODO - -Added when(), bind() and save_offset_to() to the TODO list. - ------------------------------------------------------------------------- -r133 | richard.wm.jones | 2008-07-17 09:27:01 +0100 (Thu, 17 Jul 2008) | 2 lines -Changed paths: - M /trunk/tests - -Set svn:ignore. - ------------------------------------------------------------------------- -r132 | richard.wm.jones | 2008-07-17 09:26:23 +0100 (Thu, 17 Jul 2008) | 2 lines -Changed paths: - M /trunk/cil-tools/ext3.ml - M /trunk/cil-tools/task_struct.ml - M /trunk/tests/60_simple_offset.ml - M /trunk/tests/61_offset_string.ml - -Set svn:keywords property to Id. - ------------------------------------------------------------------------- -r131 | richard.wm.jones | 2008-07-17 09:25:15 +0100 (Thu, 17 Jul 2008) | 2 lines -Changed paths: - A /trunk/tests/62_offset_padding.ml - -Added offset padding test to test the case when original_off <> 0. - ------------------------------------------------------------------------- -r130 | richard.wm.jones | 2008-07-17 09:24:47 +0100 (Thu, 17 Jul 2008) | 2 lines -Changed paths: - M /trunk/bitmatch.ml - M /trunk/bitmatch.mli - -Implement dropbits, takebits, subbitstring. - ------------------------------------------------------------------------- -r129 | richard.wm.jones | 2008-07-17 09:24:20 +0100 (Thu, 17 Jul 2008) | 2 lines -Changed paths: - M /trunk/pa_bitmatch.ml - -Fix computed offset calculations when original_off <> 0. - ------------------------------------------------------------------------- -r128 | richard.wm.jones | 2008-07-11 12:10:30 +0100 (Fri, 11 Jul 2008) | 1 line -Changed paths: - M /trunk/configure.ac - -Version 1.9.5 for release. ------------------------------------------------------------------------- -r127 | richard.wm.jones | 2008-07-11 12:07:17 +0100 (Fri, 11 Jul 2008) | 1 line -Changed paths: - A /trunk/COPYING - M /trunk/COPYING.LIB - M /trunk/MANIFEST - M /trunk/README - M /trunk/bitmatch.ml - M /trunk/bitmatch.mli - M /trunk/bitmatch_config.ml.in - M /trunk/bitmatch_objinfo.ml - M /trunk/bitmatch_persistent.ml - M /trunk/bitmatch_persistent.mli - M /trunk/bitmatch_types.ml - M /trunk/cil-tools/bitmatch-import-prefix.h - M /trunk/cil-tools/bitmatch_import_c.ml - M /trunk/create_test_pattern.ml - M /trunk/pa_bitmatch.ml - -Clarify licensing for Debian. ------------------------------------------------------------------------- -r126 | richard.wm.jones | 2008-07-11 11:56:31 +0100 (Fri, 11 Jul 2008) | 1 line -Changed paths: - M /trunk/bitmatch.mli - -Fix documentation for how to compile using camlp4 directly. ------------------------------------------------------------------------- -r125 | richard.wm.jones | 2008-07-04 14:40:31 +0100 (Fri, 04 Jul 2008) | 1 line -Changed paths: - M /trunk/configure.ac - -Version 1.9.4 for release. ------------------------------------------------------------------------- -r124 | richard.wm.jones | 2008-07-04 14:40:07 +0100 (Fri, 04 Jul 2008) | 1 line -Changed paths: - M /trunk/META.in - M /trunk/bitmatch.mli - -Somewhat better attempt at a META file. ------------------------------------------------------------------------- -r123 | richard.wm.jones | 2008-07-04 13:35:06 +0100 (Fri, 04 Jul 2008) | 1 line -Changed paths: - M /trunk/pa_bitmatch.ml - -Don't allow zero-length patterns to be loaded from a file ------------------------------------------------------------------------- -r122 | richard.wm.jones | 2008-07-04 13:03:21 +0100 (Fri, 04 Jul 2008) | 1 line -Changed paths: - M /trunk/TODO - -Update status ------------------------------------------------------------------------- -r121 | richard.wm.jones | 2008-07-04 12:03:36 +0100 (Fri, 04 Jul 2008) | 1 line -Changed paths: - M /trunk/configure.ac - -Version 1.9.3 for release. ------------------------------------------------------------------------- -r120 | richard.wm.jones | 2008-07-04 12:03:17 +0100 (Fri, 04 Jul 2008) | 1 line -Changed paths: - M /trunk/Makefile.in - -Include pkg_* ------------------------------------------------------------------------- -r119 | richard.wm.jones | 2008-07-01 15:36:25 +0100 (Tue, 01 Jul 2008) | 1 line -Changed paths: - M /trunk/Makefile.in - M /trunk/configure.ac - -extlib is needed for CIL tools subdir ------------------------------------------------------------------------- -r118 | richard.wm.jones | 2008-07-01 15:21:45 +0100 (Tue, 01 Jul 2008) | 1 line -Changed paths: - M /trunk/TODO - -Note about META file ------------------------------------------------------------------------- -r117 | richard.wm.jones | 2008-07-01 15:15:18 +0100 (Tue, 01 Jul 2008) | 1 line -Changed paths: - M /trunk/cil-tools/.depend - M /trunk/cil-tools/bitmatch_import_c.ml - -Allow bitmatch-import-prefix.h to be installed centrally. ------------------------------------------------------------------------- -r116 | richard.wm.jones | 2008-07-01 15:02:10 +0100 (Tue, 01 Jul 2008) | 1 line -Changed paths: - M /trunk/configure.ac - -Version 1.9.2 for release. ------------------------------------------------------------------------- -r115 | richard.wm.jones | 2008-07-01 15:01:47 +0100 (Tue, 01 Jul 2008) | 1 line -Changed paths: - M /trunk/cil-tools/Makefile.in - M /trunk/cil-tools/ext3.c - M /trunk/cil-tools/ext3.ml - -Some fixes for building bmpp file. ------------------------------------------------------------------------- -r114 | richard.wm.jones | 2008-07-01 13:38:11 +0100 (Tue, 01 Jul 2008) | 1 line -Changed paths: - M /trunk/MANIFEST - -Updated MANIFEST ------------------------------------------------------------------------- -r113 | richard.wm.jones | 2008-07-01 13:37:03 +0100 (Tue, 01 Jul 2008) | 2 lines -Changed paths: - M /trunk/configure.ac - -Version 1.9.1 for release. - ------------------------------------------------------------------------- -r112 | richard.wm.jones | 2008-07-01 13:35:03 +0100 (Tue, 01 Jul 2008) | 2 lines -Changed paths: - M /trunk/cil-tools - M /trunk/cil-tools/Makefile.in - M /trunk/cil-tools/ext3.c - A /trunk/cil-tools/ext3.ml - M /trunk/cil-tools/task_struct.c - A /trunk/cil-tools/task_struct.ml - -CIL examples. - ------------------------------------------------------------------------- -r111 | richard.wm.jones | 2008-07-01 13:34:31 +0100 (Tue, 01 Jul 2008) | 2 lines -Changed paths: - M /trunk/cil-tools/bitmatch_import_c.ml - -Just warn about unimplemented types - they can be safely skipped. - ------------------------------------------------------------------------- -r110 | richard.wm.jones | 2008-07-01 12:38:46 +0100 (Tue, 01 Jul 2008) | 3 lines -Changed paths: - M /trunk/pa_bitmatch.ml - -Refactor raising of Construct_failure exceptions and make the -locations more precise (Bluestorm & RWMJ). - ------------------------------------------------------------------------- -r109 | richard.wm.jones | 2008-07-01 12:26:12 +0100 (Tue, 01 Jul 2008) | 2 lines -Changed paths: - M /trunk/pa_bitmatch.ml - -Make the locations in error messages more specific. - ------------------------------------------------------------------------- -r108 | richard.wm.jones | 2008-07-01 12:19:34 +0100 (Tue, 01 Jul 2008) | 2 lines -Changed paths: - M /trunk/pa_bitmatch.ml - -Refactor constructor and extractor function name generation (Bluestorm). - ------------------------------------------------------------------------- -r107 | richard.wm.jones | 2008-07-01 12:16:18 +0100 (Tue, 01 Jul 2008) | 2 lines -Changed paths: - M /trunk/pa_bitmatch.ml - -Refactor parse_field function (Bluestorm). - ------------------------------------------------------------------------- -r106 | richard.wm.jones | 2008-07-01 12:09:59 +0100 (Tue, 01 Jul 2008) | 2 lines -Changed paths: - M /trunk/pa_bitmatch.ml - -Refactor expr_is_constant (Bluestorm). - ------------------------------------------------------------------------- -r105 | richard.wm.jones | 2008-07-01 11:12:58 +0100 (Tue, 01 Jul 2008) | 2 lines -Changed paths: - M /trunk/tests - A /trunk/tests/61_offset_string.ml - -Added string offset tests. - ------------------------------------------------------------------------- -r104 | richard.wm.jones | 2008-07-01 10:12:39 +0100 (Tue, 01 Jul 2008) | 2 lines -Changed paths: - M /trunk/pa_bitmatch.ml - -Convenience function locfail (thanks to Bluestorm). - ------------------------------------------------------------------------- -r103 | richard.wm.jones | 2008-06-17 16:33:16 +0100 (Tue, 17 Jun 2008) | 1 line -Changed paths: - M /trunk/cil-tools/bitmatch_import_c.ml - -Map 8-bit int element arrays to strings ------------------------------------------------------------------------- -r102 | richard.wm.jones | 2008-06-17 16:32:27 +0100 (Tue, 17 Jun 2008) | 1 line -Changed paths: - M /trunk/TODO - -More items for TODO list ------------------------------------------------------------------------- -r101 | richard.wm.jones | 2008-06-16 22:37:16 +0100 (Mon, 16 Jun 2008) | 1 line -Changed paths: - M /trunk/cil-tools/.depend - M /trunk/cil-tools/Makefile.in - M /trunk/cil-tools/bitmatch_import_c.ml - M /trunk/cil-tools/ext3.c - -Change cil tools to use computed offsets. ------------------------------------------------------------------------- -r100 | richard.wm.jones | 2008-06-16 22:36:56 +0100 (Mon, 16 Jun 2008) | 1 line -Changed paths: - M /trunk/bitmatch_persistent.ml - M /trunk/bitmatch_persistent.mli - M /trunk/pa_bitmatch.ml - -Add string_of_*_field so we can print out fields more accurately. ------------------------------------------------------------------------- -r99 | richard.wm.jones | 2008-06-16 21:34:11 +0100 (Mon, 16 Jun 2008) | 1 line -Changed paths: - M /trunk/.depend - M /trunk/Makefile.in - -Fix dependencies ------------------------------------------------------------------------- -r98 | richard.wm.jones | 2008-06-16 21:33:39 +0100 (Mon, 16 Jun 2008) | 1 line -Changed paths: - M /trunk/tests - A /trunk/tests/60_simple_offset.ml - -Test for offsets ------------------------------------------------------------------------- -r97 | richard.wm.jones | 2008-06-16 21:33:21 +0100 (Mon, 16 Jun 2008) | 1 line -Changed paths: - M /trunk/bitmatch.mli - -Document constructed offsets, zeroes_bitstring, ones_bitstring. ------------------------------------------------------------------------- -r96 | richard.wm.jones | 2008-06-16 21:32:45 +0100 (Mon, 16 Jun 2008) | 1 line -Changed paths: - M /trunk/bitmatch.ml - -Implement construct_bitstring, zeroes_bitstring, ones_bitstring functions. ------------------------------------------------------------------------- -r95 | richard.wm.jones | 2008-06-16 21:30:24 +0100 (Mon, 16 Jun 2008) | 1 line -Changed paths: - M /trunk/pa_bitmatch.ml - -Support for computed offsets in output. Also allow constructed bitstrings of length 0 bits. ------------------------------------------------------------------------- -r94 | richard.wm.jones | 2008-06-16 21:29:24 +0100 (Mon, 16 Jun 2008) | 1 line -Changed paths: - M /trunk/bitmatch_persistent.ml - M /trunk/bitmatch_persistent.mli - -Added computed offset field ------------------------------------------------------------------------- -r93 | richard.wm.jones | 2008-06-13 21:57:35 +0100 (Fri, 13 Jun 2008) | 1 line -Changed paths: - M /trunk/bitmatch_persistent.mli - -Documentation cleanups ------------------------------------------------------------------------- -r92 | richard.wm.jones | 2008-06-13 21:56:02 +0100 (Fri, 13 Jun 2008) | 1 line -Changed paths: - M /trunk/bitmatch_persistent.mli - -Documentation cleanups ------------------------------------------------------------------------- -r91 | richard.wm.jones | 2008-06-13 21:52:06 +0100 (Fri, 13 Jun 2008) | 1 line -Changed paths: - M /trunk/bitmatch.mli - -Documentation cleanups ------------------------------------------------------------------------- -r90 | richard.wm.jones | 2008-06-13 21:07:43 +0100 (Fri, 13 Jun 2008) | 1 line -Changed paths: - M /trunk/bitmatch_persistent.mli - -Documentation clarification. ------------------------------------------------------------------------- -r89 | richard.wm.jones | 2008-06-13 21:06:00 +0100 (Fri, 13 Jun 2008) | 1 line -Changed paths: - M /trunk/bitmatch_persistent.mli - -Clarify how to write multiple patterns to a file ------------------------------------------------------------------------- -r88 | richard.wm.jones | 2008-06-13 17:04:51 +0100 (Fri, 13 Jun 2008) | 1 line -Changed paths: - M /trunk/configure.ac - -Version 1.9 for release. ------------------------------------------------------------------------- -r87 | richard.wm.jones | 2008-06-13 16:58:53 +0100 (Fri, 13 Jun 2008) | 1 line -Changed paths: - M /trunk/MANIFEST - -Update MANIFEST ------------------------------------------------------------------------- -r86 | richard.wm.jones | 2008-06-13 16:56:04 +0100 (Fri, 13 Jun 2008) | 1 line -Changed paths: - M /trunk - M /trunk/Makefile.in - M /trunk/bitmatch.mli - M /trunk/bitmatch_config.ml.in - A /trunk/bitmatch_objinfo.ml - M /trunk/bitmatch_persistent.ml - M /trunk/bitmatch_persistent.mli - M /trunk/cil-tools/Makefile.in - M /trunk/cil-tools/bitmatch-import-prefix.h - M /trunk/cil-tools/ext3.c - M /trunk/cil-tools/task_struct.c - A /trunk/create_test_pattern.ml - M /trunk/pa_bitmatch.ml - M /trunk/tests - M /trunk/tests/40_endianexpr.ml - A /trunk/tests/50_named_pattern.ml - A /trunk/tests/51_open_pattern.ml - -Persistent patterns, save and load to a file. ------------------------------------------------------------------------- -r85 | richard.wm.jones | 2008-06-12 16:46:00 +0100 (Thu, 12 Jun 2008) | 1 line -Changed paths: - M /trunk/.depend - M /trunk/Makefile.in - A /trunk/bitmatch_persistent.ml - A /trunk/bitmatch_persistent.mli - M /trunk/pa_bitmatch.ml - -Split out field handling from pa_bitmatch into a common library, in preparation for pattern persistence. ------------------------------------------------------------------------- -r84 | richard.wm.jones | 2008-06-11 16:04:05 +0100 (Wed, 11 Jun 2008) | 3 lines -Changed paths: - M /trunk/cil-tools/Makefile.in - M /trunk/cil-tools/bitmatch-import-prefix.h - M /trunk/cil-tools/bitmatch_import_c.ml - M /trunk/cil-tools/ext3.c - A /trunk/cil-tools/task_struct.c - -Committing NON-WORKING cil tools directory. This code all needs -to be reworked for when we have reusable bitmatch structures. - ------------------------------------------------------------------------- -r83 | richard.wm.jones | 2008-06-10 22:50:48 +0100 (Tue, 10 Jun 2008) | 1 line -Changed paths: - M /trunk/Makefile.in - M /trunk/README - A /trunk/cil-tools - A /trunk/cil-tools/.depend - A /trunk/cil-tools/Makefile.in - A /trunk/cil-tools/bitmatch-import-prefix.h - A /trunk/cil-tools/bitmatch_import_c.ml - A /trunk/cil-tools/ext3.c - M /trunk/configure.ac - -Started to copy the import tool from libunbin. ------------------------------------------------------------------------- -r81 | richard.wm.jones | 2008-05-21 10:59:21 +0100 (Wed, 21 May 2008) | 1 line -Changed paths: - M /trunk/Makefile.in - -Include CHANGES file in tarball. ------------------------------------------------------------------------- -r80 | richard.wm.jones | 2008-05-21 10:46:39 +0100 (Wed, 21 May 2008) | 2 lines -Changed paths: - M /trunk/MANIFEST - M /trunk/configure.ac - -Version 1.3, updated MANIFEST. - ------------------------------------------------------------------------- -r79 | richard.wm.jones | 2008-05-21 09:59:40 +0100 (Wed, 21 May 2008) | 1 line -Changed paths: - M /trunk/TODO - M /trunk/bitmatch.ml - M /trunk/bitmatch.mli - M /trunk/examples/libpcap.ml - M /trunk/pa_bitmatch.ml - M /trunk/tests - A /trunk/tests/40_endianexpr.ml - -Endianness expressions. ------------------------------------------------------------------------- -r77 | richard.wm.jones | 2008-05-19 10:20:01 +0100 (Mon, 19 May 2008) | 1 line -Changed paths: - M /trunk/MANIFEST - -Updated MANIFEST ------------------------------------------------------------------------- -r76 | richard.wm.jones | 2008-05-19 10:19:27 +0100 (Mon, 19 May 2008) | 1 line -Changed paths: - M /trunk/examples - A /trunk/examples/libpcap.ml - -Added libpcap parsing example. ------------------------------------------------------------------------- -r75 | richard.wm.jones | 2008-05-19 09:16:49 +0100 (Mon, 19 May 2008) | 2 lines -Changed paths: - M /trunk/pa_bitmatch.ml - -When flen is a constant, use the constant integer value instead of flen expr. - ------------------------------------------------------------------------- -r74 | richard.wm.jones | 2008-05-18 23:30:19 +0100 (Sun, 18 May 2008) | 1 line -Changed paths: - M /trunk/configure.ac - -Version 1.2 for release. ------------------------------------------------------------------------- -r73 | richard.wm.jones | 2008-05-18 23:29:50 +0100 (Sun, 18 May 2008) | 1 line -Changed paths: - M /trunk/MANIFEST - -Updated MANIFEST ------------------------------------------------------------------------- -r72 | richard.wm.jones | 2008-05-18 23:28:41 +0100 (Sun, 18 May 2008) | 1 line -Changed paths: - M /trunk/bitmatch.ml - M /trunk/tests - A /trunk/tests/30_bitbuffer.ml - -Fix string_of_bitstring/add_bits handling of non-multiple-of-8-bit length strings, and add a test case. ------------------------------------------------------------------------- -r71 | richard.wm.jones | 2008-05-18 23:27:25 +0100 (Sun, 18 May 2008) | 2 lines -Changed paths: - M /trunk/tests/11_match_ints.ml - -Minor code rearrangement, improve an error message. - ------------------------------------------------------------------------- -r70 | richard.wm.jones | 2008-05-18 22:06:15 +0100 (Sun, 18 May 2008) | 1 line -Changed paths: - M /trunk/tests - A /trunk/tests/11_match_ints.ml - -Added integer matching test. ------------------------------------------------------------------------- -r69 | richard.wm.jones | 2008-05-18 21:54:08 +0100 (Sun, 18 May 2008) | 2 lines -Changed paths: - M /trunk/tests - M /trunk/tests/01_load.ml - A /trunk/tests/02_run.ml - A /trunk/tests/10_match_bits.ml - -Bit-matching test. - ------------------------------------------------------------------------- -r68 | richard.wm.jones | 2008-05-18 21:11:19 +0100 (Sun, 18 May 2008) | 1 line -Changed paths: - M /trunk/examples/elf.ml - -Seems that the ELF fields are little-endian. ------------------------------------------------------------------------- -r67 | richard.wm.jones | 2008-05-18 21:00:45 +0100 (Sun, 18 May 2008) | 1 line -Changed paths: - M /trunk/MANIFEST - D /trunk/examples/.cvsignore - D /trunk/tests/.cvsignore - -Updated MANIFEST and removed .cvsignore files. ------------------------------------------------------------------------- -r66 | richard.wm.jones | 2008-05-18 20:58:56 +0100 (Sun, 18 May 2008) | 1 line -Changed paths: - M /trunk/configure.ac - -Version 1.1 for release. ------------------------------------------------------------------------- -r65 | richard.wm.jones | 2008-05-18 20:58:17 +0100 (Sun, 18 May 2008) | 1 line -Changed paths: - M /trunk/examples - A /trunk/examples/gif.ml - -Added GIF parsing example. ------------------------------------------------------------------------- -r64 | richard.wm.jones | 2008-05-18 20:44:58 +0100 (Sun, 18 May 2008) | 1 line -Changed paths: - M /trunk/Makefile.in - M /trunk/TODO - M /trunk/bitmatch.ml - M /trunk/bitmatch.mli - M /trunk/bitmatch_config.ml.in - M /trunk/bitmatch_types.ml - M /trunk/examples/elf.ml - M /trunk/examples/ext3_superblock.ml - M /trunk/examples/ipv4_header.ml - M /trunk/examples/make_ipv4_header.ml - M /trunk/examples/ping.ml - M /trunk/pa_bitmatch.ml - M /trunk/tests/01_load.ml - M /trunk/tests/20_varsize.ml - -Enable svn:keywords Id property on relevant files. ------------------------------------------------------------------------- -r63 | richard.wm.jones | 2008-05-18 20:29:03 +0100 (Sun, 18 May 2008) | 1 line -Changed paths: - M /trunk/examples - A /trunk/examples/elf.ml - -ELF parsing example. ------------------------------------------------------------------------- -r62 | richard.wm.jones | 2008-05-18 20:28:22 +0100 (Sun, 18 May 2008) | 2 lines -Changed paths: - M /trunk/Makefile.in - -Make examples depend upon library. - ------------------------------------------------------------------------- -r61 | richard.wm.jones | 2008-05-18 20:23:13 +0100 (Sun, 18 May 2008) | 1 line -Changed paths: - D /trunk/examples/ipv4.ping - D /trunk/examples/ipv6.ping - A /trunk/examples/ping.ipv4 (from /trunk/examples/ipv4.ping:60) - A /trunk/examples/ping.ipv6 (from /trunk/examples/ipv6.ping:60) - M /trunk/examples/ping.ml - -More consistent naming of files. ------------------------------------------------------------------------- -r60 | richard.wm.jones | 2008-05-18 20:21:59 +0100 (Sun, 18 May 2008) | 2 lines -Changed paths: - A /trunk/examples/ext3_sb (from /trunk/tests/ext3_sb:57) - A /trunk/examples/ext3_superblock.ml (from /trunk/tests/70_ext3_sb.ml:57) - A /trunk/examples/ipv4.ping (from /trunk/tests/ipv4.ping:57) - A /trunk/examples/ipv6.ping (from /trunk/tests/ipv6.ping:57) - A /trunk/examples/ping.ml (from /trunk/tests/60_ping.ml:57) - D /trunk/tests/03_hexdump.ml - D /trunk/tests/05_bits.ml - D /trunk/tests/06_ints1.ml - D /trunk/tests/06_ints2.ml - D /trunk/tests/06_ints3.ml - D /trunk/tests/10_constr1.ml - D /trunk/tests/10_constr2.ml - D /trunk/tests/60_ping.ml - D /trunk/tests/70_ext3_sb.ml - D /trunk/tests/ext3_sb - D /trunk/tests/ipv4.ping - D /trunk/tests/ipv6.ping - -Removed obsolete tests, and moved some tests into examples. - ------------------------------------------------------------------------- -r59 | richard.wm.jones | 2008-05-18 20:05:08 +0100 (Sun, 18 May 2008) | 2 lines -Changed paths: - M /trunk - M /trunk/examples - -Fix svnignore in the examples subdirectory. - ------------------------------------------------------------------------- -r58 | richard.wm.jones | 2008-05-18 20:03:58 +0100 (Sun, 18 May 2008) | 2 lines -Changed paths: - M /trunk - M /trunk/Makefile.in - M /trunk/README - -Added rules to build examples. - ------------------------------------------------------------------------- -r57 | richard.wm.jones | 2008-05-18 20:03:22 +0100 (Sun, 18 May 2008) | 2 lines -Changed paths: - M /trunk/examples/make_ipv4_header.ml - -Fix this example so it now works. - ------------------------------------------------------------------------- -r56 | richard.wm.jones | 2008-05-18 20:02:54 +0100 (Sun, 18 May 2008) | 2 lines -Changed paths: - M /trunk/bitmatch.ml - M /trunk/bitmatch.mli - -Implement bitstring_to_chan, bitstring_to_file. - ------------------------------------------------------------------------- -r55 | richard.wm.jones | 2008-05-18 19:32:01 +0100 (Sun, 18 May 2008) | 2 lines -Changed paths: - M /trunk - M /trunk/.depend - M /trunk/MANIFEST - M /trunk/Makefile.in - M /trunk/bitmatch.ml - M /trunk/bitmatch.mli - A /trunk/bitmatch_config.ml.in - A /trunk/bitmatch_types.ml - M /trunk/configure.ac - M /trunk/pa_bitmatch.ml - -Implement the nativeendian version of some functions. - ------------------------------------------------------------------------- -r54 | richard.wm.jones | 2008-05-18 19:30:08 +0100 (Sun, 18 May 2008) | 2 lines -Changed paths: - M /trunk/examples/ipv4_header.ml - M /trunk/examples/make_ipv4_header.ml - -Fix examples to use the new syntax. - ------------------------------------------------------------------------- -r53 | richard.wm.jones | 2008-05-18 17:42:38 +0100 (Sun, 18 May 2008) | 1 line -Changed paths: - M /trunk/TODO - -Updated TODO ------------------------------------------------------------------------- -r52 | richard.wm.jones | 2008-05-18 17:13:50 +0100 (Sun, 18 May 2008) | 2 lines -Changed paths: - M /trunk/configure.ac - -Version 1.0 for release. - ------------------------------------------------------------------------- -r51 | richard.wm.jones | 2008-05-18 17:13:09 +0100 (Sun, 18 May 2008) | 1 line -Changed paths: - M /trunk/pa_bitmatch.ml - -Allow '_' to be used to ignore more types of bitstring when matching. ------------------------------------------------------------------------- -r50 | richard.wm.jones | 2008-05-18 17:03:04 +0100 (Sun, 18 May 2008) | 2 lines -Changed paths: - M /trunk/MANIFEST - M /trunk/Makefile.in - -Fix check-manifest rule to work with Subversion. - ------------------------------------------------------------------------- -r49 | richard.wm.jones | 2008-05-18 16:52:49 +0100 (Sun, 18 May 2008) | 2 lines -Changed paths: - M /trunk/pa_bitmatch.ml - -Polymorphic 'field' type. - ------------------------------------------------------------------------- -r48 | richard.wm.jones | 2008-05-18 16:39:29 +0100 (Sun, 18 May 2008) | 5 lines -Changed paths: - M /trunk - D /trunk/.cvsignore - M /trunk/TODO - M /trunk/bitmatch.mli - M /trunk/pa_bitmatch.ml - -More complete handling of constant field length expressions. -More TODO line items. -Set svnignore and remove old cvsignore file. -Fix link to bitmatch home page. - ------------------------------------------------------------------------- -r47 | rjones | 2008-05-12 21:32:55 +0100 (Mon, 12 May 2008) | 2 lines -Changed paths: - M /trunk/bitmatch.ml - M /trunk/configure.ac - -Fix extracting in little-endian case. - ------------------------------------------------------------------------- -r46 | rjones | 2008-05-08 22:28:28 +0100 (Thu, 08 May 2008) | 2 lines -Changed paths: - M /trunk/bitmatch.ml - M /trunk/bitmatch.mli - M /trunk/configure.ac - -Added extract_int64_le_unsigned, version 0.8 for release. - ------------------------------------------------------------------------- -r45 | rjones | 2008-05-07 15:56:53 +0100 (Wed, 07 May 2008) | 2 lines -Changed paths: - M /trunk/bitmatch.ml - M /trunk/bitmatch.mli - -Missing exception arg to construct_bit, and added construct_int32_be_unsigned. - ------------------------------------------------------------------------- -r44 | rjones | 2008-05-07 15:41:03 +0100 (Wed, 07 May 2008) | 2 lines -Changed paths: - M /trunk/META.in - M /trunk/Makefile.in - -Requires unix - new version 0.7 candidate for release. - ------------------------------------------------------------------------- -r43 | rjones | 2008-05-07 15:37:00 +0100 (Wed, 07 May 2008) | 2 lines -Changed paths: - M /trunk/TODO - M /trunk/bitmatch.ml - M /trunk/bitmatch.mli - M /trunk/configure.ac - -Added construct_string, version 0.7 for release. - ------------------------------------------------------------------------- -r42 | rjones | 2008-04-26 21:35:02 +0100 (Sat, 26 Apr 2008) | 2 lines -Changed paths: - M /trunk/bitmatch.ml - M /trunk/bitmatch.mli - -bitstring_of_string and bitstring_of_*_max functions. - ------------------------------------------------------------------------- -r41 | rjones | 2008-04-25 16:07:30 +0100 (Fri, 25 Apr 2008) | 2 lines -Changed paths: - M /trunk/configure.ac - -Version 0.6 for release. - ------------------------------------------------------------------------- -r40 | rjones | 2008-04-25 15:57:11 +0100 (Fri, 25 Apr 2008) | 2 lines -Changed paths: - M /trunk/pa_bitmatch.ml - -Turn off exhaustiveness checking (thanks: Martin Jambon). - ------------------------------------------------------------------------- -r39 | rjones | 2008-04-25 13:55:39 +0100 (Fri, 25 Apr 2008) | 3 lines -Changed paths: - M /trunk/TODO - M /trunk/bitmatch.mli - M /trunk/pa_bitmatch.ml - M /trunk/tests/70_ext3_sb.ml - -Allow matching against a string type. -Error locations are now very fine-grained. - ------------------------------------------------------------------------- -r38 | rjones | 2008-04-25 13:08:51 +0100 (Fri, 25 Apr 2008) | 2 lines -Changed paths: - M /trunk/TODO - M /trunk/bitmatch.mli - M /trunk/pa_bitmatch.ml - -Use patterns, not expressions, in the bitmatch operator. - ------------------------------------------------------------------------- -r37 | rjones | 2008-04-25 12:08:43 +0100 (Fri, 25 Apr 2008) | 2 lines -Changed paths: - M /trunk/TODO - M /trunk/bitmatch.mli - M /trunk/configure.ac - M /trunk/pa_bitmatch.ml - M /trunk/tests/05_bits.ml - M /trunk/tests/06_ints1.ml - M /trunk/tests/06_ints2.ml - M /trunk/tests/06_ints3.ml - M /trunk/tests/10_constr1.ml - M /trunk/tests/10_constr2.ml - M /trunk/tests/20_varsize.ml - M /trunk/tests/60_ping.ml - M /trunk/tests/70_ext3_sb.ml - -Change syntax so that { ... } surrounds match patterns. - ------------------------------------------------------------------------- -r36 | rjones | 2008-04-25 11:44:00 +0100 (Fri, 25 Apr 2008) | 2 lines -Changed paths: - M /trunk/pa_bitmatch.ml - -Typo. - ------------------------------------------------------------------------- -r35 | rjones | 2008-04-16 12:14:40 +0100 (Wed, 16 Apr 2008) | 2 lines -Changed paths: - M /trunk/MANIFEST - -Added TODO to MANIFEST. - ------------------------------------------------------------------------- -r34 | rjones | 2008-04-15 14:41:21 +0100 (Tue, 15 Apr 2008) | 2 lines -Changed paths: - M /trunk/configure.ac - -Version 0.4. - ------------------------------------------------------------------------- -r33 | rjones | 2008-04-15 14:41:14 +0100 (Tue, 15 Apr 2008) | 2 lines -Changed paths: - A /trunk/TODO - -Added TODO file. - ------------------------------------------------------------------------- -r32 | rjones | 2008-04-15 14:40:51 +0100 (Tue, 15 Apr 2008) | 2 lines -Changed paths: - M /trunk/bitmatch.ml - M /trunk/bitmatch.mli - -string_of_bitstring. - ------------------------------------------------------------------------- -r31 | rjones | 2008-04-02 14:59:47 +0100 (Wed, 02 Apr 2008) | 2 lines -Changed paths: - M /trunk/META.in - -Some fixes to the META file, still doesn't work. - ------------------------------------------------------------------------- -r30 | rjones | 2008-04-02 14:59:37 +0100 (Wed, 02 Apr 2008) | 2 lines -Changed paths: - M /trunk/bitmatch.mli - -Fixed 'compiling' documentation. - ------------------------------------------------------------------------- -r29 | rjones | 2008-04-02 14:22:46 +0100 (Wed, 02 Apr 2008) | 2 lines -Changed paths: - M /trunk/Makefile.in - -Install pa_bitmatch.cmo, don't install pa_bitmatch.cmi, distribute config.h.in. - ------------------------------------------------------------------------- -r28 | rjones | 2008-04-02 14:22:07 +0100 (Wed, 02 Apr 2008) | 2 lines -Changed paths: - M /trunk/bitmatch.mli - -Documentation update - ------------------------------------------------------------------------- -r27 | rjones | 2008-04-02 13:36:43 +0100 (Wed, 02 Apr 2008) | 2 lines -Changed paths: - M /trunk/configure.ac - -Version 0.2 released. - ------------------------------------------------------------------------- -r26 | rjones | 2008-04-02 13:31:46 +0100 (Wed, 02 Apr 2008) | 2 lines -Changed paths: - M /trunk/MANIFEST - -Updated MANIFEST. - ------------------------------------------------------------------------- -r25 | rjones | 2008-04-02 13:29:03 +0100 (Wed, 02 Apr 2008) | 2 lines -Changed paths: - M /trunk/bitmatch.mli - -Updated documentation. - ------------------------------------------------------------------------- -r24 | rjones | 2008-04-02 12:06:31 +0100 (Wed, 02 Apr 2008) | 2 lines -Changed paths: - M /trunk/bitmatch.mli - -Start of documentation. - ------------------------------------------------------------------------- -r23 | rjones | 2008-04-02 12:06:21 +0100 (Wed, 02 Apr 2008) | 2 lines -Changed paths: - M /trunk/tests - M /trunk/tests/.cvsignore - -Update cvsignore. - ------------------------------------------------------------------------- -r22 | rjones | 2008-04-02 12:06:07 +0100 (Wed, 02 Apr 2008) | 3 lines -Changed paths: - M /trunk/bitmatch.ml - A /trunk/tests/10_constr2.ml - -Move more common bithandling code into I/I32/I64 modules. -Fix constructor functions. - ------------------------------------------------------------------------- -r21 | rjones | 2008-04-02 09:14:40 +0100 (Wed, 02 Apr 2008) | 2 lines -Changed paths: - M /trunk - M /trunk/.cvsignore - M /trunk/Makefile.in - M /trunk/README - M /trunk/bitmatch.mli - -Outline of documentation. - ------------------------------------------------------------------------- -r20 | rjones | 2008-04-02 09:05:58 +0100 (Wed, 02 Apr 2008) | 2 lines -Changed paths: - M /trunk/bitmatch.ml - M /trunk/bitmatch.mli - M /trunk/pa_bitmatch.ml - -LGPL notices. - ------------------------------------------------------------------------- -r19 | rjones | 2008-04-02 09:03:26 +0100 (Wed, 02 Apr 2008) | 2 lines -Changed paths: - M /trunk/Makefile.in - -Makefile make install/clean. - ------------------------------------------------------------------------- -r18 | rjones | 2008-04-02 09:03:03 +0100 (Wed, 02 Apr 2008) | 2 lines -Changed paths: - A /trunk/README - -Added README - ------------------------------------------------------------------------- -r17 | rjones | 2008-04-02 09:02:52 +0100 (Wed, 02 Apr 2008) | 2 lines -Changed paths: - M /trunk/MANIFEST - -Updated MANIFEST - ------------------------------------------------------------------------- -r16 | rjones | 2008-04-02 09:02:44 +0100 (Wed, 02 Apr 2008) | 2 lines -Changed paths: - M /trunk/META.in - -META file - ------------------------------------------------------------------------- -r15 | rjones | 2008-04-02 08:20:26 +0100 (Wed, 02 Apr 2008) | 2 lines -Changed paths: - M /trunk - M /trunk/.cvsignore - A /trunk/COPYING.LIB - A /trunk/META.in - D /trunk/Makefile - A /trunk/Makefile.in - A /trunk/aclocal.m4 - A /trunk/configure.ac - A /trunk/install-sh - -Autoconfify. - ------------------------------------------------------------------------- -r14 | rjones | 2008-04-01 23:19:59 +0100 (Tue, 01 Apr 2008) | 2 lines -Changed paths: - M /trunk - M /trunk/.cvsignore - -Ignore tarballs - ------------------------------------------------------------------------- -r13 | rjones | 2008-04-01 23:18:24 +0100 (Tue, 01 Apr 2008) | 2 lines -Changed paths: - A /trunk/MANIFEST - M /trunk/Makefile - -Added MANIFEST, distribution rule. - ------------------------------------------------------------------------- -r12 | rjones | 2008-04-01 20:10:45 +0100 (Tue, 01 Apr 2008) | 2 lines -Changed paths: - M /trunk/bitmatch.ml - M /trunk/bitmatch.mli - M /trunk/pa_bitmatch.ml - M /trunk/tests - M /trunk/tests/.cvsignore - A /trunk/tests/70_ext3_sb.ml - A /trunk/tests/ext3_sb - -Fixed byte swaps so that now ext3 superblock can be parsed. - ------------------------------------------------------------------------- -r11 | rjones | 2008-04-01 18:31:12 +0100 (Tue, 01 Apr 2008) | 2 lines -Changed paths: - M /trunk/examples/ipv4_header.ml - M /trunk/examples/make_ipv4_header.ml - -Fixed syntax of the examples. - ------------------------------------------------------------------------- -r10 | rjones | 2008-04-01 18:05:37 +0100 (Tue, 01 Apr 2008) | 2 lines -Changed paths: - M /trunk/Makefile - M /trunk/bitmatch.ml - M /trunk/bitmatch.mli - M /trunk/pa_bitmatch.ml - M /trunk/tests - M /trunk/tests/.cvsignore - A /trunk/tests/10_constr1.ml - A /trunk/tests/20_varsize.ml - -Added constructors. - ------------------------------------------------------------------------- -r9 | rjones | 2008-04-01 16:22:46 +0100 (Tue, 01 Apr 2008) | 2 lines -Changed paths: - M /trunk/tests/60_ping.ml - -Now supports constant field patterns in bitmatch. - ------------------------------------------------------------------------- -r8 | rjones | 2008-04-01 11:58:53 +0100 (Tue, 01 Apr 2008) | 2 lines -Changed paths: - M /trunk/bitmatch.ml - M /trunk/bitmatch.mli - A /trunk/tests/60_ping.ml - -Added extract_int_be_unsigned and extract_int32_be_unsigned. - ------------------------------------------------------------------------- -r7 | rjones | 2008-04-01 11:58:35 +0100 (Tue, 01 Apr 2008) | 2 lines -Changed paths: - M /trunk/tests/ipv4.ping - M /trunk/tests/ipv6.ping - -Fix corrupted IPv4/6 packets. - ------------------------------------------------------------------------- -r6 | rjones | 2008-04-01 11:06:37 +0100 (Tue, 01 Apr 2008) | 2 lines -Changed paths: - A /trunk/tests/ipv4.ping - A /trunk/tests/ipv6.ping - -Added IPv4 and IPv6 ping packets. - ------------------------------------------------------------------------- -r5 | rjones | 2008-04-01 11:06:12 +0100 (Tue, 01 Apr 2008) | 2 lines -Changed paths: - M /trunk/bitmatch.ml - M /trunk/bitmatch.mli - M /trunk/tests - M /trunk/tests/.cvsignore - A /trunk/tests/03_hexdump.ml - -Added Bitmatch.hexdump_bitstring - ------------------------------------------------------------------------- -r4 | rjones | 2008-04-01 11:05:14 +0100 (Tue, 01 Apr 2008) | 2 lines -Changed paths: - M /trunk/pa_bitmatch.ml - -Avoid compiler warning from 'raise Exit; ()' - ------------------------------------------------------------------------- -r3 | rjones | 2008-04-01 09:56:43 +0100 (Tue, 01 Apr 2008) | 2 lines -Changed paths: - M /trunk/Makefile - M /trunk/bitmatch.ml - M /trunk/bitmatch.mli - M /trunk/pa_bitmatch.ml - M /trunk/tests - M /trunk/tests/.cvsignore - M /trunk/tests/05_bits.ml - A /trunk/tests/06_ints1.ml - A /trunk/tests/06_ints2.ml - A /trunk/tests/06_ints3.ml - -extract_char_unsigned - ------------------------------------------------------------------------- -r2 | rjones | 2008-03-31 23:52:17 +0100 (Mon, 31 Mar 2008) | 2 lines -Changed paths: - M /trunk - A /trunk/.cvsignore - A /trunk/.depend - A /trunk/Makefile - A /trunk/bitmatch.ml - A /trunk/bitmatch.mli - A /trunk/examples - A /trunk/examples/.cvsignore - A /trunk/examples/ipv4_header.ml - A /trunk/examples/make_ipv4_header.ml - A /trunk/pa_bitmatch.ml - A /trunk/tests - A /trunk/tests/.cvsignore - A /trunk/tests/01_load.ml - A /trunk/tests/05_bits.ml - -Bitmatch syntax extension, working on bits and bitstrings. - ------------------------------------------------------------------------- -r1 | (no author) | 2008-03-31 23:52:17 +0100 (Mon, 31 Mar 2008) | 1 line -Changed paths: - A /branches - A /tags - A /trunk - -New repository initialized by cvs2svn. ------------------------------------------------------------------------- diff --git a/Makefile.in b/Makefile.in index 3ce8783..d040f4c 100644 --- a/Makefile.in +++ b/Makefile.in @@ -15,7 +15,7 @@ # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # -# $Id: Makefile.in 197 2012-08-10 11:52:44Z richard.wm.jones@gmail.com $ +# $Id$ PACKAGE = @PACKAGE_NAME@ VERSION = @PACKAGE_VERSION@ @@ -42,8 +42,8 @@ enable_coverage = @enable_coverage@ OCAMLCFLAGS = -g OCAMLCPACKAGES = OCAMLCLIBS = -linkpkg -OCAMLOPTFLAGS = -OCAMLOPTPACKAGES = +OCAMLOPTFLAGS = $(OCAMLCFLAGS) +OCAMLOPTPACKAGES = $(OCAMLCPACKAGES) OCAMLOPTLIBS = -linkpkg ifneq ($(enable_coverage),no) @@ -88,7 +88,7 @@ bitstring.cma: bitstring_types.cmo bitstring_config.cmo \ $(OCAMLMKLIB) -o bitstring $^ bitstring_persistent.cma: bitstring_persistent.cmo - $(OCAMLFIND) ocamlc -a -o $@ $^ + $(OCAMLFIND) ocamlc -a $(OCAMLCFLAGS) -o $@ $^ bitstring_persistent.cmo: bitstring_persistent.ml $(OCAMLFIND) ocamlc $(OCAMLCFLAGS) $(OCAMLCPACKAGES) \ @@ -99,7 +99,7 @@ bitstring.cmxa: bitstring_types.cmx bitstring_config.cmx \ $(OCAMLMKLIB) -o bitstring $^ bitstring_persistent.cmxa: bitstring_persistent.cmx - $(OCAMLFIND) ocamlopt -a -o $@ $^ + $(OCAMLFIND) ocamlopt -a $(OCAMLOPTFLAGS) -o $@ $^ bitstring_persistent.cmx: bitstring_persistent.ml $(OCAMLFIND) ocamlopt $(OCAMLOPTFLAGS) $(OCAMLOPTPACKAGES) \ @@ -115,7 +115,7 @@ pa_bitstring.cmo: pa_bitstring.ml bitstring.cma bitstring_persistent.cma bitstring-objinfo: bitstring_objinfo.cmo bitstring.cma bitstring_persistent.cma $(OCAMLFIND) ocamlc -I +camlp4 unix.cma dynlink.cma camlp4lib.cma \ - $(OCAMLCLIBS) \ + $(OCAMLCFLAGS) $(OCAMLCLIBS) \ bitstring.cma bitstring_persistent.cma \ $< -o $@ @@ -1,4 +1,4 @@ -$Id: TODO 186 2010-02-05 14:01:53Z richard.wm.jones $ +$Id$ Major to-do items. (1) DONE - In bitmatch operator, use patterns not expressions. diff --git a/benchmarks/parse_ext3_superblock.ml b/benchmarks/parse_ext3_superblock.ml index 8fb3716..edda82f 100644 --- a/benchmarks/parse_ext3_superblock.ml +++ b/benchmarks/parse_ext3_superblock.ml @@ -1,5 +1,5 @@ (* Benchmark parsing of an ext3 superblock. - * $Id: parse_ext3_superblock.ml 149 2008-08-26 08:16:01Z richard.wm.jones $ + * $Id$ *) open Printf diff --git a/bitmatch.ml b/bitmatch.ml index 83efd31..2d1992b 100644 --- a/bitmatch.ml +++ b/bitmatch.ml @@ -17,7 +17,7 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * - * $Id: bitmatch.ml 142 2008-07-17 15:45:56Z richard.wm.jones $ + * $Id$ *) (** This is just for backwards compatibility with code from when the library was called bitmatch. You should diff --git a/bitstring.ml b/bitstring.ml index cfefb79..98f992b 100644 --- a/bitstring.ml +++ b/bitstring.ml @@ -16,7 +16,7 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * - * $Id: bitstring.ml 198 2013-05-14 15:56:07Z richard.wm.jones@gmail.com $ + * $Id$ *) open Printf @@ -161,7 +161,8 @@ module I = struct (* Create a mask 0-31 bits wide. *) let mask bits = - if bits < 30 then + if bits < 30 || + (bits < 32 && Sys.word_size = 64) then (one <<< bits) - 1 else if bits = 30 then max_int @@ -198,6 +199,19 @@ module I = struct let mask = lnot (mask bits) in (v land mask) = zero + let range_signed v bits = + if + v >= zero + then + range_unsigned v bits + else + if + bits = 31 && Sys.word_size = 32 + then + v >= min_int + else + pred (minus_one <<< pred bits) < v + (* Call function g on the top bits, then f on each full byte * (big endian - so start at top). *) @@ -399,6 +413,16 @@ let _get_byte32 data byteoff strlen = let _get_byte64 data byteoff strlen = if strlen > byteoff then Int64.of_int (Char.code data.[byteoff]) else 0L +(* Extend signed [2..31] bits int to 31 bits int or 63 bits int for 64 + bits platform*) +let extend_sign len v = + let b = pred Sys.word_size - len in + (v lsl b) asr b + +let extract_and_extend_sign f data off len flen = + let w = f data off len flen in + extend_sign flen w + (* Extract [2..8] bits. Because the result fits into a single * byte we don't have to worry about endianness, only signedness. *) @@ -429,6 +453,9 @@ let extract_char_unsigned data off len flen = word (*, off+flen, len-flen*) ) +let extract_char_signed = + extract_and_extend_sign extract_char_unsigned + (* Extract [9..31] bits. We have to consider endianness and signedness. *) let extract_int_be_unsigned data off len flen = let byteoff = off lsr 3 in @@ -472,21 +499,33 @@ let extract_int_be_unsigned data off len flen = ) in word (*, off+flen, len-flen*) +let extract_int_be_signed = + extract_and_extend_sign extract_int_be_unsigned + let extract_int_le_unsigned data off len flen = let v = extract_int_be_unsigned data off len flen in let v = I.byteswap v flen in v +let extract_int_le_signed = + extract_and_extend_sign extract_int_le_unsigned + let extract_int_ne_unsigned = if nativeendian = BigEndian then extract_int_be_unsigned else extract_int_le_unsigned +let extract_int_ne_signed = + extract_and_extend_sign extract_int_ne_unsigned + let extract_int_ee_unsigned = function | BigEndian -> extract_int_be_unsigned | LittleEndian -> extract_int_le_unsigned | NativeEndian -> extract_int_ne_unsigned +let extract_int_ee_signed e = + extract_and_extend_sign (extract_int_ee_unsigned e) + let _make_int32_be c0 c1 c2 c3 = Int32.logor (Int32.logor @@ -712,67 +751,67 @@ external extract_fastpath_int24_le_signed : string -> int -> int = "ocaml_bitstr external extract_fastpath_int24_ne_signed : string -> int -> int = "ocaml_bitstring_extract_fastpath_int24_ne_signed" "noalloc" *) -external extract_fastpath_int32_be_unsigned : string -> int -> int32 -> int32 = "ocaml_bitstring_extract_fastpath_int32_be_unsigned" "noalloc" +external extract_fastpath_int32_be_unsigned : string -> int -> int32 = "ocaml_bitstring_extract_fastpath_int32_be_unsigned" -external extract_fastpath_int32_le_unsigned : string -> int -> int32 -> int32 = "ocaml_bitstring_extract_fastpath_int32_le_unsigned" "noalloc" +external extract_fastpath_int32_le_unsigned : string -> int -> int32 = "ocaml_bitstring_extract_fastpath_int32_le_unsigned" -external extract_fastpath_int32_ne_unsigned : string -> int -> int32 -> int32 = "ocaml_bitstring_extract_fastpath_int32_ne_unsigned" "noalloc" +external extract_fastpath_int32_ne_unsigned : string -> int -> int32 = "ocaml_bitstring_extract_fastpath_int32_ne_unsigned" -external extract_fastpath_int32_be_signed : string -> int -> int32 -> int32 = "ocaml_bitstring_extract_fastpath_int32_be_signed" "noalloc" +external extract_fastpath_int32_be_signed : string -> int -> int32 = "ocaml_bitstring_extract_fastpath_int32_be_signed" -external extract_fastpath_int32_le_signed : string -> int -> int32 -> int32 = "ocaml_bitstring_extract_fastpath_int32_le_signed" "noalloc" +external extract_fastpath_int32_le_signed : string -> int -> int32 = "ocaml_bitstring_extract_fastpath_int32_le_signed" -external extract_fastpath_int32_ne_signed : string -> int -> int32 -> int32 = "ocaml_bitstring_extract_fastpath_int32_ne_signed" "noalloc" +external extract_fastpath_int32_ne_signed : string -> int -> int32 = "ocaml_bitstring_extract_fastpath_int32_ne_signed" (* -external extract_fastpath_int40_be_unsigned : string -> int -> int64 -> int64 = "ocaml_bitstring_extract_fastpath_int40_be_unsigned" "noalloc" +external extract_fastpath_int40_be_unsigned : string -> int -> int64 = "ocaml_bitstring_extract_fastpath_int40_be_unsigned" -external extract_fastpath_int40_le_unsigned : string -> int -> int64 -> int64 = "ocaml_bitstring_extract_fastpath_int40_le_unsigned" "noalloc" +external extract_fastpath_int40_le_unsigned : string -> int -> int64 = "ocaml_bitstring_extract_fastpath_int40_le_unsigned" -external extract_fastpath_int40_ne_unsigned : string -> int -> int64 -> int64 = "ocaml_bitstring_extract_fastpath_int40_ne_unsigned" "noalloc" +external extract_fastpath_int40_ne_unsigned : string -> int -> int64 = "ocaml_bitstring_extract_fastpath_int40_ne_unsigned" -external extract_fastpath_int40_be_signed : string -> int -> int64 -> int64 = "ocaml_bitstring_extract_fastpath_int40_be_signed" "noalloc" +external extract_fastpath_int40_be_signed : string -> int -> int64 = "ocaml_bitstring_extract_fastpath_int40_be_signed" -external extract_fastpath_int40_le_signed : string -> int -> int64 -> int64 = "ocaml_bitstring_extract_fastpath_int40_le_signed" "noalloc" +external extract_fastpath_int40_le_signed : string -> int -> int64 = "ocaml_bitstring_extract_fastpath_int40_le_signed" -external extract_fastpath_int40_ne_signed : string -> int -> int64 -> int64 = "ocaml_bitstring_extract_fastpath_int40_ne_signed" "noalloc" +external extract_fastpath_int40_ne_signed : string -> int -> int64 = "ocaml_bitstring_extract_fastpath_int40_ne_signed" -external extract_fastpath_int48_be_unsigned : string -> int -> int64 -> int64 = "ocaml_bitstring_extract_fastpath_int48_be_unsigned" "noalloc" +external extract_fastpath_int48_be_unsigned : string -> int -> int64 = "ocaml_bitstring_extract_fastpath_int48_be_unsigned" -external extract_fastpath_int48_le_unsigned : string -> int -> int64 -> int64 = "ocaml_bitstring_extract_fastpath_int48_le_unsigned" "noalloc" +external extract_fastpath_int48_le_unsigned : string -> int -> int64 = "ocaml_bitstring_extract_fastpath_int48_le_unsigned" -external extract_fastpath_int48_ne_unsigned : string -> int -> int64 -> int64 = "ocaml_bitstring_extract_fastpath_int48_ne_unsigned" "noalloc" +external extract_fastpath_int48_ne_unsigned : string -> int -> int64 = "ocaml_bitstring_extract_fastpath_int48_ne_unsigned" -external extract_fastpath_int48_be_signed : string -> int -> int64 -> int64 = "ocaml_bitstring_extract_fastpath_int48_be_signed" "noalloc" +external extract_fastpath_int48_be_signed : string -> int -> int64 = "ocaml_bitstring_extract_fastpath_int48_be_signed" -external extract_fastpath_int48_le_signed : string -> int -> int64 -> int64 = "ocaml_bitstring_extract_fastpath_int48_le_signed" "noalloc" +external extract_fastpath_int48_le_signed : string -> int -> int64 = "ocaml_bitstring_extract_fastpath_int48_le_signed" -external extract_fastpath_int48_ne_signed : string -> int -> int64 -> int64 = "ocaml_bitstring_extract_fastpath_int48_ne_signed" "noalloc" +external extract_fastpath_int48_ne_signed : string -> int -> int64 = "ocaml_bitstring_extract_fastpath_int48_ne_signed" -external extract_fastpath_int56_be_unsigned : string -> int -> int64 -> int64 = "ocaml_bitstring_extract_fastpath_int56_be_unsigned" "noalloc" +external extract_fastpath_int56_be_unsigned : string -> int -> int64 = "ocaml_bitstring_extract_fastpath_int56_be_unsigned" -external extract_fastpath_int56_le_unsigned : string -> int -> int64 -> int64 = "ocaml_bitstring_extract_fastpath_int56_le_unsigned" "noalloc" +external extract_fastpath_int56_le_unsigned : string -> int -> int64 = "ocaml_bitstring_extract_fastpath_int56_le_unsigned" -external extract_fastpath_int56_ne_unsigned : string -> int -> int64 -> int64 = "ocaml_bitstring_extract_fastpath_int56_ne_unsigned" "noalloc" +external extract_fastpath_int56_ne_unsigned : string -> int -> int64 = "ocaml_bitstring_extract_fastpath_int56_ne_unsigned" -external extract_fastpath_int56_be_signed : string -> int -> int64 -> int64 = "ocaml_bitstring_extract_fastpath_int56_be_signed" "noalloc" +external extract_fastpath_int56_be_signed : string -> int -> int64 = "ocaml_bitstring_extract_fastpath_int56_be_signed" -external extract_fastpath_int56_le_signed : string -> int -> int64 -> int64 = "ocaml_bitstring_extract_fastpath_int56_le_signed" "noalloc" +external extract_fastpath_int56_le_signed : string -> int -> int64 = "ocaml_bitstring_extract_fastpath_int56_le_signed" -external extract_fastpath_int56_ne_signed : string -> int -> int64 -> int64 = "ocaml_bitstring_extract_fastpath_int56_ne_signed" "noalloc" +external extract_fastpath_int56_ne_signed : string -> int -> int64 = "ocaml_bitstring_extract_fastpath_int56_ne_signed" *) -external extract_fastpath_int64_be_unsigned : string -> int -> int64 -> int64 = "ocaml_bitstring_extract_fastpath_int64_be_unsigned" "noalloc" +external extract_fastpath_int64_be_unsigned : string -> int -> int64 = "ocaml_bitstring_extract_fastpath_int64_be_unsigned" -external extract_fastpath_int64_le_unsigned : string -> int -> int64 -> int64 = "ocaml_bitstring_extract_fastpath_int64_le_unsigned" "noalloc" +external extract_fastpath_int64_le_unsigned : string -> int -> int64 = "ocaml_bitstring_extract_fastpath_int64_le_unsigned" -external extract_fastpath_int64_ne_unsigned : string -> int -> int64 -> int64 = "ocaml_bitstring_extract_fastpath_int64_ne_unsigned" "noalloc" +external extract_fastpath_int64_ne_unsigned : string -> int -> int64 = "ocaml_bitstring_extract_fastpath_int64_ne_unsigned" -external extract_fastpath_int64_be_signed : string -> int -> int64 -> int64 = "ocaml_bitstring_extract_fastpath_int64_be_signed" "noalloc" +external extract_fastpath_int64_be_signed : string -> int -> int64 = "ocaml_bitstring_extract_fastpath_int64_be_signed" -external extract_fastpath_int64_le_signed : string -> int -> int64 -> int64 = "ocaml_bitstring_extract_fastpath_int64_le_signed" "noalloc" +external extract_fastpath_int64_le_signed : string -> int -> int64 = "ocaml_bitstring_extract_fastpath_int64_le_signed" -external extract_fastpath_int64_ne_signed : string -> int -> int64 -> int64 = "ocaml_bitstring_extract_fastpath_int64_ne_signed" "noalloc" +external extract_fastpath_int64_ne_signed : string -> int -> int64 = "ocaml_bitstring_extract_fastpath_int64_ne_signed" (*----------------------------------------------------------------------*) (* Constructor functions. *) @@ -896,30 +935,53 @@ let construct_char_unsigned buf v flen exn = else Buffer._add_bits buf v flen -(* Construct a field of up to 31 bits. *) -let construct_int_be_unsigned buf v flen exn = - (* Check value is within range. *) - if not (I.range_unsigned v flen) then raise exn; - (* Add the bytes. *) - I.map_bytes_be (Buffer._add_bits buf) (Buffer.add_byte buf) v flen +let construct_char_signed buf v flen exn = + let max_val = 1 lsl flen + and min_val = - (1 lsl pred flen) in + if v < min_val || v >= max_val then + raise exn; + if flen = 8 then + Buffer.add_byte buf (if v >= 0 then v else 256 + v) + else + Buffer._add_bits buf v flen (* Construct a field of up to 31 bits. *) -let construct_int_le_unsigned buf v flen exn = - (* Check value is within range. *) - if not (I.range_unsigned v flen) then raise exn; - (* Add the bytes. *) - I.map_bytes_le (Buffer._add_bits buf) (Buffer.add_byte buf) v flen +let construct_int check_func map_func buf v flen exn = + if not (check_func v flen) then raise exn; + map_func (Buffer._add_bits buf) (Buffer.add_byte buf) v flen + +let construct_int_be_unsigned = + construct_int I.range_unsigned I.map_bytes_be + +let construct_int_be_signed = + construct_int I.range_signed I.map_bytes_be + +let construct_int_le_unsigned = + construct_int I.range_unsigned I.map_bytes_le + +let construct_int_le_signed = + construct_int I.range_signed I.map_bytes_le let construct_int_ne_unsigned = if nativeendian = BigEndian then construct_int_be_unsigned else construct_int_le_unsigned +let construct_int_ne_signed = + if nativeendian = BigEndian + then construct_int_be_signed + else construct_int_le_signed + let construct_int_ee_unsigned = function | BigEndian -> construct_int_be_unsigned | LittleEndian -> construct_int_le_unsigned | NativeEndian -> construct_int_ne_unsigned +let construct_int_ee_signed = function + | BigEndian -> construct_int_be_signed + | LittleEndian -> construct_int_le_signed + | NativeEndian -> construct_int_ne_signed + (* Construct a field of exactly 32 bits. *) let construct_int32_be_unsigned buf v flen _ = Buffer.add_byte buf @@ -1212,3 +1274,9 @@ let hexdump_bitstring chan (data, off, len) = fprintf chan " |%s|\n%!" linechars ) else fprintf chan "\n%!" + +(*----------------------------------------------------------------------*) +(* Alias of functions shadowed by Core. *) + +let char_code = Char.code +let int32_of_int = Int32.of_int diff --git a/bitstring.mli b/bitstring.mli index 250739d..93113c0 100644 --- a/bitstring.mli +++ b/bitstring.mli @@ -16,7 +16,7 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * - * $Id: bitstring.mli 198 2013-05-14 15:56:07Z richard.wm.jones@gmail.com $ + * $Id$ *) (** @@ -940,14 +940,24 @@ val extract_bit : string -> int -> int -> int -> bool val extract_char_unsigned : string -> int -> int -> int -> int +val extract_char_signed : string -> int -> int -> int -> int + val extract_int_be_unsigned : string -> int -> int -> int -> int +val extract_int_be_signed : string -> int -> int -> int -> int + val extract_int_le_unsigned : string -> int -> int -> int -> int +val extract_int_le_signed : string -> int -> int -> int -> int + val extract_int_ne_unsigned : string -> int -> int -> int -> int +val extract_int_ne_signed : string -> int -> int -> int -> int + val extract_int_ee_unsigned : endian -> string -> int -> int -> int -> int +val extract_int_ee_signed : endian -> string -> int -> int -> int -> int + val extract_int32_be_unsigned : string -> int -> int -> int -> int32 val extract_int32_le_unsigned : string -> int -> int -> int -> int32 @@ -990,73 +1000,75 @@ external extract_fastpath_int24_le_signed : string -> int -> int = "ocaml_bitstr external extract_fastpath_int24_ne_signed : string -> int -> int = "ocaml_bitstring_extract_fastpath_int24_ne_signed" "noalloc" *) -external extract_fastpath_int32_be_unsigned : string -> int -> int32 -> int32 = "ocaml_bitstring_extract_fastpath_int32_be_unsigned" "noalloc" +external extract_fastpath_int32_be_unsigned : string -> int -> int32 = "ocaml_bitstring_extract_fastpath_int32_be_unsigned" -external extract_fastpath_int32_le_unsigned : string -> int -> int32 -> int32 = "ocaml_bitstring_extract_fastpath_int32_le_unsigned" "noalloc" +external extract_fastpath_int32_le_unsigned : string -> int -> int32 = "ocaml_bitstring_extract_fastpath_int32_le_unsigned" -external extract_fastpath_int32_ne_unsigned : string -> int -> int32 -> int32 = "ocaml_bitstring_extract_fastpath_int32_ne_unsigned" "noalloc" +external extract_fastpath_int32_ne_unsigned : string -> int -> int32 = "ocaml_bitstring_extract_fastpath_int32_ne_unsigned" -external extract_fastpath_int32_be_signed : string -> int -> int32 -> int32 = "ocaml_bitstring_extract_fastpath_int32_be_signed" "noalloc" +external extract_fastpath_int32_be_signed : string -> int -> int32 = "ocaml_bitstring_extract_fastpath_int32_be_signed" -external extract_fastpath_int32_le_signed : string -> int -> int32 -> int32 = "ocaml_bitstring_extract_fastpath_int32_le_signed" "noalloc" +external extract_fastpath_int32_le_signed : string -> int -> int32 = "ocaml_bitstring_extract_fastpath_int32_le_signed" -external extract_fastpath_int32_ne_signed : string -> int -> int32 -> int32 = "ocaml_bitstring_extract_fastpath_int32_ne_signed" "noalloc" +external extract_fastpath_int32_ne_signed : string -> int -> int32 = "ocaml_bitstring_extract_fastpath_int32_ne_signed" (* -external extract_fastpath_int40_be_unsigned : string -> int -> int64 -> int64 = "ocaml_bitstring_extract_fastpath_int40_be_unsigned" "noalloc" +external extract_fastpath_int40_be_unsigned : string -> int -> int64 = "ocaml_bitstring_extract_fastpath_int40_be_unsigned" -external extract_fastpath_int40_le_unsigned : string -> int -> int64 -> int64 = "ocaml_bitstring_extract_fastpath_int40_le_unsigned" "noalloc" +external extract_fastpath_int40_le_unsigned : string -> int -> int64 = "ocaml_bitstring_extract_fastpath_int40_le_unsigned" -external extract_fastpath_int40_ne_unsigned : string -> int -> int64 -> int64 = "ocaml_bitstring_extract_fastpath_int40_ne_unsigned" "noalloc" +external extract_fastpath_int40_ne_unsigned : string -> int -> int64 = "ocaml_bitstring_extract_fastpath_int40_ne_unsigned" -external extract_fastpath_int40_be_signed : string -> int -> int64 -> int64 = "ocaml_bitstring_extract_fastpath_int40_be_signed" "noalloc" +external extract_fastpath_int40_be_signed : string -> int -> int64 = "ocaml_bitstring_extract_fastpath_int40_be_signed" -external extract_fastpath_int40_le_signed : string -> int -> int64 -> int64 = "ocaml_bitstring_extract_fastpath_int40_le_signed" "noalloc" +external extract_fastpath_int40_le_signed : string -> int -> int64 = "ocaml_bitstring_extract_fastpath_int40_le_signed" -external extract_fastpath_int40_ne_signed : string -> int -> int64 -> int64 = "ocaml_bitstring_extract_fastpath_int40_ne_signed" "noalloc" +external extract_fastpath_int40_ne_signed : string -> int -> int64 = "ocaml_bitstring_extract_fastpath_int40_ne_signed" -external extract_fastpath_int48_be_unsigned : string -> int -> int64 -> int64 = "ocaml_bitstring_extract_fastpath_int48_be_unsigned" "noalloc" +external extract_fastpath_int48_be_unsigned : string -> int -> int64 = "ocaml_bitstring_extract_fastpath_int48_be_unsigned" -external extract_fastpath_int48_le_unsigned : string -> int -> int64 -> int64 = "ocaml_bitstring_extract_fastpath_int48_le_unsigned" "noalloc" +external extract_fastpath_int48_le_unsigned : string -> int -> int64 = "ocaml_bitstring_extract_fastpath_int48_le_unsigned" -external extract_fastpath_int48_ne_unsigned : string -> int -> int64 -> int64 = "ocaml_bitstring_extract_fastpath_int48_ne_unsigned" "noalloc" +external extract_fastpath_int48_ne_unsigned : string -> int -> int64 = "ocaml_bitstring_extract_fastpath_int48_ne_unsigned" -external extract_fastpath_int48_be_signed : string -> int -> int64 -> int64 = "ocaml_bitstring_extract_fastpath_int48_be_signed" "noalloc" +external extract_fastpath_int48_be_signed : string -> int -> int64 = "ocaml_bitstring_extract_fastpath_int48_be_signed" -external extract_fastpath_int48_le_signed : string -> int -> int64 -> int64 = "ocaml_bitstring_extract_fastpath_int48_le_signed" "noalloc" +external extract_fastpath_int48_le_signed : string -> int -> int64 = "ocaml_bitstring_extract_fastpath_int48_le_signed" -external extract_fastpath_int48_ne_signed : string -> int -> int64 -> int64 = "ocaml_bitstring_extract_fastpath_int48_ne_signed" "noalloc" +external extract_fastpath_int48_ne_signed : string -> int -> int64 = "ocaml_bitstring_extract_fastpath_int48_ne_signed" -external extract_fastpath_int56_be_unsigned : string -> int -> int64 -> int64 = "ocaml_bitstring_extract_fastpath_int56_be_unsigned" "noalloc" +external extract_fastpath_int56_be_unsigned : string -> int -> int64 = "ocaml_bitstring_extract_fastpath_int56_be_unsigned" -external extract_fastpath_int56_le_unsigned : string -> int -> int64 -> int64 = "ocaml_bitstring_extract_fastpath_int56_le_unsigned" "noalloc" +external extract_fastpath_int56_le_unsigned : string -> int -> int64 = "ocaml_bitstring_extract_fastpath_int56_le_unsigned" -external extract_fastpath_int56_ne_unsigned : string -> int -> int64 -> int64 = "ocaml_bitstring_extract_fastpath_int56_ne_unsigned" "noalloc" +external extract_fastpath_int56_ne_unsigned : string -> int -> int64 = "ocaml_bitstring_extract_fastpath_int56_ne_unsigned" -external extract_fastpath_int56_be_signed : string -> int -> int64 -> int64 = "ocaml_bitstring_extract_fastpath_int56_be_signed" "noalloc" +external extract_fastpath_int56_be_signed : string -> int -> int64 = "ocaml_bitstring_extract_fastpath_int56_be_signed" -external extract_fastpath_int56_le_signed : string -> int -> int64 -> int64 = "ocaml_bitstring_extract_fastpath_int56_le_signed" "noalloc" +external extract_fastpath_int56_le_signed : string -> int -> int64 = "ocaml_bitstring_extract_fastpath_int56_le_signed" -external extract_fastpath_int56_ne_signed : string -> int -> int64 -> int64 = "ocaml_bitstring_extract_fastpath_int56_ne_signed" "noalloc" +external extract_fastpath_int56_ne_signed : string -> int -> int64 = "ocaml_bitstring_extract_fastpath_int56_ne_signed" *) -external extract_fastpath_int64_be_unsigned : string -> int -> int64 -> int64 = "ocaml_bitstring_extract_fastpath_int64_be_unsigned" "noalloc" +external extract_fastpath_int64_be_unsigned : string -> int -> int64 = "ocaml_bitstring_extract_fastpath_int64_be_unsigned" -external extract_fastpath_int64_le_unsigned : string -> int -> int64 -> int64 = "ocaml_bitstring_extract_fastpath_int64_le_unsigned" "noalloc" +external extract_fastpath_int64_le_unsigned : string -> int -> int64 = "ocaml_bitstring_extract_fastpath_int64_le_unsigned" -external extract_fastpath_int64_ne_unsigned : string -> int -> int64 -> int64 = "ocaml_bitstring_extract_fastpath_int64_ne_unsigned" "noalloc" +external extract_fastpath_int64_ne_unsigned : string -> int -> int64 = "ocaml_bitstring_extract_fastpath_int64_ne_unsigned" -external extract_fastpath_int64_be_signed : string -> int -> int64 -> int64 = "ocaml_bitstring_extract_fastpath_int64_be_signed" "noalloc" +external extract_fastpath_int64_be_signed : string -> int -> int64 = "ocaml_bitstring_extract_fastpath_int64_be_signed" -external extract_fastpath_int64_le_signed : string -> int -> int64 -> int64 = "ocaml_bitstring_extract_fastpath_int64_le_signed" "noalloc" +external extract_fastpath_int64_le_signed : string -> int -> int64 = "ocaml_bitstring_extract_fastpath_int64_le_signed" -external extract_fastpath_int64_ne_signed : string -> int -> int64 -> int64 = "ocaml_bitstring_extract_fastpath_int64_ne_signed" "noalloc" +external extract_fastpath_int64_ne_signed : string -> int -> int64 = "ocaml_bitstring_extract_fastpath_int64_ne_signed" (* 'construct' functions are used in BITSTRING constructors. *) val construct_bit : Buffer.t -> bool -> int -> exn -> unit val construct_char_unsigned : Buffer.t -> int -> int -> exn -> unit +val construct_char_signed : Buffer.t -> int -> int -> exn -> unit + val construct_int_be_unsigned : Buffer.t -> int -> int -> exn -> unit val construct_int_le_unsigned : Buffer.t -> int -> int -> exn -> unit @@ -1065,6 +1077,14 @@ val construct_int_ne_unsigned : Buffer.t -> int -> int -> exn -> unit val construct_int_ee_unsigned : endian -> Buffer.t -> int -> int -> exn -> unit +val construct_int_be_signed : Buffer.t -> int -> int -> exn -> unit + +val construct_int_le_signed : Buffer.t -> int -> int -> exn -> unit + +val construct_int_ne_signed : Buffer.t -> int -> int -> exn -> unit + +val construct_int_ee_signed : endian -> Buffer.t -> int -> int -> exn -> unit + val construct_int32_be_unsigned : Buffer.t -> int32 -> int -> exn -> unit val construct_int32_le_unsigned : Buffer.t -> int32 -> int -> exn -> unit @@ -1084,3 +1104,7 @@ val construct_int64_ee_unsigned : endian -> Buffer.t -> int64 -> int -> exn -> u val construct_string : Buffer.t -> string -> unit val construct_bitstring : Buffer.t -> bitstring -> unit + +(* Alias of functions shadowed by Core. *) +val char_code : char -> int +val int32_of_int : int -> int32 diff --git a/bitstring_c.c b/bitstring_c.c index b9ad109..d376f76 100644 --- a/bitstring_c.c +++ b/bitstring_c.c @@ -33,6 +33,8 @@ #include <caml/mlvalues.h> #include <caml/fail.h> +#include <caml/memory.h> +#include <caml/alloc.h> /* Fastpath functions. These are used in the common case for reading * ints where the following conditions are known to be true: @@ -40,10 +42,10 @@ * (b) the access in the match is byte-aligned * (c) the access in the underlying bitstring is byte-aligned * - * These functions are all "noalloc" meaning they must not perform - * any OCaml allocations. For this reason, when the function returns - * an int32 or int64, the OCaml code passes in the pre-allocated pointer - * to the return value. + * These functions used to all be "noalloc" meaning they must not + * perform any OCaml allocations. However starting with OCaml 4.02, a + * compiler optimization means that unforunately we now have to use + * ordinary alloc functions in some cases. * * The final offset in the string is calculated by the OCaml (caller) * code. All we need to do is to read the string+offset and byteswap, @@ -73,7 +75,7 @@ ocaml_bitstring_extract_fastpath_int##size##_##endian##_##signed \ (value strv, value offv) \ { \ - type *ptr = (type *) ((void *) String_val (strv) + Int_val (offv)); \ + type *ptr = (type *) ((char *) String_val (strv) + Int_val (offv)); \ type r; \ memcpy(&r, ptr, sizeof(r)); \ swap_##endian(size,r); \ @@ -87,52 +89,31 @@ fastpath1(16,be,signed,int16_t) fastpath1(16,le,signed,int16_t) fastpath1(16,ne,signed,int16_t) -#define fastpath2(size,endian,signed,type,rval) \ +#define fastpath2(size,endian,signed,type,copy) \ CAMLprim value \ ocaml_bitstring_extract_fastpath_int##size##_##endian##_##signed \ - (value strv, value offv, value rv) \ + (value strv, value offv) \ { \ - type *ptr = (type *) ((void *) String_val (strv) + Int_val (offv)); \ + CAMLparam2 (strv, offv); \ + CAMLlocal1 (rv); \ + type *ptr = (type *) ((char *) String_val (strv) + Int_val (offv)); \ type r; \ - memcpy(&r, ptr, sizeof(r)); \ + memcpy(&r, ptr, sizeof(r)); \ swap_##endian(size,r); \ - rval(rv) = r; \ - return rv; \ + rv = copy (r); \ + CAMLreturn (rv); \ } -fastpath2(32,be,unsigned,uint32_t,Int32_val) -fastpath2(32,le,unsigned,uint32_t,Int32_val) -fastpath2(32,ne,unsigned,uint32_t,Int32_val) -fastpath2(32,be,signed,int32_t,Int32_val) -fastpath2(32,le,signed,int32_t,Int32_val) -fastpath2(32,ne,signed,int32_t,Int32_val) - -/* Special care needs to be taken on ARCH_ALIGN_INT64 platforms - (hppa and sparc in Debian). */ - -#ifdef ARCH_ALIGN_INT64 -#include <caml/memory.h> -#include <caml/alloc.h> -#define fastpath3(size,endian,signed,type,rval) \ - CAMLprim value \ - ocaml_bitstring_extract_fastpath_int##size##_##endian##_##signed \ - (value strv, value offv, value rv) \ - { \ - type *ptr = (type *) ((void *) String_val (strv) + Int_val (offv)); \ - type r; \ - memcpy(&r, ptr, sizeof(r)); \ - swap_##endian(size,r); \ - memcpy(Data_custom_val(rv), &r, sizeof(r)); \ - return rv; \ - } - -#else -#define fastpath3 fastpath2 -#endif +fastpath2(32,be,unsigned,uint32_t,caml_copy_int32) +fastpath2(32,le,unsigned,uint32_t,caml_copy_int32) +fastpath2(32,ne,unsigned,uint32_t,caml_copy_int32) +fastpath2(32,be,signed,int32_t,caml_copy_int32) +fastpath2(32,le,signed,int32_t,caml_copy_int32) +fastpath2(32,ne,signed,int32_t,caml_copy_int32) -fastpath3(64,be,unsigned,uint64_t,Int64_val) -fastpath3(64,le,unsigned,uint64_t,Int64_val) -fastpath3(64,ne,unsigned,uint64_t,Int64_val) -fastpath3(64,be,signed,int64_t,Int64_val) -fastpath3(64,le,signed,int64_t,Int64_val) -fastpath3(64,ne,signed,int64_t,Int64_val) +fastpath2(64,be,unsigned,uint64_t,caml_copy_int64) +fastpath2(64,le,unsigned,uint64_t,caml_copy_int64) +fastpath2(64,ne,unsigned,uint64_t,caml_copy_int64) +fastpath2(64,be,signed,int64_t,caml_copy_int64) +fastpath2(64,le,signed,int64_t,caml_copy_int64) +fastpath2(64,ne,signed,int64_t,caml_copy_int64) diff --git a/bitstring_config.ml.in b/bitstring_config.ml.in index 1ca9950..d079a75 100644 --- a/bitstring_config.ml.in +++ b/bitstring_config.ml.in @@ -18,7 +18,7 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * - * $Id: bitstring_config.ml.in 163 2008-08-27 12:54:57Z richard.wm.jones $ + * $Id$ *) (* This file contains general configuration settings, set by the diff --git a/bitstring_objinfo.ml b/bitstring_objinfo.ml index c542078..c74de69 100644 --- a/bitstring_objinfo.ml +++ b/bitstring_objinfo.ml @@ -15,7 +15,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * $Id: bitstring_objinfo.ml 142 2008-07-17 15:45:56Z richard.wm.jones $ + * $Id$ *) open Printf diff --git a/bitstring_persistent.ml b/bitstring_persistent.ml index cb94b8a..032b2d8 100644 --- a/bitstring_persistent.ml +++ b/bitstring_persistent.ml @@ -16,7 +16,7 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * - * $Id: bitstring_persistent.ml 151 2008-08-26 08:21:43Z richard.wm.jones $ + * $Id$ *) open Printf diff --git a/bitstring_persistent.mli b/bitstring_persistent.mli index 10cbee3..250306a 100644 --- a/bitstring_persistent.mli +++ b/bitstring_persistent.mli @@ -16,7 +16,7 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * - * $Id: bitstring_persistent.mli 142 2008-07-17 15:45:56Z richard.wm.jones $ + * $Id$ *) (** diff --git a/bitstring_types.ml b/bitstring_types.ml index c34f33b..459bc4f 100644 --- a/bitstring_types.ml +++ b/bitstring_types.ml @@ -16,7 +16,7 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * - * $Id: bitstring_types.ml 142 2008-07-17 15:45:56Z richard.wm.jones $ + * $Id$ *) type endian = BigEndian | LittleEndian | NativeEndian diff --git a/cil-tools/Makefile.in b/cil-tools/Makefile.in index 933d7f2..c439ecc 100644 --- a/cil-tools/Makefile.in +++ b/cil-tools/Makefile.in @@ -15,7 +15,7 @@ # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # -# $Id: Makefile.in 180 2010-01-08 14:43:07Z richard.wm.jones $ +# $Id$ PACKAGE = @PACKAGE_NAME@ VERSION = @PACKAGE_VERSION@ diff --git a/cil-tools/bitstring_import_c.ml b/cil-tools/bitstring_import_c.ml index c003dff..802c009 100644 --- a/cil-tools/bitstring_import_c.ml +++ b/cil-tools/bitstring_import_c.ml @@ -15,7 +15,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * $Id: bitstring_import_c.ml 142 2008-07-17 15:45:56Z richard.wm.jones $ + * $Id$ *) open Printf @@ -1,9 +1,11 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for ocaml-bitstring 2.0.4. +# Generated by GNU Autoconf 2.65 for ocaml-bitstring 2.0.4. # # -# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. # # # This configure script is free software; the Free Software Foundation @@ -87,7 +89,6 @@ fi IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. -as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -132,31 +133,6 @@ export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH -# Use a proper internal environment variable to ensure we don't fall - # into an infinite loop, continuously re-executing ourselves. - if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then - _as_can_reexec=no; export _as_can_reexec; - # We cannot yet assume a decent shell, so we have to provide a -# neutralization value for shells without unset; and this also -# works around shells that cannot unset nonexistent variables. -# Preserve -v and -x to the replacement shell. -BASH_ENV=/dev/null -ENV=/dev/null -(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV -case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; -esac -exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} -# Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed `exec'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 -as_fn_exit 255 - fi - # We don't want this to propagate to other subprocesses. - { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh @@ -190,8 +166,7 @@ if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi -test x\$exitcode = x0 || exit 1 -test -x / || exit 1" +test x\$exitcode = x0 || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && @@ -236,25 +211,14 @@ IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : - export CONFIG_SHELL - # We cannot yet assume a decent shell, so we have to provide a -# neutralization value for shells without unset; and this also -# works around shells that cannot unset nonexistent variables. -# Preserve -v and -x to the replacement shell. -BASH_ENV=/dev/null -ENV=/dev/null -(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV -case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; -esac -exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} -# Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed `exec'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 -exit 255 + # We cannot yet assume a decent shell, so we have to provide a + # neutralization value for shells without unset; and this also + # works around shells that cannot unset nonexistent variables. + BASH_ENV=/dev/null + ENV=/dev/null + (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} fi if test x$as_have_required = xno; then : @@ -352,18 +316,10 @@ $as_echo X"$as_dir" | test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" } # as_fn_mkdir_p - -# as_fn_executable_p FILE -# ----------------------- -# Test if FILE is an executable regular file. -as_fn_executable_p () -{ - test -f "$1" && test -x "$1" -} # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take @@ -400,19 +356,19 @@ else fi # as_fn_arith -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- +# as_fn_error ERROR [LINENO LOG_FD] +# --------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with STATUS, using 1 if that was 0. +# script with status $?, using 1 if that was 0. as_fn_error () { - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + as_status=$?; test $as_status -eq 0 && as_status=1 + if test "$3"; then + as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 fi - $as_echo "$as_me: error: $2" >&2 + $as_echo "$as_me: error: $1" >&2 as_fn_exit $as_status } # as_fn_error @@ -485,10 +441,6 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } - # If we had to re-execute with $CONFIG_SHELL, we're ensured to have - # already done that, so ensure we don't try to do so again and fall - # in an infinite loop. This has already happened in practice. - _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). @@ -523,16 +475,16 @@ if (echo >conf$$.file) 2>/dev/null; then # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. + # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -pR' + as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -pR' + as_ln_s='cp -p' fi else - as_ln_s='cp -pR' + as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -544,8 +496,28 @@ else as_mkdir_p=false fi -as_test_x='test -x' -as_executable_p=as_fn_executable_p +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in #( + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -558,7 +530,7 @@ test -n "$DJDIR" || exec 7<&0 </dev/null exec 6>&1 # Name of the host. -# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, +# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` @@ -772,9 +744,8 @@ do fi case $ac_option in - *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *=) ac_optarg= ;; - *) ac_optarg=yes ;; + *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. @@ -819,7 +790,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" + as_fn_error "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -845,7 +816,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" + as_fn_error "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1049,7 +1020,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" + as_fn_error "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1065,7 +1036,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" + as_fn_error "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1095,8 +1066,8 @@ do | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) as_fn_error $? "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information" + -*) as_fn_error "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information." ;; *=*) @@ -1104,7 +1075,7 @@ Try \`$0 --help' for more information" # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; + as_fn_error "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; @@ -1114,7 +1085,7 @@ Try \`$0 --help' for more information" $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" + : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac @@ -1122,13 +1093,13 @@ done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error $? "missing argument to $ac_option" + as_fn_error "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; - fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; + fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi @@ -1151,7 +1122,7 @@ do [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac - as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" + as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' @@ -1165,6 +1136,8 @@ target=$target_alias if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe + $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi @@ -1179,9 +1152,9 @@ test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error $? "working directory cannot be determined" + as_fn_error "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error $? "pwd does not report name of working directory" + as_fn_error "pwd does not report name of working directory" # Find the source files, if location was not specified. @@ -1220,11 +1193,11 @@ else fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" + as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then @@ -1264,7 +1237,7 @@ Configuration: --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking ...' messages + -q, --quiet, --silent do not print \`checking...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files @@ -1398,9 +1371,9 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF ocaml-bitstring configure 2.0.4 -generated by GNU Autoconf 2.69 +generated by GNU Autoconf 2.65 -Copyright (C) 2012 Free Software Foundation, Inc. +Copyright (C) 2009 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1444,7 +1417,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_c_try_compile @@ -1470,7 +1443,7 @@ $as_echo "$ac_try_echo"; } >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } > conftest.i && { + test $ac_status = 0; } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : @@ -1481,7 +1454,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_c_try_cpp @@ -1523,7 +1496,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_c_try_run @@ -1537,7 +1510,7 @@ ac_fn_c_check_header_compile () as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -1555,7 +1528,7 @@ fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_c_check_header_compile @@ -1567,10 +1540,10 @@ $as_echo "$ac_res" >&6; } ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if eval \${$3+:} false; then : + if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 @@ -1606,7 +1579,7 @@ if ac_fn_c_try_cpp "$LINENO"; then : else ac_header_preproc=no fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } @@ -1633,7 +1606,7 @@ $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" @@ -1642,7 +1615,7 @@ eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_c_check_header_mongrel cat >config.log <<_ACEOF @@ -1650,7 +1623,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by ocaml-bitstring $as_me 2.0.4, which was -generated by GNU Autoconf 2.69. Invocation command line was +generated by GNU Autoconf 2.65. Invocation command line was $ $0 $@ @@ -1760,9 +1733,11 @@ trap 'exit_status=$? { echo - $as_echo "## ---------------- ## + cat <<\_ASBOX +## ---------------- ## ## Cache variables. ## -## ---------------- ##" +## ---------------- ## +_ASBOX echo # The following way of writing the cache mishandles newlines in values, ( @@ -1796,9 +1771,11 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; ) echo - $as_echo "## ----------------- ## + cat <<\_ASBOX +## ----------------- ## ## Output variables. ## -## ----------------- ##" +## ----------------- ## +_ASBOX echo for ac_var in $ac_subst_vars do @@ -1811,9 +1788,11 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; echo if test -n "$ac_subst_files"; then - $as_echo "## ------------------- ## + cat <<\_ASBOX +## ------------------- ## ## File substitutions. ## -## ------------------- ##" +## ------------------- ## +_ASBOX echo for ac_var in $ac_subst_files do @@ -1827,9 +1806,11 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; fi if test -s confdefs.h; then - $as_echo "## ----------- ## + cat <<\_ASBOX +## ----------- ## ## confdefs.h. ## -## ----------- ##" +## ----------- ## +_ASBOX echo cat confdefs.h echo @@ -1884,12 +1865,7 @@ _ACEOF ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - # We do not want a PATH search for config.site. - case $CONFIG_SITE in #(( - -*) ac_site_file1=./$CONFIG_SITE;; - */*) ac_site_file1=$CONFIG_SITE;; - *) ac_site_file1=./$CONFIG_SITE;; - esac + ac_site_file1=$CONFIG_SITE elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site @@ -1904,11 +1880,7 @@ do { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" \ - || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "failed to load site script $ac_site_file -See \`config.log' for more details" "$LINENO" 5; } + . "$ac_site_file" fi done @@ -1984,7 +1956,7 @@ if $ac_cache_corrupted; then $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 + as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## @@ -2000,7 +1972,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } -if ${ac_cv_path_SED+:} false; then : +if test "${ac_cv_path_SED+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ @@ -2020,7 +1992,7 @@ do for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_SED" || continue + { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in @@ -2055,7 +2027,7 @@ esac done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then - as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 + as_fn_error "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED @@ -2078,7 +2050,7 @@ if test -n "$ac_tool_prefix"; then set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : +if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -2090,7 +2062,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2118,7 +2090,7 @@ if test -z "$ac_cv_prog_CC"; then set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -2130,7 +2102,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2171,7 +2143,7 @@ if test -z "$CC"; then set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : +if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -2183,7 +2155,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2211,7 +2183,7 @@ if test -z "$CC"; then set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : +if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -2224,7 +2196,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -2270,7 +2242,7 @@ if test -z "$CC"; then set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : +if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -2282,7 +2254,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2314,7 +2286,7 @@ do set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -2326,7 +2298,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2368,8 +2340,8 @@ fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "no acceptable C compiler found in \$PATH -See \`config.log' for more details" "$LINENO" 5; } +as_fn_error "no acceptable C compiler found in \$PATH +See \`config.log' for more details." "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 @@ -2483,8 +2455,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "C compiler cannot create executables -See \`config.log' for more details" "$LINENO" 5; } +{ as_fn_set_status 77 +as_fn_error "C compiler cannot create executables +See \`config.log' for more details." "$LINENO" 5; }; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } @@ -2526,8 +2499,8 @@ done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details" "$LINENO" 5; } +as_fn_error "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 @@ -2584,9 +2557,9 @@ $as_echo "$ac_try_echo"; } >&5 else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run C compiled programs. +as_fn_error "cannot run C compiled programs. If you meant to cross compile, use \`--host'. -See \`config.log' for more details" "$LINENO" 5; } +See \`config.log' for more details." "$LINENO" 5; } fi fi fi @@ -2597,7 +2570,7 @@ rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } -if ${ac_cv_objext+:} false; then : +if test "${ac_cv_objext+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2637,8 +2610,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compute suffix of object files: cannot compile -See \`config.log' for more details" "$LINENO" 5; } +as_fn_error "cannot compute suffix of object files: cannot compile +See \`config.log' for more details." "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi @@ -2648,7 +2621,7 @@ OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if ${ac_cv_c_compiler_gnu+:} false; then : +if test "${ac_cv_c_compiler_gnu+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2685,7 +2658,7 @@ ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } -if ${ac_cv_prog_cc_g+:} false; then : +if test "${ac_cv_prog_cc_g+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag @@ -2763,7 +2736,7 @@ else fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if ${ac_cv_prog_cc_c89+:} false; then : +if test "${ac_cv_prog_cc_c89+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no @@ -2772,7 +2745,8 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <stdarg.h> #include <stdio.h> -struct stat; +#include <sys/types.h> +#include <sys/stat.h> /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); @@ -2859,22 +2833,16 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do - if test -f "$ac_dir/install-sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f "$ac_dir/install.sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - elif test -f "$ac_dir/shtool"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/shtool install -c" - break - fi + for ac_t in install-sh install.sh shtool; do + if test -f "$ac_dir/$ac_t"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/$ac_t -c" + break 2 + fi + done done if test -z "$ac_aux_dir"; then - as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 + as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, @@ -2903,7 +2871,7 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then -if ${ac_cv_path_install+:} false; then : +if test "${ac_cv_path_install+set}" = set; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -2923,7 +2891,7 @@ case $as_dir/ in #(( # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then + if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. @@ -2991,7 +2959,7 @@ if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then - if ${ac_cv_prog_CPP+:} false; then : + if test "${ac_cv_prog_CPP+set}" = set; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded @@ -3021,7 +2989,7 @@ else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -3037,11 +3005,11 @@ else ac_preproc_ok=: break fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi @@ -3080,7 +3048,7 @@ else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -3096,18 +3064,18 @@ else ac_preproc_ok=: break fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5; } +as_fn_error "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." "$LINENO" 5; } fi ac_ext=c @@ -3133,7 +3101,7 @@ else $as_echo "no" >&6; } fi -test "x$U" != "x" && as_fn_error $? "Compiler not ANSI compliant" "$LINENO" 5 +test "x$U" != "x" && as_fn_error "Compiler not ANSI compliant" "$LINENO" 5 if test "x$CC" != xcc; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5 @@ -3144,7 +3112,7 @@ $as_echo_n "checking whether cc understands -c and -o together... " >&6; } fi set dummy $CC; ac_cc=`$as_echo "$2" | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` -if eval \${ac_cv_prog_cc_${ac_cc}_c_o+:} false; then : +if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -3251,7 +3219,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if ${ac_cv_path_GREP+:} false; then : +if test "${ac_cv_path_GREP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then @@ -3265,7 +3233,7 @@ do for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_GREP" || continue + { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in @@ -3300,7 +3268,7 @@ esac done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then - as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP @@ -3314,7 +3282,7 @@ $as_echo "$ac_cv_path_GREP" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } -if ${ac_cv_path_EGREP+:} false; then : +if test "${ac_cv_path_EGREP+set}" = set; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 @@ -3331,7 +3299,7 @@ do for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_EGREP" || continue + { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in @@ -3366,7 +3334,7 @@ esac done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then - as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP @@ -3381,7 +3349,7 @@ $as_echo "$ac_cv_path_EGREP" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } -if ${ac_cv_header_stdc+:} false; then : +if test "${ac_cv_header_stdc+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -3498,7 +3466,8 @@ do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : +eval as_val=\$$as_ac_Header + if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -3510,7 +3479,7 @@ done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 $as_echo_n "checking whether byte ordering is bigendian... " >&6; } -if ${ac_cv_c_bigendian+:} false; then : +if test "${ac_cv_c_bigendian+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_cv_c_bigendian=unknown @@ -3728,7 +3697,7 @@ $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h ;; #( *) - as_fn_error $? "Machine endianness could not be determined" "$LINENO" 5 + as_fn_error "Machine endianness could not be determined" "$LINENO" 5 ;; esac @@ -3742,7 +3711,7 @@ fi for ac_header in byteswap.h do : ac_fn_c_check_header_mongrel "$LINENO" "byteswap.h" "ac_cv_header_byteswap_h" "$ac_includes_default" -if test "x$ac_cv_header_byteswap_h" = xyes; then : +if test "x$ac_cv_header_byteswap_h" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_BYTESWAP_H 1 _ACEOF @@ -3765,7 +3734,7 @@ done set dummy ${ac_tool_prefix}ocamlc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OCAMLC+:} false; then : +if test "${ac_cv_prog_OCAMLC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$OCAMLC"; then @@ -3777,7 +3746,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OCAMLC="${ac_tool_prefix}ocamlc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3805,7 +3774,7 @@ if test -z "$ac_cv_prog_OCAMLC"; then set dummy ocamlc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OCAMLC+:} false; then : +if test "${ac_cv_prog_ac_ct_OCAMLC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OCAMLC"; then @@ -3817,7 +3786,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OCAMLC="ocamlc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3876,7 +3845,7 @@ $as_echo "OCaml library path is $OCAMLLIB" >&6; } set dummy ${ac_tool_prefix}ocamlopt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OCAMLOPT+:} false; then : +if test "${ac_cv_prog_OCAMLOPT+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$OCAMLOPT"; then @@ -3888,7 +3857,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OCAMLOPT="${ac_tool_prefix}ocamlopt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3916,7 +3885,7 @@ if test -z "$ac_cv_prog_OCAMLOPT"; then set dummy ocamlopt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OCAMLOPT+:} false; then : +if test "${ac_cv_prog_ac_ct_OCAMLOPT+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OCAMLOPT"; then @@ -3928,7 +3897,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OCAMLOPT="ocamlopt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3986,7 +3955,7 @@ $as_echo "versions differs from ocamlc; ocamlopt discarded." >&6; } set dummy ${ac_tool_prefix}ocamlc.opt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OCAMLCDOTOPT+:} false; then : +if test "${ac_cv_prog_OCAMLCDOTOPT+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$OCAMLCDOTOPT"; then @@ -3998,7 +3967,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OCAMLCDOTOPT="${ac_tool_prefix}ocamlc.opt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4026,7 +3995,7 @@ if test -z "$ac_cv_prog_OCAMLCDOTOPT"; then set dummy ocamlc.opt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OCAMLCDOTOPT+:} false; then : +if test "${ac_cv_prog_ac_ct_OCAMLCDOTOPT+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OCAMLCDOTOPT"; then @@ -4038,7 +4007,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OCAMLCDOTOPT="ocamlc.opt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4090,7 +4059,7 @@ $as_echo "versions differs from ocamlc; ocamlc.opt discarded." >&6; } set dummy ${ac_tool_prefix}ocamlopt.opt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OCAMLOPTDOTOPT+:} false; then : +if test "${ac_cv_prog_OCAMLOPTDOTOPT+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$OCAMLOPTDOTOPT"; then @@ -4102,7 +4071,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OCAMLOPTDOTOPT="${ac_tool_prefix}ocamlopt.opt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4130,7 +4099,7 @@ if test -z "$ac_cv_prog_OCAMLOPTDOTOPT"; then set dummy ocamlopt.opt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OCAMLOPTDOTOPT+:} false; then : +if test "${ac_cv_prog_ac_ct_OCAMLOPTDOTOPT+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OCAMLOPTDOTOPT"; then @@ -4142,7 +4111,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OCAMLOPTDOTOPT="ocamlopt.opt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4199,7 +4168,7 @@ $as_echo "version differs from ocamlc; ocamlopt.opt discarded." >&6; } set dummy ${ac_tool_prefix}ocaml; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OCAML+:} false; then : +if test "${ac_cv_prog_OCAML+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$OCAML"; then @@ -4211,7 +4180,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OCAML="${ac_tool_prefix}ocaml" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4239,7 +4208,7 @@ if test -z "$ac_cv_prog_OCAML"; then set dummy ocaml; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OCAML+:} false; then : +if test "${ac_cv_prog_ac_ct_OCAML+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OCAML"; then @@ -4251,7 +4220,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OCAML="ocaml" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4293,7 +4262,7 @@ fi set dummy ${ac_tool_prefix}ocamldep; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OCAMLDEP+:} false; then : +if test "${ac_cv_prog_OCAMLDEP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$OCAMLDEP"; then @@ -4305,7 +4274,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OCAMLDEP="${ac_tool_prefix}ocamldep" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4333,7 +4302,7 @@ if test -z "$ac_cv_prog_OCAMLDEP"; then set dummy ocamldep; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OCAMLDEP+:} false; then : +if test "${ac_cv_prog_ac_ct_OCAMLDEP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OCAMLDEP"; then @@ -4345,7 +4314,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OCAMLDEP="ocamldep" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4387,7 +4356,7 @@ fi set dummy ${ac_tool_prefix}ocamlmktop; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OCAMLMKTOP+:} false; then : +if test "${ac_cv_prog_OCAMLMKTOP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$OCAMLMKTOP"; then @@ -4399,7 +4368,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OCAMLMKTOP="${ac_tool_prefix}ocamlmktop" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4427,7 +4396,7 @@ if test -z "$ac_cv_prog_OCAMLMKTOP"; then set dummy ocamlmktop; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OCAMLMKTOP+:} false; then : +if test "${ac_cv_prog_ac_ct_OCAMLMKTOP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OCAMLMKTOP"; then @@ -4439,7 +4408,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OCAMLMKTOP="ocamlmktop" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4481,7 +4450,7 @@ fi set dummy ${ac_tool_prefix}ocamlmklib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OCAMLMKLIB+:} false; then : +if test "${ac_cv_prog_OCAMLMKLIB+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$OCAMLMKLIB"; then @@ -4493,7 +4462,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OCAMLMKLIB="${ac_tool_prefix}ocamlmklib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4521,7 +4490,7 @@ if test -z "$ac_cv_prog_OCAMLMKLIB"; then set dummy ocamlmklib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OCAMLMKLIB+:} false; then : +if test "${ac_cv_prog_ac_ct_OCAMLMKLIB+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OCAMLMKLIB"; then @@ -4533,7 +4502,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OCAMLMKLIB="ocamlmklib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4575,7 +4544,7 @@ fi set dummy ${ac_tool_prefix}ocamldoc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OCAMLDOC+:} false; then : +if test "${ac_cv_prog_OCAMLDOC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$OCAMLDOC"; then @@ -4587,7 +4556,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OCAMLDOC="${ac_tool_prefix}ocamldoc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4615,7 +4584,7 @@ if test -z "$ac_cv_prog_OCAMLDOC"; then set dummy ocamldoc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OCAMLDOC+:} false; then : +if test "${ac_cv_prog_ac_ct_OCAMLDOC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OCAMLDOC"; then @@ -4627,7 +4596,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OCAMLDOC="ocamldoc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4669,7 +4638,7 @@ fi set dummy ${ac_tool_prefix}ocamlbuild; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OCAMLBUILD+:} false; then : +if test "${ac_cv_prog_OCAMLBUILD+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$OCAMLBUILD"; then @@ -4681,7 +4650,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OCAMLBUILD="${ac_tool_prefix}ocamlbuild" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4709,7 +4678,7 @@ if test -z "$ac_cv_prog_OCAMLBUILD"; then set dummy ocamlbuild; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OCAMLBUILD+:} false; then : +if test "${ac_cv_prog_ac_ct_OCAMLBUILD+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OCAMLBUILD"; then @@ -4721,7 +4690,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OCAMLBUILD="ocamlbuild" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4764,7 +4733,7 @@ fi set dummy ${ac_tool_prefix}ocamlfind; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OCAMLFIND+:} false; then : +if test "${ac_cv_prog_OCAMLFIND+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$OCAMLFIND"; then @@ -4776,7 +4745,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OCAMLFIND="${ac_tool_prefix}ocamlfind" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4804,7 +4773,7 @@ if test -z "$ac_cv_prog_OCAMLFIND"; then set dummy ocamlfind; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OCAMLFIND+:} false; then : +if test "${ac_cv_prog_ac_ct_OCAMLFIND+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OCAMLFIND"; then @@ -4816,7 +4785,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OCAMLFIND="ocamlfind" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4855,14 +4824,14 @@ fi if test "x$OCAMLFIND" = "x"; then - as_fn_error $? "You must have ocaml and findlib installed" "$LINENO" 5 + as_fn_error "You must have ocaml and findlib installed" "$LINENO" 5 fi # Extract the first word of "camlp4of.opt", so it can be a program name with args. set dummy camlp4of.opt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CAMLP4OF+:} false; then : +if test "${ac_cv_prog_CAMLP4OF+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CAMLP4OF"; then @@ -4874,7 +4843,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CAMLP4OF="camlp4of.opt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4897,7 +4866,7 @@ fi if test "x$CAMLP4OF" = "xno"; then - as_fn_error $? "You must have camlp4 installed" "$LINENO" 5 + as_fn_error "You must have camlp4 installed" "$LINENO" 5 fi @@ -4954,7 +4923,7 @@ $as_echo "not found" >&6; } set dummy time; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_TIME+:} false; then : +if test "${ac_cv_path_TIME+set}" = set; then : $as_echo_n "(cached) " >&6 else case $TIME in @@ -4968,7 +4937,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4992,14 +4961,14 @@ fi if test "x$TIME" = "xno"; then - as_fn_error $? "'time' command not found" "$LINENO" 5 + as_fn_error "'time' command not found" "$LINENO" 5 fi # Extract the first word of "diff", so it can be a program name with args. set dummy diff; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_DIFF+:} false; then : +if test "${ac_cv_path_DIFF+set}" = set; then : $as_echo_n "(cached) " >&6 else case $DIFF in @@ -5013,7 +4982,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5037,7 +5006,7 @@ fi if test "x$DIFF" = "xno"; then - as_fn_error $? "'diff' command not found" "$LINENO" 5 + as_fn_error "'diff' command not found" "$LINENO" 5 fi @@ -5045,7 +5014,7 @@ fi set dummy gprof; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_GPROF+:} false; then : +if test "${ac_cv_prog_GPROF+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$GPROF"; then @@ -5057,7 +5026,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_GPROF="gprof" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5084,7 +5053,7 @@ fi set dummy bisect-report; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_BISECT_REPORT+:} false; then : +if test "${ac_cv_prog_BISECT_REPORT+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$BISECT_REPORT"; then @@ -5096,7 +5065,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_BISECT_REPORT="bisect-report" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5127,7 +5096,7 @@ fi if test "x$enable_coverage" != "xno" -a "x$BISECT_REPORT" = "xno"; then - as_fn_error $? "You must install ocaml-bisect package to get code coverage" "$LINENO" 5 + as_fn_error "You must install ocaml-bisect package to get code coverage" "$LINENO" 5 fi @@ -5199,21 +5168,10 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then - if test "x$cache_file" != "x/dev/null"; then + test "x$cache_file" != "x/dev/null" && { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} - if test ! -f "$cache_file" || test -h "$cache_file"; then - cat confcache >"$cache_file" - else - case $cache_file in #( - */* | ?:*) - mv -f confcache "$cache_file"$$ && - mv -f "$cache_file"$$ "$cache_file" ;; #( - *) - mv -f confcache "$cache_file" ;; - esac - fi - fi + cat confcache >$cache_file else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} @@ -5229,7 +5187,6 @@ DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= -U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' @@ -5246,7 +5203,7 @@ LTLIBOBJS=$ac_ltlibobjs -: "${CONFIG_STATUS=./config.status}" +: ${CONFIG_STATUS=./config.status} ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" @@ -5347,7 +5304,6 @@ fi IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. -as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -5393,19 +5349,19 @@ export LANGUAGE (unset CDPATH) >/dev/null 2>&1 && unset CDPATH -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- +# as_fn_error ERROR [LINENO LOG_FD] +# --------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with STATUS, using 1 if that was 0. +# script with status $?, using 1 if that was 0. as_fn_error () { - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + as_status=$?; test $as_status -eq 0 && as_status=1 + if test "$3"; then + as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 fi - $as_echo "$as_me: error: $2" >&2 + $as_echo "$as_me: error: $1" >&2 as_fn_exit $as_status } # as_fn_error @@ -5543,16 +5499,16 @@ if (echo >conf$$.file) 2>/dev/null; then # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. + # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -pR' + as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -pR' + as_ln_s='cp -p' fi else - as_ln_s='cp -pR' + as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -5601,7 +5557,7 @@ $as_echo X"$as_dir" | test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" } # as_fn_mkdir_p @@ -5612,16 +5568,28 @@ else as_mkdir_p=false fi - -# as_fn_executable_p FILE -# ----------------------- -# Test if FILE is an executable regular file. -as_fn_executable_p () -{ - test -f "$1" && test -x "$1" -} # as_fn_executable_p -as_test_x='test -x' -as_executable_p=as_fn_executable_p +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in #( + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -5643,7 +5611,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # values after options handling. ac_log=" This file was extended by ocaml-bitstring $as_me 2.0.4, which was -generated by GNU Autoconf 2.69. Invocation command line was +generated by GNU Autoconf 2.65. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -5705,10 +5673,10 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ ocaml-bitstring config.status 2.0.4 -configured by $0, generated by GNU Autoconf 2.69, +configured by $0, generated by GNU Autoconf 2.65, with options \\"\$ac_cs_config\\" -Copyright (C) 2012 Free Software Foundation, Inc. +Copyright (C) 2009 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -5724,16 +5692,11 @@ ac_need_defaults=: while test $# != 0 do case $1 in - --*=?*) + --*=*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; - --*=) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg= - ac_shift=: - ;; *) ac_option=$1 ac_optarg=$2 @@ -5755,7 +5718,6 @@ do $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; @@ -5768,7 +5730,7 @@ do ac_need_defaults=false;; --he | --h) # Conflict between --help and --header - as_fn_error $? "ambiguous option: \`$1' + as_fn_error "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; @@ -5777,7 +5739,7 @@ Try \`$0 --help' for more information.";; ac_cs_silent=: ;; # This is an error. - -*) as_fn_error $? "unrecognized option: \`$1' + -*) as_fn_error "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" @@ -5797,7 +5759,7 @@ fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then - set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' @@ -5832,7 +5794,7 @@ do "bitstring_config.ml") CONFIG_FILES="$CONFIG_FILES bitstring_config.ml" ;; "cil-tools/Makefile") CONFIG_FILES="$CONFIG_FILES cil-tools/Makefile" ;; - *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done @@ -5854,10 +5816,9 @@ fi # after its creation but before its name has been assigned to `$tmp'. $debug || { - tmp= ac_tmp= + tmp= trap 'exit_status=$? - : "${ac_tmp:=$tmp}" - { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status + { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } @@ -5865,13 +5826,12 @@ $debug || { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -d "$tmp" + test -n "$tmp" && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") -} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 -ac_tmp=$tmp +} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. @@ -5888,12 +5848,12 @@ if test "x$ac_cr" = x; then fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\\r' + ac_cs_awk_cr='\r' else ac_cs_awk_cr=$ac_cr fi -echo 'BEGIN {' >"$ac_tmp/subs1.awk" && +echo 'BEGIN {' >"$tmp/subs1.awk" && _ACEOF @@ -5902,18 +5862,18 @@ _ACEOF echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 -ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` + as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi @@ -5921,7 +5881,7 @@ done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && +cat >>"\$tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h @@ -5969,7 +5929,7 @@ t delim rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK -cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && +cat >>"\$tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" @@ -6001,29 +5961,21 @@ if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat -fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ - || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 +fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ + || as_fn_error "could not setup config files machinery" "$LINENO" 5 _ACEOF -# VPATH may cause trouble with some makes, so we remove sole $(srcdir), -# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ -h -s/// -s/^/:/ -s/[ ]*$/:/ -s/:\$(srcdir):/:/g -s/:\${srcdir}:/:/g -s/:@srcdir@:/:/g -s/^:*// + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/ +s/:*\${srcdir}:*/:/ +s/:*@srcdir@:*/:/ +s/^\([^=]*=[ ]*\):*/\1/ s/:*$// -x -s/\(=[ ]*\).*/\1/ -G -s/\n// s/^[^=]*=[ ]*$// }' fi @@ -6035,7 +5987,7 @@ fi # test -n "$CONFIG_FILES" # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then -cat >"$ac_tmp/defines.awk" <<\_ACAWK || +cat >"$tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF @@ -6047,11 +5999,11 @@ _ACEOF # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do - ac_tt=`sed -n "/$ac_delim/p" confdefs.h` - if test -z "$ac_tt"; then + ac_t=`sed -n "/$ac_delim/p" confdefs.h` + if test -z "$ac_t"; then break elif $ac_last_try; then - as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 + as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi @@ -6136,7 +6088,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 + as_fn_error "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" @@ -6149,7 +6101,7 @@ do esac case $ac_mode$ac_tag in :[FHL]*:*);; - :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; + :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac @@ -6168,7 +6120,7 @@ do for ac_f do case $ac_f in - -) ac_f="$ac_tmp/stdin";; + -) ac_f="$tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. @@ -6177,7 +6129,7 @@ do [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; + as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" @@ -6203,8 +6155,8 @@ $as_echo "$as_me: creating $ac_file" >&6;} esac case $ac_tag in - *:-:* | *:-) cat >"$ac_tmp/stdin" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; + *:-:* | *:-) cat >"$tmp/stdin" \ + || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac @@ -6334,24 +6286,23 @@ s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t $ac_datarootdir_hack " -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ - >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ + || as_fn_error "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ - "$ac_tmp/out"`; test -z "$ac_out"; } && + { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&5 +which seems to be undefined. Please make sure it is defined." >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&2;} +which seems to be undefined. Please make sure it is defined." >&2;} - rm -f "$ac_tmp/stdin" + rm -f "$tmp/stdin" case $ac_file in - -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; - *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; + -) cat "$tmp/out" && rm -f "$tmp/out";; + *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; esac \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; :H) # @@ -6360,21 +6311,21 @@ which seems to be undefined. Please make sure it is defined" >&2;} if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" - } >"$ac_tmp/config.h" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then + && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" + } >"$tmp/config.h" \ + || as_fn_error "could not create $ac_file" "$LINENO" 5 + if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" - mv "$ac_tmp/config.h" "$ac_file" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + mv "$tmp/config.h" "$ac_file" \ + || as_fn_error "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ - || as_fn_error $? "could not create -" "$LINENO" 5 + && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ + || as_fn_error "could not create -" "$LINENO" 5 fi ;; @@ -6389,7 +6340,7 @@ _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || - as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 + as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. @@ -6410,7 +6361,7 @@ if test "$no_create" != yes; then exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. - $ac_cs_success || as_fn_exit 1 + $ac_cs_success || as_fn_exit $? fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 diff --git a/create_test_pattern.ml b/create_test_pattern.ml index 201818c..291bcb8 100644 --- a/create_test_pattern.ml +++ b/create_test_pattern.ml @@ -1,5 +1,5 @@ (* Create persistent pattern. - * $Id: create_test_pattern.ml 142 2008-07-17 15:45:56Z richard.wm.jones $ + * $Id$ *) open Bitstring_persistent diff --git a/examples/elf.ml b/examples/elf.ml index 68d6146..67431be 100644 --- a/examples/elf.ml +++ b/examples/elf.ml @@ -1,5 +1,5 @@ (* Read an ELF (Linux binary) header. - * $Id: elf.ml 142 2008-07-17 15:45:56Z richard.wm.jones $ + * $Id$ *) open Printf diff --git a/examples/ext3_superblock.ml b/examples/ext3_superblock.ml index 69d7921..77ef2db 100644 --- a/examples/ext3_superblock.ml +++ b/examples/ext3_superblock.ml @@ -1,5 +1,5 @@ (* Parse an ext3 superblock. - * $Id: ext3_superblock.ml 142 2008-07-17 15:45:56Z richard.wm.jones $ + * $Id$ *) open Printf diff --git a/examples/gif.ml b/examples/gif.ml index 3c420d9..cbfa928 100644 --- a/examples/gif.ml +++ b/examples/gif.ml @@ -1,5 +1,5 @@ (* GIF header parser. - * $Id: gif.ml 142 2008-07-17 15:45:56Z richard.wm.jones $ + * $Id$ *) open Printf diff --git a/examples/ipv4_header.ml b/examples/ipv4_header.ml index 60ea6ae..e47de03 100644 --- a/examples/ipv4_header.ml +++ b/examples/ipv4_header.ml @@ -1,5 +1,5 @@ (* Parse and display an IPv4 header from a file. - * $Id: ipv4_header.ml 142 2008-07-17 15:45:56Z richard.wm.jones $ + * $Id$ *) open Printf diff --git a/examples/libpcap.ml b/examples/libpcap.ml index 0b634e2..e7fdd93 100644 --- a/examples/libpcap.ml +++ b/examples/libpcap.ml @@ -1,5 +1,5 @@ (* Print out packets from a tcpdump / libpcap / wireshark capture file. - * $Id: libpcap.ml 142 2008-07-17 15:45:56Z richard.wm.jones $ + * $Id$ * * To test this, capture some data using: * /usr/sbin/tcpdump -s 1500 -w /tmp/dump diff --git a/examples/make_ipv4_header.ml b/examples/make_ipv4_header.ml index d613806..225eae3 100644 --- a/examples/make_ipv4_header.ml +++ b/examples/make_ipv4_header.ml @@ -1,5 +1,5 @@ (* Create an IPv4 header. - * $Id: make_ipv4_header.ml 142 2008-07-17 15:45:56Z richard.wm.jones $ + * $Id$ *) open Printf diff --git a/examples/ping.ml b/examples/ping.ml index bb57fe6..6112364 100644 --- a/examples/ping.ml +++ b/examples/ping.ml @@ -1,5 +1,5 @@ (* Read in IPv4 and IPv6 ping packets and display them. - * $Id: ping.ml 142 2008-07-17 15:45:56Z richard.wm.jones $ + * $Id$ *) open Printf @@ -0,0 +1,27 @@ +authors: [ "Richard W.M. Jones" ] +bug-reports: "https://github.com/xguerin/ppx_bitstring/issues" +dev-repo: "https://github.com/xguerin/bitstring.git" +doc: ["http://et.redhat.com/~rjones/bitstring/html/Bitstring.html"] +homepage: "https://github.com/xguerin/bitstring" +license: "LGPLv2+ with exceptions and GPLv2+" +maintainer: "Xavier Guérin <github@applepine.org>" +opam-version: "1.2" +version: "2.1.0" + +build: [ + ["./configure" "--prefix" prefix] + [make "srcdir=./"] +] +build-test: [[make "check"]] +patches: [ + "fix_402.patch" {ocaml-version = "4.02"} + "fix_404.patch" +] +remove: [["ocamlfind" "remove" "bitstring"]] +depends: ["ocamlfind" {build} "camlp4" {build}] +depexts: [ + [["debian"] ["time"]] + [["ubuntu"] ["time"]] +] +available: [ ocaml-version >= "3.10" ] +install: [make "install"] diff --git a/pa_bitstring.ml b/pa_bitstring.ml index 4556966..313760a 100644 --- a/pa_bitstring.ml +++ b/pa_bitstring.ml @@ -16,7 +16,7 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * - * $Id: pa_bitstring.ml 189 2012-01-17 13:02:18Z richard.wm.jones@gmail.com $ + * $Id$ *) open Printf @@ -623,7 +623,7 @@ let output_bitmatch _loc bs cases = * be known at runtime) but we may be able to directly access * the bytes in the string. *) - | P.Int, Some 8, Some field_byte_offset, _, _ -> + | P.Int, Some 8, Some field_byte_offset, _, signed -> let extract_fn = int_extract_const 8 endian signed in (* The fast-path code when everything is aligned. *) @@ -631,13 +631,13 @@ let output_bitmatch _loc bs cases = <:expr< let o = ($lid:original_off$ lsr 3) + $`int:field_byte_offset$ in - Char.code (String.unsafe_get $lid:data$ o) + Bitstring.char_code (String.unsafe_get $lid:data$ o) >> in <:expr< if $lid:len$ >= 8 then ( let v = - if $lid:off_aligned$ then + if not $`bool:signed$ && $lid:off_aligned$ then $fastpath$ else $extract_fn$ $lid:data$ $lid:off$ $lid:len$ 8 in @@ -666,17 +666,9 @@ let output_bitmatch _loc bs cases = | 16 -> <:expr< Bitstring.$lid:name$ $lid:data$ o >> | 32 -> - <:expr< - (* must allocate a new zero each time *) - let zero = Int32.of_int 0 in - Bitstring.$lid:name$ $lid:data$ o zero - >> + <:expr< Bitstring.$lid:name$ $lid:data$ o >> | 64 -> - <:expr< - (* must allocate a new zero each time *) - let zero = Int64.of_int 0 in - Bitstring.$lid:name$ $lid:data$ o zero - >> + <:expr< Bitstring.$lid:name$ $lid:data$ o >> | _ -> assert false in <:expr< (* Starting offset within the string. *) diff --git a/t12_signed_bytes_limits.ml b/t12_signed_bytes_limits.ml new file mode 100644 index 0000000..e252542 --- /dev/null +++ b/t12_signed_bytes_limits.ml @@ -0,0 +1,36 @@ +let a = Array.init 387 (fun i -> i - 129) + +let limits b = + Array.fold_left + (fun (mini,maxi) i -> + try + ignore (b i); + (min mini i, max maxi i) + with + _ -> (mini, maxi)) + (0,0) + a + +let () = + if + List.map limits [ + (fun i -> BITSTRING { i : 2 : signed }); + (fun i -> BITSTRING { i : 3 : signed }); + (fun i -> BITSTRING { i : 4 : signed }); + (fun i -> BITSTRING { i : 5 : signed }); + (fun i -> BITSTRING { i : 6 : signed }); + (fun i -> BITSTRING { i : 7 : signed }); + (fun i -> BITSTRING { i : 8 : signed }); + ] + <> + [ + (-2, 3); + (-4, 7); + (-8, 15); + (-16, 31); + (-32, 63); + (-64, 127); + (-128, 255) + ] + then + failwith("t12_signed_bytes_limits: failed") diff --git a/t13_signed_byte_create.ml b/t13_signed_byte_create.ml new file mode 100644 index 0000000..a37e116 --- /dev/null +++ b/t13_signed_byte_create.ml @@ -0,0 +1,26 @@ +let a n = + let n' = 1 lsl (pred n) in + Array.to_list (Array.init n' (fun i -> -(n'-i), n'+i)) @ + Array.to_list (Array.init (n' lsl 1) (fun i -> i,i));; + +let t s i = + List.fold_left + (fun ok (n,c) -> s n = String.make 1 (Char.chr (c lsl (8-i))) && ok ) + true + (a i);; + +let ok = fst (List.fold_left (fun (ok,i) s -> + t s i && ok, succ i) (true, 2) + [ + (fun i -> Bitstring.string_of_bitstring (BITSTRING { i : 2 : signed })); + (fun i -> Bitstring.string_of_bitstring (BITSTRING { i : 3 : signed })); + (fun i -> Bitstring.string_of_bitstring (BITSTRING { i : 4 : signed })); + (fun i -> Bitstring.string_of_bitstring (BITSTRING { i : 5 : signed })); + (fun i -> Bitstring.string_of_bitstring (BITSTRING { i : 6 : signed })); + (fun i -> Bitstring.string_of_bitstring (BITSTRING { i : 7 : signed })); + (fun i -> Bitstring.string_of_bitstring (BITSTRING { i : 8 : signed })); + ]) + +in +if not ok then + failwith("t13_signed_byte_create: failed") diff --git a/t141_signed_int_limits.ml b/t141_signed_int_limits.ml new file mode 100644 index 0000000..2a987fa --- /dev/null +++ b/t141_signed_int_limits.ml @@ -0,0 +1,131 @@ +let () = Random.self_init ();; + + +if not ( + fst (List.fold_left (fun (ok, i) (b,m) -> + let above_maxp = 1 lsl i in + let maxp = pred above_maxp in + let minp = - (above_maxp lsr 1) in + let below_minp = pred minp in + let gut = + try ignore (b maxp); true + with _ -> false in + let gut2 = + try ignore (b above_maxp); false + with _ -> true in + let gut3 = + try ignore (b minp); true + with _ -> false in + let gut4 = + try ignore (b below_minp); false + with _ -> true in + + + let gut5 = + let plage = Int32.shift_left 1l i in + let test () = + let signed_number = + Int32.to_int ( Int32.add (Random.int32 plage) (Int32.of_int minp) ) in + let bits = b signed_number in + let number' = m bits in + if signed_number = number' then true + else + begin + Printf.printf "bits:%d n=%d read=%d (%d %d)\n" i signed_number number' minp maxp; + false + end in + let res = ref true in + for i = 1 to 10_000 do + res := !res && test () + done; + !res in + + (gut && gut2 && gut3 && gut4 && gut5 && ok, succ i) + + ) + (true, 9) + [ + (fun n -> BITSTRING { n : 9 : signed }), + (fun b -> bitmatch b with { n: 9 : signed } -> n); + (fun n -> BITSTRING { n : 10 : signed }), + (fun b -> bitmatch b with { n : 10 : signed } -> n); + (fun n -> BITSTRING { n : 11 : signed }), + (fun b -> bitmatch b with { n : 11 : signed } -> n); + (fun n -> BITSTRING { n : 12 : signed }), + (fun b -> bitmatch b with { n : 12 : signed } -> n); + (fun n -> BITSTRING { n : 13 : signed }), + (fun b -> bitmatch b with { n : 13 : signed } -> n); + (fun n -> BITSTRING { n : 14 : signed }), + (fun b -> bitmatch b with { n : 14 : signed } -> n); + (fun n -> BITSTRING { n : 15 : signed }), + (fun b -> bitmatch b with { n : 15 : signed } -> n); + (fun n -> BITSTRING { n : 16 : signed }), + (fun b -> bitmatch b with { n : 16 : signed } -> n); + (fun n -> BITSTRING { n : 17 : signed }), + (fun b -> bitmatch b with { n : 17 : signed } -> n); + (fun n -> BITSTRING { n : 18 : signed }), + (fun b -> bitmatch b with { n : 18 : signed } -> n); + (fun n -> BITSTRING { n : 19 : signed }), + (fun b -> bitmatch b with { n : 19 : signed } -> n); + (fun n -> BITSTRING { n : 20 : signed }), + (fun b -> bitmatch b with { n : 20 : signed } -> n); + (fun n -> BITSTRING { n : 21 : signed }), + (fun b -> bitmatch b with { n : 21 : signed } -> n); + (fun n -> BITSTRING { n : 22 : signed }), + (fun b -> bitmatch b with { n : 22 : signed } -> n); + (fun n -> BITSTRING { n : 23 : signed }), + (fun b -> bitmatch b with { n : 23 : signed } -> n); + (fun n -> BITSTRING { n : 24 : signed }), + (fun b -> bitmatch b with { n : 24 : signed } -> n); + (fun n -> BITSTRING { n : 25 : signed }), + (fun b -> bitmatch b with { n : 25 : signed } -> n); + (fun n -> BITSTRING { n : 26 : signed }), + (fun b -> bitmatch b with { n : 26 : signed } -> n); + (fun n -> BITSTRING { n : 27 : signed }), + (fun b -> bitmatch b with { n : 27 : signed } -> n); + (fun n -> BITSTRING { n : 28 : signed }), + (fun b -> bitmatch b with { n : 28 : signed } -> n); + (fun n -> BITSTRING { n : 29 : signed }), + (fun b -> bitmatch b with { n : 29 : signed } -> n); + (fun n -> BITSTRING { n : 30 : signed }), + (fun b -> bitmatch b with { n : 30 : signed } -> n); + ] + ) && + + begin + try + if Sys.word_size = 32 then + begin + ignore (BITSTRING { max_int : 31 : signed }); + ignore (BITSTRING { min_int : 31 : signed }); + end + else + begin + ignore (BITSTRING { pred (1 lsl 31) : 31 : signed }); + ignore (BITSTRING { (-1 lsl 30) : 31 : signed }); + end; + true + with + _ -> + false; + end + + && + + begin + if Sys.word_size = 64 then + try + ignore (BITSTRING { 1 lsl 31 : 31 : signed }); + ignore (BITSTRING { pred (-1 lsl 30) : 31 : signed }); + false + with _ -> true + else + true + end + +) +then + failwith("t141_signed_int_limits: failed") + + +(* Manquent les tests random pour bits = 31 *) diff --git a/t14_signed_byte_match.ml b/t14_signed_byte_match.ml new file mode 100644 index 0000000..6e17743 --- /dev/null +++ b/t14_signed_byte_match.ml @@ -0,0 +1,27 @@ +let a n = + let n' = 1 lsl (pred n) in + Array.to_list (Array.init (n' lsl 1) (fun i -> i-n')) + +let t s i = + List.fold_left + (fun ok n -> s n = n && ok ) + true + (a i);; + +let ok = fst (List.fold_left (fun (ok,i) s -> + t s i && ok, succ i) (true, 2) +[ + (fun n -> bitmatch BITSTRING { n : 2 : signed } with { i : 2 : signed } -> i | { _ } -> assert false); + (fun n -> bitmatch BITSTRING { n : 3 : signed } with { i : 3 : signed } -> i | { _ } -> assert false); + (fun n -> bitmatch BITSTRING { n : 4 : signed } with { i : 4 : signed } -> i | { _ } -> assert false); + (fun n -> bitmatch BITSTRING { n : 5 : signed } with { i : 5 : signed } -> i | { _ } -> assert false); + (fun n -> bitmatch BITSTRING { n : 6 : signed } with { i : 6 : signed } -> i | { _ } -> assert false); + (fun n -> bitmatch BITSTRING { n : 7 : signed } with { i : 7 : signed } -> i | { _ } -> assert false); + (fun n -> bitmatch BITSTRING { n : 8 : signed } with { i : 8 : signed } -> i | { _ } -> assert false); +]) + +in +if not ok then + failwith("t13_signed_byte_create: failed") + + diff --git a/tests/test_01_load.ml b/tests/test_01_load.ml index d986ee1..653b70a 100644 --- a/tests/test_01_load.ml +++ b/tests/test_01_load.ml @@ -1,5 +1,5 @@ (* Just check that the extension and library load without error. - * $Id: test_01_load.ml 187 2012-01-17 12:39:09Z richard.wm.jones@gmail.com $ + * $Id$ *) let _ = Bitstring.extract_bit diff --git a/tests/test_02_run.ml b/tests/test_02_run.ml index a4c8ca2..ae0e331 100644 --- a/tests/test_02_run.ml +++ b/tests/test_02_run.ml @@ -1,5 +1,5 @@ (* Just check that we can run some functions from the library. - * $Id: test_02_run.ml 187 2012-01-17 12:39:09Z richard.wm.jones@gmail.com $ + * $Id$ *) let () = diff --git a/tests/test_10_match_bits.ml b/tests/test_10_match_bits.ml index b349dba..f0dde30 100644 --- a/tests/test_10_match_bits.ml +++ b/tests/test_10_match_bits.ml @@ -1,5 +1,5 @@ (* Match random bits. - * $Id: test_10_match_bits.ml 187 2012-01-17 12:39:09Z richard.wm.jones@gmail.com $ + * $Id$ *) open Printf diff --git a/tests/test_11_match_ints.ml b/tests/test_11_match_ints.ml index d5667d3..c9ffd1a 100644 --- a/tests/test_11_match_ints.ml +++ b/tests/test_11_match_ints.ml @@ -1,5 +1,5 @@ (* Match random bits with integers. - * $Id: test_11_match_ints.ml 187 2012-01-17 12:39:09Z richard.wm.jones@gmail.com $ + * $Id$ *) open Printf diff --git a/tests/test_20_varsize.ml b/tests/test_20_varsize.ml index 62e47b4..1014bcb 100644 --- a/tests/test_20_varsize.ml +++ b/tests/test_20_varsize.ml @@ -1,5 +1,5 @@ (* Construct and match against random variable sized strings. - * $Id: test_20_varsize.ml 187 2012-01-17 12:39:09Z richard.wm.jones@gmail.com $ + * $Id$ *) open Printf diff --git a/tests/test_30_bitbuffer.ml b/tests/test_30_bitbuffer.ml index ef8e19e..466a8f2 100644 --- a/tests/test_30_bitbuffer.ml +++ b/tests/test_30_bitbuffer.ml @@ -1,6 +1,6 @@ (* Test the Bitstring.Buffer module and string_of_bitstring in * nasty non-aligned corner cases. - * $Id: test_30_bitbuffer.ml 187 2012-01-17 12:39:09Z richard.wm.jones@gmail.com $ + * $Id$ *) open Printf diff --git a/tests/test_36_is_zeroes_ones.ml b/tests/test_36_is_zeroes_ones.ml new file mode 100644 index 0000000..59ab38f --- /dev/null +++ b/tests/test_36_is_zeroes_ones.ml @@ -0,0 +1,29 @@ +(* Test if bitstrings are all zeroes or all ones. + * $Id$ + *) + +open Printf + +let () = + for i = 0 to 33 do + let bits = Bitstring.zeroes_bitstring i in + if not (Bitstring.is_zeroes_bitstring bits) then ( + eprintf "is_zeros_bitstring failed %d\n" i; + exit 1 + ); + if i > 0 && Bitstring.is_ones_bitstring bits then ( + eprintf "false match is_ones_bitstring %d\n" i; + exit 1 + ) + done; + for i = 0 to 33 do + let bits = Bitstring.ones_bitstring i in + if not (Bitstring.is_ones_bitstring bits) then ( + eprintf "is_ones_bitstring failed %d\n" i; + exit 1 + ); + if i > 0 && Bitstring.is_zeroes_bitstring bits then ( + eprintf "false match is_zeroes_bitstring %d\n" i; + exit 1 + ) + done diff --git a/tests/test_40_endianexpr.ml b/tests/test_40_endianexpr.ml index 3aa7a8e..6dd4a7f 100644 --- a/tests/test_40_endianexpr.ml +++ b/tests/test_40_endianexpr.ml @@ -1,5 +1,5 @@ (* Endianness expressions - * $Id: test_40_endianexpr.ml 187 2012-01-17 12:39:09Z richard.wm.jones@gmail.com $ + * $Id$ *) open Printf diff --git a/tests/test_50_named_pattern.ml b/tests/test_50_named_pattern.ml index 323b30c..c14bebb 100644 --- a/tests/test_50_named_pattern.ml +++ b/tests/test_50_named_pattern.ml @@ -1,5 +1,5 @@ (* Named pattern - * $Id: test_50_named_pattern.ml 187 2012-01-17 12:39:09Z richard.wm.jones@gmail.com $ + * $Id$ *) open Printf diff --git a/tests/test_51_open_pattern.ml b/tests/test_51_open_pattern.ml index 9f1833a..8c0b33b 100644 --- a/tests/test_51_open_pattern.ml +++ b/tests/test_51_open_pattern.ml @@ -1,5 +1,5 @@ (* Open a persistent pattern - * $Id: test_51_open_pattern.ml 187 2012-01-17 12:39:09Z richard.wm.jones@gmail.com $ + * $Id$ *) open Printf diff --git a/tests/test_60_simple_offset.ml b/tests/test_60_simple_offset.ml index b6a9ca8..a2b00ca 100644 --- a/tests/test_60_simple_offset.ml +++ b/tests/test_60_simple_offset.ml @@ -1,5 +1,5 @@ (* Simple offset test - * $Id: test_60_simple_offset.ml 187 2012-01-17 12:39:09Z richard.wm.jones@gmail.com $ + * $Id$ *) open Printf diff --git a/tests/test_61_offset_string.ml b/tests/test_61_offset_string.ml index 3b5e064..1ea7f70 100644 --- a/tests/test_61_offset_string.ml +++ b/tests/test_61_offset_string.ml @@ -1,6 +1,6 @@ (* Offset string. The rotation functions used for strings are * very complicated so this is worth testing separately. - * $Id: test_61_offset_string.ml 187 2012-01-17 12:39:09Z richard.wm.jones@gmail.com $ + * $Id$ *) open Printf diff --git a/tests/test_62_offset_padding.ml b/tests/test_62_offset_padding.ml index 565942d..3276965 100644 --- a/tests/test_62_offset_padding.ml +++ b/tests/test_62_offset_padding.ml @@ -1,5 +1,5 @@ (* Test computed offsets when original_off <> 0. - * $Id: test_62_offset_padding.ml 187 2012-01-17 12:39:09Z richard.wm.jones@gmail.com $ + * $Id$ *) open Printf diff --git a/tests/test_65_save_offset_to.ml b/tests/test_65_save_offset_to.ml index 4f6ffab..b731a5f 100644 --- a/tests/test_65_save_offset_to.ml +++ b/tests/test_65_save_offset_to.ml @@ -1,5 +1,5 @@ (* Test save_offset_to. - * $Id: test_65_save_offset_to.ml 187 2012-01-17 12:39:09Z richard.wm.jones@gmail.com $ + * $Id$ *) open Printf diff --git a/tests/test_70_check_and_bind.ml b/tests/test_70_check_and_bind.ml index bf0e192..a63ee6b 100644 --- a/tests/test_70_check_and_bind.ml +++ b/tests/test_70_check_and_bind.ml @@ -1,5 +1,5 @@ (* Test check() and bind(). - * $Id: test_70_check_and_bind.ml 187 2012-01-17 12:39:09Z richard.wm.jones@gmail.com $ + * $Id$ *) open Printf |