From 73fa8255ac65985b2a7b5596191892b6027e0c4d Mon Sep 17 00:00:00 2001 From: Nikos Mavrogiannopoulos Date: Sun, 21 Jan 2018 10:49:45 +0100 Subject: development moved to gitlab Signed-off-by: Nikos Mavrogiannopoulos --- .clcopying | 5 - .gitignore | 215 -- .gitlab-ci.yml | 70 - .prev-version | 1 - AUTHORS | 12 - COPYING | 674 ----- COPYING.LIB | 502 ---- GNUmakefile | 127 - Makefile.am | 65 - NEWS | 517 ---- README | 22 - README-alpha | 49 - README.md | 7 + THANKS | 27 - build-aux/gendocs.sh | 504 ---- build-aux/gnupload | 440 --- build-aux/pmccabe.css | 159 -- build-aux/pmccabe2html | 911 ------ build-aux/snippet/_Noreturn.h | 10 - build-aux/snippet/arg-nonnull.h | 26 - build-aux/snippet/c++defs.h | 316 -- build-aux/snippet/warn-on-use.h | 109 - build-aux/update-copyright | 274 -- build-aux/useless-if-before-free | 210 -- build-aux/vc-list-files | 113 - cfg.mk | 166 -- configure.ac | 129 - devel/ABI-x86_64.dump | 1577 ---------- doc/Makefile.am | 200 -- doc/TODO | 25 - doc/announce.txt | 96 - doc/cyclo/Makefile.am | 33 - doc/fdl-1.3.texi | 505 ---- doc/gdoc | 1069 ------- doc/gendocs_template | 100 - doc/libtasn1.texi | 509 ---- doc/reference/Makefile.am | 105 - doc/reference/libtasn1-docs.sgml | 49 - doc/reference/version.xml.in | 1 - doc/release-process.txt | 28 - doc/texinfo.css | 44 - examples/CertificateExample.c | 673 ----- examples/CrlExample.c | 540 ---- examples/Makefile.am | 36 - examples/asn1Coding_test.asg | 6 - examples/asn1Coding_test.asn | 29 - examples/pkix.asn | 954 ------- gl/Makefile.am | 1095 ------- gl/errno.in.h | 279 -- gl/fstat.c | 88 - gl/ftell.c | 37 - gl/ftello.c | 85 - gl/getopt.c | 1275 --------- gl/getopt.in.h | 261 -- gl/getopt1.c | 170 -- gl/getopt_int.h | 135 - gl/gettext.h | 292 -- gl/gettime.c | 48 - gl/gettimeofday.c | 154 - gl/limits.in.h | 63 - gl/lseek.c | 67 - gl/m4/00gnulib.m4 | 46 - gl/m4/absolute-header.m4 | 102 - gl/m4/autobuild.m4 | 39 - gl/m4/clock_time.m4 | 31 - gl/m4/errno_h.m4 | 137 - gl/m4/extensions.m4 | 173 -- gl/m4/extern-inline.m4 | 102 - gl/m4/fseeko.m4 | 73 - gl/m4/fstat.m4 | 36 - gl/m4/ftell.m4 | 15 - gl/m4/ftello.m4 | 140 - gl/m4/getopt.m4 | 368 --- gl/m4/gettime.m4 | 13 - gl/m4/gettimeofday.m4 | 138 - gl/m4/gnulib-cache.m4 | 64 - gl/m4/gnulib-common.m4 | 462 --- gl/m4/gnulib-comp.m4 | 473 --- gl/m4/gnulib-tool.m4 | 57 - gl/m4/include_next.m4 | 223 -- gl/m4/largefile.m4 | 146 - gl/m4/limits-h.m4 | 31 - gl/m4/longlong.m4 | 113 - gl/m4/lseek.m4 | 71 - gl/m4/malloc.m4 | 101 - gl/m4/manywarnings.m4 | 276 -- gl/m4/msvc-inval.m4 | 19 - gl/m4/msvc-nothrow.m4 | 10 - gl/m4/multiarch.m4 | 62 - gl/m4/nocrash.m4 | 131 - gl/m4/off_t.m4 | 18 - gl/m4/read-file.m4 | 8 - gl/m4/realloc.m4 | 79 - gl/m4/ssize_t.m4 | 23 - gl/m4/stdarg.m4 | 78 - gl/m4/stddef_h.m4 | 51 - gl/m4/stdint.m4 | 541 ---- gl/m4/stdio_h.m4 | 225 -- gl/m4/stdlib_h.m4 | 120 - gl/m4/sys_socket_h.m4 | 176 -- gl/m4/sys_stat_h.m4 | 96 - gl/m4/sys_time_h.m4 | 111 - gl/m4/sys_types_h.m4 | 49 - gl/m4/time_h.m4 | 134 - gl/m4/timespec.m4 | 11 - gl/m4/unistd_h.m4 | 190 -- gl/m4/valgrind-tests.m4 | 37 - gl/m4/version-etc.m4 | 33 - gl/m4/warn-on-use.m4 | 47 - gl/m4/warnings.m4 | 79 - gl/m4/wchar_t.m4 | 24 - gl/m4/wint_t.m4 | 62 - gl/malloc.c | 56 - gl/msvc-inval.c | 129 - gl/msvc-inval.h | 222 -- gl/msvc-nothrow.c | 49 - gl/msvc-nothrow.h | 43 - gl/override/doc/gendocs_template.diff | 20 - gl/override/m4/valgrind-tests.m4.diff | 11 - gl/progname.c | 92 - gl/progname.h | 62 - gl/read-file.c | 188 -- gl/read-file.h | 33 - gl/realloc.c | 79 - gl/stdarg.in.h | 35 - gl/stddef.in.h | 110 - gl/stdint.in.h | 707 ----- gl/stdio-impl.h | 140 - gl/stdio.in.h | 1377 --------- gl/stdlib.in.h | 992 ------- gl/sys_stat.in.h | 732 ----- gl/sys_time.in.h | 220 -- gl/sys_types.in.h | 53 - gl/time.in.h | 297 -- gl/timespec.c | 3 - gl/timespec.h | 112 - gl/unistd.c | 4 - gl/unistd.in.h | 1590 ----------- gl/version-etc-fsf.c | 30 - gl/version-etc.c | 258 -- gl/version-etc.h | 78 - gtk-doc.make | 280 -- lib/ASN1.c | 3004 -------------------- lib/ASN1.y | 894 ------ lib/Makefile.am | 59 - lib/coding.c | 1347 --------- lib/decoding.c | 2376 ---------------- lib/element.c | 1111 -------- lib/element.h | 40 - lib/errors.c | 99 - lib/gllib/Makefile.am | 419 --- lib/gllib/hash-pjw-bare.c | 42 - lib/gllib/hash-pjw-bare.h | 24 - lib/gllib/intprops.h | 458 --- lib/gllib/limits.in.h | 63 - lib/gllib/minmax.h | 60 - lib/gllib/stddef.in.h | 110 - lib/gllib/stdint.in.h | 707 ----- lib/gllib/string.in.h | 1046 ------- lib/gllib/strverscmp.c | 117 - lib/gllib/sys_types.in.h | 53 - lib/gllib/verify.h | 279 -- lib/glm4/00gnulib.m4 | 46 - lib/glm4/absolute-header.m4 | 102 - lib/glm4/extensions.m4 | 173 -- lib/glm4/extern-inline.m4 | 102 - lib/glm4/gnulib-cache.m4 | 56 - lib/glm4/gnulib-common.m4 | 462 --- lib/glm4/gnulib-comp.m4 | 272 -- lib/glm4/gnulib-tool.m4 | 57 - lib/glm4/include_next.m4 | 223 -- lib/glm4/ld-version-script.m4 | 48 - lib/glm4/limits-h.m4 | 31 - lib/glm4/longlong.m4 | 113 - lib/glm4/minmax.m4 | 44 - lib/glm4/multiarch.m4 | 62 - lib/glm4/off_t.m4 | 18 - lib/glm4/ssize_t.m4 | 23 - lib/glm4/stddef_h.m4 | 51 - lib/glm4/stdint.m4 | 541 ---- lib/glm4/string_h.m4 | 120 - lib/glm4/strverscmp.m4 | 22 - lib/glm4/sys_types_h.m4 | 49 - lib/glm4/visibility.m4 | 77 - lib/glm4/warn-on-use.m4 | 47 - lib/glm4/wchar_t.m4 | 24 - lib/glm4/wint_t.m4 | 62 - lib/gstr.c | 74 - lib/gstr.h | 42 - lib/int.h | 222 -- lib/libtasn1.h | 405 --- lib/libtasn1.map | 63 - lib/libtasn1.pc.in | 30 - lib/parser_aux.c | 1097 ------- lib/parser_aux.h | 158 - lib/structure.c | 1197 -------- lib/structure.h | 40 - lib/version.c | 51 - m4/gtk-doc.m4 | 62 - m4/pkg.m4 | 157 - m4/update-header-version.m4 | 24 - maint.mk | 1674 ----------- msvc/build_debug.bat | 11 - msvc/build_release.bat | 9 - msvc/libtasn1.mak | 42 - msvc/msvc_exe.mk | 49 - msvc/msvc_lib.mk | 46 - msvc/snprintf.h | 33 - msvc/test_parser.mak | 31 - msvc/vcvars.mk | 138 - src/Makefile.am | 30 - src/asn1Coding.c | 359 --- src/asn1Decoding.c | 327 --- src/asn1Parser.c | 195 -- src/benchmark.c | 160 -- src/benchmark.h | 52 - tests/Makefile.am | 92 - tests/TestCertOctetOverflow.der | Bin 357 -> 0 bytes tests/TestIndef.p12 | Bin 2824 -> 0 bytes tests/TestIndef2.p12 | Bin 1526 -> 0 bytes tests/TestIndef3.der | Bin 660 -> 0 bytes tests/Test_choice.c | 117 - tests/Test_choice_ocsp.c | 80 - tests/Test_encdec.c | 182 -- tests/Test_encoding.asn | 38 - tests/Test_encoding.c | 168 -- tests/Test_errors.c | 43 - tests/Test_indefinite.c | 204 -- tests/Test_overflow.c | 168 -- tests/Test_parser.asn | 44 - tests/Test_parser.c | 236 -- tests/Test_simple.c | 209 -- tests/Test_strings.c | 153 - tests/Test_tree.asn | 176 -- tests/Test_tree.c | 829 ------ tests/Test_tree_asn1_tab.c | 169 -- tests/benchmark | 35 - tests/cert-invalid-time.der | Bin 1136 -> 0 bytes tests/choice.asn | 23 - tests/coding | 60 - tests/coding-decoding2.asn | 30 - tests/coding-decoding2.c | 199 -- tests/coding-long-oid.c | 205 -- tests/copynode.c | 215 -- tests/crl.der | Bin 504 -> 0 bytes tests/crlf | 35 - tests/crlf.cer | Bin 796 -> 0 bytes tests/decoding | 47 - tests/decoding-invalid-pkcs7 | 43 - tests/decoding-invalid-x509 | 43 - tests/invalid-assignments1.txt | 1 - tests/invalid-assignments2.txt | Bin 224 -> 0 bytes tests/invalid-pkcs7/id-000001.der | Bin 5375 -> 0 bytes tests/invalid-pkcs7/id-000002.der | Bin 797 -> 0 bytes tests/invalid-pkcs7/id-000003.der | Bin 229 -> 0 bytes tests/invalid-x509/id-000000.der | Bin 704 -> 0 bytes tests/invalid-x509/id-000001.der | Bin 429 -> 0 bytes tests/invalid-x509/id-000002.der | Bin 709 -> 0 bytes tests/invalid-x509/id-000003.der | Bin 783 -> 0 bytes tests/invalid-x509/id-000004.der | Bin 1608 -> 0 bytes tests/invalid-x509/id-000005.der | Bin 1608 -> 0 bytes tests/invalid-x509/id-000006.der | Bin 686 -> 0 bytes tests/invalid-x509/id-000007.der | Bin 372 -> 0 bytes tests/invalid-x509/id-000008.der | Bin 585 -> 0 bytes tests/invalid-x509/id-000009.der | Bin 443 -> 0 bytes tests/invalid-x509/id-000010.der | Bin 470 -> 0 bytes tests/invalid-x509/id-000011.der | Bin 412 -> 0 bytes tests/invalid-x509/id-000012.der | Bin 374 -> 0 bytes tests/invalid-x509/id-000013.der | Bin 434 -> 0 bytes tests/invalid-x509/id-000014.der | Bin 567 -> 0 bytes tests/invalid-x509/id-000015.der | Bin 720 -> 0 bytes tests/invalid-x509/id-000016.der | Bin 698 -> 0 bytes tests/invalid-x509/id-000017.der | Bin 718 -> 0 bytes tests/invalid-x509/id-000018.der | Bin 551 -> 0 bytes tests/invalid-x509/id-000019.der | Bin 524 -> 0 bytes tests/invalid-x509/id-000020.der | Bin 568 -> 0 bytes tests/invalid-x509/id-000021.der | Bin 625 -> 0 bytes tests/invalid-x509/id-000022.der | Bin 483 -> 0 bytes tests/invalid-x509/id-000023.der | Bin 360 -> 0 bytes tests/invalid-x509/id-000024.der | Bin 360 -> 0 bytes tests/invalid-x509/id-000025.der | Bin 630 -> 0 bytes tests/invalid-x509/id-000026.der | Bin 445 -> 0 bytes tests/invalid-x509/id-000027.der | Bin 457 -> 0 bytes tests/invalid-x509/id-000028.der | Bin 430 -> 0 bytes tests/invalid-x509/id-000029.der | Bin 439 -> 0 bytes tests/invalid-x509/id-000030.der | Bin 703 -> 0 bytes tests/invalid-x509/id-000031.der | Bin 703 -> 0 bytes tests/invalid-x509/id-000032.der | Bin 469 -> 0 bytes tests/invalid-x509/id-000033.der | Bin 718 -> 0 bytes tests/invalid-x509/id-000034.der | Bin 712 -> 0 bytes tests/invalid-x509/id-000035.der | Bin 704 -> 0 bytes ...PA-2015-002-libtasn1-4.3-stack-overflow.crt.der | Bin 269 -> 0 bytes ...47,orig:id:000009,src:000044,op:havoc,rep:2.der | 1 - ...g:id:000026,src:000000,op:havoc,rep:32,+cov.der | 1 - ...g:id:000038,src:000000,op:havoc,rep:64,+cov.der | 1 - ...,orig:id:000039,src:000000,op:havoc,rep:128.der | Bin 12 -> 0 bytes ...70,orig:id:000040,src:000061,op:havoc,rep:4.der | Bin 4 -> 0 bytes ...id:000045,src:000019+000093,op:splice,rep:2.der | Bin 6 -> 0 bytes ...id:000048,src:000035+000050,op:splice,rep:2.der | 1 - ...ig:id:000049,src:000004,op:havoc,rep:2,+cov.der | 1 - ...1,orig:id:000061,src:000036,op:havoc,rep:16.der | Bin 23 -> 0 bytes ...43,orig:id:000067,src:000039,op:havoc,rep:2.der | Bin 15 -> 0 bytes ...47,orig:id:000069,src:000039,op:havoc,rep:2.der | Bin 17 -> 0 bytes ...94,orig:id:000096,src:000062,op:havoc,rep:2.der | Bin 40 -> 0 bytes ...97,orig:id:000099,src:000097,op:havoc,rep:4.der | 1 - ...10,orig:id:000112,src:000102,op:havoc,rep:4.der | 1 - ...27,orig:id:000129,src:000112,op:havoc,rep:2.der | 1 - ...0136,src:000016+000011,op:splice,rep:8,+cov.der | 1 - .../id:000344,src:000001,op:flip1,pos:6,+cov.der | Bin 1012 -> 0 bytes .../id:000347,src:000001,op:flip1,pos:8,+cov.der | Bin 1012 -> 0 bytes .../id:000359,src:000001,op:flip1,pos:21,+cov.der | Bin 1012 -> 0 bytes .../id:000396,src:000001,op:flip1,pos:104.der | Bin 1012 -> 0 bytes .../id:000398,src:000001,op:flip1,pos:104,+cov.der | Bin 1012 -> 0 bytes .../id:000399,src:000001,op:flip1,pos:104.der | Bin 1012 -> 0 bytes .../id:000415,src:000001,op:flip1,pos:228,+cov.der | Bin 1012 -> 0 bytes .../id:000438,src:000001,op:flip1,pos:573.der | Bin 1012 -> 0 bytes .../id:000444,src:000001,op:flip1,pos:583,+cov.der | Bin 1012 -> 0 bytes .../id:000459,src:000001,op:flip2,pos:23,+cov.der | Bin 1012 -> 0 bytes .../id:000469,src:000001,op:flip2,pos:542,+cov.der | Bin 1012 -> 0 bytes .../id:000470,src:000001,op:flip2,pos:544.der | Bin 1012 -> 0 bytes .../id:000473,src:000001,op:flip2,pos:714.der | Bin 1012 -> 0 bytes .../id:000476,src:000001,op:flip2,pos:739.der | Bin 1012 -> 0 bytes .../id:000478,src:000001,op:flip4,pos:21.der | Bin 1012 -> 0 bytes .../id:000487,src:000001,op:flip4,pos:739.der | Bin 1012 -> 0 bytes .../id:000492,src:000001,op:flip8,pos:36,+cov.der | Bin 1012 -> 0 bytes ...3,src:000001,op:arith8,pos:104,val:-17,+cov.der | Bin 1012 -> 0 bytes ...000505,src:000001,op:arith8,pos:174,val:+35.der | Bin 1012 -> 0 bytes ...08,src:000001,op:arith8,pos:503,val:+3,+cov.der | Bin 1012 -> 0 bytes ...09,src:000001,op:arith8,pos:506,val:+3,+cov.der | Bin 1012 -> 0 bytes ...517,src:000001,op:int8,pos:11,val:-128,+cov.der | Bin 1012 -> 0 bytes ...519,src:000001,op:int8,pos:21,val:-128,+cov.der | Bin 1012 -> 0 bytes ...521,src:000001,op:int8,pos:34,val:-128,+cov.der | Bin 1012 -> 0 bytes ...523,src:000001,op:int8,pos:43,val:-128,+cov.der | Bin 1012 -> 0 bytes ...27,src:000001,op:int8,pos:104,val:-128,+cov.der | Bin 1012 -> 0 bytes ...32,src:000001,op:int8,pos:516,val:-128,+cov.der | Bin 1012 -> 0 bytes ...:000535,src:000001,op:int8,pos:739,val:+127.der | Bin 1012 -> 0 bytes ...rc:000001,op:int16,pos:209,val:be:+127,+cov.der | Bin 1012 -> 0 bytes ...2,src:000001,op:int32,pos:21,val:+100663045.der | Bin 1012 -> 0 bytes ...5,src:000001,op:int32,pos:104,val:+255,+cov.der | Bin 1012 -> 0 bytes ...rc:000001,op:int32,pos:178,val:be:-128,+cov.der | Bin 1012 -> 0 bytes ...574,src:000001,op:int32,pos:515,val:be:-128.der | Bin 1012 -> 0 bytes .../id:000578,src:000001,op:havoc,rep:32.der | Bin 1012 -> 0 bytes .../id:000581,src:000001,op:havoc,rep:2.der | Bin 1012 -> 0 bytes .../id:000582,src:000001,op:havoc,rep:2.der | Bin 1012 -> 0 bytes .../id:000585,src:000001,op:havoc,rep:8.der | Bin 1012 -> 0 bytes .../id:000586,src:000001,op:havoc,rep:16.der | Bin 1012 -> 0 bytes .../id:000587,src:000001,op:havoc,rep:2,+cov.der | Bin 1012 -> 0 bytes .../id:000590,src:000001,op:havoc,rep:32,+cov.der | Bin 1012 -> 0 bytes .../id:000592,src:000001,op:havoc,rep:32,+cov.der | Bin 1012 -> 0 bytes .../id:000594,src:000001,op:havoc,rep:2,+cov.der | Bin 1013 -> 0 bytes .../id:000595,src:000001,op:havoc,rep:2,+cov.der | Bin 1012 -> 0 bytes .../id:000598,src:000001,op:havoc,rep:32.der | Bin 1012 -> 0 bytes .../id:000600,src:000001,op:havoc,rep:8,+cov.der | Bin 1012 -> 0 bytes .../id:000601,src:000001,op:havoc,rep:8,+cov.der | Bin 1012 -> 0 bytes .../id:000603,src:000002,op:flip1,pos:19.der | Bin 269 -> 0 bytes .../id:000605,src:000002,op:havoc,rep:8.der | Bin 272 -> 0 bytes .../id:000621,src:000003,op:flip1,pos:229,+cov.der | Bin 357 -> 0 bytes ...9,src:000003,op:arith8,pos:205,val:-26,+cov.der | Bin 357 -> 0 bytes ...36,src:000003,op:int8,pos:205,val:-128,+cov.der | Bin 357 -> 0 bytes ...37,src:000003,op:int8,pos:207,val:-128,+cov.der | Bin 357 -> 0 bytes ...9,src:000003,op:int16,pos:205,val:+128,+cov.der | Bin 357 -> 0 bytes ...4,src:000003,op:int32,pos:205,val:+255,+cov.der | Bin 357 -> 0 bytes .../id:000648,src:000003,op:havoc,rep:8.der | Bin 360 -> 0 bytes .../id:000649,src:000003,op:havoc,rep:2,+cov.der | Bin 357 -> 0 bytes .../id:000650,src:000003,op:havoc,rep:8.der | Bin 360 -> 0 bytes .../id:000652,src:000003,op:havoc,rep:4.der | Bin 357 -> 0 bytes .../id:000654,src:000003,op:havoc,rep:16.der | Bin 359 -> 0 bytes .../id:000657,src:000003,op:havoc,rep:2.der | Bin 358 -> 0 bytes .../id:000658,src:000003,op:havoc,rep:4.der | Bin 357 -> 0 bytes .../id:000660,src:000003,op:havoc,rep:4.der | Bin 357 -> 0 bytes .../id:000661,src:000003,op:havoc,rep:8,+cov.der | Bin 360 -> 0 bytes .../id:000662,src:000003,op:havoc,rep:4,+cov.der | Bin 364 -> 0 bytes .../id:000664,src:000003,op:havoc,rep:2,+cov.der | Bin 360 -> 0 bytes .../id:000670,src:000182,op:havoc,rep:4,+cov.der | Bin 5 -> 0 bytes .../id:000672,src:000182,op:havoc,rep:8.der | 1 - .../id:000676,src:000254,op:havoc,rep:4,+cov.der | 1 - .../id:000677,src:000254,op:havoc,rep:2,+cov.der | 1 - .../id:000678,src:000254,op:havoc,rep:2,+cov.der | 1 - .../id:000679,src:000254,op:havoc,rep:2,+cov.der | 2 - .../id:000680,src:000254,op:havoc,rep:2,+cov.der | 1 - .../id:000681,src:000254,op:havoc,rep:4,+cov.der | 1 - .../id:000682,src:000254,op:havoc,rep:2,+cov.der | 1 - .../id:000683,src:000254,op:havoc,rep:4,+cov.der | 1 - .../id:000684,src:000254,op:havoc,rep:2,+cov.der | 1 - .../id:000685,src:000254,op:havoc,rep:2,+cov.der | 1 - .../id:000687,src:000336,op:flip1,pos:508.der | Bin 777 -> 0 bytes .../id:000688,src:000336,op:flip4,pos:508.der | Bin 777 -> 0 bytes ...rc:000336,op:int16,pos:424,val:be:-128,+cov.der | Bin 777 -> 0 bytes ...1,src:000336,op:int32,pos:423,val:-128,+cov.der | Bin 777 -> 0 bytes .../id:000694,src:000350,op:flip8,pos:16.der | Bin 1012 -> 0 bytes ...:000695,src:000350,op:arith8,pos:12,val:-35.der | Bin 1012 -> 0 bytes .../id:000704,src:000403,op:flip4,pos:103.der | Bin 1012 -> 0 bytes .../id:000708,src:000416,op:flip4,pos:228,+cov.der | Bin 1012 -> 0 bytes ...d:000709,src:000436,op:int32,pos:550,val:+0.der | Bin 1012 -> 0 bytes .../id:000712,src:000444,op:flip1,pos:584,+cov.der | Bin 1012 -> 0 bytes ...id:000714,src:000444,op:ext_AO,pos:584,+cov.der | Bin 1012 -> 0 bytes .../id:000722,src:000472,op:havoc,rep:2.der | Bin 1012 -> 0 bytes .../id:000723,src:000472,op:havoc,rep:4.der | Bin 1012 -> 0 bytes ...d:000729,src:000483,op:int32,pos:229,val:+0.der | Bin 1012 -> 0 bytes .../id:000730,src:000484,op:flip1,pos:503.der | Bin 1012 -> 0 bytes .../id:000731,src:000484,op:flip1,pos:505,+cov.der | Bin 1012 -> 0 bytes ...000735,src:000484,op:int32,pos:505,val:-128.der | Bin 1012 -> 0 bytes ...d:000738,src:000495,op:int32,pos:550,val:+0.der | Bin 1012 -> 0 bytes ...id:000743,src:000508,op:ext_AO,pos:504,+cov.der | Bin 1012 -> 0 bytes ...id:000744,src:000509,op:ext_AO,pos:507,+cov.der | Bin 1012 -> 0 bytes ...d:000748,src:000522,op:int8,pos:34,val:-128.der | Bin 1012 -> 0 bytes ...:000753,src:000528,op:int16,pos:119,val:+16.der | Bin 1012 -> 0 bytes .../id:000754,src:000528,op:havoc,rep:2.der | Bin 1012 -> 0 bytes .../id:000756,src:000539,op:flip1,pos:268,+cov.der | Bin 1012 -> 0 bytes .../id:000757,src:000539,op:flip32,pos:47,+cov.der | Bin 1012 -> 0 bytes .../id:000763,src:000539,op:havoc,rep:32,+cov.der | Bin 1013 -> 0 bytes .../id:000767,src:000539,op:havoc,rep:8,+cov.der | Bin 1015 -> 0 bytes .../id:000769,src:000539,op:havoc,rep:32,+cov.der | Bin 1012 -> 0 bytes .../id:000770,src:000539,op:havoc,rep:32.der | Bin 1015 -> 0 bytes ...id:000776,src:000549,op:int32,pos:13,val:+0.der | Bin 1012 -> 0 bytes .../id:000783,src:000579,op:ext_AO,pos:33,+cov.der | Bin 1012 -> 0 bytes .../id:000784,src:000587,op:ext_AO,pos:15,+cov.der | Bin 1012 -> 0 bytes ...id:000786,src:000600,op:ext_AO,pos:545,+cov.der | Bin 1012 -> 0 bytes ...d:000787,src:000601,op:int16,pos:103,val:-1.der | Bin 1012 -> 0 bytes ...id:000788,src:000601,op:ext_AO,pos:105,+cov.der | Bin 1012 -> 0 bytes .../id:000789,src:000608,op:havoc,rep:8.der | Bin 271 -> 0 bytes ...d:000791,src:000612,op:int32,pos:206,val:+0.der | Bin 357 -> 0 bytes .../id:000792,src:000613,op:flip4,pos:207.der | Bin 357 -> 0 bytes .../id:000797,src:000621,op:flip1,pos:235.der | Bin 357 -> 0 bytes .../id:000799,src:000623,op:flip1,pos:354,+cov.der | Bin 357 -> 0 bytes .../id:000800,src:000623,op:flip1,pos:354,+cov.der | Bin 357 -> 0 bytes ...1,src:000623,op:arith8,pos:354,val:-25,+cov.der | Bin 357 -> 0 bytes ...2,src:000623,op:int16,pos:354,val:-128,+cov.der | Bin 357 -> 0 bytes ...src:000623,op:int32,pos:193,val:-32768,+cov.der | Bin 357 -> 0 bytes ...05,src:000624,op:int8,pos:355,val:-128,+cov.der | Bin 357 -> 0 bytes ...src:000624,op:int32,pos:193,val:-32768,+cov.der | Bin 357 -> 0 bytes .../id:000810,src:000628,op:flip1,pos:7.der | Bin 357 -> 0 bytes ...src:000640,op:int32,pos:230,val:-2147483648.der | Bin 357 -> 0 bytes .../id:000817,src:000641,op:flip1,pos:11.der | Bin 357 -> 0 bytes .../id:000821,src:000645,op:flip1,pos:207.der | Bin 357 -> 0 bytes ...d:000823,src:000645,op:int32,pos:211,val:+0.der | Bin 357 -> 0 bytes ...d:000825,src:000647,op:int32,pos:232,val:+0.der | Bin 357 -> 0 bytes ...id:000828,src:000652,op:int32,pos:30,val:+0.der | Bin 357 -> 0 bytes ...id:000833,src:000654,op:int32,pos:43,val:+0.der | Bin 359 -> 0 bytes .../id:000840,src:000655,op:havoc,rep:16,+cov.der | Bin 522 -> 0 bytes .../id:000841,src:000655,op:havoc,rep:8,+cov.der | Bin 524 -> 0 bytes .../id:000846,src:000655,op:havoc,rep:64.der | Bin 499 -> 0 bytes .../id:000849,src:000655,op:havoc,rep:2.der | Bin 500 -> 0 bytes .../id:000852,src:000655,op:havoc,rep:32.der | Bin 498 -> 0 bytes .../id:000854,src:000655,op:havoc,rep:16.der | Bin 521 -> 0 bytes .../id:000855,src:000655,op:havoc,rep:64.der | Bin 499 -> 0 bytes .../id:000857,src:000655,op:havoc,rep:8,+cov.der | Bin 563 -> 0 bytes ...id:000859,src:000659,op:ext_AO,pos:259,+cov.der | Bin 357 -> 0 bytes ...id:000861,src:000660,op:int32,pos:92,val:+0.der | Bin 357 -> 0 bytes .../id:000862,src:000661,op:flip4,pos:282,+cov.der | Bin 360 -> 0 bytes ...64,src:000661,op:int8,pos:356,val:-128,+cov.der | Bin 360 -> 0 bytes ...5,src:000661,op:int16,pos:356,val:-128,+cov.der | Bin 360 -> 0 bytes ...src:000661,op:int32,pos:193,val:-32768,+cov.der | Bin 360 -> 0 bytes ...id:000867,src:000664,op:ext_AO,pos:206,+cov.der | Bin 360 -> 0 bytes ...0871,src:000676,op:arith8,pos:6,val:-5,+cov.der | 1 - ...872,src:000676,op:arith8,pos:7,val:-21,+cov.der | 1 - .../id:000873,src:000676,op:havoc,rep:2,+cov.der | 1 - .../id:000875,src:000680,op:havoc,rep:2,+cov.der | 1 - .../id:000876,src:000681,op:havoc,rep:2,+cov.der | 1 - .../id:000880,src:000683,op:havoc,rep:2,+cov.der | 1 - .../id:000881,src:000685,op:havoc,rep:2,+cov.der | 1 - ...d:000885,src:000701,op:int32,pos:106,val:+0.der | Bin 1012 -> 0 bytes ...d:000886,src:000701,op:int32,pos:107,val:+0.der | Bin 1012 -> 0 bytes ...id:000887,src:000708,op:ext_AO,pos:229,+cov.der | Bin 1012 -> 0 bytes .../id:000888,src:000713,op:flip1,pos:601.der | Bin 1012 -> 0 bytes .../id:000889,src:000713,op:flip1,pos:647.der | Bin 1012 -> 0 bytes .../id:000890,src:000714,op:flip1,pos:503,+cov.der | Bin 1012 -> 0 bytes ...00891,src:000721,op:int32,pos:798,val:be:+1.der | Bin 1013 -> 0 bytes ...d:000892,src:000724,op:int16,pos:503,val:+1.der | Bin 1015 -> 0 bytes ...d:000894,src:000734,op:int16,pos:503,val:+1.der | Bin 1012 -> 0 bytes .../id:000895,src:000745,op:flip4,pos:751.der | Bin 1012 -> 0 bytes .../id:000900,src:000745,op:havoc,rep:64.der | Bin 1013 -> 0 bytes .../id:000901,src:000745,op:havoc,rep:8.der | Bin 1013 -> 0 bytes ...000903,src:000768,op:int16,pos:230,val:+256.der | Bin 1015 -> 0 bytes ...,src:000768,op:int16,pos:1012,val:-128,+cov.der | Bin 1015 -> 0 bytes ...,src:000768,op:int32,pos:1010,val:-128,+cov.der | Bin 1015 -> 0 bytes ...rc:000768,op:int32,pos:1011,val:+32768,+cov.der | Bin 1015 -> 0 bytes ...id:000910,src:000777,op:int32,pos:28,val:+0.der | Bin 1012 -> 0 bytes ...src:000793,op:int32,pos:208,val:-2147483648.der | Bin 357 -> 0 bytes ...id:000914,src:000793,op:ext_AO,pos:208,+cov.der | Bin 357 -> 0 bytes .../id:000916,src:000808,op:flip1,pos:44.der | Bin 357 -> 0 bytes ...:000918,src:000811,op:int8,pos:300,val:-128.der | Bin 357 -> 0 bytes ...d:000920,src:000813,op:int32,pos:231,val:+0.der | Bin 357 -> 0 bytes ...id:000923,src:000818,op:int32,pos:18,val:+0.der | Bin 357 -> 0 bytes ...id:000924,src:000818,op:int32,pos:19,val:+0.der | Bin 357 -> 0 bytes ...id:000927,src:000819,op:int8,pos:9,val:-128.der | Bin 357 -> 0 bytes ...d:000928,src:000819,op:int32,pos:9,val:+255.der | Bin 357 -> 0 bytes .../id:000930,src:000820,op:flip1,pos:205.der | Bin 357 -> 0 bytes ...d:000935,src:000822,op:int32,pos:214,val:+0.der | Bin 357 -> 0 bytes .../id:000936,src:000826,op:flip1,pos:229.der | Bin 357 -> 0 bytes ...id:000939,src:000828,op:int32,pos:34,val:+0.der | Bin 357 -> 0 bytes .../id:000940,src:000829,op:flip2,pos:334.der | Bin 357 -> 0 bytes ...id:000943,src:000832,op:int32,pos:46,val:+0.der | Bin 359 -> 0 bytes .../id:000945,src:000840,op:flip1,pos:518,+cov.der | Bin 518 -> 0 bytes .../id:000947,src:000849,op:flip1,pos:279.der | Bin 500 -> 0 bytes ...:000949,src:000858,op:arith8,pos:280,val:-5.der | Bin 357 -> 0 bytes ...id:000950,src:000860,op:int16,pos:95,val:+0.der | Bin 357 -> 0 bytes .../id:000953,src:000862,op:flip1,pos:355,+cov.der | Bin 360 -> 0 bytes .../id:000954,src:000862,op:flip1,pos:355,+cov.der | Bin 360 -> 0 bytes .../id:000955,src:000862,op:flip1,pos:356,+cov.der | Bin 360 -> 0 bytes .../id:000956,src:000862,op:flip2,pos:355,+cov.der | Bin 360 -> 0 bytes .../id:000958,src:000863,op:flip1,pos:228.der | Bin 360 -> 0 bytes .../id:000959,src:000864,op:flip1,pos:357,+cov.der | Bin 360 -> 0 bytes .../id:000961,src:000866,op:flip1,pos:357,+cov.der | Bin 360 -> 0 bytes .../id:000962,src:000875,op:havoc,rep:4,+cov.der | 1 - .../id:000963,src:000876,op:flip4,pos:5,+cov.der | 1 - ...,src:000878,op:int16,pos:4,val:be:-128,+cov.der | 1 - ...d:000975,src:000920,op:int32,pos:235,val:+0.der | Bin 357 -> 0 bytes ...id:000976,src:000924,op:int32,pos:23,val:+0.der | Bin 357 -> 0 bytes ...id:000977,src:000928,op:int32,pos:20,val:+0.der | Bin 357 -> 0 bytes .../id:000978,src:000928,op:havoc,rep:32.der | Bin 360 -> 0 bytes ...d:000980,src:000929,op:int32,pos:212,val:+0.der | Bin 357 -> 0 bytes ...d:000983,src:000934,op:int32,pos:216,val:+0.der | Bin 357 -> 0 bytes .../id:000985,src:000934,op:havoc,rep:2.der | Bin 357 -> 0 bytes ...000986,src:000935,op:int32,pos:205,val:+255.der | Bin 357 -> 0 bytes ...d:000988,src:000936,op:int32,pos:237,val:+0.der | Bin 357 -> 0 bytes .../id:000989,src:000939,op:flip2,pos:39.der | Bin 357 -> 0 bytes ...id:000990,src:000939,op:int16,pos:39,val:+0.der | Bin 357 -> 0 bytes ...00991,src:000944,op:int32,pos:41,val:-32768.der | Bin 500 -> 0 bytes ...000992,src:000944,op:int32,pos:371,val:-128.der | Bin 500 -> 0 bytes .../id:000995,src:000944,op:havoc,rep:4.der | Bin 499 -> 0 bytes .../id:000997,src:000944,op:havoc,rep:2.der | Bin 500 -> 0 bytes .../id:000998,src:000944,op:havoc,rep:2.der | Bin 497 -> 0 bytes ...id:001001,src:000950,op:int32,pos:97,val:+0.der | Bin 357 -> 0 bytes .../id:001003,src:000951,op:havoc,rep:2.der | Bin 357 -> 0 bytes .../id:001004,src:000957,op:havoc,rep:16.der | Bin 360 -> 0 bytes ...001005,src:000965,op:arith8,pos:426,val:+14.der | Bin 780 -> 0 bytes .../id:001007,src:000965,op:havoc,rep:64.der | Bin 778 -> 0 bytes ...:001015,src:000968,op:int32,pos:35,val:-128.der | Bin 1013 -> 0 bytes ...d:001017,src:000973,op:int32,pos:237,val:+0.der | Bin 357 -> 0 bytes ...9,src:000974,op:int32,pos:230,val:be:+32768.der | Bin 357 -> 0 bytes ...id:001021,src:000978,op:int32,pos:29,val:+0.der | Bin 360 -> 0 bytes .../id:001022,src:000978,op:havoc,rep:8.der | Bin 360 -> 0 bytes ...d:001026,src:000986,op:int32,pos:217,val:+0.der | Bin 357 -> 0 bytes .../id:001028,src:000992,op:havoc,rep:2.der | Bin 498 -> 0 bytes ...d:001033,src:001016,op:int32,pos:239,val:+0.der | Bin 357 -> 0 bytes ...d:001034,src:001017,op:int32,pos:240,val:+0.der | Bin 357 -> 0 bytes ...id:001037,src:000942,op:int32,pos:48,val:+0.der | Bin 359 -> 0 bytes ...d:001040,src:001035,op:int32,pos:234,val:+0.der | Bin 1012 -> 0 bytes ...d:001041,src:001035,op:int32,pos:235,val:+0.der | Bin 1012 -> 0 bytes .../id:001042,src:001036,op:flip2,pos:229.der | Bin 357 -> 0 bytes ...d:001044,src:001039,op:int32,pos:236,val:+0.der | Bin 1012 -> 0 bytes .../id:001047,src:000328,op:havoc,rep:2.der | 1 - .../id:001051,src:001050,op:havoc,rep:2.der | 1 - .../id:001052,src:001050,op:havoc,rep:2.der | 1 - .../id:001054,src:001050,op:havoc,rep:2.der | 1 - .../id:001056,src:001050,op:havoc,rep:2.der | 1 - .../id:001069,src:000337,op:flip1,pos:285.der | Bin 960 -> 0 bytes .../id:001071,src:000337,op:flip8,pos:245.der | Bin 960 -> 0 bytes .../id:001072,src:000337,op:havoc,rep:4.der | Bin 960 -> 0 bytes .../id:001076,src:001073,op:havoc,rep:64.der | Bin 1296 -> 0 bytes .../id:001078,src:001073,op:havoc,rep:128.der | Bin 1012 -> 0 bytes .../id:001079,src:001073,op:havoc,rep:128.der | Bin 1184 -> 0 bytes .../id:001081,src:001073,op:havoc,rep:4.der | 3 - .../id:001082,src:001073,op:havoc,rep:16.der | 3 - .../id:001083,src:001080,op:havoc,rep:16.der | Bin 3494 -> 0 bytes .../id:001084,src:001080,op:havoc,rep:16.der | 1 - .../id:001087,src:000435,op:havoc,rep:8.der | Bin 1296 -> 0 bytes .../id:001095,src:000435,op:havoc,rep:64,+cov.der | Bin 1012 -> 0 bytes .../id:001098,src:000992,op:havoc,rep:2.der | Bin 775 -> 0 bytes .../id:001099,src:001095,op:flip1,pos:573.der | Bin 1012 -> 0 bytes .../id:001104,src:001096,op:havoc,rep:4.der | Bin 1608 -> 0 bytes .../id:001105,src:001102,op:havoc,rep:8.der | Bin 1012 -> 0 bytes .../id:001106,src:000413,op:havoc,rep:4.der | Bin 1935 -> 0 bytes .../id:001108,src:000004,op:ext_AO,pos:258.der | Bin 357 -> 0 bytes .../id:001111,src:001108,op:flip1,pos:262.der | Bin 357 -> 0 bytes .../id:001112,src:001108,op:ext_AO,pos:280.der | Bin 357 -> 0 bytes .../id:001114,src:000425,op:flip1,pos:749.der | Bin 1012 -> 0 bytes .../id:001116,src:000584,op:havoc,rep:2.der | Bin 1012 -> 0 bytes .../id:001118,src:000592,op:havoc,rep:64.der | Bin 1012 -> 0 bytes ...src:000669,op:int16,pos:6,val:be:+1000,+cov.der | Bin 8 -> 0 bytes .../id:001123,src:000589,op:flip2,pos:551.der | Bin 1012 -> 0 bytes ...:001124,src:000589,op:arith8,pos:551,val:+9.der | Bin 1012 -> 0 bytes ...001125,src:000589,op:int32,pos:550,val:-128.der | Bin 1012 -> 0 bytes ...:001129,src:001126,op:arith8,pos:503,val:+1.der | Bin 1012 -> 0 bytes .../id:001130,src:001126,op:havoc,rep:4.der | Bin 1013 -> 0 bytes .../id:001136,src:000605,op:havoc,rep:4.der | Bin 272 -> 0 bytes .../id:001137,src:000827,op:flip1,pos:210.der | Bin 357 -> 0 bytes ...001138,src:000827,op:arith8,pos:210,val:-12.der | Bin 357 -> 0 bytes .../id:001145,src:000728,op:havoc,rep:32.der | Bin 1002 -> 0 bytes .../id:001148,src:001142,op:havoc,rep:8.der | Bin 1013 -> 0 bytes .../id:001156,src:001152,op:flip1,pos:39.der | Bin 1012 -> 0 bytes .../id:001163,src:001152,op:flip1,pos:46.der | Bin 1012 -> 0 bytes .../id:001164,src:001152,op:flip1,pos:47.der | Bin 1012 -> 0 bytes .../id:001169,src:001152,op:flip1,pos:64.der | Bin 1012 -> 0 bytes .../id:001170,src:001152,op:flip1,pos:95.der | Bin 1012 -> 0 bytes .../id:001172,src:001152,op:havoc,rep:4.der | Bin 1012 -> 0 bytes .../id:001173,src:001152,op:havoc,rep:16.der | Bin 1012 -> 0 bytes .../id:001175,src:001159,op:havoc,rep:4.der | Bin 1012 -> 0 bytes .../id:001176,src:001165,op:havoc,rep:32.der | Bin 1012 -> 0 bytes ...:001177,src:000591,op:arith8,pos:575,val:+3.der | Bin 1012 -> 0 bytes ...src:000656,op:int32,pos:353,val:-32768,+cov.der | Bin 360 -> 0 bytes .../id:001179,src:001178,op:flip1,pos:355,+cov.der | Bin 360 -> 0 bytes .../id:001180,src:001178,op:flip1,pos:355,+cov.der | Bin 360 -> 0 bytes .../id:001185,src:000857,op:havoc,rep:16.der | Bin 500 -> 0 bytes .../id:001188,src:000966,op:havoc,rep:32.der | Bin 780 -> 0 bytes .../id:001189,src:000990,op:havoc,rep:2.der | Bin 357 -> 0 bytes ...:001190,src:001177,op:arith8,pos:639,val:+3.der | Bin 1012 -> 0 bytes .../id:001191,src:001189,op:flip1,pos:27.der | Bin 357 -> 0 bytes ...:001192,src:001189,op:int32,pos:25,val:+255.der | Bin 357 -> 0 bytes .../id:001193,src:001189,op:ext_AO,pos:5.der | Bin 357 -> 0 bytes .../id:001194,src:001189,op:havoc,rep:16.der | Bin 360 -> 0 bytes .../id:001195,src:001189,op:havoc,rep:32.der | Bin 360 -> 0 bytes .../id:001196,src:001189,op:havoc,rep:2.der | Bin 360 -> 0 bytes .../id:001197,src:001189,op:havoc,rep:8.der | Bin 380 -> 0 bytes .../id:001198,src:001189,op:havoc,rep:4.der | Bin 132 -> 0 bytes .../id:001200,src:001193,op:flip2,pos:154.der | Bin 357 -> 0 bytes .../id:001201,src:001195,op:int8,pos:47,val:+0.der | Bin 360 -> 0 bytes .../id:001202,src:001196,op:flip1,pos:31.der | Bin 360 -> 0 bytes ...:001204,src:000710,op:arith8,pos:639,val:+3.der | Bin 1012 -> 0 bytes .../id:001206,src:000829,op:havoc,rep:16.der | Bin 716 -> 0 bytes ...d:001207,src:000886,op:int32,pos:110,val:+0.der | Bin 1012 -> 0 bytes .../id:001208,src:000934,op:havoc,rep:2.der | Bin 360 -> 0 bytes ...01209,src:000958,op:int16,pos:230,val:+1024.der | Bin 360 -> 0 bytes .../id:001210,src:001025,op:flip1,pos:204.der | Bin 357 -> 0 bytes .../id:001215,src:001093,op:havoc,rep:16.der | Bin 5240 -> 0 bytes .../id:001217,src:001119,op:flip1,pos:27.der | Bin 364 -> 0 bytes .../id:001219,src:001136,op:flip1,pos:40.der | Bin 272 -> 0 bytes .../id:001244,src:001239,op:flip1,pos:344.der | Bin 360 -> 0 bytes .../id:001245,src:001239,op:flip1,pos:347.der | Bin 360 -> 0 bytes .../id:001247,src:001239,op:flip1,pos:356.der | Bin 360 -> 0 bytes .../id:001248,src:001239,op:flip1,pos:356.der | Bin 360 -> 0 bytes .../id:001250,src:001239,op:flip2,pos:356.der | Bin 360 -> 0 bytes .../id:001251,src:001239,op:flip4,pos:347.der | Bin 360 -> 0 bytes ...001252,src:001239,op:arith8,pos:310,val:+10.der | Bin 360 -> 0 bytes ...001254,src:001239,op:int32,pos:353,val:+255.der | Bin 360 -> 0 bytes ...55,src:001239,op:int32,pos:353,val:be:+1000.der | Bin 360 -> 0 bytes .../id:001257,src:001239,op:ext_AO,pos:355.der | Bin 360 -> 0 bytes .../id:001258,src:001239,op:ext_AO,pos:356.der | Bin 360 -> 0 bytes .../id:001259,src:001252,op:flip1,pos:356.der | Bin 360 -> 0 bytes .../id:001260,src:001252,op:flip1,pos:356.der | Bin 360 -> 0 bytes .../id:001261,src:001252,op:flip2,pos:356.der | Bin 360 -> 0 bytes ...001262,src:001252,op:int16,pos:355,val:+255.der | Bin 360 -> 0 bytes ...64,src:001252,op:int32,pos:353,val:be:+1000.der | Bin 360 -> 0 bytes ...001265,src:001252,op:int32,pos:354,val:+255.der | Bin 360 -> 0 bytes .../id:001266,src:001252,op:ext_AO,pos:355.der | Bin 360 -> 0 bytes .../id:001267,src:001252,op:ext_AO,pos:356.der | Bin 360 -> 0 bytes .../id:001270,src:001252,op:havoc,rep:8.der | Bin 457 -> 0 bytes .../id:001272,src:001254,op:flip1,pos:207.der | Bin 360 -> 0 bytes .../id:001273,src:001254,op:flip1,pos:278.der | Bin 360 -> 0 bytes .../id:001274,src:001254,op:flip1,pos:279.der | Bin 360 -> 0 bytes .../id:001275,src:001254,op:flip1,pos:328.der | Bin 360 -> 0 bytes .../id:001276,src:001254,op:flip1,pos:344.der | Bin 360 -> 0 bytes .../id:001277,src:001254,op:flip1,pos:347.der | Bin 360 -> 0 bytes .../id:001278,src:001254,op:flip1,pos:353.der | Bin 360 -> 0 bytes .../id:001279,src:001254,op:flip1,pos:353.der | Bin 360 -> 0 bytes .../id:001280,src:001254,op:flip2,pos:353.der | Bin 360 -> 0 bytes ...:001282,src:001254,op:arith8,pos:310,val:+7.der | Bin 360 -> 0 bytes ...001286,src:001254,op:int32,pos:351,val:+255.der | Bin 360 -> 0 bytes .../id:001287,src:001254,op:havoc,rep:8.der | Bin 360 -> 0 bytes .../id:001288,src:001254,op:havoc,rep:4.der | Bin 443 -> 0 bytes .../id:001289,src:001254,op:havoc,rep:4.der | Bin 360 -> 0 bytes .../id:001291,src:001255,op:flip1,pos:278.der | Bin 360 -> 0 bytes ...001293,src:001255,op:int16,pos:356,val:-128.der | Bin 360 -> 0 bytes .../id:001294,src:001271,op:flip1,pos:353.der | Bin 360 -> 0 bytes .../id:001298,src:001297,op:flip1,pos:207.der | Bin 360 -> 0 bytes .../id:001300,src:001297,op:flip1,pos:278.der | Bin 360 -> 0 bytes .../id:001302,src:001297,op:flip1,pos:347.der | Bin 360 -> 0 bytes .../id:001303,src:001297,op:flip4,pos:344.der | Bin 360 -> 0 bytes ...001304,src:001297,op:int16,pos:354,val:+128.der | Bin 360 -> 0 bytes ...05,src:001297,op:int32,pos:349,val:be:+1024.der | Bin 360 -> 0 bytes ...306,src:001297,op:int32,pos:351,val:be:+512.der | Bin 360 -> 0 bytes ...001308,src:001299,op:int16,pos:354,val:+128.der | Bin 360 -> 0 bytes .../id:001310,src:001042,op:havoc,rep:8,+cov.der | Bin 405 -> 0 bytes .../id:001311,src:001227,op:flip1,pos:359.der | Bin 360 -> 0 bytes .../id:001312,src:001227,op:flip4,pos:358.der | Bin 360 -> 0 bytes .../id:001314,src:001310,op:flip1,pos:48,+cov.der | Bin 405 -> 0 bytes .../id:001315,src:001310,op:flip1,pos:403,+cov.der | Bin 405 -> 0 bytes .../id:001316,src:001310,op:flip2,pos:48,+cov.der | Bin 405 -> 0 bytes ...:001310,op:int32,pos:401,val:be:-32768,+cov.der | Bin 405 -> 0 bytes .../id:001319,src:001314,op:flip1,pos:402,+cov.der | Bin 405 -> 0 bytes .../id:001320,src:001314,op:flip1,pos:402,+cov.der | Bin 405 -> 0 bytes .../id:001321,src:001318,op:flip2,pos:752.der | Bin 1012 -> 0 bytes .../id:001322,src:000713,op:havoc,rep:4.der | Bin 1012 -> 0 bytes .../id:001323,src:000998,op:havoc,rep:16.der | Bin 532 -> 0 bytes .../id:001325,src:000998,op:havoc,rep:4.der | Bin 543 -> 0 bytes .../id:001329,src:000998,op:havoc,rep:8.der | Bin 567 -> 0 bytes .../id:001330,src:001026,op:flip1,pos:204.der | Bin 357 -> 0 bytes .../id:001331,src:001029,op:havoc,rep:16.der | Bin 284 -> 0 bytes ...d:001334,src:001044,op:int16,pos:241,val:+0.der | Bin 1012 -> 0 bytes ...d:001335,src:001074,op:int16,pos:227,val:+0.der | Bin 1012 -> 0 bytes .../id:001340,src:001120,op:havoc,rep:2,+cov.der | Bin 13 -> 0 bytes .../id:001341,src:001120,op:havoc,rep:2,+cov.der | Bin 12 -> 0 bytes .../id:001342,src:001120,op:havoc,rep:4,+cov.der | Bin 11 -> 0 bytes .../id:001343,src:001120,op:havoc,rep:2,+cov.der | Bin 11 -> 0 bytes .../id:001344,src:001120,op:havoc,rep:2,+cov.der | Bin 9 -> 0 bytes .../id:001350,src:000891,op:havoc,rep:2.der | Bin 1015 -> 0 bytes .../id:001351,src:001002,op:havoc,rep:8.der | Bin 360 -> 0 bytes .../id:001352,src:001250,op:flip1,pos:207.der | Bin 360 -> 0 bytes .../id:001353,src:001250,op:flip1,pos:278.der | Bin 360 -> 0 bytes .../id:001354,src:001250,op:flip1,pos:347.der | Bin 360 -> 0 bytes .../id:001355,src:001351,op:flip1,pos:88.der | Bin 360 -> 0 bytes .../id:001356,src:001133,op:flip4,pos:552.der | Bin 1013 -> 0 bytes .../id:001357,src:001185,op:havoc,rep:8.der | Bin 968 -> 0 bytes .../id:001358,src:001187,op:havoc,rep:8.der | Bin 780 -> 0 bytes .../id:001359,src:001206,op:havoc,rep:8.der | Bin 988 -> 0 bytes .../id:001360,src:001206,op:havoc,rep:8.der | Bin 1232 -> 0 bytes .../id:001361,src:001208,op:flip2,pos:200.der | Bin 360 -> 0 bytes ...001362,src:001208,op:int32,pos:205,val:+255.der | Bin 360 -> 0 bytes ...d:001365,src:001221,op:int16,pos:114,val:+0.der | Bin 1012 -> 0 bytes ...d:001366,src:001221,op:int32,pos:113,val:+0.der | Bin 1012 -> 0 bytes ...d:001367,src:001221,op:int32,pos:114,val:+0.der | Bin 1012 -> 0 bytes .../id:001370,src:001232,op:flip4,pos:358.der | Bin 360 -> 0 bytes .../id:001371,src:001232,op:havoc,rep:4,+cov.der | Bin 360 -> 0 bytes .../id:001372,src:001232,op:havoc,rep:4.der | Bin 371 -> 0 bytes .../id:001375,src:001122,op:flip2,pos:502.der | Bin 1012 -> 0 bytes .../id:001379,src:001144,op:havoc,rep:16.der | Bin 1014 -> 0 bytes .../id:001380,src:001144,op:havoc,rep:32.der | Bin 1015 -> 0 bytes .../id:001381,src:001144,op:havoc,rep:32.der | Bin 1013 -> 0 bytes .../id:001382,src:001231,op:flip4,pos:358.der | Bin 360 -> 0 bytes .../id:001383,src:001235,op:flip4,pos:358.der | Bin 360 -> 0 bytes .../id:001385,src:001240,op:flip1,pos:356.der | Bin 360 -> 0 bytes .../id:001386,src:001240,op:ext_AO,pos:356.der | Bin 360 -> 0 bytes ...389,src:001242,op:int16,pos:272,val:be:+512.der | Bin 360 -> 0 bytes ...001390,src:001242,op:int16,pos:355,val:+255.der | Bin 360 -> 0 bytes ...001391,src:001242,op:int32,pos:354,val:+255.der | Bin 360 -> 0 bytes .../id:001392,src:001242,op:ext_AO,pos:356.der | Bin 360 -> 0 bytes .../id:001393,src:001245,op:flip1,pos:356.der | Bin 360 -> 0 bytes .../id:001394,src:001245,op:flip1,pos:356.der | Bin 360 -> 0 bytes .../id:001395,src:001245,op:ext_AO,pos:356.der | Bin 360 -> 0 bytes .../id:001396,src:001257,op:flip4,pos:344.der | Bin 360 -> 0 bytes ...001397,src:001257,op:int16,pos:357,val:-128.der | Bin 360 -> 0 bytes ...001398,src:001266,op:int16,pos:357,val:-128.der | Bin 360 -> 0 bytes .../id:001400,src:001267,op:flip1,pos:279.der | Bin 360 -> 0 bytes ...001401,src:001267,op:int16,pos:358,val:-128.der | Bin 360 -> 0 bytes .../id:001402,src:001279,op:flip1,pos:278.der | Bin 360 -> 0 bytes .../id:001403,src:001279,op:flip1,pos:328.der | Bin 360 -> 0 bytes .../id:001404,src:001303,op:havoc,rep:8.der | Bin 360 -> 0 bytes .../id:001405,src:001404,op:flip1,pos:198.der | Bin 360 -> 0 bytes .../id:001407,src:001406,op:flip1,pos:209.der | Bin 360 -> 0 bytes .../id:001408,src:001406,op:flip16,pos:209.der | Bin 360 -> 0 bytes ...id:001409,src:000748,op:int32,pos:38,val:+0.der | Bin 1012 -> 0 bytes ...id:001410,src:000748,op:int32,pos:48,val:+0.der | Bin 1012 -> 0 bytes .../id:001411,src:000979,op:havoc,rep:2.der | Bin 360 -> 0 bytes .../id:001413,src:001222,op:havoc,rep:64.der | Bin 1012 -> 0 bytes .../id:001414,src:001237,op:flip4,pos:358.der | Bin 360 -> 0 bytes ...001415,src:001258,op:int16,pos:358,val:-128.der | Bin 360 -> 0 bytes .../id:001416,src:001297,op:havoc,rep:8.der | Bin 358 -> 0 bytes .../id:001417,src:001314,op:havoc,rep:2,+cov.der | Bin 406 -> 0 bytes .../id:001418,src:001314,op:havoc,rep:2,+cov.der | Bin 407 -> 0 bytes .../id:001419,src:001411,op:flip1,pos:204.der | Bin 360 -> 0 bytes .../id:001420,src:001411,op:havoc,rep:2.der | Bin 360 -> 0 bytes .../id:001421,src:001147,op:havoc,rep:8.der | Bin 1012 -> 0 bytes .../id:001422,src:001147,op:havoc,rep:8.der | Bin 1012 -> 0 bytes ...:001424,src:001324,op:int16,pos:21,val:+256.der | Bin 549 -> 0 bytes .../id:001429,src:001324,op:havoc,rep:2.der | Bin 884 -> 0 bytes .../id:001432,src:001326,op:havoc,rep:4.der | Bin 1144 -> 0 bytes .../id:001433,src:001334,op:havoc,rep:16.der | Bin 1012 -> 0 bytes .../id:001434,src:001350,op:havoc,rep:8.der | Bin 1749 -> 0 bytes .../id:001435,src:001357,op:havoc,rep:8.der | Bin 1632 -> 0 bytes .../id:001436,src:001360,op:havoc,rep:8.der | Bin 2271 -> 0 bytes .../id:001437,src:001369,op:havoc,rep:4.der | Bin 360 -> 0 bytes .../id:001439,src:001379,op:havoc,rep:16.der | Bin 1012 -> 0 bytes ...001440,src:001386,op:int16,pos:358,val:-128.der | Bin 360 -> 0 bytes ...001441,src:001400,op:int16,pos:358,val:-128.der | Bin 360 -> 0 bytes .../id:001442,src:001401,op:flip1,pos:310.der | Bin 360 -> 0 bytes .../id:001443,src:001405,op:havoc,rep:4.der | Bin 359 -> 0 bytes .../id:001445,src:001429,op:havoc,rep:2.der | Bin 1179 -> 0 bytes .../id:001454,src:001444,op:havoc,rep:4.der | Bin 2405 -> 0 bytes ...:001461,src:001218,op:int8,pos:196,val:-128.der | Bin 364 -> 0 bytes .../id:001462,src:001461,op:flip1,pos:234.der | Bin 364 -> 0 bytes ...1463,src:001335,op:int32,pos:144,val:+32768.der | Bin 1012 -> 0 bytes .../id:001464,src:001349,op:havoc,rep:2.der | Bin 1394 -> 0 bytes .../id:001465,src:001349,op:havoc,rep:64.der | Bin 1032 -> 0 bytes .../id:001466,src:001406,op:havoc,rep:4.der | Bin 396 -> 0 bytes .../id:001467,src:001414,op:flip2,pos:347.der | Bin 360 -> 0 bytes .../id:001469,src:000679,op:havoc,rep:2,+cov.der | Bin 8 -> 0 bytes ...76,src:001209,op:int8,pos:232,val:+127,+cov.der | Bin 360 -> 0 bytes ...1478,src:001215,op:int32,pos:502,val:-32768.der | Bin 4960 -> 0 bytes .../id:001479,src:001348,op:havoc,rep:16.der | Bin 1012 -> 0 bytes .../id:001480,src:001404,op:havoc,rep:8.der | Bin 360 -> 0 bytes .../id:001481,src:001346,op:havoc,rep:4,+cov.der | Bin 11 -> 0 bytes .../id:001482,src:001468,op:havoc,rep:32.der | Bin 40 -> 0 bytes .../id:001483,src:001481,op:flip1,pos:7,+cov.der | Bin 11 -> 0 bytes .../id:001484,src:001481,op:flip1,pos:7,+cov.der | Bin 11 -> 0 bytes .../id:001485,src:001481,op:flip2,pos:7,+cov.der | Bin 11 -> 0 bytes .../id:001486,src:001481,op:havoc,rep:4,+cov.der | Bin 9 -> 0 bytes .../id:001487,src:001481,op:havoc,rep:2,+cov.der | Bin 13 -> 0 bytes .../id:001488,src:001481,op:havoc,rep:2,+cov.der | Bin 8 -> 0 bytes .../id:001489,src:001481,op:havoc,rep:2,+cov.der | Bin 10 -> 0 bytes .../id:001491,src:001211,op:flip1,pos:24.der | Bin 960 -> 0 bytes .../id:001492,src:001211,op:flip1,pos:230.der | Bin 960 -> 0 bytes .../id:001498,src:001439,op:havoc,rep:4.der | Bin 1014 -> 0 bytes .../id:001499,src:001450,op:havoc,rep:8.der | 1 - .../id:001500,src:001452,op:havoc,rep:32.der | Bin 4495 -> 0 bytes .../id:001501,src:001469,op:havoc,rep:2,+cov.der | Bin 10 -> 0 bytes .../id:001502,src:001501,op:havoc,rep:2,+cov.der | Bin 12 -> 0 bytes .../id:001503,src:001502,op:flip1,pos:9,+cov.der | Bin 12 -> 0 bytes .../id:001504,src:001502,op:flip2,pos:9,+cov.der | Bin 12 -> 0 bytes .../id:001505,src:001502,op:havoc,rep:2,+cov.der | Bin 11 -> 0 bytes .../id:001506,src:001502,op:havoc,rep:2,+cov.der | Bin 14 -> 0 bytes .../id:001507,src:001502,op:havoc,rep:4,+cov.der | Bin 14 -> 0 bytes .../id:001508,src:001502,op:havoc,rep:2,+cov.der | Bin 14 -> 0 bytes .../id:001509,src:001502,op:havoc,rep:2,+cov.der | Bin 15 -> 0 bytes .../id:001510,src:001506,op:flip1,pos:9,+cov.der | Bin 14 -> 0 bytes .../id:001511,src:001506,op:flip2,pos:9,+cov.der | Bin 14 -> 0 bytes .../id:001514,src:001476,op:havoc,rep:4.der | Bin 392 -> 0 bytes .../id:001517,src:001461,op:havoc,rep:4.der | Bin 372 -> 0 bytes .../id:001518,src:001463,op:havoc,rep:4.der | Bin 1012 -> 0 bytes .../id:001519,src:001490,op:flip1,pos:280.der | Bin 360 -> 0 bytes ...:001520,src:001498,op:int16,pos:29,val:+512.der | Bin 1014 -> 0 bytes .../id:001523,src:001375,op:flip1,pos:513.der | Bin 1012 -> 0 bytes .../id:001524,src:001375,op:flip1,pos:514.der | Bin 1012 -> 0 bytes .../id:001525,src:001375,op:flip1,pos:515.der | Bin 1012 -> 0 bytes .../id:001526,src:001512,op:flip16,pos:28.der | Bin 32 -> 0 bytes .../id:001527,src:001512,op:havoc,rep:4.der | Bin 33 -> 0 bytes .../id:001528,src:001512,op:havoc,rep:4.der | Bin 35 -> 0 bytes .../id:001529,src:001512,op:havoc,rep:2.der | Bin 34 -> 0 bytes .../id:001531,src:001460,op:flip2,pos:236.der | Bin 364 -> 0 bytes .../id:001532,src:001477,op:flip2,pos:205.der | Bin 424 -> 0 bytes .../id:001533,src:001477,op:flip4,pos:205.der | Bin 424 -> 0 bytes ...,src:001477,op:int16,pos:419,val:+1024,+cov.der | Bin 424 -> 0 bytes .../id:001535,src:001477,op:havoc,rep:2,+cov.der | Bin 415 -> 0 bytes .../id:001536,src:001477,op:havoc,rep:4,+cov.der | Bin 504 -> 0 bytes .../id:001538,src:001534,op:flip1,pos:207,+cov.der | Bin 424 -> 0 bytes .../id:001539,src:001534,op:flip1,pos:421,+cov.der | Bin 424 -> 0 bytes .../id:001540,src:001534,op:flip1,pos:421,+cov.der | Bin 424 -> 0 bytes .../id:001541,src:001534,op:havoc,rep:4,+cov.der | Bin 424 -> 0 bytes ...2,src:001535,op:int16,pos:409,val:+255,+cov.der | Bin 415 -> 0 bytes .../id:001543,src:001537,op:flip1,pos:602.der | Bin 608 -> 0 bytes .../id:001546,src:001539,op:havoc,rep:2,+cov.der | Bin 424 -> 0 bytes .../id:001547,src:001433,op:havoc,rep:16.der | Bin 1039 -> 0 bytes .../id:001548,src:001479,op:havoc,rep:32.der | Bin 1012 -> 0 bytes .../id:001549,src:001492,op:flip1,pos:424.der | Bin 960 -> 0 bytes .../id:001551,src:001499,op:havoc,rep:4.der | Bin 618 -> 0 bytes .../id:001552,src:001447,op:havoc,rep:2.der | Bin 3143 -> 0 bytes .../id:001553,src:001457,op:havoc,rep:4.der | Bin 3655 -> 0 bytes .../id:001554,src:001459,op:havoc,rep:8.der | Bin 4042 -> 0 bytes .../id:001555,src:001459,op:havoc,rep:2.der | Bin 4548 -> 0 bytes .../id:001556,src:001507,op:havoc,rep:2,+cov.der | Bin 14 -> 0 bytes ...id:001557,src:000685+000981,op:splice,rep:2.der | Bin 368 -> 0 bytes .../id:001558,src:001421,op:havoc,rep:4.der | Bin 1243 -> 0 bytes .../id:001559,src:001421,op:havoc,rep:4.der | Bin 1573 -> 0 bytes .../id:001560,src:001421,op:havoc,rep:32.der | Bin 1015 -> 0 bytes .../id:001562,src:001421,op:havoc,rep:8.der | Bin 1030 -> 0 bytes ...id:001567,src:000806+001307,op:splice,rep:4.der | Bin 360 -> 0 bytes ...id:001568,src:001510+001564,op:splice,rep:4.der | Bin 112 -> 0 bytes .../id:001571,src:000037,op:havoc,rep:8.der | Bin 16 -> 0 bytes .../id:001572,src:001530,op:flip1,pos:153.der | Bin 1012 -> 0 bytes .../id:001573,src:001530,op:flip2,pos:158.der | Bin 1012 -> 0 bytes ...id:001574,src:001540+001215,op:splice,rep:4.der | Bin 1796 -> 0 bytes .../id:001575,src:001543,op:havoc,rep:8.der | Bin 1187 -> 0 bytes .../id:001577,src:001565,op:flip1,pos:21.der | Bin 1015 -> 0 bytes ...id:001578,src:001565+000591,op:splice,rep:4.der | Bin 1012 -> 0 bytes .../id:001579,src:001577,op:havoc,rep:4.der | Bin 1146 -> 0 bytes .../id:001580,src:001577,op:havoc,rep:64.der | Bin 3301 -> 0 bytes ...d:001581,src:001473+001546,op:splice,rep:16.der | Bin 960 -> 0 bytes ...d:001583,src:001473+001546,op:splice,rep:16.der | Bin 2296 -> 0 bytes .../id:001584,src:001548,op:havoc,rep:8.der | Bin 1012 -> 0 bytes ...id:001586,src:001576,op:int8,pos:498,val:+0.der | Bin 960 -> 0 bytes ...id:001587,src:001576+001104,op:splice,rep:4.der | Bin 1294 -> 0 bytes ...d:001588,src:001576+001104,op:splice,rep:16.der | Bin 2717 -> 0 bytes ...id:001589,src:000691+001423,op:splice,rep:4.der | Bin 1012 -> 0 bytes tests/libtasn1.supp | 1 - tests/mscat.asn | 34 - tests/object-id-decoding.c | 89 - tests/ocsp-basic-response.c | 129 - tests/ocsp-basic-response.der | Bin 441 -> 0 bytes tests/ocsp.der | Bin 163 -> 0 bytes tests/octet-string.c | 187 -- tests/pkix.asn | 1311 --------- tests/spc_pe_image_data.c | 148 - tests/spc_pe_image_data.der | Bin 40 -> 0 bytes tests/strict-der.c | 136 - tests/threadsafety | 175 -- windows/asn1-parser/asn1-parser.vcproj | 174 -- windows/asn1-parser/config.h | 1 - windows/gnulib/getopt.h | 2 - windows/gnulib/gnulib.vcproj | 180 -- windows/libtasn1.ncb | Bin 904192 -> 0 bytes windows/libtasn1.sln | 54 - windows/libtasn1.suo | Bin 19968 -> 0 bytes windows/libtasn1/libtasn1.vcproj | 222 -- windows/libtasn14win.mk | 51 - windows/test-parser/test-parser.vcproj | 169 -- windows/test-tree/test-tree.vcproj | 172 -- 876 files changed, 7 insertions(+), 59161 deletions(-) delete mode 100644 .clcopying delete mode 100644 .gitignore delete mode 100644 .gitlab-ci.yml delete mode 100644 .prev-version delete mode 100644 AUTHORS delete mode 100644 COPYING delete mode 100644 COPYING.LIB delete mode 100644 GNUmakefile delete mode 100644 Makefile.am delete mode 100644 NEWS delete mode 100644 README delete mode 100644 README-alpha create mode 100644 README.md delete mode 100644 THANKS delete mode 100755 build-aux/gendocs.sh delete mode 100755 build-aux/gnupload delete mode 100644 build-aux/pmccabe.css delete mode 100644 build-aux/pmccabe2html delete mode 100644 build-aux/snippet/_Noreturn.h delete mode 100644 build-aux/snippet/arg-nonnull.h delete mode 100644 build-aux/snippet/c++defs.h delete mode 100644 build-aux/snippet/warn-on-use.h delete mode 100755 build-aux/update-copyright delete mode 100755 build-aux/useless-if-before-free delete mode 100755 build-aux/vc-list-files delete mode 100644 cfg.mk delete mode 100644 configure.ac delete mode 100644 devel/ABI-x86_64.dump delete mode 100644 doc/Makefile.am delete mode 100644 doc/TODO delete mode 100644 doc/announce.txt delete mode 100644 doc/cyclo/Makefile.am delete mode 100644 doc/fdl-1.3.texi delete mode 100755 doc/gdoc delete mode 100644 doc/gendocs_template delete mode 100644 doc/libtasn1.texi delete mode 100644 doc/reference/Makefile.am delete mode 100644 doc/reference/libtasn1-docs.sgml delete mode 100644 doc/reference/version.xml.in delete mode 100644 doc/release-process.txt delete mode 100644 doc/texinfo.css delete mode 100644 examples/CertificateExample.c delete mode 100644 examples/CrlExample.c delete mode 100644 examples/Makefile.am delete mode 100644 examples/asn1Coding_test.asg delete mode 100644 examples/asn1Coding_test.asn delete mode 100644 examples/pkix.asn delete mode 100644 gl/Makefile.am delete mode 100644 gl/errno.in.h delete mode 100644 gl/fstat.c delete mode 100644 gl/ftell.c delete mode 100644 gl/ftello.c delete mode 100644 gl/getopt.c delete mode 100644 gl/getopt.in.h delete mode 100644 gl/getopt1.c delete mode 100644 gl/getopt_int.h delete mode 100644 gl/gettext.h delete mode 100644 gl/gettime.c delete mode 100644 gl/gettimeofday.c delete mode 100644 gl/limits.in.h delete mode 100644 gl/lseek.c delete mode 100644 gl/m4/00gnulib.m4 delete mode 100644 gl/m4/absolute-header.m4 delete mode 100644 gl/m4/autobuild.m4 delete mode 100644 gl/m4/clock_time.m4 delete mode 100644 gl/m4/errno_h.m4 delete mode 100644 gl/m4/extensions.m4 delete mode 100644 gl/m4/extern-inline.m4 delete mode 100644 gl/m4/fseeko.m4 delete mode 100644 gl/m4/fstat.m4 delete mode 100644 gl/m4/ftell.m4 delete mode 100644 gl/m4/ftello.m4 delete mode 100644 gl/m4/getopt.m4 delete mode 100644 gl/m4/gettime.m4 delete mode 100644 gl/m4/gettimeofday.m4 delete mode 100644 gl/m4/gnulib-cache.m4 delete mode 100644 gl/m4/gnulib-common.m4 delete mode 100644 gl/m4/gnulib-comp.m4 delete mode 100644 gl/m4/gnulib-tool.m4 delete mode 100644 gl/m4/include_next.m4 delete mode 100644 gl/m4/largefile.m4 delete mode 100644 gl/m4/limits-h.m4 delete mode 100644 gl/m4/longlong.m4 delete mode 100644 gl/m4/lseek.m4 delete mode 100644 gl/m4/malloc.m4 delete mode 100644 gl/m4/manywarnings.m4 delete mode 100644 gl/m4/msvc-inval.m4 delete mode 100644 gl/m4/msvc-nothrow.m4 delete mode 100644 gl/m4/multiarch.m4 delete mode 100644 gl/m4/nocrash.m4 delete mode 100644 gl/m4/off_t.m4 delete mode 100644 gl/m4/read-file.m4 delete mode 100644 gl/m4/realloc.m4 delete mode 100644 gl/m4/ssize_t.m4 delete mode 100644 gl/m4/stdarg.m4 delete mode 100644 gl/m4/stddef_h.m4 delete mode 100644 gl/m4/stdint.m4 delete mode 100644 gl/m4/stdio_h.m4 delete mode 100644 gl/m4/stdlib_h.m4 delete mode 100644 gl/m4/sys_socket_h.m4 delete mode 100644 gl/m4/sys_stat_h.m4 delete mode 100644 gl/m4/sys_time_h.m4 delete mode 100644 gl/m4/sys_types_h.m4 delete mode 100644 gl/m4/time_h.m4 delete mode 100644 gl/m4/timespec.m4 delete mode 100644 gl/m4/unistd_h.m4 delete mode 100644 gl/m4/valgrind-tests.m4 delete mode 100644 gl/m4/version-etc.m4 delete mode 100644 gl/m4/warn-on-use.m4 delete mode 100644 gl/m4/warnings.m4 delete mode 100644 gl/m4/wchar_t.m4 delete mode 100644 gl/m4/wint_t.m4 delete mode 100644 gl/malloc.c delete mode 100644 gl/msvc-inval.c delete mode 100644 gl/msvc-inval.h delete mode 100644 gl/msvc-nothrow.c delete mode 100644 gl/msvc-nothrow.h delete mode 100644 gl/override/doc/gendocs_template.diff delete mode 100644 gl/override/m4/valgrind-tests.m4.diff delete mode 100644 gl/progname.c delete mode 100644 gl/progname.h delete mode 100644 gl/read-file.c delete mode 100644 gl/read-file.h delete mode 100644 gl/realloc.c delete mode 100644 gl/stdarg.in.h delete mode 100644 gl/stddef.in.h delete mode 100644 gl/stdint.in.h delete mode 100644 gl/stdio-impl.h delete mode 100644 gl/stdio.in.h delete mode 100644 gl/stdlib.in.h delete mode 100644 gl/sys_stat.in.h delete mode 100644 gl/sys_time.in.h delete mode 100644 gl/sys_types.in.h delete mode 100644 gl/time.in.h delete mode 100644 gl/timespec.c delete mode 100644 gl/timespec.h delete mode 100644 gl/unistd.c delete mode 100644 gl/unistd.in.h delete mode 100644 gl/version-etc-fsf.c delete mode 100644 gl/version-etc.c delete mode 100644 gl/version-etc.h delete mode 100644 gtk-doc.make delete mode 100644 lib/ASN1.c delete mode 100644 lib/ASN1.y delete mode 100644 lib/Makefile.am delete mode 100644 lib/coding.c delete mode 100644 lib/decoding.c delete mode 100644 lib/element.c delete mode 100644 lib/element.h delete mode 100644 lib/errors.c delete mode 100644 lib/gllib/Makefile.am delete mode 100644 lib/gllib/hash-pjw-bare.c delete mode 100644 lib/gllib/hash-pjw-bare.h delete mode 100644 lib/gllib/intprops.h delete mode 100644 lib/gllib/limits.in.h delete mode 100644 lib/gllib/minmax.h delete mode 100644 lib/gllib/stddef.in.h delete mode 100644 lib/gllib/stdint.in.h delete mode 100644 lib/gllib/string.in.h delete mode 100644 lib/gllib/strverscmp.c delete mode 100644 lib/gllib/sys_types.in.h delete mode 100644 lib/gllib/verify.h delete mode 100644 lib/glm4/00gnulib.m4 delete mode 100644 lib/glm4/absolute-header.m4 delete mode 100644 lib/glm4/extensions.m4 delete mode 100644 lib/glm4/extern-inline.m4 delete mode 100644 lib/glm4/gnulib-cache.m4 delete mode 100644 lib/glm4/gnulib-common.m4 delete mode 100644 lib/glm4/gnulib-comp.m4 delete mode 100644 lib/glm4/gnulib-tool.m4 delete mode 100644 lib/glm4/include_next.m4 delete mode 100644 lib/glm4/ld-version-script.m4 delete mode 100644 lib/glm4/limits-h.m4 delete mode 100644 lib/glm4/longlong.m4 delete mode 100644 lib/glm4/minmax.m4 delete mode 100644 lib/glm4/multiarch.m4 delete mode 100644 lib/glm4/off_t.m4 delete mode 100644 lib/glm4/ssize_t.m4 delete mode 100644 lib/glm4/stddef_h.m4 delete mode 100644 lib/glm4/stdint.m4 delete mode 100644 lib/glm4/string_h.m4 delete mode 100644 lib/glm4/strverscmp.m4 delete mode 100644 lib/glm4/sys_types_h.m4 delete mode 100644 lib/glm4/visibility.m4 delete mode 100644 lib/glm4/warn-on-use.m4 delete mode 100644 lib/glm4/wchar_t.m4 delete mode 100644 lib/glm4/wint_t.m4 delete mode 100644 lib/gstr.c delete mode 100644 lib/gstr.h delete mode 100644 lib/int.h delete mode 100644 lib/libtasn1.h delete mode 100644 lib/libtasn1.map delete mode 100644 lib/libtasn1.pc.in delete mode 100644 lib/parser_aux.c delete mode 100644 lib/parser_aux.h delete mode 100644 lib/structure.c delete mode 100644 lib/structure.h delete mode 100644 lib/version.c delete mode 100644 m4/gtk-doc.m4 delete mode 100644 m4/pkg.m4 delete mode 100644 m4/update-header-version.m4 delete mode 100644 maint.mk delete mode 100644 msvc/build_debug.bat delete mode 100644 msvc/build_release.bat delete mode 100644 msvc/libtasn1.mak delete mode 100644 msvc/msvc_exe.mk delete mode 100644 msvc/msvc_lib.mk delete mode 100644 msvc/snprintf.h delete mode 100644 msvc/test_parser.mak delete mode 100644 msvc/vcvars.mk delete mode 100644 src/Makefile.am delete mode 100644 src/asn1Coding.c delete mode 100644 src/asn1Decoding.c delete mode 100644 src/asn1Parser.c delete mode 100644 src/benchmark.c delete mode 100644 src/benchmark.h delete mode 100644 tests/Makefile.am delete mode 100644 tests/TestCertOctetOverflow.der delete mode 100644 tests/TestIndef.p12 delete mode 100644 tests/TestIndef2.p12 delete mode 100644 tests/TestIndef3.der delete mode 100644 tests/Test_choice.c delete mode 100644 tests/Test_choice_ocsp.c delete mode 100644 tests/Test_encdec.c delete mode 100644 tests/Test_encoding.asn delete mode 100644 tests/Test_encoding.c delete mode 100644 tests/Test_errors.c delete mode 100644 tests/Test_indefinite.c delete mode 100644 tests/Test_overflow.c delete mode 100644 tests/Test_parser.asn delete mode 100644 tests/Test_parser.c delete mode 100644 tests/Test_simple.c delete mode 100644 tests/Test_strings.c delete mode 100644 tests/Test_tree.asn delete mode 100644 tests/Test_tree.c delete mode 100644 tests/Test_tree_asn1_tab.c delete mode 100755 tests/benchmark delete mode 100644 tests/cert-invalid-time.der delete mode 100644 tests/choice.asn delete mode 100755 tests/coding delete mode 100644 tests/coding-decoding2.asn delete mode 100644 tests/coding-decoding2.c delete mode 100644 tests/coding-long-oid.c delete mode 100644 tests/copynode.c delete mode 100644 tests/crl.der delete mode 100755 tests/crlf delete mode 100644 tests/crlf.cer delete mode 100755 tests/decoding delete mode 100755 tests/decoding-invalid-pkcs7 delete mode 100755 tests/decoding-invalid-x509 delete mode 100644 tests/invalid-assignments1.txt delete mode 100644 tests/invalid-assignments2.txt delete mode 100644 tests/invalid-pkcs7/id-000001.der delete mode 100644 tests/invalid-pkcs7/id-000002.der delete mode 100644 tests/invalid-pkcs7/id-000003.der delete mode 100644 tests/invalid-x509/id-000000.der delete mode 100644 tests/invalid-x509/id-000001.der delete mode 100644 tests/invalid-x509/id-000002.der delete mode 100644 tests/invalid-x509/id-000003.der delete mode 100644 tests/invalid-x509/id-000004.der delete mode 100644 tests/invalid-x509/id-000005.der delete mode 100644 tests/invalid-x509/id-000006.der delete mode 100644 tests/invalid-x509/id-000007.der delete mode 100644 tests/invalid-x509/id-000008.der delete mode 100644 tests/invalid-x509/id-000009.der delete mode 100644 tests/invalid-x509/id-000010.der delete mode 100644 tests/invalid-x509/id-000011.der delete mode 100644 tests/invalid-x509/id-000012.der delete mode 100644 tests/invalid-x509/id-000013.der delete mode 100644 tests/invalid-x509/id-000014.der delete mode 100644 tests/invalid-x509/id-000015.der delete mode 100644 tests/invalid-x509/id-000016.der delete mode 100644 tests/invalid-x509/id-000017.der delete mode 100644 tests/invalid-x509/id-000018.der delete mode 100644 tests/invalid-x509/id-000019.der delete mode 100644 tests/invalid-x509/id-000020.der delete mode 100644 tests/invalid-x509/id-000021.der delete mode 100644 tests/invalid-x509/id-000022.der delete mode 100644 tests/invalid-x509/id-000023.der delete mode 100644 tests/invalid-x509/id-000024.der delete mode 100644 tests/invalid-x509/id-000025.der delete mode 100644 tests/invalid-x509/id-000026.der delete mode 100644 tests/invalid-x509/id-000027.der delete mode 100644 tests/invalid-x509/id-000028.der delete mode 100644 tests/invalid-x509/id-000029.der delete mode 100644 tests/invalid-x509/id-000030.der delete mode 100644 tests/invalid-x509/id-000031.der delete mode 100644 tests/invalid-x509/id-000032.der delete mode 100644 tests/invalid-x509/id-000033.der delete mode 100644 tests/invalid-x509/id-000034.der delete mode 100644 tests/invalid-x509/id-000035.der delete mode 100644 tests/invalid-x509/id:000002,orig:TFPA-2015-002-libtasn1-4.3-stack-overflow.crt.der delete mode 100644 tests/invalid-x509/id:000047,orig:id:000009,src:000044,op:havoc,rep:2.der delete mode 100644 tests/invalid-x509/id:000116,orig:id:000026,src:000000,op:havoc,rep:32,+cov.der delete mode 100644 tests/invalid-x509/id:000164,orig:id:000038,src:000000,op:havoc,rep:64,+cov.der delete mode 100644 tests/invalid-x509/id:000168,orig:id:000039,src:000000,op:havoc,rep:128.der delete mode 100644 tests/invalid-x509/id:000170,orig:id:000040,src:000061,op:havoc,rep:4.der delete mode 100644 tests/invalid-x509/id:000190,orig:id:000045,src:000019+000093,op:splice,rep:2.der delete mode 100644 tests/invalid-x509/id:000200,orig:id:000048,src:000035+000050,op:splice,rep:2.der delete mode 100644 tests/invalid-x509/id:000204,orig:id:000049,src:000004,op:havoc,rep:2,+cov.der delete mode 100644 tests/invalid-x509/id:000231,orig:id:000061,src:000036,op:havoc,rep:16.der delete mode 100644 tests/invalid-x509/id:000243,orig:id:000067,src:000039,op:havoc,rep:2.der delete mode 100644 tests/invalid-x509/id:000247,orig:id:000069,src:000039,op:havoc,rep:2.der delete mode 100644 tests/invalid-x509/id:000294,orig:id:000096,src:000062,op:havoc,rep:2.der delete mode 100644 tests/invalid-x509/id:000297,orig:id:000099,src:000097,op:havoc,rep:4.der delete mode 100644 tests/invalid-x509/id:000310,orig:id:000112,src:000102,op:havoc,rep:4.der delete mode 100644 tests/invalid-x509/id:000327,orig:id:000129,src:000112,op:havoc,rep:2.der delete mode 100644 tests/invalid-x509/id:000334,orig:id:000136,src:000016+000011,op:splice,rep:8,+cov.der delete mode 100644 tests/invalid-x509/id:000344,src:000001,op:flip1,pos:6,+cov.der delete mode 100644 tests/invalid-x509/id:000347,src:000001,op:flip1,pos:8,+cov.der delete mode 100644 tests/invalid-x509/id:000359,src:000001,op:flip1,pos:21,+cov.der delete mode 100644 tests/invalid-x509/id:000396,src:000001,op:flip1,pos:104.der delete mode 100644 tests/invalid-x509/id:000398,src:000001,op:flip1,pos:104,+cov.der delete mode 100644 tests/invalid-x509/id:000399,src:000001,op:flip1,pos:104.der delete mode 100644 tests/invalid-x509/id:000415,src:000001,op:flip1,pos:228,+cov.der delete mode 100644 tests/invalid-x509/id:000438,src:000001,op:flip1,pos:573.der delete mode 100644 tests/invalid-x509/id:000444,src:000001,op:flip1,pos:583,+cov.der delete mode 100644 tests/invalid-x509/id:000459,src:000001,op:flip2,pos:23,+cov.der delete mode 100644 tests/invalid-x509/id:000469,src:000001,op:flip2,pos:542,+cov.der delete mode 100644 tests/invalid-x509/id:000470,src:000001,op:flip2,pos:544.der delete mode 100644 tests/invalid-x509/id:000473,src:000001,op:flip2,pos:714.der delete mode 100644 tests/invalid-x509/id:000476,src:000001,op:flip2,pos:739.der delete mode 100644 tests/invalid-x509/id:000478,src:000001,op:flip4,pos:21.der delete mode 100644 tests/invalid-x509/id:000487,src:000001,op:flip4,pos:739.der delete mode 100644 tests/invalid-x509/id:000492,src:000001,op:flip8,pos:36,+cov.der delete mode 100644 tests/invalid-x509/id:000503,src:000001,op:arith8,pos:104,val:-17,+cov.der delete mode 100644 tests/invalid-x509/id:000505,src:000001,op:arith8,pos:174,val:+35.der delete mode 100644 tests/invalid-x509/id:000508,src:000001,op:arith8,pos:503,val:+3,+cov.der delete mode 100644 tests/invalid-x509/id:000509,src:000001,op:arith8,pos:506,val:+3,+cov.der delete mode 100644 tests/invalid-x509/id:000517,src:000001,op:int8,pos:11,val:-128,+cov.der delete mode 100644 tests/invalid-x509/id:000519,src:000001,op:int8,pos:21,val:-128,+cov.der delete mode 100644 tests/invalid-x509/id:000521,src:000001,op:int8,pos:34,val:-128,+cov.der delete mode 100644 tests/invalid-x509/id:000523,src:000001,op:int8,pos:43,val:-128,+cov.der delete mode 100644 tests/invalid-x509/id:000527,src:000001,op:int8,pos:104,val:-128,+cov.der delete mode 100644 tests/invalid-x509/id:000532,src:000001,op:int8,pos:516,val:-128,+cov.der delete mode 100644 tests/invalid-x509/id:000535,src:000001,op:int8,pos:739,val:+127.der delete mode 100644 tests/invalid-x509/id:000542,src:000001,op:int16,pos:209,val:be:+127,+cov.der delete mode 100644 tests/invalid-x509/id:000552,src:000001,op:int32,pos:21,val:+100663045.der delete mode 100644 tests/invalid-x509/id:000565,src:000001,op:int32,pos:104,val:+255,+cov.der delete mode 100644 tests/invalid-x509/id:000566,src:000001,op:int32,pos:178,val:be:-128,+cov.der delete mode 100644 tests/invalid-x509/id:000574,src:000001,op:int32,pos:515,val:be:-128.der delete mode 100644 tests/invalid-x509/id:000578,src:000001,op:havoc,rep:32.der delete mode 100644 tests/invalid-x509/id:000581,src:000001,op:havoc,rep:2.der delete mode 100644 tests/invalid-x509/id:000582,src:000001,op:havoc,rep:2.der delete mode 100644 tests/invalid-x509/id:000585,src:000001,op:havoc,rep:8.der delete mode 100644 tests/invalid-x509/id:000586,src:000001,op:havoc,rep:16.der delete mode 100644 tests/invalid-x509/id:000587,src:000001,op:havoc,rep:2,+cov.der delete mode 100644 tests/invalid-x509/id:000590,src:000001,op:havoc,rep:32,+cov.der delete mode 100644 tests/invalid-x509/id:000592,src:000001,op:havoc,rep:32,+cov.der delete mode 100644 tests/invalid-x509/id:000594,src:000001,op:havoc,rep:2,+cov.der delete mode 100644 tests/invalid-x509/id:000595,src:000001,op:havoc,rep:2,+cov.der delete mode 100644 tests/invalid-x509/id:000598,src:000001,op:havoc,rep:32.der delete mode 100644 tests/invalid-x509/id:000600,src:000001,op:havoc,rep:8,+cov.der delete mode 100644 tests/invalid-x509/id:000601,src:000001,op:havoc,rep:8,+cov.der delete mode 100644 tests/invalid-x509/id:000603,src:000002,op:flip1,pos:19.der delete mode 100644 tests/invalid-x509/id:000605,src:000002,op:havoc,rep:8.der delete mode 100644 tests/invalid-x509/id:000621,src:000003,op:flip1,pos:229,+cov.der delete mode 100644 tests/invalid-x509/id:000629,src:000003,op:arith8,pos:205,val:-26,+cov.der delete mode 100644 tests/invalid-x509/id:000636,src:000003,op:int8,pos:205,val:-128,+cov.der delete mode 100644 tests/invalid-x509/id:000637,src:000003,op:int8,pos:207,val:-128,+cov.der delete mode 100644 tests/invalid-x509/id:000639,src:000003,op:int16,pos:205,val:+128,+cov.der delete mode 100644 tests/invalid-x509/id:000644,src:000003,op:int32,pos:205,val:+255,+cov.der delete mode 100644 tests/invalid-x509/id:000648,src:000003,op:havoc,rep:8.der delete mode 100644 tests/invalid-x509/id:000649,src:000003,op:havoc,rep:2,+cov.der delete mode 100644 tests/invalid-x509/id:000650,src:000003,op:havoc,rep:8.der delete mode 100644 tests/invalid-x509/id:000652,src:000003,op:havoc,rep:4.der delete mode 100644 tests/invalid-x509/id:000654,src:000003,op:havoc,rep:16.der delete mode 100644 tests/invalid-x509/id:000657,src:000003,op:havoc,rep:2.der delete mode 100644 tests/invalid-x509/id:000658,src:000003,op:havoc,rep:4.der delete mode 100644 tests/invalid-x509/id:000660,src:000003,op:havoc,rep:4.der delete mode 100644 tests/invalid-x509/id:000661,src:000003,op:havoc,rep:8,+cov.der delete mode 100644 tests/invalid-x509/id:000662,src:000003,op:havoc,rep:4,+cov.der delete mode 100644 tests/invalid-x509/id:000664,src:000003,op:havoc,rep:2,+cov.der delete mode 100644 tests/invalid-x509/id:000670,src:000182,op:havoc,rep:4,+cov.der delete mode 100644 tests/invalid-x509/id:000672,src:000182,op:havoc,rep:8.der delete mode 100644 tests/invalid-x509/id:000676,src:000254,op:havoc,rep:4,+cov.der delete mode 100644 tests/invalid-x509/id:000677,src:000254,op:havoc,rep:2,+cov.der delete mode 100644 tests/invalid-x509/id:000678,src:000254,op:havoc,rep:2,+cov.der delete mode 100644 tests/invalid-x509/id:000679,src:000254,op:havoc,rep:2,+cov.der delete mode 100644 tests/invalid-x509/id:000680,src:000254,op:havoc,rep:2,+cov.der delete mode 100644 tests/invalid-x509/id:000681,src:000254,op:havoc,rep:4,+cov.der delete mode 100644 tests/invalid-x509/id:000682,src:000254,op:havoc,rep:2,+cov.der delete mode 100644 tests/invalid-x509/id:000683,src:000254,op:havoc,rep:4,+cov.der delete mode 100644 tests/invalid-x509/id:000684,src:000254,op:havoc,rep:2,+cov.der delete mode 100644 tests/invalid-x509/id:000685,src:000254,op:havoc,rep:2,+cov.der delete mode 100644 tests/invalid-x509/id:000687,src:000336,op:flip1,pos:508.der delete mode 100644 tests/invalid-x509/id:000688,src:000336,op:flip4,pos:508.der delete mode 100644 tests/invalid-x509/id:000689,src:000336,op:int16,pos:424,val:be:-128,+cov.der delete mode 100644 tests/invalid-x509/id:000691,src:000336,op:int32,pos:423,val:-128,+cov.der delete mode 100644 tests/invalid-x509/id:000694,src:000350,op:flip8,pos:16.der delete mode 100644 tests/invalid-x509/id:000695,src:000350,op:arith8,pos:12,val:-35.der delete mode 100644 tests/invalid-x509/id:000704,src:000403,op:flip4,pos:103.der delete mode 100644 tests/invalid-x509/id:000708,src:000416,op:flip4,pos:228,+cov.der delete mode 100644 tests/invalid-x509/id:000709,src:000436,op:int32,pos:550,val:+0.der delete mode 100644 tests/invalid-x509/id:000712,src:000444,op:flip1,pos:584,+cov.der delete mode 100644 tests/invalid-x509/id:000714,src:000444,op:ext_AO,pos:584,+cov.der delete mode 100644 tests/invalid-x509/id:000722,src:000472,op:havoc,rep:2.der delete mode 100644 tests/invalid-x509/id:000723,src:000472,op:havoc,rep:4.der delete mode 100644 tests/invalid-x509/id:000729,src:000483,op:int32,pos:229,val:+0.der delete mode 100644 tests/invalid-x509/id:000730,src:000484,op:flip1,pos:503.der delete mode 100644 tests/invalid-x509/id:000731,src:000484,op:flip1,pos:505,+cov.der delete mode 100644 tests/invalid-x509/id:000735,src:000484,op:int32,pos:505,val:-128.der delete mode 100644 tests/invalid-x509/id:000738,src:000495,op:int32,pos:550,val:+0.der delete mode 100644 tests/invalid-x509/id:000743,src:000508,op:ext_AO,pos:504,+cov.der delete mode 100644 tests/invalid-x509/id:000744,src:000509,op:ext_AO,pos:507,+cov.der delete mode 100644 tests/invalid-x509/id:000748,src:000522,op:int8,pos:34,val:-128.der delete mode 100644 tests/invalid-x509/id:000753,src:000528,op:int16,pos:119,val:+16.der delete mode 100644 tests/invalid-x509/id:000754,src:000528,op:havoc,rep:2.der delete mode 100644 tests/invalid-x509/id:000756,src:000539,op:flip1,pos:268,+cov.der delete mode 100644 tests/invalid-x509/id:000757,src:000539,op:flip32,pos:47,+cov.der delete mode 100644 tests/invalid-x509/id:000763,src:000539,op:havoc,rep:32,+cov.der delete mode 100644 tests/invalid-x509/id:000767,src:000539,op:havoc,rep:8,+cov.der delete mode 100644 tests/invalid-x509/id:000769,src:000539,op:havoc,rep:32,+cov.der delete mode 100644 tests/invalid-x509/id:000770,src:000539,op:havoc,rep:32.der delete mode 100644 tests/invalid-x509/id:000776,src:000549,op:int32,pos:13,val:+0.der delete mode 100644 tests/invalid-x509/id:000783,src:000579,op:ext_AO,pos:33,+cov.der delete mode 100644 tests/invalid-x509/id:000784,src:000587,op:ext_AO,pos:15,+cov.der delete mode 100644 tests/invalid-x509/id:000786,src:000600,op:ext_AO,pos:545,+cov.der delete mode 100644 tests/invalid-x509/id:000787,src:000601,op:int16,pos:103,val:-1.der delete mode 100644 tests/invalid-x509/id:000788,src:000601,op:ext_AO,pos:105,+cov.der delete mode 100644 tests/invalid-x509/id:000789,src:000608,op:havoc,rep:8.der delete mode 100644 tests/invalid-x509/id:000791,src:000612,op:int32,pos:206,val:+0.der delete mode 100644 tests/invalid-x509/id:000792,src:000613,op:flip4,pos:207.der delete mode 100644 tests/invalid-x509/id:000797,src:000621,op:flip1,pos:235.der delete mode 100644 tests/invalid-x509/id:000799,src:000623,op:flip1,pos:354,+cov.der delete mode 100644 tests/invalid-x509/id:000800,src:000623,op:flip1,pos:354,+cov.der delete mode 100644 tests/invalid-x509/id:000801,src:000623,op:arith8,pos:354,val:-25,+cov.der delete mode 100644 tests/invalid-x509/id:000802,src:000623,op:int16,pos:354,val:-128,+cov.der delete mode 100644 tests/invalid-x509/id:000804,src:000623,op:int32,pos:193,val:-32768,+cov.der delete mode 100644 tests/invalid-x509/id:000805,src:000624,op:int8,pos:355,val:-128,+cov.der delete mode 100644 tests/invalid-x509/id:000806,src:000624,op:int32,pos:193,val:-32768,+cov.der delete mode 100644 tests/invalid-x509/id:000810,src:000628,op:flip1,pos:7.der delete mode 100644 tests/invalid-x509/id:000815,src:000640,op:int32,pos:230,val:-2147483648.der delete mode 100644 tests/invalid-x509/id:000817,src:000641,op:flip1,pos:11.der delete mode 100644 tests/invalid-x509/id:000821,src:000645,op:flip1,pos:207.der delete mode 100644 tests/invalid-x509/id:000823,src:000645,op:int32,pos:211,val:+0.der delete mode 100644 tests/invalid-x509/id:000825,src:000647,op:int32,pos:232,val:+0.der delete mode 100644 tests/invalid-x509/id:000828,src:000652,op:int32,pos:30,val:+0.der delete mode 100644 tests/invalid-x509/id:000833,src:000654,op:int32,pos:43,val:+0.der delete mode 100644 tests/invalid-x509/id:000840,src:000655,op:havoc,rep:16,+cov.der delete mode 100644 tests/invalid-x509/id:000841,src:000655,op:havoc,rep:8,+cov.der delete mode 100644 tests/invalid-x509/id:000846,src:000655,op:havoc,rep:64.der delete mode 100644 tests/invalid-x509/id:000849,src:000655,op:havoc,rep:2.der delete mode 100644 tests/invalid-x509/id:000852,src:000655,op:havoc,rep:32.der delete mode 100644 tests/invalid-x509/id:000854,src:000655,op:havoc,rep:16.der delete mode 100644 tests/invalid-x509/id:000855,src:000655,op:havoc,rep:64.der delete mode 100644 tests/invalid-x509/id:000857,src:000655,op:havoc,rep:8,+cov.der delete mode 100644 tests/invalid-x509/id:000859,src:000659,op:ext_AO,pos:259,+cov.der delete mode 100644 tests/invalid-x509/id:000861,src:000660,op:int32,pos:92,val:+0.der delete mode 100644 tests/invalid-x509/id:000862,src:000661,op:flip4,pos:282,+cov.der delete mode 100644 tests/invalid-x509/id:000864,src:000661,op:int8,pos:356,val:-128,+cov.der delete mode 100644 tests/invalid-x509/id:000865,src:000661,op:int16,pos:356,val:-128,+cov.der delete mode 100644 tests/invalid-x509/id:000866,src:000661,op:int32,pos:193,val:-32768,+cov.der delete mode 100644 tests/invalid-x509/id:000867,src:000664,op:ext_AO,pos:206,+cov.der delete mode 100644 tests/invalid-x509/id:000871,src:000676,op:arith8,pos:6,val:-5,+cov.der delete mode 100644 tests/invalid-x509/id:000872,src:000676,op:arith8,pos:7,val:-21,+cov.der delete mode 100644 tests/invalid-x509/id:000873,src:000676,op:havoc,rep:2,+cov.der delete mode 100644 tests/invalid-x509/id:000875,src:000680,op:havoc,rep:2,+cov.der delete mode 100644 tests/invalid-x509/id:000876,src:000681,op:havoc,rep:2,+cov.der delete mode 100644 tests/invalid-x509/id:000880,src:000683,op:havoc,rep:2,+cov.der delete mode 100644 tests/invalid-x509/id:000881,src:000685,op:havoc,rep:2,+cov.der delete mode 100644 tests/invalid-x509/id:000885,src:000701,op:int32,pos:106,val:+0.der delete mode 100644 tests/invalid-x509/id:000886,src:000701,op:int32,pos:107,val:+0.der delete mode 100644 tests/invalid-x509/id:000887,src:000708,op:ext_AO,pos:229,+cov.der delete mode 100644 tests/invalid-x509/id:000888,src:000713,op:flip1,pos:601.der delete mode 100644 tests/invalid-x509/id:000889,src:000713,op:flip1,pos:647.der delete mode 100644 tests/invalid-x509/id:000890,src:000714,op:flip1,pos:503,+cov.der delete mode 100644 tests/invalid-x509/id:000891,src:000721,op:int32,pos:798,val:be:+1.der delete mode 100644 tests/invalid-x509/id:000892,src:000724,op:int16,pos:503,val:+1.der delete mode 100644 tests/invalid-x509/id:000894,src:000734,op:int16,pos:503,val:+1.der delete mode 100644 tests/invalid-x509/id:000895,src:000745,op:flip4,pos:751.der delete mode 100644 tests/invalid-x509/id:000900,src:000745,op:havoc,rep:64.der delete mode 100644 tests/invalid-x509/id:000901,src:000745,op:havoc,rep:8.der delete mode 100644 tests/invalid-x509/id:000903,src:000768,op:int16,pos:230,val:+256.der delete mode 100644 tests/invalid-x509/id:000904,src:000768,op:int16,pos:1012,val:-128,+cov.der delete mode 100644 tests/invalid-x509/id:000905,src:000768,op:int32,pos:1010,val:-128,+cov.der delete mode 100644 tests/invalid-x509/id:000906,src:000768,op:int32,pos:1011,val:+32768,+cov.der delete mode 100644 tests/invalid-x509/id:000910,src:000777,op:int32,pos:28,val:+0.der delete mode 100644 tests/invalid-x509/id:000913,src:000793,op:int32,pos:208,val:-2147483648.der delete mode 100644 tests/invalid-x509/id:000914,src:000793,op:ext_AO,pos:208,+cov.der delete mode 100644 tests/invalid-x509/id:000916,src:000808,op:flip1,pos:44.der delete mode 100644 tests/invalid-x509/id:000918,src:000811,op:int8,pos:300,val:-128.der delete mode 100644 tests/invalid-x509/id:000920,src:000813,op:int32,pos:231,val:+0.der delete mode 100644 tests/invalid-x509/id:000923,src:000818,op:int32,pos:18,val:+0.der delete mode 100644 tests/invalid-x509/id:000924,src:000818,op:int32,pos:19,val:+0.der delete mode 100644 tests/invalid-x509/id:000927,src:000819,op:int8,pos:9,val:-128.der delete mode 100644 tests/invalid-x509/id:000928,src:000819,op:int32,pos:9,val:+255.der delete mode 100644 tests/invalid-x509/id:000930,src:000820,op:flip1,pos:205.der delete mode 100644 tests/invalid-x509/id:000935,src:000822,op:int32,pos:214,val:+0.der delete mode 100644 tests/invalid-x509/id:000936,src:000826,op:flip1,pos:229.der delete mode 100644 tests/invalid-x509/id:000939,src:000828,op:int32,pos:34,val:+0.der delete mode 100644 tests/invalid-x509/id:000940,src:000829,op:flip2,pos:334.der delete mode 100644 tests/invalid-x509/id:000943,src:000832,op:int32,pos:46,val:+0.der delete mode 100644 tests/invalid-x509/id:000945,src:000840,op:flip1,pos:518,+cov.der delete mode 100644 tests/invalid-x509/id:000947,src:000849,op:flip1,pos:279.der delete mode 100644 tests/invalid-x509/id:000949,src:000858,op:arith8,pos:280,val:-5.der delete mode 100644 tests/invalid-x509/id:000950,src:000860,op:int16,pos:95,val:+0.der delete mode 100644 tests/invalid-x509/id:000953,src:000862,op:flip1,pos:355,+cov.der delete mode 100644 tests/invalid-x509/id:000954,src:000862,op:flip1,pos:355,+cov.der delete mode 100644 tests/invalid-x509/id:000955,src:000862,op:flip1,pos:356,+cov.der delete mode 100644 tests/invalid-x509/id:000956,src:000862,op:flip2,pos:355,+cov.der delete mode 100644 tests/invalid-x509/id:000958,src:000863,op:flip1,pos:228.der delete mode 100644 tests/invalid-x509/id:000959,src:000864,op:flip1,pos:357,+cov.der delete mode 100644 tests/invalid-x509/id:000961,src:000866,op:flip1,pos:357,+cov.der delete mode 100644 tests/invalid-x509/id:000962,src:000875,op:havoc,rep:4,+cov.der delete mode 100644 tests/invalid-x509/id:000963,src:000876,op:flip4,pos:5,+cov.der delete mode 100644 tests/invalid-x509/id:000964,src:000878,op:int16,pos:4,val:be:-128,+cov.der delete mode 100644 tests/invalid-x509/id:000975,src:000920,op:int32,pos:235,val:+0.der delete mode 100644 tests/invalid-x509/id:000976,src:000924,op:int32,pos:23,val:+0.der delete mode 100644 tests/invalid-x509/id:000977,src:000928,op:int32,pos:20,val:+0.der delete mode 100644 tests/invalid-x509/id:000978,src:000928,op:havoc,rep:32.der delete mode 100644 tests/invalid-x509/id:000980,src:000929,op:int32,pos:212,val:+0.der delete mode 100644 tests/invalid-x509/id:000983,src:000934,op:int32,pos:216,val:+0.der delete mode 100644 tests/invalid-x509/id:000985,src:000934,op:havoc,rep:2.der delete mode 100644 tests/invalid-x509/id:000986,src:000935,op:int32,pos:205,val:+255.der delete mode 100644 tests/invalid-x509/id:000988,src:000936,op:int32,pos:237,val:+0.der delete mode 100644 tests/invalid-x509/id:000989,src:000939,op:flip2,pos:39.der delete mode 100644 tests/invalid-x509/id:000990,src:000939,op:int16,pos:39,val:+0.der delete mode 100644 tests/invalid-x509/id:000991,src:000944,op:int32,pos:41,val:-32768.der delete mode 100644 tests/invalid-x509/id:000992,src:000944,op:int32,pos:371,val:-128.der delete mode 100644 tests/invalid-x509/id:000995,src:000944,op:havoc,rep:4.der delete mode 100644 tests/invalid-x509/id:000997,src:000944,op:havoc,rep:2.der delete mode 100644 tests/invalid-x509/id:000998,src:000944,op:havoc,rep:2.der delete mode 100644 tests/invalid-x509/id:001001,src:000950,op:int32,pos:97,val:+0.der delete mode 100644 tests/invalid-x509/id:001003,src:000951,op:havoc,rep:2.der delete mode 100644 tests/invalid-x509/id:001004,src:000957,op:havoc,rep:16.der delete mode 100644 tests/invalid-x509/id:001005,src:000965,op:arith8,pos:426,val:+14.der delete mode 100644 tests/invalid-x509/id:001007,src:000965,op:havoc,rep:64.der delete mode 100644 tests/invalid-x509/id:001015,src:000968,op:int32,pos:35,val:-128.der delete mode 100644 tests/invalid-x509/id:001017,src:000973,op:int32,pos:237,val:+0.der delete mode 100644 tests/invalid-x509/id:001019,src:000974,op:int32,pos:230,val:be:+32768.der delete mode 100644 tests/invalid-x509/id:001021,src:000978,op:int32,pos:29,val:+0.der delete mode 100644 tests/invalid-x509/id:001022,src:000978,op:havoc,rep:8.der delete mode 100644 tests/invalid-x509/id:001026,src:000986,op:int32,pos:217,val:+0.der delete mode 100644 tests/invalid-x509/id:001028,src:000992,op:havoc,rep:2.der delete mode 100644 tests/invalid-x509/id:001033,src:001016,op:int32,pos:239,val:+0.der delete mode 100644 tests/invalid-x509/id:001034,src:001017,op:int32,pos:240,val:+0.der delete mode 100644 tests/invalid-x509/id:001037,src:000942,op:int32,pos:48,val:+0.der delete mode 100644 tests/invalid-x509/id:001040,src:001035,op:int32,pos:234,val:+0.der delete mode 100644 tests/invalid-x509/id:001041,src:001035,op:int32,pos:235,val:+0.der delete mode 100644 tests/invalid-x509/id:001042,src:001036,op:flip2,pos:229.der delete mode 100644 tests/invalid-x509/id:001044,src:001039,op:int32,pos:236,val:+0.der delete mode 100644 tests/invalid-x509/id:001047,src:000328,op:havoc,rep:2.der delete mode 100644 tests/invalid-x509/id:001051,src:001050,op:havoc,rep:2.der delete mode 100644 tests/invalid-x509/id:001052,src:001050,op:havoc,rep:2.der delete mode 100644 tests/invalid-x509/id:001054,src:001050,op:havoc,rep:2.der delete mode 100644 tests/invalid-x509/id:001056,src:001050,op:havoc,rep:2.der delete mode 100644 tests/invalid-x509/id:001069,src:000337,op:flip1,pos:285.der delete mode 100644 tests/invalid-x509/id:001071,src:000337,op:flip8,pos:245.der delete mode 100644 tests/invalid-x509/id:001072,src:000337,op:havoc,rep:4.der delete mode 100644 tests/invalid-x509/id:001076,src:001073,op:havoc,rep:64.der delete mode 100644 tests/invalid-x509/id:001078,src:001073,op:havoc,rep:128.der delete mode 100644 tests/invalid-x509/id:001079,src:001073,op:havoc,rep:128.der delete mode 100644 tests/invalid-x509/id:001081,src:001073,op:havoc,rep:4.der delete mode 100644 tests/invalid-x509/id:001082,src:001073,op:havoc,rep:16.der delete mode 100644 tests/invalid-x509/id:001083,src:001080,op:havoc,rep:16.der delete mode 100644 tests/invalid-x509/id:001084,src:001080,op:havoc,rep:16.der delete mode 100644 tests/invalid-x509/id:001087,src:000435,op:havoc,rep:8.der delete mode 100644 tests/invalid-x509/id:001095,src:000435,op:havoc,rep:64,+cov.der delete mode 100644 tests/invalid-x509/id:001098,src:000992,op:havoc,rep:2.der delete mode 100644 tests/invalid-x509/id:001099,src:001095,op:flip1,pos:573.der delete mode 100644 tests/invalid-x509/id:001104,src:001096,op:havoc,rep:4.der delete mode 100644 tests/invalid-x509/id:001105,src:001102,op:havoc,rep:8.der delete mode 100644 tests/invalid-x509/id:001106,src:000413,op:havoc,rep:4.der delete mode 100644 tests/invalid-x509/id:001108,src:000004,op:ext_AO,pos:258.der delete mode 100644 tests/invalid-x509/id:001111,src:001108,op:flip1,pos:262.der delete mode 100644 tests/invalid-x509/id:001112,src:001108,op:ext_AO,pos:280.der delete mode 100644 tests/invalid-x509/id:001114,src:000425,op:flip1,pos:749.der delete mode 100644 tests/invalid-x509/id:001116,src:000584,op:havoc,rep:2.der delete mode 100644 tests/invalid-x509/id:001118,src:000592,op:havoc,rep:64.der delete mode 100644 tests/invalid-x509/id:001120,src:000669,op:int16,pos:6,val:be:+1000,+cov.der delete mode 100644 tests/invalid-x509/id:001123,src:000589,op:flip2,pos:551.der delete mode 100644 tests/invalid-x509/id:001124,src:000589,op:arith8,pos:551,val:+9.der delete mode 100644 tests/invalid-x509/id:001125,src:000589,op:int32,pos:550,val:-128.der delete mode 100644 tests/invalid-x509/id:001129,src:001126,op:arith8,pos:503,val:+1.der delete mode 100644 tests/invalid-x509/id:001130,src:001126,op:havoc,rep:4.der delete mode 100644 tests/invalid-x509/id:001136,src:000605,op:havoc,rep:4.der delete mode 100644 tests/invalid-x509/id:001137,src:000827,op:flip1,pos:210.der delete mode 100644 tests/invalid-x509/id:001138,src:000827,op:arith8,pos:210,val:-12.der delete mode 100644 tests/invalid-x509/id:001145,src:000728,op:havoc,rep:32.der delete mode 100644 tests/invalid-x509/id:001148,src:001142,op:havoc,rep:8.der delete mode 100644 tests/invalid-x509/id:001156,src:001152,op:flip1,pos:39.der delete mode 100644 tests/invalid-x509/id:001163,src:001152,op:flip1,pos:46.der delete mode 100644 tests/invalid-x509/id:001164,src:001152,op:flip1,pos:47.der delete mode 100644 tests/invalid-x509/id:001169,src:001152,op:flip1,pos:64.der delete mode 100644 tests/invalid-x509/id:001170,src:001152,op:flip1,pos:95.der delete mode 100644 tests/invalid-x509/id:001172,src:001152,op:havoc,rep:4.der delete mode 100644 tests/invalid-x509/id:001173,src:001152,op:havoc,rep:16.der delete mode 100644 tests/invalid-x509/id:001175,src:001159,op:havoc,rep:4.der delete mode 100644 tests/invalid-x509/id:001176,src:001165,op:havoc,rep:32.der delete mode 100644 tests/invalid-x509/id:001177,src:000591,op:arith8,pos:575,val:+3.der delete mode 100644 tests/invalid-x509/id:001178,src:000656,op:int32,pos:353,val:-32768,+cov.der delete mode 100644 tests/invalid-x509/id:001179,src:001178,op:flip1,pos:355,+cov.der delete mode 100644 tests/invalid-x509/id:001180,src:001178,op:flip1,pos:355,+cov.der delete mode 100644 tests/invalid-x509/id:001185,src:000857,op:havoc,rep:16.der delete mode 100644 tests/invalid-x509/id:001188,src:000966,op:havoc,rep:32.der delete mode 100644 tests/invalid-x509/id:001189,src:000990,op:havoc,rep:2.der delete mode 100644 tests/invalid-x509/id:001190,src:001177,op:arith8,pos:639,val:+3.der delete mode 100644 tests/invalid-x509/id:001191,src:001189,op:flip1,pos:27.der delete mode 100644 tests/invalid-x509/id:001192,src:001189,op:int32,pos:25,val:+255.der delete mode 100644 tests/invalid-x509/id:001193,src:001189,op:ext_AO,pos:5.der delete mode 100644 tests/invalid-x509/id:001194,src:001189,op:havoc,rep:16.der delete mode 100644 tests/invalid-x509/id:001195,src:001189,op:havoc,rep:32.der delete mode 100644 tests/invalid-x509/id:001196,src:001189,op:havoc,rep:2.der delete mode 100644 tests/invalid-x509/id:001197,src:001189,op:havoc,rep:8.der delete mode 100644 tests/invalid-x509/id:001198,src:001189,op:havoc,rep:4.der delete mode 100644 tests/invalid-x509/id:001200,src:001193,op:flip2,pos:154.der delete mode 100644 tests/invalid-x509/id:001201,src:001195,op:int8,pos:47,val:+0.der delete mode 100644 tests/invalid-x509/id:001202,src:001196,op:flip1,pos:31.der delete mode 100644 tests/invalid-x509/id:001204,src:000710,op:arith8,pos:639,val:+3.der delete mode 100644 tests/invalid-x509/id:001206,src:000829,op:havoc,rep:16.der delete mode 100644 tests/invalid-x509/id:001207,src:000886,op:int32,pos:110,val:+0.der delete mode 100644 tests/invalid-x509/id:001208,src:000934,op:havoc,rep:2.der delete mode 100644 tests/invalid-x509/id:001209,src:000958,op:int16,pos:230,val:+1024.der delete mode 100644 tests/invalid-x509/id:001210,src:001025,op:flip1,pos:204.der delete mode 100644 tests/invalid-x509/id:001215,src:001093,op:havoc,rep:16.der delete mode 100644 tests/invalid-x509/id:001217,src:001119,op:flip1,pos:27.der delete mode 100644 tests/invalid-x509/id:001219,src:001136,op:flip1,pos:40.der delete mode 100644 tests/invalid-x509/id:001244,src:001239,op:flip1,pos:344.der delete mode 100644 tests/invalid-x509/id:001245,src:001239,op:flip1,pos:347.der delete mode 100644 tests/invalid-x509/id:001247,src:001239,op:flip1,pos:356.der delete mode 100644 tests/invalid-x509/id:001248,src:001239,op:flip1,pos:356.der delete mode 100644 tests/invalid-x509/id:001250,src:001239,op:flip2,pos:356.der delete mode 100644 tests/invalid-x509/id:001251,src:001239,op:flip4,pos:347.der delete mode 100644 tests/invalid-x509/id:001252,src:001239,op:arith8,pos:310,val:+10.der delete mode 100644 tests/invalid-x509/id:001254,src:001239,op:int32,pos:353,val:+255.der delete mode 100644 tests/invalid-x509/id:001255,src:001239,op:int32,pos:353,val:be:+1000.der delete mode 100644 tests/invalid-x509/id:001257,src:001239,op:ext_AO,pos:355.der delete mode 100644 tests/invalid-x509/id:001258,src:001239,op:ext_AO,pos:356.der delete mode 100644 tests/invalid-x509/id:001259,src:001252,op:flip1,pos:356.der delete mode 100644 tests/invalid-x509/id:001260,src:001252,op:flip1,pos:356.der delete mode 100644 tests/invalid-x509/id:001261,src:001252,op:flip2,pos:356.der delete mode 100644 tests/invalid-x509/id:001262,src:001252,op:int16,pos:355,val:+255.der delete mode 100644 tests/invalid-x509/id:001264,src:001252,op:int32,pos:353,val:be:+1000.der delete mode 100644 tests/invalid-x509/id:001265,src:001252,op:int32,pos:354,val:+255.der delete mode 100644 tests/invalid-x509/id:001266,src:001252,op:ext_AO,pos:355.der delete mode 100644 tests/invalid-x509/id:001267,src:001252,op:ext_AO,pos:356.der delete mode 100644 tests/invalid-x509/id:001270,src:001252,op:havoc,rep:8.der delete mode 100644 tests/invalid-x509/id:001272,src:001254,op:flip1,pos:207.der delete mode 100644 tests/invalid-x509/id:001273,src:001254,op:flip1,pos:278.der delete mode 100644 tests/invalid-x509/id:001274,src:001254,op:flip1,pos:279.der delete mode 100644 tests/invalid-x509/id:001275,src:001254,op:flip1,pos:328.der delete mode 100644 tests/invalid-x509/id:001276,src:001254,op:flip1,pos:344.der delete mode 100644 tests/invalid-x509/id:001277,src:001254,op:flip1,pos:347.der delete mode 100644 tests/invalid-x509/id:001278,src:001254,op:flip1,pos:353.der delete mode 100644 tests/invalid-x509/id:001279,src:001254,op:flip1,pos:353.der delete mode 100644 tests/invalid-x509/id:001280,src:001254,op:flip2,pos:353.der delete mode 100644 tests/invalid-x509/id:001282,src:001254,op:arith8,pos:310,val:+7.der delete mode 100644 tests/invalid-x509/id:001286,src:001254,op:int32,pos:351,val:+255.der delete mode 100644 tests/invalid-x509/id:001287,src:001254,op:havoc,rep:8.der delete mode 100644 tests/invalid-x509/id:001288,src:001254,op:havoc,rep:4.der delete mode 100644 tests/invalid-x509/id:001289,src:001254,op:havoc,rep:4.der delete mode 100644 tests/invalid-x509/id:001291,src:001255,op:flip1,pos:278.der delete mode 100644 tests/invalid-x509/id:001293,src:001255,op:int16,pos:356,val:-128.der delete mode 100644 tests/invalid-x509/id:001294,src:001271,op:flip1,pos:353.der delete mode 100644 tests/invalid-x509/id:001298,src:001297,op:flip1,pos:207.der delete mode 100644 tests/invalid-x509/id:001300,src:001297,op:flip1,pos:278.der delete mode 100644 tests/invalid-x509/id:001302,src:001297,op:flip1,pos:347.der delete mode 100644 tests/invalid-x509/id:001303,src:001297,op:flip4,pos:344.der delete mode 100644 tests/invalid-x509/id:001304,src:001297,op:int16,pos:354,val:+128.der delete mode 100644 tests/invalid-x509/id:001305,src:001297,op:int32,pos:349,val:be:+1024.der delete mode 100644 tests/invalid-x509/id:001306,src:001297,op:int32,pos:351,val:be:+512.der delete mode 100644 tests/invalid-x509/id:001308,src:001299,op:int16,pos:354,val:+128.der delete mode 100644 tests/invalid-x509/id:001310,src:001042,op:havoc,rep:8,+cov.der delete mode 100644 tests/invalid-x509/id:001311,src:001227,op:flip1,pos:359.der delete mode 100644 tests/invalid-x509/id:001312,src:001227,op:flip4,pos:358.der delete mode 100644 tests/invalid-x509/id:001314,src:001310,op:flip1,pos:48,+cov.der delete mode 100644 tests/invalid-x509/id:001315,src:001310,op:flip1,pos:403,+cov.der delete mode 100644 tests/invalid-x509/id:001316,src:001310,op:flip2,pos:48,+cov.der delete mode 100644 tests/invalid-x509/id:001317,src:001310,op:int32,pos:401,val:be:-32768,+cov.der delete mode 100644 tests/invalid-x509/id:001319,src:001314,op:flip1,pos:402,+cov.der delete mode 100644 tests/invalid-x509/id:001320,src:001314,op:flip1,pos:402,+cov.der delete mode 100644 tests/invalid-x509/id:001321,src:001318,op:flip2,pos:752.der delete mode 100644 tests/invalid-x509/id:001322,src:000713,op:havoc,rep:4.der delete mode 100644 tests/invalid-x509/id:001323,src:000998,op:havoc,rep:16.der delete mode 100644 tests/invalid-x509/id:001325,src:000998,op:havoc,rep:4.der delete mode 100644 tests/invalid-x509/id:001329,src:000998,op:havoc,rep:8.der delete mode 100644 tests/invalid-x509/id:001330,src:001026,op:flip1,pos:204.der delete mode 100644 tests/invalid-x509/id:001331,src:001029,op:havoc,rep:16.der delete mode 100644 tests/invalid-x509/id:001334,src:001044,op:int16,pos:241,val:+0.der delete mode 100644 tests/invalid-x509/id:001335,src:001074,op:int16,pos:227,val:+0.der delete mode 100644 tests/invalid-x509/id:001340,src:001120,op:havoc,rep:2,+cov.der delete mode 100644 tests/invalid-x509/id:001341,src:001120,op:havoc,rep:2,+cov.der delete mode 100644 tests/invalid-x509/id:001342,src:001120,op:havoc,rep:4,+cov.der delete mode 100644 tests/invalid-x509/id:001343,src:001120,op:havoc,rep:2,+cov.der delete mode 100644 tests/invalid-x509/id:001344,src:001120,op:havoc,rep:2,+cov.der delete mode 100644 tests/invalid-x509/id:001350,src:000891,op:havoc,rep:2.der delete mode 100644 tests/invalid-x509/id:001351,src:001002,op:havoc,rep:8.der delete mode 100644 tests/invalid-x509/id:001352,src:001250,op:flip1,pos:207.der delete mode 100644 tests/invalid-x509/id:001353,src:001250,op:flip1,pos:278.der delete mode 100644 tests/invalid-x509/id:001354,src:001250,op:flip1,pos:347.der delete mode 100644 tests/invalid-x509/id:001355,src:001351,op:flip1,pos:88.der delete mode 100644 tests/invalid-x509/id:001356,src:001133,op:flip4,pos:552.der delete mode 100644 tests/invalid-x509/id:001357,src:001185,op:havoc,rep:8.der delete mode 100644 tests/invalid-x509/id:001358,src:001187,op:havoc,rep:8.der delete mode 100644 tests/invalid-x509/id:001359,src:001206,op:havoc,rep:8.der delete mode 100644 tests/invalid-x509/id:001360,src:001206,op:havoc,rep:8.der delete mode 100644 tests/invalid-x509/id:001361,src:001208,op:flip2,pos:200.der delete mode 100644 tests/invalid-x509/id:001362,src:001208,op:int32,pos:205,val:+255.der delete mode 100644 tests/invalid-x509/id:001365,src:001221,op:int16,pos:114,val:+0.der delete mode 100644 tests/invalid-x509/id:001366,src:001221,op:int32,pos:113,val:+0.der delete mode 100644 tests/invalid-x509/id:001367,src:001221,op:int32,pos:114,val:+0.der delete mode 100644 tests/invalid-x509/id:001370,src:001232,op:flip4,pos:358.der delete mode 100644 tests/invalid-x509/id:001371,src:001232,op:havoc,rep:4,+cov.der delete mode 100644 tests/invalid-x509/id:001372,src:001232,op:havoc,rep:4.der delete mode 100644 tests/invalid-x509/id:001375,src:001122,op:flip2,pos:502.der delete mode 100644 tests/invalid-x509/id:001379,src:001144,op:havoc,rep:16.der delete mode 100644 tests/invalid-x509/id:001380,src:001144,op:havoc,rep:32.der delete mode 100644 tests/invalid-x509/id:001381,src:001144,op:havoc,rep:32.der delete mode 100644 tests/invalid-x509/id:001382,src:001231,op:flip4,pos:358.der delete mode 100644 tests/invalid-x509/id:001383,src:001235,op:flip4,pos:358.der delete mode 100644 tests/invalid-x509/id:001385,src:001240,op:flip1,pos:356.der delete mode 100644 tests/invalid-x509/id:001386,src:001240,op:ext_AO,pos:356.der delete mode 100644 tests/invalid-x509/id:001389,src:001242,op:int16,pos:272,val:be:+512.der delete mode 100644 tests/invalid-x509/id:001390,src:001242,op:int16,pos:355,val:+255.der delete mode 100644 tests/invalid-x509/id:001391,src:001242,op:int32,pos:354,val:+255.der delete mode 100644 tests/invalid-x509/id:001392,src:001242,op:ext_AO,pos:356.der delete mode 100644 tests/invalid-x509/id:001393,src:001245,op:flip1,pos:356.der delete mode 100644 tests/invalid-x509/id:001394,src:001245,op:flip1,pos:356.der delete mode 100644 tests/invalid-x509/id:001395,src:001245,op:ext_AO,pos:356.der delete mode 100644 tests/invalid-x509/id:001396,src:001257,op:flip4,pos:344.der delete mode 100644 tests/invalid-x509/id:001397,src:001257,op:int16,pos:357,val:-128.der delete mode 100644 tests/invalid-x509/id:001398,src:001266,op:int16,pos:357,val:-128.der delete mode 100644 tests/invalid-x509/id:001400,src:001267,op:flip1,pos:279.der delete mode 100644 tests/invalid-x509/id:001401,src:001267,op:int16,pos:358,val:-128.der delete mode 100644 tests/invalid-x509/id:001402,src:001279,op:flip1,pos:278.der delete mode 100644 tests/invalid-x509/id:001403,src:001279,op:flip1,pos:328.der delete mode 100644 tests/invalid-x509/id:001404,src:001303,op:havoc,rep:8.der delete mode 100644 tests/invalid-x509/id:001405,src:001404,op:flip1,pos:198.der delete mode 100644 tests/invalid-x509/id:001407,src:001406,op:flip1,pos:209.der delete mode 100644 tests/invalid-x509/id:001408,src:001406,op:flip16,pos:209.der delete mode 100644 tests/invalid-x509/id:001409,src:000748,op:int32,pos:38,val:+0.der delete mode 100644 tests/invalid-x509/id:001410,src:000748,op:int32,pos:48,val:+0.der delete mode 100644 tests/invalid-x509/id:001411,src:000979,op:havoc,rep:2.der delete mode 100644 tests/invalid-x509/id:001413,src:001222,op:havoc,rep:64.der delete mode 100644 tests/invalid-x509/id:001414,src:001237,op:flip4,pos:358.der delete mode 100644 tests/invalid-x509/id:001415,src:001258,op:int16,pos:358,val:-128.der delete mode 100644 tests/invalid-x509/id:001416,src:001297,op:havoc,rep:8.der delete mode 100644 tests/invalid-x509/id:001417,src:001314,op:havoc,rep:2,+cov.der delete mode 100644 tests/invalid-x509/id:001418,src:001314,op:havoc,rep:2,+cov.der delete mode 100644 tests/invalid-x509/id:001419,src:001411,op:flip1,pos:204.der delete mode 100644 tests/invalid-x509/id:001420,src:001411,op:havoc,rep:2.der delete mode 100644 tests/invalid-x509/id:001421,src:001147,op:havoc,rep:8.der delete mode 100644 tests/invalid-x509/id:001422,src:001147,op:havoc,rep:8.der delete mode 100644 tests/invalid-x509/id:001424,src:001324,op:int16,pos:21,val:+256.der delete mode 100644 tests/invalid-x509/id:001429,src:001324,op:havoc,rep:2.der delete mode 100644 tests/invalid-x509/id:001432,src:001326,op:havoc,rep:4.der delete mode 100644 tests/invalid-x509/id:001433,src:001334,op:havoc,rep:16.der delete mode 100644 tests/invalid-x509/id:001434,src:001350,op:havoc,rep:8.der delete mode 100644 tests/invalid-x509/id:001435,src:001357,op:havoc,rep:8.der delete mode 100644 tests/invalid-x509/id:001436,src:001360,op:havoc,rep:8.der delete mode 100644 tests/invalid-x509/id:001437,src:001369,op:havoc,rep:4.der delete mode 100644 tests/invalid-x509/id:001439,src:001379,op:havoc,rep:16.der delete mode 100644 tests/invalid-x509/id:001440,src:001386,op:int16,pos:358,val:-128.der delete mode 100644 tests/invalid-x509/id:001441,src:001400,op:int16,pos:358,val:-128.der delete mode 100644 tests/invalid-x509/id:001442,src:001401,op:flip1,pos:310.der delete mode 100644 tests/invalid-x509/id:001443,src:001405,op:havoc,rep:4.der delete mode 100644 tests/invalid-x509/id:001445,src:001429,op:havoc,rep:2.der delete mode 100644 tests/invalid-x509/id:001454,src:001444,op:havoc,rep:4.der delete mode 100644 tests/invalid-x509/id:001461,src:001218,op:int8,pos:196,val:-128.der delete mode 100644 tests/invalid-x509/id:001462,src:001461,op:flip1,pos:234.der delete mode 100644 tests/invalid-x509/id:001463,src:001335,op:int32,pos:144,val:+32768.der delete mode 100644 tests/invalid-x509/id:001464,src:001349,op:havoc,rep:2.der delete mode 100644 tests/invalid-x509/id:001465,src:001349,op:havoc,rep:64.der delete mode 100644 tests/invalid-x509/id:001466,src:001406,op:havoc,rep:4.der delete mode 100644 tests/invalid-x509/id:001467,src:001414,op:flip2,pos:347.der delete mode 100644 tests/invalid-x509/id:001469,src:000679,op:havoc,rep:2,+cov.der delete mode 100644 tests/invalid-x509/id:001476,src:001209,op:int8,pos:232,val:+127,+cov.der delete mode 100644 tests/invalid-x509/id:001478,src:001215,op:int32,pos:502,val:-32768.der delete mode 100644 tests/invalid-x509/id:001479,src:001348,op:havoc,rep:16.der delete mode 100644 tests/invalid-x509/id:001480,src:001404,op:havoc,rep:8.der delete mode 100644 tests/invalid-x509/id:001481,src:001346,op:havoc,rep:4,+cov.der delete mode 100644 tests/invalid-x509/id:001482,src:001468,op:havoc,rep:32.der delete mode 100644 tests/invalid-x509/id:001483,src:001481,op:flip1,pos:7,+cov.der delete mode 100644 tests/invalid-x509/id:001484,src:001481,op:flip1,pos:7,+cov.der delete mode 100644 tests/invalid-x509/id:001485,src:001481,op:flip2,pos:7,+cov.der delete mode 100644 tests/invalid-x509/id:001486,src:001481,op:havoc,rep:4,+cov.der delete mode 100644 tests/invalid-x509/id:001487,src:001481,op:havoc,rep:2,+cov.der delete mode 100644 tests/invalid-x509/id:001488,src:001481,op:havoc,rep:2,+cov.der delete mode 100644 tests/invalid-x509/id:001489,src:001481,op:havoc,rep:2,+cov.der delete mode 100644 tests/invalid-x509/id:001491,src:001211,op:flip1,pos:24.der delete mode 100644 tests/invalid-x509/id:001492,src:001211,op:flip1,pos:230.der delete mode 100644 tests/invalid-x509/id:001498,src:001439,op:havoc,rep:4.der delete mode 100644 tests/invalid-x509/id:001499,src:001450,op:havoc,rep:8.der delete mode 100644 tests/invalid-x509/id:001500,src:001452,op:havoc,rep:32.der delete mode 100644 tests/invalid-x509/id:001501,src:001469,op:havoc,rep:2,+cov.der delete mode 100644 tests/invalid-x509/id:001502,src:001501,op:havoc,rep:2,+cov.der delete mode 100644 tests/invalid-x509/id:001503,src:001502,op:flip1,pos:9,+cov.der delete mode 100644 tests/invalid-x509/id:001504,src:001502,op:flip2,pos:9,+cov.der delete mode 100644 tests/invalid-x509/id:001505,src:001502,op:havoc,rep:2,+cov.der delete mode 100644 tests/invalid-x509/id:001506,src:001502,op:havoc,rep:2,+cov.der delete mode 100644 tests/invalid-x509/id:001507,src:001502,op:havoc,rep:4,+cov.der delete mode 100644 tests/invalid-x509/id:001508,src:001502,op:havoc,rep:2,+cov.der delete mode 100644 tests/invalid-x509/id:001509,src:001502,op:havoc,rep:2,+cov.der delete mode 100644 tests/invalid-x509/id:001510,src:001506,op:flip1,pos:9,+cov.der delete mode 100644 tests/invalid-x509/id:001511,src:001506,op:flip2,pos:9,+cov.der delete mode 100644 tests/invalid-x509/id:001514,src:001476,op:havoc,rep:4.der delete mode 100644 tests/invalid-x509/id:001517,src:001461,op:havoc,rep:4.der delete mode 100644 tests/invalid-x509/id:001518,src:001463,op:havoc,rep:4.der delete mode 100644 tests/invalid-x509/id:001519,src:001490,op:flip1,pos:280.der delete mode 100644 tests/invalid-x509/id:001520,src:001498,op:int16,pos:29,val:+512.der delete mode 100644 tests/invalid-x509/id:001523,src:001375,op:flip1,pos:513.der delete mode 100644 tests/invalid-x509/id:001524,src:001375,op:flip1,pos:514.der delete mode 100644 tests/invalid-x509/id:001525,src:001375,op:flip1,pos:515.der delete mode 100644 tests/invalid-x509/id:001526,src:001512,op:flip16,pos:28.der delete mode 100644 tests/invalid-x509/id:001527,src:001512,op:havoc,rep:4.der delete mode 100644 tests/invalid-x509/id:001528,src:001512,op:havoc,rep:4.der delete mode 100644 tests/invalid-x509/id:001529,src:001512,op:havoc,rep:2.der delete mode 100644 tests/invalid-x509/id:001531,src:001460,op:flip2,pos:236.der delete mode 100644 tests/invalid-x509/id:001532,src:001477,op:flip2,pos:205.der delete mode 100644 tests/invalid-x509/id:001533,src:001477,op:flip4,pos:205.der delete mode 100644 tests/invalid-x509/id:001534,src:001477,op:int16,pos:419,val:+1024,+cov.der delete mode 100644 tests/invalid-x509/id:001535,src:001477,op:havoc,rep:2,+cov.der delete mode 100644 tests/invalid-x509/id:001536,src:001477,op:havoc,rep:4,+cov.der delete mode 100644 tests/invalid-x509/id:001538,src:001534,op:flip1,pos:207,+cov.der delete mode 100644 tests/invalid-x509/id:001539,src:001534,op:flip1,pos:421,+cov.der delete mode 100644 tests/invalid-x509/id:001540,src:001534,op:flip1,pos:421,+cov.der delete mode 100644 tests/invalid-x509/id:001541,src:001534,op:havoc,rep:4,+cov.der delete mode 100644 tests/invalid-x509/id:001542,src:001535,op:int16,pos:409,val:+255,+cov.der delete mode 100644 tests/invalid-x509/id:001543,src:001537,op:flip1,pos:602.der delete mode 100644 tests/invalid-x509/id:001546,src:001539,op:havoc,rep:2,+cov.der delete mode 100644 tests/invalid-x509/id:001547,src:001433,op:havoc,rep:16.der delete mode 100644 tests/invalid-x509/id:001548,src:001479,op:havoc,rep:32.der delete mode 100644 tests/invalid-x509/id:001549,src:001492,op:flip1,pos:424.der delete mode 100644 tests/invalid-x509/id:001551,src:001499,op:havoc,rep:4.der delete mode 100644 tests/invalid-x509/id:001552,src:001447,op:havoc,rep:2.der delete mode 100644 tests/invalid-x509/id:001553,src:001457,op:havoc,rep:4.der delete mode 100644 tests/invalid-x509/id:001554,src:001459,op:havoc,rep:8.der delete mode 100644 tests/invalid-x509/id:001555,src:001459,op:havoc,rep:2.der delete mode 100644 tests/invalid-x509/id:001556,src:001507,op:havoc,rep:2,+cov.der delete mode 100644 tests/invalid-x509/id:001557,src:000685+000981,op:splice,rep:2.der delete mode 100644 tests/invalid-x509/id:001558,src:001421,op:havoc,rep:4.der delete mode 100644 tests/invalid-x509/id:001559,src:001421,op:havoc,rep:4.der delete mode 100644 tests/invalid-x509/id:001560,src:001421,op:havoc,rep:32.der delete mode 100644 tests/invalid-x509/id:001562,src:001421,op:havoc,rep:8.der delete mode 100644 tests/invalid-x509/id:001567,src:000806+001307,op:splice,rep:4.der delete mode 100644 tests/invalid-x509/id:001568,src:001510+001564,op:splice,rep:4.der delete mode 100644 tests/invalid-x509/id:001571,src:000037,op:havoc,rep:8.der delete mode 100644 tests/invalid-x509/id:001572,src:001530,op:flip1,pos:153.der delete mode 100644 tests/invalid-x509/id:001573,src:001530,op:flip2,pos:158.der delete mode 100644 tests/invalid-x509/id:001574,src:001540+001215,op:splice,rep:4.der delete mode 100644 tests/invalid-x509/id:001575,src:001543,op:havoc,rep:8.der delete mode 100644 tests/invalid-x509/id:001577,src:001565,op:flip1,pos:21.der delete mode 100644 tests/invalid-x509/id:001578,src:001565+000591,op:splice,rep:4.der delete mode 100644 tests/invalid-x509/id:001579,src:001577,op:havoc,rep:4.der delete mode 100644 tests/invalid-x509/id:001580,src:001577,op:havoc,rep:64.der delete mode 100644 tests/invalid-x509/id:001581,src:001473+001546,op:splice,rep:16.der delete mode 100644 tests/invalid-x509/id:001583,src:001473+001546,op:splice,rep:16.der delete mode 100644 tests/invalid-x509/id:001584,src:001548,op:havoc,rep:8.der delete mode 100644 tests/invalid-x509/id:001586,src:001576,op:int8,pos:498,val:+0.der delete mode 100644 tests/invalid-x509/id:001587,src:001576+001104,op:splice,rep:4.der delete mode 100644 tests/invalid-x509/id:001588,src:001576+001104,op:splice,rep:16.der delete mode 100644 tests/invalid-x509/id:001589,src:000691+001423,op:splice,rep:4.der delete mode 100644 tests/libtasn1.supp delete mode 100644 tests/mscat.asn delete mode 100644 tests/object-id-decoding.c delete mode 100644 tests/ocsp-basic-response.c delete mode 100644 tests/ocsp-basic-response.der delete mode 100644 tests/ocsp.der delete mode 100644 tests/octet-string.c delete mode 100644 tests/pkix.asn delete mode 100644 tests/spc_pe_image_data.c delete mode 100644 tests/spc_pe_image_data.der delete mode 100644 tests/strict-der.c delete mode 100755 tests/threadsafety delete mode 100755 windows/asn1-parser/asn1-parser.vcproj delete mode 100755 windows/asn1-parser/config.h delete mode 100755 windows/gnulib/getopt.h delete mode 100755 windows/gnulib/gnulib.vcproj delete mode 100755 windows/libtasn1.ncb delete mode 100755 windows/libtasn1.sln delete mode 100755 windows/libtasn1.suo delete mode 100755 windows/libtasn1/libtasn1.vcproj delete mode 100644 windows/libtasn14win.mk delete mode 100755 windows/test-parser/test-parser.vcproj delete mode 100755 windows/test-tree/test-tree.vcproj diff --git a/.clcopying b/.clcopying deleted file mode 100644 index 2993662..0000000 --- a/.clcopying +++ /dev/null @@ -1,5 +0,0 @@ - ---------------------------------------------------------------------- - Copyright (C) 2002-2014 Free Software Foundation, Inc. - Copying and distribution of this file, with or without modification, - are permitted in any medium without royalty provided the copyright - notice and this notice are preserved. diff --git a/.gitignore b/.gitignore deleted file mode 100644 index ceac8f3..0000000 --- a/.gitignore +++ /dev/null @@ -1,215 +0,0 @@ -*.gcda -*.gcno -*.gcov -*~ -ChangeLog -INSTALL -Makefile -Makefile.in -aclocal.m4 -autom4te.cache/ -build-aux/ar-lib -build-aux/config.guess -build-aux/config.sub -build-aux/depcomp -build-aux/install-sh -build-aux/ltmain.sh -build-aux/mdate-sh -build-aux/missing -build-aux/texinfo.tex -build-aux/ylwrap -config.h -config.h.in -config.log -config.status -configure -doc/Makefile -doc/Makefile.in -doc/asn1Coding.1 -doc/asn1Decoding.1 -doc/asn1Parser.1 -doc/coverage/ -doc/cyclo/Makefile -doc/cyclo/Makefile.in -doc/cyclo/cyclo-libtasn1.html -doc/libtasn1.aux -doc/libtasn1.cp -doc/libtasn1.cps -doc/libtasn1.dvi -doc/libtasn1.fn -doc/libtasn1.fns -doc/libtasn1.html -doc/libtasn1.info -doc/libtasn1.ky -doc/libtasn1.log -doc/libtasn1.pdf -doc/libtasn1.pg -doc/libtasn1.ps -doc/libtasn1.toc -doc/libtasn1.tp -doc/libtasn1.vr -doc/man/ -doc/reference/Makefile -doc/reference/Makefile.in -doc/reference/html-build.stamp -doc/reference/html.stamp -doc/reference/html/ -doc/reference/libtasn1-decl-list.txt -doc/reference/libtasn1-decl.txt -doc/reference/libtasn1-overrides.txt -doc/reference/libtasn1-sections.txt -doc/reference/libtasn1-undeclared.txt -doc/reference/libtasn1-undocumented.txt -doc/reference/libtasn1-unused.txt -doc/reference/libtasn1.args -doc/reference/libtasn1.hierarchy -doc/reference/libtasn1.interfaces -doc/reference/libtasn1.pdf -doc/reference/libtasn1.prerequisites -doc/reference/libtasn1.signals -doc/reference/libtasn1.types -doc/reference/pdf-build.stamp -doc/reference/pdf.stamp -doc/reference/scan-build.stamp -doc/reference/setup-build.stamp -doc/reference/sgml-build.stamp -doc/reference/sgml.stamp -doc/reference/tmpl-build.stamp -doc/reference/tmpl.stamp -doc/reference/tmpl/ -doc/reference/version.xml -doc/reference/xml/ -doc/stamp-vti -doc/texi/ -doc/version.texi -examples/.deps/ -examples/.libs/ -examples/CertificateExample -examples/CertificateExample.o -examples/CrlExample -examples/CrlExample.o -examples/Makefile -examples/Makefile.in -examples/pkix_asn1_tab.c -examples/pkix_asn1_tab.o -gl/.deps/ -gl/.libs/ -gl/Makefile -gl/Makefile.in -gl/arg-nonnull.h -gl/c++defs.h -gl/getopt.h -gl/getopt.lo -gl/getopt.o -gl/getopt1.lo -gl/getopt1.o -gl/gettime.lo -gl/gettime.o -gl/libgnu.la -gl/progname.lo -gl/progname.o -gl/read-file.lo -gl/read-file.o -gl/stdio.h -gl/stdlib.h -gl/sys/ -gl/sys/stat.h -gl/time.h -gl/timespec.lo -gl/timespec.o -gl/unistd.h -gl/unistd.lo -gl/unistd.o -gl/version-etc-fsf.lo -gl/version-etc-fsf.o -gl/version-etc.lo -gl/version-etc.o -gl/warn-on-use.h -gl/wchar.h -lib/.deps/ -lib/.libs/ -lib/ASN1.lo -lib/ASN1.o -lib/ASN1.tab.c -lib/Makefile -lib/Makefile.in -lib/coding.lo -lib/coding.o -lib/decoding.lo -lib/decoding.o -lib/element.lo -lib/element.o -lib/errors.lo -lib/errors.o -lib/gllib/.deps/ -lib/gllib/.libs/ -lib/gllib/Makefile -lib/gllib/Makefile.in -lib/gllib/arg-nonnull.h -lib/gllib/c++defs.h -lib/gllib/dummy.lo -lib/gllib/dummy.o -lib/gllib/hash-pjw-bare.lo -lib/gllib/hash-pjw-bare.o -lib/gllib/libgnu.la -lib/gllib/string.h -lib/gllib/warn-on-use.h -lib/gllib/wchar.h -lib/gstr.lo -lib/gstr.o -lib/libtasn1.la -lib/libtasn1.pc -lib/parser_aux.lo -lib/parser_aux.o -lib/structure.lo -lib/structure.o -lib/version.lo -lib/version.o -libtasn1-*.tar.gz -libtasn1-*.tar.gz.sig -libtool -m4/libtool.m4 -m4/ltoptions.m4 -m4/ltsugar.m4 -m4/ltversion.m4 -m4/lt~obsolete.m4 -scan.tmp -src/.deps/ -src/.libs/ -src/Makefile -src/Makefile.in -src/asn1Coding -src/asn1Coding.o -src/asn1Decoding -src/asn1Decoding.o -src/asn1Parser -src/asn1Parser.o -src/benchmark.o -stamp-h1 -tags -tests/.deps/ -tests/Makefile -tests/Makefile.in -tests/Test_encoding -tests/Test_encoding.o -tests/Test_errors -tests/Test_errors.o -tests/Test_indefinite -tests/Test_indefinite.o -tests/Test_overflow -tests/Test_overflow.o -tests/Test_parser -tests/Test_parser.o -tests/Test_parser_ERROR.asn -tests/Test_simple -tests/Test_simple.o -tests/Test_strings -tests/Test_strings.o -tests/Test_tree -tests/Test_tree.o -tests/Test_choice -tests/Test_choice.o -windows/libtasn1-*-win??.zip -windows/tmp -tests/*.log -tests/*.trs diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index 4292d78..0000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,70 +0,0 @@ -image: centos:7 - -before_script: - - yum install -y git make bison autoconf libtool automake gettext-devel glibc-devel gcc valgrind clang libasan-static libubsan - -# See http://doc.gitlab.com/ce/ci/yaml/ for documentation. -Build and Check (x86-64): - script: - - git submodule update --init && make autoreconf && ./configure --disable-doc && make -j4 && make -j4 check - except: - - tags - tags: - - shared -Build and Check (x86): - script: - - yum install -y libgcc.i686 glibc-devel.i686 - - git submodule update --init && make autoreconf && - PKG_CONFIG_PATH="/usr/lib/pkgconfig/" CFLAGS="-O2 -g -m32" LDFLAGS="-m32" ./configure --build=i686-redhat-linux --target=i686-redhat-linux --disable-doc && make -j4 && make -j4 check - except: - - tags - tags: - - shared -Build and Check with clang: - script: - - git submodule update --init && make autoreconf && CC=clang - ./configure --disable-doc --disable-valgrind-tests && make -j4 && make check -j4 - except: - - tags - tags: - - shared -Build and Check with asan: - script: - - git submodule update --init && make autoreconf && CFLAGS="-fsanitize=address -g - -O2" LDFLAGS="-static-libasan" ./configure --disable-doc --disable-valgrind-tests && make -j4 && make check -j4 - except: - - tags - tags: - - shared -Build and Check with ubsan: - image: fedora:24 - script: - - yum install -y git make autoconf libtool automake gettext-devel glibc-devel gcc valgrind clang libasan-static libubsan - - git submodule update --init && make autoreconf && CFLAGS="-fsanitize=undefined -fno-sanitize-recover -g - -O2" ./configure --disable-doc --disable-valgrind-tests && make -j4 && make check -j4 - tags: - - shared - except: - - tags -MinGW32: - image: fedora:24 - script: - - dnf install -y wine.i686 mingw32-gcc util-linux - - mount -t binfmt_misc binfmt_misc /proc/sys/fs/binfmt_misc - - echo ':DOSWin:M::MZ::/usr/bin/wine:' > /proc/sys/fs/binfmt_misc/register - - make autoreconf && rm -f tests/suite/mini-eagain2.c && mkdir -p build && cd build && - mingw32-configure --disable-doc --disable-valgrind-tests && - mingw32-make -j$(nproc) && mingw32-make -C tests check -j$(nproc) - tags: - - shared - - docker - except: - - tags - artifacts: - expire_in: 1 week - when: on_failure - paths: - - build/*.log - - build/tests/*.log - - build/tests/*/*.log - diff --git a/.prev-version b/.prev-version deleted file mode 100644 index 8bbe6cf..0000000 --- a/.prev-version +++ /dev/null @@ -1 +0,0 @@ -2.2 diff --git a/AUTHORS b/AUTHORS deleted file mode 100644 index b9d35cf..0000000 --- a/AUTHORS +++ /dev/null @@ -1,12 +0,0 @@ -Original authors: -Fabio Fiorina -Nikos Mavrogiannopoulos - -Current maintainer: -Simon Josefsson - ----------------------------------------------------------------------- -Copyright (C) 2002-2014 Free Software Foundation, Inc. -Copying and distribution of this file, with or without modification, -are permitted in any medium without royalty provided the copyright -notice and this notice are preserved. diff --git a/COPYING b/COPYING deleted file mode 100644 index 94a9ed0..0000000 --- a/COPYING +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff --git a/COPYING.LIB b/COPYING.LIB deleted file mode 100644 index 4362b49..0000000 --- a/COPYING.LIB +++ /dev/null @@ -1,502 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations below. - - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. - - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it becomes -a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. - - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties with -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of the -ordinary General Public License). - - To apply these terms, attach the following notices to the library. It is -safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least the -"copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James Random Hacker. - - , 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! diff --git a/GNUmakefile b/GNUmakefile deleted file mode 100644 index a2f8111..0000000 --- a/GNUmakefile +++ /dev/null @@ -1,127 +0,0 @@ -# Having a separate GNUmakefile lets me 'include' the dynamically -# generated rules created via cfg.mk (package-local configuration) -# as well as maint.mk (generic maintainer rules). -# This makefile is used only if you run GNU Make. -# It is necessary if you want to build targets usually of interest -# only to the maintainer. - -# Copyright (C) 2001, 2003, 2006-2017 Free Software Foundation, Inc. - -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# If the user runs GNU make but has not yet run ./configure, -# give them a diagnostic. -_gl-Makefile := $(wildcard [M]akefile) -ifneq ($(_gl-Makefile),) - -# Make tar archive easier to reproduce. -export TAR_OPTIONS = --owner=0 --group=0 --numeric-owner - -# Allow the user to add to this in the Makefile. -ALL_RECURSIVE_TARGETS = - -include Makefile - -# Some projects override e.g., _autoreconf here. --include $(srcdir)/cfg.mk - -# Allow cfg.mk to override these. -_build-aux ?= build-aux -_autoreconf ?= autoreconf -v - -include $(srcdir)/maint.mk - -# Ensure that $(VERSION) is up to date for dist-related targets, but not -# for others: rerunning autoreconf and recompiling everything isn't cheap. -_have-git-version-gen := \ - $(shell test -f $(srcdir)/$(_build-aux)/git-version-gen && echo yes) -ifeq ($(_have-git-version-gen)0,yes$(MAKELEVEL)) - _is-dist-target ?= $(filter-out %clean, \ - $(filter maintainer-% dist% alpha beta stable,$(MAKECMDGOALS))) - _is-install-target ?= $(filter-out %check, $(filter install%,$(MAKECMDGOALS))) - ifneq (,$(_is-dist-target)$(_is-install-target)) - _curr-ver := $(shell cd $(srcdir) \ - && $(_build-aux)/git-version-gen \ - .tarball-version \ - $(git-version-gen-tag-sed-script)) - ifneq ($(_curr-ver),$(VERSION)) - ifeq ($(_curr-ver),UNKNOWN) - $(info WARNING: unable to verify if $(VERSION) is the correct version) - else - ifneq (,$(_is-install-target)) - # GNU Coding Standards state that 'make install' should not cause - # recompilation after 'make all'. But as long as changing the version - # string alters config.h, the cost of having 'make all' always have an - # up-to-date version is prohibitive. So, as a compromise, we merely - # warn when installing a version string that is out of date; the user - # should run 'autoreconf' (or something like 'make distcheck') to - # fix the version, 'make all' to propagate it, then 'make install'. - $(info WARNING: version string $(VERSION) is out of date;) - $(info run '$(MAKE) _version' to fix it) - else - $(info INFO: running autoreconf for new version string: $(_curr-ver)) -GNUmakefile: _version - touch GNUmakefile - endif - endif - endif - endif -endif - -.PHONY: _version -_version: - cd $(srcdir) && rm -rf autom4te.cache .version && $(_autoreconf) - $(MAKE) $(AM_MAKEFLAGS) Makefile - -else - -.DEFAULT_GOAL := abort-due-to-no-makefile -srcdir = . - -# The package can override .DEFAULT_GOAL to run actions like autoreconf. --include ./cfg.mk - -# Allow cfg.mk to override these. -_build-aux ?= build-aux -_autoreconf ?= autoreconf -v - -include ./maint.mk - -ifeq ($(.DEFAULT_GOAL),abort-due-to-no-makefile) -$(MAKECMDGOALS): abort-due-to-no-makefile -endif - -abort-due-to-no-makefile: - @echo There seems to be no Makefile in this directory. 1>&2 - @echo "You must run ./configure before running 'make'." 1>&2 - @exit 1 - -endif - -# Tell version 3.79 and up of GNU make to not build goals in this -# directory in parallel, in case someone tries to build multiple -# targets, and one of them can cause a recursive target to be invoked. - -# Only set this if Automake doesn't provide it. -AM_RECURSIVE_TARGETS ?= $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) \ - dist distcheck tags ctags - -ALL_RECURSIVE_TARGETS += $(AM_RECURSIVE_TARGETS) - -ifneq ($(word 2, $(MAKECMDGOALS)), ) -ifneq ($(filter $(ALL_RECURSIVE_TARGETS), $(MAKECMDGOALS)), ) -.NOTPARALLEL: -endif -endif diff --git a/Makefile.am b/Makefile.am deleted file mode 100644 index 2a8698b..0000000 --- a/Makefile.am +++ /dev/null @@ -1,65 +0,0 @@ -## Process this file with automake to produce Makefile.in -# Copyright (C) 2002-2014 Free Software Foundation, Inc. -# -# This file is part of LIBTASN1. -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc - -EXTRA_DIST = windows/asn1-parser/asn1-parser.vcproj \ - windows/asn1-parser/config.h windows/libtasn1.ncb \ - windows/libtasn1.sln windows/libtasn1.suo \ - windows/gnulib/getopt.h windows/gnulib/gnulib.vcproj \ - windows/libtasn1/libtasn1.vcproj \ - windows/test-parser/test-parser.vcproj \ - windows/test-tree/test-tree.vcproj windows/libtasn14win.mk - -SUBDIRS = gl lib src tests - -if ENABLE_DOC -SUBDIRS += doc examples -endif - -ACLOCAL_AMFLAGS = -I m4 -I gl/m4 -I lib/glm4 - -EXTRA_DIST += cfg.mk maint.mk .clcopying - -gnulib-update: - gnulib-tool --add-import --dir=. --lib=libgnu --source-base=lib/gllib --m4-base=lib/glm4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --lgpl=2 --no-conditional-dependencies --libtool --macro-prefix=lgl --no-vc-files - -TMPFILE="abi-temp.xml" - -abi-check: - @rm -f $(TMPFILE) - @echo "Checking libtasn1 ABI" - @echo "$(VERSION)" >$(TMPFILE) - @echo "$(srcdir)/lib/libtasn1.h" >>$(TMPFILE) - @echo "$(builddir)/lib/libtasn1.h" >>$(TMPFILE) - @echo "$(builddir)/lib/.libs" >>$(TMPFILE) - test ! -f "$(srcdir)/devel/ABI-$$(uname -m).dump" || \ - abi-compliance-checker -abi -lib libtasn1 -old "$(srcdir)/devel/ABI-$$(uname -m).dump" -new $(TMPFILE) - @rm -f $(TMPFILE) - -abi-dump: - @mkdir -p devel/headers-tmp - @cp lib/libtasn1.h devel/headers-tmp - @abi-dumper lib/.libs/libtasn1.so -o "./devel/ABI-$$(uname -m).dump" -public-headers devel/headers-tmp - @rm -rf devel/headers-tmp - - -dist-hook: abi-check - make -C doc/ compare-makefile - -.PHONY: abi-dump abi-check diff --git a/NEWS b/NEWS deleted file mode 100644 index 3fac146..0000000 --- a/NEWS +++ /dev/null @@ -1,517 +0,0 @@ -GNU Libtasn1 NEWS -*- outline -*- - -* Noteworthy changes in release 4.13 (released 2018-01-16) [stable] -- On indefinite string decoding, set a maximum level of allowed recursions - (3) to protect the BER decoder from a stack exhaustion. - -* Noteworthy changes in release 4.12 (released 2017-05-29) [stable] -- Corrected so-name version - -* Noteworthy changes in release 4.11 (released 2017-05-27) [stable] -- Introduced the ASN1_TIME_ENCODING_ERROR error code to indicate - an invalid encoding in the DER time fields. -- Introduced flag ASN1_DECODE_FLAG_ALLOW_INCORRECT_TIME. This flag - allows decoding errors in time fields even when in strict DER mode. - That is introduced in order to allow toleration of invalid times in - X.509 certificates (which are common) even though strict DER adherence - is enforced in other fields. -- Added safety check in asn1_find_node(). That prevents a crash - when a very long variable name is provided by the developer. - Note that this to be exploited requires controlling the ASN.1 - definitions used by the developer, i.e., the 'name' parameter of - asn1_write_value() or asn1_read_value(). The library is - not designed to protect against malicious manipulation of the - developer assigned variable names. Reported by Jakub Jirasek. - -* Noteworthy changes in release 4.10 (released 2017-01-16) [stable] -- Updated gnulib -- Removed -Werror from default compiler flags -- Fixed undefined behavior when negating integers in _asn1_ltostr(). - Issue found by oss-fuzz project (via gnutls): - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=388 -- Pass the correct length to _asn1_get_indefinite_length_string in - asn1_get_length_ber. This addresses reading 1-byte past the end - of data. Issue found by oss-fuzz project (via gnutls): - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=330 - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=331 - -* Noteworthy changes in release 4.9 (released 2016-07-25) [stable] -- Fixes to OID encoding of OIDs which have elements which exceed 2^32 - -* Noteworthy changes in release 4.8 (released 2016-04-11) [stable] -- Fixes to avoid reliance on C undefined behavior. -- Fixes to avoid an infinite recursion when decoding without - the ASN1_DECODE_FLAG_STRICT_DER flag. Reported by Pascal Cuoq. -- Combined all the BER octet string decoding functions to a single - one based on asn1_decode_simple_ber(). - -* Noteworthy changes in release 4.7 (released 2015-09-14) [stable] -- Fixed regression introduced in the decoding of multi-byte tags - fix. - -* Noteworthy changes in release 4.6 (released 2015-09-05) [stable] -- Allow decoding OCTET STRINGs with multi-byte tags. -- API and ABI changes since last version: - asn1_get_object_id_der: New function - -* Noteworthy changes in release 4.5 (released 2015-04-29) [stable] -- Corrected an invalid memory access in octet string decoding. - Reported by Hanno Böck. - -* Noteworthy changes in release 4.4 (released 2015-03-29) [stable] -- Corrected a two-byte stack overflow in asn1_der_decoding. Reported - by Hanno Böck. - -* Noteworthy changes in release 4.3 (released 2015-03-09) [stable] -- Added asn1_decode_simple_ber() - -* Noteworthy changes in release 4.2 (released 2014-09-15) [stable] -- Added sanity checks in the decoding of time when - ASN1_DECODE_FLAG_STRICT_DER is used. -- Fixes in the decoding of OCTET STRING when close to the end - of the structure. - -* Noteworthy changes in release 4.1 (released 2014-08-23) [stable] -- Corrected indefinite tag check in ANY constructions. That allows - the decoding of BER-encoded structures that contain indefinite - encoding within an ANY element. -- Added DER decoding flag ASN1_DECODE_FLAG_STRICT_DER. Over the - years BER functionality was added to the decoder and this flag - provides the way to disable it. -- API and ABI changes since last version: - ASN1_DECODE_FLAG_STRICT_DER: New definition - -* Noteworthy changes in release 4.0 (released 2014-06-26) [stable] -- Optimized asn1_der_decoding_startEnd(). It no longer requires the - additional decoding step. -- asn1_read_value() understands the ?CURRENT keyword, which can be used - to indicate the current element of a sequence, when the provided node - is a sequence element. -- Several optimizations in DER decoding of structures with sequences - containing many elements. -- asn1_der_decoding2() is introduced and allows flags to be passed on - the decoding process. Currently only ASN1_DECODE_FLAG_ALLOW_PADDING is - defined and that allows decoding DER structures that contain arbitrary - data past their end. Contributed by Karel Slany. -- API and ABI changes since last version: - ASN1_DECODE_FLAG_ALLOW_PADDING: New definition - asn1_dup_node: New function - asn1_der_decoding2: New function - asn1_der_decoding_element: It is now an alias to asn1_der_decoding - -* Noteworthy changes in release 3.6 (released 2014-05-25) [stable] -- Corrected an off-by-one error in ASN.1 DER tag decoding. -- Several improvements and new safety checks on DER decoding; - issues found using Codenomicon TLS test suite. -- Marked asn1_der_decoding_element() as deprecated. Use - asn1_der_decoding() instead. - -* Noteworthy changes in release 3.5 (released 2014-05-01) [stable] -- Correctly handle decoding of recursive CHOICE options. -- Allow deleting elements of SET OF. Patch by Jean-Louis Thekekara. -- Several small bug fixes found by coverity. -- Code improvements contributed by Kurt Roeckx. - -* Noteworthy changes in release 3.4 (released 2013-11-25) [stable] -- Added asn1_delete_structure2() which allows zeroizing the contents - of all values in the structure prior to deinitialization. -- The parser accepts negative numbers in an INTEGER range (but - still does no enforce them). - -* Noteworthy changes in release 3.3 (released 2013-03-23) [stable] -- More precise overflow checks using gnulib's intprops module. -- Updates to compile in Android systems. - -* Noteworthy changes in release 3.2 (released 2012-11-30) [stable] -- Corrected buffer overflow in the error reporting of the parser (reported - by Andreas Metzler). - -* Noteworthy changes in release 3.1 (released 2012-11-24) [stable] -- Completed rename of types: - ASN1_ARRAY_TYPE -> asn1_static_node (was asn1_static_node_t) -- Added new types: VisibleString, NumericString, IA5String, TeletexString, - PrintableString, UniversalString, BMPString, UTF8String. When re-defined - a warning is being print instead of failing. -- Parser outputs more detailed syntax error messages. -- Added asn1_decode_simple_der() and asn1_encode_simple_der(). -- Added asn1_read_value_type() to return value and type. -- Introduced ASN1_ETYPE_UTC_TIME and ASN1_ETYPE_GENERALIZED_TIME - -* Noteworthy changes in release 3.0 (2012-10-28) [stable] -- Added tool in tests/ to benchmark X.509 structure decoding. -- Added asn1_read_node_value() to obtain a node's value. -- Optimizations in internal tree allocation. -- Optimizations in tree search. -- libtasn1.h no longer exports internal structures. -- Types were renamed for consistency: - ASN1_DATA_NODE -> asn1_data_node_st - ASN1_ARRAY_TYPE -> asn1_static_node - ASN1_TYPE -> asn1_node - ASN1_TYPE_EMPTY -> NULL - static_struct_asn -> asn1_static_node_st - node_asn_struct -> asn1_node_st - node_asn -> asn1_node_st - (the old types are still available as definitions) - -* Noteworthy changes in release 2.13 (2012-05-31) [stable] -- Updated fix for DER decoding issue to not depend on specific compilers. -- Updated DER decoding check to apply to short form integers as well. - -* Noteworthy changes in release 2.12 (2012-03-19) [stable] -- Cleanup license headers. -- build: Update gnulib files. -- Corrected DER decoding issue (reported by Matthew Hall). - Added self check to detect the problem, see tests/Test_overflow.c. - This problem can lead to at least remotely triggered crashes, see - further analysis on the libtasn1 mailing list. - -* Noteworthy changes in release 2.11 (2011-11-25) [stable] -- qa: Now builds without compiler warnings with Solaris CC. -- qa: Added clang analysis. Fixed cyclomatic complexity output. -- tests: Added self-test of bit string functions. -- build: Added windows/libtasn14win.mk rules to produce Windows binaries. -- build: Don't hard code path to perl in doc/gdoc. -- Various minor fixes. - -* Noteworthy changes in release 2.10 (2011-10-25) [stable] -- lib: Small optimization, possibly working around gcc/valgrind issue. -- build: Update gnulib files. -- asn1Coding: actually implement the -c parameter. -- asn1Decoding: the -c parameter serves no purpose, remove it. -- doc: Add examples to asn1Coding and asn1Decoding description. - -* Noteworthy changes in release 2.9 (2010-12-06) [stable] -- tests: Link to gnulib to avoid build error related to 'rpl_ftello' on Solaris. - Reported by Dagobert Michelsen. -- doc: Fix bug reporting address to point at help-libtasn1@gnu.org. -- doc: Fix Returns: documentation in Texinfo. Reported by Jeffrey Walton. -- build: Update gnulib files. - -* Noteworthy changes in release 2.8 (2010-09-25) [stable] -- Update gnulib files. -- Use Libtool 2.2.10 to ease MinGW64 builds. - -* Noteworthy changes in release 2.7 (2010-05-20) [stable] -- Doc: Build a PDF manual using GTK-DOC. -- Doc: Fix of asn1_check_version, documentation was missing from last release. -- Build: Avoid warnings about ignored visibility attributes on Windows. - -* Noteworthy changes in release 2.6 (2010-04-20) [stable] -- Fix build failure on platforms without support for GNU LD version scripts. -- libtasn1: Simplified implementation of asn1_check_version. -- tests: Improved self-checks. -- Update gnulib files, fix many syntax-check nits, indent code, - fix license templates. - -* Noteworthy changes in release 2.5 (2010-03-15) [stable] -- doc: Improve GTK-DOC comments. -- misc: Updated gnulib files. - -* Noteworthy changes in release 2.4 (2010-01-18) [stable] -- Doc fixes. -- Updated gnulib files. -- Clean up copyright notices. - -* Noteworthy changes in release 2.3 (2009-07-29) [stable] -- Libtasn1 is now an official GNU project. -- Solve build problem on Tru64 related to TRUE/FALSE. -- More careful decoding of OIDs. -- Fixed warning in ASN1.y. -- Use "Software libraries" info dircategory. -- Drop GPL/LGPL copies from the manual (not needed there). -- New configure parameters to set packaging specific information. - The parameters are --with-packager, --with-packager-version, and - --with-packager-bug-reports. See - for more - details. - -* Noteworthy changes in release 2.2 (2009-05-20) [stable] -- Change how the ASN1_API decorator is used in libtasn1.h, for GTK-DOC. -- Changed license of libtasn1.pc from GPLv3+ to LGPLv2.1+. - Reported by Jeff Cai . -- Building with many warning flags now requires --enable-gcc-warnings. -- Some warnings fixed. - -* Noteworthy changes in release 2.1 (2009-04-17) [stable] -- Fix compilation failure on platforms that can't generate empty archives, - e.g., Mac OS X. Reported by David Reiser . - -* Noteworthy changes in release 2.0 (2009-04-13) [stable] -- Optimized tree generation. -- ASN1 parser code re-generated using Bison 2.4.1. -- Build with more warning flags. Many compiler warnings fixed. -- Compiled with -fvisibility=hidden by default if supported. - See http://gcc.gnu.org/wiki/Visibility -- The libtasn1-config tool has been removed. - For application developers, please stop using libtasn1-config for - finding libtasn1, use proper autoconf checks or pkg-config instead. - For users that need a libtasn1 that provides a libtasn1-config - script (for use with older applications), use libtasn1 v1.x instead. - Version 1.x is still supported. - -* Noteworthy changes in release 1.8 (2009-01-16) [stable] -- Fix crlf self-test under Mingw+Wine. -- Fix build problems on platforms that lack stdint.h. - Reported by Dagobert Michelsen in - . - -* Noteworthy changes in release 1.7 (2008-11-17) [stable] -- Add libtasn1-config for compatibility. - Please stop use it as it will disappear in v2.0! - Use standard AC_CHECK_FUNCS autoconf tests or pkg-config instead. -- Read PKCS#12 blob as binary file, fixes self-tests under Mingw. -- Fix use of __attribute__ ((deprecated)) to work on non-GCC (#106548). - -* Noteworthy changes in release 1.6 (2008-11-10) [stable] -- Fixed namespace violation for MAX_NAME_SIZE and MAX_ERROR_DESCRIPTION_SIZE. - The new names are ASN1_MAX_NAME_SIZE and ASN1_MAX_ERROR_DESCRIPTION_SIZE. -- Fixed namespace violation for libtasn1_perror and libtasn1_strerror. - The new names are asn1_perror and asn1_strerror. -- Fix namespace violation for LIBASN1_VERSION. - The new name is ASN1_VERSION. -- Decoder can now decode BER encoded octet strings. -- doc: Change license on the manual to GFDLv1.3+. -- doc: Sync gdoc script with GnuTLS, changes license on man-pages to GAP. -- doc: Improve gtk-doc manual. -- Assumes system has strdup and string.h. -- Remove libtasn1-config and libtasn1.m4, - use standard AC_CHECK_FUNCS autoconf tests or pkg-config instead. -- Change detection of when to use a linker version script, - use --enable-ld-version-script or --disable-ld-version-script to - override auto-detection logic. -- API and ABI changes since last version: - asn1_get_length_ber: New function. - ASN1_VERSION: New symbol, replaces LIBTASN1_VERSION. - asn1_strerror: New function, replaces libtasn1_strerror. - asn1_perror: New function, replaces libtasn1_perror. - libtasn1_strerror: Marked as deprecated. - libtasn1_perror: Marked as deprecated. - LIBTASN1_VERSION: Deprecated. - -* Noteworthy changes in release 1.5 (2008-07-29) [stable] -- Update gnulib files. -- Fix memory leaks, from Christian Grothoff . - -* Noteworthy changes in release 1.4 (2008-04-21) [stable] -- Update gnulib files. -- Replace uses of alloca with malloc. - -* Noteworthy changes in release 1.3 (2008-02-01) [stable] -- Handle 'INTEGER { ... } (a..b)' regression. - Revert parts of earlier fix. asn1Parser can now again parse src/pkix.asn1. - The ASN1.c file was generated using Bison 2.3. -- Move examples from src/ to new directory examples/. -- Duplicate copy of divergated pkix.asn removed. -- Merge unnecessary lib/defines.h into lib/int.h. -- Configure no longer tries to use gcc -pipe. -- Update gnulib files. -- Fix mem leak in self-test. - -* Noteworthy changes in release 1.2 (2007-12-10) [stable] -- Update gnulib files. - -* Noteworthy changes in release 1.1 (2007-08-31) [stable] -- Fix bug that made asn1_check_version believe that 1.0 is older than 0.3.10. - -* Noteworthy changes in release 1.0 (2007-08-31) [stable] -- The self-tests, command line tools and build infrastructure have - been re-licensed from GPLv2 to GPLv3. -- Doc fixes. -- Update gnulib files. - -* Noteworthy changes in release 0.3.10 (2007-05-25) -- Update gnulib files. - -* Noteworthy changes in release 0.3.9 (2007-03-02) -- In generated code, config.h is pulled in if HAVE_CONFIG_H. -- Development changes: changed from CVS to GIT as an experiment. - I push my changes to . -- Autoconf 2.61 and automake 1.10 is required. - -* Noteworthy changes in release 0.3.8 (2006-11-16) -- Fix reading of binary files in asn1Decoding, for Windows. - -* Noteworthy changes in release 0.3.7 (2006-10-19) -- When asn1_der_coding encoded a TYPE_NULL and the output buffer is - NULL, it would not increment the counter properly, so the size of - the required buffer would be off by one. Fixed. Reported by - Stephen Wrobleski . -- Fix configure to respect user-definable flags. Reported by "Diego - 'Flameeyes' Pettenò" . -- The --help and --version outputs from the tools have been improved. - -* Noteworthy changes in release 0.3.6 (2006-08-13) -- Fix man pages to use \- instead of - for negative signs (as in "-1"). -- Add -I's when building in src/, so that unistd.h etc is found on - systems that doesn't have them. -- Valgrind isn't used for cross-compilation by default, and there is - also --disable-valgrind-tests to unconditionally disable it. -- Valgrind is invoked without parameters, put things you like into - ~/.valgrindrc instead. - -* Noteworthy changes in release 0.3.5 (2006-06-27) -- Fix asn1_octet_der to handle writes of zero-length buffers, before - it did not write the ASN.1 length for a zero-length buffer. This caused - ASN.1 encodings to be incorrect on 64-bit platforms. -- Add self test that attempt to trigger the above bug. -- Fix test of -Wno-pointer-sign. -- Improve cross-compilation to MinGW by using AC_LIBTOOL_WIN32_DLL. - -* Noteworthy changes in release 0.3.4 (2006-05-10) -- Really fix encodings. -- Add new self test, tests/Test_encoding.c. -- Self tests are ran under valgrind, if it is available. -- We test for the -Wno-pointer-sign parameter before using it. - -* Noteworthy changes in release 0.3.3 (2006-05-07) -- Add some 'const' to prototypes. -- Remove some 'unsigned' keywords. -- Corrected asn1_der_coding() bug introduced when it became reentrant. - Now it produces correct encodings. - -* Noteworthy changes in release 0.3.2 -- Corrected bug in asn1_der_coding() which overwrited some - data in the original structure. -- The asn1Parser, asn1Coding and asn1Decoding programs are now installed. - -* Noteworthy changes in release 0.3.1 -- Support constant size bit strings, as in 'BIT STRING (SIZE(42))'. - Reported by Cyril Holweck . -- Add two more APIs required by GnuTLS. -- New public APIs: - asn1_find_node function - asn1_copy_node - -* Noteworthy changes in release 0.3.0 -- Export DER utility functions, mostly so that GnuTLS can avoid using - libtasn1 internals. -- The _asn1* symbols are not exported in the shared library file (when - using GNU ld). -- The library can now be built using Visual Studio, and the project - files are included in windows/. -- New public APIs: - asn1_get_tag_der - asn1_octet_der - asn1_get_octet_der - asn1_bit_der - asn1_get_bit_der - asn1_get_length_der - asn1_length_der - -* Noteworthy changes in release 0.2.18 -- Fix out-of-bounds access in DER decoding, reported by Evgeny Legerov. -- Add 'const' keyword to some prototypes, thanks to Frediano ZIGLIO. -- Fixed typo in src/Makefile.am to make it build with objdir != srcdir, - thanks to Bernard Leak. -- Update of gnulib files. -- Typo fixes in comments, e.g. finish libasn1 to libtasn1 renaming, - use LGPL boiler plate on some files in lib/. - -* Noteworthy changes in release 0.2.17 -- Fixed typo to make it build. - -* Noteworthy changes in release 0.2.16 -- * Noteworthy changes in release script added again. - -* Noteworthy changes in release 0.2.15 -- Gnulib is used to implement memmove if your system does not have it. -- Simplified assert/error handling slightly. - -* Noteworthy changes in release 0.2.14 -- Some build fixes. -- Pkg-config script 'libtasn1.pc' added. -- Postal address to FSF in license updated. - -* Noteworthy changes in release 0.2.13 -- * Noteworthy changes in release number in libtasn1.h updated properly. - -* Noteworthy changes in release 0.2.12 -- Manual converted to Texinfo format. -- Manual in GTK-DOC and DevHelp formats added. -- Man pages for all functions added. -- Various internal cleanups. - -* Noteworthy changes in release 0.2.11 -- Added the self test with "make check" target -- Added management of ANY type with null length -- Corrected some writes to invalid data. - -* Noteworthy changes in release 0.2.10 -- Added scripts to assist in libtasn1 version detection - from configure scripts. -- Corrected a DER decoding bug which was reported - by Max Vozeler . - -* Noteworthy changes in release 0.2.9 -- Accept negative numbers as range in INTEGER declarations - -* Noteworthy changes in release 0.2.8 -- Add asn1_delete_element function - -* Noteworthy changes in release 0.2.7 -- Added versioned symbols. - -* Noteworthy changes in release 0.2.6 -- ASN.1 parser accepts these kinds of integer definitions: - "INTEGER (5 | 10)" and - "INTEGER (5)" -- Comments start at "--" and finish at the "end of line" or - with another "--". - -* Noteworthy changes in release 0.2.5 -- Bug fix in ordering procedure for SET OF and SEQUENCE OF - types coding. -- Manage structured format (BER encoding) in - asn1_der_decoding, asn1_decoding_element and - asn1_der_decoding_startEnd for OCTET STRING type. -- Manage SEQUENCE and SET empty structure. -- Manage "indefinite length method" in asn1_der_decoding, - asn1_decoding_element and asn1_der_decoding_startEnd - for the following types: - SEQUENCE, SEQUENCE OF, SET, and SET OF. -- Bug fix in asn1_read_value with NULL parameter in case - of BIT STRING - -* Noteworthy changes in release 0.2.4 -- Bug fix in asn1_der_coding with NULL parameter -- Manage DEFAULT option with OBJECT IDENTIFIER - -* Noteworthy changes in release 0.2.3 -- Chenge asn1_find_structure_from_oid prototype -- Chenge asn1_find_structure_from_oid prototype -- Add ASN1_MEM_ALLOC_ERROR return value - -* Noteworthy changes in release 0.2.2 -- Add vector length check in asn1_der_coding function -- Add vector length check in asn1_der_coding function -- Add vector length check in asn1_read_value function -- Add asn1_check_version function - -* Noteworthy changes in release 0.2.1 -- Add asn1_find_structure_from_oid function -- Add asn1_read_tag function - -* Noteworthy changes in release 0.2.0 -- Support for other platforms -- Change asn1_create_element function interface (dest_name not needed any more) -- Change OBJECT IDENTIFIER syntax: numbers must be separated by dot in - asn1_write_element and asn1_read_element functions (e.g. "1.2.3.4") - -* Noteworthy changes in release 0.1.2 -- Added GeneralString type -- Fixed a DER encoding bug when nested tags are used - -* Noteworthy changes in release 0.1.1 -- Renamed to libtasn1 -- Functions which return a string for error description - now accept a NULL argument. -- License is now GNU Lesser GPL - -* Noteworthy changes in release 0.1.0 -- Initial release - ----------------------------------------------------------------------- -Copyright (C) 2002-2014 Free Software Foundation, Inc. -Copying and distribution of this file, with or without modification, -are permitted in any medium without royalty provided the copyright -notice and this notice are preserved. diff --git a/README b/README deleted file mode 100644 index 5dde6cd..0000000 --- a/README +++ /dev/null @@ -1,22 +0,0 @@ -This is GNU Libtasn1, a small ASN.1 library. - -The C library (libtasn1.*) is licensed under the GNU Lesser General -Public License version 2.1 or later. See the file COPYING.LIB. - -The command line tool, self tests, examples, and other auxilliary -files, are licensed under the GNU General Public License version 3.0 -or later. See the file COPYING. - -The manual is in doc/. You can also browse the manual and see updates -about the project on the homepage: - -http://www.gnu.org/software/libtasn1/ - -For any copyright year range specified as YYYY-ZZZZ in this package -note that the range specifies every single year in that closed interval. - ----------------------------------------------------------------------- -Copyright (C) 2002-2014 Free Software Foundation, Inc. -Copying and distribution of this file, with or without modification, -are permitted in any medium without royalty provided the copyright -notice and this notice are preserved. diff --git a/README-alpha b/README-alpha deleted file mode 100644 index 53b8cf7..0000000 --- a/README-alpha +++ /dev/null @@ -1,49 +0,0 @@ -This file contains instructions for developers and advanced users that -wants to build from version controlled sources. - -We require several tools to build the software, including: - -- Make -- Automake -- Autoconf -- Libtool -- Texinfo -- help2man -- Tar -- Gzip -- Texlive & epsf (for PDF manual) -- GTK-DOC (for API manual) -- Git -- Perl -- Valgrind (optional) - -The required software is typically distributed with your operating -system, and the instructions for installing them differ. Here are -some hints: - -gNewSense/Debian/Ubuntu: -sudo apt-get install make git-core autoconf automake libtool -sudo apt-get install texinfo texlive texlive-generic-recommended texlive-extra-utils -sudo apt-get install help2man gtk-doc-tools valgrind - -To download the version controlled sources: - -$ git clone git://git.savannah.gnu.org/libtasn1.git -$ cd libtasn1 - -The next step is to run autoreconf, ./configure, etc: - -$ make bootstrap - -Then build the project normally: - -$ make -$ make check - -Happy hacking! - ----------------------------------------------------------------------- -Copyright (C) 2009-2014 Free Software Foundation, Inc. -Copying and distribution of this file, with or without modification, -are permitted in any medium without royalty provided the copyright -notice and this notice are preserved. diff --git a/README.md b/README.md new file mode 100644 index 0000000..3b81f70 --- /dev/null +++ b/README.md @@ -0,0 +1,7 @@ +Development of libtasn1 [moved to gitlab](https://gitlab.com/gnutls/libtasn1) + +The following commands can be used to get the latest source code: +``` +git clone https://gitlab.com/gnutls/libtasn1.git +git clone git@gitlab.com:gnutls/libtasn1.git +``` \ No newline at end of file diff --git a/THANKS b/THANKS deleted file mode 100644 index f06459c..0000000 --- a/THANKS +++ /dev/null @@ -1,27 +0,0 @@ -Here is a list of people, who helped the Libtasn1 project. - -Nikos Mavroyanopoulos -Simon Josefsson -Martijn Koster -Albert Chin -Bernard Leak -Frediano ZIGLIO -Evgeny Legerov -Cyril Holweck -Stephen Wrobleski -Diego Pettenò -Michele Baldessari -Christian Grothoff -Dagobert Michelsen -David Reiser -Didier Godefroy -Andreas Metzler -Ludovic Courtès -Jeffrey Walton -Matthew Hall - ----------------------------------------------------------------------- -Copyright (C) 2002-2014 Free Software Foundation, Inc. -Copying and distribution of this file, with or without modification, -are permitted in any medium without royalty provided the copyright -notice and this notice are preserved. diff --git a/build-aux/gendocs.sh b/build-aux/gendocs.sh deleted file mode 100755 index 3b71b36..0000000 --- a/build-aux/gendocs.sh +++ /dev/null @@ -1,504 +0,0 @@ -#!/bin/sh -e -# gendocs.sh -- generate a GNU manual in many formats. This script is -# mentioned in maintain.texi. See the help message below for usage details. - -scriptversion=2016-12-31.18 - -# Copyright 2003-2017 Free Software Foundation, Inc. -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . -# -# Original author: Mohit Agarwal. -# Send bug reports and any other correspondence to bug-gnulib@gnu.org. -# -# The latest version of this script, and the companion template, is -# available from the Gnulib repository: -# -# http://git.savannah.gnu.org/cgit/gnulib.git/tree/build-aux/gendocs.sh -# http://git.savannah.gnu.org/cgit/gnulib.git/tree/doc/gendocs_template - -# TODO: -# - image importing was only implemented for HTML generated by -# makeinfo. But it should be simple enough to adjust. -# - images are not imported in the source tarball. All the needed -# formats (PDF, PNG, etc.) should be included. - -prog=`basename "$0"` -srcdir=`pwd` - -scripturl="http://git.savannah.gnu.org/cgit/gnulib.git/plain/build-aux/gendocs.sh" -templateurl="http://git.savannah.gnu.org/cgit/gnulib.git/plain/doc/gendocs_template" - -: ${SETLANG="env LANG= LC_MESSAGES= LC_ALL= LANGUAGE="} -: ${MAKEINFO="makeinfo"} -: ${TEXI2DVI="texi2dvi"} -: ${DOCBOOK2HTML="docbook2html"} -: ${DOCBOOK2PDF="docbook2pdf"} -: ${DOCBOOK2TXT="docbook2txt"} -: ${GENDOCS_TEMPLATE_DIR="."} -: ${PERL='perl'} -: ${TEXI2HTML="texi2html"} -unset CDPATH -unset use_texi2html - -MANUAL_TITLE= -PACKAGE= -EMAIL=webmasters@gnu.org # please override with --email -commonarg= # passed to all makeinfo/texi2html invcations. -dirargs= # passed to all tools (-I dir). -dirs= # -I directories. -htmlarg="--css-ref=/software/gnulib/manual.css -c TOP_NODE_UP_URL=/manual" -infoarg=--no-split -generate_ascii=true -generate_html=true -generate_info=true -generate_tex=true -outdir=manual -source_extra= -split=node -srcfile= -texarg="-t @finalout" - -version="gendocs.sh $scriptversion - -Copyright 2017 Free Software Foundation, Inc. -There is NO warranty. You may redistribute this software -under the terms of the GNU General Public License. -For more information about these matters, see the files named COPYING." - -usage="Usage: $prog [OPTION]... PACKAGE MANUAL-TITLE - -Generate output in various formats from PACKAGE.texinfo (or .texi or -.txi) source. See the GNU Maintainers document for a more extensive -discussion: - http://www.gnu.org/prep/maintain_toc.html - -Options: - --email ADR use ADR as contact in generated web pages; always give this. - - -s SRCFILE read Texinfo from SRCFILE, instead of PACKAGE.{texinfo|texi|txi} - -o OUTDIR write files into OUTDIR, instead of manual/. - -I DIR append DIR to the Texinfo search path. - --common ARG pass ARG in all invocations. - --html ARG pass ARG to makeinfo or texi2html for HTML targets, - instead of '$htmlarg'. - --info ARG pass ARG to makeinfo for Info, instead of --no-split. - --no-ascii skip generating the plain text output. - --no-html skip generating the html output. - --no-info skip generating the info output. - --no-tex skip generating the dvi and pdf output. - --source ARG include ARG in tar archive of sources. - --split HOW make split HTML by node, section, chapter; default node. - --tex ARG pass ARG to texi2dvi for DVI and PDF, instead of -t @finalout. - - --texi2html use texi2html to make HTML target, with all split versions. - --docbook convert through DocBook too (xml, txt, html, pdf). - - --help display this help and exit successfully. - --version display version information and exit successfully. - -Simple example: $prog --email bug-gnu-emacs@gnu.org emacs \"GNU Emacs Manual\" - -Typical sequence: - cd PACKAGESOURCE/doc - wget \"$scripturl\" - wget \"$templateurl\" - $prog --email BUGLIST MANUAL \"GNU MANUAL - One-line description\" - -Output will be in a new subdirectory \"manual\" (by default; -use -o OUTDIR to override). Move all the new files into your web CVS -tree, as explained in the Web Pages node of maintain.texi. - -Please use the --email ADDRESS option so your own bug-reporting -address will be used in the generated HTML pages. - -MANUAL-TITLE is included as part of the HTML of the overall -manual/index.html file. It should include the name of the package being -documented. manual/index.html is created by substitution from the file -$GENDOCS_TEMPLATE_DIR/gendocs_template. (Feel free to modify the -generic template for your own purposes.) - -If you have several manuals, you'll need to run this script several -times with different MANUAL values, specifying a different output -directory with -o each time. Then write (by hand) an overall index.html -with links to them all. - -If a manual's Texinfo sources are spread across several directories, -first copy or symlink all Texinfo sources into a single directory. -(Part of the script's work is to make a tar.gz of the sources.) - -As implied above, by default monolithic Info files are generated. -If you want split Info, or other Info options, use --info to override. - -You can set the environment variables MAKEINFO, TEXI2DVI, TEXI2HTML, -and PERL to control the programs that get executed, and -GENDOCS_TEMPLATE_DIR to control where the gendocs_template file is -looked for. With --docbook, the environment variables DOCBOOK2HTML, -DOCBOOK2PDF, and DOCBOOK2TXT are also consulted. - -By default, makeinfo and texi2dvi are run in the default (English) -locale, since that's the language of most Texinfo manuals. If you -happen to have a non-English manual and non-English web site, see the -SETLANG setting in the source. - -Email bug reports or enhancement requests to bug-gnulib@gnu.org. -" - -while test $# -gt 0; do - case $1 in - -s) shift; srcfile=$1;; - -o) shift; outdir=$1;; - -I) shift; dirargs="$dirargs -I '$1'"; dirs="$dirs $1";; - --common) shift; commonarg=$1;; - --docbook) docbook=yes;; - --email) shift; EMAIL=$1;; - --html) shift; htmlarg=$1;; - --info) shift; infoarg=$1;; - --no-ascii) generate_ascii=false;; - --no-html) generate_ascii=false;; - --no-info) generate_info=false;; - --no-tex) generate_tex=false;; - --source) shift; source_extra=$1;; - --split) shift; split=$1;; - --tex) shift; texarg=$1;; - --texi2html) use_texi2html=1;; - - --help) echo "$usage"; exit 0;; - --version) echo "$version"; exit 0;; - -*) - echo "$0: Unknown option \`$1'." >&2 - echo "$0: Try \`--help' for more information." >&2 - exit 1;; - *) - if test -z "$PACKAGE"; then - PACKAGE=$1 - elif test -z "$MANUAL_TITLE"; then - MANUAL_TITLE=$1 - else - echo "$0: extra non-option argument \`$1'." >&2 - exit 1 - fi;; - esac - shift -done - -# makeinfo uses the dirargs, but texi2dvi doesn't. -commonarg=" $dirargs $commonarg" - -# For most of the following, the base name is just $PACKAGE -base=$PACKAGE - -if test -n "$srcfile"; then - # but here, we use the basename of $srcfile - base=`basename "$srcfile"` - case $base in - *.txi|*.texi|*.texinfo) base=`echo "$base"|sed 's/\.[texinfo]*$//'`;; - esac - PACKAGE=$base -elif test -s "$srcdir/$PACKAGE.texinfo"; then - srcfile=$srcdir/$PACKAGE.texinfo -elif test -s "$srcdir/$PACKAGE.texi"; then - srcfile=$srcdir/$PACKAGE.texi -elif test -s "$srcdir/$PACKAGE.txi"; then - srcfile=$srcdir/$PACKAGE.txi -else - echo "$0: cannot find .texinfo or .texi or .txi for $PACKAGE in $srcdir." >&2 - exit 1 -fi - -if test ! -r $GENDOCS_TEMPLATE_DIR/gendocs_template; then - echo "$0: cannot read $GENDOCS_TEMPLATE_DIR/gendocs_template." >&2 - echo "$0: it is available from $templateurl." >&2 - exit 1 -fi - -# Function to return size of $1 in something resembling kilobytes. -calcsize() -{ - size=`ls -ksl $1 | awk '{print $1}'` - echo $size -} - -# copy_images OUTDIR HTML-FILE... -# ------------------------------- -# Copy all the images needed by the HTML-FILEs into OUTDIR. -# Look for them in . and the -I directories; this is simpler than what -# makeinfo supports with -I, but hopefully it will suffice. -copy_images() -{ - local odir - odir=$1 - shift - $PERL -n -e " -BEGIN { - \$me = '$prog'; - \$odir = '$odir'; - @dirs = qw(. $dirs); -} -" -e ' -/<img src="(.*?)"/g && ++$need{$1}; - -END { - #print "$me: @{[keys %need]}\n"; # for debugging, show images found. - FILE: for my $f (keys %need) { - for my $d (@dirs) { - if (-f "$d/$f") { - use File::Basename; - my $dest = dirname ("$odir/$f"); - # - use File::Path; - -d $dest || mkpath ($dest) - || die "$me: cannot mkdir $dest: $!\n"; - # - use File::Copy; - copy ("$d/$f", $dest) - || die "$me: cannot copy $d/$f to $dest: $!\n"; - next FILE; - } - } - die "$me: $ARGV: cannot find image $f\n"; - } -} -' -- "$@" || exit 1 -} - -case $outdir in - /*) abs_outdir=$outdir;; - *) abs_outdir=$srcdir/$outdir;; -esac - -echo "Making output for $srcfile" -echo " in `pwd`" -mkdir -p "$outdir/" - -# -if $generate_info; then - cmd="$SETLANG $MAKEINFO -o $PACKAGE.info $commonarg $infoarg \"$srcfile\"" - echo "Generating info... ($cmd)" - rm -f $PACKAGE.info* # get rid of any strays - eval "$cmd" - tar czf "$outdir/$PACKAGE.info.tar.gz" $PACKAGE.info* - ls -l "$outdir/$PACKAGE.info.tar.gz" - info_tgz_size=`calcsize "$outdir/$PACKAGE.info.tar.gz"` - # do not mv the info files, there's no point in having them available - # separately on the web. -fi # end info - -# -if $generate_tex; then - cmd="$SETLANG $TEXI2DVI $dirargs $texarg \"$srcfile\"" - printf "\nGenerating dvi... ($cmd)\n" - eval "$cmd" - # compress/finish dvi: - gzip -f -9 $PACKAGE.dvi - dvi_gz_size=`calcsize $PACKAGE.dvi.gz` - mv $PACKAGE.dvi.gz "$outdir/" - ls -l "$outdir/$PACKAGE.dvi.gz" - - cmd="$SETLANG $TEXI2DVI --pdf $dirargs $texarg \"$srcfile\"" - printf "\nGenerating pdf... ($cmd)\n" - eval "$cmd" - pdf_size=`calcsize $PACKAGE.pdf` - mv $PACKAGE.pdf "$outdir/" - ls -l "$outdir/$PACKAGE.pdf" -fi # end tex (dvi + pdf) - -# -if $generate_ascii; then - opt="-o $PACKAGE.txt --no-split --no-headers $commonarg" - cmd="$SETLANG $MAKEINFO $opt \"$srcfile\"" - printf "\nGenerating ascii... ($cmd)\n" - eval "$cmd" - ascii_size=`calcsize $PACKAGE.txt` - gzip -f -9 -c $PACKAGE.txt >"$outdir/$PACKAGE.txt.gz" - ascii_gz_size=`calcsize "$outdir/$PACKAGE.txt.gz"` - mv $PACKAGE.txt "$outdir/" - ls -l "$outdir/$PACKAGE.txt" "$outdir/$PACKAGE.txt.gz" -fi - -# - -if $generate_html; then -# Split HTML at level $1. Used for texi2html. -html_split() -{ - opt="--split=$1 --node-files $commonarg $htmlarg" - cmd="$SETLANG $TEXI2HTML --output $PACKAGE.html $opt \"$srcfile\"" - printf "\nGenerating html by $1... ($cmd)\n" - eval "$cmd" - split_html_dir=$PACKAGE.html - ( - cd ${split_html_dir} || exit 1 - ln -sf ${PACKAGE}.html index.html - tar -czf "$abs_outdir/${PACKAGE}.html_$1.tar.gz" -- *.html - ) - eval html_$1_tgz_size=`calcsize "$outdir/${PACKAGE}.html_$1.tar.gz"` - rm -f "$outdir"/html_$1/*.html - mkdir -p "$outdir/html_$1/" - mv ${split_html_dir}/*.html "$outdir/html_$1/" - rmdir ${split_html_dir} -} - -if test -z "$use_texi2html"; then - opt="--no-split --html -o $PACKAGE.html $commonarg $htmlarg" - cmd="$SETLANG $MAKEINFO $opt \"$srcfile\"" - printf "\nGenerating monolithic html... ($cmd)\n" - rm -rf $PACKAGE.html # in case a directory is left over - eval "$cmd" - html_mono_size=`calcsize $PACKAGE.html` - gzip -f -9 -c $PACKAGE.html >"$outdir/$PACKAGE.html.gz" - html_mono_gz_size=`calcsize "$outdir/$PACKAGE.html.gz"` - copy_images "$outdir/" $PACKAGE.html - mv $PACKAGE.html "$outdir/" - ls -l "$outdir/$PACKAGE.html" "$outdir/$PACKAGE.html.gz" - - # Before Texinfo 5.0, makeinfo did not accept a --split=HOW option, - # it just always split by node. So if we're splitting by node anyway, - # leave it out. - if test "x$split" = xnode; then - split_arg= - else - split_arg=--split=$split - fi - # - opt="--html -o $PACKAGE.html $split_arg $commonarg $htmlarg" - cmd="$SETLANG $MAKEINFO $opt \"$srcfile\"" - printf "\nGenerating html by $split... ($cmd)\n" - eval "$cmd" - split_html_dir=$PACKAGE.html - copy_images $split_html_dir/ $split_html_dir/*.html - ( - cd $split_html_dir || exit 1 - tar -czf "$abs_outdir/$PACKAGE.html_$split.tar.gz" -- * - ) - eval \ - html_${split}_tgz_size=`calcsize "$outdir/$PACKAGE.html_$split.tar.gz"` - rm -rf "$outdir/html_$split/" - mv $split_html_dir "$outdir/html_$split/" - du -s "$outdir/html_$split/" - ls -l "$outdir/$PACKAGE.html_$split.tar.gz" - -else # use texi2html: - opt="--output $PACKAGE.html $commonarg $htmlarg" - cmd="$SETLANG $TEXI2HTML $opt \"$srcfile\"" - printf "\nGenerating monolithic html with texi2html... ($cmd)\n" - rm -rf $PACKAGE.html # in case a directory is left over - eval "$cmd" - html_mono_size=`calcsize $PACKAGE.html` - gzip -f -9 -c $PACKAGE.html >"$outdir/$PACKAGE.html.gz" - html_mono_gz_size=`calcsize "$outdir/$PACKAGE.html.gz"` - mv $PACKAGE.html "$outdir/" - - html_split node - html_split chapter - html_split section -fi -fi # end html - -# -printf "\nMaking .tar.gz for sources...\n" -d=`dirname $srcfile` -( - cd "$d" - srcfiles=`ls -d *.texinfo *.texi *.txi *.eps $source_extra 2>/dev/null` || true - tar czfh "$abs_outdir/$PACKAGE.texi.tar.gz" $srcfiles - ls -l "$abs_outdir/$PACKAGE.texi.tar.gz" -) -texi_tgz_size=`calcsize "$outdir/$PACKAGE.texi.tar.gz"` - -# -# Do everything again through docbook. -if test -n "$docbook"; then - opt="-o - --docbook $commonarg" - cmd="$SETLANG $MAKEINFO $opt \"$srcfile\" >${srcdir}/$PACKAGE-db.xml" - printf "\nGenerating docbook XML... ($cmd)\n" - eval "$cmd" - docbook_xml_size=`calcsize $PACKAGE-db.xml` - gzip -f -9 -c $PACKAGE-db.xml >"$outdir/$PACKAGE-db.xml.gz" - docbook_xml_gz_size=`calcsize "$outdir/$PACKAGE-db.xml.gz"` - mv $PACKAGE-db.xml "$outdir/" - - split_html_db_dir=html_node_db - opt="$commonarg -o $split_html_db_dir" - cmd="$DOCBOOK2HTML $opt \"${outdir}/$PACKAGE-db.xml\"" - printf "\nGenerating docbook HTML... ($cmd)\n" - eval "$cmd" - ( - cd ${split_html_db_dir} || exit 1 - tar -czf "$abs_outdir/${PACKAGE}.html_node_db.tar.gz" -- *.html - ) - html_node_db_tgz_size=`calcsize "$outdir/${PACKAGE}.html_node_db.tar.gz"` - rm -f "$outdir"/html_node_db/*.html - mkdir -p "$outdir/html_node_db" - mv ${split_html_db_dir}/*.html "$outdir/html_node_db/" - rmdir ${split_html_db_dir} - - cmd="$DOCBOOK2TXT \"${outdir}/$PACKAGE-db.xml\"" - printf "\nGenerating docbook ASCII... ($cmd)\n" - eval "$cmd" - docbook_ascii_size=`calcsize $PACKAGE-db.txt` - mv $PACKAGE-db.txt "$outdir/" - - cmd="$DOCBOOK2PDF \"${outdir}/$PACKAGE-db.xml\"" - printf "\nGenerating docbook PDF... ($cmd)\n" - eval "$cmd" - docbook_pdf_size=`calcsize $PACKAGE-db.pdf` - mv $PACKAGE-db.pdf "$outdir/" -fi - -# -printf "\nMaking index.html for $PACKAGE...\n" -if test -z "$use_texi2html"; then - CONDS="/%%IF *HTML_SECTION%%/,/%%ENDIF *HTML_SECTION%%/d;\ - /%%IF *HTML_CHAPTER%%/,/%%ENDIF *HTML_CHAPTER%%/d" -else - # should take account of --split here. - CONDS="/%%ENDIF.*%%/d;/%%IF *HTML_SECTION%%/d;/%%IF *HTML_CHAPTER%%/d" -fi - -curdate=`$SETLANG date '+%B %d, %Y'` -sed \ - -e "s!%%TITLE%%!$MANUAL_TITLE!g" \ - -e "s!%%EMAIL%%!$EMAIL!g" \ - -e "s!%%PACKAGE%%!$PACKAGE!g" \ - -e "s!%%DATE%%!$curdate!g" \ - -e "s!%%HTML_MONO_SIZE%%!$html_mono_size!g" \ - -e "s!%%HTML_MONO_GZ_SIZE%%!$html_mono_gz_size!g" \ - -e "s!%%HTML_NODE_TGZ_SIZE%%!$html_node_tgz_size!g" \ - -e "s!%%HTML_SECTION_TGZ_SIZE%%!$html_section_tgz_size!g" \ - -e "s!%%HTML_CHAPTER_TGZ_SIZE%%!$html_chapter_tgz_size!g" \ - -e "s!%%INFO_TGZ_SIZE%%!$info_tgz_size!g" \ - -e "s!%%DVI_GZ_SIZE%%!$dvi_gz_size!g" \ - -e "s!%%PDF_SIZE%%!$pdf_size!g" \ - -e "s!%%ASCII_SIZE%%!$ascii_size!g" \ - -e "s!%%ASCII_GZ_SIZE%%!$ascii_gz_size!g" \ - -e "s!%%TEXI_TGZ_SIZE%%!$texi_tgz_size!g" \ - -e "s!%%DOCBOOK_HTML_NODE_TGZ_SIZE%%!$html_node_db_tgz_size!g" \ - -e "s!%%DOCBOOK_ASCII_SIZE%%!$docbook_ascii_size!g" \ - -e "s!%%DOCBOOK_PDF_SIZE%%!$docbook_pdf_size!g" \ - -e "s!%%DOCBOOK_XML_SIZE%%!$docbook_xml_size!g" \ - -e "s!%%DOCBOOK_XML_GZ_SIZE%%!$docbook_xml_gz_size!g" \ - -e "s,%%SCRIPTURL%%,$scripturl,g" \ - -e "s!%%SCRIPTNAME%%!$prog!g" \ - -e "$CONDS" \ -$GENDOCS_TEMPLATE_DIR/gendocs_template >"$outdir/index.html" - -echo "Done, see $outdir/ subdirectory for new files." - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" -# End: diff --git a/build-aux/gnupload b/build-aux/gnupload deleted file mode 100755 index d4d95ee..0000000 --- a/build-aux/gnupload +++ /dev/null @@ -1,440 +0,0 @@ -#!/bin/sh -# Sign files and upload them. - -scriptversion=2016-01-11.22; # UTC - -# Copyright (C) 2004-2017 Free Software Foundation, Inc. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. - -# Originally written by Alexandre Duret-Lutz <adl@gnu.org>. -# The master copy of this file is maintained in the gnulib Git repository. -# Please send bug reports and feature requests to bug-gnulib@gnu.org. - -set -e - -GPG='gpg --batch --no-tty' -conffile=.gnuploadrc -to= -dry_run=false -replace= -symlink_files= -delete_files= -delete_symlinks= -collect_var= -dbg= -nl=' -' - -usage="Usage: $0 [OPTION]... [CMD] FILE... [[CMD] FILE...] - -Sign all FILES, and process them at the destinations specified with --to. -If CMD is not given, it defaults to uploading. See examples below. - -Commands: - --delete delete FILES from destination - --symlink create symbolic links - --rmsymlink remove symbolic links - -- treat the remaining arguments as files to upload - -Options: - --to DEST specify a destination DEST for FILES - (multiple --to options are allowed) - --user NAME sign with key NAME - --replace allow replacements of existing files - --symlink-regex[=EXPR] use sed script EXPR to compute symbolic link names - --dry-run do nothing, show what would have been done - (including the constructed directive file) - --version output version information and exit - --help print this help text and exit - -If --symlink-regex is given without EXPR, then the link target name -is created by replacing the version information with '-latest', e.g.: - foo-1.3.4.tar.gz -> foo-latest.tar.gz - -Recognized destinations are: - alpha.gnu.org:DIRECTORY - savannah.gnu.org:DIRECTORY - savannah.nongnu.org:DIRECTORY - ftp.gnu.org:DIRECTORY - build directive files and upload files by FTP - download.gnu.org.ua:{alpha|ftp}/DIRECTORY - build directive files and upload files by SFTP - [user@]host:DIRECTORY upload files with scp - -Options and commands are applied in order. If the file $conffile exists -in the current working directory, its contents are prepended to the -actual command line options. Use this to keep your defaults. Comments -(#) and empty lines in $conffile are allowed. - -<http://www.gnu.org/prep/maintain/html_node/Automated-FTP-Uploads.html> -gives some further background. - -Examples: -1. Upload foobar-1.0.tar.gz to ftp.gnu.org: - gnupload --to ftp.gnu.org:foobar foobar-1.0.tar.gz - -2. Upload foobar-1.0.tar.gz and foobar-1.0.tar.xz to ftp.gnu.org: - gnupload --to ftp.gnu.org:foobar foobar-1.0.tar.gz foobar-1.0.tar.xz - -3. Same as above, and also create symbolic links to foobar-latest.tar.*: - gnupload --to ftp.gnu.org:foobar \\ - --symlink-regex \\ - foobar-1.0.tar.gz foobar-1.0.tar.xz - -4. Upload foobar-0.9.90.tar.gz to two sites: - gnupload --to alpha.gnu.org:foobar \\ - --to sources.redhat.com:~ftp/pub/foobar \\ - foobar-0.9.90.tar.gz - -5. Delete oopsbar-0.9.91.tar.gz and upload foobar-0.9.91.tar.gz - (the -- terminates the list of files to delete): - gnupload --to alpha.gnu.org:foobar \\ - --to sources.redhat.com:~ftp/pub/foobar \\ - --delete oopsbar-0.9.91.tar.gz \\ - -- foobar-0.9.91.tar.gz - -gnupload executes a program ncftpput to do the transfers; if you don't -happen to have an ncftp package installed, the ncftpput-ftp script in -the build-aux/ directory of the gnulib package -(http://savannah.gnu.org/projects/gnulib) may serve as a replacement. - -Send patches and bug reports to <bug-gnulib@gnu.org>." - -# Read local configuration file -if test -r "$conffile"; then - echo "$0: Reading configuration file $conffile" - conf=`sed 's/#.*$//;/^$/d' "$conffile" | tr "\015$nl" ' '` - eval set x "$conf \"\$@\"" - shift -fi - -while test -n "$1"; do - case $1 in - -*) - collect_var= - case $1 in - --help) - echo "$usage" - exit $? - ;; - --to) - if test -z "$2"; then - echo "$0: Missing argument for --to" 1>&2 - exit 1 - elif echo "$2" | grep 'ftp-upload\.gnu\.org' >/dev/null; then - echo "$0: Use ftp.gnu.org:PKGNAME or alpha.gnu.org:PKGNAME" >&2 - echo "$0: for the destination, not ftp-upload.gnu.org (which" >&2 - echo "$0: is used for direct ftp uploads, not with gnupload)." >&2 - echo "$0: See --help and its examples if need be." >&2 - exit 1 - else - to="$to $2" - shift - fi - ;; - --user) - if test -z "$2"; then - echo "$0: Missing argument for --user" 1>&2 - exit 1 - else - GPG="$GPG --local-user $2" - shift - fi - ;; - --delete) - collect_var=delete_files - ;; - --replace) - replace="replace: true" - ;; - --rmsymlink) - collect_var=delete_symlinks - ;; - --symlink-regex=*) - symlink_expr=`expr "$1" : '[^=]*=\(.*\)'` - ;; - --symlink-regex) - symlink_expr='s|-[0-9][0-9\.]*\(-[0-9][0-9]*\)\{0,1\}\.|-latest.|' - ;; - --symlink) - collect_var=symlink_files - ;; - --dry-run|-n) - dry_run=: - ;; - --version) - echo "gnupload $scriptversion" - exit $? - ;; - --) - shift - break - ;; - -*) - echo "$0: Unknown option '$1', try '$0 --help'" 1>&2 - exit 1 - ;; - esac - ;; - *) - if test -z "$collect_var"; then - break - else - eval "$collect_var=\"\$$collect_var $1\"" - fi - ;; - esac - shift -done - -dprint() -{ - echo "Running $* ..." -} - -if $dry_run; then - dbg=dprint -fi - -if test -z "$to"; then - echo "$0: Missing destination sites" >&2 - exit 1 -fi - -if test -n "$symlink_files"; then - x=`echo "$symlink_files" | sed 's/[^ ]//g;s/ //g'` - if test -n "$x"; then - echo "$0: Odd number of symlink arguments" >&2 - exit 1 - fi -fi - -if test $# = 0; then - if test -z "${symlink_files}${delete_files}${delete_symlinks}"; then - echo "$0: No file to upload" 1>&2 - exit 1 - fi -else - # Make sure all files exist. We don't want to ask - # for the passphrase if the script will fail. - for file - do - if test ! -f $file; then - echo "$0: Cannot find '$file'" 1>&2 - exit 1 - elif test -n "$symlink_expr"; then - linkname=`echo $file | sed "$symlink_expr"` - if test -z "$linkname"; then - echo "$0: symlink expression produces empty results" >&2 - exit 1 - elif test "$linkname" = $file; then - echo "$0: symlink expression does not alter file name" >&2 - exit 1 - fi - fi - done -fi - -# Make sure passphrase is not exported in the environment. -unset passphrase -unset passphrase_fd_0 -GNUPGHOME=${GNUPGHOME:-$HOME/.gnupg} - -# Reset PATH to be sure that echo is a built-in. We will later use -# 'echo $passphrase' to output the passphrase, so it is important that -# it is a built-in (third-party programs tend to appear in 'ps' -# listings with their arguments...). -# Remember this script runs with 'set -e', so if echo is not built-in -# it will exit now. -if $dry_run || grep -q "^use-agent" $GNUPGHOME/gpg.conf; then :; else - PATH=/empty echo -n "Enter GPG passphrase: " - stty -echo - read -r passphrase - stty echo - echo - passphrase_fd_0="--passphrase-fd 0" -fi - -if test $# -ne 0; then - for file - do - echo "Signing $file ..." - rm -f $file.sig - echo "$passphrase" | $dbg $GPG $passphrase_fd_0 -ba -o $file.sig $file - done -fi - - -# mkdirective DESTDIR BASE FILE STMT -# Arguments: See upload, below -mkdirective () -{ - stmt="$4" - if test -n "$3"; then - stmt=" -filename: $3$stmt" - fi - - cat >${2}.directive<<EOF -version: 1.2 -directory: $1 -comment: gnupload v. $scriptversion$stmt -EOF - if $dry_run; then - echo "File ${2}.directive:" - cat ${2}.directive - echo "File ${2}.directive:" | sed 's/./-/g' - fi -} - -mksymlink () -{ - while test $# -ne 0 - do - echo "symlink: $1 $2" - shift - shift - done -} - -# upload DEST DESTDIR BASE FILE STMT FILES -# Arguments: -# DEST Destination site; -# DESTDIR Destination directory; -# BASE Base name for the directive file; -# FILE Name of the file to distribute (may be empty); -# STMT Additional statements for the directive file; -# FILES List of files to upload. -upload () -{ - dest=$1 - destdir=$2 - base=$3 - file=$4 - stmt=$5 - files=$6 - - rm -f $base.directive $base.directive.asc - case $dest in - alpha.gnu.org:*) - mkdirective "$destdir" "$base" "$file" "$stmt" - echo "$passphrase" | $dbg $GPG $passphrase_fd_0 --clearsign $base.directive - $dbg ncftpput ftp-upload.gnu.org /incoming/alpha $files $base.directive.asc - ;; - ftp.gnu.org:*) - mkdirective "$destdir" "$base" "$file" "$stmt" - echo "$passphrase" | $dbg $GPG $passphrase_fd_0 --clearsign $base.directive - $dbg ncftpput ftp-upload.gnu.org /incoming/ftp $files $base.directive.asc - ;; - savannah.gnu.org:*) - if test -z "$files"; then - echo "$0: warning: standalone directives not applicable for $dest" >&2 - fi - $dbg ncftpput savannah.gnu.org /incoming/savannah/$destdir $files - ;; - savannah.nongnu.org:*) - if test -z "$files"; then - echo "$0: warning: standalone directives not applicable for $dest" >&2 - fi - $dbg ncftpput savannah.nongnu.org /incoming/savannah/$destdir $files - ;; - download.gnu.org.ua:alpha/*|download.gnu.org.ua:ftp/*) - destdir_p1=`echo "$destdir" | sed 's,^[^/]*/,,'` - destdir_topdir=`echo "$destdir" | sed 's,/.*,,'` - mkdirective "$destdir_p1" "$base" "$file" "$stmt" - echo "$passphrase" | $dbg $GPG $passphrase_fd_0 --clearsign $base.directive - for f in $files $base.directive.asc - do - echo put $f - done | $dbg sftp -b - puszcza.gnu.org.ua:/incoming/$destdir_topdir - ;; - /*) - dest_host=`echo "$dest" | sed 's,:.*,,'` - mkdirective "$destdir" "$base" "$file" "$stmt" - echo "$passphrase" | $dbg $GPG $passphrase_fd_0 --clearsign $base.directive - $dbg cp $files $base.directive.asc $dest_host - ;; - *) - if test -z "$files"; then - echo "$0: warning: standalone directives not applicable for $dest" >&2 - fi - $dbg scp $files $dest - ;; - esac - rm -f $base.directive $base.directive.asc -} - -##### -# Process any standalone directives -stmt= -if test -n "$symlink_files"; then - stmt="$stmt -`mksymlink $symlink_files`" -fi - -for file in $delete_files -do - stmt="$stmt -archive: $file" -done - -for file in $delete_symlinks -do - stmt="$stmt -rmsymlink: $file" -done - -if test -n "$stmt"; then - for dest in $to - do - destdir=`echo $dest | sed 's/[^:]*://'` - upload "$dest" "$destdir" "`hostname`-$$" "" "$stmt" - done -fi - -# Process actual uploads -for dest in $to -do - for file - do - echo "Uploading $file to $dest ..." - stmt= - # - # allowing file replacement is all or nothing. - if test -n "$replace"; then stmt="$stmt -$replace" - fi - # - files="$file $file.sig" - destdir=`echo $dest | sed 's/[^:]*://'` - if test -n "$symlink_expr"; then - linkname=`echo $file | sed "$symlink_expr"` - stmt="$stmt -symlink: $file $linkname -symlink: $file.sig $linkname.sig" - fi - upload "$dest" "$destdir" "$file" "$file" "$stmt" "$files" - done -done - -exit 0 - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC0" -# time-stamp-end: "; # UTC" -# End: diff --git a/build-aux/pmccabe.css b/build-aux/pmccabe.css deleted file mode 100644 index a10ee35..0000000 --- a/build-aux/pmccabe.css +++ /dev/null @@ -1,159 +0,0 @@ -body { - font-family: Helvetica, sans-serif; -} - -.page_title { - font: 18pt Georgia, serif; - color: darkred; -} - -.section_title { - font: 14pt Georgia, serif; - color: darkred; -} - -.report_timestamp { - color: darkred; - font-weight: bold; -} - -.function_src { - text-align: left; - background: white; -} - -.resume_table { -} - -.resume_header_entry { - color: black; -} - -.resume_number_entry { - color: darkred; - font-weight: bold; - text-align: right; -} - -.ranges_table { - border-spacing: 0px; - border-bottom: solid 2px black; - border-top: solid 2px black; - border-left: solid 2px black; - border-right: solid 2px black; -} - -.ranges_header_entry { - padding: 5px; - border-bottom: solid 1px black; - font-size: 1em; - font-weight: bold; - color: darkred; - text-align: left; -} - -.ranges_entry { -} - -.ranges_entry_simple { - background: #87ff75; -} - -.ranges_entry_moderate { - background: #fffc60; -} - -.ranges_entry_high { - background: #ff5a5d; -} - -.ranges_entry_untestable { - background: #993300 -} - - -.function_table { - border-spacing: 0px; - border-bottom: solid 2px black; - border-top: solid 2px black; - border-left: solid 2px black; - border-right: solid 2px black; -} - -.function_table_caption { - font-size: 1.1em; - font-weight: bold; - color: black; - padding: 5px; -} - -.function_table_header { -} - - -.function_table_header_entry { - padding: 5px; - border-bottom: solid 1px black; - font-size: 1em; - font-weight: bold; - color: darkred; - text-align: left; -} - -.function_entry { -} - - -.function_entry_simple { - background: #87ff75; -} - -.function_entry_moderate { - background: #fffc60; -} - -.function_entry_high { - background: #ff5a5d; -} - -.function_entry_untestable { - background: #993300 -} - - -.function_entry_name { - font-size: 1em; - text-align: left; - font-weight: bold; - text-valign: top; - - border-top: solid 1px black; - padding: 3px; -} - -.function_entry_cyclo { - font-size: 1em; - text-align: right; - text-valign: top; - - border-top: solid 1px black; - padding: 3px; -} - -.function_entry_number { - font-size: 1em; - text-align: right; - text-valign: top; - - border-top: solid 1px black; - padding: 3px; -} - -.function_entry_filename { - font-size: 1em; - text-align: left; - text-valign: top; - - border-top: solid 1px black; - padding: 3px; -} diff --git a/build-aux/pmccabe2html b/build-aux/pmccabe2html deleted file mode 100644 index 19e8097..0000000 --- a/build-aux/pmccabe2html +++ /dev/null @@ -1,911 +0,0 @@ -# pmccabe2html - AWK script to convert pmccabe output to html -*- awk -*- - -# Copyright (C) 2007-2017 Free Software Foundation, Inc. - -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. - -# Written by Jose E. Marchesi <jemarch@gnu.org>. -# Adapted for gnulib by Simon Josefsson <simon@josefsson.org>. -# Added support for C++ by Giuseppe Scrivano <gscrivano@gnu.org>. - -# Typical Invocation is from a Makefile.am: -# -# CYCLO_SOURCES = ${top_srcdir}/src/*.[ch] -# -# cyclo-$(PACKAGE).html: $(CYCLO_SOURCES) -# $(PMCCABE) $(CYCLO_SOURCES) \ -# | sort -nr \ -# | $(AWK) -f ${top_srcdir}/build-aux/pmccabe2html \ -# -v lang=html -v name="$(PACKAGE_NAME)" \ -# -v vcurl="http://git.savannah.gnu.org/gitweb/?p=$(PACKAGE).git;a=blob;f=%FILENAME%;hb=HEAD" \ -# -v url="http://www.gnu.org/software/$(PACKAGE)/" \ -# -v css=${top_srcdir}/build-aux/pmccabe.css \ -# -v cut_dir=${top_srcdir}/ \ -# > $@-tmp -# mv $@-tmp $@ -# -# The variables available are: -# lang output language, either 'html' or 'wiki' -# name project name -# url link to project's home page -# vcurl URL to version controlled source code browser, -# a %FILENAME% in the string is replaced with the relative -# source filename -# css CSS stylesheet filename, included verbatim in HTML output -# css_url link to CSS stylesheet, an URL - -# Prologue & configuration -BEGIN { - # Portable lookup of present time. - "date +%s" | getline epoch_time - "date" | getline chronos_time - - section_global_stats_p = 1 - section_function_cyclo_p = 1 - - # "html" or "wiki" - package_name = name - output_lang = lang - - # General Options - cyclo_simple_max = 10 - cyclo_moderate_max = 20 - cyclo_high_max = 50 - source_file_link_tmpl = vcurl - - # HTML options - if (url != "") - { - html_prolog = "<a href=\"" url "\">Back to " package_name " Homepage</a><br/><br/>" - } - html_epilog = "<hr color=\"black\" size=\"2\"/> \ -Copyright (c) 2007, 2008 Free Software Foundation, Inc." - html_doctype = "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \ -\"http://www.w3.org/TR/html401/loose.dtd\">" - html_comment = "<!-- Generated by gnulib's pmccabe2html at " epoch_time " -->" - html_title = "Cyclomatic Complexity report for " package_name - - # Wiki options - wiki_prolog = "{{Note|This page has been automatically generated}}" - wiki_epilog = "" - - # Internal variables - nfuncs = 0; -} - -# Functions - -function build_stats() -{ - # Maximum modified cyclo - for (fcn in mcyclo) - { - num_of_functions++ - if (mcyclo[fcn] > max_mcyclo) - { - max_mcyclo = mcyclo[fcn] - } - - if (mcyclo[fcn] > cyclo_high_max) - { - num_of_untestable_functions++ - } - else if (mcyclo[fcn] > cyclo_moderate_max) - { - num_of_high_functions++ - } - else if (mcyclo[fcn] > cyclo_simple_max) - { - num_of_moderate_functions++ - } - else - { - num_of_simple_functions++ - } - } -} - -function html_fnc_table_complete (caption) -{ - html_fnc_table(caption, 1, 1, 0, 1, 1, 0, 1) -} - -function html_fnc_table_abbrev (caption) -{ - html_fnc_table(caption, 1, 1, 0, 0, 1, 0, 0) -} - - -function html_fnc_table (caption, - fname_p, - mcyclo_p, - cyclo_p, - num_statements_p, - num_lines_p, - first_line_p, - file_p) -{ - print "<table width=\"90%\" class=\"function_table\" cellpadding=\"0\" cellspacing=\"0\">" - if (caption != "") - { - print "<caption class=\"function_table_caption\">" caption "</caption>" - } - html_fnc_header(fname_p, - mcyclo_p, - cyclo_p, - num_statements_p, - num_lines_p, - first_line_p, - file_p) - for (nfnc = 1; nfnc <= nfuncs; nfnc++) - { - html_fnc(nfnc, - fname_p, - mcyclo_p, - cyclo_p, - num_statements_p, - num_lines_p, - first_line_p, - file_p) - } - print "</table>" -} - -function html_header () -{ - print html_doctype - print "<html>" - print html_comment - print "<head>" - print "<title>" html_title "" - print "" - print "" - print "" - print "" - print "" - print "" - print "" - print "" - - - if (css_url != "") - { - print "" - } - if (css != "") - { - print "" - close(css) - } - print "" - print "" -} - -function html_footer () -{ - print "" - print "" -} - -function html_fnc_header (fname_p, - mcyclo_p, - cyclo_p, - num_statements_p, - num_lines_p, - first_line_p, - file_p) -{ - print "" - if (fname_p) - { - # Function name - print "" - print "" - print "" - - print "" - print "Function Name" - print "" - } - if (mcyclo_p) - { - # Modified cyclo - print "" - print "Modified Cyclo" - print "" - } - if (cyclo_p) - { - # Cyclo - print "" - print "Cyclomatic" - print "
" - print "Complexity" - print "" - } - if (num_statements_p) - { - print "" - print "Number of" - print "
" - print "Statements" - print "" - } - if (num_lines_p) - { - print "" - print "Number of" - print "
" - print "Lines" - print "" - } - if (first_line_p) - { - print "" - print "First Line" - print "" - } - if (file_p) - { - print "" - print "Source File" - print "" - - } - print "" -} - -function html_fnc (nfun, - fname_p, - mcyclo_p, - cyclo_p, - num_statements_p, - num_lines_p, - first_line_p, - file_p) -{ - fname = fnames[nfun] - - # Function name - trclass = "function_entry_simple" - if (mcyclo[nfun] > cyclo_high_max) - { - trclass="function_entry_untestable" - } - else if (mcyclo[nfun] > cyclo_moderate_max) - { - trclass="function_entry_high" - } - else if (mcyclo[nfun] > cyclo_simple_max) - { - trclass="function_entry_moderate" - } - - print "" - if (fname_p) - { - print "" - if (file_p && mcyclo[nfun] > cyclo_simple_max) - { - print "\ -" - } - else - { - print " " - } - print "" - - print "" - print fname - print "" - } - if (mcyclo_p) - { - # Modified cyclo - print "" - print mcyclo[nfun] - print "" - } - if (cyclo_p) - { - # Cyclo - print "" - print cyclo[nfun] - print "" - } - if (num_statements_p) - { - # Number of statements - print "" - print num_statements[nfun] - print "" - } - if (num_lines_p) - { - # Number of lines - print "" - print num_lines[nfun] - print "" - } - if (first_line_p) - { - # First line - print "" - print first_line[nfun] - print "" - } - if (file_p) - { - href = "" - if (source_file_link_tmpl != "") - { - # Get href target - href = source_file_link_tmpl - sub(/%FILENAME%/, file[nfun], href) - } - - # Source file - print "" - if (href != "") - { - print "" file[nfun] "" - } - else - { - print file[nfun] - } - - print "" - - - print "" - - if (mcyclo[nfun] > cyclo_simple_max) - { - print "" - - num_columns = 1; - if (fname_p) { num_columns++ } - if (mcyclo_p) { num_columns++ } - if (cyclo_p) { num_columns++ } - if (num_statements_p) { num_columns++ } - if (num_lines_p) { num_columns++ } - if (first_line_p) { num_columns++ } - if (file_p) { num_columns++ } - - print "" - print "
" - print "
"
-
-            while ((getline codeline < (fname nfun "_fn.txt")) > 0)
-            {
-                gsub(/&/, "\\&", codeline)	# Must come first.
-                gsub(//, "\\>", codeline)
-
-                print codeline
-            }
-            close(fname nfun "_fn.txt")
-            system("rm " "'" fname "'" nfun "_fn.txt")
-            print "
" - print "
" - print "" - print "" - } - - } -} - -function html_global_stats () -{ - print "
Summary
" - - print "" - # Total number of functions - print "" - print "" - print "" - print "" - # Number of simple functions - print "" - print "" - print "" - print "" - # Number of moderate functions - print "" - print "" - print "" - print "" - # Number of high functions - print "" - print "" - print "" - print "" - # Number of untestable functions - print "" - print "" - print "" - print "" - print "
" - print "Total number of functions" - print "" - print num_of_functions - print "
" - print "Number of low risk functions" - print "" - print num_of_simple_functions - print "
" - print "Number of moderate risk functions" - print "" - print num_of_moderate_functions - print "
" - print "Number of high risk functions" - print "" - print num_of_high_functions - print "
" - print "Number of untestable functions" - print "" - print num_of_untestable_functions - print "
" - print "
" -} - -function html_function_cyclo () -{ - print "
Details for all functions
" - - print "" - print "" - print "" - print "" - print "" - print "" - # Simple - print "" - print "" - print "" - print "" - print "" - # Moderate - print "" - print "" - print "" - print "" - print "" - # High - print "" - print "" - print "" - print "" - print "" - # Untestable - print "" - print "" - print "" - print "" - print "" - print "
" - print " " - print "" - print "Cyclomatic Complexity" - print "" - print "Risk Evaluation" - print "
" - print " " - print "" - print "0 - " cyclo_simple_max - print "" - print "Simple module, without much risk" - print "
" - print " " - print "" - print cyclo_simple_max + 1 " - " cyclo_moderate_max - print "" - print "More complex module, moderate risk" - print "
" - print " " - print "" - print cyclo_moderate_max + 1 " - " cyclo_high_max - print "" - print "Complex module, high risk" - print "
" - print " " - print "" - print "greater than " cyclo_high_max - print "" - print "Untestable module, very high risk" - print "
" - print "
" - html_fnc_table_complete("") -} - -function wiki_global_stats () -{ - print "{| class=\"cyclo_summary_table\"" - # Total number of functions - print "|-" - print "| class=\"cyclo_summary_header_entry\" | Total number of functions" - print "| class=\"cyclo_summary_number_entry\" |" num_of_functions - # Number of simple functions - print "|-" - print "| class=\"cyclo_summary_header_entry\" | Number of low risk functions" - print "| class=\"cyclo_summary_number_entry\" |" num_of_simple_functions - # Number of moderate functions - print "|-" - print "| class=\"cyclo_summary_header_entry\" | Number of moderate risk functions" - print "| class=\"cyclo_summary_number_entry\" |" num_of_moderate_functions - # Number of high functions - print "|-" - print "| class=\"cyclo_summary_header_entry\" | Number of high risk functions" - print "| class=\"cyclo_summary_number_entry\" |" num_of_high_functions - # Number of untestable functions - print "|-" - print "| class=\"cyclo_summary_header_entry\" | Number of untestable functions" - print "| class=\"cyclo_summary_number_entry\" |" num_of_untestable_functions - print "|}" -} - -function wiki_function_cyclo () -{ - print "==Details for all functions==" - - print "Used ranges:" - - print "{| class =\"cyclo_ranges_table\"" - print "|-" - print "| class=\"cyclo_ranges_header_entry\" | " - print "| class=\"cyclo_ranges_header_entry\" | Cyclomatic Complexity" - print "| class=\"cyclo_ranges_header_entry\" | Risk Evaluation" - # Simple - print "|-" - print "| class=\"cyclo_ranges_entry_simple\" | " - print "| class=\"cyclo_ranges_entry\" | 0 - " cyclo_simple_max - print "| class=\"cyclo_ranges_entry\" | Simple module, without much risk" - # Moderate - print "|-" - print "| class=\"cyclo_ranges_entry_moderate\" | " - print "| class=\"cyclo_ranges_entry\" |" cyclo_simple_max + 1 " - " cyclo_moderate_max - print "| class=\"cyclo_ranges_entry\" | More complex module, moderate risk" - # High - print "|-" - print "| class=\"cyclo_ranges_entry_high\" | " - print "| class=\"cyclo_ranges_entry\" |" cyclo_moderate_max + 1 " - " cyclo_high_max - print "| class=\"cyclo_ranges_entry\" | Complex module, high risk" - # Untestable - print "|-" - print "| class=\"cyclo_ranges_entry_untestable\" | " - print "| class=\"cyclo_ranges_entry\" | greater than " cyclo_high_max - print "| class=\"cyclo_ranges_entry\" | Untestable module, very high risk" - print "|}" - - print "" - print "" - wiki_fnc_table_complete("") -} - -function wiki_fnc_table_complete (caption) -{ - wiki_fnc_table(caption, 1, 1, 0, 1, 1, 0, 1) -} - -function wiki_fnc_table_abbrev (caption) -{ - wiki_fnc_table(caption, 1, 0, 0, 0, 0, 0, 0) -} - -function wiki_fnc_table (caption, - fname_p, - mcyclo_p, - cyclo_p, - num_statements_p, - num_lines_p, - first_line_p, - file_p) -{ - print "{| width=\"90%\" class=\"cyclo_function_table\" cellpadding=\"0\" cellspacing=\"0\">" - if (caption != "") - { - print "|+" caption - } - wiki_fnc_header(fname_p, - mcyclo_p, - cyclo_p, - num_statements_p, - num_lines_p, - first_line_p, - file_p) - for (nfnc = 1; nfnc <= nfuncs; nfnc++) - { - wiki_fnc(nfnc, - fname_p, - mcyclo_p, - cyclo_p, - num_statements_p, - num_lines_p, - first_line_p, - file_p) - } - print "|}" -} - -function wiki_fnc_header (fname_p, - mcyclo_p, - cyclo_p, - num_statements_p, - num_lines_p, - first_line_p, - file_p) -{ - if (fname_p) - { - # Function name - print "! class=\"cyclo_function_table_header_entry\" | Function Name" - } - if (mcyclo_p) - { - # Modified cyclo - print "! class=\"cyclo_function_table_header_entry\" | Modified Cyclo" - } - if (cyclo_p) - { - # Cyclo - print "! class=\"cyclo_function_table_header_entry\" | Cyclomatic Complexity" - } - if (num_statements_p) - { - print "! class=\"cyclo_function_table_header_entry\" | Number of Statements" - } - if (num_lines_p) - { - print "! class=\"cyclo_function_table_header_entry\" | Number of Lines" - } - if (first_line_p) - { - print "! class=\"cyclo_function_table_header_entry\" | First Line" - } - if (file_p) - { - print "! class=\"cyclo_function_table_header_entry\" | Source File" - } -} - -function wiki_fnc (nfnc, - fname_p, - mcyclo_p, - cyclo_p, - num_statements_p, - num_lines_p, - first_line_p, - file_p) -{ - fname = fnames[nfnc] - - # Function name - trclass = "cyclo_function_entry_simple" - if (mcyclo[nfnc] > cyclo_high_max) - { - trclass="cyclo_function_entry_untestable" - } - else if (mcyclo[nfnc] > cyclo_moderate_max) - { - trclass="cyclo_function_entry_high" - } - else if (mcyclo[nfnc] > cyclo_simple_max) - { - trclass="cyclo_function_entry_moderate" - } - - print "|- class=\"" trclass "\"" - if (fname_p) - { - print "| class=\"cyclo_function_entry_name\" |" fname - } - if (mcyclo_p) - { - # Modified cyclo - print "| class=\"cyclo_function_entry_cyclo\" |" mcyclo[nfnc] - } - if (cyclo_p) - { - # Cyclo - print "| class=\"cyclo_function_entry_cyclo\" |" cyclo[nfnc] - } - if (num_statements_p) - { - # Number of statements - print "| class=\"cyclo_function_entry_number\" |" num_statements[nfnc] - } - if (num_lines_p) - { - # Number of lines - print "| class=\"cyclo_function_entry_number\" |" num_lines[nfnc] - } - if (first_line_p) - { - # First line - print "| class=\"cyclo_function_entry_number\" |" first_line[nfnc] - } - if (file_p) - { - href = "" - if (source_file_link_tmpl != "") - { - # Get href target - href = source_file_link_tmpl - sub(/%FILENAME%/, file[nfnc], href) - } - - # Source file - print "| class=\"cyclo_function_entry_filename\" |" \ - ((href != "") ? "[" href " " file[nfnc] "]" : "[" file[nfnc] "]") - } -} - -# Scan data from a line -{ - function_name = $7 - - nfuncs++; - fnames[nfuncs] = function_name - mcyclo[nfuncs] = $1 - cyclo[nfuncs] = $2 - num_statements[nfuncs] = $3 - first_line[nfuncs] = $4 - num_lines[nfuncs] = $5 - - # Build the filename from the file_spec ($6) - begin_util_path = index($6, cut_dir) - tmpfilename = substr($6, begin_util_path + length(cut_dir)) - sub(/\([0-9]+\):/, "", tmpfilename) - file[nfuncs] = tmpfilename - - if (mcyclo[nfuncs] > cyclo_simple_max) - { - # Extract function contents to a fn_txt file - filepath = $6 - - sub(/\([0-9]+\):/, "", filepath) - num_line = 0 - - while ((getline codeline < filepath) > 0) - { - num_line++; - if ((num_line >= first_line[nfuncs]) && - (num_line < first_line[nfuncs] + num_lines[nfuncs])) - { - print codeline > (function_name nfuncs "_fn.txt") - } - } - close (function_name nfuncs "_fn.txt") - close(filepath) - } - - # Initial values for statistics variables - num_of_functions = 0 - max_mcyclo = 0 - max_function_length = 0 - num_of_simple_functions = 0 - num_of_moderate_functions = 0 - num_of_high_functions = 0 - num_of_untestable_functions = 0 -} - -# Epilogue -END { - # Print header (only for html) - if (output_lang == "html") - { - html_header() - } - - # Print prolog - if ((output_lang == "html") && - (html_prolog != "")) - { - print html_prolog - } - if ((output_lang == "wiki") && - (wiki_prolog != "")) - { - print wiki_prolog - } - - if (output_lang == "html") - { - print "
" package_name " Cyclomatic Complexity Report
" - print "

Report generated at: " chronos_time "

" - } - if (output_lang == "wiki") - { - print "==" package_name " Cyclomatic Complexity Report==" - print "Report generated at: '''" chronos_time "'''" - } - - if (section_global_stats_p) - { - build_stats() - - if (output_lang == "html") - { - html_global_stats() - } - if (output_lang == "wiki") - { - wiki_global_stats() - } - } - if (section_function_cyclo_p) - { - if (output_lang == "html") - { - html_function_cyclo() - } - if (output_lang == "wiki") - { - wiki_function_cyclo() - } - } - - # Print epilog - if ((output_lang == "html") && - (html_epilog != "")) - { - print html_epilog - } - if ((output_lang == "wiki") && - (wiki_epilog != "")) - { - print wiki_epilog - } - - # Print footer (html only) - if (output_lang == "html") - { - html_footer() - } -} - -# End of pmccabe2html diff --git a/build-aux/snippet/_Noreturn.h b/build-aux/snippet/_Noreturn.h deleted file mode 100644 index c44ad89..0000000 --- a/build-aux/snippet/_Noreturn.h +++ /dev/null @@ -1,10 +0,0 @@ -#if !defined _Noreturn && __STDC_VERSION__ < 201112 -# if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \ - || 0x5110 <= __SUNPRO_C) -# define _Noreturn __attribute__ ((__noreturn__)) -# elif 1200 <= _MSC_VER -# define _Noreturn __declspec (noreturn) -# else -# define _Noreturn -# endif -#endif diff --git a/build-aux/snippet/arg-nonnull.h b/build-aux/snippet/arg-nonnull.h deleted file mode 100644 index 1e62cc8..0000000 --- a/build-aux/snippet/arg-nonnull.h +++ /dev/null @@ -1,26 +0,0 @@ -/* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2017 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools - that the values passed as arguments n, ..., m must be non-NULL pointers. - n = 1 stands for the first argument, n = 2 for the second argument etc. */ -#ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 -# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) -# else -# define _GL_ARG_NONNULL(params) -# endif -#endif diff --git a/build-aux/snippet/c++defs.h b/build-aux/snippet/c++defs.h deleted file mode 100644 index f03f359..0000000 --- a/build-aux/snippet/c++defs.h +++ /dev/null @@ -1,316 +0,0 @@ -/* C++ compatible function declaration macros. - Copyright (C) 2010-2017 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#ifndef _GL_CXXDEFS_H -#define _GL_CXXDEFS_H - -/* Begin/end the GNULIB_NAMESPACE namespace. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE { -# define _GL_END_NAMESPACE } -#else -# define _GL_BEGIN_NAMESPACE -# define _GL_END_NAMESPACE -#endif - -/* The three most frequent use cases of these macros are: - - * For providing a substitute for a function that is missing on some - platforms, but is declared and works fine on the platforms on which - it exists: - - #if @GNULIB_FOO@ - # if !@HAVE_FOO@ - _GL_FUNCDECL_SYS (foo, ...); - # endif - _GL_CXXALIAS_SYS (foo, ...); - _GL_CXXALIASWARN (foo); - #elif defined GNULIB_POSIXCHECK - ... - #endif - - * For providing a replacement for a function that exists on all platforms, - but is broken/insufficient and needs to be replaced on some platforms: - - #if @GNULIB_FOO@ - # if @REPLACE_FOO@ - # if !(defined __cplusplus && defined GNULIB_NAMESPACE) - # undef foo - # define foo rpl_foo - # endif - _GL_FUNCDECL_RPL (foo, ...); - _GL_CXXALIAS_RPL (foo, ...); - # else - _GL_CXXALIAS_SYS (foo, ...); - # endif - _GL_CXXALIASWARN (foo); - #elif defined GNULIB_POSIXCHECK - ... - #endif - - * For providing a replacement for a function that exists on some platforms - but is broken/insufficient and needs to be replaced on some of them and - is additionally either missing or undeclared on some other platforms: - - #if @GNULIB_FOO@ - # if @REPLACE_FOO@ - # if !(defined __cplusplus && defined GNULIB_NAMESPACE) - # undef foo - # define foo rpl_foo - # endif - _GL_FUNCDECL_RPL (foo, ...); - _GL_CXXALIAS_RPL (foo, ...); - # else - # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@ - _GL_FUNCDECL_SYS (foo, ...); - # endif - _GL_CXXALIAS_SYS (foo, ...); - # endif - _GL_CXXALIASWARN (foo); - #elif defined GNULIB_POSIXCHECK - ... - #endif -*/ - -/* _GL_EXTERN_C declaration; - performs the declaration with C linkage. */ -#if defined __cplusplus -# define _GL_EXTERN_C extern "C" -#else -# define _GL_EXTERN_C extern -#endif - -/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes); - declares a replacement function, named rpl_func, with the given prototype, - consisting of return type, parameters, and attributes. - Example: - _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) - _GL_ARG_NONNULL ((1))); - */ -#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ - _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) -#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ - _GL_EXTERN_C rettype rpl_func parameters_and_attributes - -/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes); - declares the system function, named func, with the given prototype, - consisting of return type, parameters, and attributes. - Example: - _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...) - _GL_ARG_NONNULL ((1))); - */ -#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ - _GL_EXTERN_C rettype func parameters_and_attributes - -/* _GL_CXXALIAS_RPL (func, rettype, parameters); - declares a C++ alias called GNULIB_NAMESPACE::func - that redirects to rpl_func, if GNULIB_NAMESPACE is defined. - Example: - _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); - - Wrapping rpl_func in an object with an inline conversion operator - avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is - actually used in the program. */ -#define _GL_CXXALIAS_RPL(func,rettype,parameters) \ - _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return ::rpl_func; \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); - is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); - except that the C function rpl_func may have a slightly different - declaration. A cast is used to silence the "invalid conversion" error - that would otherwise occur. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return reinterpret_cast(::rpl_func); \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_SYS (func, rettype, parameters); - declares a C++ alias called GNULIB_NAMESPACE::func - that redirects to the system provided function func, if GNULIB_NAMESPACE - is defined. - Example: - _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); - - Wrapping func in an object with an inline conversion operator - avoids a reference to func unless GNULIB_NAMESPACE::func is - actually used in the program. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return ::func; \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters); - is like _GL_CXXALIAS_SYS (func, rettype, parameters); - except that the C function func may have a slightly different declaration. - A cast is used to silence the "invalid conversion" error that would - otherwise occur. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return reinterpret_cast(::func); \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2); - is like _GL_CXXALIAS_SYS (func, rettype, parameters); - except that the C function is picked among a set of overloaded functions, - namely the one with rettype2 and parameters2. Two consecutive casts - are used to silence the "cannot find a match" and "invalid conversion" - errors that would otherwise occur. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE - /* The outer cast must be a reinterpret_cast. - The inner cast: When the function is defined as a set of overloaded - functions, it works as a static_cast<>, choosing the designated variant. - When the function is defined as a single variant, it works as a - reinterpret_cast<>. The parenthesized cast syntax works both ways. */ -# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return reinterpret_cast((rettype2 (*) parameters2)(::func)); \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIASWARN (func); - causes a warning to be emitted when ::func is used but not when - GNULIB_NAMESPACE::func is used. func must be defined without overloaded - variants. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIASWARN(func) \ - _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) -# define _GL_CXXALIASWARN_1(func,namespace) \ - _GL_CXXALIASWARN_2 (func, namespace) -/* To work around GCC bug , - we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ -# define _GL_CXXALIASWARN_2(func,namespace) \ - _GL_WARN_ON_USE (func, \ - "The symbol ::" #func " refers to the system function. " \ - "Use " #namespace "::" #func " instead.") -# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -# define _GL_CXXALIASWARN_2(func,namespace) \ - extern __typeof__ (func) func -# else -# define _GL_CXXALIASWARN_2(func,namespace) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -# endif -#else -# define _GL_CXXALIASWARN(func) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes); - causes a warning to be emitted when the given overloaded variant of ::func - is used but not when GNULIB_NAMESPACE::func is used. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ - _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ - GNULIB_NAMESPACE) -# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ - _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) -/* To work around GCC bug , - we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ -# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ - "The symbol ::" #func " refers to the system function. " \ - "Use " #namespace "::" #func " instead.") -# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - extern __typeof__ (func) func -# else -# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -# endif -#else -# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -#endif /* _GL_CXXDEFS_H */ diff --git a/build-aux/snippet/warn-on-use.h b/build-aux/snippet/warn-on-use.h deleted file mode 100644 index 3c0eb57..0000000 --- a/build-aux/snippet/warn-on-use.h +++ /dev/null @@ -1,109 +0,0 @@ -/* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2017 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* _GL_WARN_ON_USE (function, "literal string") issues a declaration - for FUNCTION which will then trigger a compiler warning containing - the text of "literal string" anywhere that function is called, if - supported by the compiler. If the compiler does not support this - feature, the macro expands to an unused extern declaration. - - This macro is useful for marking a function as a potential - portability trap, with the intent that "literal string" include - instructions on the replacement function that should be used - instead. However, one of the reasons that a function is a - portability trap is if it has the wrong signature. Declaring - FUNCTION with a different signature in C is a compilation error, so - this macro must use the same type as any existing declaration so - that programs that avoid the problematic FUNCTION do not fail to - compile merely because they included a header that poisoned the - function. But this implies that _GL_WARN_ON_USE is only safe to - use if FUNCTION is known to already have a declaration. Use of - this macro implies that there must not be any other macro hiding - the declaration of FUNCTION; but undefining FUNCTION first is part - of the poisoning process anyway (although for symbols that are - provided only via a macro, the result is a compilation error rather - than a warning containing "literal string"). Also note that in - C++, it is only safe to use if FUNCTION has no overloads. - - For an example, it is possible to poison 'getline' by: - - adding a call to gl_WARN_ON_USE_PREPARE([[#include ]], - [getline]) in configure.ac, which potentially defines - HAVE_RAW_DECL_GETLINE - - adding this code to a header that wraps the system : - #undef getline - #if HAVE_RAW_DECL_GETLINE - _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but" - "not universally present; use the gnulib module getline"); - #endif - - It is not possible to directly poison global variables. But it is - possible to write a wrapper accessor function, and poison that - (less common usage, like &environ, will cause a compilation error - rather than issue the nice warning, but the end result of informing - the developer about their portability problem is still achieved): - #if HAVE_RAW_DECL_ENVIRON - static char ***rpl_environ (void) { return &environ; } - _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); - # undef environ - # define environ (*rpl_environ ()) - #endif - */ -#ifndef _GL_WARN_ON_USE - -# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -/* A compiler attribute is available in gcc versions 4.3.0 and later. */ -# define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) -# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -/* Verify the existence of the function. */ -# define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function -# else /* Unsupported. */ -# define _GL_WARN_ON_USE(function, message) \ -_GL_WARN_EXTERN_C int _gl_warn_on_use -# endif -#endif - -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that the function is - declared with the given prototype, consisting of return type, parameters, - and attributes. - This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does - not work in this case. */ -#ifndef _GL_WARN_ON_USE_CXX -# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) -# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -/* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes -# else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -_GL_WARN_EXTERN_C int _gl_warn_on_use -# endif -#endif - -/* _GL_WARN_EXTERN_C declaration; - performs the declaration with C linkage. */ -#ifndef _GL_WARN_EXTERN_C -# if defined __cplusplus -# define _GL_WARN_EXTERN_C extern "C" -# else -# define _GL_WARN_EXTERN_C extern -# endif -#endif diff --git a/build-aux/update-copyright b/build-aux/update-copyright deleted file mode 100755 index 2d20d21..0000000 --- a/build-aux/update-copyright +++ /dev/null @@ -1,274 +0,0 @@ -eval '(exit $?0)' && eval 'exec perl -wS -0777 -pi "$0" "$@"' - & eval 'exec perl -wS -0777 -pi "$0" $argv:q' - if 0; -# Update an FSF copyright year list to include the current year. - -my $VERSION = '2016-01-12.23:13'; # UTC - -# Copyright (C) 2009-2017 Free Software Foundation, Inc. -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# Written by Jim Meyering and Joel E. Denny - -# The arguments to this script should be names of files that contain -# copyright statements to be updated. The copyright holder's name -# defaults to "Free Software Foundation, Inc." but may be changed to -# any other name by using the "UPDATE_COPYRIGHT_HOLDER" environment -# variable. -# -# For example, you might wish to use the update-copyright target rule -# in maint.mk from gnulib's maintainer-makefile module. -# -# Iff a copyright statement is recognized in a file and the final -# year is not the current year, then the statement is updated for the -# new year and it is reformatted to: -# -# 1. Fit within 72 columns. -# 2. Convert 2-digit years to 4-digit years by prepending "19". -# 3. Expand copyright year intervals. (See "Environment variables" -# below.) -# -# A warning is printed for every file for which no copyright -# statement is recognized. -# -# Each file's copyright statement must be formatted correctly in -# order to be recognized. For example, each of these is fine: -# -# Copyright @copyright{} 1990-2005, 2007-2009 Free Software -# Foundation, Inc. -# -# # Copyright (C) 1990-2005, 2007-2009 Free Software -# # Foundation, Inc. -# -# /* -# * Copyright © 90,2005,2007-2009 -# * Free Software Foundation, Inc. -# */ -# -# However, the following format is not recognized because the line -# prefix changes after the first line: -# -# ## Copyright (C) 1990-2005, 2007-2009 Free Software -# # Foundation, Inc. -# -# However, any correctly formatted copyright statement following -# a non-matching copyright statements would be recognized. -# -# The exact conditions that a file's copyright statement must meet -# to be recognized are: -# -# 1. It is the first copyright statement that meets all of the -# following conditions. Subsequent copyright statements are -# ignored. -# 2. Its format is "Copyright (C)", then a list of copyright years, -# and then the name of the copyright holder. -# 3. The "(C)" takes one of the following forms or is omitted -# entirely: -# -# A. (C) -# B. (c) -# C. @copyright{} -# D. © -# -# 4. The "Copyright" appears at the beginning of a line, except that it -# may be prefixed by any sequence (e.g., a comment) of no more than -# 5 characters -- including white space. -# 5. Iff such a prefix is present, the same prefix appears at the -# beginning of each remaining line within the FSF copyright -# statement. There is one exception in order to support C-style -# comments: if the first line's prefix contains nothing but -# whitespace surrounding a "/*", then the prefix for all subsequent -# lines is the same as the first line's prefix except with each of -# "/" and possibly "*" replaced by a " ". The replacement of "*" -# by " " is consistent throughout all subsequent lines. -# 6. Blank lines, even if preceded by the prefix, do not appear -# within the FSF copyright statement. -# 7. Each copyright year is 2 or 4 digits, and years are separated by -# commas or dashes. Whitespace may appear after commas. -# -# Environment variables: -# -# 1. If UPDATE_COPYRIGHT_FORCE=1, a recognized FSF copyright statement -# is reformatted even if it does not need updating for the new -# year. If unset or set to 0, only updated FSF copyright -# statements are reformatted. -# 2. If UPDATE_COPYRIGHT_USE_INTERVALS=1, every series of consecutive -# copyright years (such as 90, 1991, 1992-2007, 2008) in a -# reformatted FSF copyright statement is collapsed to a single -# interval (such as 1990-2008). If unset or set to 0, all existing -# copyright year intervals in a reformatted FSF copyright statement -# are expanded instead. -# If UPDATE_COPYRIGHT_USE_INTERVALS=2, convert a sequence with gaps -# to the minimal containing range. For example, convert -# 2000, 2004-2007, 2009 to 2000-2009. -# 3. For testing purposes, you can set the assumed current year in -# UPDATE_COPYRIGHT_YEAR. -# 4. The default maximum line length for a copyright line is 72. -# Set UPDATE_COPYRIGHT_MAX_LINE_LENGTH to use a different length. -# 5. Set UPDATE_COPYRIGHT_HOLDER if the copyright holder is other -# than "Free Software Foundation, Inc.". - -use strict; -use warnings; - -my $copyright_re = 'Copyright'; -my $circle_c_re = '(?:\([cC]\)|@copyright\{}|\\\\\(co|©)'; -my $holder = $ENV{UPDATE_COPYRIGHT_HOLDER}; -$holder ||= 'Free Software Foundation, Inc.'; -my $prefix_max = 5; -my $margin = $ENV{UPDATE_COPYRIGHT_MAX_LINE_LENGTH}; -!$margin || $margin !~ m/^\d+$/ - and $margin = 72; - -my $tab_width = 8; - -my $this_year = $ENV{UPDATE_COPYRIGHT_YEAR}; -if (!$this_year || $this_year !~ m/^\d{4}$/) - { - my ($sec, $min, $hour, $mday, $month, $year) = localtime (time ()); - $this_year = $year + 1900; - } - -# Unless the file consistently uses "\r\n" as the EOL, use "\n" instead. -my $eol = /(?:^|[^\r])\n/ ? "\n" : "\r\n"; - -my $leading; -my $prefix; -my $ws_re; -my $stmt_re; -while (/(^|\n)(.{0,$prefix_max})$copyright_re/g) - { - $leading = "$1$2"; - $prefix = $2; - if ($prefix =~ /^(\s*\/)\*(\s*)$/) - { - $prefix =~ s,/, ,; - my $prefix_ws = $prefix; - $prefix_ws =~ s/\*/ /; # Only whitespace. - if (/\G(?:[^*\n]|\*[^\/\n])*\*?\n$prefix_ws/) - { - $prefix = $prefix_ws; - } - } - $ws_re = '[ \t\r\f]'; # \s without \n - $ws_re = - "(?:$ws_re*(?:$ws_re|\\n" . quotemeta($prefix) . ")$ws_re*)"; - my $holder_re = $holder; - $holder_re =~ s/\s/$ws_re/g; - my $stmt_remainder_re = - "(?:$ws_re$circle_c_re)?" - . "$ws_re(?:(?:\\d\\d)?\\d\\d(?:,$ws_re?|-))*" - . "((?:\\d\\d)?\\d\\d)$ws_re$holder_re"; - if (/\G$stmt_remainder_re/) - { - $stmt_re = - quotemeta($leading) . "($copyright_re$stmt_remainder_re)"; - last; - } - } -if (defined $stmt_re) - { - /$stmt_re/ or die; # Should never die. - my $stmt = $1; - my $final_year_orig = $2; - - # Handle two-digit year numbers like "98" and "99". - my $final_year = $final_year_orig; - $final_year <= 99 - and $final_year += 1900; - - if ($final_year != $this_year) - { - # Update the year. - $stmt =~ s/\b$final_year_orig\b/$final_year, $this_year/; - } - if ($final_year != $this_year || $ENV{'UPDATE_COPYRIGHT_FORCE'}) - { - # Normalize all whitespace including newline-prefix sequences. - $stmt =~ s/$ws_re/ /g; - - # Put spaces after commas. - $stmt =~ s/, ?/, /g; - - # Convert 2-digit to 4-digit years. - $stmt =~ s/(\b\d\d\b)/19$1/g; - - # Make the use of intervals consistent. - if (!$ENV{UPDATE_COPYRIGHT_USE_INTERVALS}) - { - $stmt =~ s/(\d{4})-(\d{4})/join(', ', $1..$2)/eg; - } - else - { - $stmt =~ - s/ - (\d{4}) - (?: - (,\ |-) - ((??{ - if ($2 eq '-') { '\d{4}'; } - elsif (!$3) { $1 + 1; } - else { $3 + 1; } - })) - )+ - /$1-$3/gx; - - # When it's 2, emit a single range encompassing all year numbers. - $ENV{UPDATE_COPYRIGHT_USE_INTERVALS} == 2 - and $stmt =~ s/\b(\d{4})\b.*\b(\d{4})\b/$1-$2/; - } - - # Format within margin. - my $stmt_wrapped; - my $text_margin = $margin - length($prefix); - if ($prefix =~ /^(\t+)/) - { - $text_margin -= length($1) * ($tab_width - 1); - } - while (length $stmt) - { - if (($stmt =~ s/^(.{1,$text_margin})(?: |$)//) - || ($stmt =~ s/^([\S]+)(?: |$)//)) - { - my $line = $1; - $stmt_wrapped .= $stmt_wrapped ? "$eol$prefix" : $leading; - $stmt_wrapped .= $line; - } - else - { - # Should be unreachable, but we don't want an infinite - # loop if it can be reached. - die; - } - } - - # Replace the old copyright statement. - s/$stmt_re/$stmt_wrapped/; - } - } -else - { - print STDERR "$ARGV: warning: copyright statement not found\n"; - } - -# Local variables: -# mode: perl -# indent-tabs-mode: nil -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "my $VERSION = '" -# time-stamp-format: "%:y-%02m-%02d.%02H:%02M" -# time-stamp-time-zone: "UTC0" -# time-stamp-end: "'; # UTC" -# End: diff --git a/build-aux/useless-if-before-free b/build-aux/useless-if-before-free deleted file mode 100755 index 4e3f3a2..0000000 --- a/build-aux/useless-if-before-free +++ /dev/null @@ -1,210 +0,0 @@ -eval '(exit $?0)' && eval 'exec perl -wST "$0" "$@"' - & eval 'exec perl -wST "$0" $argv:q' - if 0; -# Detect instances of "if (p) free (p);". -# Likewise "if (p != 0)", "if (0 != p)", or with NULL; and with braces. - -my $VERSION = '2016-08-01 17:47'; # UTC -# The definition above must lie within the first 8 lines in order -# for the Emacs time-stamp write hook (at end) to update it. -# If you change this file with Emacs, please let the write hook -# do its job. Otherwise, update this string manually. - -# Copyright (C) 2008-2017 Free Software Foundation, Inc. - -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# Written by Jim Meyering - -use strict; -use warnings; -use Getopt::Long; - -(my $ME = $0) =~ s|.*/||; - -# use File::Coda; # http://meyering.net/code/Coda/ -END { - defined fileno STDOUT or return; - close STDOUT and return; - warn "$ME: failed to close standard output: $!\n"; - $? ||= 1; -} - -sub usage ($) -{ - my ($exit_code) = @_; - my $STREAM = ($exit_code == 0 ? *STDOUT : *STDERR); - if ($exit_code != 0) - { - print $STREAM "Try '$ME --help' for more information.\n"; - } - else - { - print $STREAM < sub { usage 0 }, - version => sub { print "$ME version $VERSION\n"; exit }, - list => \$list, - 'name=s@' => \@name, - ) or usage 1; - - # Make sure we have the right number of non-option arguments. - # Always tell the user why we fail. - @ARGV < 1 - and (warn "$ME: missing FILE argument\n"), usage EXIT_ERROR; - - my $or = join '|', @name; - my $regexp = qr/(?:$or)/; - - # Set the input record separator. - # Note: this makes it impractical to print line numbers. - $/ = '"'; - - my $found_match = 0; - FILE: - foreach my $file (@ARGV) - { - open FH, '<', $file - or (warn "$ME: can't open '$file' for reading: $!\n"), - $err = EXIT_ERROR, next; - while (defined (my $line = )) - { - # Skip non-matching lines early to save time - $line =~ /\bif\b/ - or next; - while ($line =~ - /\b(if\s*\(\s*([^)]+?)(?:\s*!=\s*([^)]+?))?\s*\) - # 1 2 3 - (?: \s*$regexp\s*\((?:\s*\([^)]+\))?\s*([^)]+)\)\s*;| - \s*\{\s*$regexp\s*\((?:\s*\([^)]+\))?\s*([^)]+)\)\s*;\s*\}))/sxg) - { - my $all = $1; - my ($lhs, $rhs) = ($2, $3); - my ($free_opnd, $braced_free_opnd) = ($4, $5); - my $non_NULL; - if (!defined $rhs) { $non_NULL = $lhs } - elsif (is_NULL $rhs) { $non_NULL = $lhs } - elsif (is_NULL $lhs) { $non_NULL = $rhs } - else { next } - - # Compare the non-NULL part of the "if" expression and the - # free'd expression, without regard to white space. - $non_NULL =~ tr/ \t//d; - my $e2 = defined $free_opnd ? $free_opnd : $braced_free_opnd; - $e2 =~ tr/ \t//d; - if ($non_NULL eq $e2) - { - $found_match = 1; - $list - and (print "$file\0"), next FILE; - print "$file: $all\n"; - } - } - } - } - continue - { - close FH; - } - - $found_match && $err == EXIT_NO_MATCH - and $err = EXIT_MATCH; - - exit $err; -} - -my $foo = <<'EOF'; -# The above is to *find* them. -# This adjusts them, removing the unnecessary "if (p)" part. - -# FIXME: do something like this as an option (doesn't do braces): -free=xfree -git grep -l -z "$free *(" \ - | xargs -0 useless-if-before-free -l --name="$free" \ - | xargs -0 perl -0x3b -pi -e \ - 's/\bif\s*\(\s*(\S+?)(?:\s*!=\s*(?:0|NULL))?\s*\)\s+('"$free"'\s*\((?:\s*\([^)]+\))?\s*\1\s*\)\s*;)/$2/s' - -# Use the following to remove redundant uses of kfree inside braces. -# Note that -0777 puts perl in slurp-whole-file mode; -# but we have plenty of memory, these days... -free=kfree -git grep -l -z "$free *(" \ - | xargs -0 useless-if-before-free -l --name="$free" \ - | xargs -0 perl -0777 -pi -e \ - 's/\bif\s*\(\s*(\S+?)(?:\s*!=\s*(?:0|NULL))?\s*\)\s*\{\s*('"$free"'\s*\((?:\s*\([^)]+\))?\s*\1\s*\);)\s*\}[^\n]*$/$2/gms' - -Be careful that the result of the above transformation is valid. -If the matched string is followed by "else", then obviously, it won't be. - -When modifying files, refuse to process anything other than a regular file. -EOF - -## Local Variables: -## mode: perl -## indent-tabs-mode: nil -## eval: (add-hook 'write-file-hooks 'time-stamp) -## time-stamp-start: "my $VERSION = '" -## time-stamp-format: "%:y-%02m-%02d %02H:%02M" -## time-stamp-time-zone: "UTC0" -## time-stamp-end: "'; # UTC" -## End: diff --git a/build-aux/vc-list-files b/build-aux/vc-list-files deleted file mode 100755 index 2d17eaf..0000000 --- a/build-aux/vc-list-files +++ /dev/null @@ -1,113 +0,0 @@ -#!/bin/sh -# List version-controlled file names. - -# Print a version string. -scriptversion=2016-01-11.22; # UTC - -# Copyright (C) 2006-2017 Free Software Foundation, Inc. - -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - - -# List the specified version-controlled files. -# With no argument, list them all. With a single DIRECTORY argument, -# list the version-controlled files in that directory. - -# If there's an argument, it must be a single, "."-relative directory name. -# cvsu is part of the cvsutils package: http://www.red-bean.com/cvsutils/ - -postprocess= -case $1 in - --help) cat <. -EOF - exit ;; - - --version) - year=`echo "$scriptversion" | sed 's/[^0-9].*//'` - cat < -This is free software: you are free to change and redistribute it. -There is NO WARRANTY, to the extent permitted by law. -EOF - exit ;; - - -C) - test "$2" = . || postprocess="| sed 's|^|$2/|'" - cd "$2" || exit 1 - shift; shift ;; -esac - -test $# = 0 && set . - -for dir -do - if test -d .git; then - test "x$dir" = x. \ - && dir= sed_esc= \ - || { dir="$dir/"; sed_esc=`echo "$dir"|env sed 's,\([\\/]\),\\\\\1,g'`; } - # Ignore git symlinks - either they point into the tree, in which case - # we don't need to visit the target twice, or they point somewhere - # else (often into a submodule), in which case the content does not - # belong to this package. - eval exec git ls-tree -r 'HEAD:"$dir"' \ - \| sed -n '"s/^100[^ ]*./$sed_esc/p"' $postprocess - elif test -d .hg; then - eval exec hg locate '"$dir/*"' $postprocess - elif test -d .bzr; then - test "$postprocess" = '' && postprocess="| sed 's|^\./||'" - eval exec bzr ls -R --versioned '"$dir"' $postprocess - elif test -d CVS; then - test "$postprocess" = '' && postprocess="| sed 's|^\./||'" - if test -x build-aux/cvsu; then - eval build-aux/cvsu --find --types=AFGM '"$dir"' $postprocess - elif (cvsu --help) >/dev/null 2>&1; then - eval cvsu --find --types=AFGM '"$dir"' $postprocess - else - eval awk -F/ \''{ \ - if (!$1 && $3 !~ /^-/) { \ - f=FILENAME; \ - if (f ~ /CVS\/Entries$/) \ - f = substr(f, 1, length(f)-11); \ - print f $2; \ - }}'\'' \ - `find "$dir" -name Entries -print` /dev/null' $postprocess - fi - elif test -d .svn; then - eval exec svn list -R '"$dir"' $postprocess - else - echo "$0: Failed to determine type of version control used in `pwd`" 1>&2 - exit 1 - fi -done - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC0" -# time-stamp-end: "; # UTC" -# End: diff --git a/cfg.mk b/cfg.mk deleted file mode 100644 index cecca74..0000000 --- a/cfg.mk +++ /dev/null @@ -1,166 +0,0 @@ -# Copyright (C) 2006-2014 Free Software Foundation, Inc. -# Author: Simon Josefsson -# -# This file is part of LIBTASN1. -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -WFLAGS ?= --enable-gcc-warnings -ADDFLAGS ?= -CFGFLAGS ?= --enable-gtk-doc --enable-gtk-doc-pdf $(ADDFLAGS) $(WFLAGS) - -INDENT_SOURCES = `find . -name \*.[ch]|grep -v -e ^./gl -e ^./lib/gl -e ^./build-aux/ -e ^./lib/ASN1.c -e ^./tests/Test_tree_asn1_tab.c` - -ifeq ($(.DEFAULT_GOAL),abort-due-to-no-makefile) -.DEFAULT_GOAL := bootstrap -endif - -local-checks-to-skip = sc_prohibit_strcmp sc_prohibit_have_config_h \ - sc_require_config_h sc_require_config_h_first \ - sc_immutable_NEWS sc_prohibit_magic_number_exit \ - sc_bindtextdomain -VC_LIST_ALWAYS_EXCLUDE_REGEX = ^(maint.mk|gtk-doc.make|build-aux/.*|gl/.*|lib/gllib/.*|lib/glm4/.*|lib/ASN1\.c|m4/pkg.m4|doc/gdoc|windows/.*|doc/fdl-1.3.texi)$$ -update-copyright-env = UPDATE_COPYRIGHT_USE_INTERVALS=1 - -# Explicit syntax-check exceptions. -exclude_file_name_regexp--sc_prohibit_empty_lines_at_EOF = ^tests/TestIndef.p12$$ -exclude_file_name_regexp--sc_GPL_version = ^lib/libtasn1.h$$ -exclude_file_name_regexp--sc_program_name = ^tests/|examples/ -exclude_file_name_regexp--sc_prohibit_atoi_atof = ^src/asn1Coding.c|src/asn1Decoding.c$$ -exclude_file_name_regexp--sc_prohibit_empty_lines_at_EOF = ^tests/crlf.cer|tests/TestIndef.p12$$ -exclude_file_name_regexp--sc_error_message_uppercase = ^tests/Test_tree.c$$ -exclude_file_name_regexp--sc_unmarked_diagnostics = ^tests/Test_tree.c$$ - -bootstrap-tools := autoconf,automake,libtool,bison -gpg_key_ID = b565716f - -autoreconf: - touch ChangeLog - test -f ./configure || autoreconf --install - -bootstrap: autoreconf - ./configure $(CFGFLAGS) - -review-diff: - git diff `git describe --abbrev=0`.. \ - | grep -v -e ^index -e '^diff --git' \ - | filterdiff -p 1 -x 'gl/*' -x 'build-aux/*' -x 'lib/gl*' -x 'po/*' -x 'maint.mk' -x '.gitignore' -x '.x-sc*' -x ChangeLog -x GNUmakefile -x 'lib/ASN1.c' \ - | less - -# Release - -htmldir = ../www-$(PACKAGE) - -coverage-copy: - rm -fv `find $(htmldir)/coverage -type f | grep -v CVS` - mkdir -p $(htmldir)/coverage/ - cp -rv $(COVERAGE_OUT)/* $(htmldir)/coverage/ - -coverage-upload: - cd $(htmldir) && \ - find coverage -type d -! -name CVS -! -name '.' \ - -exec cvs add {} \; && \ - find coverage -type d -! -name CVS -! -name '.' \ - -exec sh -c "cvs add -kb {}/*.png" \; && \ - find coverage -type d -! -name CVS -! -name '.' \ - -exec sh -c "cvs add {}/*.html" \; && \ - cvs add coverage/libtasn1.info coverage/gcov.css || true && \ - cvs commit -m "Update." coverage - -clang: - make clean - scan-build ./configure - rm -rf scan.tmp - scan-build -o scan.tmp make - -clang-copy: - rm -fv `find $(htmldir)/clang-analyzer -type f | grep -v CVS` - mkdir -p $(htmldir)/clang-analyzer/ - cp -rv scan.tmp/*/* $(htmldir)/clang-analyzer/ - -clang-upload: - cd $(htmldir) && \ - cvs add clang-analyzer || true && \ - cvs add clang-analyzer/*.css clang-analyzer/*.js \ - clang-analyzer/*.html || true && \ - cvs commit -m "Update." clang-analyzer - -cyclo-copy: - cp -v doc/cyclo/cyclo-$(PACKAGE).html $(htmldir)/cyclo/index.html - -cyclo-upload: - cd $(htmldir) && cvs commit -m "Update." cyclo/index.html - -gendoc-copy: - cd doc && $(SHELL) ../build-aux/gendocs.sh \ - --html "--css-include=texinfo.css" \ - -o ../$(htmldir)/manual/ $(PACKAGE) "$(PACKAGE_NAME)" - -gendoc-upload: - cd $(htmldir) && \ - cvs add manual || true && \ - cvs add manual/html_node || true && \ - cvs add -kb manual/*.gz manual/*.pdf || true && \ - cvs add manual/*.txt manual/*.html \ - manual/html_node/*.html || true && \ - cvs commit -m "Update." manual/ - -gtkdoc-copy: - mkdir -p $(htmldir)/reference/ - cp -v doc/reference/$(PACKAGE).pdf \ - doc/reference/html/*.html \ - doc/reference/html/*.png \ - doc/reference/html/*.devhelp2 \ - doc/reference/html/*.css \ - $(htmldir)/reference/ - -gtkdoc-upload: - cd $(htmldir) && \ - cvs add reference || true && \ - cvs add -kb reference/*.png reference/*.pdf || true && \ - cvs add reference/*.html reference/*.css \ - reference/*.devhelp2 || true && \ - cvs commit -m "Update." reference/ - -ChangeLog: - git2cl > ChangeLog - cat .clcopying >> ChangeLog - -tag = $(PACKAGE)_`echo $(VERSION) | sed 's/\./_/g'` - -tarball: - ! git tag -l $(tag) | grep $(PACKAGE) > /dev/null - rm -f ChangeLog - $(MAKE) ChangeLog distcheck - -libtasn14win: - cd windows && make -f libtasn14win.mk libtasn14win VERSION=$(VERSION) - -libtasn14win-upload: - cd windows && make -f libtasn14win.mk upload VERSION=$(VERSION) - -source: - git tag -u b565716f -m $(VERSION) $(tag) - -release-check: syntax-check tarball libtasn14win gendoc-copy gtkdoc-copy coverage coverage-copy clang clang-copy - -release-upload-www: gendoc-upload gtkdoc-upload coverage-upload clang-upload - -release-upload-ftp: - build-aux/gnupload --to ftp.gnu.org:$(PACKAGE) $(distdir).tar.gz - cp $(distdir).tar.gz $(distdir).tar.gz.sig ../releases/$(PACKAGE)/ - git push - git push --tags - -release: release-check release-upload-www source release-upload-ftp libtasn14win-upload diff --git a/configure.ac b/configure.ac deleted file mode 100644 index 45d0233..0000000 --- a/configure.ac +++ /dev/null @@ -1,129 +0,0 @@ -dnl Process this file with autoconf to produce a configure script. -# Copyright (C) 2002-2014 Free Software Foundation, Inc. -# -# This file is part of LIBTASN1. -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -AC_PREREQ([2.61]) -AC_INIT([GNU Libtasn1],[4.13],[help-libtasn1@gnu.org]) -AC_CONFIG_AUX_DIR([build-aux]) -AC_CONFIG_MACRO_DIR([m4]) -AC_CONFIG_HEADERS(config.h) -AM_INIT_AUTOMAKE([1.10 -Wall -Wno-override]) -AM_SILENT_RULES([yes]) - -# Library code modified: REVISION++ -# Interfaces changed/added/removed: CURRENT++ REVISION=0 -# Interfaces added: AGE++ -# Interfaces removed: AGE=0 -AC_SUBST(LT_CURRENT, 11) -AC_SUBST(LT_REVISION, 5) -AC_SUBST(LT_AGE, 5) - -AC_PROG_CC -gl_EARLY -lgl_EARLY -AC_PROG_YACC - -AC_ARG_ENABLE(doc, - AS_HELP_STRING([--disable-doc], [don't generate any documentation]), - enable_doc=$enableval, enable_doc=yes) -AM_CONDITIONAL(ENABLE_DOC, test "$enable_doc" != "no") - -dnl Checks for programs. -AM_MISSING_PROG(HELP2MAN, help2man, $missing_dir) -AC_LIBTOOL_WIN32_DLL -AM_PROG_AR -AM_PROG_LIBTOOL -GTK_DOC_CHECK(1.2) - -AC_CHECK_SIZEOF(unsigned long int, 4) -AC_CHECK_SIZEOF(unsigned int, 4) - -sj_UPDATE_HEADER_VERSION([$srcdir/lib/libtasn1.h]) - -# For gnulib compatibility modules. -gl_INIT -lgl_INIT - -AC_ARG_ENABLE([gcc-warnings], - [AS_HELP_STRING([--disable-gcc-warnings], - [disable GCC warnings (for developers)])], - [case $enableval in - yes|no) ;; - *) AC_MSG_ERROR([bad value $enableval for gcc-warnings option]) ;; - esac - gl_gcc_warnings=$enableval], - [gl_gcc_warnings=yes] -) - -if test "$gl_gcc_warnings" = yes; then - nw="$nw -Wsystem-headers" # Don't let system headers trigger warnings - nw="$nw -Wc++-compat" # We don't care strongly about C++ compilers - nw="$nw -Wtraditional" # Warns on #elif which we use often - nw="$nw -Wtraditional-conversion" # Too many warnings for now - nw="$nw -Wconversion" # Too many warnings for now - nw="$nw -Wsign-conversion" # Too many warnings for now - nw="$nw -Wold-style-definition" # - nw="$nw -Wpadded" # Our structs are not padded - nw="$nw -Wundef" # - nw="$nw -Wunreachable-code" # Too many false positives - nw="$nw -Wunused-macros" # Breaks on bison generated ASN1.c - nw="$nw -Wswitch-default" # Breaks on bison generated ASN1.c - nw="$nw -Wunsafe-loop-optimizations" - nw="$nw -Wstrict-overflow" - nw="$nw -Woverlength-strings" # Some tests use large strings - nw="$nw -Wsuggest-attribute=pure" # Is it worth using pure attributes? - - gl_MANYWARN_ALL_GCC([ws]) - gl_MANYWARN_COMPLEMENT(ws, [$ws], [$nw]) - for w in $ws; do - gl_WARN_ADD([$w]) - done - - gl_WARN_ADD([-Wno-type-limits]) - gl_WARN_ADD([-Wno-missing-field-initializers]) - gl_WARN_ADD([-Wno-unused-parameter]) - gl_WARN_ADD([-Wno-stack-protector]) # Some functions cannot be protected - gl_WARN_ADD([-fdiagnostics-show-option]) -fi - -AC_CONFIG_FILES([ - Makefile - doc/Makefile - doc/cyclo/Makefile - doc/reference/Makefile - doc/reference/version.xml - examples/Makefile - gl/Makefile - lib/Makefile - lib/gllib/Makefile - lib/libtasn1.pc - src/Makefile - tests/Makefile -]) -AC_OUTPUT - -AC_MSG_NOTICE([summary of build options: - - version: ${VERSION} shared $LT_CURRENT:$LT_REVISION:$LT_AGE - Host type: ${host} - Install prefix: ${prefix} - Compiler: ${CC} - Warning flags: errors: ${WERROR_CFLAGS} warnings: ${WARN_CFLAGS} - Library types: Shared=${enable_shared}, Static=${enable_static} - Valgrind: ${VALGRIND} - Version script: $have_ld_version_script -]) diff --git a/devel/ABI-x86_64.dump b/devel/ABI-x86_64.dump deleted file mode 100644 index 518c598..0000000 --- a/devel/ABI-x86_64.dump +++ /dev/null @@ -1,1577 +0,0 @@ -$VAR1 = { - 'ABI_DUMPER_VERSION' => '0.99.16', - 'ABI_DUMP_VERSION' => '3.2', - 'Arch' => 'x86_64', - 'GccVersion' => '6.2.1', - 'Headers' => { - 'libtasn1.h' => 1 - }, - 'Language' => 'C', - 'LibraryName' => 'libtasn1.so.6.0.0', - 'LibraryVersion' => undef, - 'NameSpaces' => {}, - 'Needed' => { - 'libc.so.6' => 1 - }, - 'PublicABI' => '1', - 'Sources' => { - 'ASN1.y' => 1, - 'coding.c' => 1, - 'decoding.c' => 1, - 'element.c' => 1, - 'errors.c' => 1, - 'parser_aux.c' => 1, - 'structure.c' => 1, - 'version.c' => 1 - }, - 'SymbolInfo' => { - '10386' => { - 'Header' => 'libtasn1.h', - 'Param' => { - '0' => { - 'name' => 'element', - 'type' => '1174' - }, - '1' => { - 'name' => 'name', - 'type' => '96' - }, - '2' => { - 'name' => 'ider', - 'type' => '202' - }, - '3' => { - 'name' => 'len', - 'type' => '15262' - }, - '4' => { - 'name' => 'ErrorDescription', - 'type' => '204' - } - }, - 'Reg' => { - '0' => 'rdi', - '1' => 'rsi', - '2' => 'rdx', - '3' => 'rcx', - '4' => 'r8' - }, - 'Return' => '84', - 'ShortName' => 'asn1_der_coding', - 'Source' => 'coding.c', - 'SourceLine' => '870' - }, - '16113' => { - 'Header' => 'libtasn1.h', - 'Param' => { - '0' => { - 'name' => 'str', - 'type' => '16332' - }, - '1' => { - 'name' => 'bit_len', - 'type' => '84' - }, - '2' => { - 'name' => 'der', - 'type' => '1207' - }, - '3' => { - 'name' => 'der_len', - 'type' => '15262' - } - }, - 'Reg' => { - '0' => 'rdi', - '1' => 'rsi', - '2' => 'rdx', - '3' => 'rcx' - }, - 'Return' => '1', - 'ShortName' => 'asn1_bit_der', - 'Source' => 'coding.c', - 'SourceLine' => '340' - }, - '16608' => { - 'Header' => 'libtasn1.h', - 'Param' => { - '0' => { - 'name' => 'str', - 'type' => '16332' - }, - '1' => { - 'name' => 'str_len', - 'type' => '84' - }, - '2' => { - 'name' => 'der', - 'type' => '1207' - }, - '3' => { - 'name' => 'der_len', - 'type' => '15262' - } - }, - 'Reg' => { - '0' => 'rdi', - '1' => 'rsi', - '2' => 'rdx', - '3' => 'rcx' - }, - 'Return' => '1', - 'ShortName' => 'asn1_octet_der', - 'Source' => 'coding.c', - 'SourceLine' => '154' - }, - '16862' => { - 'Header' => 'libtasn1.h', - 'Param' => { - '0' => { - 'name' => 'len', - 'type' => '45' - }, - '1' => { - 'name' => 'ans', - 'type' => '1207' - }, - '2' => { - 'name' => 'ans_len', - 'type' => '15262' - } - }, - 'Reg' => { - '0' => 'rdi', - '1' => 'rsi', - '2' => 'rdx' - }, - 'Return' => '1', - 'ShortName' => 'asn1_length_der', - 'Source' => 'coding.c', - 'SourceLine' => '71' - }, - '17466' => { - 'Header' => 'libtasn1.h', - 'Param' => { - '0' => { - 'name' => 'der', - 'type' => '16332' - }, - '1' => { - 'name' => 'der_len', - 'type' => '84' - }, - '2' => { - 'name' => 'cls', - 'type' => '1207' - }, - '3' => { - 'name' => 'len', - 'type' => '15262' - }, - '4' => { - 'name' => 'tag', - 'type' => '30312' - } - }, - 'Reg' => { - '0' => 'rdi', - '1' => 'rsi', - '2' => 'rdx', - '3' => 'rcx', - '4' => 'r8' - }, - 'Return' => '1', - 'ShortName' => 'asn1_get_tag_der' - }, - '17478' => { - 'Header' => 'libtasn1.h', - 'Param' => { - '0' => { - 'name' => 'der', - 'type' => '16332' - }, - '1' => { - 'name' => 'der_len', - 'type' => '84' - }, - '2' => { - 'name' => 'len', - 'type' => '15262' - } - }, - 'Reg' => { - '0' => 'rdi', - '1' => 'rsi', - '2' => 'rdx' - }, - 'Return' => '119', - 'ShortName' => 'asn1_get_length_der', - 'Source' => 'decoding.c', - 'SourceLine' => '62' - }, - '17490' => { - 'Header' => 'libtasn1.h', - 'Param' => { - '0' => { - 'name' => 'pointer', - 'type' => '1174' - }, - '1' => { - 'name' => 'name', - 'type' => '96' - } - }, - 'Reg' => { - '0' => 'rdi', - '1' => 'rsi' - }, - 'Return' => '1174', - 'ShortName' => 'asn1_find_node', - 'Source' => 'parser_aux.c', - 'SourceLine' => '94' - }, - '17535' => { - 'Header' => 'libtasn1.h', - 'Param' => { - '0' => { - 'name' => 'structure', - 'type' => '3048' - } - }, - 'Reg' => { - '0' => 'rdi' - }, - 'Return' => '84', - 'ShortName' => 'asn1_delete_structure', - 'Source' => 'structure.c', - 'SourceLine' => '285' - }, - '18705' => { - 'Header' => 'libtasn1.h', - 'Param' => { - '0' => { - 'name' => 'definitions', - 'type' => '1174' - }, - '1' => { - 'name' => 'element', - 'type' => '3048' - }, - '2' => { - 'name' => 'octetName', - 'type' => '96' - }, - '3' => { - 'name' => 'objectName', - 'type' => '96' - } - }, - 'Reg' => { - '0' => 'rdi', - '1' => 'rsi', - '2' => 'rdx', - '3' => 'rcx' - }, - 'Return' => '84', - 'ShortName' => 'asn1_expand_octet_string', - 'Source' => 'decoding.c', - 'SourceLine' => '2799' - }, - '19479' => { - 'Header' => 'libtasn1.h', - 'Param' => { - '0' => { - 'name' => 'definitions', - 'type' => '1174' - }, - '1' => { - 'name' => 'element', - 'type' => '3048' - } - }, - 'Reg' => { - '0' => 'rdi', - '1' => 'rsi' - }, - 'Return' => '84', - 'ShortName' => 'asn1_expand_any_defined_by', - 'Source' => 'decoding.c', - 'SourceLine' => '2569' - }, - '2025' => { - 'Header' => 'libtasn1.h', - 'Param' => { - '0' => { - 'name' => 'inputFileName', - 'type' => '96' - }, - '1' => { - 'name' => 'outputFileName', - 'type' => '96' - }, - '2' => { - 'name' => 'vectorName', - 'type' => '96' - }, - '3' => { - 'name' => 'errorDescription', - 'type' => '204' - } - }, - 'Reg' => { - '0' => 'rdi', - '1' => 'rsi', - '2' => 'rdx', - '3' => 'rcx' - }, - 'Return' => '84', - 'ShortName' => 'asn1_parser2array', - 'Source' => 'ASN1.y', - 'SourceLine' => '665' - }, - '20405' => { - 'Header' => 'libtasn1.h', - 'Param' => { - '0' => { - 'name' => 'element', - 'type' => '1174' - }, - '1' => { - 'name' => 'ider', - 'type' => '17790' - }, - '2' => { - 'name' => 'len', - 'type' => '84' - }, - '3' => { - 'name' => 'name_element', - 'type' => '96' - }, - '4' => { - 'name' => 'start', - 'type' => '15262' - }, - '5' => { - 'name' => 'end', - 'type' => '15262' - } - }, - 'Reg' => { - '0' => 'rdi', - '1' => 'rsi', - '2' => 'rdx', - '3' => 'rcx', - '4' => 'r8', - '5' => 'r9' - }, - 'Return' => '84', - 'ShortName' => 'asn1_der_decoding_startEnd', - 'Source' => 'decoding.c', - 'SourceLine' => '2218' - }, - '22001' => { - 'Header' => 'libtasn1.h', - 'Param' => { - '0' => { - 'name' => 'structure', - 'type' => '3048' - }, - '1' => { - 'name' => 'elementName', - 'type' => '96' - }, - '2' => { - 'name' => 'ider', - 'type' => '17790' - }, - '3' => { - 'name' => 'len', - 'type' => '84' - }, - '4' => { - 'name' => 'errorDescription', - 'type' => '204' - } - }, - 'Reg' => { - '0' => 'rdi', - '1' => 'rsi', - '2' => 'rdx', - '3' => 'rcx', - '4' => 'r8' - }, - 'Return' => '84', - 'ShortName' => 'asn1_der_decoding_element', - 'Source' => 'decoding.c', - 'SourceLine' => '1404' - }, - '25470' => { - 'Header' => 'libtasn1.h', - 'Param' => { - '0' => { - 'name' => 'element', - 'type' => '3048' - }, - '1' => { - 'name' => 'ider', - 'type' => '17790' - }, - '2' => { - 'name' => 'len', - 'type' => '84' - }, - '3' => { - 'name' => 'errorDescription', - 'type' => '204' - } - }, - 'Reg' => { - '0' => 'rdi', - '1' => 'rsi', - '2' => 'rdx', - '3' => 'rcx' - }, - 'Return' => '84', - 'ShortName' => 'asn1_der_decoding', - 'Source' => 'decoding.c', - 'SourceLine' => '823' - }, - '2786' => { - 'Header' => 'libtasn1.h', - 'Param' => { - '0' => { - 'name' => 'file_name', - 'type' => '96' - }, - '1' => { - 'name' => 'definitions', - 'type' => '3048' - }, - '2' => { - 'name' => 'errorDescription', - 'type' => '204' - } - }, - 'Reg' => { - '0' => 'rdi', - '1' => 'rsi', - '2' => 'rdx' - }, - 'Return' => '84', - 'ShortName' => 'asn1_parser2tree', - 'Source' => 'ASN1.y', - 'SourceLine' => '581' - }, - '29368' => { - 'Header' => 'libtasn1.h', - 'Param' => { - '0' => { - 'name' => 'der', - 'type' => '16332' - }, - '1' => { - 'name' => 'der_len', - 'type' => '84' - }, - '2' => { - 'name' => 'ret_len', - 'type' => '15262' - }, - '3' => { - 'name' => 'str', - 'type' => '1207' - }, - '4' => { - 'name' => 'str_size', - 'type' => '84' - }, - '5' => { - 'name' => 'bit_len', - 'type' => '15262' - } - }, - 'Reg' => { - '0' => 'rdi', - '1' => 'rsi', - '2' => 'rdx', - '3' => 'rcx', - '4' => 'r8', - '5' => 'r9' - }, - 'Return' => '84', - 'ShortName' => 'asn1_get_bit_der', - 'Source' => 'decoding.c', - 'SourceLine' => '346' - }, - '29848' => { - 'Header' => 'libtasn1.h', - 'Param' => { - '0' => { - 'name' => 'der', - 'type' => '16332' - }, - '1' => { - 'name' => 'der_len', - 'type' => '84' - }, - '2' => { - 'name' => 'ret_len', - 'type' => '15262' - }, - '3' => { - 'name' => 'str', - 'type' => '1207' - }, - '4' => { - 'name' => 'str_size', - 'type' => '84' - }, - '5' => { - 'name' => 'str_len', - 'type' => '15262' - } - }, - 'Reg' => { - '0' => 'rdi', - '1' => 'rsi', - '2' => 'rdx', - '3' => 'rcx', - '4' => 'r8', - '5' => 'r9' - }, - 'Return' => '84', - 'ShortName' => 'asn1_get_octet_der', - 'Source' => 'decoding.c', - 'SourceLine' => '225' - }, - '30036' => { - 'Header' => 'libtasn1.h', - 'Param' => { - '0' => { - 'name' => 'ber', - 'type' => '16332' - }, - '1' => { - 'name' => 'ber_len', - 'type' => '84' - }, - '2' => { - 'name' => 'len', - 'type' => '15262' - } - }, - 'Reg' => { - '0' => 'rdi', - '1' => 'rsi', - '2' => 'rdx' - }, - 'Return' => '119', - 'ShortName' => 'asn1_get_length_ber', - 'Source' => 'decoding.c', - 'SourceLine' => '194' - }, - '31895' => { - 'Header' => 'libtasn1.h', - 'Param' => { - '0' => { - 'name' => 'root', - 'type' => '1174' - }, - '1' => { - 'name' => 'name', - 'type' => '96' - }, - '2' => { - 'name' => 'ivalue', - 'type' => '202' - }, - '3' => { - 'name' => 'len', - 'type' => '15262' - } - }, - 'Reg' => { - '0' => 'rdi', - '1' => 'rsi', - '2' => 'rdx', - '3' => 'rcx' - }, - 'Return' => '84', - 'ShortName' => 'asn1_read_value', - 'Source' => 'element.c', - 'SourceLine' => '697' - }, - '31906' => { - 'Header' => 'libtasn1.h', - 'Param' => { - '0' => { - 'name' => 'definitions', - 'type' => '1174' - }, - '1' => { - 'name' => 'source_name', - 'type' => '96' - }, - '2' => { - 'name' => 'element', - 'type' => '3048' - } - }, - 'Reg' => { - '0' => 'rdi', - '1' => 'rsi', - '2' => 'rdx' - }, - 'Return' => '84', - 'ShortName' => 'asn1_create_element', - 'Source' => 'structure.c', - 'SourceLine' => '652' - }, - '33432' => { - 'Header' => 'libtasn1.h', - 'Param' => { - '0' => { - 'name' => 'node', - 'type' => '1174' - }, - '1' => { - 'name' => 'data', - 'type' => '33495' - } - }, - 'Reg' => { - '0' => 'rdi', - '1' => 'rsi' - }, - 'Return' => '84', - 'ShortName' => 'asn1_read_node_value', - 'Source' => 'element.c', - 'SourceLine' => '984' - }, - '33501' => { - 'Header' => 'libtasn1.h', - 'Param' => { - '0' => { - 'name' => 'root', - 'type' => '1174' - }, - '1' => { - 'name' => 'name', - 'type' => '96' - }, - '2' => { - 'name' => 'tagValue', - 'type' => '15262' - }, - '3' => { - 'name' => 'classValue', - 'type' => '15262' - } - }, - 'Reg' => { - '0' => 'rdi', - '1' => 'rsi', - '2' => 'rdx', - '3' => 'rcx' - }, - 'Return' => '84', - 'ShortName' => 'asn1_read_tag', - 'Source' => 'element.c', - 'SourceLine' => '875' - }, - '34463' => { - 'Header' => 'libtasn1.h', - 'Param' => { - '0' => { - 'name' => 'node_root', - 'type' => '1174' - }, - '1' => { - 'name' => 'name', - 'type' => '96' - }, - '2' => { - 'name' => 'ivalue', - 'type' => '17790' - }, - '3' => { - 'name' => 'len', - 'type' => '84' - } - }, - 'Reg' => { - '0' => 'rdi', - '1' => 'rsi', - '2' => 'rdx', - '3' => 'rcx' - }, - 'Return' => '84', - 'ShortName' => 'asn1_write_value', - 'Source' => 'element.c', - 'SourceLine' => '271' - }, - '38503' => { - 'Header' => 'libtasn1.h', - 'Param' => { - '0' => { - 'name' => 'error', - 'type' => '84' - } - }, - 'Reg' => { - '0' => 'rdi' - }, - 'Return' => '96', - 'ShortName' => 'asn1_strerror', - 'Source' => 'errors.c', - 'SourceLine' => '93' - }, - '38569' => { - 'Header' => 'libtasn1.h', - 'Param' => { - '0' => { - 'name' => 'error', - 'type' => '84' - } - }, - 'Reg' => { - '0' => 'rdi' - }, - 'Return' => '1', - 'ShortName' => 'asn1_perror', - 'Source' => 'errors.c', - 'SourceLine' => '71' - }, - '47624' => { - 'Header' => 'libtasn1.h', - 'Param' => { - '0' => { - 'name' => 'dst', - 'type' => '1174' - }, - '1' => { - 'name' => 'dst_name', - 'type' => '96' - }, - '2' => { - 'name' => 'src', - 'type' => '1174' - }, - '3' => { - 'name' => 'src_name', - 'type' => '96' - } - }, - 'Reg' => { - '0' => 'rdi', - '1' => 'rsi', - '2' => 'rdx', - '3' => 'rcx' - }, - 'Return' => '84', - 'ShortName' => 'asn1_copy_node', - 'Source' => 'structure.c', - 'SourceLine' => '1144' - }, - '47998' => { - 'Header' => 'libtasn1.h', - 'Param' => { - '0' => { - 'name' => 'definitions', - 'type' => '1174' - }, - '1' => { - 'name' => 'oidValue', - 'type' => '96' - } - }, - 'Reg' => { - '0' => 'rdi', - '1' => 'rsi' - }, - 'Return' => '96', - 'ShortName' => 'asn1_find_structure_from_oid', - 'Source' => 'structure.c', - 'SourceLine' => '1089' - }, - '48403' => { - 'Header' => 'libtasn1.h', - 'Param' => { - '0' => { - 'name' => 'element', - 'type' => '1174' - }, - '1' => { - 'name' => 'name', - 'type' => '96' - }, - '2' => { - 'name' => 'num', - 'type' => '15262' - } - }, - 'Reg' => { - '0' => 'rdi', - '1' => 'rsi', - '2' => 'rdx' - }, - 'Return' => '84', - 'ShortName' => 'asn1_number_of_elements', - 'Source' => 'structure.c', - 'SourceLine' => '1051' - }, - '48550' => { - 'Header' => 'libtasn1.h', - 'Param' => { - '0' => { - 'name' => 'out', - 'type' => '1250' - }, - '1' => { - 'name' => 'structure', - 'type' => '1174' - }, - '2' => { - 'name' => 'name', - 'type' => '96' - }, - '3' => { - 'name' => 'mode', - 'type' => '84' - } - }, - 'Reg' => { - '0' => 'rdi', - '1' => 'rsi', - '2' => 'rdx', - '3' => 'rcx' - }, - 'Return' => '1', - 'ShortName' => 'asn1_print_structure', - 'Source' => 'structure.c', - 'SourceLine' => '687' - }, - '53933' => { - 'Header' => 'libtasn1.h', - 'Param' => { - '0' => { - 'name' => 'structure', - 'type' => '1174' - }, - '1' => { - 'name' => 'element_name', - 'type' => '96' - } - }, - 'Reg' => { - '0' => 'rdi', - '1' => 'rsi' - }, - 'Return' => '84', - 'ShortName' => 'asn1_delete_element', - 'Source' => 'structure.c', - 'SourceLine' => '349' - }, - '54595' => { - 'Header' => 'libtasn1.h', - 'Param' => { - '0' => { - 'name' => 'array', - 'type' => '55124' - }, - '1' => { - 'name' => 'definitions', - 'type' => '3048' - }, - '2' => { - 'name' => 'errorDescription', - 'type' => '204' - } - }, - 'Reg' => { - '0' => 'rdi', - '1' => 'rsi', - '2' => 'rdx' - }, - 'Return' => '84', - 'ShortName' => 'asn1_array2tree', - 'Source' => 'structure.c', - 'SourceLine' => '177' - }, - '57412' => { - 'Header' => 'libtasn1.h', - 'Param' => { - '0' => { - 'name' => 'req_version', - 'type' => '96' - } - }, - 'Reg' => { - '0' => 'rdi' - }, - 'Return' => '96', - 'ShortName' => 'asn1_check_version', - 'Source' => 'version.c', - 'SourceLine' => '45' - } - }, - 'SymbolVersion' => { - '_ITM_deregisterTMCloneTable' => 'ungetc@@GLIBC_2.2.5', - '_ITM_registerTMCloneTable' => 'ungetc@@GLIBC_2.2.5', - '_Jv_RegisterClasses' => 'ungetc@@GLIBC_2.2.5', - '__gmon_start__' => 'ungetc@@GLIBC_2.2.5', - 'asn1_array2tree' => 'asn1_array2tree@@LIBTASN1_0_3', - 'asn1_bit_der' => 'asn1_bit_der@@LIBTASN1_0_3', - 'asn1_check_version' => 'asn1_check_version@@LIBTASN1_0_3', - 'asn1_copy_node' => 'asn1_copy_node@@LIBTASN1_0_3', - 'asn1_create_element' => 'asn1_create_element@@LIBTASN1_0_3', - 'asn1_delete_element' => 'asn1_delete_element@@LIBTASN1_0_3', - 'asn1_delete_structure' => 'asn1_delete_structure@@LIBTASN1_0_3', - 'asn1_der_coding' => 'asn1_der_coding@@LIBTASN1_0_3', - 'asn1_der_decoding' => 'asn1_der_decoding@@LIBTASN1_0_3', - 'asn1_der_decoding_element' => 'asn1_der_decoding_element@@LIBTASN1_0_3', - 'asn1_der_decoding_startEnd' => 'asn1_der_decoding_startEnd@@LIBTASN1_0_3', - 'asn1_expand_any_defined_by' => 'asn1_expand_any_defined_by@@LIBTASN1_0_3', - 'asn1_expand_octet_string' => 'asn1_expand_octet_string@@LIBTASN1_0_3', - 'asn1_find_node' => 'asn1_find_node@@LIBTASN1_0_3', - 'asn1_find_structure_from_oid' => 'asn1_find_structure_from_oid@@LIBTASN1_0_3', - 'asn1_get_bit_der' => 'asn1_get_bit_der@@LIBTASN1_0_3', - 'asn1_get_length_ber' => 'asn1_get_length_ber@@LIBTASN1_0_3', - 'asn1_get_length_der' => 'asn1_get_length_der@@LIBTASN1_0_3', - 'asn1_get_octet_der' => 'asn1_get_octet_der@@LIBTASN1_0_3', - 'asn1_get_tag_der' => 'asn1_get_tag_der@@LIBTASN1_0_3', - 'asn1_length_der' => 'asn1_length_der@@LIBTASN1_0_3', - 'asn1_number_of_elements' => 'asn1_number_of_elements@@LIBTASN1_0_3', - 'asn1_octet_der' => 'asn1_octet_der@@LIBTASN1_0_3', - 'asn1_parser2array' => 'asn1_parser2array@@LIBTASN1_0_3', - 'asn1_parser2tree' => 'asn1_parser2tree@@LIBTASN1_0_3', - 'asn1_perror' => 'asn1_perror@@LIBTASN1_0_3', - 'asn1_print_structure' => 'asn1_print_structure@@LIBTASN1_0_3', - 'asn1_read_node_value' => 'asn1_read_node_value@@LIBTASN1_0_3', - 'asn1_read_tag' => 'asn1_read_tag@@LIBTASN1_0_3', - 'asn1_read_value' => 'asn1_read_value@@LIBTASN1_0_3', - 'asn1_strerror' => 'asn1_strerror@@LIBTASN1_0_3', - 'asn1_write_value' => 'asn1_write_value@@LIBTASN1_0_3' - }, - 'Symbols' => { - 'libtasn1.so.6.0.0' => { - 'asn1_array2tree@@LIBTASN1_0_3' => 1, - 'asn1_bit_der@@LIBTASN1_0_3' => 1, - 'asn1_check_version@@LIBTASN1_0_3' => 1, - 'asn1_copy_node@@LIBTASN1_0_3' => 1, - 'asn1_create_element@@LIBTASN1_0_3' => 1, - 'asn1_delete_element@@LIBTASN1_0_3' => 1, - 'asn1_delete_structure@@LIBTASN1_0_3' => 1, - 'asn1_der_coding@@LIBTASN1_0_3' => 1, - 'asn1_der_decoding@@LIBTASN1_0_3' => 1, - 'asn1_der_decoding_element@@LIBTASN1_0_3' => 1, - 'asn1_der_decoding_startEnd@@LIBTASN1_0_3' => 1, - 'asn1_expand_any_defined_by@@LIBTASN1_0_3' => 1, - 'asn1_expand_octet_string@@LIBTASN1_0_3' => 1, - 'asn1_find_node@@LIBTASN1_0_3' => 1, - 'asn1_find_structure_from_oid@@LIBTASN1_0_3' => 1, - 'asn1_get_bit_der@@LIBTASN1_0_3' => 1, - 'asn1_get_length_ber@@LIBTASN1_0_3' => 1, - 'asn1_get_length_der@@LIBTASN1_0_3' => 1, - 'asn1_get_octet_der@@LIBTASN1_0_3' => 1, - 'asn1_get_tag_der@@LIBTASN1_0_3' => 1, - 'asn1_length_der@@LIBTASN1_0_3' => 1, - 'asn1_number_of_elements@@LIBTASN1_0_3' => 1, - 'asn1_octet_der@@LIBTASN1_0_3' => 1, - 'asn1_parser2array@@LIBTASN1_0_3' => 1, - 'asn1_parser2tree@@LIBTASN1_0_3' => 1, - 'asn1_perror@@LIBTASN1_0_3' => 1, - 'asn1_print_structure@@LIBTASN1_0_3' => 1, - 'asn1_read_node_value@@LIBTASN1_0_3' => 1, - 'asn1_read_tag@@LIBTASN1_0_3' => 1, - 'asn1_read_value@@LIBTASN1_0_3' => 1, - 'asn1_strerror@@LIBTASN1_0_3' => 1, - 'asn1_write_value@@LIBTASN1_0_3' => 1 - } - }, - 'Target' => 'unix', - 'TypeInfo' => { - '1' => { - 'Name' => 'void', - 'Type' => 'Intrinsic' - }, - '1042' => { - 'BaseType' => '1053', - 'Header' => 'libtasn1.h', - 'Line' => '109', - 'Name' => 'asn1_node_st', - 'Size' => '136', - 'Type' => 'Typedef' - }, - '1053' => { - 'Header' => 'int.h', - 'Line' => '46', - 'Memb' => { - '0' => { - 'name' => 'name', - 'offset' => '0', - 'type' => '1191' - }, - '1' => { - 'name' => 'name_hash', - 'offset' => '68', - 'type' => '152' - }, - '2' => { - 'name' => 'type', - 'offset' => '72', - 'type' => '152' - }, - '3' => { - 'name' => 'value', - 'offset' => '80', - 'type' => '1207' - }, - '4' => { - 'name' => 'value_len', - 'offset' => '88', - 'type' => '84' - }, - '5' => { - 'name' => 'down', - 'offset' => '96', - 'type' => '1174' - }, - '6' => { - 'name' => 'right', - 'offset' => '104', - 'type' => '1174' - }, - '7' => { - 'name' => 'left', - 'offset' => '112', - 'type' => '1174' - }, - '8' => { - 'name' => 'small_value', - 'offset' => '120', - 'type' => '1213' - } - }, - 'Name' => 'struct asn1_node_st', - 'PrivateABI' => 1, - 'Size' => '136', - 'Type' => 'Struct' - }, - '107' => { - 'Name' => 'char', - 'Size' => '1', - 'Type' => 'Intrinsic' - }, - '114' => { - 'BaseType' => '107', - 'Name' => 'char const', - 'Size' => '1', - 'Type' => 'Const' - }, - '1174' => { - 'BaseType' => '1185', - 'Header' => 'libtasn1.h', - 'Line' => '111', - 'Name' => 'asn1_node', - 'Size' => '8', - 'Type' => 'Typedef' - }, - '1185' => { - 'BaseType' => '1042', - 'Name' => 'asn1_node_st*', - 'Size' => '8', - 'Type' => 'Pointer' - }, - '119' => { - 'Name' => 'long', - 'Size' => '8', - 'Type' => 'Intrinsic' - }, - '1191' => { - 'BaseType' => '107', - 'Name' => 'char[65]', - 'Size' => '65', - 'Type' => 'Array' - }, - '1207' => { - 'BaseType' => '159', - 'Name' => 'unsigned char*', - 'Size' => '8', - 'Type' => 'Pointer' - }, - '1213' => { - 'BaseType' => '159', - 'Name' => 'unsigned char[16]', - 'Size' => '16', - 'Type' => 'Array' - }, - '1250' => { - 'BaseType' => '217', - 'Name' => 'FILE*', - 'Size' => '8', - 'Type' => 'Pointer' - }, - '152' => { - 'Name' => 'unsigned int', - 'Size' => '4', - 'Type' => 'Intrinsic' - }, - '15262' => { - 'BaseType' => '84', - 'Name' => 'int*', - 'Size' => '8', - 'Type' => 'Pointer' - }, - '159' => { - 'Name' => 'unsigned char', - 'Size' => '1', - 'Type' => 'Intrinsic' - }, - '16332' => { - 'BaseType' => '9379', - 'Name' => 'unsigned char const*', - 'Size' => '8', - 'Type' => 'Pointer' - }, - '166' => { - 'Name' => 'signed char', - 'Size' => '1', - 'Type' => 'Intrinsic' - }, - '17790' => { - 'BaseType' => '17796', - 'Name' => 'void const*', - 'Size' => '8', - 'Type' => 'Pointer' - }, - '17796' => { - 'BaseType' => '1', - 'Name' => 'void const', - 'Type' => 'Const' - }, - '180' => { - 'BaseType' => '119', - 'Header' => 'types.h', - 'Line' => '131', - 'Name' => '__off_t', - 'Size' => '8', - 'Type' => 'Typedef' - }, - '191' => { - 'BaseType' => '119', - 'Header' => 'types.h', - 'Line' => '132', - 'Name' => '__off64_t', - 'Size' => '8', - 'Type' => 'Typedef' - }, - '202' => { - 'BaseType' => '1', - 'Name' => 'void*', - 'Size' => '8', - 'Type' => 'Pointer' - }, - '204' => { - 'BaseType' => '107', - 'Name' => 'char*', - 'Size' => '8', - 'Type' => 'Pointer' - }, - '217' => { - 'BaseType' => '228', - 'Header' => 'stdio.h', - 'Line' => '48', - 'Name' => 'FILE', - 'Size' => '216', - 'Type' => 'Typedef' - }, - '228' => { - 'Header' => 'libio.h', - 'Line' => '241', - 'Memb' => { - '0' => { - 'name' => '_flags', - 'offset' => '0', - 'type' => '84' - }, - '1' => { - 'name' => '_IO_read_ptr', - 'offset' => '8', - 'type' => '204' - }, - '10' => { - 'name' => '_IO_backup_base', - 'offset' => '80', - 'type' => '204' - }, - '11' => { - 'name' => '_IO_save_end', - 'offset' => '88', - 'type' => '204' - }, - '12' => { - 'name' => '_markers', - 'offset' => '96', - 'type' => '665' - }, - '13' => { - 'name' => '_chain', - 'offset' => '104', - 'type' => '671' - }, - '14' => { - 'name' => '_fileno', - 'offset' => '112', - 'type' => '84' - }, - '15' => { - 'name' => '_flags2', - 'offset' => '116', - 'type' => '84' - }, - '16' => { - 'name' => '_old_offset', - 'offset' => '120', - 'type' => '180' - }, - '17' => { - 'name' => '_cur_column', - 'offset' => '128', - 'type' => '77' - }, - '18' => { - 'name' => '_vtable_offset', - 'offset' => '130', - 'type' => '166' - }, - '19' => { - 'name' => '_shortbuf', - 'offset' => '131', - 'type' => '677' - }, - '2' => { - 'name' => '_IO_read_end', - 'offset' => '16', - 'type' => '204' - }, - '20' => { - 'name' => '_lock', - 'offset' => '136', - 'type' => '693' - }, - '21' => { - 'name' => '_offset', - 'offset' => '144', - 'type' => '191' - }, - '22' => { - 'name' => '__pad1', - 'offset' => '152', - 'type' => '202' - }, - '23' => { - 'name' => '__pad2', - 'offset' => '160', - 'type' => '202' - }, - '24' => { - 'name' => '__pad3', - 'offset' => '168', - 'type' => '202' - }, - '25' => { - 'name' => '__pad4', - 'offset' => '176', - 'type' => '202' - }, - '26' => { - 'name' => '__pad5', - 'offset' => '184', - 'type' => '59' - }, - '27' => { - 'name' => '_mode', - 'offset' => '192', - 'type' => '84' - }, - '28' => { - 'name' => '_unused2', - 'offset' => '196', - 'type' => '699' - }, - '3' => { - 'name' => '_IO_read_base', - 'offset' => '24', - 'type' => '204' - }, - '4' => { - 'name' => '_IO_write_base', - 'offset' => '32', - 'type' => '204' - }, - '5' => { - 'name' => '_IO_write_ptr', - 'offset' => '40', - 'type' => '204' - }, - '6' => { - 'name' => '_IO_write_end', - 'offset' => '48', - 'type' => '204' - }, - '7' => { - 'name' => '_IO_buf_base', - 'offset' => '56', - 'type' => '204' - }, - '8' => { - 'name' => '_IO_buf_end', - 'offset' => '64', - 'type' => '204' - }, - '9' => { - 'name' => '_IO_save_base', - 'offset' => '72', - 'type' => '204' - } - }, - 'Name' => 'struct _IO_FILE', - 'PrivateABI' => 1, - 'Size' => '216', - 'Type' => 'Struct' - }, - '30312' => { - 'BaseType' => '45', - 'Name' => 'unsigned long*', - 'Size' => '8', - 'Type' => 'Pointer' - }, - '3048' => { - 'BaseType' => '1174', - 'Name' => 'asn1_node*', - 'Size' => '8', - 'Type' => 'Pointer' - }, - '33322' => { - 'Header' => 'libtasn1.h', - 'Line' => '153', - 'Memb' => { - '0' => { - 'name' => 'name', - 'offset' => '0', - 'type' => '96' - }, - '1' => { - 'name' => 'value', - 'offset' => '8', - 'type' => '17790' - }, - '2' => { - 'name' => 'value_len', - 'offset' => '16', - 'type' => '152' - }, - '3' => { - 'name' => 'type', - 'offset' => '20', - 'type' => '152' - } - }, - 'Name' => 'struct asn1_data_node_st', - 'Size' => '24', - 'Type' => 'Struct' - }, - '33383' => { - 'BaseType' => '33322', - 'Header' => 'libtasn1.h', - 'Line' => '160', - 'Name' => 'asn1_data_node_st', - 'Size' => '24', - 'Type' => 'Typedef' - }, - '33495' => { - 'BaseType' => '33383', - 'Name' => 'asn1_data_node_st*', - 'Size' => '8', - 'Type' => 'Pointer' - }, - '45' => { - 'Name' => 'unsigned long', - 'Size' => '8', - 'Type' => 'Intrinsic' - }, - '47499' => { - 'Header' => 'libtasn1.h', - 'Line' => '121', - 'Memb' => { - '0' => { - 'name' => 'name', - 'offset' => '0', - 'type' => '96' - }, - '1' => { - 'name' => 'type', - 'offset' => '8', - 'type' => '152' - }, - '2' => { - 'name' => 'value', - 'offset' => '16', - 'type' => '17790' - } - }, - 'Name' => 'struct asn1_static_node_st', - 'Size' => '24', - 'Type' => 'Struct' - }, - '47548' => { - 'BaseType' => '47499', - 'Header' => 'libtasn1.h', - 'Line' => '127', - 'Name' => 'asn1_static_node_t', - 'Size' => '24', - 'Type' => 'Typedef' - }, - '47559' => { - 'BaseType' => '47548', - 'Name' => 'asn1_static_node_t const', - 'Size' => '24', - 'Type' => 'Const' - }, - '55124' => { - 'BaseType' => '47559', - 'Name' => 'asn1_static_node_t const*', - 'Size' => '8', - 'Type' => 'Pointer' - }, - '59' => { - 'BaseType' => '45', - 'Header' => 'stddef.h', - 'Line' => '216', - 'Name' => 'size_t', - 'Size' => '8', - 'Type' => 'Typedef' - }, - '609' => { - 'Header' => 'libio.h', - 'Line' => '150', - 'Name' => '_IO_lock_t', - 'Type' => 'Typedef' - }, - '616' => { - 'Header' => 'libio.h', - 'Line' => '156', - 'Memb' => { - '0' => { - 'name' => '_next', - 'offset' => '0', - 'type' => '665' - }, - '1' => { - 'name' => '_sbuf', - 'offset' => '8', - 'type' => '671' - }, - '2' => { - 'name' => '_pos', - 'offset' => '16', - 'type' => '84' - } - }, - 'Name' => 'struct _IO_marker', - 'PrivateABI' => 1, - 'Size' => '24', - 'Type' => 'Struct' - }, - '665' => { - 'BaseType' => '616', - 'Name' => 'struct _IO_marker*', - 'Size' => '8', - 'Type' => 'Pointer' - }, - '671' => { - 'BaseType' => '228', - 'Name' => 'struct _IO_FILE*', - 'Size' => '8', - 'Type' => 'Pointer' - }, - '677' => { - 'BaseType' => '107', - 'Name' => 'char[1]', - 'Size' => '1', - 'Type' => 'Array' - }, - '693' => { - 'BaseType' => '609', - 'Name' => '_IO_lock_t*', - 'Size' => '8', - 'Type' => 'Pointer' - }, - '699' => { - 'BaseType' => '107', - 'Name' => 'char[20]', - 'Size' => '20', - 'Type' => 'Array' - }, - '77' => { - 'Name' => 'unsigned short', - 'Size' => '2', - 'Type' => 'Intrinsic' - }, - '84' => { - 'Name' => 'int', - 'Size' => '4', - 'Type' => 'Intrinsic' - }, - '9379' => { - 'BaseType' => '159', - 'Name' => 'unsigned char const', - 'Size' => '1', - 'Type' => 'Const' - }, - '96' => { - 'BaseType' => '114', - 'Name' => 'char const*', - 'Size' => '8', - 'Type' => 'Pointer' - } - }, - 'UndefinedSymbols' => { - 'libtasn1.so.6.0.0' => { - '_ITM_deregisterTMCloneTable' => 0, - '_ITM_registerTMCloneTable' => 0, - '_Jv_RegisterClasses' => 0, - '__ctype_b_loc@GLIBC_2.3' => 0, - '__cxa_finalize@GLIBC_2.2.5' => 0, - '__gmon_start__' => 0, - 'calloc@GLIBC_2.2.5' => 0, - 'fclose@GLIBC_2.2.5' => 0, - 'fgetc@GLIBC_2.2.5' => 0, - 'fopen@GLIBC_2.2.5' => 0, - 'fprintf@GLIBC_2.2.5' => 0, - 'fputc@GLIBC_2.2.5' => 0, - 'free@GLIBC_2.2.5' => 0, - 'fwrite@GLIBC_2.2.5' => 0, - 'malloc@GLIBC_2.2.5' => 0, - 'memcmp@GLIBC_2.2.5' => 0, - 'memcpy@GLIBC_2.14' => 0, - 'memmove@GLIBC_2.2.5' => 0, - 'realloc@GLIBC_2.2.5' => 0, - 'snprintf@GLIBC_2.2.5' => 0, - 'stderr@GLIBC_2.2.5' => 0, - 'stpcpy@GLIBC_2.2.5' => 0, - 'strchr@GLIBC_2.2.5' => 0, - 'strcmp@GLIBC_2.2.5' => 0, - 'strcpy@GLIBC_2.2.5' => 0, - 'strlen@GLIBC_2.2.5' => 0, - 'strncat@GLIBC_2.2.5' => 0, - 'strtol@GLIBC_2.2.5' => 0, - 'strtoul@GLIBC_2.2.5' => 0, - 'strverscmp@GLIBC_2.2.5' => 0, - 'ungetc@GLIBC_2.2.5' => 0 - } - }, - 'WordSize' => '8' - }; diff --git a/doc/Makefile.am b/doc/Makefile.am deleted file mode 100644 index db246ae..0000000 --- a/doc/Makefile.am +++ /dev/null @@ -1,200 +0,0 @@ -## Process this file with automake to produce Makefile.in -# Copyright (C) 2002-2014 Free Software Foundation, Inc. -# -# This file is part of LIBTASN1. -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -SUBDIRS = cyclo -if ENABLE_GTK_DOC -SUBDIRS += reference -endif - -EXTRA_DIST = gdoc TODO libtasn1.html libtasn1.ps libtasn1.pdf stamp_docs - -info_TEXINFOS = libtasn1.texi -libtasn1_TEXINFOS = fdl-1.3.texi texinfo.css $(gdoc_TEXINFOS) - -AM_MAKEINFOFLAGS = -I $(top_builddir)/doc -TEXI2DVI = texi2dvi $(AM_MAKEINFOFLAGS) -AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS) \ - --no-split --number-sections --css-include=texinfo.css - -dist_man_MANS = $(gdoc_MANS) asn1Parser.1 asn1Coding.1 asn1Decoding.1 - -HELP2MAN_OPTS = --info-page libtasn1 - -asn1Parser.1: $(top_srcdir)/src/asn1Parser.c $(top_srcdir)/configure.ac - $(HELP2MAN) $(HELP2MAN_OPTS) \ - --name="ASN.1 syntax tree generator for libtasn1" \ - --output=$@ $(top_builddir)/src/asn1Parser$(EXEEXT) - -asn1Coding.1: $(top_srcdir)/src/asn1Coding.c $(top_srcdir)/configure.ac - $(HELP2MAN) $(HELP2MAN_OPTS) \ - --name="ASN.1 DER encoder" \ - --output=$@ $(top_builddir)/src/asn1Coding$(EXEEXT) - -asn1Decoding.1: $(top_srcdir)/src/asn1Decoding.c $(top_srcdir)/configure.ac - $(HELP2MAN) $(HELP2MAN_OPTS) \ - --name="ASN.1 DER decoder" \ - --output=$@ $(top_builddir)/src/asn1Decoding$(EXEEXT) - -gdoc_MANS = -gdoc_MANS += man/asn1_get_length_der.3 -gdoc_MANS += man/asn1_get_tag_der.3 -gdoc_MANS += man/asn1_get_length_ber.3 -gdoc_MANS += man/asn1_get_octet_der.3 -gdoc_MANS += man/asn1_get_object_id_der.3 -gdoc_MANS += man/asn1_get_bit_der.3 -gdoc_MANS += man/asn1_der_decoding2.3 -gdoc_MANS += man/asn1_der_decoding.3 -gdoc_MANS += man/asn1_der_decoding_element.3 -gdoc_MANS += man/asn1_der_decoding_startEnd.3 -gdoc_MANS += man/asn1_expand_any_defined_by.3 -gdoc_MANS += man/asn1_expand_octet_string.3 -gdoc_MANS += man/asn1_decode_simple_der.3 -gdoc_MANS += man/asn1_decode_simple_ber.3 -gdoc_MANS += man/asn1_perror.3 -gdoc_MANS += man/asn1_strerror.3 -gdoc_MANS += man/asn1_find_node.3 -gdoc_MANS += man/asn1_length_der.3 -gdoc_MANS += man/asn1_octet_der.3 -gdoc_MANS += man/asn1_encode_simple_der.3 -gdoc_MANS += man/asn1_bit_der.3 -gdoc_MANS += man/asn1_der_coding.3 -gdoc_MANS += man/asn1_write_value.3 -gdoc_MANS += man/asn1_read_value.3 -gdoc_MANS += man/asn1_read_value_type.3 -gdoc_MANS += man/asn1_read_tag.3 -gdoc_MANS += man/asn1_read_node_value.3 -gdoc_MANS += man/asn1_array2tree.3 -gdoc_MANS += man/asn1_delete_structure.3 -gdoc_MANS += man/asn1_delete_structure2.3 -gdoc_MANS += man/asn1_delete_element.3 -gdoc_MANS += man/asn1_create_element.3 -gdoc_MANS += man/asn1_print_structure.3 -gdoc_MANS += man/asn1_number_of_elements.3 -gdoc_MANS += man/asn1_find_structure_from_oid.3 -gdoc_MANS += man/asn1_copy_node.3 -gdoc_MANS += man/asn1_dup_node.3 -gdoc_MANS += man/asn1_parser2tree.3 -gdoc_MANS += man/asn1_parser2array.3 -gdoc_MANS += man/asn1_check_version.3 -gdoc_TEXINFOS = -gdoc_TEXINFOS += texi/decoding.c.texi -gdoc_TEXINFOS += texi/errors.c.texi -gdoc_TEXINFOS += texi/parser_aux.c.texi -gdoc_TEXINFOS += texi/coding.c.texi -gdoc_TEXINFOS += texi/element.c.texi -gdoc_TEXINFOS += texi/gstr.c.texi -gdoc_TEXINFOS += texi/structure.c.texi -gdoc_TEXINFOS += texi/ASN1.c.texi -gdoc_TEXINFOS += texi/version.c.texi -gdoc_TEXINFOS += texi/asn1_get_length_der.texi -gdoc_TEXINFOS += texi/asn1_get_tag_der.texi -gdoc_TEXINFOS += texi/asn1_get_length_ber.texi -gdoc_TEXINFOS += texi/asn1_get_octet_der.texi -gdoc_TEXINFOS += texi/asn1_get_object_id_der.texi -gdoc_TEXINFOS += texi/asn1_get_bit_der.texi -gdoc_TEXINFOS += texi/asn1_der_decoding2.texi -gdoc_TEXINFOS += texi/asn1_der_decoding.texi -gdoc_TEXINFOS += texi/asn1_der_decoding_element.texi -gdoc_TEXINFOS += texi/asn1_der_decoding_startEnd.texi -gdoc_TEXINFOS += texi/asn1_expand_any_defined_by.texi -gdoc_TEXINFOS += texi/asn1_expand_octet_string.texi -gdoc_TEXINFOS += texi/asn1_decode_simple_der.texi -gdoc_TEXINFOS += texi/asn1_decode_simple_ber.texi -gdoc_TEXINFOS += texi/asn1_perror.texi -gdoc_TEXINFOS += texi/asn1_strerror.texi -gdoc_TEXINFOS += texi/asn1_find_node.texi -gdoc_TEXINFOS += texi/asn1_length_der.texi -gdoc_TEXINFOS += texi/asn1_octet_der.texi -gdoc_TEXINFOS += texi/asn1_encode_simple_der.texi -gdoc_TEXINFOS += texi/asn1_bit_der.texi -gdoc_TEXINFOS += texi/asn1_der_coding.texi -gdoc_TEXINFOS += texi/asn1_write_value.texi -gdoc_TEXINFOS += texi/asn1_read_value.texi -gdoc_TEXINFOS += texi/asn1_read_value_type.texi -gdoc_TEXINFOS += texi/asn1_read_tag.texi -gdoc_TEXINFOS += texi/asn1_read_node_value.texi -gdoc_TEXINFOS += texi/asn1_array2tree.texi -gdoc_TEXINFOS += texi/asn1_delete_structure.texi -gdoc_TEXINFOS += texi/asn1_delete_structure2.texi -gdoc_TEXINFOS += texi/asn1_delete_element.texi -gdoc_TEXINFOS += texi/asn1_create_element.texi -gdoc_TEXINFOS += texi/asn1_print_structure.texi -gdoc_TEXINFOS += texi/asn1_number_of_elements.texi -gdoc_TEXINFOS += texi/asn1_find_structure_from_oid.texi -gdoc_TEXINFOS += texi/asn1_copy_node.texi -gdoc_TEXINFOS += texi/asn1_dup_node.texi -gdoc_TEXINFOS += texi/asn1_parser2tree.texi -gdoc_TEXINFOS += texi/asn1_parser2array.texi -gdoc_TEXINFOS += texi/asn1_check_version.texi - -GDOC_SRC = $(top_srcdir)/lib/decoding.c $(top_srcdir)/lib/errors.c \ - $(top_srcdir)/lib/parser_aux.c $(top_srcdir)/lib/coding.c \ - $(top_srcdir)/lib/element.c $(top_srcdir)/lib/gstr.c \ - $(top_srcdir)/lib/structure.c $(top_srcdir)/lib/ASN1.c \ - $(top_srcdir)/lib/version.c - -compare-makefile: - @MANS=""; \ - TEXINFOS=""; \ - for i in $(GDOC_SRC); do \ - BASE=`basename $$i`; \ - TEXINFOS="$$TEXINFOS\ngdoc_TEXINFOS += texi/$$BASE.texi"; \ - done; \ - FUNCS=`$(srcdir)/gdoc -listfunc $(GDOC_SRC)`; \ - for i in $$FUNCS; do \ - MANS="$$MANS\ngdoc_MANS += man/$$i.3"; \ - TEXINFOS="$$TEXINFOS\ngdoc_TEXINFOS += texi/$$i.texi"; \ - done; \ - grep -v -e '^gdoc_MANS += ' -e '^gdoc_TEXINFOS += ' Makefile.am | \ - perl -p -e "s,^gdoc_MANS =,gdoc_MANS =$$MANS,;" | \ - perl -p -e "s,^gdoc_TEXINFOS =,gdoc_TEXINFOS =$$TEXINFOS,;" \ - > tmp-$@; - diff -u $(srcdir)/Makefile.am tmp-$@ - rm -f tmp-$@ - -$(gdoc_MANS) $(gdoc_TEXINFOS): stamp_docs - -clean-local: - -rm -f stamp_docs - -stamp_docs: - $(mkdir_p) man texi; \ - for i in `$(srcdir)/gdoc -listfunc $(GDOC_SRC)`; do \ - echo -n "Creating documentation for $$i... " && \ - $(srcdir)/gdoc -man \ - -module $(PACKAGE) \ - -pkg-name "$(PACKAGE_NAME)" \ - -sourceversion $(VERSION) \ - -include libtasn1.h \ - -seeinfo $(PACKAGE) -verbatimcopying \ - -copyright "2006-2015 Free Software Foundation, Inc." \ - -function $$i \ - $(GDOC_SRC) > man/$$i.3 && \ - $(srcdir)/gdoc -texinfo -function $$i \ - $(GDOC_SRC) > texi/$$i.texi && \ - echo "ok"; \ - done; \ - for i in $(GDOC_SRC); do \ - BASE=`basename $$i`; \ - echo -n "Creating documentation for $$i... " && \ - $(srcdir)/gdoc -texinfo $$i > texi/$$BASE.texi && \ - echo "ok"; \ - done - touch $@ - -.PHONY: compare-makefile diff --git a/doc/TODO b/doc/TODO deleted file mode 100644 index 93c0450..0000000 --- a/doc/TODO +++ /dev/null @@ -1,25 +0,0 @@ -If you want to contribute (implement something from the current list, or -anything), contact the developer's mailing list ..., -in order to avoid having people working on the same thing. - -Current list: -+ Audit the code -* Avoid the usage of any global state in array2tree or parser2tree - functions. -* Allow extracting the time in a reasonable format (e.g. time_t) -* C structure generation instead of a single array -* CHOICE in CHOICE (e.g., RDN in byName in ResponderID in OCSP) cannot - be read directly. Also the OCTET string (ByKey) in the same choice - is not encoded properly. -- Add the checking of default value (e.g. 'INTEGER DEFAULT v1') -- Check _asn1_objectid_der, crashes on "0" input, gives incorrect encoding? - -(+) Means high priority -(*) Means medium priority -(-) Means low priority (ie. nobody is interested to develop that) - ----------------------------------------------------------------------- -Copyright (C) 2002-2014 Free Software Foundation, Inc. -Copying and distribution of this file, with or without modification, -are permitted in any medium without royalty provided the copyright -notice and this notice are preserved. diff --git a/doc/announce.txt b/doc/announce.txt deleted file mode 100644 index 1b1afaa..0000000 --- a/doc/announce.txt +++ /dev/null @@ -1,96 +0,0 @@ -To: help-libtasn1@gnu.org, info-gnu@gnu.org -Subject: GNU Libtasn1 2.12 released -<#part sign=pgpmime> -GNU Libtasn1 is a standalone library written in C for manipulating ASN.1 -objects including DER/BER encoding/decoding. GNU Libtasn1 is used by -GnuTLS to handle X.509 structures and by GNU Shishi to handle Kerberos -V5 structures. - -* Noteworthy changes in release 2.12 (2012-03-19) [stable] -- Cleanup license headers. -- build: Update gnulib files. -- Corrected DER decoding issue (reported by Matthew Hall). - Added self check to detect the problem, see tests/Test_overflow.c. - This problem can lead to at least remotely triggered crashes, see - further analysis on the libtasn1 mailing list. - -Homepage: - https://www.gnu.org/software/libtasn1/ - -Here are the compressed sources (1.9MB): - ftp://ftp.gnu.org/gnu/libtasn1/libtasn1-2.12.tar.gz - http://ftp.gnu.org/gnu/libtasn1/libtasn1-2.12.tar.gz - -Here are GPG detached signatures using key 0xB565716F: - ftp://ftp.gnu.org/gnu/libtasn1/libtasn1-2.12.tar.gz.sig - http://ftp.gnu.org/gnu/libtasn1/libtasn1-2.12.tar.gz.sig - -We publish Windows binaries for this release (32 and 64 bits): - ftp://ftp.gnu.org/gnu/libtasn1/libtasn1-2.12-win32.zip - http://ftp.gnu.org/gnu/libtasn1/libtasn1-2.12-win32.zip - ftp://ftp.gnu.org/gnu/libtasn1/libtasn1-2.12-win64.zip - http://ftp.gnu.org/gnu/libtasn1/libtasn1-2.12-win64.zip - -Commercial support contracts for Libtasn1 are available, and they help -finance continued maintenance. Simon Josefsson Datakonsult AB, a -Stockholm based privately held company, is currently funding Libtasn1 -maintenance. We are always looking for interesting development -projects. See http://josefsson.org/ for more details. - -If you need help to use Libtasn1, or want to help others, you are -invited to join the help-libtasn1 mailing list, see: - https://lists.gnu.org/mailman/listinfo/help-libtasn1 - -All manuals are available from: - https://www.gnu.org/software/libtasn1/manual/ - -Direct links to the manual: - HTML: https://www.gnu.org/software/libtasn1/manual/libtasn1.html - PDF: https://www.gnu.org/software/libtasn1/manual/libtasn1.pdf - -Direct links to the API Reference manual: - HTML: https://www.gnu.org/software/libtasn1/reference/ - PDF: https://www.gnu.org/software/libtasn1/reference/libtasn1.pdf - -For developers interested in improving code quality, we publish -Cyclomatic code complexity charts that help you find code that may -need review and improvements: - https://www.gnu.org/software/libtasn1/cyclo/ - -Code coverage charts indicate parts of the source code that needs -to be tested better by the included self-tests: - https://www.gnu.org/software/libtasn1/coverage/ - -Clang can analyse the source code for common problems, here is its -report for libtasn1: - https://www.gnu.org/software/libtasn1/clang/ - -The software is cryptographically signed by the author using an -OpenPGP key identified by the following information: - -pub 1280R/B565716F 2002-05-05 [expires: 2013-05-10] - Key fingerprint = 0424 D4EE 81A0 E3D1 19C6 F835 EDA2 1E94 B565 716F -uid Simon Josefsson -uid Simon Josefsson -sub 1280R/4D5D40AE 2002-05-05 [expires: 2013-05-10] -sub 2048R/105E722E 2012-03-13 [expires: 2013-07-26] -sub 2048R/728AB82C 2012-03-13 [expires: 2013-07-26] -sub 2048R/9394F626 2012-03-13 [expires: 2013-07-26] - -The key is available from: - http://josefsson.org/key.txt - dns:b565716f.josefsson.org?TYPE=CERT - -Here are the SHA-1 and SHA-224 checksums: - -b73539aee5444efb5e606b94bdf3ec5bfedb8620 libtasn1-2.12.tar.gz -011e8ab84d57b441f0c1dc18eebdda2ce3960bc9b7fdf8e1d4e35085 libtasn1-2.12.tar.gz - -919933732983e5075a2df288c1a3eb413e8c86c5 libtasn1-2.12-win32.zip -29b40469ae38ba7ff71abde5b806c8d30a222723443386eff4923c57 libtasn1-2.12-win32.zip - -de3add4d82aef98b7e52fff1ae72c1136781363d libtasn1-2.12-win64.zip -6cb1e3171e38e786391cb9dd702e12724f0a19c1cf6c1953a8552e82 libtasn1-2.12-win64.zip - -Happy hacking, -Simon diff --git a/doc/cyclo/Makefile.am b/doc/cyclo/Makefile.am deleted file mode 100644 index 541c7f0..0000000 --- a/doc/cyclo/Makefile.am +++ /dev/null @@ -1,33 +0,0 @@ -## Process this file with automake to produce Makefile.in -# Copyright (C) 2002-2014 Free Software Foundation, Inc. -# -# This file is part of LIBTASN1. -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -EXTRA_DIST = cyclo-$(PACKAGE).html - -vcurl = "http://git.savannah.gnu.org/gitweb/?p=$(PACKAGE).git;a=blob;f=lib/%FILENAME%;hb=HEAD" - -cyclo-$(PACKAGE).html: - (cd ${top_srcdir}/lib && \ - $(PMCCABE) *.[ch] \ - | sort -nr \ - | LANG=C $(AWK) -f ${abs_top_srcdir}/build-aux/pmccabe2html \ - -v lang=html -v name="$(PACKAGE_STRING)" \ - -v vcurl=$(vcurl) \ - -v url="http://www.gnu.org/software/$(PACKAGE)/" \ - -v css=${abs_top_srcdir}/build-aux/pmccabe.css) \ - > tmp - mv tmp $@ diff --git a/doc/fdl-1.3.texi b/doc/fdl-1.3.texi deleted file mode 100644 index 9c3bbe5..0000000 --- a/doc/fdl-1.3.texi +++ /dev/null @@ -1,505 +0,0 @@ -@c The GNU Free Documentation License. -@center Version 1.3, 3 November 2008 - -@c This file is intended to be included within another document, -@c hence no sectioning command or @node. - -@display -Copyright @copyright{} 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. -@uref{http://fsf.org/} - -Everyone is permitted to copy and distribute verbatim copies -of this license document, but changing it is not allowed. -@end display - -@enumerate 0 -@item -PREAMBLE - -The purpose of this License is to make a manual, textbook, or other -functional and useful document @dfn{free} in the sense of freedom: to -assure everyone the effective freedom to copy and redistribute it, -with or without modifying it, either commercially or noncommercially. -Secondarily, this License preserves for the author and publisher a way -to get credit for their work, while not being considered responsible -for modifications made by others. - -This License is a kind of ``copyleft'', which means that derivative -works of the document must themselves be free in the same sense. It -complements the GNU General Public License, which is a copyleft -license designed for free software. - -We have designed this License in order to use it for manuals for free -software, because free software needs free documentation: a free -program should come with manuals providing the same freedoms that the -software does. But this License is not limited to software manuals; -it can be used for any textual work, regardless of subject matter or -whether it is published as a printed book. We recommend this License -principally for works whose purpose is instruction or reference. - -@item -APPLICABILITY AND DEFINITIONS - -This License applies to any manual or other work, in any medium, that -contains a notice placed by the copyright holder saying it can be -distributed under the terms of this License. Such a notice grants a -world-wide, royalty-free license, unlimited in duration, to use that -work under the conditions stated herein. The ``Document'', below, -refers to any such manual or work. Any member of the public is a -licensee, and is addressed as ``you''. You accept the license if you -copy, modify or distribute the work in a way requiring permission -under copyright law. - -A ``Modified Version'' of the Document means any work containing the -Document or a portion of it, either copied verbatim, or with -modifications and/or translated into another language. - -A ``Secondary Section'' is a named appendix or a front-matter section -of the Document that deals exclusively with the relationship of the -publishers or authors of the Document to the Document's overall -subject (or to related matters) and contains nothing that could fall -directly within that overall subject. (Thus, if the Document is in -part a textbook of mathematics, a Secondary Section may not explain -any mathematics.) The relationship could be a matter of historical -connection with the subject or with related matters, or of legal, -commercial, philosophical, ethical or political position regarding -them. - -The ``Invariant Sections'' are certain Secondary Sections whose titles -are designated, as being those of Invariant Sections, in the notice -that says that the Document is released under this License. If a -section does not fit the above definition of Secondary then it is not -allowed to be designated as Invariant. The Document may contain zero -Invariant Sections. If the Document does not identify any Invariant -Sections then there are none. - -The ``Cover Texts'' are certain short passages of text that are listed, -as Front-Cover Texts or Back-Cover Texts, in the notice that says that -the Document is released under this License. A Front-Cover Text may -be at most 5 words, and a Back-Cover Text may be at most 25 words. - -A ``Transparent'' copy of the Document means a machine-readable copy, -represented in a format whose specification is available to the -general public, that is suitable for revising the document -straightforwardly with generic text editors or (for images composed of -pixels) generic paint programs or (for drawings) some widely available -drawing editor, and that is suitable for input to text formatters or -for automatic translation to a variety of formats suitable for input -to text formatters. A copy made in an otherwise Transparent file -format whose markup, or absence of markup, has been arranged to thwart -or discourage subsequent modification by readers is not Transparent. -An image format is not Transparent if used for any substantial amount -of text. A copy that is not ``Transparent'' is called ``Opaque''. - -Examples of suitable formats for Transparent copies include plain -ASCII without markup, Texinfo input format, La@TeX{} input -format, SGML or XML using a publicly available -DTD, and standard-conforming simple HTML, -PostScript or PDF designed for human modification. Examples -of transparent image formats include PNG, XCF and -JPG@. Opaque formats include proprietary formats that can be -read and edited only by proprietary word processors, SGML or -XML for which the DTD and/or processing tools are -not generally available, and the machine-generated HTML, -PostScript or PDF produced by some word processors for -output purposes only. - -The ``Title Page'' means, for a printed book, the title page itself, -plus such following pages as are needed to hold, legibly, the material -this License requires to appear in the title page. For works in -formats which do not have any title page as such, ``Title Page'' means -the text near the most prominent appearance of the work's title, -preceding the beginning of the body of the text. - -The ``publisher'' means any person or entity that distributes copies -of the Document to the public. - -A section ``Entitled XYZ'' means a named subunit of the Document whose -title either is precisely XYZ or contains XYZ in parentheses following -text that translates XYZ in another language. (Here XYZ stands for a -specific section name mentioned below, such as ``Acknowledgements'', -``Dedications'', ``Endorsements'', or ``History''.) To ``Preserve the Title'' -of such a section when you modify the Document means that it remains a -section ``Entitled XYZ'' according to this definition. - -The Document may include Warranty Disclaimers next to the notice which -states that this License applies to the Document. These Warranty -Disclaimers are considered to be included by reference in this -License, but only as regards disclaiming warranties: any other -implication that these Warranty Disclaimers may have is void and has -no effect on the meaning of this License. - -@item -VERBATIM COPYING - -You may copy and distribute the Document in any medium, either -commercially or noncommercially, provided that this License, the -copyright notices, and the license notice saying this License applies -to the Document are reproduced in all copies, and that you add no other -conditions whatsoever to those of this License. You may not use -technical measures to obstruct or control the reading or further -copying of the copies you make or distribute. However, you may accept -compensation in exchange for copies. If you distribute a large enough -number of copies you must also follow the conditions in section 3. - -You may also lend copies, under the same conditions stated above, and -you may publicly display copies. - -@item -COPYING IN QUANTITY - -If you publish printed copies (or copies in media that commonly have -printed covers) of the Document, numbering more than 100, and the -Document's license notice requires Cover Texts, you must enclose the -copies in covers that carry, clearly and legibly, all these Cover -Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on -the back cover. Both covers must also clearly and legibly identify -you as the publisher of these copies. The front cover must present -the full title with all words of the title equally prominent and -visible. You may add other material on the covers in addition. -Copying with changes limited to the covers, as long as they preserve -the title of the Document and satisfy these conditions, can be treated -as verbatim copying in other respects. - -If the required texts for either cover are too voluminous to fit -legibly, you should put the first ones listed (as many as fit -reasonably) on the actual cover, and continue the rest onto adjacent -pages. - -If you publish or distribute Opaque copies of the Document numbering -more than 100, you must either include a machine-readable Transparent -copy along with each Opaque copy, or state in or with each Opaque copy -a computer-network location from which the general network-using -public has access to download using public-standard network protocols -a complete Transparent copy of the Document, free of added material. -If you use the latter option, you must take reasonably prudent steps, -when you begin distribution of Opaque copies in quantity, to ensure -that this Transparent copy will remain thus accessible at the stated -location until at least one year after the last time you distribute an -Opaque copy (directly or through your agents or retailers) of that -edition to the public. - -It is requested, but not required, that you contact the authors of the -Document well before redistributing any large number of copies, to give -them a chance to provide you with an updated version of the Document. - -@item -MODIFICATIONS - -You may copy and distribute a Modified Version of the Document under -the conditions of sections 2 and 3 above, provided that you release -the Modified Version under precisely this License, with the Modified -Version filling the role of the Document, thus licensing distribution -and modification of the Modified Version to whoever possesses a copy -of it. In addition, you must do these things in the Modified Version: - -@enumerate A -@item -Use in the Title Page (and on the covers, if any) a title distinct -from that of the Document, and from those of previous versions -(which should, if there were any, be listed in the History section -of the Document). You may use the same title as a previous version -if the original publisher of that version gives permission. - -@item -List on the Title Page, as authors, one or more persons or entities -responsible for authorship of the modifications in the Modified -Version, together with at least five of the principal authors of the -Document (all of its principal authors, if it has fewer than five), -unless they release you from this requirement. - -@item -State on the Title page the name of the publisher of the -Modified Version, as the publisher. - -@item -Preserve all the copyright notices of the Document. - -@item -Add an appropriate copyright notice for your modifications -adjacent to the other copyright notices. - -@item -Include, immediately after the copyright notices, a license notice -giving the public permission to use the Modified Version under the -terms of this License, in the form shown in the Addendum below. - -@item -Preserve in that license notice the full lists of Invariant Sections -and required Cover Texts given in the Document's license notice. - -@item -Include an unaltered copy of this License. - -@item -Preserve the section Entitled ``History'', Preserve its Title, and add -to it an item stating at least the title, year, new authors, and -publisher of the Modified Version as given on the Title Page. If -there is no section Entitled ``History'' in the Document, create one -stating the title, year, authors, and publisher of the Document as -given on its Title Page, then add an item describing the Modified -Version as stated in the previous sentence. - -@item -Preserve the network location, if any, given in the Document for -public access to a Transparent copy of the Document, and likewise -the network locations given in the Document for previous versions -it was based on. These may be placed in the ``History'' section. -You may omit a network location for a work that was published at -least four years before the Document itself, or if the original -publisher of the version it refers to gives permission. - -@item -For any section Entitled ``Acknowledgements'' or ``Dedications'', Preserve -the Title of the section, and preserve in the section all the -substance and tone of each of the contributor acknowledgements and/or -dedications given therein. - -@item -Preserve all the Invariant Sections of the Document, -unaltered in their text and in their titles. Section numbers -or the equivalent are not considered part of the section titles. - -@item -Delete any section Entitled ``Endorsements''. Such a section -may not be included in the Modified Version. - -@item -Do not retitle any existing section to be Entitled ``Endorsements'' or -to conflict in title with any Invariant Section. - -@item -Preserve any Warranty Disclaimers. -@end enumerate - -If the Modified Version includes new front-matter sections or -appendices that qualify as Secondary Sections and contain no material -copied from the Document, you may at your option designate some or all -of these sections as invariant. To do this, add their titles to the -list of Invariant Sections in the Modified Version's license notice. -These titles must be distinct from any other section titles. - -You may add a section Entitled ``Endorsements'', provided it contains -nothing but endorsements of your Modified Version by various -parties---for example, statements of peer review or that the text has -been approved by an organization as the authoritative definition of a -standard. - -You may add a passage of up to five words as a Front-Cover Text, and a -passage of up to 25 words as a Back-Cover Text, to the end of the list -of Cover Texts in the Modified Version. Only one passage of -Front-Cover Text and one of Back-Cover Text may be added by (or -through arrangements made by) any one entity. If the Document already -includes a cover text for the same cover, previously added by you or -by arrangement made by the same entity you are acting on behalf of, -you may not add another; but you may replace the old one, on explicit -permission from the previous publisher that added the old one. - -The author(s) and publisher(s) of the Document do not by this License -give permission to use their names for publicity for or to assert or -imply endorsement of any Modified Version. - -@item -COMBINING DOCUMENTS - -You may combine the Document with other documents released under this -License, under the terms defined in section 4 above for modified -versions, provided that you include in the combination all of the -Invariant Sections of all of the original documents, unmodified, and -list them all as Invariant Sections of your combined work in its -license notice, and that you preserve all their Warranty Disclaimers. - -The combined work need only contain one copy of this License, and -multiple identical Invariant Sections may be replaced with a single -copy. If there are multiple Invariant Sections with the same name but -different contents, make the title of each such section unique by -adding at the end of it, in parentheses, the name of the original -author or publisher of that section if known, or else a unique number. -Make the same adjustment to the section titles in the list of -Invariant Sections in the license notice of the combined work. - -In the combination, you must combine any sections Entitled ``History'' -in the various original documents, forming one section Entitled -``History''; likewise combine any sections Entitled ``Acknowledgements'', -and any sections Entitled ``Dedications''. You must delete all -sections Entitled ``Endorsements.'' - -@item -COLLECTIONS OF DOCUMENTS - -You may make a collection consisting of the Document and other documents -released under this License, and replace the individual copies of this -License in the various documents with a single copy that is included in -the collection, provided that you follow the rules of this License for -verbatim copying of each of the documents in all other respects. - -You may extract a single document from such a collection, and distribute -it individually under this License, provided you insert a copy of this -License into the extracted document, and follow this License in all -other respects regarding verbatim copying of that document. - -@item -AGGREGATION WITH INDEPENDENT WORKS - -A compilation of the Document or its derivatives with other separate -and independent documents or works, in or on a volume of a storage or -distribution medium, is called an ``aggregate'' if the copyright -resulting from the compilation is not used to limit the legal rights -of the compilation's users beyond what the individual works permit. -When the Document is included in an aggregate, this License does not -apply to the other works in the aggregate which are not themselves -derivative works of the Document. - -If the Cover Text requirement of section 3 is applicable to these -copies of the Document, then if the Document is less than one half of -the entire aggregate, the Document's Cover Texts may be placed on -covers that bracket the Document within the aggregate, or the -electronic equivalent of covers if the Document is in electronic form. -Otherwise they must appear on printed covers that bracket the whole -aggregate. - -@item -TRANSLATION - -Translation is considered a kind of modification, so you may -distribute translations of the Document under the terms of section 4. -Replacing Invariant Sections with translations requires special -permission from their copyright holders, but you may include -translations of some or all Invariant Sections in addition to the -original versions of these Invariant Sections. You may include a -translation of this License, and all the license notices in the -Document, and any Warranty Disclaimers, provided that you also include -the original English version of this License and the original versions -of those notices and disclaimers. In case of a disagreement between -the translation and the original version of this License or a notice -or disclaimer, the original version will prevail. - -If a section in the Document is Entitled ``Acknowledgements'', -``Dedications'', or ``History'', the requirement (section 4) to Preserve -its Title (section 1) will typically require changing the actual -title. - -@item -TERMINATION - -You may not copy, modify, sublicense, or distribute the Document -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense, or distribute it is void, and -will automatically terminate your rights under this License. - -However, if you cease all violation of this License, then your license -from a particular copyright holder is reinstated (a) provisionally, -unless and until the copyright holder explicitly and finally -terminates your license, and (b) permanently, if the copyright holder -fails to notify you of the violation by some reasonable means prior to -60 days after the cessation. - -Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - -Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, receipt of a copy of some or all of the same material does -not give you any rights to use it. - -@item -FUTURE REVISIONS OF THIS LICENSE - -The Free Software Foundation may publish new, revised versions -of the GNU Free Documentation License from time to time. Such new -versions will be similar in spirit to the present version, but may -differ in detail to address new problems or concerns. See -@uref{http://www.gnu.org/copyleft/}. - -Each version of the License is given a distinguishing version number. -If the Document specifies that a particular numbered version of this -License ``or any later version'' applies to it, you have the option of -following the terms and conditions either of that specified version or -of any later version that has been published (not as a draft) by the -Free Software Foundation. If the Document does not specify a version -number of this License, you may choose any version ever published (not -as a draft) by the Free Software Foundation. If the Document -specifies that a proxy can decide which future versions of this -License can be used, that proxy's public statement of acceptance of a -version permanently authorizes you to choose that version for the -Document. - -@item -RELICENSING - -``Massive Multiauthor Collaboration Site'' (or ``MMC Site'') means any -World Wide Web server that publishes copyrightable works and also -provides prominent facilities for anybody to edit those works. A -public wiki that anybody can edit is an example of such a server. A -``Massive Multiauthor Collaboration'' (or ``MMC'') contained in the -site means any set of copyrightable works thus published on the MMC -site. - -``CC-BY-SA'' means the Creative Commons Attribution-Share Alike 3.0 -license published by Creative Commons Corporation, a not-for-profit -corporation with a principal place of business in San Francisco, -California, as well as future copyleft versions of that license -published by that same organization. - -``Incorporate'' means to publish or republish a Document, in whole or -in part, as part of another Document. - -An MMC is ``eligible for relicensing'' if it is licensed under this -License, and if all works that were first published under this License -somewhere other than this MMC, and subsequently incorporated in whole -or in part into the MMC, (1) had no cover texts or invariant sections, -and (2) were thus incorporated prior to November 1, 2008. - -The operator of an MMC Site may republish an MMC contained in the site -under CC-BY-SA on the same site at any time before August 1, 2009, -provided the MMC is eligible for relicensing. - -@end enumerate - -@page -@heading ADDENDUM: How to use this License for your documents - -To use this License in a document you have written, include a copy of -the License in the document and put the following copyright and -license notices just after the title page: - -@smallexample -@group - Copyright (C) @var{year} @var{your name}. - Permission is granted to copy, distribute and/or modify this document - under the terms of the GNU Free Documentation License, Version 1.3 - or any later version published by the Free Software Foundation; - with no Invariant Sections, no Front-Cover Texts, and no Back-Cover - Texts. A copy of the license is included in the section entitled ``GNU - Free Documentation License''. -@end group -@end smallexample - -If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, -replace the ``with@dots{}Texts.''@: line with this: - -@smallexample -@group - with the Invariant Sections being @var{list their titles}, with - the Front-Cover Texts being @var{list}, and with the Back-Cover Texts - being @var{list}. -@end group -@end smallexample - -If you have Invariant Sections without Cover Texts, or some other -combination of the three, merge those two alternatives to suit the -situation. - -If your document contains nontrivial examples of program code, we -recommend releasing these examples in parallel under your choice of -free software license, such as the GNU General Public License, -to permit their use in free software. - -@c Local Variables: -@c ispell-local-pdict: "ispell-dict" -@c End: diff --git a/doc/gdoc b/doc/gdoc deleted file mode 100755 index e3db762..0000000 --- a/doc/gdoc +++ /dev/null @@ -1,1069 +0,0 @@ -eval '(exit $?0)' && eval 'exec perl "$0" ${1+"$@"}' - & eval 'exec perl "$0" $argv:q' - if 0; - -## Copyright (c) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Simon Josefsson -## added -texinfo, -listfunc, -pkg-name -## man page revamp -## various improvements -## Copyright (c) 2001, 2002 Nikos Mavrogiannopoulos -## added -tex -## Copyright (c) 1998 Michael Zucchi -## Copyright (c) 2013 Adam Sampson -## made highlighting not depend on hash order, for Perl 5.18 - -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# This will read a C source code file and scan for embedded comments -# in the style of gnome comments (+minor extensions - see below). - -# usage: -# gdoc [ -docbook | -html | -text | -man | -tex | -texinfo | -listfunc ] -# [ -sourceversion verno ] [ -include file | -includefuncprefix ] -# [ -bugsto address ] [ -pkg-name packagename ] -# [ -seeinfo infonode ] [ -copyright notice ] [ -verbatimcopying ] -# [ -function funcname [ -function funcname ...] ] c file(s)s > outputfile -# -# Set output format using one of -docbook, -html, -text, -man, -tex, -# -texinfo, or -listfunc. Default is man. -# -# -sourceversion -# Version number for source code, e.g. '1.0.4'. Used in 'man' headers. -# Defaults to using current date. -# -# -include FILE -# For man pages, mention #include in the synopsis. -# -# -includefuncprefix -# For man pages, mention a #include in the synopsis. -# The FILE derived from the function prefix. For example, a -# function gss_init_sec_context will generate an include -# statement of #include . -# -# -bugsto address -# For man pages, include a section about reporting bugs and mention -# the given e-mail address, e.g 'bug-libidn@gnu.org'. -# -# -pkg-name packagename -# For man pages when -bugsto is used, also include help URLs to the -# the project's home page. For example, "GNU Libidn". -# -# -seeinfo infonode -# For man pages, include a section that point to an info manual -# for more information. -# -# -copyright notice -# For man pages, include a copyright section with the given -# notice after a preamble. Use, e.g., '2002, 2003 Simon Josefsson'. -# -# -verbatimcopying -# For man pages, and when the -copyright parameter is used, -# add a licensing statement that say verbatim copying is permitted. -# -# -function funcname -# If set, then only generate documentation for the given function(s). All -# other functions are ignored. -# -# c files - list of 'c' files to process -# -# All output goes to stdout, with errors to stderr. - -# -# format of comments. -# In the following table, (...)? signifies optional structure. -# (...)* signifies 0 or more structure elements -# /** -# * function_name(:)? (- short description)? -# (* @parameterx: (description of parameter x)?)* -# (* a blank line)? -# * (Description:)? (Description of function)? -# * (Section header: (section description)? )* -# (*)?*/ -# -# So .. the trivial example would be: -# -# /** -# * my_function -# **/ -# -# If the Description: header tag is ommitted, then there must be a blank line -# after the last parameter specification. -# e.g. -# /** -# * my_function - does my stuff -# * @my_arg: its mine damnit -# * -# * Does my stuff explained. -# */ -# -# or, could also use: -# /** -# * my_function - does my stuff -# * @my_arg: its mine damnit -# * Description: Does my stuff explained. -# */ -# etc. -# -# All descriptions can be multiline, apart from the short function description. -# -# All descriptive text is further processed, scanning for the following special -# patterns, which are highlighted appropriately. -# -# 'funcname()' - function -# '$ENVVAR' - environmental variable OBSOLETE (?) -# '#struct_name' - name of a structure -# '@parameter' - name of a parameter -# '%CONST' - name of a constant. - -# -# Extensions for LaTeX: -# -# 1. the symbol '->' will be replaced with a rightarrow -# 2. x^y with ${x}^{y}$. -# 3. xxx\: with xxx: - -use POSIX qw(strftime); - -# match expressions used to find embedded type information -$type_constant = "\\\%([A-Za-z0-9_]+)"; -$type_func = "([A-Za-z0-9_]+\\(\\))"; -$type_param = '\@([A-Za-z0-9_]+)\s*'; -$type_struct = "\\\#([A-Za-z0-9_]+)"; -$type_env = "(\\\$[A-Za-z0-9_]+)"; - - -# Output conversion substitutions. -# One for each output format - -# these work fairly well -@highlights_html = ( [$type_constant, '"$1"'], - [$type_func, '"$1"'], - [$type_struct, '"$1"'], - [$type_param, '" $1 "'] ); -$blankline_html = "

"; - -@highlights_texinfo = ( [$type_param, '" \@code{$1} "'], - [$type_constant, '"\@code{$1} "'], - [$type_func, '"\@code{$1} "'], - [$type_struct, '"\@code{$1} "'], - ); -$blankline_texinfo = ""; - -@highlights_tex = ( [$type_param, '" {\\\bf $1} "'], - [$type_constant, '"{\\\it $1}"'], - [$type_func, '"{\\\bf $1}"'], - [$type_struct, '"{\\\it $1}"'], - ); -$blankline_tex = "\\\\"; - -# sgml, docbook format -@highlights_sgml = ( [$type_constant, '"$1"'], - [$type_func, '"$1"'], - [$type_struct, '"$1"'], - [$type_env, '"$1"'], - [$type_param, '" $1 "'] ); -$blankline_sgml = "\n"; - -# these are pretty rough -@highlights_man = ( [$type_constant, '"\\\fB$1\\\fP"'], - [$type_func, '"\\\fB$1\\\fP"'], - [$type_struct, '"\\\fB$1\\\fP"'], - [$type_param, '" \\\fI$1\\\fP "'] ); -$blankline_man = ""; - -# text-mode -@highlights_text = ( [$type_constant, '"$1"'], - [$type_func, '"$1"'], - [$type_struct, '"$1"'], - [$type_param, '"$1 "'] ); -$blankline_text = ""; -my $lineprefix = ""; - -sub usage { - print "Usage: $0 [ -v ] [ -docbook | -html | -text | -man | -tex | -texinfo -listfunc ]\n"; - print " [ -sourceversion verno ] [ -include file | -includefuncprefix ]\n"; - print " [ -bugsto address ] [ -seeinfo infonode ] [ -copyright notice]\n"; - print " [ -verbatimcopying ] [ -pkg-name packagename ]\n"; - print " [ -function funcname [ -function funcname ...] ]\n"; - print " c source file(s) > outputfile\n"; - exit 1; -} - -# read arguments -if ($#ARGV==-1) { - usage(); -} - -$verbose = 0; -$output_mode = "man"; -@highlights = @highlights_man; -$blankline = $blankline_man; -$modulename = "API Documentation"; -$sourceversion = strftime "%Y-%m-%d", localtime; -$function_only = 0; -while ($ARGV[0] =~ m/^-(.*)/) { - $cmd = shift @ARGV; - if ($cmd eq "-html") { - $output_mode = "html"; - @highlights = @highlights_html; - $blankline = $blankline_html; - } elsif ($cmd eq "-man") { - $output_mode = "man"; - @highlights = @highlights_man; - $blankline = $blankline_man; - } elsif ($cmd eq "-tex") { - $output_mode = "tex"; - @highlights = @highlights_tex; - $blankline = $blankline_tex; - } elsif ($cmd eq "-texinfo") { - $output_mode = "texinfo"; - @highlights = @highlights_texinfo; - $blankline = $blankline_texinfo; - } elsif ($cmd eq "-text") { - $output_mode = "text"; - @highlights = @highlights_text; - $blankline = $blankline_text; - } elsif ($cmd eq "-docbook") { - $output_mode = "sgml"; - @highlights = @highlights_sgml; - $blankline = $blankline_sgml; - } elsif ($cmd eq "-listfunc") { - $output_mode = "listfunc"; - } elsif ($cmd eq "-module") { # not needed for sgml, inherits from calling document - $modulename = shift @ARGV; - } elsif ($cmd eq "-sourceversion") { - $sourceversion = shift @ARGV; - } elsif ($cmd eq "-include") { - $include = shift @ARGV; - } elsif ($cmd eq "-includefuncprefix") { - $includefuncprefix = 1; - } elsif ($cmd eq "-bugsto") { - $bugsto = shift @ARGV; - } elsif ($cmd eq "-pkg-name") { - $pkgname = shift @ARGV; - } elsif ($cmd eq "-copyright") { - $copyright = shift @ARGV; - } elsif ($cmd eq "-verbatimcopying") { - $verbatimcopying = 1; - } elsif ($cmd eq "-seeinfo") { - $seeinfo = shift @ARGV; - } elsif ($cmd eq "-function") { # to only output specific functions - $function_only = 1; - $function = shift @ARGV; - $function_table{$function} = 1; - } elsif ($cmd eq "-v") { - $verbose = 1; - } elsif (($cmd eq "-h") || ($cmd eq "--help")) { - usage(); - } -} - -## -# dumps section contents to arrays/hashes intended for that purpose. -# -sub dump_section { - my $name = shift @_; - my $contents = join "\n", @_; - - $name = " $name"; - - if ($name =~ m/$type_constant/) { - $name = $1; -# print STDERR "constant section '$1' = '$contents'\n"; - $constants{$name} = $contents; - } elsif ($name =~ m/$type_param/) { -# print STDERR "parameter def '$1' = '$contents'\n"; - $name = $1; - $parameters{$name} = $contents; - } else { -# print STDERR "other section '$name' = '$contents'\n"; - $name =~ tr/ //d; - $sections{$name} = $contents; - push @sectionlist, $name; - } -} - -## -# output function -# -# parameters, a hash. -# function => "function name" -# parameterlist => @list of parameters -# parameters => %parameter descriptions -# sectionlist => @list of sections -# sections => %descriont descriptions -# - -sub just_highlight { - my $contents = join "\n", @_; - my $line; - my $ret = ""; - - foreach $highlight (@highlights) { - my ($pattern, $replace) = @$highlight; - #print "scanning pattern $pattern ($replace)\n"; - $contents =~ s/$pattern/$replace/gees; - } - foreach $line (split "\n", $contents) { - if ($line eq ""){ - $ret = $ret . $lineprefix . $blankline; - } else { - $ret = $ret . $lineprefix . $line; - } - $ret = $ret . "\n"; - } - - return $ret; -} - -sub output_highlight { - print (just_highlight (@_)); -} - -# output in texinfo -sub output_texinfo { - my %args = %{$_[0]}; - my ($parameter, $section); - my $count; - - print "\@subheading ".$args{'function'}."\n"; - print "\@anchor{".$args{'function'}."}\n"; - print "\@deftypefun {" . $args{'functiontype'} . "} "; - print "{".$args{'function'}."} "; - print "("; - $count = 0; - foreach $parameter (@{$args{'parameterlist'}}) { - print $args{'parametertypes'}{$parameter}." \@var{".$parameter."}"; - if ($count != $#{$args{'parameterlist'}}) { - $count++; - print ", "; - } - } - print ")\n"; - foreach $parameter (@{$args{'parameterlist'}}) { - if ($args{'parameters'}{$parameter}) { - print "\@var{".$parameter."}: "; - output_highlight($args{'parameters'}{$parameter}); - print "\n"; - } - } - foreach $section (@{$args{'sectionlist'}}) { - $section =~ s/\@//g; - print "\n\@strong{$section:} " if $section ne $section_default; - $args{'sections'}{$section} =~ s:([{}]):\@$1:gs; - output_highlight($args{'sections'}{$section}); - } - print "\@end deftypefun\n\n"; -} - -sub output_enum_texinfo { - my %args = %{$_[0]}; - my ($parameter, $section); - my $count; - my $name = $args{'enum'}; - my $param; - my $param2; - my $sec; - my $check; - my $type; - - print "\n\@c $name\n"; - print "\@table \@code\n"; - - $check=0; - foreach $parameter (@{$args{'parameterlist'}}) { - $param1 = $parameter; - $param1 =~ s/_/_\@-/g; - - $check = 1; - print "\@item ".$param1."\n"; -# print "\n"; - - $param2 = $args{'parameters'}{$parameter}; - $out = just_highlight($param2); - chomp $out; - print $out . "\n"; - } - print "\@end table\n"; -} - -# output in html -sub output_html { - my %args = %{$_[0]}; - my ($parameter, $section); - my $count; - print "\n\n 

Function

\n"; - - print "".$args{'functiontype'}."\n"; - print "".$args{'function'}."\n"; - print "("; - $count = 0; - foreach $parameter (@{$args{'parameterlist'}}) { - print "".$args{'parametertypes'}{$parameter}." ".$parameter."\n"; - if ($count != $#{$args{'parameterlist'}}) { - $count++; - print ", "; - } - } - print ")\n"; - - print "

Arguments

\n"; - print "
\n"; - foreach $parameter (@{$args{'parameterlist'}}) { - print "
".$args{'parametertypes'}{$parameter}." ".$parameter."\n"; - print "
"; - output_highlight($args{'parameters'}{$parameter}); - } - print "
\n"; - foreach $section (@{$args{'sectionlist'}}) { - print "

$section

\n"; - print "
    \n"; - output_highlight($args{'sections'}{$section}); - print "
\n"; - } - print "
\n"; -} - -# output in tex -sub output_tex { - my %args = %{$_[0]}; - my ($parameter, $section); - my $count; - my $func = $args{'function'}; - my $param; - my $param2; - my $sec; - my $check; - my $type; - - $func =~ s/_/\\_/g; - - print "\n\n\\begin{function}\n"; - print "\\functionTitle{". $func . "}\n"; - print "\\index{". $func . "}\n"; - - $type = $args{'functiontype'}; - $type =~ s/_/\\_/g; - - print "{\\it ".$type."}\n"; - print "{\\bf ".$func."}\n"; - print "("; - $count = 0; - foreach $parameter (@{$args{'parameterlist'}}) { - $param = $args{'parametertypes'}{$parameter}; - $param2 = $parameter; - $param =~ s/_/\\_/g; - $param2 =~ s/_/\\_/g; - - print "{\\it ".$param."} {\\bf ".$param2."}"; - if ($count != $#{$args{'parameterlist'}}) { - $count++; - print ", "; - } - } - print ")\n"; - - print "\n\\begin{functionArguments}\n"; - - $check=0; - foreach $parameter (@{$args{'parameterlist'}}) { - $param1 = $args{'parametertypes'}{$parameter}; - $param1 =~ s/_/\\_/g; - $param2 = $parameter; - $param2 =~ s/_/\\_/g; - - $check = 1; - print "\\functionArgument {\\it ".$param1."} {\\bf ".$param2."}: \n"; -# print "\n"; - - $param3 = $args{'parameters'}{$parameter}; - $param3 =~ s/\#([a-zA-Z\_]+)/{\\it $1}/g; - $param3 =~ s/\%([a-zA-Z\_]+)/{\\bf $1}/g; - - $out = just_highlight($param3); - $out =~ s/_/\\_/g; - print $out; - } - if ($check==0) { - print "\\item void\n"; - } - print "\\end{functionArguments}\n"; - - foreach $section (@{$args{'sectionlist'}}) { - $sec = $section; - $sec =~ s/_/\\_/g; - $sec =~ s/#([a-zA-Z\_]+)/{\\it $1}/g; - - print "\n\\begin{function${sec}}\n"; - $out = $args{'sections'}{$section}; - - $out =~ s/\#([a-zA-Z\_]+)/{\\it $1}/g; - $out =~ s/\%([a-zA-Z\_]+)/{\\bf $1}/g; - $out =~ s/\@([a-zA-Z\_]+)/{\\bf $1}/g; - $out =~ s/_/\\_\\-/g; - $out =~ s/\$/\\\$/g; - $out =~ s/#/\\#/g; - $out =~ s/\n\n/\n/g; - $out =~ s/\\:/:/g; - $out =~ s/\-\>/\$\\rightarrow\$/g; - $out =~ s/([0-9]+)\^([0-9]+)/\$\{$1\}\^\{$2\}\$/g; - - print $out; - print "\\end{function${sec}}\n"; - } - print "\\end{function}\n\n"; -} - -sub output_enum_tex { - my %args = %{$_[0]}; - my ($parameter, $section); - my $count; - my $name = $args{'enum'}; - my $param; - my $param2; - my $sec; - my $check; - my $type; - - print "\n\n\\begin{enum}\n"; - $name =~ s/_/\\_/g; - print "\\enumTitle{". $name . "}\n"; - print "\\index{". $name . "}\n"; - - print "\n\\begin{enumList}\n"; - - $check=0; - foreach $parameter (@{$args{'parameterlist'}}) { - $param1 = $parameter; - $param1 =~ s/_/\\_\\-/g; - - $check = 1; - print "\\enumElement{".$param1."}{"; -# print "\n"; - - $param2 = $args{'parameters'}{$parameter}; - $param2 =~ s/\#([a-zA-Z\_]+)/{\\it $1}/g; - $param2 =~ s/\%([a-zA-Z\_]+)/{\\bf $1}/g; - $out = just_highlight($param2); - $out =~ s/_/\\_/g; - chomp $out; - print $out . "}\n"; - } - print "\\end{enumList}\n"; - - print "\\end{enum}\n\n"; -} - -# output in sgml DocBook -sub output_sgml { - my %args = %{$_[0]}; - my ($parameter, $section); - my $count; - my $id; - - $id = $args{'module'}."-".$args{'function'}; - $id =~ s/[^A-Za-z0-9]/-/g; - - print "\n"; - print "\n"; - print "".$args{'function'}."\n"; - print "\n"; - print "\n"; - print " ".$args{'function'}."\n"; - print " \n"; - print " ".$args{'purpose'}."\n"; - print " \n"; - print "\n"; - - print "\n"; - print " Synopsis\n"; - print " \n"; - print " ".$args{'functiontype'}." "; - print "".$args{'function'}." "; - print "\n"; - -# print "\n"; -# print " Synopsis\n"; -# print " \n"; -# print " ".$args{'functiontype'}." "; -# print "".$args{'function'}." "; -# print "\n"; - - $count = 0; - if ($#{$args{'parameterlist'}} >= 0) { - foreach $parameter (@{$args{'parameterlist'}}) { - print " ".$args{'parametertypes'}{$parameter}; - print " $parameter\n"; - } - } else { - print " \n"; - } - print " \n"; - print "\n"; -# print "\n"; - - # print parameters - print "\n Arguments\n"; -# print "\nArguments\n"; - if ($#{$args{'parameterlist'}} >= 0) { - print " \n"; - foreach $parameter (@{$args{'parameterlist'}}) { - print " \n $parameter\n"; - print " \n \n"; - $lineprefix=" "; - output_highlight($args{'parameters'}{$parameter}); - print " \n \n \n"; - } - print " \n"; - } else { - print " \n None\n \n"; - } - print "\n"; - - # print out each section - $lineprefix=" "; - foreach $section (@{$args{'sectionlist'}}) { - print "\n $section\n \n"; -# print "\n$section\n"; - if ($section =~ m/EXAMPLE/i) { - print "\n"; - } - output_highlight($args{'sections'}{$section}); -# print ""; - if ($section =~ m/EXAMPLE/i) { - print "\n"; - } - print " \n\n"; - } - - print "\n\n"; -} - -## -# output in man -sub output_man { - my %args = %{$_[0]}; - my ($parameter, $section); - my $count; - - print ".\\\" DO NOT MODIFY THIS FILE! It was generated by gdoc.\n"; - print ".TH \"$args{'function'}\" 3 \"$args{'sourceversion'}\" \"". $args{'module'} . "\" \"". $args{'module'} . "\"\n"; - - print ".SH NAME\n"; - - print $args{'function'}; - if ($args{'purpose'}) { - print " \\- " . $args{'purpose'} . "\n"; - } else { - print " \\- API function\n"; - } - - print ".SH SYNOPSIS\n"; - print ".B #include <". $args{'include'} . ">\n" - if $args{'include'}; - print ".B #include <". lc((split /_/, $args{'function'})[0]) . ".h>\n" - if $args{'includefuncprefix'}; - print ".sp\n"; - print ".BI \"".$args{'functiontype'}." ".$args{'function'}."("; - $count = 0; - foreach $parameter (@{$args{'parameterlist'}}) { - print $args{'parametertypes'}{$parameter}." \" ".$parameter." \""; - if ($count != $#{$args{'parameterlist'}}) { - $count++; - print ", "; - } - } - print ");\"\n"; - - print ".SH ARGUMENTS\n"; - foreach $parameter (@{$args{'parameterlist'}}) { - print ".IP \"".$args{'parametertypes'}{$parameter}." ".$parameter."\" 12\n"; - $param = $args{'parameters'}{$parameter}; - $param =~ s/-/\\-/g; - output_highlight($param); - } - foreach $section (@{$args{'sectionlist'}}) { - print ".SH \"" . uc($section) . "\"\n"; - $sec = $args{'sections'}{$section}; - $sec =~ s/-/\\-/g; - output_highlight($sec); - } - - if ($args{'bugsto'}) { - print ".SH \"REPORTING BUGS\"\n"; - print "Report bugs to <". $args{'bugsto'} . ">.\n"; - print ".br\n"; - print "General guidelines for reporting bugs: http://www.gnu.org/gethelp/\n"; - print ".br\n"; - if ($args{'pkgname'}) { - print $args{'pkgname'} . " home page: " . - "http://www.gnu.org/software/" . $args{'module'} . "/\n"; - } - print "\n"; - } - - if ($args{'copyright'}) { - print ".SH COPYRIGHT\n"; - print "Copyright \\(co ". $args{'copyright'} . ".\n"; - if ($args{'verbatimcopying'}) { - print ".br\n"; - print "Copying and distribution of this file, with or without modification,\n"; - print "are permitted in any medium without royalty provided the copyright\n"; - print "notice and this notice are preserved.\n"; - } - } - - if ($args{'seeinfo'}) { - print ".SH \"SEE ALSO\"\n"; - print "The full documentation for\n"; - print ".B " . $args{'module'} . "\n"; - print "is maintained as a Texinfo manual. If the\n"; - print ".B info\n"; - print "and\n"; - print ".B " . $args{'module'} . "\n"; - print "programs are properly installed at your site, the command\n"; - print ".IP\n"; - print ".B info " . $args{'seeinfo'} . "\n"; - print ".PP\n"; - print "should give you access to the complete manual.\n"; - print "As an alternative you may obtain the manual from:\n"; - print ".IP\n"; - print ".B http://www.gnu.org/software/" . $args{'module'} . "/manual/\n"; - print ".PP\n"; - } -} - -sub output_listfunc { - my %args = %{$_[0]}; - print $args{'function'} . "\n"; -} - -## -# output in text -sub output_text { - my %args = %{$_[0]}; - my ($parameter, $section); - - print "Function = ".$args{'function'}."\n"; - print " return type: ".$args{'functiontype'}."\n\n"; - foreach $parameter (@{$args{'parameterlist'}}) { - print " ".$args{'parametertypes'}{$parameter}." ".$parameter."\n"; - print " -> ".$args{'parameters'}{$parameter}."\n"; - } - foreach $section (@{$args{'sectionlist'}}) { - print " $section:\n"; - print " -> "; - output_highlight($args{'sections'}{$section}); - } -} - -## -# generic output function - calls the right one based -# on current output mode. -sub output_function { -# output_html(@_); - eval "output_".$output_mode."(\@_);"; -} - -sub output_enum { - eval "output_enum_".$output_mode."(\@_);"; -} - - -## -# takes a function prototype and spits out all the details -# stored in the global arrays/hsahes. -sub dump_function { - my $prototype = shift @_; - - if ($prototype =~ m/^()([a-zA-Z0-9_~:]+)\s*\(([^\)]*)\)/ || - $prototype =~ m/^(\w+)\s+([a-zA-Z0-9_~:]+)\s*\(([^\)]*)\)/ || - $prototype =~ m/^(\w+\s*\*)\s*([a-zA-Z0-9_~:]+)\s*\(([^\)]*)\)/ || - $prototype =~ m/^(\w+\s+\w+)\s+([a-zA-Z0-9_~:]+)\s*\(([^\)]*)\)/ || - $prototype =~ m/^(\w+\s+\w+\s*\*)\s*([a-zA-Z0-9_~:]+)\s*\(([^\)]*)\)/) { - $return_type = $1; - $function_name = $2; - $args = $3; - -# print STDERR "ARGS = '$args'\n"; - - foreach $arg (split ',', $args) { - # strip leading/trailing spaces - $arg =~ s/^\s*//; - $arg =~ s/\s*$//; -# print STDERR "SCAN ARG: '$arg'\n"; - @args = split('\s', $arg); - -# print STDERR " -> @args\n"; - $param = pop @args; -# print STDERR " -> @args\n"; - if ($param =~ m/^(\*+)(.*)/) { - $param = $2; - push @args, $1; - } - if ($param =~ m/^(.*)(\[\])$/) { - $param = $1; - push @args, $2; - } -# print STDERR " :> @args\n"; - $type = join " ", @args; - - if ((!defined($parameters{$param}) || $parameters{$param} eq "") && $param ne "void") { - $parameters{$param} = "-- undescribed --"; - print STDERR "warning: $lineno: Function parameter '$param' not described in '$function_name'\n"; - } - - push @parameterlist, $param; - $parametertypes{$param} = $type; - -# print STDERR "param = '$param', type = '$type'\n"; - } - } else { - print STDERR "warning: $lineno: Cannot understand prototype: '$prototype'\n"; - return; - } - - if ($function_only==0 || defined($function_table{$function_name})) { - output_function({'function' => $function_name, - 'module' => $modulename, - 'sourceversion' => $sourceversion, - 'include' => $include, - 'includefuncprefix' => $includefuncprefix, - 'bugsto' => $bugsto, - 'pkgname' => $pkgname, - 'copyright' => $copyright, - 'verbatimcopying' => $verbatimcopying, - 'seeinfo' => $seeinfo, - 'functiontype' => $return_type, - 'parameterlist' => \@parameterlist, - 'parameters' => \%parameters, - 'parametertypes' => \%parametertypes, - 'sectionlist' => \@sectionlist, - 'sections' => \%sections, - 'purpose' => $function_purpose - }); - } -} - -sub dump_enum { - my $prototype = shift @_; - - if (($prototype =~ m/^\s*typedef\s+enum\s*[a-zA-Z0-9_~:]*\s*\{([\-a-zA-Z0-9_~=,:\s\(\)\<]+)\s*\}\s*([a-zA-Z0-9_]+);.*/)) { -# || $prototype =~ m/^\s*enum\s+([a-zA-Z0-9_~:]+).*/) { - $args = $1; - $name = $2; - - foreach $arg (split ',', $args) { - # strip leading/trailing spaces - $arg =~ s/^\s*//; - $arg =~ s/\s*$//; - $arg =~ s/([A-Za-z0-9_]+)\s*=.*/$1/g; -# print STDERR "SCAN ARG: '$arg'\n"; - - next if $arg eq ''; - if ((!defined($parameters{$arg}) || $parameters{$arg} eq "")) { - $parameters{$arg} = "-- undescribed --"; - print STDERR "warning: $lineno: Enumeration parameter '$arg' not described in '$name'\n"; - } - - push @parameterlist, $arg; - -# print STDERR "param = '$arg'\n"; - } - } else { -# print STDERR "warning: $lineno: Cannot understand enumeration: '$prototype'\n"; - return; - } - - output_enum({'enum' => $name, - 'module' => $modulename, - 'sourceversion' => $sourceversion, - 'include' => $include, - 'includefuncprefix' => $includefuncprefix, - 'bugsto' => $bugsto, - 'pkgname' => $pkgname, - 'copyright' => $copyright, - 'verbatimcopying' => $verbatimcopying, - 'seeinfo' => $seeinfo, - 'functiontype' => $return_type, - 'parameterlist' => \@parameterlist, - 'parameters' => \%parameters, - 'parametertypes' => \%parametertypes, - 'sectionlist' => \@sectionlist, - 'sections' => \%sections, - 'purpose' => $function_purpose - }); -} - -###################################################################### -# main -# states -# 0 - normal code -# 1 - looking for function name -# 2 - scanning field start. -# 3 - scanning prototype. -$state = 0; -$section = ""; - -$doc_special = "\@\%\$\#"; - -$doc_start = "^/\\*\\*\$"; -$doc_end = "\\*/"; -$doc_com = "\\s*\\*\\s*"; -$doc_func = $doc_com."(\\w+):?"; -$doc_sect = $doc_com."([".$doc_special."[:upper:]][\\w]+):\\s*(.*)"; -$doc_content = $doc_com."(.*)"; - -%constants = (); -%parameters = (); -@parameterlist = (); -%sections = (); -@sectionlist = (); - -$contents = ""; -$section_default = "Description"; # default section -$section = $section_default; -$enum = 0; - -$lineno = 0; - -foreach $file (@ARGV) { - if (!open(IN,"<$file")) { - print STDERR "Error: Cannot open file $file\n"; - next; - } - while ($line = ) { - $lineno++; - - if ($state == 0) { - if ($line =~ /$doc_start/o) { - $state = 1; # next line is always the function name -# print STDERR "XXX: start of doc comment\n"; - } - } elsif ($state == 1) { # this line is the function name (always) - if ($line =~ /$doc_func/o) { - $function = $1; - $state = 2; -# print STDERR "XXX: start of doc comment, looking for prototype\n"; - - if ($line =~ /-\s*(.*)/) { - $function_purpose = $1; - } else { - $function_purpose = ""; - } - if ($verbose) { - print STDERR "Info($lineno): Scanning doc for $function\n"; - } - } else { - print STDERR "warning: $lineno: Cannot understand $_ on line $lineno", - " - I thought it was a doc line\n"; - $state = 0; - } - } elsif ($state == 2) { # look for head: lines, and include content - if ($line =~ /$doc_sect/o) { - $newsection = $1; - $newcontents = $2; - - if ($contents ne '') { - dump_section($section, $contents); - $section = $section_default; - } - - $contents = $newcontents; - if ($contents ne "") { - $contents .= "\n"; - } - $section = $newsection; - } elsif ($line =~ /$doc_end/) { - - if ($contents ne "") { - dump_section($section, $contents); - $section = $section_default; - $contents = ""; - } - - $prototype = ''; - $state = 3; - } elsif ($line =~ /$doc_content/) { - # miguel-style comment kludge, look for blank lines after - # @parameter line to signify start of description - if ($1 eq '' && $section =~ m/^@/) { - dump_section($section, $contents); - $section = $section_default; - $contents = ""; - } else { - $contents .= $1."\n"; - } - } else { - # i dont know - bad line? ignore. - print STDERR "warning: $lineno: Bad line: $_"; - } - } elsif ($state == 3) { # scanning for function { (end of prototype) - if ($line =~ /([a-zA-Z\s]+)enum(.*)$/) { - $enum = 1; - } - - if ($line =~ m#\s*/\*\s+MACDOC\s*#io) { - # do nothing - } - elsif ($enum == 1 && $line =~ /(\s*\{).*/) { - $prototype = "typedef enum {"; - } - elsif ($line =~ /([^\{]*)/) { - $prototype .= $1; - } - - if ($enum == 0 && $line =~ /;/) { - $prototype =~ s@/\*.*?\*/@@gos; # strip comments. - $prototype =~ s@[\r\n]+@ @gos; # strip newlines/cr's. - $prototype =~ s@^ +@@gos; # strip leading spaces - - dump_function($prototype); - - $function = ""; - %constants = (); - %parameters = (); - %parametertypes = (); - @parameterlist = (); - %sections = (); - @sectionlist = (); - $prototype = ""; - $enum = 0; - - $state = 0; - } - elsif ($enum == 1 && $line =~ /\}/) { - $prototype =~ s@/\*.*?\*/@@gos; # strip comments. - $prototype =~ s@[\r\n]+@ @gos; # strip newlines/cr's. - $prototype =~ s@^ +@@gos; # strip leading spaces - - dump_enum($prototype); - - $function = ""; - %constants = (); - %parameters = (); - %parametertypes = (); - @parameterlist = (); - %sections = (); - @sectionlist = (); - $prototype = ""; - $enum = 0; - - $state = 0; - } - - } - } - -} diff --git a/doc/gendocs_template b/doc/gendocs_template deleted file mode 100644 index a7cfbf8..0000000 --- a/doc/gendocs_template +++ /dev/null @@ -1,100 +0,0 @@ - - -%%TITLE%% - GNU Project - Free Software Foundation - -

%%TITLE%%

- -
Free Software Foundation
-
last updated %%DATE%%
- -

This manual (%%PACKAGE%%) is available in the following formats:

- - - -

You can buy printed copies of -some manuals (among other items) from the Free Software Foundation; -this helps support FSF activities.

- -

There is also an API reference manual: - -

-

- -

(This page generated by the %%SCRIPTNAME%% -script.)

- - - - - - - - diff --git a/doc/libtasn1.texi b/doc/libtasn1.texi deleted file mode 100644 index 7fabd21..0000000 --- a/doc/libtasn1.texi +++ /dev/null @@ -1,509 +0,0 @@ -\input texinfo @c -*-texinfo-*- -@comment %**start of header -@setfilename libtasn1.info -@include version.texi -@settitle GNU Libtasn1 @value{VERSION} - -@c Unify some of the indices. -@syncodeindex tp fn -@syncodeindex pg fn - -@comment %**end of header -@copying -This manual is for GNU Libtasn1 -(version @value{VERSION}, @value{UPDATED}), -which is a library for Abstract Syntax Notation One (ASN.1) and -Distinguished Encoding Rules (DER) manipulation. - -Copyright @copyright{} 2001-2015 Free Software Foundation, Inc. - -@quotation -Permission is granted to copy, distribute and/or modify this document -under the terms of the GNU Free Documentation License, Version 1.3 or -any later version published by the Free Software Foundation; with no -Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A -copy of the license is included in the section entitled ``GNU Free -Documentation License''. -@end quotation -@end copying - -@dircategory Software libraries -@direntry -* libtasn1: (libtasn1). Library for Abstract Syntax Notation One (ASN.1). -@end direntry - -@titlepage -@title Libtasn1 -@subtitle Abstract Syntax Notation One (ASN.1) library for the GNU system -@subtitle for version @value{VERSION}, @value{UPDATED} -@author Fabio Fiorina -@author Simon Josefsson -@author Nikos Mavrogiannopoulos (@email{help-libtasn1@@gnu.org}) -@page -@vskip 0pt plus 1filll -@insertcopying -@end titlepage - -@contents - -@ifnottex -@node Top -@top Libtasn1 - -@insertcopying -@end ifnottex - -@menu -* Introduction:: -* ASN.1 structure handling:: -* Utilities:: -* Function reference:: -* Copying Information:: - -Indices - -* Concept Index:: Index of concepts and programs. -* Function and Data Index:: Index of functions, variables and data types. -@end menu - -@node Introduction -@chapter Introduction - -This document describes the Libtasn1 library that provides -Abstract Syntax Notation One (ASN.1, as specified by the X.680 ITU-T -recommendation) parsing and structures management, -and Distinguished Encoding Rules (DER, as per X.690) encoding and -decoding functions. - -The main features of this library are: - -@itemize @bullet - -@item On-line ASN.1 structure management that doesn't require any -C code file generation. - -@item Off-line ASN.1 structure management with C code file generation -containing an array. - -@item Distinguished Encoding Rules (DER) encoding support. - -@item No limits for INTEGER and ENUMERATED values. - -@item It's Free Software. -Anybody can use, modify, and redistribute the library under the terms -of the GNU Lesser General Public License version 2.1 or later. The -command line tools, self-tests and build infrastructure are licensed -under the GNU General Public License version 3.0 or later. - -@item Thread-safety. -@cindex threads -No global variables are used and multiple library handles and session -handles may be used in parallel. - -@item Portability. -@cindex Porting -The code should work on all Unix like operating systems, and Windows. -The library itself should be portable to any C89 system, not even -POSIX is required. -@end itemize - -@node ASN.1 structure handling -@chapter ASN.1 structure handling - -@menu -* ASN.1 syntax:: -* Naming:: -* Simple parsing:: -* Library Notes:: -* Future developments:: -@end menu - -@node ASN.1 syntax -@section ASN.1 syntax - -@cindex ASN.1 schema - -The parser is case sensitive. The comments begin with @code{--} and -end either with another @code{--}, or at the end of the respective -line, whichever comes first. The C-style @code{/*}, @code{*/} -comments are not supported. - -For an example of the syntax, check the @file{pkix.asn} file -distributed with the library. - -ASN.1 definitions must follow the syntax below: - -@verbatim - definitions_name {} - - DEFINITIONS TAGS ::= - - BEGIN - - - - END -@end verbatim - -The @code{::=} token must be separate from other elements, so the -following declaration is invalid: - -@example - -- INCORRECT - Version ::=INTEGER -@end example - -The correct form is: - -@example - Version ::= INTEGER -@end example - -Here is the list of types that the parser can manage: - -@cindex Supported ASN.1 types, list of - -@itemize @bullet - -@item @code{INTEGER}; -@item @code{ENUMERATED}; -@item @code{BOOLEAN}; -@item @code{OBJECT IDENTIFIER}; -@item @code{NULL}; -@item @code{BIT STRING}; -@item @code{OCTET STRING}; -@item @code{UTCTime}; -@item @code{GeneralizedTime}; -@item @code{GeneralString}; -@item @code{NumericString}; -@item @code{IA5String}; -@item @code{TeletexString}; -@item @code{PrintableString}; -@item @code{UniversalString}; -@item @code{BMPString}; -@item @code{UTF8String}; -@item @code{VisibleString}; -@item @code{SEQUENCE}; -@item @code{SEQUENCE OF}; -@item @code{SET}; -@item @code{SET OF}; -@item @code{CHOICE}; -@item @code{ANY}; -@item @code{ANY DEFINED BY}. - -@end itemize - -This version doesn't handle the @code{REAL} type. It doesn't support -the @code{AUTOMATIC TAGS} option, and the @code{EXPORT} and -@code{IMPORT} sections, either. - -The @code{SIZE} constraints are allowed, but no check is done on them. - -@node Naming -@section Naming - -Consider this definition: - -@verbatim - Example { 1 2 3 4 } - - DEFINITIONS EXPLICIT TAGS ::= - - BEGIN - - Group ::= SEQUENCE { - id OBJECT IDENTIFIER, - value Value - } - - Value ::= SEQUENCE { - value1 INTEGER, - value2 BOOLEAN - } - - END -@end verbatim - -The notation to access the @samp{Group} type of the @samp{Example} -definition above is @samp{Example.Group} (as a NUL-terminated string.) -Such strings are used in the functions described below. - -Others examples: - -@itemize @bullet - -@item field @samp{id} of the @samp{Group} type: @samp{Example.Group.id}; - -@item field @samp{value1} of the @samp{value} field of the @samp{Group} -type: @samp{Example.Group.value.value1}. - -@end itemize - -Elements of structured types unnamed by the respective definition -receive the names @code{?1}, @code{?2}, and so on. - -The @code{?LAST} name indicates the last element of a @code{SET OF} or -@code{SEQUENCE OF}. - -@node Simple parsing -@section Simple parsing - -For simple types like @code{OCTET STRING} the simple parsing functions listed -below may be used instead. - -@itemize -@item @ref{asn1_decode_simple_der} -@item @ref{asn1_encode_simple_der} -@end itemize - -@node Library Notes -@section Library Notes - -@cindex Header file libtasn1.h - -The header file of this library is @file{libtasn1.h}. - -@cindex Main type asn1_node - -The main type used in it is @code{asn1_node}, and it's used to store -the ASN.1 definitions and structures (instances). - -The @code{NULL} constant can be used for the variable -initialization. For example: - -@example - asn1_node definitions = NULL; -@end example - -Some functions require an @code{errorDescription} argument of type -@code{char *}, pointing to a pre-allocated buffer of at least -@code{ASN1_MAX_ERROR_DESCRIPTION_SIZE} bytes size (e.g., as in -@samp{char description[ASN1_MAX_ERROR_DESCRIPTION_SIZE];}). - -@code{ASN1_MAX_NAME_SIZE} is the maximum number of characters allowed -for an ASN.1 identifier. - -@node Future developments -@section Future developments -@cindex Future developments - -@itemize @bullet - -@item Add functions for a C code file generation containing equivalent -data structures (not a single array like now). - -@item The @code{REAL} type. - -@end itemize - -@node Utilities -@chapter Utilities - -@menu -* Invoking asn1Parser:: -* Invoking asn1Coding:: -* Invoking asn1Decoding:: -@end menu - -@node Invoking asn1Parser -@section Invoking asn1Parser -@cindex asn1Parser program - -@command{asn1Parser} reads a single file with ASN.1 definitions and -generates a -file with an array to use with libtasn1 functions. - -@verbatim -Usage: asn1Parser [options] file - -Options: - -h : shows the help message. - -v : shows version information and exit. - -c : checks the syntax only. - -o file : output file. - -n name : array name. -@end verbatim - -@node Invoking asn1Coding -@section Invoking asn1Coding -@cindex asn1Coding program - -@command{asn1Coding} generates a DER encoding from a file with ASN.1 -definitions and another one with assignments. - -The file with assignments must have this syntax: - -@verbatim -InstanceName Asn1Definition - -nameString value - -nameString value -... -@end verbatim - -To specify the field of a @code{CHOICE} to be used, specify its name -as a value to the @code{CHOICE} element itself. Use @code{''} to -denote the root element itself. -(as in the example below.) - -The output file is a binary file with the DER encoding. - -@verbatim -Usage: asn1Coding [options] file1 file2 - file1 : file with ASN1 definitions. - file2 : file with assignments. -Options: - -h : shows the help message. - -v : shows version information and exit. - -c : checks the syntax only. - -o file : output file. -@end verbatim - -For example, consider an ASN.1 definitions file as follows: - -@verbatim -MYPKIX1 { } - -DEFINITIONS IMPLICIT TAGS ::= - -BEGIN - -OtherStruct := SEQUENCE { - x INTEGER, - y CHOICE { - y1 INTEGER, - y2 OCTET STRING }, -} - -Dss-Sig-Value ::= SEQUENCE { - r INTEGER, - s INTEGER, - other OtherStruct - z INTEGER OPTIONAL, -} - -END -@end verbatim - -And a assignments file as follows: - -@verbatim -dp MYPKIX1.Dss-Sig-Value - -r 42 -s 47 -other.x 66 -other.y y1 -other.y.y1 15 -z (NULL) -@end verbatim - -Running the command below will generate a @file{assign.out} file, -containing the DER encoding of @code{PKIX1.Dss-Sig-Value}. - -@verbatim -$ asn1Coding pkix.asn assign.asn1 -@end verbatim - -If the root element is of the @code{CHOICE} type, the assignment file -may be like (using the types defined in @file{pkix.asn}): -@verbatim -elt PKIX1Implicit88.GeneralName - -'' dNSName -dNSName example.org -@end verbatim - -@node Invoking asn1Decoding -@section Invoking asn1Decoding -@cindex asn1Decoding program - -@command{asn1Decoding} generates an ASN.1 structure from a file with -ASN.1 -definitions and a binary file with a DER encoding. - -@verbatim -Usage: asn1Decoding [options] file1 file2 type - file1 : file with ASN1 definitions. - file2 : binary file with a DER encoding. - type : ASN1 definition name. -Options: - -h : shows the help message. - -v : shows version information and exit. - -o file : output file. -@end verbatim - -For example, after generating the @file{assign.out} file from the -example section of the @command{asn1Coding} command above, the -following -invocation will decode the DER data. - -@verbatim -$ asn1Decoding pkix.asn assign.out PKIX1.Dss-Sig-Value -@end verbatim - -@node Function reference -@chapter Function reference - -@menu -* ASN.1 schema functions:: -* ASN.1 field functions:: -* DER functions:: -* Error handling functions:: -* Auxilliary functions:: -@end menu - -@node ASN.1 schema functions -@section ASN.1 schema functions - -@include texi/ASN1.c.texi - -@node ASN.1 field functions -@section ASN.1 field functions - -@include texi/structure.c.texi -@include texi/element.c.texi - -@node DER functions -@section DER functions - -@include texi/coding.c.texi -@include texi/decoding.c.texi - -@node Error handling functions -@section Error handling functions - -@include texi/errors.c.texi - -@node Auxilliary functions -@section Auxilliary functions - -@include texi/parser_aux.c.texi -@include texi/version.c.texi - -@node Copying Information -@appendix Copying Information - -@menu -* GNU Free Documentation License:: License for copying this manual. -@end menu - -@node GNU Free Documentation License -@appendixsec GNU Free Documentation License - -@cindex FDL, GNU Free Documentation License - -@include fdl-1.3.texi - -@node Concept Index -@unnumbered Concept Index - -@printindex cp - -@node Function and Data Index -@unnumbered Function and Data Index - -@printindex fn - -@bye diff --git a/doc/reference/Makefile.am b/doc/reference/Makefile.am deleted file mode 100644 index c3a1def..0000000 --- a/doc/reference/Makefile.am +++ /dev/null @@ -1,105 +0,0 @@ -## Process this file with automake to produce Makefile.in - -# We require automake 1.6 at least. -AUTOMAKE_OPTIONS = 1.6 - -# This is a blank Makefile.am for using gtk-doc. -# Copy this to your project's API docs directory and modify the variables to -# suit your project. See the GTK+ Makefiles in gtk+/docs/reference for examples -# of using the various options. - -# The name of the module, e.g. 'glib'. -DOC_MODULE=$(PACKAGE) - -# Uncomment for versioned docs and specify the version of the module, e.g. '2'. -#DOC_MODULE_VERSION=2 - - -# The top-level SGML file. You can change this if you want to. -DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.sgml - -# Directories containing the source code. -# gtk-doc will search all .c and .h files beneath these paths -# for inline comments documenting functions and macros. -# e.g. DOC_SOURCE_DIR=$(top_srcdir)/gtk $(top_srcdir)/gdk -DOC_SOURCE_DIR=$(top_srcdir)/lib - -# Extra options to pass to gtkdoc-scangobj. Not normally needed. -SCANGOBJ_OPTIONS= - -# Extra options to supply to gtkdoc-scan. -# e.g. SCAN_OPTIONS=--deprecated-guards="GTK_DISABLE_DEPRECATED" -SCAN_OPTIONS=--ignore-decorators=ASN1_API - -# Extra options to supply to gtkdoc-mkdb. -# e.g. MKDB_OPTIONS=--xml-mode --output-format=xml -MKDB_OPTIONS=--xml-mode --output-format=xml - -# Extra options to supply to gtkdoc-mktmpl -# e.g. MKTMPL_OPTIONS=--only-section-tmpl -MKTMPL_OPTIONS= - -# Extra options to supply to gtkdoc-mkhtml -MKHTML_OPTIONS= - -# Extra options to supply to gtkdoc-fixref. Not normally needed. -# e.g. FIXXREF_OPTIONS=--extra-dir=../gdk-pixbuf/html --extra-dir=../gdk/html -FIXXREF_OPTIONS= - -# Used for dependencies. The docs will be rebuilt if any of these change. -# e.g. HFILE_GLOB=$(top_srcdir)/gtk/*.h -# e.g. CFILE_GLOB=$(top_srcdir)/gtk/*.c -HFILE_GLOB=$(top_srcdir)/lib/*.h -CFILE_GLOB=$(top_srcdir)/lib/*.c - -# Extra header to include when scanning, which are not under DOC_SOURCE_DIR -# e.g. EXTRA_HFILES=$(top_srcdir}/contrib/extra.h -EXTRA_HFILES= - -# Header files or dirs to ignore when scanning. Use base file/dir names -# e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h private_code -IGNORE_HFILES=element.h gstr.h int.h parser_aux.h structure.h gllib - -# Images to copy into HTML directory. -# e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png -HTML_IMAGES= - -# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE). -# e.g. content_files=running.sgml building.sgml changes-2.0.sgml -content_files= - -# SGML files where gtk-doc abbrevations (#GtkWidget) are expanded -# These files must be listed here *and* in content_files -# e.g. expand_content_files=running.sgml -expand_content_files= - -# CFLAGS and LDFLAGS for compiling gtkdoc-scangobj with your library. -# Only needed if you are using gtkdoc-scangobj to dynamically query widget -# signals and properties. -# e.g. GTKDOC_CFLAGS=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS) -# e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib) -GTKDOC_CFLAGS= -GTKDOC_LIBS= - -# This includes the standard gtk-doc make rules, copied by gtkdocize. -include $(top_srcdir)/gtk-doc.make - -# Other files to distribute -# e.g. EXTRA_DIST += version.xml.in -EXTRA_DIST += - -# Files not to distribute -# for --rebuild-types in $(SCAN_OPTIONS), e.g. $(DOC_MODULE).types -# for --rebuild-sections in $(SCAN_OPTIONS) e.g. $(DOC_MODULE)-sections.txt -#DISTCLEANFILES += - -# Comment this out if you want 'make check' to test you doc status -# and run some sanity checks -if ENABLE_GTK_DOC -TESTS_ENVIRONMENT = cd $(srcdir) && \ - DOC_MODULE=$(DOC_MODULE) DOC_MAIN_SGML_FILE=$(DOC_MAIN_SGML_FILE) \ - SRCDIR=$(abs_srcdir) BUILDDIR=$(abs_builddir) -#TESTS = $(GTKDOC_CHECK) -endif - --include $(top_srcdir)/git.mk diff --git a/doc/reference/libtasn1-docs.sgml b/doc/reference/libtasn1-docs.sgml deleted file mode 100644 index 3a7f351..0000000 --- a/doc/reference/libtasn1-docs.sgml +++ /dev/null @@ -1,49 +0,0 @@ - - - -]> - - - GNU Libtasn1 API Reference Manual - - for GNU Libtasn1 &version;. - The latest version of this documentation can be found on-line at - https://www.gnu.org/software/libtasn1/reference/. - - - - - GNU Libtasn1 API Reference Manual - - - This document describes the GNU Libtasn1 library developed for - ASN.1 (Abstract Syntax Notation One) structures management and - DER (Distinguished Encoding Rules) encoding functions. - - - - More up to date information can be found at - - https://www.gnu.org/software/libtasn1/. - - - - - - - API Index - - - - Index of deprecated symbols - - - Index of new symbols in 1.6 - - - Index of new symbols in 2.0 - - diff --git a/doc/reference/version.xml.in b/doc/reference/version.xml.in deleted file mode 100644 index d78bda9..0000000 --- a/doc/reference/version.xml.in +++ /dev/null @@ -1 +0,0 @@ -@VERSION@ diff --git a/doc/release-process.txt b/doc/release-process.txt deleted file mode 100644 index 161231e..0000000 --- a/doc/release-process.txt +++ /dev/null @@ -1,28 +0,0 @@ -Release steps: - -* Review changes compared to last release. - make review-diff - -* Make sure LT_* variables in configure.ac are updated properly. - -* Make sure NEWS file contains a good summary of changes. - -* Optionally check that everything builds. - make release-check - -* Replace 'unreleased' with 'released YYYY-MM-DD' in NEWS and commit - it with a commit log like 'Version 2.13.'. - -* Build tarball and update webpages. - make release - -* Email announcement, based on announce.txt. - -* Create a Savannah news blurb about the release: - https://savannah.gnu.org/news/?group=libtasn1 - -* Notify freecode.org. - -Post-release: - -* Update NEWS file for another release. diff --git a/doc/texinfo.css b/doc/texinfo.css deleted file mode 100644 index 69614b5..0000000 --- a/doc/texinfo.css +++ /dev/null @@ -1,44 +0,0 @@ -body { - margin: 2%; - padding: 0 5%; - background: #ffffff; -} -h1,h2,h3,h4,h5 { - font-weight: bold; - padding: 5px 5px 5px 5px; - background-color: #c2e0ff; - color: #336699; -} -h1 { - padding: 2em 2em 2em 5%; - color: white; - background: #336699; - text-align: center; - letter-spacing: 3px; -} -h2 { text-decoration: underline; } -pre { - margin: 0 5%; - padding: 0.5em; -} -pre.example { - border: solid 1px; - background: #eeeeff; - padding-bottom: 1em; -} -pre.verbatim { - border: solid 1px gray; - background: white; - padding-bottom: 1em; -} -div.node { - margin: 0 -5% 0 -2%; - padding: 0.5em 0.5em; - margin-top: 0.5em; - margin-bottom: 0.5em; - font-weight: bold; -} -dd, li { - padding-top: 0.1em; - padding-bottom: 0.1em; -} diff --git a/examples/CertificateExample.c b/examples/CertificateExample.c deleted file mode 100644 index a62ea79..0000000 --- a/examples/CertificateExample.c +++ /dev/null @@ -1,673 +0,0 @@ -/* - * Copyright (C) 2000-2014 Free Software Foundation, Inc. - * - * This file is part of LIBTASN1. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/*****************************************************/ -/* File: CertificateExample.c */ -/* Description: An example on how to use the ASN1 */ -/* parser with the Certificate.txt file */ -/*****************************************************/ - -#include -#include -#include -#include "libtasn1.h" - - -static char * -my_ltostr (long v, char *str) -{ - long d, r; - char temp[20]; - int count, k, start; - - if (v < 0) - { - str[0] = '-'; - start = 1; - v = -v; - } - else - start = 0; - - count = 0; - do - { - d = v / 10; - r = v - d * 10; - temp[start + count] = '0' + (char) r; - count++; - v = d; - } - while (v); - - for (k = 0; k < count; k++) - str[k + start] = temp[start + count - k - 1]; - str[count + start] = 0; - return str; -} - -/******************************************************/ -/* Function : get_name_type */ -/* Description: analyze a structure of type Name */ -/* Parameters: */ -/* char *root: the structure identifier */ -/* char *answer: the string with elements like: */ -/* "C=US O=gov" */ -/******************************************************/ -static void -get_Name_type (ASN1_TYPE cert_def, ASN1_TYPE cert, const char *root, - unsigned char *ans) -{ - int k, k2, result, len; - char name[128], str[1024], str2[1024], name2[128], counter[5], name3[128]; - ASN1_TYPE value = ASN1_TYPE_EMPTY; - char errorDescription[ASN1_MAX_ERROR_DESCRIPTION_SIZE]; - char *answer = (char *) ans; - answer[0] = 0; - k = 1; - do - { - strcpy (name, root); - strcat (name, ".rdnSequence.?"); - my_ltostr (k, counter); - strcat (name, counter); - len = sizeof (str) - 1; - result = asn1_read_value (cert, name, str, &len); - if (result == ASN1_ELEMENT_NOT_FOUND) - break; - k2 = 1; - do - { - strcpy (name2, name); - strcat (name2, ".?"); - my_ltostr (k2, counter); - strcat (name2, counter); - len = sizeof (str) - 1; - result = asn1_read_value (cert, name2, str, &len); - if (result == ASN1_ELEMENT_NOT_FOUND) - break; - strcpy (name3, name2); - strcat (name3, ".type"); - len = sizeof (str) - 1; - result = asn1_read_value (cert, name3, str, &len); - strcpy (name3, name2); - strcat (name3, ".value"); - if (result == ASN1_SUCCESS) - { - len = sizeof (str2) - 1; - result = - asn1_read_value (cert_def, - "PKIX1Implicit88.id-at-countryName", str2, - &len); - if (!strcmp (str, str2)) - { - asn1_create_element (cert_def, - "PKIX1Implicit88.X520OrganizationName", - &value); - len = sizeof (str) - 1; - asn1_read_value (cert, name3, str, &len); - asn1_der_decoding (&value, str, len, errorDescription); - len = sizeof (str) - 1; - asn1_read_value (value, "", str, &len); /* CHOICE */ - strcpy (name3, str); - len = sizeof (str) - 1; - asn1_read_value (value, name3, str, &len); - str[len] = 0; - strcat (answer, " C="); - strcat (answer, str); - asn1_delete_structure (&value); - } - else - { - len = sizeof (str2) - 1; - result = - asn1_read_value (cert_def, - "PKIX1Implicit88.id-at-organizationName", - str2, &len); - if (!strcmp (str, str2)) - { - asn1_create_element (cert_def, - "PKIX1Implicit88.X520OrganizationName", - &value); - len = sizeof (str) - 1; - asn1_read_value (cert, name3, str, &len); - asn1_der_decoding (&value, str, len, errorDescription); - len = sizeof (str) - 1; - asn1_read_value (value, "", str, &len); /* CHOICE */ - strcpy (name3, str); - len = sizeof (str) - 1; - asn1_read_value (value, name3, str, &len); - str[len] = 0; - strcat (answer, " O="); - strcat (answer, str); - asn1_delete_structure (&value); - } - else - { - len = sizeof (str2) - 1; - result = - asn1_read_value (cert_def, - "PKIX1Implicit88.id-at-organizationalUnitName", - str2, &len); - if (!strcmp (str, str2)) - { - asn1_create_element (cert_def, - "PKIX1Implicit88.X520OrganizationalUnitName", - &value); - len = sizeof (str) - 1; - asn1_read_value (cert, name3, str, &len); - asn1_der_decoding (&value, str, len, - errorDescription); - len = sizeof (str) - 1; - asn1_read_value (value, "", str, &len); /* CHOICE */ - strcpy (name3, str); - len = sizeof (str) - 1; - asn1_read_value (value, name3, str, &len); - str[len] = 0; - strcat (answer, " OU="); - strcat (answer, str); - asn1_delete_structure (&value); - } - } - } - } - k2++; - } - while (1); - k++; - } - while (1); -} - - -/******************************************************/ -/* Function : create_certificate */ -/* Description: creates a certificate named */ -/* "certificate1". Values are the same */ -/* as in rfc2459 Appendix D.1 */ -/* Parameters: */ -/* unsigned char *der: contains the der encoding */ -/* int *der_len: number of bytes of der string */ -/******************************************************/ -static void -create_certificate (ASN1_TYPE cert_def, unsigned char *der, int *der_len) -{ - int result, k, len; - unsigned char str[1024]; - const unsigned char *str2; - ASN1_TYPE cert1 = ASN1_TYPE_EMPTY; - ASN1_TYPE value = ASN1_TYPE_EMPTY; - ASN1_TYPE param = ASN1_TYPE_EMPTY; - ASN1_TYPE constr = ASN1_TYPE_EMPTY; - char errorDescription[ASN1_MAX_ERROR_DESCRIPTION_SIZE]; - int max_len; - - max_len = *der_len; - - result = - asn1_create_element (cert_def, "PKIX1Implicit88.Certificate", &cert1); - - /* Use the next 3 lines to visit the empty certificate */ - /* printf("-----------------\n"); - asn1_visit_tree(cert1,""); - printf("-----------------\n"); */ - - /* version: v3(2) */ - result = asn1_write_value (cert1, "tbsCertificate.version", "v3", 0); - - /* serialNumber: 17 */ - result = asn1_write_value (cert1, "tbsCertificate.serialNumber", "17", 0); - - /* signature: dsa-with-sha1 */ - len = sizeof (str) - 1; - result = - asn1_read_value (cert_def, "PKIX1Implicit88.id-dsa-with-sha1", str, &len); - result = - asn1_write_value (cert1, "tbsCertificate.signature.algorithm", str, 1); - - result = asn1_write_value (cert1, "tbsCertificate.signature.parameters", - NULL, 0); - - - /* issuer: Country="US" Organization="gov" OrganizationUnit="nist" */ - result = - asn1_write_value (cert1, "tbsCertificate.issuer", "rdnSequence", 12); - - result = - asn1_write_value (cert1, "tbsCertificate.issuer.rdnSequence", "NEW", 1); - result = - asn1_write_value (cert1, "tbsCertificate.issuer.rdnSequence.?LAST", "NEW", - 1); - /* C */ - len = sizeof (str) - 1; - result = - asn1_read_value (cert_def, "PKIX1Implicit88.id-at-countryName", str, - &len); - result = - asn1_write_value (cert1, - "tbsCertificate.issuer.rdnSequence.?LAST.?LAST.type", - str, 1); - result = - asn1_create_element (cert_def, "PKIX1Implicit88.X520countryName", &value); - result = asn1_write_value (value, "", "US", 2); - *der_len = max_len; - result = asn1_der_coding (value, "", der, der_len, errorDescription); - asn1_delete_structure (&value); - result = - asn1_write_value (cert1, - "tbsCertificate.issuer.rdnSequence.?LAST.?LAST.value", - der, *der_len); - - - result = - asn1_write_value (cert1, "tbsCertificate.issuer.rdnSequence", "NEW", 1); - result = - asn1_write_value (cert1, "tbsCertificate.issuer.rdnSequence.?LAST", "NEW", - 1); - /* O */ - len = sizeof (str) - 1; - result = - asn1_read_value (cert_def, "PKIX1Implicit88.id-at-organizationName", str, - &len); - result = - asn1_write_value (cert1, - "tbsCertificate.issuer.rdnSequence.?LAST.?LAST.type", - str, 1); - result = - asn1_create_element (cert_def, "PKIX1Implicit88.X520OrganizationName", - &value); - result = asn1_write_value (value, "", "printableString", 1); - result = asn1_write_value (value, "printableString", "gov", 3); - *der_len = max_len; - result = asn1_der_coding (value, "", der, der_len, errorDescription); - asn1_delete_structure (&value); - result = - asn1_write_value (cert1, - "tbsCertificate.issuer.rdnSequence.?LAST.?LAST.value", - der, *der_len); - - - result = - asn1_write_value (cert1, "tbsCertificate.issuer.rdnSequence", "NEW", 1); - result = - asn1_write_value (cert1, "tbsCertificate.issuer.rdnSequence.?LAST", "NEW", - 1); - - /* OU */ - len = sizeof (str) - 1; - result = - asn1_read_value (cert_def, "PKIX1Implicit88.id-at-organizationalUnitName", - str, &len); - result = - asn1_write_value (cert1, - "tbsCertificate.issuer.rdnSequence.?LAST.?LAST.type", - str, 1); - result = - asn1_create_element (cert_def, - "PKIX1Implicit88.X520OrganizationalUnitName", - &value); - result = asn1_write_value (value, "", "printableString", 1); - result = asn1_write_value (value, "printableString", "nist", 4); - *der_len = max_len; - result = asn1_der_coding (value, "", der, der_len, errorDescription); - asn1_delete_structure (&value); - result = - asn1_write_value (cert1, - "tbsCertificate.issuer.rdnSequence.?LAST.?LAST.value", - der, *der_len); - - - /* validity */ - result = - asn1_write_value (cert1, "tbsCertificate.validity.notBefore", "utcTime", - 1); - result = - asn1_write_value (cert1, "tbsCertificate.validity.notBefore.utcTime", - "970630000000Z", 1); - - result = - asn1_write_value (cert1, "tbsCertificate.validity.notAfter", "utcTime", - 1); - result = - asn1_write_value (cert1, "tbsCertificate.validity.notAfter.utcTime", - "971231000000Z", 1); - - - - /* subject: Country="US" Organization="gov" OrganizationUnit="nist" */ - result = - asn1_write_value (cert1, "tbsCertificate.subject", "rdnSequence", 1); - - result = - asn1_write_value (cert1, "tbsCertificate.subject.rdnSequence", "NEW", 1); - result = - asn1_write_value (cert1, "tbsCertificate.subject.rdnSequence.?LAST", - "NEW", 1); - /* C */ - len = sizeof (str) - 1; - result = - asn1_read_value (cert_def, "PKIX1Implicit88.id-at-countryName", str, - &len); - result = - asn1_write_value (cert1, - "tbsCertificate.subject.rdnSequence.?LAST.?LAST.type", - str, 1); - result = - asn1_create_element (cert_def, "PKIX1Implicit88.X520countryName", &value); - result = asn1_write_value (value, "", "US", 2); - *der_len = max_len; - result = asn1_der_coding (value, "", der, der_len, errorDescription); - asn1_delete_structure (&value); - result = - asn1_write_value (cert1, - "tbsCertificate.subject.rdnSequence.?LAST.?LAST.value", - der, *der_len); - - - result = - asn1_write_value (cert1, "tbsCertificate.subject.rdnSequence", "NEW", 4); - result = - asn1_write_value (cert1, "tbsCertificate.subject.rdnSequence.?LAST", - "NEW", 4); - /* O */ - len = sizeof (str) - 1; - result = - asn1_read_value (cert_def, "PKIX1Implicit88.id-at-organizationName", str, - &len); - result = - asn1_write_value (cert1, - "tbsCertificate.subject.rdnSequence.?LAST.?LAST.type", - str, 1); - result = - asn1_create_element (cert_def, "PKIX1Implicit88.X520OrganizationName", - &value); - result = asn1_write_value (value, "", "printableString", 1); - result = asn1_write_value (value, "printableString", "gov", 3); - *der_len = max_len; - result = asn1_der_coding (value, "", der, der_len, errorDescription); - asn1_delete_structure (&value); - result = - asn1_write_value (cert1, - "tbsCertificate.subject.rdnSequence.?LAST.?LAST.value", - der, *der_len); - - - result = - asn1_write_value (cert1, "tbsCertificate.subject.rdnSequence", "NEW", 4); - result = - asn1_write_value (cert1, "tbsCertificate.subject.rdnSequence.?LAST", - "NEW", 4); - /* OU */ - len = sizeof (str) - 1; - result = - asn1_read_value (cert_def, "PKIX1Implicit88.id-at-organizationalUnitName", - str, &len); - result = - asn1_write_value (cert1, - "tbsCertificate.subject.rdnSequence.?LAST.?LAST.type", - str, 1); - result = - asn1_create_element (cert_def, - "PKIX1Implicit88.X520OrganizationalUnitName", - &value); - result = asn1_write_value (value, "", "printableString", 1); - result = asn1_write_value (value, "printableString", "nist", 4); - *der_len = max_len; - result = asn1_der_coding (value, "", der, der_len, errorDescription); - asn1_delete_structure (&value); - result = - asn1_write_value (cert1, - "tbsCertificate.subject.rdnSequence.?LAST.?LAST.value", - der, *der_len); - - - /* subjectPublicKeyInfo: dsa with parameters=Dss-Parms */ - len = sizeof (str) - 1; - result = asn1_read_value (cert_def, "PKIX1Implicit88.id-dsa", str, &len); - result = - asn1_write_value (cert1, - "tbsCertificate.subjectPublicKeyInfo.algorithm.algorithm", - str, 1); - result = - asn1_create_element (cert_def, "PKIX1Implicit88.Dss-Parms", ¶m); - str2 = (const unsigned char *) "\xd4\x38"; /* only an example */ - result = asn1_write_value (param, "p", str2, 128); - str2 = (const unsigned char *) "\xd4\x38"; /* only an example */ - result = asn1_write_value (param, "q", str2, 20); - str2 = (const unsigned char *) "\xd4\x38"; /* only an example */ - result = asn1_write_value (param, "g", str2, 128); - *der_len = max_len; - result = asn1_der_coding (param, "", der, der_len, errorDescription); - asn1_delete_structure (¶m); - result = - asn1_write_value (cert1, - "tbsCertificate.subjectPublicKeyInfo.algorithm.parameters", - der, *der_len); - - - /* subjectPublicKey */ - str2 = (const unsigned char *) "\x02\x81"; /* only an example */ - result = - asn1_write_value (cert1, - "tbsCertificate.subjectPublicKeyInfo.subjectPublicKey", - str2, 1048); - - result = asn1_write_value (cert1, "tbsCertificate.issuerUniqueID", NULL, 0); /* NO OPTION */ - result = asn1_write_value (cert1, "tbsCertificate.subjectUniqueID", NULL, 0); /* NO OPTION */ - - /* extensions */ - result = asn1_write_value (cert1, "tbsCertificate.extensions", "NEW", 1); - len = sizeof (str) - 1; - result = - asn1_read_value (cert_def, "PKIX1Implicit88.id-ce-basicConstraints", str, - &len); - result = asn1_write_value (cert1, "tbsCertificate.extensions.?LAST.extnID", str, 1); /* basicConstraints */ - result = - asn1_write_value (cert1, "tbsCertificate.extensions.?LAST.critical", - "TRUE", 1); - result = - asn1_create_element (cert_def, "PKIX1Implicit88.BasicConstraints", - &constr); - result = asn1_write_value (constr, "cA", "TRUE", 1); - result = asn1_write_value (constr, "pathLenConstraint", NULL, 0); - *der_len = max_len; - result = asn1_der_coding (constr, "", der, der_len, errorDescription); - result = asn1_delete_structure (&constr); - result = - asn1_write_value (cert1, "tbsCertificate.extensions.?LAST.extnValue", der, - *der_len); - - - result = asn1_write_value (cert1, "tbsCertificate.extensions", "NEW", 1); - len = sizeof (str) - 1; - result = - asn1_read_value (cert_def, "PKIX1Implicit88.id-ce-subjectKeyIdentifier", - str, &len); - result = asn1_write_value (cert1, "tbsCertificate.extensions.?LAST.extnID", str, 1); /* subjectKeyIdentifier */ - result = - asn1_write_value (cert1, "tbsCertificate.extensions.?LAST.critical", - "FALSE", 1); - str2 = (const unsigned char *) "\x04\x14\xe7\x26\xc5"; /* only an example */ - result = - asn1_write_value (cert1, "tbsCertificate.extensions.?LAST.extnValue", - str2, 22); - - - /* signatureAlgorithm: dsa-with-sha */ - len = sizeof (str) - 1; - result = - asn1_read_value (cert_def, "PKIX1Implicit88.id-dsa-with-sha1", str, &len); - result = asn1_write_value (cert1, "signatureAlgorithm.algorithm", str, 1); - result = asn1_write_value (cert1, "signatureAlgorithm.parameters", NULL, 0); /* NO OPTION */ - - - /* signature */ - *der_len = max_len; - result = - asn1_der_coding (cert1, "tbsCertificate", der, der_len, errorDescription); - if (result != ASN1_SUCCESS) - { - printf ("\n'tbsCertificate' encoding creation: ERROR\n"); - } - /* add the lines for the signature on der[0]..der[der_len-1]: result in str2 */ - result = asn1_write_value (cert1, "signature", str2, 368); /* dsa-with-sha */ - - - /* Use the next 3 lines to visit the certificate */ - /* printf("-----------------\n"); - asn1_visit_tree(cert1,""); - printf("-----------------\n"); */ - - *der_len = max_len; - result = asn1_der_coding (cert1, "", der, der_len, errorDescription); - if (result != ASN1_SUCCESS) - { - printf ("\n'certificate' encoding creation: ERROR\n"); - return; - } - - /* Print the 'Certificate1' DER encoding */ - printf ("-----------------\nCertificate Encoding:\nNumber of bytes=%i\n", - *der_len); - for (k = 0; k < *der_len; k++) - printf ("%02x ", der[k]); - printf ("\n-----------------\n"); - - /* Clear the "certificate1" structure */ - asn1_delete_structure (&cert1); -} - - - -/******************************************************/ -/* Function : get_certificate */ -/* Description: creates a certificate named */ -/* "certificate2" from a der encoding */ -/* string */ -/* Parameters: */ -/* unsigned char *der: the encoding string */ -/* int der_len: number of bytes of der string */ -/******************************************************/ -static void -get_certificate (ASN1_TYPE cert_def, unsigned char *der, int der_len) -{ - int result, len, start, end; - unsigned char str[1024], str2[1024]; - ASN1_TYPE cert2 = ASN1_TYPE_EMPTY; - char errorDescription[ASN1_MAX_ERROR_DESCRIPTION_SIZE]; - - asn1_create_element (cert_def, "PKIX1Implicit88.Certificate", &cert2); - - result = asn1_der_decoding (&cert2, der, der_len, errorDescription); - - if (result != ASN1_SUCCESS) - { - printf ("Problems with DER encoding\n"); - return; - } - - - /* issuer */ - get_Name_type (cert_def, cert2, "tbsCertificate.issuer", str); - printf ("certificate:\nissuer :%s\n", str); - /* subject */ - get_Name_type (cert_def, cert2, "tbsCertificate.subject", str); - printf ("subject:%s\n", str); - - - /* Verify sign */ - len = sizeof (str) - 1; - result = asn1_read_value (cert2, "signatureAlgorithm.algorithm", str, &len); - - len = sizeof (str2) - 1; - result = - asn1_read_value (cert_def, "PKIX1Implicit88.id-dsa-with-sha1", str2, - &len); - if (!strcmp ((char *) str, (char *) str2)) - { /* dsa-with-sha */ - - result = asn1_der_decoding_startEnd (cert2, der, der_len, - "tbsCertificate", &start, &end); - - /* add the lines to calculate the sha on der[start]..der[end] */ - - len = sizeof (str) - 1; - result = asn1_read_value (cert2, "signature", str, &len); - - /* compare the previous value to signature ( with issuer public key) */ - } - - /* Use the next 3 lines to visit the certificate */ - /* printf("-----------------\n"); - asn1_visit_tree(cert2,""); - printf("-----------------\n"); */ - - - /* Clear the "certificate2" structure */ - asn1_delete_structure (&cert2); -} - -extern const ASN1_ARRAY_TYPE pkix_asn1_tab[]; - -/********************************************************/ -/* Function : main */ -/* Description: reads the certificate description. */ -/* Creates a certificate and calculate */ -/* the der encoding. After that creates */ -/* another certificate from der string */ -/********************************************************/ -int -main (int argc, char *argv[]) -{ - int result, der_len; - unsigned char der[1024]; - ASN1_TYPE PKIX1Implicit88 = ASN1_TYPE_EMPTY; - char errorDescription[ASN1_MAX_ERROR_DESCRIPTION_SIZE]; - - if (1) - result = - asn1_array2tree (pkix_asn1_tab, &PKIX1Implicit88, errorDescription); - else - result = - asn1_parser2tree ("pkix.asn", &PKIX1Implicit88, errorDescription); - - if (result != ASN1_SUCCESS) - { - asn1_perror (result); - printf ("%s", errorDescription); - exit (1); - } - - - /* Use the following 3 lines to visit the PKIX1Implicit structures */ - /* printf("-----------------\n"); - asn1_visit_tree(PKIX1Implicit88,"PKIX1Implicit88"); - printf("-----------------\n"); */ - - der_len = 1024; - create_certificate (PKIX1Implicit88, der, &der_len); - - get_certificate (PKIX1Implicit88, der, der_len); - - /* Clear the "PKIX1Implicit88" structures */ - asn1_delete_structure (&PKIX1Implicit88); - - return 0; -} diff --git a/examples/CrlExample.c b/examples/CrlExample.c deleted file mode 100644 index 1e59ac7..0000000 --- a/examples/CrlExample.c +++ /dev/null @@ -1,540 +0,0 @@ -/* - * Copyright (C) 2000-2014 Free Software Foundation, Inc. - * - * This file is part of LIBTASN1. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/*****************************************************/ -/* File: CrlExample.c */ -/* Description: An example on how to use the ASN1 */ -/* parser with the Certificate.txt file */ -/*****************************************************/ - -#include -#include -#include -#include "libtasn1.h" - - - -static char * -my_ltostr (long v, char *str) -{ - long d, r; - char temp[20]; - int count, k, start; - - if (v < 0) - { - str[0] = '-'; - start = 1; - v = -v; - } - else - start = 0; - - count = 0; - do - { - d = v / 10; - r = v - d * 10; - temp[start + count] = '0' + (char) r; - count++; - v = d; - } - while (v); - - for (k = 0; k < count; k++) - str[k + start] = temp[start + count - k - 1]; - str[count + start] = 0; - return str; -} - - -/******************************************************/ -/* Function : get_name_type */ -/* Description: analyze a structure of type Name */ -/* Parameters: */ -/* char *root: the structure identifier */ -/* char *answer: the string with elements like: */ -/* "C=US O=gov" */ -/******************************************************/ -static void -get_Name_type (ASN1_TYPE cert_def, ASN1_TYPE cert, const char *root, - unsigned char *ans) -{ - int k, k2, result, len; - char name[128], str[1024], str2[1024], name2[128], counter[5], name3[128]; - ASN1_TYPE value = ASN1_TYPE_EMPTY; - char errorDescription[ASN1_MAX_ERROR_DESCRIPTION_SIZE]; - char *answer = (char *) ans; - - answer[0] = 0; - k = 1; - do - { - strcpy (name, root); - strcat (name, ".rdnSequence.?"); - my_ltostr (k, counter); - strcat (name, counter); - - len = sizeof (str) - 1; - result = asn1_read_value (cert, name, str, &len); - if (result == ASN1_ELEMENT_NOT_FOUND) - break; - k2 = 1; - do - { - strcpy (name2, name); - strcat (name2, ".?"); - my_ltostr (k2, counter); - strcat (name2, counter); - - len = sizeof (str) - 1; - result = asn1_read_value (cert, name2, str, &len); - if (result == ASN1_ELEMENT_NOT_FOUND) - break; - strcpy (name3, name2); - strcat (name3, ".type"); - - len = sizeof (str) - 1; - result = asn1_read_value (cert, name3, str, &len); - strcpy (name3, name2); - strcat (name3, ".value"); - if (result == ASN1_SUCCESS) - { - len = sizeof (str2); - result = - asn1_read_value (cert_def, - "PKIX1Implicit88.id-at-countryName", str2, - &len); - if (!strcmp (str, str2)) - { - asn1_create_element (cert_def, - "PKIX1Implicit88.X520OrganizationName", - &value); - len = sizeof (str) - 1; - asn1_read_value (cert, name3, str, &len); - result = - asn1_der_decoding (&value, str, len, errorDescription); - - len = sizeof (str) - 1; - asn1_read_value (value, "", str, &len); /* CHOICE */ - - strcpy (name3, str); - - len = sizeof (str) - 1; - asn1_read_value (value, name3, str, &len); - str[len] = 0; - strcat (answer, " C="); - strcat (answer, str); - - asn1_delete_structure (&value); - } - else - { - len = sizeof (str2); - result = - asn1_read_value (cert_def, - "PKIX1Implicit88.id-at-organizationName", - str2, &len); - if (!strcmp (str, str2)) - { - asn1_create_element (cert_def, - "PKIX1Implicit88.X520OrganizationName", - &value); - - len = sizeof (str) - 1; - asn1_read_value (cert, name3, str, &len); - asn1_der_decoding (&value, str, len, errorDescription); - len = sizeof (str) - 1; - asn1_read_value (value, "", str, &len); /* CHOICE */ - strcpy (name3, str); - len = sizeof (str) - 1; - asn1_read_value (value, name3, str, &len); - str[len] = 0; - strcat (answer, " O="); - strcat (answer, str); - asn1_delete_structure (&value); - } - else - { - len = sizeof (str2); - result = - asn1_read_value (cert_def, - "PKIX1Implicit88.id-at-organizationalUnitName", - str2, &len); - if (!strcmp (str, str2)) - { - asn1_create_element (cert_def, - "PKIX1Implicit88.X520OrganizationalUnitName", - &value); - len = sizeof (str) - 1; - asn1_read_value (cert, name3, str, &len); - asn1_der_decoding (&value, str, len, - errorDescription); - len = sizeof (str) - 1; - asn1_read_value (value, "", str, &len); /* CHOICE */ - strcpy (name3, str); - len = sizeof (str) - 1; - asn1_read_value (value, name3, str, &len); - str[len] = 0; - strcat (answer, " OU="); - strcat (answer, str); - asn1_delete_structure (&value); - } - } - } - } - k2++; - } - while (1); - k++; - } - while (1); -} - - -/******************************************************/ -/* Function : create_certificate */ -/* Description: creates a certificate named */ -/* "certificate1". Values are the same */ -/* as in rfc2459 Appendix D.1 */ -/* Parameters: */ -/* unsigned char *der: contains the der encoding */ -/* int *der_len: number of bytes of der string */ -/******************************************************/ -static void -create_CRL (ASN1_TYPE cert_def, unsigned char *der, int *der_len) -{ - int result, k, len; - unsigned char str[1024]; - const unsigned char *str2; - ASN1_TYPE crl = ASN1_TYPE_EMPTY; - ASN1_TYPE value = ASN1_TYPE_EMPTY; - char errorDescription[ASN1_MAX_ERROR_DESCRIPTION_SIZE]; - int max_len; - - max_len = *der_len; - - result = - asn1_create_element (cert_def, "PKIX1Implicit88.CertificateList", &crl); - - /* Use the next 3 lines to visit the empty certificate */ - /* printf("-----------------\n"); - asn1_visit_tree(crl,""); - printf("-----------------\n"); */ - - - /* version: v2(1) */ - result = asn1_write_value (crl, "tbsCertList.version", "v2", 0); - - - /* signature: dsa-with-sha */ - len = sizeof (str) - 1; - result = - asn1_read_value (cert_def, "PKIX1Implicit88.id-dsa-with-sha1", str, &len); - result = asn1_write_value (crl, "tbsCertList.signature.algorithm", str, 1); - result = - asn1_write_value (crl, "tbsCertList.signature.parameters", NULL, 0); - - - /* issuer: Country="US" Organization="gov" OrganizationUnit="nist" */ - result = asn1_write_value (crl, "tbsCertList.issuer", "rdnSequence", 1); - - result = asn1_write_value (crl, "tbsCertList.issuer.rdnSequence", "NEW", 1); - result = - asn1_write_value (crl, "tbsCertList.issuer.rdnSequence.?LAST", "NEW", 1); - /* C */ - len = sizeof (str) - 1; - result = - asn1_read_value (cert_def, "PKIX1Implicit88.id-at-countryName", str, - &len); - result = - asn1_write_value (crl, "tbsCertList.issuer.rdnSequence.?LAST.?LAST.type", - str, 1); - result = - asn1_create_element (cert_def, "PKIX1Implicit88.X520countryName", &value); - result = asn1_write_value (value, "", "US", 2); - *der_len = max_len; - result = asn1_der_coding (value, "", der, der_len, errorDescription); - - asn1_delete_structure (&value); - result = - asn1_write_value (crl, "tbsCertList.issuer.rdnSequence.?LAST.?LAST.value", - der, *der_len); - - - result = asn1_write_value (crl, "tbsCertList.issuer.rdnSequence", "NEW", 4); - result = - asn1_write_value (crl, "tbsCertList.issuer.rdnSequence.?LAST", "NEW", 4); - /* O */ - len = sizeof (str) - 1; - result = - asn1_read_value (cert_def, "PKIX1Implicit88.id-at-organizationName", str, - &len); - result = - asn1_write_value (crl, "tbsCertList.issuer.rdnSequence.?LAST.?LAST.type", - str, 8); - result = - asn1_create_element (cert_def, "PKIX1Implicit88.X520OrganizationName", - &value); - result = asn1_write_value (value, "", "printableString", 1); - result = asn1_write_value (value, "printableString", "gov", 3); - *der_len = max_len; - result = asn1_der_coding (value, "", der, der_len, errorDescription); - asn1_delete_structure (&value); - result = - asn1_write_value (crl, "tbsCertList.issuer.rdnSequence.?LAST.?LAST.value", - der, *der_len); - - - result = asn1_write_value (crl, "tbsCertList.issuer.rdnSequence", "NEW", 1); - result = - asn1_write_value (crl, "tbsCertList.issuer.rdnSequence.?LAST", "NEW", 1); - /* OU */ - len = sizeof (str) - 1; - result = - asn1_read_value (cert_def, "PKIX1Implicit88.id-at-organizationalUnitName", - str, &len); - result = - asn1_write_value (crl, "tbsCertList.issuer.rdnSequence.?LAST.?LAST.type", - str, 1); - result = - asn1_create_element (cert_def, - "PKIX1Implicit88.X520OrganizationalUnitName", - &value); - result = asn1_write_value (value, "", "printableString", 1); - result = asn1_write_value (value, "printableString", "nist", 4); - *der_len = max_len; - result = asn1_der_coding (value, "", der, der_len, errorDescription); - asn1_delete_structure (&value); - result = - asn1_write_value (crl, "tbsCertList.issuer.rdnSequence.?LAST.?LAST.value", - der, *der_len); - - - /* validity */ - result = asn1_write_value (crl, "tbsCertList.thisUpdate", "utcTime", 1); - result = - asn1_write_value (crl, "tbsCertList.thisUpdate.utcTime", "970801000000Z", - 1); - - result = asn1_write_value (crl, "tbsCertList.nextUpdate", "utcTime", 1); - result = - asn1_write_value (crl, "tbsCertList.nextUpdate.utcTime", "970808000000Z", - 1); - - - /* revokedCertificates */ - result = - asn1_write_value (crl, "tbsCertList.revokedCertificates", "NEW", 1); - str[0] = 18; - result = - asn1_write_value (crl, - "tbsCertList.revokedCertificates.?LAST.userCertificate", - str, 1); - result = - asn1_write_value (crl, - "tbsCertList.revokedCertificates.?LAST.revocationDate", - "utcTime", 1); - result = - asn1_write_value (crl, - "tbsCertList.revokedCertificates.?LAST.revocationDate.utcTime", - "970731000000Z", 1); - - result = - asn1_write_value (crl, - "tbsCertList.revokedCertificates.?LAST.crlEntryExtensions", - "NEW", 1); - len = sizeof (str) - 1; - result = asn1_read_value (cert_def, "PKIX1Implicit88.id-ce-cRLReasons", - str, &len); - result = asn1_write_value (crl, "tbsCertList.revokedCertificates.?LAST.crlEntryExtensions.?LAST.extnID", str, 1); /* reasonCode */ - result = - asn1_write_value (crl, - "tbsCertList.revokedCertificates.?LAST.crlEntryExtensions.?LAST.critical", - "FALSE", 1); - str2 = (const unsigned char *) "\x0a\x01\x01"; - result = - asn1_write_value (crl, - "tbsCertList.revokedCertificates.?LAST.crlEntryExtensions.?LAST.extnValue", - str2, 3); - - - /* crlExtensions */ - result = asn1_write_value (crl, "tbsCertList.crlExtensions", NULL, 0); - - - /* signatureAlgorithm: dsa-with-sha */ - len = sizeof (str) - 1; - result = - asn1_read_value (cert_def, "PKIX1Implicit88.id-dsa-with-sha1", str, &len); - result = asn1_write_value (crl, "signatureAlgorithm.algorithm", str, 1); - result = asn1_write_value (crl, "signatureAlgorithm.parameters", NULL, 0); /* NO OPTION */ - - /* signature */ - *der_len = max_len; - result = - asn1_der_coding (crl, "tbsCertList", der, der_len, errorDescription); - if (result != ASN1_SUCCESS) - { - printf ("\n'tbsCertList' encoding creation: ERROR\n"); - return; - } - - /* add the lines for the signature on der[0]..der[der_len-1]: result in str2 */ - result = asn1_write_value (crl, "signature", str2, 46 * 8); - - - /* Use the next 3 lines to visit the certificate */ - /* printf("-----------------\n"); - asn1_visit_tree(crl,""); - printf("-----------------\n"); */ - - *der_len = max_len; - result = asn1_der_coding (crl, "", der, der_len, errorDescription); - if (result != ASN1_SUCCESS) - { - printf ("\n'crl1' encoding creation: ERROR\n"); - return; - } - - /* Print the 'Certificate1' DER encoding */ - printf ("-----------------\nCrl1 Encoding:\nNumber of bytes=%i\n", - *der_len); - for (k = 0; k < *der_len; k++) - printf ("%02x ", der[k]); - printf ("\n-----------------\n"); - - /* Clear the "certificate1" structure */ - asn1_delete_structure (&crl); -} - - - -/******************************************************/ -/* Function : get_certificate */ -/* Description: creates a certificate named */ -/* "certificate2" from a der encoding */ -/* string */ -/* Parameters: */ -/* unsigned char *der: the encoding string */ -/* int der_len: number of bytes of der string */ -/******************************************************/ -static void -get_CRL (ASN1_TYPE cert_def, unsigned char *der, int der_len) -{ - int result, len, start, end; - unsigned char str[1024], str2[1024]; - ASN1_TYPE crl2 = ASN1_TYPE_EMPTY; - char errorDescription[ASN1_MAX_ERROR_DESCRIPTION_SIZE]; - - - asn1_create_element (cert_def, "PKIX1Implicit88.CertificateList", &crl2); - - result = asn1_der_decoding (&crl2, der, der_len, errorDescription); - - if (result != ASN1_SUCCESS) - { - printf ("Problems with DER encoding\n"); - return; - } - - - /* issuer */ - get_Name_type (cert_def, crl2, "tbsCertList.issuer", str); - printf ("crl2:\nissuer: %s\n", str); - - - /* Verify sign */ - len = sizeof (str) - 1; - result = asn1_read_value (crl2, "signatureAlgorithm.algorithm", str, &len); - - result = - asn1_read_value (cert_def, "PKIX1Implicit88.id-dsa-with-sha1", str2, - &len); - if (!strcmp ((char *) str, (char *) str2)) - { /* dsa-with-sha */ - - result = asn1_der_decoding_startEnd (crl2, der, der_len, - "tbsCertList", &start, &end); - - /* add the lines to calculate the sha on der[start]..der[end] */ - - result = asn1_read_value (crl2, "signature", str, &len); - - /* compare the previous value to signature ( with issuer public key) */ - } - - /* Use the next 3 lines to visit the certificate */ - /* printf("-----------------\n"); - asn1_visit_tree(crl2,""); - printf("-----------------\n"); */ - - - /* Clear the "crl2" structure */ - asn1_delete_structure (&crl2); -} - -extern const ASN1_ARRAY_TYPE pkix_asn1_tab[]; - -/********************************************************/ -/* Function : main */ -/* Description: reads the certificate description. */ -/* Creates a certificate and calculate */ -/* the der encoding. After that creates */ -/* another certificate from der string */ -/********************************************************/ -int -main (int argc, char *argv[]) -{ - int result, der_len; - unsigned char der[1024]; - ASN1_TYPE PKIX1Implicit88 = ASN1_TYPE_EMPTY; - char errorDescription[ASN1_MAX_ERROR_DESCRIPTION_SIZE]; - - if (1) - result = - asn1_array2tree (pkix_asn1_tab, &PKIX1Implicit88, errorDescription); - else - result = - asn1_parser2tree ("pkix.asn", &PKIX1Implicit88, errorDescription); - - if (result != ASN1_SUCCESS) - { - asn1_perror (result); - printf ("%s\n", errorDescription); - exit (1); - } - - /* Use the following 3 lines to visit the PKIX1Implicit structures */ - /* printf("-----------------\n"); - asn1_visit_tree(cert_def,"PKIX1Implicit88"); - printf("-----------------\n"); */ - - der_len = 1024; - create_CRL (PKIX1Implicit88, der, &der_len); - - - get_CRL (PKIX1Implicit88, der, der_len); - - /* Clear the "PKIX1Implicit88" structures */ - asn1_delete_structure (&PKIX1Implicit88); - - return 0; -} diff --git a/examples/Makefile.am b/examples/Makefile.am deleted file mode 100644 index 520d4ad..0000000 --- a/examples/Makefile.am +++ /dev/null @@ -1,36 +0,0 @@ -## Process this file with automake to produce Makefile.in -# Copyright (C) 2002-2014 Free Software Foundation, Inc. -# -# This file is part of LIBTASN1. -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -AM_CFLAGS = $(WARN_CFLAGS) $(WERROR_CFLAGS) -AM_CPPFLAGS = -I$(top_srcdir)/lib -I$(top_srcdir)/gl -I$(top_builddir)/gl - -EXTRA_DIST = asn1Coding_test.asn asn1Coding_test.asg - -LDADD = ../lib/libtasn1.la ../gl/libgnu.la - -noinst_PROGRAMS = CertificateExample CrlExample - -CertificateExample_SOURCES = CertificateExample.c pkix_asn1_tab.c pkix.asn - -CrlExample_SOURCES = CrlExample.c pkix_asn1_tab.c pkix.asn - -BUILT_SOURCES = pkix_asn1_tab.c -MAINTAINERCLEANFILES = pkix_asn1_tab.c - -pkix_asn1_tab.c: $(srcdir)/pkix.asn - ../src/asn1Parser -o $@ $(srcdir)/pkix.asn diff --git a/examples/asn1Coding_test.asg b/examples/asn1Coding_test.asg deleted file mode 100644 index b0f9495..0000000 --- a/examples/asn1Coding_test.asg +++ /dev/null @@ -1,6 +0,0 @@ - - -TEST Test.Sequence1 - -int1 10 -int2 -10 diff --git a/examples/asn1Coding_test.asn b/examples/asn1Coding_test.asn deleted file mode 100644 index a3cd7f0..0000000 --- a/examples/asn1Coding_test.asn +++ /dev/null @@ -1,29 +0,0 @@ -Test { } - -DEFINITIONS IMPLICIT TAGS ::= - -BEGIN - -Sequence1 ::= SEQUENCE { - int1 INTEGER, - int2 INTEGER -} - -END - --- Copyright (C) 2002-2014 Free Software Foundation, Inc. --- --- This file is part of LIBTASN1. --- --- This program is free software: you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation, either version 3 of the License, or --- (at your option) any later version. --- --- This program is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License --- along with this program. If not, see . diff --git a/examples/pkix.asn b/examples/pkix.asn deleted file mode 100644 index 973bdcb..0000000 --- a/examples/pkix.asn +++ /dev/null @@ -1,954 +0,0 @@ --- Copyright (C) 2002-2014 Free Software Foundation, Inc. --- --- This file is part of LIBTASN1. --- --- This program is free software: you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation, either version 3 of the License, or --- (at your option) any later version. --- --- This program is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License --- along with this program. If not, see . - -PKIX1Implicit88 {iso(1) identified-organization(3) dod(6) internet(1) - security(5) mechanisms(5) pkix(7) id-mod(0) id-pkix1-implicit-88(2)} - -DEFINITIONS IMPLICIT TAGS ::= - -BEGIN - --- ISO arc for standard certificate and CRL extensions - -id-ce OBJECT IDENTIFIER ::= {joint-iso-ccitt(2) ds(5) 29} - - --- authority key identifier OID and syntax - -id-ce-authorityKeyIdentifier OBJECT IDENTIFIER ::= { id-ce 35 } - -AuthorityKeyIdentifier ::= SEQUENCE { - keyIdentifier [0] KeyIdentifier OPTIONAL, - authorityCertIssuer [1] GeneralNames OPTIONAL, - authorityCertSerialNumber [2] CertificateSerialNumber OPTIONAL } - -- authorityCertIssuer and authorityCertSerialNumber shall both - -- be present or both be absgent - -KeyIdentifier ::= OCTET STRING - --- subject key identifier OID and syntax - -id-ce-subjectKeyIdentifier OBJECT IDENTIFIER ::= { id-ce 14 } - -SubjectKeyIdentifier ::= KeyIdentifier - --- key usage extension OID and syntax - -id-ce-keyUsage OBJECT IDENTIFIER ::= { id-ce 15 } - -KeyUsage ::= BIT STRING { - digitalSignature (0), - nonRepudiation (1), - keyEncipherment (2), - dataEncipherment (3), - keyAgreement (4), - keyCertSign (5), - cRLSign (6), - encipherOnly (7), - decipherOnly (8) } - --- private key usage period extension OID and syntax - -id-ce-privateKeyUsagePeriod OBJECT IDENTIFIER ::= { id-ce 16 } - -PrivateKeyUsagePeriod ::= SEQUENCE { - notBefore [0] GeneralizedTime OPTIONAL, - notAfter [1] GeneralizedTime OPTIONAL } - -- either notBefore or notAfter shall be present - --- certificate policies extension OID and syntax - -id-ce-certificatePolicies OBJECT IDENTIFIER ::= { id-ce 32 } - -CertificatePolicies ::= SEQUENCE SIZE (1..MAX) OF PolicyInformation - -PolicyInformation ::= SEQUENCE { - policyIdentifier CertPolicyId, - policyQualifiers SEQUENCE SIZE (1..MAX) OF - PolicyQualifierInfo OPTIONAL } - -CertPolicyId ::= OBJECT IDENTIFIER - -PolicyQualifierInfo ::= SEQUENCE { - policyQualifierId PolicyQualifierId, - qualifier ANY DEFINED BY policyQualifierId } - --- Implementations that recognize additional policy qualifiers shall --- augment the following definition for PolicyQualifierId - -PolicyQualifierId ::= - OBJECT IDENTIFIER -- ( id-qt-cps | id-qt-unotice ) - --- CPS pointer qualifier - -CPSuri ::= IA5String - --- user notice qualifier - -UserNotice ::= SEQUENCE { - noticeRef NoticeReference OPTIONAL, - explicitText DisplayText OPTIONAL} - -NoticeReference ::= SEQUENCE { - organization DisplayText, - noticeNumbers SEQUENCE OF INTEGER } - -DisplayText ::= CHOICE { - visibleString VisibleString (SIZE (1..200)), - bmpString BMPString (SIZE (1..200)), - utf8String UTF8String (SIZE (1..200)) } - --- policy mapping extension OID and syntax - -id-ce-policyMappings OBJECT IDENTIFIER ::= { id-ce 33 } - -PolicyMappings ::= SEQUENCE SIZE (1..MAX) OF SEQUENCE { - issuerDomainPolicy CertPolicyId, - subjectDomainPolicy CertPolicyId } - --- subject alternative name extension OID and syntax - -id-ce-subjectAltName OBJECT IDENTIFIER ::= { id-ce 17 } - -SubjectAltName ::= GeneralNames - -GeneralNames ::= SEQUENCE SIZE (1..MAX) OF GeneralName - -GeneralName ::= CHOICE { - otherName [0] AnotherName, - rfc822Name [1] IA5String, - dNSName [2] IA5String, - x400Address [3] ORAddress, - directoryName [4] Name, - ediPartyName [5] EDIPartyName, - uniformResourceIdentifier [6] IA5String, - iPAddress [7] OCTET STRING, - registeredID [8] OBJECT IDENTIFIER } - --- AnotherName replaces OTHER-NAME ::= TYPE-IDENTIFIER, as --- TYPE-IDENTIFIER is not supported in the '88 ASN.1 syntax - -AnotherName ::= SEQUENCE { - type-id OBJECT IDENTIFIER, - value [0] EXPLICIT ANY DEFINED BY type-id } - -EDIPartyName ::= SEQUENCE { - nameAssigner [0] DirectoryString OPTIONAL, - partyName [1] DirectoryString } - --- issuer alternative name extension OID and syntax - -id-ce-issuerAltName OBJECT IDENTIFIER ::= { id-ce 18 } - -IssuerAltName ::= GeneralNames - -id-ce-subjectDirectoryAttributes OBJECT IDENTIFIER ::= { id-ce 9 } - -SubjectDirectoryAttributes ::= SEQUENCE SIZE (1..MAX) OF Attribute - --- basic constraints extension OID and syntax - -id-ce-basicConstraints OBJECT IDENTIFIER ::= { id-ce 19 } - -BasicConstraints ::= SEQUENCE { - cA BOOLEAN DEFAULT FALSE, - pathLenConstraint INTEGER (0..MAX) OPTIONAL } - --- name constraints extension OID and syntax - -id-ce-nameConstraints OBJECT IDENTIFIER ::= { id-ce 30 } - -NameConstraints ::= SEQUENCE { - permittedSubtrees [0] GeneralSubtrees OPTIONAL, - excludedSubtrees [1] GeneralSubtrees OPTIONAL } - -GeneralSubtrees ::= SEQUENCE SIZE (1..MAX) OF GeneralSubtree - -GeneralSubtree ::= SEQUENCE { - base GeneralName, - minimum [0] BaseDistance DEFAULT 0, - maximum [1] BaseDistance OPTIONAL } - -BaseDistance ::= INTEGER (0..MAX) - --- policy constraints extension OID and syntax - -id-ce-policyConstraints OBJECT IDENTIFIER ::= { id-ce 36 } - -PolicyConstraints ::= SEQUENCE { - requireExplicitPolicy [0] SkipCerts OPTIONAL, - inhibitPolicyMapping [1] SkipCerts OPTIONAL } - -SkipCerts ::= INTEGER (0..MAX) - --- CRL distribution points extension OID and syntax - -id-ce-cRLDistributionPoints OBJECT IDENTIFIER ::= {id-ce 31} - -CRLDistPointsSyntax ::= SEQUENCE SIZE (1..MAX) OF DistributionPoint - -DistributionPoint ::= SEQUENCE { - distributionPoint [0] DistributionPointName OPTIONAL, - reasons [1] ReasonFlags OPTIONAL, - cRLIssuer [2] GeneralNames OPTIONAL } - -DistributionPointName ::= CHOICE { - fullName [0] GeneralNames, - nameRelativeToCRLIssuer [1] RelativeDistinguishedName } - - - -ReasonFlags ::= BIT STRING { - unused (0), - keyCompromise (1), - cACompromise (2), - affiliationChanged (3), - superseded (4), - cessationOfOperation (5), - certificateHold (6) } - --- extended key usage extension OID and syntax - -id-ce-extKeyUsage OBJECT IDENTIFIER ::= {id-ce 37} - -ExtKeyUsageSyntax ::= SEQUENCE SIZE (1..MAX) OF KeyPurposeId - -KeyPurposeId ::= OBJECT IDENTIFIER - --- extended key purpose OIDs -id-kp-serverAuth OBJECT IDENTIFIER ::= { id-kp 1 } -id-kp-clientAuth OBJECT IDENTIFIER ::= { id-kp 2 } -id-kp-codeSigning OBJECT IDENTIFIER ::= { id-kp 3 } -id-kp-emailProtection OBJECT IDENTIFIER ::= { id-kp 4 } -id-kp-ipsecEndSystem OBJECT IDENTIFIER ::= { id-kp 5 } -id-kp-ipsecTunnel OBJECT IDENTIFIER ::= { id-kp 6 } -id-kp-ipsecUser OBJECT IDENTIFIER ::= { id-kp 7 } -id-kp-timeStamping OBJECT IDENTIFIER ::= { id-kp 8 } - --- authority info access - -id-pe-authorityInfoAccess OBJECT IDENTIFIER ::= { id-pe 1 } - -AuthorityInfoAccessSyntax ::= - SEQUENCE SIZE (1..MAX) OF AccessDescription - -AccessDescription ::= SEQUENCE { - accessMethod OBJECT IDENTIFIER, - accessLocation GeneralName } - --- CRL number extension OID and syntax - -id-ce-cRLNumber OBJECT IDENTIFIER ::= { id-ce 20 } - -CRLNumber ::= INTEGER (0..MAX) - --- issuing distribution point extension OID and syntax - -id-ce-issuingDistributionPoint OBJECT IDENTIFIER ::= { id-ce 28 } - -IssuingDistributionPoint ::= SEQUENCE { - distributionPoint [0] DistributionPointName OPTIONAL, - onlyContainsUserCerts [1] BOOLEAN DEFAULT FALSE, - onlyContainsCACerts [2] BOOLEAN DEFAULT FALSE, - onlySomeReasons [3] ReasonFlags OPTIONAL, - indirectCRL [4] BOOLEAN DEFAULT FALSE } - - -id-ce-deltaCRLIndicator OBJECT IDENTIFIER ::= { id-ce 27 } - --- deltaCRLIndicator ::= BaseCRLNumber - -BaseCRLNumber ::= CRLNumber - --- CRL reasons extension OID and syntax - -id-ce-cRLReasons OBJECT IDENTIFIER ::= { id-ce 21 } - -CRLReason ::= ENUMERATED { - unspecified (0), - keyCompromise (1), - cACompromise (2), - affiliationChanged (3), - superseded (4), - cessationOfOperation (5), - certificateHold (6), - removeFromCRL (8) } - --- certificate issuer CRL entry extension OID and syntax - -id-ce-certificateIssuer OBJECT IDENTIFIER ::= { id-ce 29 } - -CertificateIssuer ::= GeneralNames - --- hold instruction extension OID and syntax - -id-ce-holdInstructionCode OBJECT IDENTIFIER ::= { id-ce 23 } - -HoldInstructionCode ::= OBJECT IDENTIFIER - --- ANSI x9 holdinstructions - --- ANSI x9 arc holdinstruction arc -holdInstruction OBJECT IDENTIFIER ::= - {joint-iso-itu-t(2) member-body(2) us(840) x9cm(10040) 2} - --- ANSI X9 holdinstructions referenced by this standard -id-holdinstruction-none OBJECT IDENTIFIER ::= - {holdInstruction 1} -- deprecated -id-holdinstruction-callissuer OBJECT IDENTIFIER ::= - {holdInstruction 2} -id-holdinstruction-reject OBJECT IDENTIFIER ::= - {holdInstruction 3} - --- invalidity date CRL entry extension OID and syntax - -id-ce-invalidityDate OBJECT IDENTIFIER ::= { id-ce 24 } - -InvalidityDate ::= GeneralizedTime - - --- -------------------------------------- --- EXPLICIT --- -------------------------------------- - --- UNIVERSAL Types defined in '93 and '98 ASN.1 --- but required by this specification - -VisibleString ::= [UNIVERSAL 26] IMPLICIT OCTET STRING - -NumericString ::= [UNIVERSAL 18] IMPLICIT OCTET STRING - -IA5String ::= [UNIVERSAL 22] IMPLICIT OCTET STRING - -TeletexString ::= [UNIVERSAL 20] IMPLICIT OCTET STRING - -PrintableString ::= [UNIVERSAL 19] IMPLICIT OCTET STRING - -UniversalString ::= [UNIVERSAL 28] IMPLICIT OCTET STRING - -- UniversalString is defined in ASN.1:1993 - -BMPString ::= [UNIVERSAL 30] IMPLICIT OCTET STRING - -- BMPString is the subtype of UniversalString and models - -- the Basic Multilingual Plane of ISO/IEC/ITU 10646-1 - -UTF8String ::= [UNIVERSAL 12] IMPLICIT OCTET STRING - -- The content of this type conforms to RFC 2279. - - --- PKIX specific OIDs - -id-pkix OBJECT IDENTIFIER ::= - { iso(1) identified-organization(3) dod(6) internet(1) - security(5) mechanisms(5) pkix(7) } - --- PKIX arcs - -id-pe OBJECT IDENTIFIER ::= { id-pkix 1 } - -- arc for private certificate extensions -id-qt OBJECT IDENTIFIER ::= { id-pkix 2 } - -- arc for policy qualifier types -id-kp OBJECT IDENTIFIER ::= { id-pkix 3 } - -- arc for extended key purpose OIDS -id-ad OBJECT IDENTIFIER ::= { id-pkix 48 } - -- arc for access descriptors - --- policyQualifierIds for Internet policy qualifiers - -id-qt-cps OBJECT IDENTIFIER ::= { id-qt 1 } - -- OID for CPS qualifier -id-qt-unotice OBJECT IDENTIFIER ::= { id-qt 2 } - -- OID for user notice qualifier - --- access descriptor definitions - -id-ad-ocsp OBJECT IDENTIFIER ::= { id-ad 1 } -id-ad-caIssuers OBJECT IDENTIFIER ::= { id-ad 2 } - --- attribute data types -- - -Attribute ::= SEQUENCE { - type AttributeType, - values SET OF AttributeValue - -- at least one value is required -- -} - -AttributeType ::= OBJECT IDENTIFIER - -AttributeValue ::= ANY - -AttributeTypeAndValue ::= SEQUENCE { - type AttributeType, - value AttributeValue } - --- suggested naming attributes: Definition of the following --- information object set may be augmented to meet local --- requirements. Note that deleting members of the set may --- prevent interoperability with conforming implementations. --- presented in pairs: the AttributeType followed by the --- type definition for the corresponding AttributeValue - --- Arc for standard naming attributes -id-at OBJECT IDENTIFIER ::= {joint-iso-ccitt(2) ds(5) 4} - --- Attributes of type NameDirectoryString -id-at-name AttributeType ::= {id-at 41} -id-at-surname AttributeType ::= {id-at 4} -id-at-givenName AttributeType ::= {id-at 42} -id-at-initials AttributeType ::= {id-at 43} -id-at-generationQualifier AttributeType ::= {id-at 44} - -X520name ::= CHOICE { - teletexString TeletexString (SIZE (1..ub-name)), - printableString PrintableString (SIZE (1..ub-name)), - universalString UniversalString (SIZE (1..ub-name)), - utf8String UTF8String (SIZE (1..ub-name)), - bmpString BMPString (SIZE(1..ub-name)) } - --- - -id-at-commonName AttributeType ::= {id-at 3} - -X520CommonName ::= CHOICE { - teletexString TeletexString (SIZE (1..ub-common-name)), - printableString PrintableString (SIZE (1..ub-common-name)), - universalString UniversalString (SIZE (1..ub-common-name)), - utf8String UTF8String (SIZE (1..ub-common-name)), - bmpString BMPString (SIZE(1..ub-common-name)) } - --- - -id-at-localityName AttributeType ::= {id-at 7} - -X520LocalityName ::= CHOICE { - teletexString TeletexString (SIZE (1..ub-locality-name)), - printableString PrintableString (SIZE (1..ub-locality-name)), - universalString UniversalString (SIZE (1..ub-locality-name)), - utf8String UTF8String (SIZE (1..ub-locality-name)), - bmpString BMPString (SIZE(1..ub-locality-name)) } - --- - -id-at-stateOrProvinceName AttributeType ::= {id-at 8} - -X520StateOrProvinceName ::= CHOICE { - teletexString TeletexString (SIZE (1..ub-state-name)), - printableString PrintableString (SIZE (1..ub-state-name)), - universalString UniversalString (SIZE (1..ub-state-name)), - utf8String UTF8String (SIZE (1..ub-state-name)), - bmpString BMPString (SIZE(1..ub-state-name)) } - --- - -id-at-organizationName AttributeType ::= {id-at 10} - -X520OrganizationName ::= CHOICE { - teletexString TeletexString (SIZE (1..ub-organization-name)), - printableString PrintableString (SIZE (1..ub-organization-name)), - universalString UniversalString (SIZE (1..ub-organization-name)), - utf8String UTF8String (SIZE (1..ub-organization-name)), - bmpString BMPString (SIZE(1..ub-organization-name)) } - --- - -id-at-organizationalUnitName AttributeType ::= {id-at 11} - -X520OrganizationalUnitName ::= CHOICE { - teletexString TeletexString (SIZE (1..ub-organizational-unit-name)), - printableString PrintableString - (SIZE (1..ub-organizational-unit-name)), - universalString UniversalString - (SIZE (1..ub-organizational-unit-name)), - utf8String UTF8String (SIZE (1..ub-organizational-unit-name)), - bmpString BMPString (SIZE(1..ub-organizational-unit-name)) } - --- - -id-at-title AttributeType ::= {id-at 12} - -X520Title ::= CHOICE { - teletexString TeletexString (SIZE (1..ub-title)), - printableString PrintableString (SIZE (1..ub-title)), - universalString UniversalString (SIZE (1..ub-title)), - utf8String UTF8String (SIZE (1..ub-title)), - bmpString BMPString (SIZE(1..ub-title)) } - --- - -id-at-dnQualifier AttributeType ::= {id-at 46} -X520dnQualifier ::= PrintableString - -id-at-countryName AttributeType ::= {id-at 6} -X520countryName ::= PrintableString (SIZE (2)) -- IS 3166 codes - - -- Legacy attributes - -pkcs-9 OBJECT IDENTIFIER ::= - { iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) 9 } - -emailAddress AttributeType ::= { pkcs-9 1 } - -Pkcs9email ::= IA5String (SIZE (1..ub-emailaddress-length)) - --- naming data types -- - -Name ::= CHOICE { -- only one possibility for now -- - rdnSequence RDNSequence } - -RDNSequence ::= SEQUENCE OF RelativeDistinguishedName - -DistinguishedName ::= RDNSequence - -RelativeDistinguishedName ::= - SET SIZE (1 .. MAX) OF AttributeTypeAndValue - --- Directory string type -- - -DirectoryString ::= CHOICE { - teletexString TeletexString (SIZE (1..MAX)), - printableString PrintableString (SIZE (1..MAX)), - universalString UniversalString (SIZE (1..MAX)), - utf8String UTF8String (SIZE (1..MAX)), - bmpString BMPString (SIZE(1..MAX)) } - - --- -------------------------------------------------------- --- certificate and CRL specific structures begin here --- -------------------------------------------------------- - -Certificate ::= SEQUENCE { - tbsCertificate TBSCertificate, - signatureAlgorithm AlgorithmIdentifier, - signature BIT STRING } - -TBSCertificate ::= SEQUENCE { - version [0] EXPLICIT Version DEFAULT v1, - serialNumber CertificateSerialNumber, - signature AlgorithmIdentifier, - issuer Name, - validity Validity, - subject Name, - subjectPublicKeyInfo SubjectPublicKeyInfo, - issuerUniqueID [1] IMPLICIT UniqueIdentifier OPTIONAL, - -- If present, version shall be v2 or v3 - subjectUniqueID [2] IMPLICIT UniqueIdentifier OPTIONAL, - -- If present, version shall be v2 or v3 - extensions [3] EXPLICIT Extensions OPTIONAL - -- If present, version shall be v3 -- -} - -Version ::= INTEGER { v1(0), v2(1), v3(2) } - -CertificateSerialNumber ::= INTEGER - -Validity ::= SEQUENCE { - notBefore Time, - notAfter Time } - -Time ::= CHOICE { - utcTime UTCTime, - generalTime GeneralizedTime } - -UniqueIdentifier ::= BIT STRING - -SubjectPublicKeyInfo ::= SEQUENCE { - algorithm AlgorithmIdentifier, - subjectPublicKey BIT STRING } - -Extensions ::= SEQUENCE SIZE (1..MAX) OF Extension - -Extension ::= SEQUENCE { - extnID OBJECT IDENTIFIER, - critical BOOLEAN DEFAULT FALSE, - extnValue OCTET STRING } - - --- ------------------------------------------ --- CRL structures --- ------------------------------------------ - -CertificateList ::= SEQUENCE { - tbsCertList TBSCertList, - signatureAlgorithm AlgorithmIdentifier, - signature BIT STRING } - -TBSCertList ::= SEQUENCE { - version Version OPTIONAL, - -- if present, shall be v2 - signature AlgorithmIdentifier, - issuer Name, - thisUpdate Time, - nextUpdate Time OPTIONAL, - revokedCertificates SEQUENCE OF SEQUENCE { - userCertificate CertificateSerialNumber, - revocationDate Time, - crlEntryExtensions Extensions OPTIONAL - -- if present, shall be v2 - } OPTIONAL, - crlExtensions [0] EXPLICIT Extensions OPTIONAL - -- if present, shall be v2 -- -} - --- Version, Time, CertificateSerialNumber, and Extensions were --- defined earlier for use in the certificate structure - -AlgorithmIdentifier ::= SEQUENCE { - algorithm OBJECT IDENTIFIER, - parameters ANY DEFINED BY algorithm OPTIONAL } - -- contains a value of the type - -- registered for use with the - -- algorithm object identifier value - --- Algorithm OIDs and parameter structures - -pkcs-1 OBJECT IDENTIFIER ::= { - iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) 1 } - -rsaEncryption OBJECT IDENTIFIER ::= { pkcs-1 1 } - -md2WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 2 } - -md5WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 4 } - -sha1WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 5 } - -id-dsa-with-sha1 OBJECT IDENTIFIER ::= { - iso(1) member-body(2) us(840) x9-57 (10040) x9algorithm(4) 3 } - -Dss-Sig-Value ::= SEQUENCE { - r INTEGER, - s INTEGER } - -dhpublicnumber OBJECT IDENTIFIER ::= { - iso(1) member-body(2) us(840) ansi-x942(10046) number-type(2) 1 } - -DomainParameters ::= SEQUENCE { - p INTEGER, -- odd prime, p=jq +1 - g INTEGER, -- generator, g - q INTEGER, -- factor of p-1 - j INTEGER OPTIONAL, -- subgroup factor, j>= 2 - validationParms ValidationParms OPTIONAL } - -ValidationParms ::= SEQUENCE { - seed BIT STRING, - pgenCounter INTEGER } - -id-dsa OBJECT IDENTIFIER ::= { - iso(1) member-body(2) us(840) x9-57(10040) x9algorithm(4) 1 } - -Dss-Parms ::= SEQUENCE { - p INTEGER, - q INTEGER, - g INTEGER } - --- x400 address syntax starts here --- OR Names - -ORAddress ::= SEQUENCE { - built-in-standard-attributes BuiltInStandardAttributes, - built-in-domain-defined-attributes - BuiltInDomainDefinedAttributes OPTIONAL, - -- see also teletex-domain-defined-attributes - extension-attributes ExtensionAttributes OPTIONAL } --- The OR-address is semantically absent from the OR-name if the --- built-in-standard-attribute sequence is empty and the --- built-in-domain-defined-attributes and extension-attributes are --- both omitted. - --- Built-in Standard Attributes - -BuiltInStandardAttributes ::= SEQUENCE { - country-name CountryName OPTIONAL, - administration-domain-name AdministrationDomainName OPTIONAL, - network-address [0] EXPLICIT NetworkAddress OPTIONAL, - -- see also extended-network-address - terminal-identifier [1] EXPLICIT TerminalIdentifier OPTIONAL, - private-domain-name [2] EXPLICIT PrivateDomainName OPTIONAL, - organization-name [3] EXPLICIT OrganizationName OPTIONAL, - -- see also teletex-organization-name - numeric-user-identifier [4] EXPLICIT NumericUserIdentifier OPTIONAL, - personal-name [5] EXPLICIT PersonalName OPTIONAL, - -- see also teletex-personal-name - organizational-unit-names [6] EXPLICIT OrganizationalUnitNames OPTIONAL - -- see also teletex-organizational-unit-names -- -} - -CountryName ::= [APPLICATION 1] CHOICE { - x121-dcc-code NumericString - (SIZE (ub-country-name-numeric-length)), - iso-3166-alpha2-code PrintableString - (SIZE (ub-country-name-alpha-length)) } - -AdministrationDomainName ::= [APPLICATION 2] EXPLICIT CHOICE { - numeric NumericString (SIZE (0..ub-domain-name-length)), - printable PrintableString (SIZE (0..ub-domain-name-length)) } - -NetworkAddress ::= X121Address -- see also extended-network-address - -X121Address ::= NumericString (SIZE (1..ub-x121-address-length)) - -TerminalIdentifier ::= PrintableString (SIZE (1..ub-terminal-id-length)) - -PrivateDomainName ::= CHOICE { - numeric NumericString (SIZE (1..ub-domain-name-length)), - printable PrintableString (SIZE (1..ub-domain-name-length)) } - -OrganizationName ::= PrintableString - (SIZE (1..ub-organization-name-length)) --- see also teletex-organization-name - -NumericUserIdentifier ::= NumericString - (SIZE (1..ub-numeric-user-id-length)) - -PersonalName ::= SET { - surname [0] PrintableString (SIZE (1..ub-surname-length)), - given-name [1] PrintableString - (SIZE (1..ub-given-name-length)) OPTIONAL, - initials [2] PrintableString (SIZE (1..ub-initials-length)) OPTIONAL, - generation-qualifier [3] PrintableString - (SIZE (1..ub-generation-qualifier-length)) OPTIONAL } --- see also teletex-personal-name - -OrganizationalUnitNames ::= SEQUENCE SIZE (1..ub-organizational-units) - OF OrganizationalUnitName --- see also teletex-organizational-unit-names - -OrganizationalUnitName ::= PrintableString (SIZE - (1..ub-organizational-unit-name-length)) - --- Built-in Domain-defined Attributes - -BuiltInDomainDefinedAttributes ::= SEQUENCE SIZE - (1..ub-domain-defined-attributes) OF - BuiltInDomainDefinedAttribute - -BuiltInDomainDefinedAttribute ::= SEQUENCE { - type PrintableString (SIZE - (1..ub-domain-defined-attribute-type-length)), - value PrintableString (SIZE - (1..ub-domain-defined-attribute-value-length))} - --- Extension Attributes - -ExtensionAttributes ::= SET SIZE (1..ub-extension-attributes) OF - ExtensionAttribute - -ExtensionAttribute ::= SEQUENCE { - extension-attribute-type [0] EXPLICIT INTEGER (0..ub-extension-attributes), - extension-attribute-value [1] EXPLICIT - ANY DEFINED BY extension-attribute-type } - --- Extension types and attribute values --- - -common-name INTEGER ::= 1 - -CommonName ::= PrintableString (SIZE (1..ub-common-name-length)) - -teletex-common-name INTEGER ::= 2 - -TeletexCommonName ::= TeletexString (SIZE (1..ub-common-name-length)) - -teletex-organization-name INTEGER ::= 3 - -TeletexOrganizationName ::= - TeletexString (SIZE (1..ub-organization-name-length)) - -teletex-personal-name INTEGER ::= 4 - -TeletexPersonalName ::= SET { - surname [0] EXPLICIT TeletexString (SIZE (1..ub-surname-length)), - given-name [1] EXPLICIT TeletexString - (SIZE (1..ub-given-name-length)) OPTIONAL, - initials [2] EXPLICIT TeletexString (SIZE (1..ub-initials-length)) OPTIONAL, - generation-qualifier [3] EXPLICIT TeletexString (SIZE - (1..ub-generation-qualifier-length)) OPTIONAL } - -teletex-organizational-unit-names INTEGER ::= 5 - -TeletexOrganizationalUnitNames ::= SEQUENCE SIZE - (1..ub-organizational-units) OF TeletexOrganizationalUnitName - -TeletexOrganizationalUnitName ::= TeletexString - (SIZE (1..ub-organizational-unit-name-length)) - -pds-name INTEGER ::= 7 - -PDSName ::= PrintableString (SIZE (1..ub-pds-name-length)) - -physical-delivery-country-name INTEGER ::= 8 - -PhysicalDeliveryCountryName ::= CHOICE { - x121-dcc-code NumericString (SIZE (ub-country-name-numeric-length)), - iso-3166-alpha2-code PrintableString - (SIZE (ub-country-name-alpha-length)) } - -postal-code INTEGER ::= 9 - -PostalCode ::= CHOICE { - numeric-code NumericString (SIZE (1..ub-postal-code-length)), - printable-code PrintableString (SIZE (1..ub-postal-code-length)) } - -physical-delivery-office-name INTEGER ::= 10 - -PhysicalDeliveryOfficeName ::= PDSParameter - -physical-delivery-office-number INTEGER ::= 11 - -PhysicalDeliveryOfficeNumber ::= PDSParameter - -extension-OR-address-components INTEGER ::= 12 - -ExtensionORAddressComponents ::= PDSParameter - -physical-delivery-personal-name INTEGER ::= 13 - -PhysicalDeliveryPersonalName ::= PDSParameter - -physical-delivery-organization-name INTEGER ::= 14 - -PhysicalDeliveryOrganizationName ::= PDSParameter - -extension-physical-delivery-address-components INTEGER ::= 15 - -ExtensionPhysicalDeliveryAddressComponents ::= PDSParameter - -unformatted-postal-address INTEGER ::= 16 - -UnformattedPostalAddress ::= SET { - printable-address SEQUENCE SIZE (1..ub-pds-physical-address-lines) OF - PrintableString (SIZE (1..ub-pds-parameter-length)) OPTIONAL, - teletex-string TeletexString - (SIZE (1..ub-unformatted-address-length)) OPTIONAL } - -street-address INTEGER ::= 17 - -StreetAddress ::= PDSParameter - -post-office-box-address INTEGER ::= 18 - -PostOfficeBoxAddress ::= PDSParameter - -poste-restante-address INTEGER ::= 19 - -PosteRestanteAddress ::= PDSParameter - -unique-postal-name INTEGER ::= 20 - -UniquePostalName ::= PDSParameter - -local-postal-attributes INTEGER ::= 21 - -LocalPostalAttributes ::= PDSParameter - -PDSParameter ::= SET { - printable-string PrintableString - (SIZE(1..ub-pds-parameter-length)) OPTIONAL, - teletex-string TeletexString - (SIZE(1..ub-pds-parameter-length)) OPTIONAL } - -extended-network-address INTEGER ::= 22 - -ExtendedNetworkAddress ::= CHOICE { - e163-4-address SEQUENCE { - number [0] EXPLICIT NumericString (SIZE (1..ub-e163-4-number-length)), - sub-address [1] EXPLICIT NumericString - (SIZE (1..ub-e163-4-sub-address-length)) OPTIONAL }, - psap-address [0] EXPLICIT PresentationAddress } - -PresentationAddress ::= SEQUENCE { - pSelector [0] EXPLICIT OCTET STRING OPTIONAL, - sSelector [1] EXPLICIT OCTET STRING OPTIONAL, - tSelector [2] EXPLICIT OCTET STRING OPTIONAL, - nAddresses [3] EXPLICIT SET SIZE (1..MAX) OF OCTET STRING } - -terminal-type INTEGER ::= 23 - -TerminalType ::= INTEGER { - telex (3), - teletex (4), - g3-facsimile (5), - g4-facsimile (6), - ia5-terminal (7), - videotex (8) } (0..ub-integer-options) - --- Extension Domain-defined Attributes - -teletex-domain-defined-attributes INTEGER ::= 6 - -TeletexDomainDefinedAttributes ::= SEQUENCE SIZE - (1..ub-domain-defined-attributes) OF TeletexDomainDefinedAttribute - -TeletexDomainDefinedAttribute ::= SEQUENCE { - type TeletexString - (SIZE (1..ub-domain-defined-attribute-type-length)), - value TeletexString - (SIZE (1..ub-domain-defined-attribute-value-length)) } - --- specifications of Upper Bounds shall be regarded as mandatory --- from Annex B of ITU-T X.411 Reference Definition of MTS Parameter --- Upper Bounds - --- Upper Bounds -ub-name INTEGER ::= 32768 -ub-common-name INTEGER ::= 64 -ub-locality-name INTEGER ::= 128 -ub-state-name INTEGER ::= 128 -ub-organization-name INTEGER ::= 64 -ub-organizational-unit-name INTEGER ::= 64 -ub-title INTEGER ::= 64 -ub-match INTEGER ::= 128 - -ub-emailaddress-length INTEGER ::= 128 - -ub-common-name-length INTEGER ::= 64 -ub-country-name-alpha-length INTEGER ::= 2 -ub-country-name-numeric-length INTEGER ::= 3 -ub-domain-defined-attributes INTEGER ::= 4 -ub-domain-defined-attribute-type-length INTEGER ::= 8 -ub-domain-defined-attribute-value-length INTEGER ::= 128 -ub-domain-name-length INTEGER ::= 16 -ub-extension-attributes INTEGER ::= 256 -ub-e163-4-number-length INTEGER ::= 15 -ub-e163-4-sub-address-length INTEGER ::= 40 -ub-generation-qualifier-length INTEGER ::= 3 -ub-given-name-length INTEGER ::= 16 -ub-initials-length INTEGER ::= 5 -ub-integer-options INTEGER ::= 256 -ub-numeric-user-id-length INTEGER ::= 32 -ub-organization-name-length INTEGER ::= 64 -ub-organizational-unit-name-length INTEGER ::= 32 -ub-organizational-units INTEGER ::= 4 -ub-pds-name-length INTEGER ::= 16 -ub-pds-parameter-length INTEGER ::= 30 -ub-pds-physical-address-lines INTEGER ::= 6 -ub-postal-code-length INTEGER ::= 16 -ub-surname-length INTEGER ::= 40 -ub-terminal-id-length INTEGER ::= 24 -ub-unformatted-address-length INTEGER ::= 180 -ub-x121-address-length INTEGER ::= 16 - --- Note - upper bounds on string types, such as TeletexString, are --- measured in characters. Excepting PrintableString or IA5String, a --- significantly greater number of octets will be required to hold --- such a value. As a minimum, 16 octets, or twice the specified upper --- bound, whichever is the larger, should be allowed for TeletexString. --- For UTF8String or UniversalString at least four times the upper --- bound should be allowed. - - - -END diff --git a/gl/Makefile.am b/gl/Makefile.am deleted file mode 100644 index b72df89..0000000 --- a/gl/Makefile.am +++ /dev/null @@ -1,1095 +0,0 @@ -## DO NOT EDIT! GENERATED AUTOMATICALLY! -## Process this file with automake to produce Makefile.in. -# Copyright (C) 2002-2017 Free Software Foundation, Inc. -# -# This file is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or -# (at your option) any later version. -# -# This file is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this file. If not, see . -# -# As a special exception to the GNU General Public License, -# this file may be distributed as part of a program that -# contains a configuration script generated by Autoconf, under -# the same distribution terms as the rest of that program. -# -# Generated by gnulib-tool. -# Reproduce by: gnulib-tool --import --local-dir=gl/override --lib=libgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --no-conditional-dependencies --libtool --macro-prefix=gl --no-vc-files autobuild fdl-1.3 gendocs getopt-gnu gettime gnupload maintainer-makefile manywarnings pmccabe2html progname read-file stdint update-copyright valgrind-tests version-etc-fsf warnings - -AUTOMAKE_OPTIONS = 1.9.6 gnits - -SUBDIRS = -noinst_HEADERS = -noinst_LIBRARIES = -noinst_LTLIBRARIES = -EXTRA_DIST = -BUILT_SOURCES = -SUFFIXES = -MOSTLYCLEANFILES = core *.stackdump -MOSTLYCLEANDIRS = -CLEANFILES = -DISTCLEANFILES = -MAINTAINERCLEANFILES = -EXTRA_DIST += m4/gnulib-cache.m4 - -AM_CPPFLAGS = -AM_CFLAGS = - -noinst_LTLIBRARIES += libgnu.la - -libgnu_la_SOURCES = -libgnu_la_LIBADD = $(gl_LTLIBOBJS) -libgnu_la_DEPENDENCIES = $(gl_LTLIBOBJS) -EXTRA_libgnu_la_SOURCES = -libgnu_la_LDFLAGS = $(AM_LDFLAGS) -libgnu_la_LDFLAGS += -no-undefined -libgnu_la_LDFLAGS += $(LIB_CLOCK_GETTIME) -libgnu_la_LDFLAGS += $(LTLIBINTL) - -## begin gnulib module absolute-header - -# Use this preprocessor expression to decide whether #include_next works. -# Do not rely on a 'configure'-time test for this, since the expression -# might appear in an installed header, which is used by some other compiler. -HAVE_INCLUDE_NEXT = (__GNUC__ || 60000000 <= __DECC_VER) - -## end gnulib module absolute-header - -## begin gnulib module errno - -BUILT_SOURCES += $(ERRNO_H) - -# We need the following in order to create when the system -# doesn't have one that is POSIX compliant. -if GL_GENERATE_ERRNO_H -errno.h: errno.in.h $(top_builddir)/config.status - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ - -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_ERRNO_H''@|$(NEXT_ERRNO_H)|g' \ - -e 's|@''EMULTIHOP_HIDDEN''@|$(EMULTIHOP_HIDDEN)|g' \ - -e 's|@''EMULTIHOP_VALUE''@|$(EMULTIHOP_VALUE)|g' \ - -e 's|@''ENOLINK_HIDDEN''@|$(ENOLINK_HIDDEN)|g' \ - -e 's|@''ENOLINK_VALUE''@|$(ENOLINK_VALUE)|g' \ - -e 's|@''EOVERFLOW_HIDDEN''@|$(EOVERFLOW_HIDDEN)|g' \ - -e 's|@''EOVERFLOW_VALUE''@|$(EOVERFLOW_VALUE)|g' \ - < $(srcdir)/errno.in.h; \ - } > $@-t && \ - mv $@-t $@ -else -errno.h: $(top_builddir)/config.status - rm -f $@ -endif -MOSTLYCLEANFILES += errno.h errno.h-t - -EXTRA_DIST += errno.in.h - -## end gnulib module errno - -## begin gnulib module fstat - - -EXTRA_DIST += fstat.c - -EXTRA_libgnu_la_SOURCES += fstat.c - -## end gnulib module fstat - -## begin gnulib module ftell - - -EXTRA_DIST += ftell.c - -EXTRA_libgnu_la_SOURCES += ftell.c - -## end gnulib module ftell - -## begin gnulib module ftello - - -EXTRA_DIST += ftello.c stdio-impl.h - -EXTRA_libgnu_la_SOURCES += ftello.c - -## end gnulib module ftello - -## begin gnulib module gendocs - - -EXTRA_DIST += $(top_srcdir)/build-aux/gendocs.sh - -## end gnulib module gendocs - -## begin gnulib module getopt-posix - -BUILT_SOURCES += $(GETOPT_H) - -# We need the following in order to create when the system -# doesn't have one that works with the given compiler. -getopt.h: getopt.in.h $(top_builddir)/config.status $(ARG_NONNULL_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ - -e 's|@''HAVE_GETOPT_H''@|$(HAVE_GETOPT_H)|g' \ - -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_GETOPT_H''@|$(NEXT_GETOPT_H)|g' \ - -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - < $(srcdir)/getopt.in.h; \ - } > $@-t && \ - mv -f $@-t $@ -MOSTLYCLEANFILES += getopt.h getopt.h-t - -EXTRA_DIST += getopt.c getopt.in.h getopt1.c getopt_int.h - -EXTRA_libgnu_la_SOURCES += getopt.c getopt1.c - -## end gnulib module getopt-posix - -## begin gnulib module gettext-h - -libgnu_la_SOURCES += gettext.h - -## end gnulib module gettext-h - -## begin gnulib module gettime - -libgnu_la_SOURCES += gettime.c - -## end gnulib module gettime - -## begin gnulib module gettimeofday - - -EXTRA_DIST += gettimeofday.c - -EXTRA_libgnu_la_SOURCES += gettimeofday.c - -## end gnulib module gettimeofday - -## begin gnulib module gnumakefile - -distclean-local: clean-GNUmakefile -clean-GNUmakefile: - test '$(srcdir)' = . || rm -f $(top_builddir)/GNUmakefile - -EXTRA_DIST += $(top_srcdir)/GNUmakefile - -## end gnulib module gnumakefile - -## begin gnulib module gnupload - - -EXTRA_DIST += $(top_srcdir)/build-aux/gnupload - -## end gnulib module gnupload - -## begin gnulib module limits-h - -BUILT_SOURCES += $(LIMITS_H) - -# We need the following in order to create when the system -# doesn't have one that is compatible with GNU. -if GL_GENERATE_LIMITS_H -limits.h: limits.in.h $(top_builddir)/config.status - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ - -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_LIMITS_H''@|$(NEXT_LIMITS_H)|g' \ - < $(srcdir)/limits.in.h; \ - } > $@-t && \ - mv $@-t $@ -else -limits.h: $(top_builddir)/config.status - rm -f $@ -endif -MOSTLYCLEANFILES += limits.h limits.h-t - -EXTRA_DIST += limits.in.h - -## end gnulib module limits-h - -## begin gnulib module lseek - - -EXTRA_DIST += lseek.c - -EXTRA_libgnu_la_SOURCES += lseek.c - -## end gnulib module lseek - -## begin gnulib module maintainer-makefile - -EXTRA_DIST += $(top_srcdir)/maint.mk - -## end gnulib module maintainer-makefile - -## begin gnulib module malloc-posix - - -EXTRA_DIST += malloc.c - -EXTRA_libgnu_la_SOURCES += malloc.c - -## end gnulib module malloc-posix - -## begin gnulib module msvc-inval - - -EXTRA_DIST += msvc-inval.c msvc-inval.h - -EXTRA_libgnu_la_SOURCES += msvc-inval.c - -## end gnulib module msvc-inval - -## begin gnulib module msvc-nothrow - - -EXTRA_DIST += msvc-nothrow.c msvc-nothrow.h - -EXTRA_libgnu_la_SOURCES += msvc-nothrow.c - -## end gnulib module msvc-nothrow - -## begin gnulib module pmccabe2html - - -EXTRA_DIST += $(top_srcdir)/build-aux/pmccabe2html $(top_srcdir)/build-aux/pmccabe.css - -## end gnulib module pmccabe2html - -## begin gnulib module progname - -libgnu_la_SOURCES += progname.h progname.c - -## end gnulib module progname - -## begin gnulib module read-file - -libgnu_la_SOURCES += read-file.c - -EXTRA_DIST += read-file.h - -## end gnulib module read-file - -## begin gnulib module realloc-posix - - -EXTRA_DIST += realloc.c - -EXTRA_libgnu_la_SOURCES += realloc.c - -## end gnulib module realloc-posix - -## begin gnulib module snippet/_Noreturn - -# Because this Makefile snippet defines a variable used by other -# gnulib Makefile snippets, it must be present in all Makefile.am that -# need it. This is ensured by the applicability 'all' defined above. - -_NORETURN_H=$(top_srcdir)/build-aux/snippet/_Noreturn.h - -EXTRA_DIST += $(top_srcdir)/build-aux/snippet/_Noreturn.h - -## end gnulib module snippet/_Noreturn - -## begin gnulib module snippet/arg-nonnull - -# The BUILT_SOURCES created by this Makefile snippet are not used via #include -# statements but through direct file reference. Therefore this snippet must be -# present in all Makefile.am that need it. This is ensured by the applicability -# 'all' defined above. - -BUILT_SOURCES += arg-nonnull.h -# The arg-nonnull.h that gets inserted into generated .h files is the same as -# build-aux/snippet/arg-nonnull.h, except that it has the copyright header cut -# off. -arg-nonnull.h: $(top_srcdir)/build-aux/snippet/arg-nonnull.h - $(AM_V_GEN)rm -f $@-t $@ && \ - sed -n -e '/GL_ARG_NONNULL/,$$p' \ - < $(top_srcdir)/build-aux/snippet/arg-nonnull.h \ - > $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += arg-nonnull.h arg-nonnull.h-t - -ARG_NONNULL_H=arg-nonnull.h - -EXTRA_DIST += $(top_srcdir)/build-aux/snippet/arg-nonnull.h - -## end gnulib module snippet/arg-nonnull - -## begin gnulib module snippet/c++defs - -# The BUILT_SOURCES created by this Makefile snippet are not used via #include -# statements but through direct file reference. Therefore this snippet must be -# present in all Makefile.am that need it. This is ensured by the applicability -# 'all' defined above. - -BUILT_SOURCES += c++defs.h -# The c++defs.h that gets inserted into generated .h files is the same as -# build-aux/snippet/c++defs.h, except that it has the copyright header cut off. -c++defs.h: $(top_srcdir)/build-aux/snippet/c++defs.h - $(AM_V_GEN)rm -f $@-t $@ && \ - sed -n -e '/_GL_CXXDEFS/,$$p' \ - < $(top_srcdir)/build-aux/snippet/c++defs.h \ - > $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += c++defs.h c++defs.h-t - -CXXDEFS_H=c++defs.h - -EXTRA_DIST += $(top_srcdir)/build-aux/snippet/c++defs.h - -## end gnulib module snippet/c++defs - -## begin gnulib module snippet/warn-on-use - -BUILT_SOURCES += warn-on-use.h -# The warn-on-use.h that gets inserted into generated .h files is the same as -# build-aux/snippet/warn-on-use.h, except that it has the copyright header cut -# off. -warn-on-use.h: $(top_srcdir)/build-aux/snippet/warn-on-use.h - $(AM_V_GEN)rm -f $@-t $@ && \ - sed -n -e '/^.ifndef/,$$p' \ - < $(top_srcdir)/build-aux/snippet/warn-on-use.h \ - > $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += warn-on-use.h warn-on-use.h-t - -WARN_ON_USE_H=warn-on-use.h - -EXTRA_DIST += $(top_srcdir)/build-aux/snippet/warn-on-use.h - -## end gnulib module snippet/warn-on-use - -## begin gnulib module stdarg - -BUILT_SOURCES += $(STDARG_H) - -# We need the following in order to create when the system -# doesn't have one that works with the given compiler. -if GL_GENERATE_STDARG_H -stdarg.h: stdarg.in.h $(top_builddir)/config.status - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ - -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_STDARG_H''@|$(NEXT_STDARG_H)|g' \ - < $(srcdir)/stdarg.in.h; \ - } > $@-t && \ - mv $@-t $@ -else -stdarg.h: $(top_builddir)/config.status - rm -f $@ -endif -MOSTLYCLEANFILES += stdarg.h stdarg.h-t - -EXTRA_DIST += stdarg.in.h - -## end gnulib module stdarg - -## begin gnulib module stddef - -BUILT_SOURCES += $(STDDEF_H) - -# We need the following in order to create when the system -# doesn't have one that works with the given compiler. -if GL_GENERATE_STDDEF_H -stddef.h: stddef.in.h $(top_builddir)/config.status - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ - -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_STDDEF_H''@|$(NEXT_STDDEF_H)|g' \ - -e 's|@''HAVE_MAX_ALIGN_T''@|$(HAVE_MAX_ALIGN_T)|g' \ - -e 's|@''HAVE_WCHAR_T''@|$(HAVE_WCHAR_T)|g' \ - -e 's|@''REPLACE_NULL''@|$(REPLACE_NULL)|g' \ - < $(srcdir)/stddef.in.h; \ - } > $@-t && \ - mv $@-t $@ -else -stddef.h: $(top_builddir)/config.status - rm -f $@ -endif -MOSTLYCLEANFILES += stddef.h stddef.h-t - -EXTRA_DIST += stddef.in.h - -## end gnulib module stddef - -## begin gnulib module stdint - -BUILT_SOURCES += $(STDINT_H) - -# We need the following in order to create when the system -# doesn't have one that works with the given compiler. -if GL_GENERATE_STDINT_H -stdint.h: stdint.in.h $(top_builddir)/config.status - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ - -e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \ - -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_STDINT_H''@|$(NEXT_STDINT_H)|g' \ - -e 's/@''HAVE_C99_STDINT_H''@/$(HAVE_C99_STDINT_H)/g' \ - -e 's/@''HAVE_SYS_TYPES_H''@/$(HAVE_SYS_TYPES_H)/g' \ - -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \ - -e 's/@''HAVE_SYS_INTTYPES_H''@/$(HAVE_SYS_INTTYPES_H)/g' \ - -e 's/@''HAVE_SYS_BITYPES_H''@/$(HAVE_SYS_BITYPES_H)/g' \ - -e 's/@''HAVE_WCHAR_H''@/$(HAVE_WCHAR_H)/g' \ - -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \ - -e 's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \ - -e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \ - -e 's/@''BITSIZEOF_PTRDIFF_T''@/$(BITSIZEOF_PTRDIFF_T)/g' \ - -e 's/@''PTRDIFF_T_SUFFIX''@/$(PTRDIFF_T_SUFFIX)/g' \ - -e 's/@''BITSIZEOF_SIG_ATOMIC_T''@/$(BITSIZEOF_SIG_ATOMIC_T)/g' \ - -e 's/@''HAVE_SIGNED_SIG_ATOMIC_T''@/$(HAVE_SIGNED_SIG_ATOMIC_T)/g' \ - -e 's/@''SIG_ATOMIC_T_SUFFIX''@/$(SIG_ATOMIC_T_SUFFIX)/g' \ - -e 's/@''BITSIZEOF_SIZE_T''@/$(BITSIZEOF_SIZE_T)/g' \ - -e 's/@''SIZE_T_SUFFIX''@/$(SIZE_T_SUFFIX)/g' \ - -e 's/@''BITSIZEOF_WCHAR_T''@/$(BITSIZEOF_WCHAR_T)/g' \ - -e 's/@''HAVE_SIGNED_WCHAR_T''@/$(HAVE_SIGNED_WCHAR_T)/g' \ - -e 's/@''WCHAR_T_SUFFIX''@/$(WCHAR_T_SUFFIX)/g' \ - -e 's/@''BITSIZEOF_WINT_T''@/$(BITSIZEOF_WINT_T)/g' \ - -e 's/@''HAVE_SIGNED_WINT_T''@/$(HAVE_SIGNED_WINT_T)/g' \ - -e 's/@''WINT_T_SUFFIX''@/$(WINT_T_SUFFIX)/g' \ - -e 's/@''GNULIB_OVERRIDES_WINT_T''@/$(GNULIB_OVERRIDES_WINT_T)/g' \ - < $(srcdir)/stdint.in.h; \ - } > $@-t && \ - mv $@-t $@ -else -stdint.h: $(top_builddir)/config.status - rm -f $@ -endif -MOSTLYCLEANFILES += stdint.h stdint.h-t - -EXTRA_DIST += stdint.in.h - -## end gnulib module stdint - -## begin gnulib module stdio - -BUILT_SOURCES += stdio.h - -# We need the following in order to create when the system -# doesn't have one that works with the given compiler. -stdio.h: stdio.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ - -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_STDIO_H''@|$(NEXT_STDIO_H)|g' \ - -e 's/@''GNULIB_DPRINTF''@/$(GNULIB_DPRINTF)/g' \ - -e 's/@''GNULIB_FCLOSE''@/$(GNULIB_FCLOSE)/g' \ - -e 's/@''GNULIB_FDOPEN''@/$(GNULIB_FDOPEN)/g' \ - -e 's/@''GNULIB_FFLUSH''@/$(GNULIB_FFLUSH)/g' \ - -e 's/@''GNULIB_FGETC''@/$(GNULIB_FGETC)/g' \ - -e 's/@''GNULIB_FGETS''@/$(GNULIB_FGETS)/g' \ - -e 's/@''GNULIB_FOPEN''@/$(GNULIB_FOPEN)/g' \ - -e 's/@''GNULIB_FPRINTF''@/$(GNULIB_FPRINTF)/g' \ - -e 's/@''GNULIB_FPRINTF_POSIX''@/$(GNULIB_FPRINTF_POSIX)/g' \ - -e 's/@''GNULIB_FPURGE''@/$(GNULIB_FPURGE)/g' \ - -e 's/@''GNULIB_FPUTC''@/$(GNULIB_FPUTC)/g' \ - -e 's/@''GNULIB_FPUTS''@/$(GNULIB_FPUTS)/g' \ - -e 's/@''GNULIB_FREAD''@/$(GNULIB_FREAD)/g' \ - -e 's/@''GNULIB_FREOPEN''@/$(GNULIB_FREOPEN)/g' \ - -e 's/@''GNULIB_FSCANF''@/$(GNULIB_FSCANF)/g' \ - -e 's/@''GNULIB_FSEEK''@/$(GNULIB_FSEEK)/g' \ - -e 's/@''GNULIB_FSEEKO''@/$(GNULIB_FSEEKO)/g' \ - -e 's/@''GNULIB_FTELL''@/$(GNULIB_FTELL)/g' \ - -e 's/@''GNULIB_FTELLO''@/$(GNULIB_FTELLO)/g' \ - -e 's/@''GNULIB_FWRITE''@/$(GNULIB_FWRITE)/g' \ - -e 's/@''GNULIB_GETC''@/$(GNULIB_GETC)/g' \ - -e 's/@''GNULIB_GETCHAR''@/$(GNULIB_GETCHAR)/g' \ - -e 's/@''GNULIB_GETDELIM''@/$(GNULIB_GETDELIM)/g' \ - -e 's/@''GNULIB_GETLINE''@/$(GNULIB_GETLINE)/g' \ - -e 's/@''GNULIB_OBSTACK_PRINTF''@/$(GNULIB_OBSTACK_PRINTF)/g' \ - -e 's/@''GNULIB_OBSTACK_PRINTF_POSIX''@/$(GNULIB_OBSTACK_PRINTF_POSIX)/g' \ - -e 's/@''GNULIB_PCLOSE''@/$(GNULIB_PCLOSE)/g' \ - -e 's/@''GNULIB_PERROR''@/$(GNULIB_PERROR)/g' \ - -e 's/@''GNULIB_POPEN''@/$(GNULIB_POPEN)/g' \ - -e 's/@''GNULIB_PRINTF''@/$(GNULIB_PRINTF)/g' \ - -e 's/@''GNULIB_PRINTF_POSIX''@/$(GNULIB_PRINTF_POSIX)/g' \ - -e 's/@''GNULIB_PUTC''@/$(GNULIB_PUTC)/g' \ - -e 's/@''GNULIB_PUTCHAR''@/$(GNULIB_PUTCHAR)/g' \ - -e 's/@''GNULIB_PUTS''@/$(GNULIB_PUTS)/g' \ - -e 's/@''GNULIB_REMOVE''@/$(GNULIB_REMOVE)/g' \ - -e 's/@''GNULIB_RENAME''@/$(GNULIB_RENAME)/g' \ - -e 's/@''GNULIB_RENAMEAT''@/$(GNULIB_RENAMEAT)/g' \ - -e 's/@''GNULIB_SCANF''@/$(GNULIB_SCANF)/g' \ - -e 's/@''GNULIB_SNPRINTF''@/$(GNULIB_SNPRINTF)/g' \ - -e 's/@''GNULIB_SPRINTF_POSIX''@/$(GNULIB_SPRINTF_POSIX)/g' \ - -e 's/@''GNULIB_STDIO_H_NONBLOCKING''@/$(GNULIB_STDIO_H_NONBLOCKING)/g' \ - -e 's/@''GNULIB_STDIO_H_SIGPIPE''@/$(GNULIB_STDIO_H_SIGPIPE)/g' \ - -e 's/@''GNULIB_TMPFILE''@/$(GNULIB_TMPFILE)/g' \ - -e 's/@''GNULIB_VASPRINTF''@/$(GNULIB_VASPRINTF)/g' \ - -e 's/@''GNULIB_VDPRINTF''@/$(GNULIB_VDPRINTF)/g' \ - -e 's/@''GNULIB_VFPRINTF''@/$(GNULIB_VFPRINTF)/g' \ - -e 's/@''GNULIB_VFPRINTF_POSIX''@/$(GNULIB_VFPRINTF_POSIX)/g' \ - -e 's/@''GNULIB_VFSCANF''@/$(GNULIB_VFSCANF)/g' \ - -e 's/@''GNULIB_VSCANF''@/$(GNULIB_VSCANF)/g' \ - -e 's/@''GNULIB_VPRINTF''@/$(GNULIB_VPRINTF)/g' \ - -e 's/@''GNULIB_VPRINTF_POSIX''@/$(GNULIB_VPRINTF_POSIX)/g' \ - -e 's/@''GNULIB_VSNPRINTF''@/$(GNULIB_VSNPRINTF)/g' \ - -e 's/@''GNULIB_VSPRINTF_POSIX''@/$(GNULIB_VSPRINTF_POSIX)/g' \ - < $(srcdir)/stdio.in.h | \ - sed -e 's|@''HAVE_DECL_FPURGE''@|$(HAVE_DECL_FPURGE)|g' \ - -e 's|@''HAVE_DECL_FSEEKO''@|$(HAVE_DECL_FSEEKO)|g' \ - -e 's|@''HAVE_DECL_FTELLO''@|$(HAVE_DECL_FTELLO)|g' \ - -e 's|@''HAVE_DECL_GETDELIM''@|$(HAVE_DECL_GETDELIM)|g' \ - -e 's|@''HAVE_DECL_GETLINE''@|$(HAVE_DECL_GETLINE)|g' \ - -e 's|@''HAVE_DECL_OBSTACK_PRINTF''@|$(HAVE_DECL_OBSTACK_PRINTF)|g' \ - -e 's|@''HAVE_DECL_SNPRINTF''@|$(HAVE_DECL_SNPRINTF)|g' \ - -e 's|@''HAVE_DECL_VSNPRINTF''@|$(HAVE_DECL_VSNPRINTF)|g' \ - -e 's|@''HAVE_DPRINTF''@|$(HAVE_DPRINTF)|g' \ - -e 's|@''HAVE_FSEEKO''@|$(HAVE_FSEEKO)|g' \ - -e 's|@''HAVE_FTELLO''@|$(HAVE_FTELLO)|g' \ - -e 's|@''HAVE_PCLOSE''@|$(HAVE_PCLOSE)|g' \ - -e 's|@''HAVE_POPEN''@|$(HAVE_POPEN)|g' \ - -e 's|@''HAVE_RENAMEAT''@|$(HAVE_RENAMEAT)|g' \ - -e 's|@''HAVE_VASPRINTF''@|$(HAVE_VASPRINTF)|g' \ - -e 's|@''HAVE_VDPRINTF''@|$(HAVE_VDPRINTF)|g' \ - -e 's|@''REPLACE_DPRINTF''@|$(REPLACE_DPRINTF)|g' \ - -e 's|@''REPLACE_FCLOSE''@|$(REPLACE_FCLOSE)|g' \ - -e 's|@''REPLACE_FDOPEN''@|$(REPLACE_FDOPEN)|g' \ - -e 's|@''REPLACE_FFLUSH''@|$(REPLACE_FFLUSH)|g' \ - -e 's|@''REPLACE_FOPEN''@|$(REPLACE_FOPEN)|g' \ - -e 's|@''REPLACE_FPRINTF''@|$(REPLACE_FPRINTF)|g' \ - -e 's|@''REPLACE_FPURGE''@|$(REPLACE_FPURGE)|g' \ - -e 's|@''REPLACE_FREOPEN''@|$(REPLACE_FREOPEN)|g' \ - -e 's|@''REPLACE_FSEEK''@|$(REPLACE_FSEEK)|g' \ - -e 's|@''REPLACE_FSEEKO''@|$(REPLACE_FSEEKO)|g' \ - -e 's|@''REPLACE_FTELL''@|$(REPLACE_FTELL)|g' \ - -e 's|@''REPLACE_FTELLO''@|$(REPLACE_FTELLO)|g' \ - -e 's|@''REPLACE_GETDELIM''@|$(REPLACE_GETDELIM)|g' \ - -e 's|@''REPLACE_GETLINE''@|$(REPLACE_GETLINE)|g' \ - -e 's|@''REPLACE_OBSTACK_PRINTF''@|$(REPLACE_OBSTACK_PRINTF)|g' \ - -e 's|@''REPLACE_PERROR''@|$(REPLACE_PERROR)|g' \ - -e 's|@''REPLACE_POPEN''@|$(REPLACE_POPEN)|g' \ - -e 's|@''REPLACE_PRINTF''@|$(REPLACE_PRINTF)|g' \ - -e 's|@''REPLACE_REMOVE''@|$(REPLACE_REMOVE)|g' \ - -e 's|@''REPLACE_RENAME''@|$(REPLACE_RENAME)|g' \ - -e 's|@''REPLACE_RENAMEAT''@|$(REPLACE_RENAMEAT)|g' \ - -e 's|@''REPLACE_SNPRINTF''@|$(REPLACE_SNPRINTF)|g' \ - -e 's|@''REPLACE_SPRINTF''@|$(REPLACE_SPRINTF)|g' \ - -e 's|@''REPLACE_STDIO_READ_FUNCS''@|$(REPLACE_STDIO_READ_FUNCS)|g' \ - -e 's|@''REPLACE_STDIO_WRITE_FUNCS''@|$(REPLACE_STDIO_WRITE_FUNCS)|g' \ - -e 's|@''REPLACE_TMPFILE''@|$(REPLACE_TMPFILE)|g' \ - -e 's|@''REPLACE_VASPRINTF''@|$(REPLACE_VASPRINTF)|g' \ - -e 's|@''REPLACE_VDPRINTF''@|$(REPLACE_VDPRINTF)|g' \ - -e 's|@''REPLACE_VFPRINTF''@|$(REPLACE_VFPRINTF)|g' \ - -e 's|@''REPLACE_VPRINTF''@|$(REPLACE_VPRINTF)|g' \ - -e 's|@''REPLACE_VSNPRINTF''@|$(REPLACE_VSNPRINTF)|g' \ - -e 's|@''REPLACE_VSPRINTF''@|$(REPLACE_VSPRINTF)|g' \ - -e 's|@''ASM_SYMBOL_PREFIX''@|$(ASM_SYMBOL_PREFIX)|g' \ - -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ - -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ - } > $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += stdio.h stdio.h-t - -EXTRA_DIST += stdio.in.h - -## end gnulib module stdio - -## begin gnulib module stdlib - -BUILT_SOURCES += stdlib.h - -# We need the following in order to create when the system -# doesn't have one that works with the given compiler. -stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \ - $(_NORETURN_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ - -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_STDLIB_H''@|$(NEXT_STDLIB_H)|g' \ - -e 's/@''GNULIB__EXIT''@/$(GNULIB__EXIT)/g' \ - -e 's/@''GNULIB_ATOLL''@/$(GNULIB_ATOLL)/g' \ - -e 's/@''GNULIB_CALLOC_POSIX''@/$(GNULIB_CALLOC_POSIX)/g' \ - -e 's/@''GNULIB_CANONICALIZE_FILE_NAME''@/$(GNULIB_CANONICALIZE_FILE_NAME)/g' \ - -e 's/@''GNULIB_GETLOADAVG''@/$(GNULIB_GETLOADAVG)/g' \ - -e 's/@''GNULIB_GETSUBOPT''@/$(GNULIB_GETSUBOPT)/g' \ - -e 's/@''GNULIB_GRANTPT''@/$(GNULIB_GRANTPT)/g' \ - -e 's/@''GNULIB_MALLOC_POSIX''@/$(GNULIB_MALLOC_POSIX)/g' \ - -e 's/@''GNULIB_MBTOWC''@/$(GNULIB_MBTOWC)/g' \ - -e 's/@''GNULIB_MKDTEMP''@/$(GNULIB_MKDTEMP)/g' \ - -e 's/@''GNULIB_MKOSTEMP''@/$(GNULIB_MKOSTEMP)/g' \ - -e 's/@''GNULIB_MKOSTEMPS''@/$(GNULIB_MKOSTEMPS)/g' \ - -e 's/@''GNULIB_MKSTEMP''@/$(GNULIB_MKSTEMP)/g' \ - -e 's/@''GNULIB_MKSTEMPS''@/$(GNULIB_MKSTEMPS)/g' \ - -e 's/@''GNULIB_POSIX_OPENPT''@/$(GNULIB_POSIX_OPENPT)/g' \ - -e 's/@''GNULIB_PTSNAME''@/$(GNULIB_PTSNAME)/g' \ - -e 's/@''GNULIB_PTSNAME_R''@/$(GNULIB_PTSNAME_R)/g' \ - -e 's/@''GNULIB_PUTENV''@/$(GNULIB_PUTENV)/g' \ - -e 's/@''GNULIB_QSORT_R''@/$(GNULIB_QSORT_R)/g' \ - -e 's/@''GNULIB_RANDOM''@/$(GNULIB_RANDOM)/g' \ - -e 's/@''GNULIB_RANDOM_R''@/$(GNULIB_RANDOM_R)/g' \ - -e 's/@''GNULIB_REALLOC_POSIX''@/$(GNULIB_REALLOC_POSIX)/g' \ - -e 's/@''GNULIB_REALPATH''@/$(GNULIB_REALPATH)/g' \ - -e 's/@''GNULIB_RPMATCH''@/$(GNULIB_RPMATCH)/g' \ - -e 's/@''GNULIB_SECURE_GETENV''@/$(GNULIB_SECURE_GETENV)/g' \ - -e 's/@''GNULIB_SETENV''@/$(GNULIB_SETENV)/g' \ - -e 's/@''GNULIB_STRTOD''@/$(GNULIB_STRTOD)/g' \ - -e 's/@''GNULIB_STRTOLL''@/$(GNULIB_STRTOLL)/g' \ - -e 's/@''GNULIB_STRTOULL''@/$(GNULIB_STRTOULL)/g' \ - -e 's/@''GNULIB_SYSTEM_POSIX''@/$(GNULIB_SYSTEM_POSIX)/g' \ - -e 's/@''GNULIB_UNLOCKPT''@/$(GNULIB_UNLOCKPT)/g' \ - -e 's/@''GNULIB_UNSETENV''@/$(GNULIB_UNSETENV)/g' \ - -e 's/@''GNULIB_WCTOMB''@/$(GNULIB_WCTOMB)/g' \ - < $(srcdir)/stdlib.in.h | \ - sed -e 's|@''HAVE__EXIT''@|$(HAVE__EXIT)|g' \ - -e 's|@''HAVE_ATOLL''@|$(HAVE_ATOLL)|g' \ - -e 's|@''HAVE_CANONICALIZE_FILE_NAME''@|$(HAVE_CANONICALIZE_FILE_NAME)|g' \ - -e 's|@''HAVE_DECL_GETLOADAVG''@|$(HAVE_DECL_GETLOADAVG)|g' \ - -e 's|@''HAVE_GETSUBOPT''@|$(HAVE_GETSUBOPT)|g' \ - -e 's|@''HAVE_GRANTPT''@|$(HAVE_GRANTPT)|g' \ - -e 's|@''HAVE_MKDTEMP''@|$(HAVE_MKDTEMP)|g' \ - -e 's|@''HAVE_MKOSTEMP''@|$(HAVE_MKOSTEMP)|g' \ - -e 's|@''HAVE_MKOSTEMPS''@|$(HAVE_MKOSTEMPS)|g' \ - -e 's|@''HAVE_MKSTEMP''@|$(HAVE_MKSTEMP)|g' \ - -e 's|@''HAVE_MKSTEMPS''@|$(HAVE_MKSTEMPS)|g' \ - -e 's|@''HAVE_POSIX_OPENPT''@|$(HAVE_POSIX_OPENPT)|g' \ - -e 's|@''HAVE_PTSNAME''@|$(HAVE_PTSNAME)|g' \ - -e 's|@''HAVE_PTSNAME_R''@|$(HAVE_PTSNAME_R)|g' \ - -e 's|@''HAVE_QSORT_R''@|$(HAVE_QSORT_R)|g' \ - -e 's|@''HAVE_RANDOM''@|$(HAVE_RANDOM)|g' \ - -e 's|@''HAVE_RANDOM_H''@|$(HAVE_RANDOM_H)|g' \ - -e 's|@''HAVE_RANDOM_R''@|$(HAVE_RANDOM_R)|g' \ - -e 's|@''HAVE_REALPATH''@|$(HAVE_REALPATH)|g' \ - -e 's|@''HAVE_RPMATCH''@|$(HAVE_RPMATCH)|g' \ - -e 's|@''HAVE_SECURE_GETENV''@|$(HAVE_SECURE_GETENV)|g' \ - -e 's|@''HAVE_DECL_SETENV''@|$(HAVE_DECL_SETENV)|g' \ - -e 's|@''HAVE_STRTOD''@|$(HAVE_STRTOD)|g' \ - -e 's|@''HAVE_STRTOLL''@|$(HAVE_STRTOLL)|g' \ - -e 's|@''HAVE_STRTOULL''@|$(HAVE_STRTOULL)|g' \ - -e 's|@''HAVE_STRUCT_RANDOM_DATA''@|$(HAVE_STRUCT_RANDOM_DATA)|g' \ - -e 's|@''HAVE_SYS_LOADAVG_H''@|$(HAVE_SYS_LOADAVG_H)|g' \ - -e 's|@''HAVE_UNLOCKPT''@|$(HAVE_UNLOCKPT)|g' \ - -e 's|@''HAVE_DECL_UNSETENV''@|$(HAVE_DECL_UNSETENV)|g' \ - -e 's|@''REPLACE_CALLOC''@|$(REPLACE_CALLOC)|g' \ - -e 's|@''REPLACE_CANONICALIZE_FILE_NAME''@|$(REPLACE_CANONICALIZE_FILE_NAME)|g' \ - -e 's|@''REPLACE_MALLOC''@|$(REPLACE_MALLOC)|g' \ - -e 's|@''REPLACE_MBTOWC''@|$(REPLACE_MBTOWC)|g' \ - -e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \ - -e 's|@''REPLACE_PTSNAME''@|$(REPLACE_PTSNAME)|g' \ - -e 's|@''REPLACE_PTSNAME_R''@|$(REPLACE_PTSNAME_R)|g' \ - -e 's|@''REPLACE_PUTENV''@|$(REPLACE_PUTENV)|g' \ - -e 's|@''REPLACE_QSORT_R''@|$(REPLACE_QSORT_R)|g' \ - -e 's|@''REPLACE_RANDOM_R''@|$(REPLACE_RANDOM_R)|g' \ - -e 's|@''REPLACE_REALLOC''@|$(REPLACE_REALLOC)|g' \ - -e 's|@''REPLACE_REALPATH''@|$(REPLACE_REALPATH)|g' \ - -e 's|@''REPLACE_SETENV''@|$(REPLACE_SETENV)|g' \ - -e 's|@''REPLACE_STRTOD''@|$(REPLACE_STRTOD)|g' \ - -e 's|@''REPLACE_UNSETENV''@|$(REPLACE_UNSETENV)|g' \ - -e 's|@''REPLACE_WCTOMB''@|$(REPLACE_WCTOMB)|g' \ - -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ - -e '/definition of _Noreturn/r $(_NORETURN_H)' \ - -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ - } > $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += stdlib.h stdlib.h-t - -EXTRA_DIST += stdlib.in.h - -## end gnulib module stdlib - -## begin gnulib module sys_stat - -BUILT_SOURCES += sys/stat.h - -# We need the following in order to create when the system -# has one that is incomplete. -sys/stat.h: sys_stat.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) - $(AM_V_at)$(MKDIR_P) sys - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ - -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_SYS_STAT_H''@|$(NEXT_SYS_STAT_H)|g' \ - -e 's|@''WINDOWS_64_BIT_ST_SIZE''@|$(WINDOWS_64_BIT_ST_SIZE)|g' \ - -e 's/@''GNULIB_FCHMODAT''@/$(GNULIB_FCHMODAT)/g' \ - -e 's/@''GNULIB_FSTAT''@/$(GNULIB_FSTAT)/g' \ - -e 's/@''GNULIB_FSTATAT''@/$(GNULIB_FSTATAT)/g' \ - -e 's/@''GNULIB_FUTIMENS''@/$(GNULIB_FUTIMENS)/g' \ - -e 's/@''GNULIB_LCHMOD''@/$(GNULIB_LCHMOD)/g' \ - -e 's/@''GNULIB_LSTAT''@/$(GNULIB_LSTAT)/g' \ - -e 's/@''GNULIB_MKDIRAT''@/$(GNULIB_MKDIRAT)/g' \ - -e 's/@''GNULIB_MKFIFO''@/$(GNULIB_MKFIFO)/g' \ - -e 's/@''GNULIB_MKFIFOAT''@/$(GNULIB_MKFIFOAT)/g' \ - -e 's/@''GNULIB_MKNOD''@/$(GNULIB_MKNOD)/g' \ - -e 's/@''GNULIB_MKNODAT''@/$(GNULIB_MKNODAT)/g' \ - -e 's/@''GNULIB_STAT''@/$(GNULIB_STAT)/g' \ - -e 's/@''GNULIB_UTIMENSAT''@/$(GNULIB_UTIMENSAT)/g' \ - -e 's|@''HAVE_FCHMODAT''@|$(HAVE_FCHMODAT)|g' \ - -e 's|@''HAVE_FSTATAT''@|$(HAVE_FSTATAT)|g' \ - -e 's|@''HAVE_FUTIMENS''@|$(HAVE_FUTIMENS)|g' \ - -e 's|@''HAVE_LCHMOD''@|$(HAVE_LCHMOD)|g' \ - -e 's|@''HAVE_LSTAT''@|$(HAVE_LSTAT)|g' \ - -e 's|@''HAVE_MKDIRAT''@|$(HAVE_MKDIRAT)|g' \ - -e 's|@''HAVE_MKFIFO''@|$(HAVE_MKFIFO)|g' \ - -e 's|@''HAVE_MKFIFOAT''@|$(HAVE_MKFIFOAT)|g' \ - -e 's|@''HAVE_MKNOD''@|$(HAVE_MKNOD)|g' \ - -e 's|@''HAVE_MKNODAT''@|$(HAVE_MKNODAT)|g' \ - -e 's|@''HAVE_UTIMENSAT''@|$(HAVE_UTIMENSAT)|g' \ - -e 's|@''REPLACE_FSTAT''@|$(REPLACE_FSTAT)|g' \ - -e 's|@''REPLACE_FSTATAT''@|$(REPLACE_FSTATAT)|g' \ - -e 's|@''REPLACE_FUTIMENS''@|$(REPLACE_FUTIMENS)|g' \ - -e 's|@''REPLACE_LSTAT''@|$(REPLACE_LSTAT)|g' \ - -e 's|@''REPLACE_MKDIR''@|$(REPLACE_MKDIR)|g' \ - -e 's|@''REPLACE_MKFIFO''@|$(REPLACE_MKFIFO)|g' \ - -e 's|@''REPLACE_MKNOD''@|$(REPLACE_MKNOD)|g' \ - -e 's|@''REPLACE_STAT''@|$(REPLACE_STAT)|g' \ - -e 's|@''REPLACE_UTIMENSAT''@|$(REPLACE_UTIMENSAT)|g' \ - -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ - -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/sys_stat.in.h; \ - } > $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += sys/stat.h sys/stat.h-t -MOSTLYCLEANDIRS += sys - -EXTRA_DIST += sys_stat.in.h - -## end gnulib module sys_stat - -## begin gnulib module sys_time - -BUILT_SOURCES += sys/time.h - -# We need the following in order to create when the system -# doesn't have one that works with the given compiler. -sys/time.h: sys_time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) - $(AM_V_at)$(MKDIR_P) sys - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ - -e 's/@''HAVE_SYS_TIME_H''@/$(HAVE_SYS_TIME_H)/g' \ - -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_SYS_TIME_H''@|$(NEXT_SYS_TIME_H)|g' \ - -e 's/@''GNULIB_GETTIMEOFDAY''@/$(GNULIB_GETTIMEOFDAY)/g' \ - -e 's|@''HAVE_WINSOCK2_H''@|$(HAVE_WINSOCK2_H)|g' \ - -e 's/@''HAVE_GETTIMEOFDAY''@/$(HAVE_GETTIMEOFDAY)/g' \ - -e 's/@''HAVE_STRUCT_TIMEVAL''@/$(HAVE_STRUCT_TIMEVAL)/g' \ - -e 's/@''REPLACE_GETTIMEOFDAY''@/$(REPLACE_GETTIMEOFDAY)/g' \ - -e 's/@''REPLACE_STRUCT_TIMEVAL''@/$(REPLACE_STRUCT_TIMEVAL)/g' \ - -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ - -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/sys_time.in.h; \ - } > $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += sys/time.h sys/time.h-t - -EXTRA_DIST += sys_time.in.h - -## end gnulib module sys_time - -## begin gnulib module sys_types - -BUILT_SOURCES += sys/types.h - -# We need the following in order to create when the system -# doesn't have one that works with the given compiler. -sys/types.h: sys_types.in.h $(top_builddir)/config.status - $(AM_V_at)$(MKDIR_P) sys - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ - -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_SYS_TYPES_H''@|$(NEXT_SYS_TYPES_H)|g' \ - -e 's|@''WINDOWS_64_BIT_OFF_T''@|$(WINDOWS_64_BIT_OFF_T)|g' \ - < $(srcdir)/sys_types.in.h; \ - } > $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += sys/types.h sys/types.h-t - -EXTRA_DIST += sys_types.in.h - -## end gnulib module sys_types - -## begin gnulib module time - -BUILT_SOURCES += time.h - -# We need the following in order to create when the system -# doesn't have one that works with the given compiler. -time.h: time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ - -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_TIME_H''@|$(NEXT_TIME_H)|g' \ - -e 's/@''GNULIB_GETTIMEOFDAY''@/$(GNULIB_GETTIMEOFDAY)/g' \ - -e 's/@''GNULIB_MKTIME''@/$(GNULIB_MKTIME)/g' \ - -e 's/@''GNULIB_NANOSLEEP''@/$(GNULIB_NANOSLEEP)/g' \ - -e 's/@''GNULIB_STRPTIME''@/$(GNULIB_STRPTIME)/g' \ - -e 's/@''GNULIB_TIMEGM''@/$(GNULIB_TIMEGM)/g' \ - -e 's/@''GNULIB_TIME_R''@/$(GNULIB_TIME_R)/g' \ - -e 's/@''GNULIB_TIME_RZ''@/$(GNULIB_TIME_RZ)/g' \ - -e 's|@''HAVE_DECL_LOCALTIME_R''@|$(HAVE_DECL_LOCALTIME_R)|g' \ - -e 's|@''HAVE_NANOSLEEP''@|$(HAVE_NANOSLEEP)|g' \ - -e 's|@''HAVE_STRPTIME''@|$(HAVE_STRPTIME)|g' \ - -e 's|@''HAVE_TIMEGM''@|$(HAVE_TIMEGM)|g' \ - -e 's|@''HAVE_TIMEZONE_T''@|$(HAVE_TIMEZONE_T)|g' \ - -e 's|@''REPLACE_GMTIME''@|$(REPLACE_GMTIME)|g' \ - -e 's|@''REPLACE_LOCALTIME''@|$(REPLACE_LOCALTIME)|g' \ - -e 's|@''REPLACE_LOCALTIME_R''@|$(REPLACE_LOCALTIME_R)|g' \ - -e 's|@''REPLACE_MKTIME''@|$(REPLACE_MKTIME)|g' \ - -e 's|@''REPLACE_NANOSLEEP''@|$(REPLACE_NANOSLEEP)|g' \ - -e 's|@''REPLACE_TIMEGM''@|$(REPLACE_TIMEGM)|g' \ - -e 's|@''PTHREAD_H_DEFINES_STRUCT_TIMESPEC''@|$(PTHREAD_H_DEFINES_STRUCT_TIMESPEC)|g' \ - -e 's|@''SYS_TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(SYS_TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \ - -e 's|@''TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \ - -e 's|@''UNISTD_H_DEFINES_STRUCT_TIMESPEC''@|$(UNISTD_H_DEFINES_STRUCT_TIMESPEC)|g' \ - -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ - -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/time.in.h; \ - } > $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += time.h time.h-t - -EXTRA_DIST += time.in.h - -## end gnulib module time - -## begin gnulib module timespec - -libgnu_la_SOURCES += timespec.c - -EXTRA_DIST += timespec.h - -## end gnulib module timespec - -## begin gnulib module unistd - -BUILT_SOURCES += unistd.h -libgnu_la_SOURCES += unistd.c - -# We need the following in order to create an empty placeholder for -# when the system doesn't have one. -unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ - -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \ - -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_UNISTD_H''@|$(NEXT_UNISTD_H)|g' \ - -e 's|@''WINDOWS_64_BIT_OFF_T''@|$(WINDOWS_64_BIT_OFF_T)|g' \ - -e 's/@''GNULIB_CHDIR''@/$(GNULIB_CHDIR)/g' \ - -e 's/@''GNULIB_CHOWN''@/$(GNULIB_CHOWN)/g' \ - -e 's/@''GNULIB_CLOSE''@/$(GNULIB_CLOSE)/g' \ - -e 's/@''GNULIB_DUP''@/$(GNULIB_DUP)/g' \ - -e 's/@''GNULIB_DUP2''@/$(GNULIB_DUP2)/g' \ - -e 's/@''GNULIB_DUP3''@/$(GNULIB_DUP3)/g' \ - -e 's/@''GNULIB_ENVIRON''@/$(GNULIB_ENVIRON)/g' \ - -e 's/@''GNULIB_EUIDACCESS''@/$(GNULIB_EUIDACCESS)/g' \ - -e 's/@''GNULIB_FACCESSAT''@/$(GNULIB_FACCESSAT)/g' \ - -e 's/@''GNULIB_FCHDIR''@/$(GNULIB_FCHDIR)/g' \ - -e 's/@''GNULIB_FCHOWNAT''@/$(GNULIB_FCHOWNAT)/g' \ - -e 's/@''GNULIB_FDATASYNC''@/$(GNULIB_FDATASYNC)/g' \ - -e 's/@''GNULIB_FSYNC''@/$(GNULIB_FSYNC)/g' \ - -e 's/@''GNULIB_FTRUNCATE''@/$(GNULIB_FTRUNCATE)/g' \ - -e 's/@''GNULIB_GETCWD''@/$(GNULIB_GETCWD)/g' \ - -e 's/@''GNULIB_GETDOMAINNAME''@/$(GNULIB_GETDOMAINNAME)/g' \ - -e 's/@''GNULIB_GETDTABLESIZE''@/$(GNULIB_GETDTABLESIZE)/g' \ - -e 's/@''GNULIB_GETGROUPS''@/$(GNULIB_GETGROUPS)/g' \ - -e 's/@''GNULIB_GETHOSTNAME''@/$(GNULIB_GETHOSTNAME)/g' \ - -e 's/@''GNULIB_GETLOGIN''@/$(GNULIB_GETLOGIN)/g' \ - -e 's/@''GNULIB_GETLOGIN_R''@/$(GNULIB_GETLOGIN_R)/g' \ - -e 's/@''GNULIB_GETPAGESIZE''@/$(GNULIB_GETPAGESIZE)/g' \ - -e 's/@''GNULIB_GETUSERSHELL''@/$(GNULIB_GETUSERSHELL)/g' \ - -e 's/@''GNULIB_GROUP_MEMBER''@/$(GNULIB_GROUP_MEMBER)/g' \ - -e 's/@''GNULIB_ISATTY''@/$(GNULIB_ISATTY)/g' \ - -e 's/@''GNULIB_LCHOWN''@/$(GNULIB_LCHOWN)/g' \ - -e 's/@''GNULIB_LINK''@/$(GNULIB_LINK)/g' \ - -e 's/@''GNULIB_LINKAT''@/$(GNULIB_LINKAT)/g' \ - -e 's/@''GNULIB_LSEEK''@/$(GNULIB_LSEEK)/g' \ - -e 's/@''GNULIB_PIPE''@/$(GNULIB_PIPE)/g' \ - -e 's/@''GNULIB_PIPE2''@/$(GNULIB_PIPE2)/g' \ - -e 's/@''GNULIB_PREAD''@/$(GNULIB_PREAD)/g' \ - -e 's/@''GNULIB_PWRITE''@/$(GNULIB_PWRITE)/g' \ - -e 's/@''GNULIB_READ''@/$(GNULIB_READ)/g' \ - -e 's/@''GNULIB_READLINK''@/$(GNULIB_READLINK)/g' \ - -e 's/@''GNULIB_READLINKAT''@/$(GNULIB_READLINKAT)/g' \ - -e 's/@''GNULIB_RMDIR''@/$(GNULIB_RMDIR)/g' \ - -e 's/@''GNULIB_SETHOSTNAME''@/$(GNULIB_SETHOSTNAME)/g' \ - -e 's/@''GNULIB_SLEEP''@/$(GNULIB_SLEEP)/g' \ - -e 's/@''GNULIB_SYMLINK''@/$(GNULIB_SYMLINK)/g' \ - -e 's/@''GNULIB_SYMLINKAT''@/$(GNULIB_SYMLINKAT)/g' \ - -e 's/@''GNULIB_TTYNAME_R''@/$(GNULIB_TTYNAME_R)/g' \ - -e 's/@''GNULIB_UNISTD_H_GETOPT''@/0$(GNULIB_GL_UNISTD_H_GETOPT)/g' \ - -e 's/@''GNULIB_UNISTD_H_NONBLOCKING''@/$(GNULIB_UNISTD_H_NONBLOCKING)/g' \ - -e 's/@''GNULIB_UNISTD_H_SIGPIPE''@/$(GNULIB_UNISTD_H_SIGPIPE)/g' \ - -e 's/@''GNULIB_UNLINK''@/$(GNULIB_UNLINK)/g' \ - -e 's/@''GNULIB_UNLINKAT''@/$(GNULIB_UNLINKAT)/g' \ - -e 's/@''GNULIB_USLEEP''@/$(GNULIB_USLEEP)/g' \ - -e 's/@''GNULIB_WRITE''@/$(GNULIB_WRITE)/g' \ - < $(srcdir)/unistd.in.h | \ - sed -e 's|@''HAVE_CHOWN''@|$(HAVE_CHOWN)|g' \ - -e 's|@''HAVE_DUP2''@|$(HAVE_DUP2)|g' \ - -e 's|@''HAVE_DUP3''@|$(HAVE_DUP3)|g' \ - -e 's|@''HAVE_EUIDACCESS''@|$(HAVE_EUIDACCESS)|g' \ - -e 's|@''HAVE_FACCESSAT''@|$(HAVE_FACCESSAT)|g' \ - -e 's|@''HAVE_FCHDIR''@|$(HAVE_FCHDIR)|g' \ - -e 's|@''HAVE_FCHOWNAT''@|$(HAVE_FCHOWNAT)|g' \ - -e 's|@''HAVE_FDATASYNC''@|$(HAVE_FDATASYNC)|g' \ - -e 's|@''HAVE_FSYNC''@|$(HAVE_FSYNC)|g' \ - -e 's|@''HAVE_FTRUNCATE''@|$(HAVE_FTRUNCATE)|g' \ - -e 's|@''HAVE_GETDTABLESIZE''@|$(HAVE_GETDTABLESIZE)|g' \ - -e 's|@''HAVE_GETGROUPS''@|$(HAVE_GETGROUPS)|g' \ - -e 's|@''HAVE_GETHOSTNAME''@|$(HAVE_GETHOSTNAME)|g' \ - -e 's|@''HAVE_GETPAGESIZE''@|$(HAVE_GETPAGESIZE)|g' \ - -e 's|@''HAVE_GROUP_MEMBER''@|$(HAVE_GROUP_MEMBER)|g' \ - -e 's|@''HAVE_LCHOWN''@|$(HAVE_LCHOWN)|g' \ - -e 's|@''HAVE_LINK''@|$(HAVE_LINK)|g' \ - -e 's|@''HAVE_LINKAT''@|$(HAVE_LINKAT)|g' \ - -e 's|@''HAVE_PIPE''@|$(HAVE_PIPE)|g' \ - -e 's|@''HAVE_PIPE2''@|$(HAVE_PIPE2)|g' \ - -e 's|@''HAVE_PREAD''@|$(HAVE_PREAD)|g' \ - -e 's|@''HAVE_PWRITE''@|$(HAVE_PWRITE)|g' \ - -e 's|@''HAVE_READLINK''@|$(HAVE_READLINK)|g' \ - -e 's|@''HAVE_READLINKAT''@|$(HAVE_READLINKAT)|g' \ - -e 's|@''HAVE_SETHOSTNAME''@|$(HAVE_SETHOSTNAME)|g' \ - -e 's|@''HAVE_SLEEP''@|$(HAVE_SLEEP)|g' \ - -e 's|@''HAVE_SYMLINK''@|$(HAVE_SYMLINK)|g' \ - -e 's|@''HAVE_SYMLINKAT''@|$(HAVE_SYMLINKAT)|g' \ - -e 's|@''HAVE_UNLINKAT''@|$(HAVE_UNLINKAT)|g' \ - -e 's|@''HAVE_USLEEP''@|$(HAVE_USLEEP)|g' \ - -e 's|@''HAVE_DECL_ENVIRON''@|$(HAVE_DECL_ENVIRON)|g' \ - -e 's|@''HAVE_DECL_FCHDIR''@|$(HAVE_DECL_FCHDIR)|g' \ - -e 's|@''HAVE_DECL_FDATASYNC''@|$(HAVE_DECL_FDATASYNC)|g' \ - -e 's|@''HAVE_DECL_GETDOMAINNAME''@|$(HAVE_DECL_GETDOMAINNAME)|g' \ - -e 's|@''HAVE_DECL_GETLOGIN''@|$(HAVE_DECL_GETLOGIN)|g' \ - -e 's|@''HAVE_DECL_GETLOGIN_R''@|$(HAVE_DECL_GETLOGIN_R)|g' \ - -e 's|@''HAVE_DECL_GETPAGESIZE''@|$(HAVE_DECL_GETPAGESIZE)|g' \ - -e 's|@''HAVE_DECL_GETUSERSHELL''@|$(HAVE_DECL_GETUSERSHELL)|g' \ - -e 's|@''HAVE_DECL_SETHOSTNAME''@|$(HAVE_DECL_SETHOSTNAME)|g' \ - -e 's|@''HAVE_DECL_TTYNAME_R''@|$(HAVE_DECL_TTYNAME_R)|g' \ - -e 's|@''HAVE_OS_H''@|$(HAVE_OS_H)|g' \ - -e 's|@''HAVE_SYS_PARAM_H''@|$(HAVE_SYS_PARAM_H)|g' \ - | \ - sed -e 's|@''REPLACE_CHOWN''@|$(REPLACE_CHOWN)|g' \ - -e 's|@''REPLACE_CLOSE''@|$(REPLACE_CLOSE)|g' \ - -e 's|@''REPLACE_DUP''@|$(REPLACE_DUP)|g' \ - -e 's|@''REPLACE_DUP2''@|$(REPLACE_DUP2)|g' \ - -e 's|@''REPLACE_FCHOWNAT''@|$(REPLACE_FCHOWNAT)|g' \ - -e 's|@''REPLACE_FTRUNCATE''@|$(REPLACE_FTRUNCATE)|g' \ - -e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \ - -e 's|@''REPLACE_GETDOMAINNAME''@|$(REPLACE_GETDOMAINNAME)|g' \ - -e 's|@''REPLACE_GETDTABLESIZE''@|$(REPLACE_GETDTABLESIZE)|g' \ - -e 's|@''REPLACE_GETLOGIN_R''@|$(REPLACE_GETLOGIN_R)|g' \ - -e 's|@''REPLACE_GETGROUPS''@|$(REPLACE_GETGROUPS)|g' \ - -e 's|@''REPLACE_GETPAGESIZE''@|$(REPLACE_GETPAGESIZE)|g' \ - -e 's|@''REPLACE_ISATTY''@|$(REPLACE_ISATTY)|g' \ - -e 's|@''REPLACE_LCHOWN''@|$(REPLACE_LCHOWN)|g' \ - -e 's|@''REPLACE_LINK''@|$(REPLACE_LINK)|g' \ - -e 's|@''REPLACE_LINKAT''@|$(REPLACE_LINKAT)|g' \ - -e 's|@''REPLACE_LSEEK''@|$(REPLACE_LSEEK)|g' \ - -e 's|@''REPLACE_PREAD''@|$(REPLACE_PREAD)|g' \ - -e 's|@''REPLACE_PWRITE''@|$(REPLACE_PWRITE)|g' \ - -e 's|@''REPLACE_READ''@|$(REPLACE_READ)|g' \ - -e 's|@''REPLACE_READLINK''@|$(REPLACE_READLINK)|g' \ - -e 's|@''REPLACE_READLINKAT''@|$(REPLACE_READLINKAT)|g' \ - -e 's|@''REPLACE_RMDIR''@|$(REPLACE_RMDIR)|g' \ - -e 's|@''REPLACE_SLEEP''@|$(REPLACE_SLEEP)|g' \ - -e 's|@''REPLACE_SYMLINK''@|$(REPLACE_SYMLINK)|g' \ - -e 's|@''REPLACE_SYMLINKAT''@|$(REPLACE_SYMLINKAT)|g' \ - -e 's|@''REPLACE_TTYNAME_R''@|$(REPLACE_TTYNAME_R)|g' \ - -e 's|@''REPLACE_UNLINK''@|$(REPLACE_UNLINK)|g' \ - -e 's|@''REPLACE_UNLINKAT''@|$(REPLACE_UNLINKAT)|g' \ - -e 's|@''REPLACE_USLEEP''@|$(REPLACE_USLEEP)|g' \ - -e 's|@''REPLACE_WRITE''@|$(REPLACE_WRITE)|g' \ - -e 's|@''UNISTD_H_HAVE_WINSOCK2_H''@|$(UNISTD_H_HAVE_WINSOCK2_H)|g' \ - -e 's|@''UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS''@|$(UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS)|g' \ - -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ - -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ - } > $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += unistd.h unistd.h-t - -EXTRA_DIST += unistd.in.h - -## end gnulib module unistd - -## begin gnulib module update-copyright - - -EXTRA_DIST += $(top_srcdir)/build-aux/update-copyright - -## end gnulib module update-copyright - -## begin gnulib module useless-if-before-free - - -EXTRA_DIST += $(top_srcdir)/build-aux/useless-if-before-free - -## end gnulib module useless-if-before-free - -## begin gnulib module vc-list-files - - -EXTRA_DIST += $(top_srcdir)/build-aux/vc-list-files - -## end gnulib module vc-list-files - -## begin gnulib module version-etc - -libgnu_la_SOURCES += version-etc.h version-etc.c - -## end gnulib module version-etc - -## begin gnulib module version-etc-fsf - -libgnu_la_SOURCES += version-etc-fsf.c - -## end gnulib module version-etc-fsf - - -mostlyclean-local: mostlyclean-generic - @for dir in '' $(MOSTLYCLEANDIRS); do \ - if test -n "$$dir" && test -d $$dir; then \ - echo "rmdir $$dir"; rmdir $$dir; \ - fi; \ - done; \ - : diff --git a/gl/errno.in.h b/gl/errno.in.h deleted file mode 100644 index 13194f9..0000000 --- a/gl/errno.in.h +++ /dev/null @@ -1,279 +0,0 @@ -/* A POSIX-like . - - Copyright (C) 2008-2017 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ - -#ifndef _@GUARD_PREFIX@_ERRNO_H - -#if __GNUC__ >= 3 -@PRAGMA_SYSTEM_HEADER@ -#endif -@PRAGMA_COLUMNS@ - -/* The include_next requires a split double-inclusion guard. */ -#@INCLUDE_NEXT@ @NEXT_ERRNO_H@ - -#ifndef _@GUARD_PREFIX@_ERRNO_H -#define _@GUARD_PREFIX@_ERRNO_H - - -/* On native Windows platforms, many macros are not defined. */ -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - -/* These are the same values as defined by MSVC 10, for interoperability. */ - -# ifndef ENOMSG -# define ENOMSG 122 -# define GNULIB_defined_ENOMSG 1 -# endif - -# ifndef EIDRM -# define EIDRM 111 -# define GNULIB_defined_EIDRM 1 -# endif - -# ifndef ENOLINK -# define ENOLINK 121 -# define GNULIB_defined_ENOLINK 1 -# endif - -# ifndef EPROTO -# define EPROTO 134 -# define GNULIB_defined_EPROTO 1 -# endif - -# ifndef EBADMSG -# define EBADMSG 104 -# define GNULIB_defined_EBADMSG 1 -# endif - -# ifndef EOVERFLOW -# define EOVERFLOW 132 -# define GNULIB_defined_EOVERFLOW 1 -# endif - -# ifndef ENOTSUP -# define ENOTSUP 129 -# define GNULIB_defined_ENOTSUP 1 -# endif - -# ifndef ENETRESET -# define ENETRESET 117 -# define GNULIB_defined_ENETRESET 1 -# endif - -# ifndef ECONNABORTED -# define ECONNABORTED 106 -# define GNULIB_defined_ECONNABORTED 1 -# endif - -# ifndef ECANCELED -# define ECANCELED 105 -# define GNULIB_defined_ECANCELED 1 -# endif - -# ifndef EOWNERDEAD -# define EOWNERDEAD 133 -# define GNULIB_defined_EOWNERDEAD 1 -# endif - -# ifndef ENOTRECOVERABLE -# define ENOTRECOVERABLE 127 -# define GNULIB_defined_ENOTRECOVERABLE 1 -# endif - -# ifndef EINPROGRESS -# define EINPROGRESS 112 -# define EALREADY 103 -# define ENOTSOCK 128 -# define EDESTADDRREQ 109 -# define EMSGSIZE 115 -# define EPROTOTYPE 136 -# define ENOPROTOOPT 123 -# define EPROTONOSUPPORT 135 -# define EOPNOTSUPP 130 -# define EAFNOSUPPORT 102 -# define EADDRINUSE 100 -# define EADDRNOTAVAIL 101 -# define ENETDOWN 116 -# define ENETUNREACH 118 -# define ECONNRESET 108 -# define ENOBUFS 119 -# define EISCONN 113 -# define ENOTCONN 126 -# define ETIMEDOUT 138 -# define ECONNREFUSED 107 -# define ELOOP 114 -# define EHOSTUNREACH 110 -# define EWOULDBLOCK 140 -# define GNULIB_defined_ESOCK 1 -# endif - -# ifndef ETXTBSY -# define ETXTBSY 139 -# define ENODATA 120 /* not required by POSIX */ -# define ENOSR 124 /* not required by POSIX */ -# define ENOSTR 125 /* not required by POSIX */ -# define ETIME 137 /* not required by POSIX */ -# define EOTHER 131 /* not required by POSIX */ -# define GNULIB_defined_ESTREAMS 1 -# endif - -/* These are intentionally the same values as the WSA* error numbers, defined - in . */ -# define ESOCKTNOSUPPORT 10044 /* not required by POSIX */ -# define EPFNOSUPPORT 10046 /* not required by POSIX */ -# define ESHUTDOWN 10058 /* not required by POSIX */ -# define ETOOMANYREFS 10059 /* not required by POSIX */ -# define EHOSTDOWN 10064 /* not required by POSIX */ -# define EPROCLIM 10067 /* not required by POSIX */ -# define EUSERS 10068 /* not required by POSIX */ -# define EDQUOT 10069 -# define ESTALE 10070 -# define EREMOTE 10071 /* not required by POSIX */ -# define GNULIB_defined_EWINSOCK 1 - -# endif - - -/* On OSF/1 5.1, when _XOPEN_SOURCE_EXTENDED is not defined, the macros - EMULTIHOP, ENOLINK, EOVERFLOW are not defined. */ -# if @EMULTIHOP_HIDDEN@ -# define EMULTIHOP @EMULTIHOP_VALUE@ -# define GNULIB_defined_EMULTIHOP 1 -# endif -# if @ENOLINK_HIDDEN@ -# define ENOLINK @ENOLINK_VALUE@ -# define GNULIB_defined_ENOLINK 1 -# endif -# if @EOVERFLOW_HIDDEN@ -# define EOVERFLOW @EOVERFLOW_VALUE@ -# define GNULIB_defined_EOVERFLOW 1 -# endif - - -/* On OpenBSD 4.0 and on native Windows, the macros ENOMSG, EIDRM, ENOLINK, - EPROTO, EMULTIHOP, EBADMSG, EOVERFLOW, ENOTSUP, ECANCELED are not defined. - Likewise, on NonStop Kernel, EDQUOT is not defined. - Define them here. Values >= 2000 seem safe to use: Solaris ESTALE = 151, - HP-UX EWOULDBLOCK = 246, IRIX EDQUOT = 1133. - - Note: When one of these systems defines some of these macros some day, - binaries will have to be recompiled so that they recognizes the new - errno values from the system. */ - -# ifndef ENOMSG -# define ENOMSG 2000 -# define GNULIB_defined_ENOMSG 1 -# endif - -# ifndef EIDRM -# define EIDRM 2001 -# define GNULIB_defined_EIDRM 1 -# endif - -# ifndef ENOLINK -# define ENOLINK 2002 -# define GNULIB_defined_ENOLINK 1 -# endif - -# ifndef EPROTO -# define EPROTO 2003 -# define GNULIB_defined_EPROTO 1 -# endif - -# ifndef EMULTIHOP -# define EMULTIHOP 2004 -# define GNULIB_defined_EMULTIHOP 1 -# endif - -# ifndef EBADMSG -# define EBADMSG 2005 -# define GNULIB_defined_EBADMSG 1 -# endif - -# ifndef EOVERFLOW -# define EOVERFLOW 2006 -# define GNULIB_defined_EOVERFLOW 1 -# endif - -# ifndef ENOTSUP -# define ENOTSUP 2007 -# define GNULIB_defined_ENOTSUP 1 -# endif - -# ifndef ENETRESET -# define ENETRESET 2011 -# define GNULIB_defined_ENETRESET 1 -# endif - -# ifndef ECONNABORTED -# define ECONNABORTED 2012 -# define GNULIB_defined_ECONNABORTED 1 -# endif - -# ifndef ESTALE -# define ESTALE 2009 -# define GNULIB_defined_ESTALE 1 -# endif - -# ifndef EDQUOT -# define EDQUOT 2010 -# define GNULIB_defined_EDQUOT 1 -# endif - -# ifndef ECANCELED -# define ECANCELED 2008 -# define GNULIB_defined_ECANCELED 1 -# endif - -/* On many platforms, the macros EOWNERDEAD and ENOTRECOVERABLE are not - defined. */ - -# ifndef EOWNERDEAD -# if defined __sun - /* Use the same values as defined for Solaris >= 8, for - interoperability. */ -# define EOWNERDEAD 58 -# define ENOTRECOVERABLE 59 -# elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - /* We have a conflict here: pthreads-win32 defines these values - differently than MSVC 10. It's hairy to decide which one to use. */ -# if defined __MINGW32__ && !defined USE_WINDOWS_THREADS - /* Use the same values as defined by pthreads-win32, for - interoperability. */ -# define EOWNERDEAD 43 -# define ENOTRECOVERABLE 44 -# else - /* Use the same values as defined by MSVC 10, for - interoperability. */ -# define EOWNERDEAD 133 -# define ENOTRECOVERABLE 127 -# endif -# else -# define EOWNERDEAD 2013 -# define ENOTRECOVERABLE 2014 -# endif -# define GNULIB_defined_EOWNERDEAD 1 -# define GNULIB_defined_ENOTRECOVERABLE 1 -# endif - -# ifndef EILSEQ -# define EILSEQ 2015 -# define GNULIB_defined_EILSEQ 1 -# endif - -#endif /* _@GUARD_PREFIX@_ERRNO_H */ -#endif /* _@GUARD_PREFIX@_ERRNO_H */ diff --git a/gl/fstat.c b/gl/fstat.c deleted file mode 100644 index a5aabc5..0000000 --- a/gl/fstat.c +++ /dev/null @@ -1,88 +0,0 @@ -/* fstat() replacement. - Copyright (C) 2011-2017 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* If the user's config.h happens to include , let it include only - the system's here, so that orig_fstat doesn't recurse to - rpl_fstat. */ -#define __need_system_sys_stat_h -#include - -/* Get the original definition of fstat. It might be defined as a macro. */ -#include -#include -#if _GL_WINDOWS_64_BIT_ST_SIZE -# undef stat /* avoid warning on mingw64 with _FILE_OFFSET_BITS=64 */ -# define stat _stati64 -# undef fstat /* avoid warning on mingw64 with _FILE_OFFSET_BITS=64 */ -# define fstat _fstati64 -#endif -#undef __need_system_sys_stat_h - -static int -orig_fstat (int fd, struct stat *buf) -{ - return fstat (fd, buf); -} - -/* Specification. */ -/* Write "sys/stat.h" here, not , otherwise OSF/1 5.1 DTK cc - eliminates this include because of the preliminary #include - above. */ -#include "sys/stat.h" - -#include -#include - -#if HAVE_MSVC_INVALID_PARAMETER_HANDLER -# include "msvc-inval.h" -#endif - -#if HAVE_MSVC_INVALID_PARAMETER_HANDLER -static int -fstat_nothrow (int fd, struct stat *buf) -{ - int result; - - TRY_MSVC_INVAL - { - result = orig_fstat (fd, buf); - } - CATCH_MSVC_INVAL - { - result = -1; - errno = EBADF; - } - DONE_MSVC_INVAL; - - return result; -} -#else -# define fstat_nothrow orig_fstat -#endif - -int -rpl_fstat (int fd, struct stat *buf) -{ -#if REPLACE_FCHDIR && REPLACE_OPEN_DIRECTORY - /* Handle the case when rpl_open() used a dummy file descriptor to work - around an open() that can't normally visit directories. */ - const char *name = _gl_directory_name (fd); - if (name != NULL) - return stat (name, buf); -#endif - - return fstat_nothrow (fd, buf); -} diff --git a/gl/ftell.c b/gl/ftell.c deleted file mode 100644 index a5c9489..0000000 --- a/gl/ftell.c +++ /dev/null @@ -1,37 +0,0 @@ -/* An ftell() function that works around platform bugs. - Copyright (C) 2007-2017 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#include - -/* Specification. */ -#include - -#include -#include - -long -ftell (FILE *fp) -{ - /* Use the replacement ftello function with all its workarounds. */ - off_t offset = ftello (fp); - if (LONG_MIN <= offset && offset <= LONG_MAX) - return /* (long) */ offset; - else - { - errno = EOVERFLOW; - return -1; - } -} diff --git a/gl/ftello.c b/gl/ftello.c deleted file mode 100644 index 298255a..0000000 --- a/gl/ftello.c +++ /dev/null @@ -1,85 +0,0 @@ -/* An ftello() function that works around platform bugs. - Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#include - -/* Specification. */ -#include - -/* Get lseek. */ -#include - -#include "stdio-impl.h" - -off_t -ftello (FILE *fp) -#undef ftello -#if !HAVE_FTELLO -# undef ftell -# define ftello ftell -#endif -#if _GL_WINDOWS_64_BIT_OFF_T -# undef ftello -# if HAVE__FTELLI64 /* msvc, mingw64 */ -# define ftello _ftelli64 -# else /* mingw */ -# define ftello ftello64 -# endif -#endif -{ -#if LSEEK_PIPE_BROKEN - /* mingw gives bogus answers rather than failure on non-seekable files. */ - if (lseek (fileno (fp), 0, SEEK_CUR) == -1) - return -1; -#endif - -#if FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE /* Solaris */ - /* The Solaris stdio leaves the _IOREAD flag set after reading from a file - reaches EOF and the program then starts writing to the file. ftello - gets confused by this. */ - if (fp_->_flag & _IOWRT) - { - off_t pos; - - /* Call ftello nevertheless, for the side effects that it does on fp. */ - ftello (fp); - - /* Compute the file position ourselves. */ - pos = lseek (fileno (fp), (off_t) 0, SEEK_CUR); - if (pos >= 0) - { - if ((fp_->_flag & _IONBF) == 0 && fp_->_base != NULL) - pos += fp_->_ptr - fp_->_base; - } - return pos; - } -#endif - -#if defined __SL64 && defined __SCLE /* Cygwin */ - if ((fp->_flags & __SL64) == 0) - { - /* Cygwin 1.5.0 through 1.5.24 failed to open stdin in 64-bit - mode; but has an ftello that requires 64-bit mode. */ - FILE *tmp = fopen ("/dev/null", "r"); - if (!tmp) - return -1; - fp->_flags |= __SL64; - fp->_seek64 = tmp->_seek64; - fclose (tmp); - } -#endif - return ftello (fp); -} diff --git a/gl/getopt.c b/gl/getopt.c deleted file mode 100644 index e40ea8d..0000000 --- a/gl/getopt.c +++ /dev/null @@ -1,1275 +0,0 @@ -/* Getopt for GNU. - NOTE: getopt is part of the C library, so if you don't know what - "Keep this file name-space clean" means, talk to drepper@gnu.org - before changing it! - Copyright (C) 1987-1996, 1998-2004, 2006, 2008-2017 Free Software - Foundation, Inc. - This file is part of the GNU C Library. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#ifndef _LIBC -# include -#endif - -#include "getopt.h" - -#include -#include -#include -#include - -#ifdef _LIBC -# include -#else -# include "gettext.h" -# define _(msgid) gettext (msgid) -#endif - -#if defined _LIBC && defined USE_IN_LIBIO -# include -#endif - -/* This version of 'getopt' appears to the caller like standard Unix 'getopt' - but it behaves differently for the user, since it allows the user - to intersperse the options with the other arguments. - - As 'getopt_long' works, it permutes the elements of ARGV so that, - when it is done, all the options precede everything else. Thus - all application programs are extended to handle flexible argument order. - - Using 'getopt' or setting the environment variable POSIXLY_CORRECT - disables permutation. - Then the behavior is completely standard. - - GNU application programs can use a third alternative mode in which - they can distinguish the relative order of options and other arguments. */ - -#include "getopt_int.h" - -/* For communication from 'getopt' to the caller. - When 'getopt' finds an option that takes an argument, - the argument value is returned here. - Also, when 'ordering' is RETURN_IN_ORDER, - each non-option ARGV-element is returned here. */ - -char *optarg; - -/* Index in ARGV of the next element to be scanned. - This is used for communication to and from the caller - and for communication between successive calls to 'getopt'. - - On entry to 'getopt', zero means this is the first call; initialize. - - When 'getopt' returns -1, this is the index of the first of the - non-option elements that the caller should itself scan. - - Otherwise, 'optind' communicates from one call to the next - how much of ARGV has been scanned so far. */ - -/* 1003.2 says this must be 1 before any call. */ -int optind = 1; - -/* Callers store zero here to inhibit the error message - for unrecognized options. */ - -int opterr = 1; - -/* Set to an option character which was unrecognized. - This must be initialized on some systems to avoid linking in the - system's own getopt implementation. */ - -int optopt = '?'; - -/* Keep a global copy of all internal members of getopt_data. */ - -static struct _getopt_data getopt_data; - - -#if defined HAVE_DECL_GETENV && !HAVE_DECL_GETENV -extern char *getenv (); -#endif - -#ifdef _LIBC -/* Stored original parameters. - XXX This is no good solution. We should rather copy the args so - that we can compare them later. But we must not use malloc(3). */ -extern int __libc_argc; -extern char **__libc_argv; - -/* Bash 2.0 gives us an environment variable containing flags - indicating ARGV elements that should not be considered arguments. */ - -# ifdef USE_NONOPTION_FLAGS -/* Defined in getopt_init.c */ -extern char *__getopt_nonoption_flags; -# endif - -# ifdef USE_NONOPTION_FLAGS -# define SWAP_FLAGS(ch1, ch2) \ - if (d->__nonoption_flags_len > 0) \ - { \ - char __tmp = __getopt_nonoption_flags[ch1]; \ - __getopt_nonoption_flags[ch1] = __getopt_nonoption_flags[ch2]; \ - __getopt_nonoption_flags[ch2] = __tmp; \ - } -# else -# define SWAP_FLAGS(ch1, ch2) -# endif -#else /* !_LIBC */ -# define SWAP_FLAGS(ch1, ch2) -#endif /* _LIBC */ - -/* Exchange two adjacent subsequences of ARGV. - One subsequence is elements [first_nonopt,last_nonopt) - which contains all the non-options that have been skipped so far. - The other is elements [last_nonopt,optind), which contains all - the options processed since those non-options were skipped. - - 'first_nonopt' and 'last_nonopt' are relocated so that they describe - the new indices of the non-options in ARGV after they are moved. */ - -static void -exchange (char **argv, struct _getopt_data *d) -{ - int bottom = d->__first_nonopt; - int middle = d->__last_nonopt; - int top = d->optind; - char *tem; - - /* Exchange the shorter segment with the far end of the longer segment. - That puts the shorter segment into the right place. - It leaves the longer segment in the right place overall, - but it consists of two parts that need to be swapped next. */ - -#if defined _LIBC && defined USE_NONOPTION_FLAGS - /* First make sure the handling of the '__getopt_nonoption_flags' - string can work normally. Our top argument must be in the range - of the string. */ - if (d->__nonoption_flags_len > 0 && top >= d->__nonoption_flags_max_len) - { - /* We must extend the array. The user plays games with us and - presents new arguments. */ - char *new_str = malloc (top + 1); - if (new_str == NULL) - d->__nonoption_flags_len = d->__nonoption_flags_max_len = 0; - else - { - memset (__mempcpy (new_str, __getopt_nonoption_flags, - d->__nonoption_flags_max_len), - '\0', top + 1 - d->__nonoption_flags_max_len); - d->__nonoption_flags_max_len = top + 1; - __getopt_nonoption_flags = new_str; - } - } -#endif - - while (top > middle && middle > bottom) - { - if (top - middle > middle - bottom) - { - /* Bottom segment is the short one. */ - int len = middle - bottom; - register int i; - - /* Swap it with the top part of the top segment. */ - for (i = 0; i < len; i++) - { - tem = argv[bottom + i]; - argv[bottom + i] = argv[top - (middle - bottom) + i]; - argv[top - (middle - bottom) + i] = tem; - SWAP_FLAGS (bottom + i, top - (middle - bottom) + i); - } - /* Exclude the moved bottom segment from further swapping. */ - top -= len; - } - else - { - /* Top segment is the short one. */ - int len = top - middle; - register int i; - - /* Swap it with the bottom part of the bottom segment. */ - for (i = 0; i < len; i++) - { - tem = argv[bottom + i]; - argv[bottom + i] = argv[middle + i]; - argv[middle + i] = tem; - SWAP_FLAGS (bottom + i, middle + i); - } - /* Exclude the moved top segment from further swapping. */ - bottom += len; - } - } - - /* Update records for the slots the non-options now occupy. */ - - d->__first_nonopt += (d->optind - d->__last_nonopt); - d->__last_nonopt = d->optind; -} - -/* Initialize the internal data when the first call is made. */ - -static const char * -_getopt_initialize (int argc _GL_UNUSED, - char **argv _GL_UNUSED, const char *optstring, - struct _getopt_data *d, int posixly_correct) -{ - /* Start processing options with ARGV-element 1 (since ARGV-element 0 - is the program name); the sequence of previously skipped - non-option ARGV-elements is empty. */ - - d->__first_nonopt = d->__last_nonopt = d->optind; - - d->__nextchar = NULL; - - d->__posixly_correct = posixly_correct || !!getenv ("POSIXLY_CORRECT"); - - /* Determine how to handle the ordering of options and nonoptions. */ - - if (optstring[0] == '-') - { - d->__ordering = RETURN_IN_ORDER; - ++optstring; - } - else if (optstring[0] == '+') - { - d->__ordering = REQUIRE_ORDER; - ++optstring; - } - else if (d->__posixly_correct) - d->__ordering = REQUIRE_ORDER; - else - d->__ordering = PERMUTE; - -#if defined _LIBC && defined USE_NONOPTION_FLAGS - if (!d->__posixly_correct - && argc == __libc_argc && argv == __libc_argv) - { - if (d->__nonoption_flags_max_len == 0) - { - if (__getopt_nonoption_flags == NULL - || __getopt_nonoption_flags[0] == '\0') - d->__nonoption_flags_max_len = -1; - else - { - const char *orig_str = __getopt_nonoption_flags; - int len = d->__nonoption_flags_max_len = strlen (orig_str); - if (d->__nonoption_flags_max_len < argc) - d->__nonoption_flags_max_len = argc; - __getopt_nonoption_flags = - (char *) malloc (d->__nonoption_flags_max_len); - if (__getopt_nonoption_flags == NULL) - d->__nonoption_flags_max_len = -1; - else - memset (__mempcpy (__getopt_nonoption_flags, orig_str, len), - '\0', d->__nonoption_flags_max_len - len); - } - } - d->__nonoption_flags_len = d->__nonoption_flags_max_len; - } - else - d->__nonoption_flags_len = 0; -#endif - - return optstring; -} - -/* Scan elements of ARGV (whose length is ARGC) for option characters - given in OPTSTRING. - - If an element of ARGV starts with '-', and is not exactly "-" or "--", - then it is an option element. The characters of this element - (aside from the initial '-') are option characters. If 'getopt' - is called repeatedly, it returns successively each of the option characters - from each of the option elements. - - If 'getopt' finds another option character, it returns that character, - updating 'optind' and 'nextchar' so that the next call to 'getopt' can - resume the scan with the following option character or ARGV-element. - - If there are no more option characters, 'getopt' returns -1. - Then 'optind' is the index in ARGV of the first ARGV-element - that is not an option. (The ARGV-elements have been permuted - so that those that are not options now come last.) - - OPTSTRING is a string containing the legitimate option characters. - If an option character is seen that is not listed in OPTSTRING, - return '?' after printing an error message. If you set 'opterr' to - zero, the error message is suppressed but we still return '?'. - - If a char in OPTSTRING is followed by a colon, that means it wants an arg, - so the following text in the same ARGV-element, or the text of the following - ARGV-element, is returned in 'optarg'. Two colons mean an option that - wants an optional arg; if there is text in the current ARGV-element, - it is returned in 'optarg', otherwise 'optarg' is set to zero. - - If OPTSTRING starts with '-' or '+', it requests different methods of - handling the non-option ARGV-elements. - See the comments about RETURN_IN_ORDER and REQUIRE_ORDER, above. - - Long-named options begin with '--' instead of '-'. - Their names may be abbreviated as long as the abbreviation is unique - or is an exact match for some defined option. If they have an - argument, it follows the option name in the same ARGV-element, separated - from the option name by a '=', or else the in next ARGV-element. - When 'getopt' finds a long-named option, it returns 0 if that option's - 'flag' field is nonzero, the value of the option's 'val' field - if the 'flag' field is zero. - - The elements of ARGV aren't really const, because we permute them. - But we pretend they're const in the prototype to be compatible - with other systems. - - LONGOPTS is a vector of 'struct option' terminated by an - element containing a name which is zero. - - LONGIND returns the index in LONGOPT of the long-named option found. - It is only valid when a long-named option has been found by the most - recent call. - - If LONG_ONLY is nonzero, '-' as well as '--' can introduce - long-named options. */ - -int -_getopt_internal_r (int argc, char **argv, const char *optstring, - const struct option *longopts, int *longind, - int long_only, struct _getopt_data *d, int posixly_correct) -{ - int print_errors = d->opterr; - - if (argc < 1) - return -1; - - d->optarg = NULL; - - if (d->optind == 0 || !d->__initialized) - { - if (d->optind == 0) - d->optind = 1; /* Don't scan ARGV[0], the program name. */ - optstring = _getopt_initialize (argc, argv, optstring, d, - posixly_correct); - d->__initialized = 1; - } - else if (optstring[0] == '-' || optstring[0] == '+') - optstring++; - if (optstring[0] == ':') - print_errors = 0; - - /* Test whether ARGV[optind] points to a non-option argument. - Either it does not have option syntax, or there is an environment flag - from the shell indicating it is not an option. The later information - is only used when the used in the GNU libc. */ -#if defined _LIBC && defined USE_NONOPTION_FLAGS -# define NONOPTION_P (argv[d->optind][0] != '-' || argv[d->optind][1] == '\0' \ - || (d->optind < d->__nonoption_flags_len \ - && __getopt_nonoption_flags[d->optind] == '1')) -#else -# define NONOPTION_P (argv[d->optind][0] != '-' || argv[d->optind][1] == '\0') -#endif - - if (d->__nextchar == NULL || *d->__nextchar == '\0') - { - /* Advance to the next ARGV-element. */ - - /* Give FIRST_NONOPT & LAST_NONOPT rational values if OPTIND has been - moved back by the user (who may also have changed the arguments). */ - if (d->__last_nonopt > d->optind) - d->__last_nonopt = d->optind; - if (d->__first_nonopt > d->optind) - d->__first_nonopt = d->optind; - - if (d->__ordering == PERMUTE) - { - /* If we have just processed some options following some non-options, - exchange them so that the options come first. */ - - if (d->__first_nonopt != d->__last_nonopt - && d->__last_nonopt != d->optind) - exchange ((char **) argv, d); - else if (d->__last_nonopt != d->optind) - d->__first_nonopt = d->optind; - - /* Skip any additional non-options - and extend the range of non-options previously skipped. */ - - while (d->optind < argc && NONOPTION_P) - d->optind++; - d->__last_nonopt = d->optind; - } - - /* The special ARGV-element '--' means premature end of options. - Skip it like a null option, - then exchange with previous non-options as if it were an option, - then skip everything else like a non-option. */ - - if (d->optind != argc && !strcmp (argv[d->optind], "--")) - { - d->optind++; - - if (d->__first_nonopt != d->__last_nonopt - && d->__last_nonopt != d->optind) - exchange ((char **) argv, d); - else if (d->__first_nonopt == d->__last_nonopt) - d->__first_nonopt = d->optind; - d->__last_nonopt = argc; - - d->optind = argc; - } - - /* If we have done all the ARGV-elements, stop the scan - and back over any non-options that we skipped and permuted. */ - - if (d->optind == argc) - { - /* Set the next-arg-index to point at the non-options - that we previously skipped, so the caller will digest them. */ - if (d->__first_nonopt != d->__last_nonopt) - d->optind = d->__first_nonopt; - return -1; - } - - /* If we have come to a non-option and did not permute it, - either stop the scan or describe it to the caller and pass it by. */ - - if (NONOPTION_P) - { - if (d->__ordering == REQUIRE_ORDER) - return -1; - d->optarg = argv[d->optind++]; - return 1; - } - - /* We have found another option-ARGV-element. - Skip the initial punctuation. */ - - d->__nextchar = (argv[d->optind] + 1 - + (longopts != NULL && argv[d->optind][1] == '-')); - } - - /* Decode the current option-ARGV-element. */ - - /* Check whether the ARGV-element is a long option. - - If long_only and the ARGV-element has the form "-f", where f is - a valid short option, don't consider it an abbreviated form of - a long option that starts with f. Otherwise there would be no - way to give the -f short option. - - On the other hand, if there's a long option "fubar" and - the ARGV-element is "-fu", do consider that an abbreviation of - the long option, just like "--fu", and not "-f" with arg "u". - - This distinction seems to be the most useful approach. */ - - if (longopts != NULL - && (argv[d->optind][1] == '-' - || (long_only && (argv[d->optind][2] - || !strchr (optstring, argv[d->optind][1]))))) - { - char *nameend; - unsigned int namelen; - const struct option *p; - const struct option *pfound = NULL; - struct option_list - { - const struct option *p; - struct option_list *next; - } *ambig_list = NULL; -#ifdef _LIBC -/* malloc() not used for _LIBC to simplify failure messages. */ -# define free_option_list(l) -#else -# define free_option_list(l) \ - while (l != NULL) \ - { \ - struct option_list *pn = l->next; \ - free (l); \ - l = pn; \ - } -#endif - int exact = 0; - int ambig = 0; - int indfound = -1; - int option_index; - - for (nameend = d->__nextchar; *nameend && *nameend != '='; nameend++) - /* Do nothing. */ ; - namelen = nameend - d->__nextchar; - - /* Test all long options for either exact match - or abbreviated matches. */ - for (p = longopts, option_index = 0; p->name; p++, option_index++) - if (!strncmp (p->name, d->__nextchar, namelen)) - { - if (namelen == (unsigned int) strlen (p->name)) - { - /* Exact match found. */ - pfound = p; - indfound = option_index; - exact = 1; - break; - } - else if (pfound == NULL) - { - /* First nonexact match found. */ - pfound = p; - indfound = option_index; - } - else if (ambig) - ; /* Taking simpler path to handling ambiguities. */ - else if (long_only - || pfound->has_arg != p->has_arg - || pfound->flag != p->flag - || pfound->val != p->val) - { - /* Second or later nonexact match found. */ -#ifdef _LIBC - struct option_list *newp = alloca (sizeof (*newp)); -#else - struct option_list *newp = malloc (sizeof (*newp)); - if (newp == NULL) - { - free_option_list (ambig_list); - ambig_list = NULL; - ambig = 1; /* Use simpler fallback message. */ - } - else -#endif - { - newp->p = p; - newp->next = ambig_list; - ambig_list = newp; - } - } - } - - if ((ambig || ambig_list) && !exact) - { - if (print_errors && ambig_list) - { - struct option_list first; - first.p = pfound; - first.next = ambig_list; - ambig_list = &first; - -#if defined _LIBC && defined USE_IN_LIBIO - char *buf = NULL; - size_t buflen = 0; - - FILE *fp = open_memstream (&buf, &buflen); - if (fp != NULL) - { - fprintf (fp, - _("%s: option '%s' is ambiguous; possibilities:"), - argv[0], argv[d->optind]); - - do - { - fprintf (fp, " '--%s'", ambig_list->p->name); - ambig_list = ambig_list->next; - } - while (ambig_list != NULL); - - fputc_unlocked ('\n', fp); - - if (__builtin_expect (fclose (fp) != EOF, 1)) - { - _IO_flockfile (stderr); - - int old_flags2 = ((_IO_FILE *) stderr)->_flags2; - ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; - - __fxprintf (NULL, "%s", buf); - - ((_IO_FILE *) stderr)->_flags2 = old_flags2; - _IO_funlockfile (stderr); - - free (buf); - } - } -#else - fprintf (stderr, - _("%s: option '%s' is ambiguous; possibilities:"), - argv[0], argv[d->optind]); - do - { - fprintf (stderr, " '--%s'", ambig_list->p->name); - ambig_list = ambig_list->next; - } - while (ambig_list != NULL); - - fputc ('\n', stderr); -#endif - } - else if (print_errors && ambig) - { - fprintf (stderr, - _("%s: option '%s' is ambiguous\n"), - argv[0], argv[d->optind]); - } - d->__nextchar += strlen (d->__nextchar); - d->optind++; - d->optopt = 0; - free_option_list (ambig_list); - return '?'; - } - - free_option_list (ambig_list); - - if (pfound != NULL) - { - option_index = indfound; - d->optind++; - if (*nameend) - { - /* Don't test has_arg with >, because some C compilers don't - allow it to be used on enums. */ - if (pfound->has_arg) - d->optarg = nameend + 1; - else - { - if (print_errors) - { -#if defined _LIBC && defined USE_IN_LIBIO - char *buf; - int n; -#endif - - if (argv[d->optind - 1][1] == '-') - { - /* --option */ -#if defined _LIBC && defined USE_IN_LIBIO - n = __asprintf (&buf, _("\ -%s: option '--%s' doesn't allow an argument\n"), - argv[0], pfound->name); -#else - fprintf (stderr, _("\ -%s: option '--%s' doesn't allow an argument\n"), - argv[0], pfound->name); -#endif - } - else - { - /* +option or -option */ -#if defined _LIBC && defined USE_IN_LIBIO - n = __asprintf (&buf, _("\ -%s: option '%c%s' doesn't allow an argument\n"), - argv[0], argv[d->optind - 1][0], - pfound->name); -#else - fprintf (stderr, _("\ -%s: option '%c%s' doesn't allow an argument\n"), - argv[0], argv[d->optind - 1][0], - pfound->name); -#endif - } - -#if defined _LIBC && defined USE_IN_LIBIO - if (n >= 0) - { - _IO_flockfile (stderr); - - int old_flags2 = ((_IO_FILE *) stderr)->_flags2; - ((_IO_FILE *) stderr)->_flags2 - |= _IO_FLAGS2_NOTCANCEL; - - __fxprintf (NULL, "%s", buf); - - ((_IO_FILE *) stderr)->_flags2 = old_flags2; - _IO_funlockfile (stderr); - - free (buf); - } -#endif - } - - d->__nextchar += strlen (d->__nextchar); - - d->optopt = pfound->val; - return '?'; - } - } - else if (pfound->has_arg == 1) - { - if (d->optind < argc) - d->optarg = argv[d->optind++]; - else - { - if (print_errors) - { -#if defined _LIBC && defined USE_IN_LIBIO - char *buf; - - if (__asprintf (&buf, _("\ -%s: option '--%s' requires an argument\n"), - argv[0], pfound->name) >= 0) - { - _IO_flockfile (stderr); - - int old_flags2 = ((_IO_FILE *) stderr)->_flags2; - ((_IO_FILE *) stderr)->_flags2 - |= _IO_FLAGS2_NOTCANCEL; - - __fxprintf (NULL, "%s", buf); - - ((_IO_FILE *) stderr)->_flags2 = old_flags2; - _IO_funlockfile (stderr); - - free (buf); - } -#else - fprintf (stderr, - _("%s: option '--%s' requires an argument\n"), - argv[0], pfound->name); -#endif - } - d->__nextchar += strlen (d->__nextchar); - d->optopt = pfound->val; - return optstring[0] == ':' ? ':' : '?'; - } - } - d->__nextchar += strlen (d->__nextchar); - if (longind != NULL) - *longind = option_index; - if (pfound->flag) - { - *(pfound->flag) = pfound->val; - return 0; - } - return pfound->val; - } - - /* Can't find it as a long option. If this is not getopt_long_only, - or the option starts with '--' or is not a valid short - option, then it's an error. - Otherwise interpret it as a short option. */ - if (!long_only || argv[d->optind][1] == '-' - || strchr (optstring, *d->__nextchar) == NULL) - { - if (print_errors) - { -#if defined _LIBC && defined USE_IN_LIBIO - char *buf; - int n; -#endif - - if (argv[d->optind][1] == '-') - { - /* --option */ -#if defined _LIBC && defined USE_IN_LIBIO - n = __asprintf (&buf, _("%s: unrecognized option '--%s'\n"), - argv[0], d->__nextchar); -#else - fprintf (stderr, _("%s: unrecognized option '--%s'\n"), - argv[0], d->__nextchar); -#endif - } - else - { - /* +option or -option */ -#if defined _LIBC && defined USE_IN_LIBIO - n = __asprintf (&buf, _("%s: unrecognized option '%c%s'\n"), - argv[0], argv[d->optind][0], d->__nextchar); -#else - fprintf (stderr, _("%s: unrecognized option '%c%s'\n"), - argv[0], argv[d->optind][0], d->__nextchar); -#endif - } - -#if defined _LIBC && defined USE_IN_LIBIO - if (n >= 0) - { - _IO_flockfile (stderr); - - int old_flags2 = ((_IO_FILE *) stderr)->_flags2; - ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; - - __fxprintf (NULL, "%s", buf); - - ((_IO_FILE *) stderr)->_flags2 = old_flags2; - _IO_funlockfile (stderr); - - free (buf); - } -#endif - } - d->__nextchar = (char *) ""; - d->optind++; - d->optopt = 0; - return '?'; - } - } - - /* Look at and handle the next short option-character. */ - - { - char c = *d->__nextchar++; - const char *temp = strchr (optstring, c); - - /* Increment 'optind' when we start to process its last character. */ - if (*d->__nextchar == '\0') - ++d->optind; - - if (temp == NULL || c == ':' || c == ';') - { - if (print_errors) - { -#if defined _LIBC && defined USE_IN_LIBIO - char *buf; - int n; -#endif - -#if defined _LIBC && defined USE_IN_LIBIO - n = __asprintf (&buf, _("%s: invalid option -- '%c'\n"), - argv[0], c); -#else - fprintf (stderr, _("%s: invalid option -- '%c'\n"), argv[0], c); -#endif - -#if defined _LIBC && defined USE_IN_LIBIO - if (n >= 0) - { - _IO_flockfile (stderr); - - int old_flags2 = ((_IO_FILE *) stderr)->_flags2; - ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; - - __fxprintf (NULL, "%s", buf); - - ((_IO_FILE *) stderr)->_flags2 = old_flags2; - _IO_funlockfile (stderr); - - free (buf); - } -#endif - } - d->optopt = c; - return '?'; - } - /* Convenience. Treat POSIX -W foo same as long option --foo */ - if (temp[0] == 'W' && temp[1] == ';') - { - char *nameend; - const struct option *p; - const struct option *pfound = NULL; - int exact = 0; - int ambig = 0; - int indfound = 0; - int option_index; - - if (longopts == NULL) - goto no_longs; - - /* This is an option that requires an argument. */ - if (*d->__nextchar != '\0') - { - d->optarg = d->__nextchar; - /* If we end this ARGV-element by taking the rest as an arg, - we must advance to the next element now. */ - d->optind++; - } - else if (d->optind == argc) - { - if (print_errors) - { -#if defined _LIBC && defined USE_IN_LIBIO - char *buf; - - if (__asprintf (&buf, - _("%s: option requires an argument -- '%c'\n"), - argv[0], c) >= 0) - { - _IO_flockfile (stderr); - - int old_flags2 = ((_IO_FILE *) stderr)->_flags2; - ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; - - __fxprintf (NULL, "%s", buf); - - ((_IO_FILE *) stderr)->_flags2 = old_flags2; - _IO_funlockfile (stderr); - - free (buf); - } -#else - fprintf (stderr, - _("%s: option requires an argument -- '%c'\n"), - argv[0], c); -#endif - } - d->optopt = c; - if (optstring[0] == ':') - c = ':'; - else - c = '?'; - return c; - } - else - /* We already incremented 'd->optind' once; - increment it again when taking next ARGV-elt as argument. */ - d->optarg = argv[d->optind++]; - - /* optarg is now the argument, see if it's in the - table of longopts. */ - - for (d->__nextchar = nameend = d->optarg; *nameend && *nameend != '='; - nameend++) - /* Do nothing. */ ; - - /* Test all long options for either exact match - or abbreviated matches. */ - for (p = longopts, option_index = 0; p->name; p++, option_index++) - if (!strncmp (p->name, d->__nextchar, nameend - d->__nextchar)) - { - if ((unsigned int) (nameend - d->__nextchar) == strlen (p->name)) - { - /* Exact match found. */ - pfound = p; - indfound = option_index; - exact = 1; - break; - } - else if (pfound == NULL) - { - /* First nonexact match found. */ - pfound = p; - indfound = option_index; - } - else if (long_only - || pfound->has_arg != p->has_arg - || pfound->flag != p->flag - || pfound->val != p->val) - /* Second or later nonexact match found. */ - ambig = 1; - } - if (ambig && !exact) - { - if (print_errors) - { -#if defined _LIBC && defined USE_IN_LIBIO - char *buf; - - if (__asprintf (&buf, _("%s: option '-W %s' is ambiguous\n"), - argv[0], d->optarg) >= 0) - { - _IO_flockfile (stderr); - - int old_flags2 = ((_IO_FILE *) stderr)->_flags2; - ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; - - __fxprintf (NULL, "%s", buf); - - ((_IO_FILE *) stderr)->_flags2 = old_flags2; - _IO_funlockfile (stderr); - - free (buf); - } -#else - fprintf (stderr, _("%s: option '-W %s' is ambiguous\n"), - argv[0], d->optarg); -#endif - } - d->__nextchar += strlen (d->__nextchar); - d->optind++; - return '?'; - } - if (pfound != NULL) - { - option_index = indfound; - if (*nameend) - { - /* Don't test has_arg with >, because some C compilers don't - allow it to be used on enums. */ - if (pfound->has_arg) - d->optarg = nameend + 1; - else - { - if (print_errors) - { -#if defined _LIBC && defined USE_IN_LIBIO - char *buf; - - if (__asprintf (&buf, _("\ -%s: option '-W %s' doesn't allow an argument\n"), - argv[0], pfound->name) >= 0) - { - _IO_flockfile (stderr); - - int old_flags2 = ((_IO_FILE *) stderr)->_flags2; - ((_IO_FILE *) stderr)->_flags2 - |= _IO_FLAGS2_NOTCANCEL; - - __fxprintf (NULL, "%s", buf); - - ((_IO_FILE *) stderr)->_flags2 = old_flags2; - _IO_funlockfile (stderr); - - free (buf); - } -#else - fprintf (stderr, _("\ -%s: option '-W %s' doesn't allow an argument\n"), - argv[0], pfound->name); -#endif - } - - d->__nextchar += strlen (d->__nextchar); - return '?'; - } - } - else if (pfound->has_arg == 1) - { - if (d->optind < argc) - d->optarg = argv[d->optind++]; - else - { - if (print_errors) - { -#if defined _LIBC && defined USE_IN_LIBIO - char *buf; - - if (__asprintf (&buf, _("\ -%s: option '-W %s' requires an argument\n"), - argv[0], pfound->name) >= 0) - { - _IO_flockfile (stderr); - - int old_flags2 = ((_IO_FILE *) stderr)->_flags2; - ((_IO_FILE *) stderr)->_flags2 - |= _IO_FLAGS2_NOTCANCEL; - - __fxprintf (NULL, "%s", buf); - - ((_IO_FILE *) stderr)->_flags2 = old_flags2; - _IO_funlockfile (stderr); - - free (buf); - } -#else - fprintf (stderr, _("\ -%s: option '-W %s' requires an argument\n"), - argv[0], pfound->name); -#endif - } - d->__nextchar += strlen (d->__nextchar); - return optstring[0] == ':' ? ':' : '?'; - } - } - else - d->optarg = NULL; - d->__nextchar += strlen (d->__nextchar); - if (longind != NULL) - *longind = option_index; - if (pfound->flag) - { - *(pfound->flag) = pfound->val; - return 0; - } - return pfound->val; - } - - no_longs: - d->__nextchar = NULL; - return 'W'; /* Let the application handle it. */ - } - if (temp[1] == ':') - { - if (temp[2] == ':') - { - /* This is an option that accepts an argument optionally. */ - if (*d->__nextchar != '\0') - { - d->optarg = d->__nextchar; - d->optind++; - } - else - d->optarg = NULL; - d->__nextchar = NULL; - } - else - { - /* This is an option that requires an argument. */ - if (*d->__nextchar != '\0') - { - d->optarg = d->__nextchar; - /* If we end this ARGV-element by taking the rest as an arg, - we must advance to the next element now. */ - d->optind++; - } - else if (d->optind == argc) - { - if (print_errors) - { -#if defined _LIBC && defined USE_IN_LIBIO - char *buf; - - if (__asprintf (&buf, _("\ -%s: option requires an argument -- '%c'\n"), - argv[0], c) >= 0) - { - _IO_flockfile (stderr); - - int old_flags2 = ((_IO_FILE *) stderr)->_flags2; - ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; - - __fxprintf (NULL, "%s", buf); - - ((_IO_FILE *) stderr)->_flags2 = old_flags2; - _IO_funlockfile (stderr); - - free (buf); - } -#else - fprintf (stderr, - _("%s: option requires an argument -- '%c'\n"), - argv[0], c); -#endif - } - d->optopt = c; - if (optstring[0] == ':') - c = ':'; - else - c = '?'; - } - else - /* We already incremented 'optind' once; - increment it again when taking next ARGV-elt as argument. */ - d->optarg = argv[d->optind++]; - d->__nextchar = NULL; - } - } - return c; - } -} - -int -_getopt_internal (int argc, char **argv, const char *optstring, - const struct option *longopts, int *longind, int long_only, - int posixly_correct) -{ - int result; - - getopt_data.optind = optind; - getopt_data.opterr = opterr; - - result = _getopt_internal_r (argc, argv, optstring, longopts, - longind, long_only, &getopt_data, - posixly_correct); - - optind = getopt_data.optind; - optarg = getopt_data.optarg; - optopt = getopt_data.optopt; - - return result; -} - -/* glibc gets a LSB-compliant getopt. - Standalone applications get a POSIX-compliant getopt. */ -#if _LIBC -enum { POSIXLY_CORRECT = 0 }; -#else -enum { POSIXLY_CORRECT = 1 }; -#endif - -int -getopt (int argc, char *const *argv, const char *optstring) -{ - return _getopt_internal (argc, (char **) argv, optstring, - (const struct option *) 0, - (int *) 0, - 0, POSIXLY_CORRECT); -} - -#ifdef _LIBC -int -__posix_getopt (int argc, char *const *argv, const char *optstring) -{ - return _getopt_internal (argc, argv, optstring, - (const struct option *) 0, - (int *) 0, - 0, 1); -} -#endif - - -#ifdef TEST - -/* Compile with -DTEST to make an executable for use in testing - the above definition of 'getopt'. */ - -int -main (int argc, char **argv) -{ - int c; - int digit_optind = 0; - - while (1) - { - int this_option_optind = optind ? optind : 1; - - c = getopt (argc, argv, "abc:d:0123456789"); - if (c == -1) - break; - - switch (c) - { - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - if (digit_optind != 0 && digit_optind != this_option_optind) - printf ("digits occur in two different argv-elements.\n"); - digit_optind = this_option_optind; - printf ("option %c\n", c); - break; - - case 'a': - printf ("option a\n"); - break; - - case 'b': - printf ("option b\n"); - break; - - case 'c': - printf ("option c with value '%s'\n", optarg); - break; - - case '?': - break; - - default: - printf ("?? getopt returned character code 0%o ??\n", c); - } - } - - if (optind < argc) - { - printf ("non-option ARGV-elements: "); - while (optind < argc) - printf ("%s ", argv[optind++]); - printf ("\n"); - } - - exit (0); -} - -#endif /* TEST */ diff --git a/gl/getopt.in.h b/gl/getopt.in.h deleted file mode 100644 index 6cbad8e..0000000 --- a/gl/getopt.in.h +++ /dev/null @@ -1,261 +0,0 @@ -/* Declarations for getopt. - Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2007, 2009-2017 Free Software - Foundation, Inc. - This file is part of the GNU C Library. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#ifndef _@GUARD_PREFIX@_GETOPT_H - -#if __GNUC__ >= 3 -@PRAGMA_SYSTEM_HEADER@ -#endif -@PRAGMA_COLUMNS@ - -/* The include_next requires a split double-inclusion guard. We must - also inform the replacement unistd.h to not recursively use - ; our definitions will be present soon enough. */ -#if @HAVE_GETOPT_H@ -# define _GL_SYSTEM_GETOPT -# @INCLUDE_NEXT@ @NEXT_GETOPT_H@ -# undef _GL_SYSTEM_GETOPT -#endif - -#ifndef _@GUARD_PREFIX@_GETOPT_H - -#ifndef __need_getopt -# define _@GUARD_PREFIX@_GETOPT_H 1 -#endif - -/* Standalone applications should #define __GETOPT_PREFIX to an - identifier that prefixes the external functions and variables - defined in this header. When this happens, include the - headers that might declare getopt so that they will not cause - confusion if included after this file (if the system had , - we have already included it). Then systematically rename - identifiers so that they do not collide with the system functions - and variables. Renaming avoids problems with some compilers and - linkers. */ -#if defined __GETOPT_PREFIX -# if !defined __need_getopt -# if !@HAVE_GETOPT_H@ -# define __need_system_stdlib_h -# include -# undef __need_system_stdlib_h -# include -# include -# endif -# undef __need_getopt -# endif -# undef __GETOPT_CONCAT -# undef __GETOPT_XCONCAT -# undef __GETOPT_ID -# undef getopt -# undef getopt_long -# undef getopt_long_only -# undef optarg -# undef opterr -# undef optind -# undef optopt -# undef option -# undef _getopt_internal -# define __GETOPT_CONCAT(x, y) x ## y -# define __GETOPT_XCONCAT(x, y) __GETOPT_CONCAT (x, y) -# define __GETOPT_ID(y) __GETOPT_XCONCAT (__GETOPT_PREFIX, y) -# define getopt __GETOPT_ID (getopt) -# define getopt_long __GETOPT_ID (getopt_long) -# define getopt_long_only __GETOPT_ID (getopt_long_only) -# define optarg __GETOPT_ID (optarg) -# define opterr __GETOPT_ID (opterr) -# define optind __GETOPT_ID (optind) -# define optopt __GETOPT_ID (optopt) -# define option __GETOPT_ID (option) -# define _getopt_internal __GETOPT_ID (getopt_internal) -#endif - -/* Standalone applications get correct prototypes for getopt_long and - getopt_long_only; they declare "char **argv". libc uses prototypes - with "char *const *argv" that are incorrect because getopt_long and - getopt_long_only can permute argv; this is required for backward - compatibility (e.g., for LSB 2.0.1). - - This used to be '#if defined __GETOPT_PREFIX && !defined __need_getopt', - but it caused redefinition warnings if both unistd.h and getopt.h were - included, since unistd.h includes getopt.h having previously defined - __need_getopt. - - The only place where __getopt_argv_const is used is in definitions - of getopt_long and getopt_long_only below, but these are visible - only if __need_getopt is not defined, so it is quite safe to rewrite - the conditional as follows: -*/ -#if !defined __need_getopt -# if defined __GETOPT_PREFIX -# define __getopt_argv_const /* empty */ -# else -# define __getopt_argv_const const -# endif -#endif - -/* If __GNU_LIBRARY__ is not already defined, either we are being used - standalone, or this is the first header included in the source file. - If we are being used with glibc, we need to include , but - that does not exist if we are standalone. So: if __GNU_LIBRARY__ is - not defined, include , which will pull in for us - if it's from glibc. (Why ctype.h? It's guaranteed to exist and it - doesn't flood the namespace with stuff the way some other headers do.) */ -#if !defined __GNU_LIBRARY__ -# include -#endif - -#ifndef __THROW -# ifndef __GNUC_PREREQ -# define __GNUC_PREREQ(maj, min) (0) -# endif -# if defined __cplusplus && __GNUC_PREREQ (2,8) -# define __THROW throw () -# else -# define __THROW -# endif -#endif - -/* The definition of _GL_ARG_NONNULL is copied here. */ - -#ifdef __cplusplus -extern "C" { -#endif - -/* For communication from 'getopt' to the caller. - When 'getopt' finds an option that takes an argument, - the argument value is returned here. - Also, when 'ordering' is RETURN_IN_ORDER, - each non-option ARGV-element is returned here. */ - -extern char *optarg; - -/* Index in ARGV of the next element to be scanned. - This is used for communication to and from the caller - and for communication between successive calls to 'getopt'. - - On entry to 'getopt', zero means this is the first call; initialize. - - When 'getopt' returns -1, this is the index of the first of the - non-option elements that the caller should itself scan. - - Otherwise, 'optind' communicates from one call to the next - how much of ARGV has been scanned so far. */ - -extern int optind; - -/* Callers store zero here to inhibit the error message 'getopt' prints - for unrecognized options. */ - -extern int opterr; - -/* Set to an option character which was unrecognized. */ - -extern int optopt; - -#ifndef __need_getopt -/* Describe the long-named options requested by the application. - The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector - of 'struct option' terminated by an element containing a name which is - zero. - - The field 'has_arg' is: - no_argument (or 0) if the option does not take an argument, - required_argument (or 1) if the option requires an argument, - optional_argument (or 2) if the option takes an optional argument. - - If the field 'flag' is not NULL, it points to a variable that is set - to the value given in the field 'val' when the option is found, but - left unchanged if the option is not found. - - To have a long-named option do something other than set an 'int' to - a compiled-in constant, such as set a value from 'optarg', set the - option's 'flag' field to zero and its 'val' field to a nonzero - value (the equivalent single-letter option character, if there is - one). For long options that have a zero 'flag' field, 'getopt' - returns the contents of the 'val' field. */ - -# if !GNULIB_defined_struct_option -struct option -{ - const char *name; - /* has_arg can't be an enum because some compilers complain about - type mismatches in all the code that assumes it is an int. */ - int has_arg; - int *flag; - int val; -}; -# define GNULIB_defined_struct_option 1 -# endif - -/* Names for the values of the 'has_arg' field of 'struct option'. */ - -# define no_argument 0 -# define required_argument 1 -# define optional_argument 2 -#endif /* need getopt */ - - -/* Get definitions and prototypes for functions to process the - arguments in ARGV (ARGC of them, minus the program name) for - options given in OPTS. - - Return the option character from OPTS just read. Return -1 when - there are no more options. For unrecognized options, or options - missing arguments, 'optopt' is set to the option letter, and '?' is - returned. - - The OPTS string is a list of characters which are recognized option - letters, optionally followed by colons, specifying that that letter - takes an argument, to be placed in 'optarg'. - - If a letter in OPTS is followed by two colons, its argument is - optional. This behavior is specific to the GNU 'getopt'. - - The argument '--' causes premature termination of argument - scanning, explicitly telling 'getopt' that there are no more - options. - - If OPTS begins with '-', then non-option arguments are treated as - arguments to the option '\1'. This behavior is specific to the GNU - 'getopt'. If OPTS begins with '+', or POSIXLY_CORRECT is set in - the environment, then do not permute arguments. */ - -extern int getopt (int ___argc, char *const *___argv, const char *__shortopts) - __THROW _GL_ARG_NONNULL ((2, 3)); - -#ifndef __need_getopt -extern int getopt_long (int ___argc, char *__getopt_argv_const *___argv, - const char *__shortopts, - const struct option *__longopts, int *__longind) - __THROW _GL_ARG_NONNULL ((2, 3)); -extern int getopt_long_only (int ___argc, char *__getopt_argv_const *___argv, - const char *__shortopts, - const struct option *__longopts, int *__longind) - __THROW _GL_ARG_NONNULL ((2, 3)); - -#endif - -#ifdef __cplusplus -} -#endif - -/* Make sure we later can get all the definitions and declarations. */ -#undef __need_getopt - -#endif /* _@GUARD_PREFIX@_GETOPT_H */ -#endif /* _@GUARD_PREFIX@_GETOPT_H */ diff --git a/gl/getopt1.c b/gl/getopt1.c deleted file mode 100644 index 4d2e8cb..0000000 --- a/gl/getopt1.c +++ /dev/null @@ -1,170 +0,0 @@ -/* getopt_long and getopt_long_only entry points for GNU getopt. - Copyright (C) 1987-1994, 1996-1998, 2004, 2006, 2009-2017 Free Software - Foundation, Inc. - This file is part of the GNU C Library. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#ifdef _LIBC -# include -#else -# include -# include "getopt.h" -#endif -#include "getopt_int.h" - -#include - -/* This needs to come after some library #include - to get __GNU_LIBRARY__ defined. */ -#ifdef __GNU_LIBRARY__ -#include -#endif - -#ifndef NULL -#define NULL 0 -#endif - -int -getopt_long (int argc, char *__getopt_argv_const *argv, const char *options, - const struct option *long_options, int *opt_index) -{ - return _getopt_internal (argc, (char **) argv, options, long_options, - opt_index, 0, 0); -} - -int -_getopt_long_r (int argc, char **argv, const char *options, - const struct option *long_options, int *opt_index, - struct _getopt_data *d) -{ - return _getopt_internal_r (argc, argv, options, long_options, opt_index, - 0, d, 0); -} - -/* Like getopt_long, but '-' as well as '--' can indicate a long option. - If an option that starts with '-' (not '--') doesn't match a long option, - but does match a short option, it is parsed as a short option - instead. */ - -int -getopt_long_only (int argc, char *__getopt_argv_const *argv, - const char *options, - const struct option *long_options, int *opt_index) -{ - return _getopt_internal (argc, (char **) argv, options, long_options, - opt_index, 1, 0); -} - -int -_getopt_long_only_r (int argc, char **argv, const char *options, - const struct option *long_options, int *opt_index, - struct _getopt_data *d) -{ - return _getopt_internal_r (argc, argv, options, long_options, opt_index, - 1, d, 0); -} - - -#ifdef TEST - -#include - -int -main (int argc, char **argv) -{ - int c; - int digit_optind = 0; - - while (1) - { - int this_option_optind = optind ? optind : 1; - int option_index = 0; - static const struct option long_options[] = - { - {"add", 1, 0, 0}, - {"append", 0, 0, 0}, - {"delete", 1, 0, 0}, - {"verbose", 0, 0, 0}, - {"create", 0, 0, 0}, - {"file", 1, 0, 0}, - {0, 0, 0, 0} - }; - - c = getopt_long (argc, argv, "abc:d:0123456789", - long_options, &option_index); - if (c == -1) - break; - - switch (c) - { - case 0: - printf ("option %s", long_options[option_index].name); - if (optarg) - printf (" with arg %s", optarg); - printf ("\n"); - break; - - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - if (digit_optind != 0 && digit_optind != this_option_optind) - printf ("digits occur in two different argv-elements.\n"); - digit_optind = this_option_optind; - printf ("option %c\n", c); - break; - - case 'a': - printf ("option a\n"); - break; - - case 'b': - printf ("option b\n"); - break; - - case 'c': - printf ("option c with value '%s'\n", optarg); - break; - - case 'd': - printf ("option d with value '%s'\n", optarg); - break; - - case '?': - break; - - default: - printf ("?? getopt returned character code 0%o ??\n", c); - } - } - - if (optind < argc) - { - printf ("non-option ARGV-elements: "); - while (optind < argc) - printf ("%s ", argv[optind++]); - printf ("\n"); - } - - exit (0); -} - -#endif /* TEST */ diff --git a/gl/getopt_int.h b/gl/getopt_int.h deleted file mode 100644 index a7ce0e9..0000000 --- a/gl/getopt_int.h +++ /dev/null @@ -1,135 +0,0 @@ -/* Internal declarations for getopt. - Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2004, 2009-2017 Free Software - Foundation, Inc. - This file is part of the GNU C Library. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#ifndef _GETOPT_INT_H -#define _GETOPT_INT_H 1 - -#include - -extern int _getopt_internal (int ___argc, char **___argv, - const char *__shortopts, - const struct option *__longopts, int *__longind, - int __long_only, int __posixly_correct); - - -/* Reentrant versions which can handle parsing multiple argument - vectors at the same time. */ - -/* Describe how to deal with options that follow non-option ARGV-elements. - - If the caller did not specify anything, - the default is REQUIRE_ORDER if the environment variable - POSIXLY_CORRECT is defined, PERMUTE otherwise. - - REQUIRE_ORDER means don't recognize them as options; - stop option processing when the first non-option is seen. - This is what Unix does. - This mode of operation is selected by either setting the environment - variable POSIXLY_CORRECT, or using '+' as the first character - of the list of option characters, or by calling getopt. - - PERMUTE is the default. We permute the contents of ARGV as we - scan, so that eventually all the non-options are at the end. - This allows options to be given in any order, even with programs - that were not written to expect this. - - RETURN_IN_ORDER is an option available to programs that were - written to expect options and other ARGV-elements in any order - and that care about the ordering of the two. We describe each - non-option ARGV-element as if it were the argument of an option - with character code 1. Using '-' as the first character of the - list of option characters selects this mode of operation. - - The special argument '--' forces an end of option-scanning regardless - of the value of 'ordering'. In the case of RETURN_IN_ORDER, only - '--' can cause 'getopt' to return -1 with 'optind' != ARGC. */ - -enum __ord - { - REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER - }; - -/* Data type for reentrant functions. */ -struct _getopt_data -{ - /* These have exactly the same meaning as the corresponding global - variables, except that they are used for the reentrant - versions of getopt. */ - int optind; - int opterr; - int optopt; - char *optarg; - - /* Internal members. */ - - /* True if the internal members have been initialized. */ - int __initialized; - - /* The next char to be scanned in the option-element - in which the last option character we returned was found. - This allows us to pick up the scan where we left off. - - If this is zero, or a null string, it means resume the scan - by advancing to the next ARGV-element. */ - char *__nextchar; - - /* See __ord above. */ - enum __ord __ordering; - - /* If the POSIXLY_CORRECT environment variable is set - or getopt was called. */ - int __posixly_correct; - - - /* Handle permutation of arguments. */ - - /* Describe the part of ARGV that contains non-options that have - been skipped. 'first_nonopt' is the index in ARGV of the first - of them; 'last_nonopt' is the index after the last of them. */ - - int __first_nonopt; - int __last_nonopt; - -#if defined _LIBC && defined USE_NONOPTION_FLAGS - int __nonoption_flags_max_len; - int __nonoption_flags_len; -#endif -}; - -/* The initializer is necessary to set OPTIND and OPTERR to their - default values and to clear the initialization flag. */ -#define _GETOPT_DATA_INITIALIZER { 1, 1 } - -extern int _getopt_internal_r (int ___argc, char **___argv, - const char *__shortopts, - const struct option *__longopts, int *__longind, - int __long_only, struct _getopt_data *__data, - int __posixly_correct); - -extern int _getopt_long_r (int ___argc, char **___argv, - const char *__shortopts, - const struct option *__longopts, int *__longind, - struct _getopt_data *__data); - -extern int _getopt_long_only_r (int ___argc, char **___argv, - const char *__shortopts, - const struct option *__longopts, - int *__longind, - struct _getopt_data *__data); - -#endif /* getopt_int.h */ diff --git a/gl/gettext.h b/gl/gettext.h deleted file mode 100644 index 0465d7a..0000000 --- a/gl/gettext.h +++ /dev/null @@ -1,292 +0,0 @@ -/* Convenience header for conditional use of GNU . - Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2017 Free Software - Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, see . */ - -#ifndef _LIBGETTEXT_H -#define _LIBGETTEXT_H 1 - -/* NLS can be disabled through the configure --disable-nls option. */ -#if ENABLE_NLS - -/* Get declarations of GNU message catalog functions. */ -# include - -/* You can set the DEFAULT_TEXT_DOMAIN macro to specify the domain used by - the gettext() and ngettext() macros. This is an alternative to calling - textdomain(), and is useful for libraries. */ -# ifdef DEFAULT_TEXT_DOMAIN -# undef gettext -# define gettext(Msgid) \ - dgettext (DEFAULT_TEXT_DOMAIN, Msgid) -# undef ngettext -# define ngettext(Msgid1, Msgid2, N) \ - dngettext (DEFAULT_TEXT_DOMAIN, Msgid1, Msgid2, N) -# endif - -#else - -/* Solaris /usr/include/locale.h includes /usr/include/libintl.h, which - chokes if dcgettext is defined as a macro. So include it now, to make - later inclusions of a NOP. We don't include - as well because people using "gettext.h" will not include , - and also including would fail on SunOS 4, whereas - is OK. */ -#if defined(__sun) -# include -#endif - -/* Many header files from the libstdc++ coming with g++ 3.3 or newer include - , which chokes if dcgettext is defined as a macro. So include - it now, to make later inclusions of a NOP. */ -#if defined(__cplusplus) && defined(__GNUG__) && (__GNUC__ >= 3) -# include -# if (__GLIBC__ >= 2 && !defined __UCLIBC__) || _GLIBCXX_HAVE_LIBINTL_H -# include -# endif -#endif - -/* Disabled NLS. - The casts to 'const char *' serve the purpose of producing warnings - for invalid uses of the value returned from these functions. - On pre-ANSI systems without 'const', the config.h file is supposed to - contain "#define const". */ -# undef gettext -# define gettext(Msgid) ((const char *) (Msgid)) -# undef dgettext -# define dgettext(Domainname, Msgid) ((void) (Domainname), gettext (Msgid)) -# undef dcgettext -# define dcgettext(Domainname, Msgid, Category) \ - ((void) (Category), dgettext (Domainname, Msgid)) -# undef ngettext -# define ngettext(Msgid1, Msgid2, N) \ - ((N) == 1 \ - ? ((void) (Msgid2), (const char *) (Msgid1)) \ - : ((void) (Msgid1), (const char *) (Msgid2))) -# undef dngettext -# define dngettext(Domainname, Msgid1, Msgid2, N) \ - ((void) (Domainname), ngettext (Msgid1, Msgid2, N)) -# undef dcngettext -# define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \ - ((void) (Category), dngettext (Domainname, Msgid1, Msgid2, N)) -# undef textdomain -# define textdomain(Domainname) ((const char *) (Domainname)) -# undef bindtextdomain -# define bindtextdomain(Domainname, Dirname) \ - ((void) (Domainname), (const char *) (Dirname)) -# undef bind_textdomain_codeset -# define bind_textdomain_codeset(Domainname, Codeset) \ - ((void) (Domainname), (const char *) (Codeset)) - -#endif - -/* Prefer gnulib's setlocale override over libintl's setlocale override. */ -#ifdef GNULIB_defined_setlocale -# undef setlocale -# define setlocale rpl_setlocale -#endif - -/* A pseudo function call that serves as a marker for the automated - extraction of messages, but does not call gettext(). The run-time - translation is done at a different place in the code. - The argument, String, should be a literal string. Concatenated strings - and other string expressions won't work. - The macro's expansion is not parenthesized, so that it is suitable as - initializer for static 'char[]' or 'const char[]' variables. */ -#define gettext_noop(String) String - -/* The separator between msgctxt and msgid in a .mo file. */ -#define GETTEXT_CONTEXT_GLUE "\004" - -/* Pseudo function calls, taking a MSGCTXT and a MSGID instead of just a - MSGID. MSGCTXT and MSGID must be string literals. MSGCTXT should be - short and rarely need to change. - The letter 'p' stands for 'particular' or 'special'. */ -#ifdef DEFAULT_TEXT_DOMAIN -# define pgettext(Msgctxt, Msgid) \ - pgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES) -#else -# define pgettext(Msgctxt, Msgid) \ - pgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES) -#endif -#define dpgettext(Domainname, Msgctxt, Msgid) \ - pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES) -#define dcpgettext(Domainname, Msgctxt, Msgid, Category) \ - pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, Category) -#ifdef DEFAULT_TEXT_DOMAIN -# define npgettext(Msgctxt, Msgid, MsgidPlural, N) \ - npgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES) -#else -# define npgettext(Msgctxt, Msgid, MsgidPlural, N) \ - npgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES) -#endif -#define dnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N) \ - npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES) -#define dcnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N, Category) \ - npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, Category) - -#ifdef __GNUC__ -__inline -#else -#ifdef __cplusplus -inline -#endif -#endif -static const char * -pgettext_aux (const char *domain, - const char *msg_ctxt_id, const char *msgid, - int category) -{ - const char *translation = dcgettext (domain, msg_ctxt_id, category); - if (translation == msg_ctxt_id) - return msgid; - else - return translation; -} - -#ifdef __GNUC__ -__inline -#else -#ifdef __cplusplus -inline -#endif -#endif -static const char * -npgettext_aux (const char *domain, - const char *msg_ctxt_id, const char *msgid, - const char *msgid_plural, unsigned long int n, - int category) -{ - const char *translation = - dcngettext (domain, msg_ctxt_id, msgid_plural, n, category); - if (translation == msg_ctxt_id || translation == msgid_plural) - return (n == 1 ? msgid : msgid_plural); - else - return translation; -} - -/* The same thing extended for non-constant arguments. Here MSGCTXT and MSGID - can be arbitrary expressions. But for string literals these macros are - less efficient than those above. */ - -#include - -#if (((__GNUC__ >= 3 || __GNUG__ >= 2) && !defined __STRICT_ANSI__) \ - /* || __STDC_VERSION__ >= 199901L */ ) -# define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS 1 -#else -# define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS 0 -#endif - -#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS -#include -#endif - -#define pgettext_expr(Msgctxt, Msgid) \ - dcpgettext_expr (NULL, Msgctxt, Msgid, LC_MESSAGES) -#define dpgettext_expr(Domainname, Msgctxt, Msgid) \ - dcpgettext_expr (Domainname, Msgctxt, Msgid, LC_MESSAGES) - -#ifdef __GNUC__ -__inline -#else -#ifdef __cplusplus -inline -#endif -#endif -static const char * -dcpgettext_expr (const char *domain, - const char *msgctxt, const char *msgid, - int category) -{ - size_t msgctxt_len = strlen (msgctxt) + 1; - size_t msgid_len = strlen (msgid) + 1; - const char *translation; -#if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS - char msg_ctxt_id[msgctxt_len + msgid_len]; -#else - char buf[1024]; - char *msg_ctxt_id = - (msgctxt_len + msgid_len <= sizeof (buf) - ? buf - : (char *) malloc (msgctxt_len + msgid_len)); - if (msg_ctxt_id != NULL) -#endif - { - int found_translation; - memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1); - msg_ctxt_id[msgctxt_len - 1] = '\004'; - memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len); - translation = dcgettext (domain, msg_ctxt_id, category); - found_translation = (translation != msg_ctxt_id); -#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS - if (msg_ctxt_id != buf) - free (msg_ctxt_id); -#endif - if (found_translation) - return translation; - } - return msgid; -} - -#define npgettext_expr(Msgctxt, Msgid, MsgidPlural, N) \ - dcnpgettext_expr (NULL, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES) -#define dnpgettext_expr(Domainname, Msgctxt, Msgid, MsgidPlural, N) \ - dcnpgettext_expr (Domainname, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES) - -#ifdef __GNUC__ -__inline -#else -#ifdef __cplusplus -inline -#endif -#endif -static const char * -dcnpgettext_expr (const char *domain, - const char *msgctxt, const char *msgid, - const char *msgid_plural, unsigned long int n, - int category) -{ - size_t msgctxt_len = strlen (msgctxt) + 1; - size_t msgid_len = strlen (msgid) + 1; - const char *translation; -#if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS - char msg_ctxt_id[msgctxt_len + msgid_len]; -#else - char buf[1024]; - char *msg_ctxt_id = - (msgctxt_len + msgid_len <= sizeof (buf) - ? buf - : (char *) malloc (msgctxt_len + msgid_len)); - if (msg_ctxt_id != NULL) -#endif - { - int found_translation; - memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1); - msg_ctxt_id[msgctxt_len - 1] = '\004'; - memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len); - translation = dcngettext (domain, msg_ctxt_id, msgid_plural, n, category); - found_translation = !(translation == msg_ctxt_id || translation == msgid_plural); -#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS - if (msg_ctxt_id != buf) - free (msg_ctxt_id); -#endif - if (found_translation) - return translation; - } - return (n == 1 ? msgid : msgid_plural); -} - -#endif /* _LIBGETTEXT_H */ diff --git a/gl/gettime.c b/gl/gettime.c deleted file mode 100644 index 4ae313e..0000000 --- a/gl/gettime.c +++ /dev/null @@ -1,48 +0,0 @@ -/* gettime -- get the system clock - - Copyright (C) 2002, 2004-2007, 2009-2017 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Paul Eggert. */ - -#include - -#include "timespec.h" - -#include - -/* Get the system time into *TS. */ - -void -gettime (struct timespec *ts) -{ -#if HAVE_NANOTIME - nanotime (ts); -#else - -# if defined CLOCK_REALTIME && HAVE_CLOCK_GETTIME - if (clock_gettime (CLOCK_REALTIME, ts) == 0) - return; -# endif - - { - struct timeval tv; - gettimeofday (&tv, NULL); - ts->tv_sec = tv.tv_sec; - ts->tv_nsec = tv.tv_usec * 1000; - } - -#endif -} diff --git a/gl/gettimeofday.c b/gl/gettimeofday.c deleted file mode 100644 index 18dcbda..0000000 --- a/gl/gettimeofday.c +++ /dev/null @@ -1,154 +0,0 @@ -/* Provide gettimeofday for systems that don't have it or for which it's broken. - - Copyright (C) 2001-2003, 2005-2007, 2009-2017 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ - -/* written by Jim Meyering */ - -#include - -/* Specification. */ -#include - -#include - -#if HAVE_SYS_TIMEB_H -# include -#endif - -#if GETTIMEOFDAY_CLOBBERS_LOCALTIME || TZSET_CLOBBERS_LOCALTIME - -/* Work around the bug in some systems whereby gettimeofday clobbers - the static buffer that localtime uses for its return value. The - gettimeofday function from Mac OS X 10.0.4 (i.e., Darwin 1.3.7) has - this problem. The tzset replacement is necessary for at least - Solaris 2.5, 2.5.1, and 2.6. */ - -static struct tm tm_zero_buffer; -static struct tm *localtime_buffer_addr = &tm_zero_buffer; - -# undef localtime -extern struct tm *localtime (time_t const *); - -# undef gmtime -extern struct tm *gmtime (time_t const *); - -/* This is a wrapper for localtime. It is used only on systems for which - gettimeofday clobbers the static buffer used for localtime's result. - - On the first call, record the address of the static buffer that - localtime uses for its result. */ - -struct tm * -rpl_localtime (time_t const *timep) -{ - struct tm *tm = localtime (timep); - - if (localtime_buffer_addr == &tm_zero_buffer) - localtime_buffer_addr = tm; - - return tm; -} - -/* Same as above, since gmtime and localtime use the same buffer. */ -struct tm * -rpl_gmtime (time_t const *timep) -{ - struct tm *tm = gmtime (timep); - - if (localtime_buffer_addr == &tm_zero_buffer) - localtime_buffer_addr = tm; - - return tm; -} - -#endif /* GETTIMEOFDAY_CLOBBERS_LOCALTIME || TZSET_CLOBBERS_LOCALTIME */ - -#if TZSET_CLOBBERS_LOCALTIME - -# undef tzset -extern void tzset (void); - -/* This is a wrapper for tzset, for systems on which tzset may clobber - the static buffer used for localtime's result. */ -void -rpl_tzset (void) -{ - /* Save and restore the contents of the buffer used for localtime's - result around the call to tzset. */ - struct tm save = *localtime_buffer_addr; - tzset (); - *localtime_buffer_addr = save; -} -#endif - -/* This is a wrapper for gettimeofday. It is used only on systems - that lack this function, or whose implementation of this function - causes problems. */ - -int -gettimeofday (struct timeval *restrict tv, void *restrict tz) -{ -#undef gettimeofday -#if HAVE_GETTIMEOFDAY -# if GETTIMEOFDAY_CLOBBERS_LOCALTIME - /* Save and restore the contents of the buffer used for localtime's - result around the call to gettimeofday. */ - struct tm save = *localtime_buffer_addr; -# endif - -# if defined timeval /* 'struct timeval' overridden by gnulib? */ -# undef timeval - struct timeval otv; - int result = gettimeofday (&otv, (struct timezone *) tz); - if (result == 0) - { - tv->tv_sec = otv.tv_sec; - tv->tv_usec = otv.tv_usec; - } -# else - int result = gettimeofday (tv, (struct timezone *) tz); -# endif - -# if GETTIMEOFDAY_CLOBBERS_LOCALTIME - *localtime_buffer_addr = save; -# endif - - return result; - -#else - -# if HAVE__FTIME - - struct _timeb timebuf; - _ftime (&timebuf); - tv->tv_sec = timebuf.time; - tv->tv_usec = timebuf.millitm * 1000; - -# else - -# if !defined OK_TO_USE_1S_CLOCK -# error "Only 1-second nominal clock resolution found. Is that intended?" \ - "If so, compile with the -DOK_TO_USE_1S_CLOCK option." -# endif - tv->tv_sec = time (NULL); - tv->tv_usec = 0; - -# endif - - return 0; - -#endif -} diff --git a/gl/limits.in.h b/gl/limits.in.h deleted file mode 100644 index a7e307f..0000000 --- a/gl/limits.in.h +++ /dev/null @@ -1,63 +0,0 @@ -/* A GNU-like . - - Copyright 2016-2017 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version 3, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ - -#ifndef _@GUARD_PREFIX@_LIMITS_H - -#if __GNUC__ >= 3 -@PRAGMA_SYSTEM_HEADER@ -#endif -@PRAGMA_COLUMNS@ - -/* The include_next requires a split double-inclusion guard. */ -#@INCLUDE_NEXT@ @NEXT_LIMITS_H@ - -#ifndef _@GUARD_PREFIX@_LIMITS_H -#define _@GUARD_PREFIX@_LIMITS_H - -/* The number of usable bits in an unsigned or signed integer type - with minimum value MIN and maximum value MAX, as an int expression - suitable in #if. Cover all known practical hosts. This - implementation exploits the fact that MAX is 1 less than a power of - 2, and merely counts the number of 1 bits in MAX; "COBn" means - "count the number of 1 bits in the low-order n bits"). */ -#define _GL_INTEGER_WIDTH(min, max) (((min) < 0) + _GL_COB128 (max)) -#define _GL_COB128(n) (_GL_COB64 ((n) >> 31 >> 31 >> 2) + _GL_COB64 (n)) -#define _GL_COB64(n) (_GL_COB32 ((n) >> 31 >> 1) + _GL_COB32 (n)) -#define _GL_COB32(n) (_GL_COB16 ((n) >> 16) + _GL_COB16 (n)) -#define _GL_COB16(n) (_GL_COB8 ((n) >> 8) + _GL_COB8 (n)) -#define _GL_COB8(n) (_GL_COB4 ((n) >> 4) + _GL_COB4 (n)) -#define _GL_COB4(n) (!!((n) & 8) + !!((n) & 4) + !!((n) & 2) + !!((n) & 1)) - -/* Macros specified by ISO/IEC TS 18661-1:2014. */ - -#if (! defined ULLONG_WIDTH \ - && (defined _GNU_SOURCE || defined __STDC_WANT_IEC_60559_BFP_EXT__)) -# define CHAR_WIDTH _GL_INTEGER_WIDTH (CHAR_MIN, CHAR_MAX) -# define SCHAR_WIDTH _GL_INTEGER_WIDTH (SCHAR_MIN, SCHAR_MAX) -# define UCHAR_WIDTH _GL_INTEGER_WIDTH (0, UCHAR_MAX) -# define SHRT_WIDTH _GL_INTEGER_WIDTH (SHRT_MIN, SHRT_MAX) -# define USHRT_WIDTH _GL_INTEGER_WIDTH (0, USHRT_MAX) -# define INT_WIDTH _GL_INTEGER_WIDTH (INT_MIN, INT_MAX) -# define UINT_WIDTH _GL_INTEGER_WIDTH (0, UINT_MAX) -# define LONG_WIDTH _GL_INTEGER_WIDTH (LONG_MIN, LONG_MAX) -# define ULONG_WIDTH _GL_INTEGER_WIDTH (0, ULONG_MAX) -# define LLONG_WIDTH _GL_INTEGER_WIDTH (LLONG_MIN, LLONG_MAX) -# define ULLONG_WIDTH _GL_INTEGER_WIDTH (0, ULLONG_MAX) -#endif /* !ULLONG_WIDTH && (_GNU_SOURCE || __STDC_WANT_IEC_60559_BFP_EXT__) */ - -#endif /* _@GUARD_PREFIX@_LIMITS_H */ -#endif /* _@GUARD_PREFIX@_LIMITS_H */ diff --git a/gl/lseek.c b/gl/lseek.c deleted file mode 100644 index 3b2fdf2..0000000 --- a/gl/lseek.c +++ /dev/null @@ -1,67 +0,0 @@ -/* An lseek() function that detects pipes. - Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, see . */ - -#include - -/* Specification. */ -#include - -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -/* Windows platforms. */ -/* Get GetFileType. */ -# include -/* Get _get_osfhandle. */ -# include "msvc-nothrow.h" -#else -# include -#endif -#include - -#undef lseek - -off_t -rpl_lseek (int fd, off_t offset, int whence) -{ -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - /* mingw lseek mistakenly succeeds on pipes, sockets, and terminals. */ - HANDLE h = (HANDLE) _get_osfhandle (fd); - if (h == INVALID_HANDLE_VALUE) - { - errno = EBADF; - return -1; - } - if (GetFileType (h) != FILE_TYPE_DISK) - { - errno = ESPIPE; - return -1; - } -#else - /* BeOS lseek mistakenly succeeds on pipes... */ - struct stat statbuf; - if (fstat (fd, &statbuf) < 0) - return -1; - if (!S_ISREG (statbuf.st_mode)) - { - errno = ESPIPE; - return -1; - } -#endif -#if _GL_WINDOWS_64_BIT_OFF_T - return _lseeki64 (fd, offset, whence); -#else - return lseek (fd, offset, whence); -#endif -} diff --git a/gl/m4/00gnulib.m4 b/gl/m4/00gnulib.m4 deleted file mode 100644 index bb3512f..0000000 --- a/gl/m4/00gnulib.m4 +++ /dev/null @@ -1,46 +0,0 @@ -# 00gnulib.m4 serial 3 -dnl Copyright (C) 2009-2017 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl This file must be named something that sorts before all other -dnl gnulib-provided .m4 files. It is needed until such time as we can -dnl assume Autoconf 2.64, with its improved AC_DEFUN_ONCE and -dnl m4_divert semantics. - -# Until autoconf 2.63, handling of the diversion stack required m4_init -# to be called first; but this does not happen with aclocal. Wrapping -# the entire execution in another layer of the diversion stack fixes this. -# Worse, prior to autoconf 2.62, m4_wrap depended on the underlying m4 -# for whether it was FIFO or LIFO; in order to properly balance with -# m4_init, we need to undo our push just before anything wrapped within -# the m4_init body. The way to ensure this is to wrap both sides of -# m4_init with a one-shot macro that does the pop at the right time. -m4_ifndef([_m4_divert_diversion], -[m4_divert_push([KILL]) -m4_define([gl_divert_fixup], [m4_divert_pop()m4_define([$0])]) -m4_define([m4_init], - [gl_divert_fixup()]m4_defn([m4_init])[gl_divert_fixup()])]) - - -# AC_DEFUN_ONCE([NAME], VALUE) -# ---------------------------- -# Define NAME to expand to VALUE on the first use (whether by direct -# expansion, or by AC_REQUIRE), and to nothing on all subsequent uses. -# Avoid bugs in AC_REQUIRE in Autoconf 2.63 and earlier. This -# definition is slower than the version in Autoconf 2.64, because it -# can only use interfaces that existed since 2.59; but it achieves the -# same effect. Quoting is necessary to avoid confusing Automake. -m4_version_prereq([2.63.263], [], -[m4_define([AC][_DEFUN_ONCE], - [AC][_DEFUN([$1], - [AC_REQUIRE([_gl_DEFUN_ONCE([$1])], - [m4_indir([_gl_DEFUN_ONCE([$1])])])])]dnl -[AC][_DEFUN([_gl_DEFUN_ONCE([$1])], [$2])])]) - -# gl_00GNULIB -# ----------- -# Witness macro that this file has been included. Needed to force -# Automake to include this file prior to all other gnulib .m4 files. -AC_DEFUN([gl_00GNULIB]) diff --git a/gl/m4/absolute-header.m4 b/gl/m4/absolute-header.m4 deleted file mode 100644 index c73adc8..0000000 --- a/gl/m4/absolute-header.m4 +++ /dev/null @@ -1,102 +0,0 @@ -# absolute-header.m4 serial 16 -dnl Copyright (C) 2006-2017 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Derek Price. - -# gl_ABSOLUTE_HEADER(HEADER1 HEADER2 ...) -# --------------------------------------- -# Find the absolute name of a header file, testing first if the header exists. -# If the header were sys/inttypes.h, this macro would define -# ABSOLUTE_SYS_INTTYPES_H to the '""' quoted absolute name of sys/inttypes.h -# in config.h -# (e.g. '#define ABSOLUTE_SYS_INTTYPES_H "///usr/include/sys/inttypes.h"'). -# The three "///" are to pacify Sun C 5.8, which otherwise would say -# "warning: #include of /usr/include/... may be non-portable". -# Use '""', not '<>', so that the /// cannot be confused with a C99 comment. -# Note: This macro assumes that the header file is not empty after -# preprocessing, i.e. it does not only define preprocessor macros but also -# provides some type/enum definitions or function/variable declarations. -AC_DEFUN([gl_ABSOLUTE_HEADER], -[AC_REQUIRE([AC_CANONICAL_HOST]) -AC_LANG_PREPROC_REQUIRE()dnl -dnl FIXME: gl_absolute_header and ac_header_exists must be used unquoted -dnl until we can assume autoconf 2.64 or newer. -m4_foreach_w([gl_HEADER_NAME], [$1], - [AS_VAR_PUSHDEF([gl_absolute_header], - [gl_cv_absolute_]m4_defn([gl_HEADER_NAME]))dnl - AC_CACHE_CHECK([absolute name of <]m4_defn([gl_HEADER_NAME])[>], - m4_defn([gl_absolute_header]), - [AS_VAR_PUSHDEF([ac_header_exists], - [ac_cv_header_]m4_defn([gl_HEADER_NAME]))dnl - AC_CHECK_HEADERS_ONCE(m4_defn([gl_HEADER_NAME]))dnl - if test AS_VAR_GET(ac_header_exists) = yes; then - gl_ABSOLUTE_HEADER_ONE(m4_defn([gl_HEADER_NAME])) - fi - AS_VAR_POPDEF([ac_header_exists])dnl - ])dnl - AC_DEFINE_UNQUOTED(AS_TR_CPP([ABSOLUTE_]m4_defn([gl_HEADER_NAME])), - ["AS_VAR_GET(gl_absolute_header)"], - [Define this to an absolute name of <]m4_defn([gl_HEADER_NAME])[>.]) - AS_VAR_POPDEF([gl_absolute_header])dnl -])dnl -])# gl_ABSOLUTE_HEADER - -# gl_ABSOLUTE_HEADER_ONE(HEADER) -# ------------------------------ -# Like gl_ABSOLUTE_HEADER, except that: -# - it assumes that the header exists, -# - it uses the current CPPFLAGS, -# - it does not cache the result, -# - it is silent. -AC_DEFUN([gl_ABSOLUTE_HEADER_ONE], -[ - AC_REQUIRE([AC_CANONICAL_HOST]) - AC_LANG_CONFTEST([AC_LANG_SOURCE([[#include <]]m4_dquote([$1])[[>]])]) - dnl AIX "xlc -E" and "cc -E" omit #line directives for header files - dnl that contain only a #include of other header files and no - dnl non-comment tokens of their own. This leads to a failure to - dnl detect the absolute name of , , - dnl and others. The workaround is to force preservation of comments - dnl through option -C. This ensures all necessary #line directives - dnl are present. GCC supports option -C as well. - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac -changequote(,) - case "$host_os" in - mingw*) - dnl For the sake of native Windows compilers (excluding gcc), - dnl treat backslash as a directory separator, like /. - dnl Actually, these compilers use a double-backslash as - dnl directory separator, inside the - dnl # line "filename" - dnl directives. - gl_dirsep_regex='[/\\]' - ;; - *) - gl_dirsep_regex='\/' - ;; - esac - dnl A sed expression that turns a string into a basic regular - dnl expression, for use within "/.../". - gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' - gl_header_literal_regex=`echo '$1' \ - | sed -e "$gl_make_literal_regex_sed"` - gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ - s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ - s|^/[^/]|//&| - p - q - }' -changequote([,]) - dnl eval is necessary to expand gl_absname_cpp. - dnl Ultrix and Pyramid sh refuse to redirect output of eval, - dnl so use subshell. - AS_VAR_SET([gl_cv_absolute_]AS_TR_SH([[$1]]), -[`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD | - sed -n "$gl_absolute_header_sed"`]) -]) diff --git a/gl/m4/autobuild.m4 b/gl/m4/autobuild.m4 deleted file mode 100644 index f5f2a18..0000000 --- a/gl/m4/autobuild.m4 +++ /dev/null @@ -1,39 +0,0 @@ -# autobuild.m4 serial 7 -dnl Copyright (C) 2004, 2006-2017 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Simon Josefsson - -# Usage: AB_INIT([MODE]). -AC_DEFUN([AB_INIT], -[ - AC_REQUIRE([AC_CANONICAL_BUILD]) - AC_REQUIRE([AC_CANONICAL_HOST]) - - if test -z "$AB_PACKAGE"; then - AB_PACKAGE=${PACKAGE_NAME:-$PACKAGE} - fi - AC_MSG_NOTICE([autobuild project... $AB_PACKAGE]) - - if test -z "$AB_VERSION"; then - AB_VERSION=${PACKAGE_VERSION:-$VERSION} - fi - AC_MSG_NOTICE([autobuild revision... $AB_VERSION]) - - hostname=`hostname` - if test "$hostname"; then - AC_MSG_NOTICE([autobuild hostname... $hostname]) - fi - - ifelse([$1],[],,[AC_MSG_NOTICE([autobuild mode... $1])]) - - date=`TZ=UTC0 date +%Y%m%dT%H%M%SZ` - if test "$?" != 0; then - date=`date` - fi - if test "$date"; then - AC_MSG_NOTICE([autobuild timestamp... $date]) - fi -]) diff --git a/gl/m4/clock_time.m4 b/gl/m4/clock_time.m4 deleted file mode 100644 index 21b6f25..0000000 --- a/gl/m4/clock_time.m4 +++ /dev/null @@ -1,31 +0,0 @@ -# clock_time.m4 serial 10 -dnl Copyright (C) 2002-2006, 2009-2017 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -# Check for clock_gettime and clock_settime, and set LIB_CLOCK_GETTIME. -# For a program named, say foo, you should add a line like the following -# in the corresponding Makefile.am file: -# foo_LDADD = $(LDADD) $(LIB_CLOCK_GETTIME) - -AC_DEFUN([gl_CLOCK_TIME], -[ - dnl Persuade glibc and Solaris to declare these functions. - AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) - - # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function. - # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4. - - # Save and restore LIBS so e.g., -lrt, isn't added to it. Otherwise, *all* - # programs in the package would end up linked with that potentially-shared - # library, inducing unnecessary run-time overhead. - LIB_CLOCK_GETTIME= - AC_SUBST([LIB_CLOCK_GETTIME]) - gl_saved_libs=$LIBS - AC_SEARCH_LIBS([clock_gettime], [rt posix4], - [test "$ac_cv_search_clock_gettime" = "none required" || - LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime]) - AC_CHECK_FUNCS([clock_gettime clock_settime]) - LIBS=$gl_saved_libs -]) diff --git a/gl/m4/errno_h.m4 b/gl/m4/errno_h.m4 deleted file mode 100644 index 9f0f2f2..0000000 --- a/gl/m4/errno_h.m4 +++ /dev/null @@ -1,137 +0,0 @@ -# errno_h.m4 serial 12 -dnl Copyright (C) 2004, 2006, 2008-2017 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN_ONCE([gl_HEADER_ERRNO_H], -[ - AC_REQUIRE([AC_PROG_CC]) - AC_CACHE_CHECK([for complete errno.h], [gl_cv_header_errno_h_complete], [ - AC_EGREP_CPP([booboo],[ -#include -#if !defined ETXTBSY -booboo -#endif -#if !defined ENOMSG -booboo -#endif -#if !defined EIDRM -booboo -#endif -#if !defined ENOLINK -booboo -#endif -#if !defined EPROTO -booboo -#endif -#if !defined EMULTIHOP -booboo -#endif -#if !defined EBADMSG -booboo -#endif -#if !defined EOVERFLOW -booboo -#endif -#if !defined ENOTSUP -booboo -#endif -#if !defined ENETRESET -booboo -#endif -#if !defined ECONNABORTED -booboo -#endif -#if !defined ESTALE -booboo -#endif -#if !defined EDQUOT -booboo -#endif -#if !defined ECANCELED -booboo -#endif -#if !defined EOWNERDEAD -booboo -#endif -#if !defined ENOTRECOVERABLE -booboo -#endif -#if !defined EILSEQ -booboo -#endif - ], - [gl_cv_header_errno_h_complete=no], - [gl_cv_header_errno_h_complete=yes]) - ]) - if test $gl_cv_header_errno_h_complete = yes; then - ERRNO_H='' - else - gl_NEXT_HEADERS([errno.h]) - ERRNO_H='errno.h' - fi - AC_SUBST([ERRNO_H]) - AM_CONDITIONAL([GL_GENERATE_ERRNO_H], [test -n "$ERRNO_H"]) - gl_REPLACE_ERRNO_VALUE([EMULTIHOP]) - gl_REPLACE_ERRNO_VALUE([ENOLINK]) - gl_REPLACE_ERRNO_VALUE([EOVERFLOW]) -]) - -# Assuming $1 = EOVERFLOW. -# The EOVERFLOW errno value ought to be defined in , according to -# POSIX. But some systems (like OpenBSD 4.0 or AIX 3) don't define it, and -# some systems (like OSF/1) define it when _XOPEN_SOURCE_EXTENDED is defined. -# Check for the value of EOVERFLOW. -# Set the variables EOVERFLOW_HIDDEN and EOVERFLOW_VALUE. -AC_DEFUN([gl_REPLACE_ERRNO_VALUE], -[ - if test -n "$ERRNO_H"; then - AC_CACHE_CHECK([for ]$1[ value], [gl_cv_header_errno_h_]$1, [ - AC_EGREP_CPP([yes],[ -#include -#ifdef ]$1[ -yes -#endif - ], - [gl_cv_header_errno_h_]$1[=yes], - [gl_cv_header_errno_h_]$1[=no]) - if test $gl_cv_header_errno_h_]$1[ = no; then - AC_EGREP_CPP([yes],[ -#define _XOPEN_SOURCE_EXTENDED 1 -#include -#ifdef ]$1[ -yes -#endif - ], [gl_cv_header_errno_h_]$1[=hidden]) - if test $gl_cv_header_errno_h_]$1[ = hidden; then - dnl The macro exists but is hidden. - dnl Define it to the same value. - AC_COMPUTE_INT([gl_cv_header_errno_h_]$1, $1, [ -#define _XOPEN_SOURCE_EXTENDED 1 -#include -/* The following two lines are a workaround against an autoconf-2.52 bug. */ -#include -#include -]) - fi - fi - ]) - case $gl_cv_header_errno_h_]$1[ in - yes | no) - ]$1[_HIDDEN=0; ]$1[_VALUE= - ;; - *) - ]$1[_HIDDEN=1; ]$1[_VALUE="$gl_cv_header_errno_h_]$1[" - ;; - esac - AC_SUBST($1[_HIDDEN]) - AC_SUBST($1[_VALUE]) - fi -]) - -dnl Autoconf >= 2.61 has AC_COMPUTE_INT built-in. -dnl Remove this when we can assume autoconf >= 2.61. -m4_ifdef([AC_COMPUTE_INT], [], [ - AC_DEFUN([AC_COMPUTE_INT], [_AC_COMPUTE_INT([$2],[$1],[$3],[$4])]) -]) diff --git a/gl/m4/extensions.m4 b/gl/m4/extensions.m4 deleted file mode 100644 index c60f537..0000000 --- a/gl/m4/extensions.m4 +++ /dev/null @@ -1,173 +0,0 @@ -# serial 15 -*- Autoconf -*- -# Enable extensions on systems that normally disable them. - -# Copyright (C) 2003, 2006-2017 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This definition of AC_USE_SYSTEM_EXTENSIONS is stolen from git -# Autoconf. Perhaps we can remove this once we can assume Autoconf -# 2.70 or later everywhere, but since Autoconf mutates rapidly -# enough in this area it's likely we'll need to redefine -# AC_USE_SYSTEM_EXTENSIONS for quite some time. - -# If autoconf reports a warning -# warning: AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS -# or warning: AC_RUN_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS -# the fix is -# 1) to ensure that AC_USE_SYSTEM_EXTENSIONS is never directly invoked -# but always AC_REQUIREd, -# 2) to ensure that for each occurrence of -# AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) -# or -# AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) -# the corresponding gnulib module description has 'extensions' among -# its dependencies. This will ensure that the gl_USE_SYSTEM_EXTENSIONS -# invocation occurs in gl_EARLY, not in gl_INIT. - -# AC_USE_SYSTEM_EXTENSIONS -# ------------------------ -# Enable extensions on systems that normally disable them, -# typically due to standards-conformance issues. -# -# Remember that #undef in AH_VERBATIM gets replaced with #define by -# AC_DEFINE. The goal here is to define all known feature-enabling -# macros, then, if reports of conflicts are made, disable macros that -# cause problems on some platforms (such as __EXTENSIONS__). -AC_DEFUN_ONCE([AC_USE_SYSTEM_EXTENSIONS], -[AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl -AC_BEFORE([$0], [AC_RUN_IFELSE])dnl - - AC_CHECK_HEADER([minix/config.h], [MINIX=yes], [MINIX=]) - if test "$MINIX" = yes; then - AC_DEFINE([_POSIX_SOURCE], [1], - [Define to 1 if you need to in order for 'stat' and other - things to work.]) - AC_DEFINE([_POSIX_1_SOURCE], [2], - [Define to 2 if the system does not provide POSIX.1 features - except with this defined.]) - AC_DEFINE([_MINIX], [1], - [Define to 1 if on MINIX.]) - AC_DEFINE([_NETBSD_SOURCE], [1], - [Define to 1 to make NetBSD features available. MINIX 3 needs this.]) - fi - -dnl Use a different key than __EXTENSIONS__, as that name broke existing -dnl configure.ac when using autoheader 2.62. - AH_VERBATIM([USE_SYSTEM_EXTENSIONS], -[/* Enable extensions on AIX 3, Interix. */ -#ifndef _ALL_SOURCE -# undef _ALL_SOURCE -#endif -/* Enable general extensions on macOS. */ -#ifndef _DARWIN_C_SOURCE -# undef _DARWIN_C_SOURCE -#endif -/* Enable GNU extensions on systems that have them. */ -#ifndef _GNU_SOURCE -# undef _GNU_SOURCE -#endif -/* Enable threading extensions on Solaris. */ -#ifndef _POSIX_PTHREAD_SEMANTICS -# undef _POSIX_PTHREAD_SEMANTICS -#endif -/* Enable extensions specified by ISO/IEC TS 18661-5:2014. */ -#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__ -# undef __STDC_WANT_IEC_60559_ATTRIBS_EXT__ -#endif -/* Enable extensions specified by ISO/IEC TS 18661-1:2014. */ -#ifndef __STDC_WANT_IEC_60559_BFP_EXT__ -# undef __STDC_WANT_IEC_60559_BFP_EXT__ -#endif -/* Enable extensions specified by ISO/IEC TS 18661-2:2015. */ -#ifndef __STDC_WANT_IEC_60559_DFP_EXT__ -# undef __STDC_WANT_IEC_60559_DFP_EXT__ -#endif -/* Enable extensions specified by ISO/IEC TS 18661-4:2015. */ -#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__ -# undef __STDC_WANT_IEC_60559_FUNCS_EXT__ -#endif -/* Enable extensions specified by ISO/IEC TS 18661-3:2015. */ -#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__ -# undef __STDC_WANT_IEC_60559_TYPES_EXT__ -#endif -/* Enable extensions specified by ISO/IEC TR 24731-2:2010. */ -#ifndef __STDC_WANT_LIB_EXT2__ -# undef __STDC_WANT_LIB_EXT2__ -#endif -/* Enable extensions specified by ISO/IEC 24747:2009. */ -#ifndef __STDC_WANT_MATH_SPEC_FUNCS__ -# undef __STDC_WANT_MATH_SPEC_FUNCS__ -#endif -/* Enable extensions on HP NonStop. */ -#ifndef _TANDEM_SOURCE -# undef _TANDEM_SOURCE -#endif -/* Enable X/Open extensions if necessary. HP-UX 11.11 defines - mbstate_t only if _XOPEN_SOURCE is defined to 500, regardless of - whether compiling with -Ae or -D_HPUX_SOURCE=1. */ -#ifndef _XOPEN_SOURCE -# undef _XOPEN_SOURCE -#endif -/* Enable general extensions on Solaris. */ -#ifndef __EXTENSIONS__ -# undef __EXTENSIONS__ -#endif -]) - AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__], - [ac_cv_safe_to_define___extensions__], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([[ -# define __EXTENSIONS__ 1 - ]AC_INCLUDES_DEFAULT])], - [ac_cv_safe_to_define___extensions__=yes], - [ac_cv_safe_to_define___extensions__=no])]) - test $ac_cv_safe_to_define___extensions__ = yes && - AC_DEFINE([__EXTENSIONS__]) - AC_DEFINE([_ALL_SOURCE]) - AC_DEFINE([_DARWIN_C_SOURCE]) - AC_DEFINE([_GNU_SOURCE]) - AC_DEFINE([_POSIX_PTHREAD_SEMANTICS]) - AC_DEFINE([__STDC_WANT_IEC_60559_ATTRIBS_EXT__]) - AC_DEFINE([__STDC_WANT_IEC_60559_BFP_EXT__]) - AC_DEFINE([__STDC_WANT_IEC_60559_DFP_EXT__]) - AC_DEFINE([__STDC_WANT_IEC_60559_FUNCS_EXT__]) - AC_DEFINE([__STDC_WANT_IEC_60559_TYPES_EXT__]) - AC_DEFINE([__STDC_WANT_LIB_EXT2__]) - AC_DEFINE([__STDC_WANT_MATH_SPEC_FUNCS__]) - AC_DEFINE([_TANDEM_SOURCE]) - AC_CACHE_CHECK([whether _XOPEN_SOURCE should be defined], - [ac_cv_should_define__xopen_source], - [ac_cv_should_define__xopen_source=no - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([[ - #include - mbstate_t x;]])], - [], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([[ - #define _XOPEN_SOURCE 500 - #include - mbstate_t x;]])], - [ac_cv_should_define__xopen_source=yes])])]) - test $ac_cv_should_define__xopen_source = yes && - AC_DEFINE([_XOPEN_SOURCE], [500]) -])# AC_USE_SYSTEM_EXTENSIONS - -# gl_USE_SYSTEM_EXTENSIONS -# ------------------------ -# Enable extensions on systems that normally disable them, -# typically due to standards-conformance issues. -AC_DEFUN_ONCE([gl_USE_SYSTEM_EXTENSIONS], -[ - dnl Require this macro before AC_USE_SYSTEM_EXTENSIONS. - dnl gnulib does not need it. But if it gets required by third-party macros - dnl after AC_USE_SYSTEM_EXTENSIONS is required, autoconf 2.62..2.63 emit a - dnl warning: "AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS". - dnl Note: We can do this only for one of the macros AC_AIX, AC_GNU_SOURCE, - dnl AC_MINIX. If people still use AC_AIX or AC_MINIX, they are out of luck. - AC_REQUIRE([AC_GNU_SOURCE]) - - AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) -]) diff --git a/gl/m4/extern-inline.m4 b/gl/m4/extern-inline.m4 deleted file mode 100644 index 00f9609..0000000 --- a/gl/m4/extern-inline.m4 +++ /dev/null @@ -1,102 +0,0 @@ -dnl 'extern inline' a la ISO C99. - -dnl Copyright 2012-2017 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_EXTERN_INLINE], -[ - AH_VERBATIM([extern_inline], -[/* Please see the Gnulib manual for how to use these macros. - - Suppress extern inline with HP-UX cc, as it appears to be broken; see - . - - Suppress extern inline with Sun C in standards-conformance mode, as it - mishandles inline functions that call each other. E.g., for 'inline void f - (void) { } inline void g (void) { f (); }', c99 incorrectly complains - 'reference to static identifier "f" in extern inline function'. - This bug was observed with Sun C 5.12 SunOS_i386 2011/11/16. - - Suppress extern inline (with or without __attribute__ ((__gnu_inline__))) - on configurations that mistakenly use 'static inline' to implement - functions or macros in standard C headers like . For example, - if isdigit is mistakenly implemented via a static inline function, - a program containing an extern inline function that calls isdigit - may not work since the C standard prohibits extern inline functions - from calling static functions. This bug is known to occur on: - - OS X 10.8 and earlier; see: - http://lists.gnu.org/archive/html/bug-gnulib/2012-12/msg00023.html - - DragonFly; see - http://muscles.dragonflybsd.org/bulk/bleeding-edge-potential/latest-per-pkg/ah-tty-0.3.12.log - - FreeBSD; see: - http://lists.gnu.org/archive/html/bug-gnulib/2014-07/msg00104.html - - OS X 10.9 has a macro __header_inline indicating the bug is fixed for C and - for clang but remains for g++; see . - Assume DragonFly and FreeBSD will be similar. */ -#if (((defined __APPLE__ && defined __MACH__) \ - || defined __DragonFly__ || defined __FreeBSD__) \ - && (defined __header_inline \ - ? (defined __cplusplus && defined __GNUC_STDC_INLINE__ \ - && ! defined __clang__) \ - : ((! defined _DONT_USE_CTYPE_INLINE_ \ - && (defined __GNUC__ || defined __cplusplus)) \ - || (defined _FORTIFY_SOURCE && 0 < _FORTIFY_SOURCE \ - && defined __GNUC__ && ! defined __cplusplus)))) -# define _GL_EXTERN_INLINE_STDHEADER_BUG -#endif -#if ((__GNUC__ \ - ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \ - : (199901L <= __STDC_VERSION__ \ - && !defined __HP_cc \ - && !defined __PGI \ - && !(defined __SUNPRO_C && __STDC__))) \ - && !defined _GL_EXTERN_INLINE_STDHEADER_BUG) -# define _GL_INLINE inline -# define _GL_EXTERN_INLINE extern inline -# define _GL_EXTERN_INLINE_IN_USE -#elif (2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __STRICT_ANSI__ \ - && !defined _GL_EXTERN_INLINE_STDHEADER_BUG) -# if defined __GNUC_GNU_INLINE__ && __GNUC_GNU_INLINE__ - /* __gnu_inline__ suppresses a GCC 4.2 diagnostic. */ -# define _GL_INLINE extern inline __attribute__ ((__gnu_inline__)) -# else -# define _GL_INLINE extern inline -# endif -# define _GL_EXTERN_INLINE extern -# define _GL_EXTERN_INLINE_IN_USE -#else -# define _GL_INLINE static _GL_UNUSED -# define _GL_EXTERN_INLINE static _GL_UNUSED -#endif - -/* In GCC 4.6 (inclusive) to 5.1 (exclusive), - suppress bogus "no previous prototype for 'FOO'" - and "no previous declaration for 'FOO'" diagnostics, - when FOO is an inline function in the header; see - and - . */ -#if __GNUC__ == 4 && 6 <= __GNUC_MINOR__ -# if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ -# define _GL_INLINE_HEADER_CONST_PRAGMA -# else -# define _GL_INLINE_HEADER_CONST_PRAGMA \ - _Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute=const\"") -# endif -# define _GL_INLINE_HEADER_BEGIN \ - _Pragma ("GCC diagnostic push") \ - _Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") \ - _Pragma ("GCC diagnostic ignored \"-Wmissing-declarations\"") \ - _GL_INLINE_HEADER_CONST_PRAGMA -# define _GL_INLINE_HEADER_END \ - _Pragma ("GCC diagnostic pop") -#else -# define _GL_INLINE_HEADER_BEGIN -# define _GL_INLINE_HEADER_END -#endif]) -]) diff --git a/gl/m4/fseeko.m4 b/gl/m4/fseeko.m4 deleted file mode 100644 index fdb565b..0000000 --- a/gl/m4/fseeko.m4 +++ /dev/null @@ -1,73 +0,0 @@ -# fseeko.m4 serial 17 -dnl Copyright (C) 2007-2017 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_FSEEKO], -[ - AC_REQUIRE([gl_STDIO_H_DEFAULTS]) - AC_REQUIRE([gl_STDIN_LARGE_OFFSET]) - AC_REQUIRE([gl_SYS_TYPES_H]) - AC_REQUIRE([AC_PROG_CC]) - - dnl Persuade glibc to declare fseeko(). - AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) - - AC_CACHE_CHECK([for fseeko], [gl_cv_func_fseeko], - [ - AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include -]], [fseeko (stdin, 0, 0);])], - [gl_cv_func_fseeko=yes], [gl_cv_func_fseeko=no]) - ]) - - AC_CHECK_DECLS_ONCE([fseeko]) - if test $ac_cv_have_decl_fseeko = no; then - HAVE_DECL_FSEEKO=0 - fi - - if test $gl_cv_func_fseeko = no; then - HAVE_FSEEKO=0 - else - if test $WINDOWS_64_BIT_OFF_T = 1; then - REPLACE_FSEEKO=1 - fi - if test $gl_cv_var_stdin_large_offset = no; then - REPLACE_FSEEKO=1 - fi - m4_ifdef([gl_FUNC_FFLUSH_STDIN], [ - gl_FUNC_FFLUSH_STDIN - if test $gl_cv_func_fflush_stdin != yes; then - REPLACE_FSEEKO=1 - fi - ]) - fi -]) - -dnl Code shared by fseeko and ftello. Determine if large files are supported, -dnl but stdin does not start as a large file by default. -AC_DEFUN([gl_STDIN_LARGE_OFFSET], - [ - AC_CACHE_CHECK([whether stdin defaults to large file offsets], - [gl_cv_var_stdin_large_offset], - [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], -[[#if defined __SL64 && defined __SCLE /* cygwin */ - /* Cygwin 1.5.24 and earlier fail to put stdin in 64-bit mode, making - fseeko/ftello needlessly fail. This bug was fixed in 1.5.25, and - it is easier to do a version check than building a runtime test. */ -# include -# if CYGWIN_VERSION_DLL_COMBINED < CYGWIN_VERSION_DLL_MAKE_COMBINED (1005, 25) - choke me -# endif -#endif]])], - [gl_cv_var_stdin_large_offset=yes], - [gl_cv_var_stdin_large_offset=no])]) -]) - -# Prerequisites of lib/fseeko.c. -AC_DEFUN([gl_PREREQ_FSEEKO], -[ - dnl Native Windows has the function _fseeki64. mingw hides it, but mingw64 - dnl makes it usable again. - AC_CHECK_FUNCS([_fseeki64]) -]) diff --git a/gl/m4/fstat.m4 b/gl/m4/fstat.m4 deleted file mode 100644 index 14c871a..0000000 --- a/gl/m4/fstat.m4 +++ /dev/null @@ -1,36 +0,0 @@ -# fstat.m4 serial 4 -dnl Copyright (C) 2011-2017 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_FSTAT], -[ - AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS]) - - AC_REQUIRE([gl_MSVC_INVAL]) - if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then - REPLACE_FSTAT=1 - fi - - AC_REQUIRE([gl_HEADER_SYS_STAT_H]) - if test $WINDOWS_64_BIT_ST_SIZE = 1; then - REPLACE_FSTAT=1 - fi - - dnl Replace fstat() for supporting the gnulib-defined open() on directories. - m4_ifdef([gl_FUNC_FCHDIR], [ - gl_TEST_FCHDIR - if test $HAVE_FCHDIR = 0; then - case "$gl_cv_func_open_directory_works" in - *yes) ;; - *) - REPLACE_FSTAT=1 - ;; - esac - fi - ]) -]) - -# Prerequisites of lib/fstat.c. -AC_DEFUN([gl_PREREQ_FSTAT], [:]) diff --git a/gl/m4/ftell.m4 b/gl/m4/ftell.m4 deleted file mode 100644 index b8336ce..0000000 --- a/gl/m4/ftell.m4 +++ /dev/null @@ -1,15 +0,0 @@ -# ftell.m4 serial 3 -dnl Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_FTELL], -[ - AC_REQUIRE([gl_STDIO_H_DEFAULTS]) - AC_REQUIRE([gl_FUNC_FTELLO]) - dnl When ftello needs fixes, ftell needs them too. - if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then - REPLACE_FTELL=1 - fi -]) diff --git a/gl/m4/ftello.m4 b/gl/m4/ftello.m4 deleted file mode 100644 index 0867c2a..0000000 --- a/gl/m4/ftello.m4 +++ /dev/null @@ -1,140 +0,0 @@ -# ftello.m4 serial 11 -dnl Copyright (C) 2007-2017 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_FTELLO], -[ - AC_REQUIRE([gl_STDIO_H_DEFAULTS]) - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([gl_STDIN_LARGE_OFFSET]) - AC_REQUIRE([gl_SYS_TYPES_H]) - - dnl Persuade glibc to declare ftello(). - AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) - - AC_CHECK_DECLS_ONCE([ftello]) - if test $ac_cv_have_decl_ftello = no; then - HAVE_DECL_FTELLO=0 - fi - - AC_CACHE_CHECK([for ftello], [gl_cv_func_ftello], - [ - AC_LINK_IFELSE( - [AC_LANG_PROGRAM( - [[#include ]], - [[ftello (stdin);]])], - [gl_cv_func_ftello=yes], - [gl_cv_func_ftello=no]) - ]) - if test $gl_cv_func_ftello = no; then - HAVE_FTELLO=0 - else - if test $WINDOWS_64_BIT_OFF_T = 1; then - REPLACE_FTELLO=1 - fi - if test $gl_cv_var_stdin_large_offset = no; then - REPLACE_FTELLO=1 - fi - if test $REPLACE_FTELLO = 0; then - dnl Detect bug on Solaris. - dnl ftell and ftello produce incorrect results after putc that followed a - dnl getc call that reached EOF on Solaris. This is because the _IOREAD - dnl flag does not get cleared in this case, even though _IOWRT gets set, - dnl and ftell and ftello look whether the _IOREAD flag is set. - AC_REQUIRE([AC_CANONICAL_HOST]) - AC_CACHE_CHECK([whether ftello works], - [gl_cv_func_ftello_works], - [ - dnl Initial guess, used when cross-compiling or when /dev/tty cannot - dnl be opened. -changequote(,)dnl - case "$host_os" in - # Guess no on Solaris. - solaris*) gl_cv_func_ftello_works="guessing no" ;; - # Guess yes otherwise. - *) gl_cv_func_ftello_works="guessing yes" ;; - esac -changequote([,])dnl - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include -#include -#include -#define TESTFILE "conftest.tmp" -int -main (void) -{ - FILE *fp; - - /* Create a file with some contents. */ - fp = fopen (TESTFILE, "w"); - if (fp == NULL) - return 70; - if (fwrite ("foogarsh", 1, 8, fp) < 8) - return 71; - if (fclose (fp)) - return 72; - - /* The file's contents is now "foogarsh". */ - - /* Try writing after reading to EOF. */ - fp = fopen (TESTFILE, "r+"); - if (fp == NULL) - return 73; - if (fseek (fp, -1, SEEK_END)) - return 74; - if (!(getc (fp) == 'h')) - return 1; - if (!(getc (fp) == EOF)) - return 2; - if (!(ftell (fp) == 8)) - return 3; - if (!(ftell (fp) == 8)) - return 4; - if (!(putc ('!', fp) == '!')) - return 5; - if (!(ftell (fp) == 9)) - return 6; - if (!(fclose (fp) == 0)) - return 7; - fp = fopen (TESTFILE, "r"); - if (fp == NULL) - return 75; - { - char buf[10]; - if (!(fread (buf, 1, 10, fp) == 9)) - return 10; - if (!(memcmp (buf, "foogarsh!", 9) == 0)) - return 11; - } - if (!(fclose (fp) == 0)) - return 12; - - /* The file's contents is now "foogarsh!". */ - - return 0; -}]])], - [gl_cv_func_ftello_works=yes], - [gl_cv_func_ftello_works=no], [:]) - ]) - case "$gl_cv_func_ftello_works" in - *yes) ;; - *) - REPLACE_FTELLO=1 - AC_DEFINE([FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE], [1], - [Define to 1 if the system's ftello function has the Solaris bug.]) - ;; - esac - fi - fi -]) - -# Prerequisites of lib/ftello.c. -AC_DEFUN([gl_PREREQ_FTELLO], -[ - dnl Native Windows has the function _ftelli64. mingw hides it, but mingw64 - dnl makes it usable again. - AC_CHECK_FUNCS([_ftelli64]) -]) diff --git a/gl/m4/getopt.m4 b/gl/m4/getopt.m4 deleted file mode 100644 index 7a94626..0000000 --- a/gl/m4/getopt.m4 +++ /dev/null @@ -1,368 +0,0 @@ -# getopt.m4 serial 44 -dnl Copyright (C) 2002-2006, 2008-2017 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -# Request a POSIX compliant getopt function. -AC_DEFUN([gl_FUNC_GETOPT_POSIX], -[ - m4_divert_text([DEFAULTS], [gl_getopt_required=POSIX]) - AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) - AC_REQUIRE([gl_GETOPT_CHECK_HEADERS]) - dnl Other modules can request the gnulib implementation of the getopt - dnl functions unconditionally, by defining gl_REPLACE_GETOPT_ALWAYS. - dnl argp.m4 does this. - m4_ifdef([gl_REPLACE_GETOPT_ALWAYS], [ - REPLACE_GETOPT=1 - ], [ - REPLACE_GETOPT=0 - if test -n "$gl_replace_getopt"; then - REPLACE_GETOPT=1 - fi - ]) - if test $REPLACE_GETOPT = 1; then - dnl Arrange for getopt.h to be created. - gl_GETOPT_SUBSTITUTE_HEADER - fi -]) - -# Request a POSIX compliant getopt function with GNU extensions (such as -# options with optional arguments) and the functions getopt_long, -# getopt_long_only. -AC_DEFUN([gl_FUNC_GETOPT_GNU], -[ - m4_divert_text([INIT_PREPARE], [gl_getopt_required=GNU]) - - AC_REQUIRE([gl_FUNC_GETOPT_POSIX]) -]) - -# Determine whether to replace the entire getopt facility. -AC_DEFUN([gl_GETOPT_CHECK_HEADERS], -[ - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_REQUIRE([AC_PROG_AWK]) dnl for awk that supports ENVIRON - - dnl Persuade Solaris to declare optarg, optind, opterr, optopt. - AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) - - gl_CHECK_NEXT_HEADERS([getopt.h]) - if test $ac_cv_header_getopt_h = yes; then - HAVE_GETOPT_H=1 - else - HAVE_GETOPT_H=0 - fi - AC_SUBST([HAVE_GETOPT_H]) - - gl_replace_getopt= - - dnl Test whether is available. - if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then - AC_CHECK_HEADERS([getopt.h], [], [gl_replace_getopt=yes]) - fi - - dnl Test whether the function getopt_long is available. - if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then - AC_CHECK_FUNCS([getopt_long_only], [], [gl_replace_getopt=yes]) - fi - - dnl POSIX 2008 does not specify leading '+' behavior, but see - dnl http://austingroupbugs.net/view.php?id=191 for a recommendation on - dnl the next version of POSIX. For now, we only guarantee leading '+' - dnl behavior with getopt-gnu. - if test -z "$gl_replace_getopt"; then - AC_CACHE_CHECK([whether getopt is POSIX compatible], - [gl_cv_func_getopt_posix], - [ - dnl Merging these three different test programs into a single one - dnl would require a reset mechanism. On BSD systems, it can be done - dnl through 'optreset'; on some others (glibc), it can be done by - dnl setting 'optind' to 0; on others again (HP-UX, IRIX, OSF/1, - dnl Solaris 9, musl libc), there is no such mechanism. - if test $cross_compiling = no; then - dnl Sanity check. Succeeds everywhere (except on MSVC, - dnl which lacks and getopt() entirely). - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include -#include -#include - -int -main () -{ - static char program[] = "program"; - static char a[] = "-a"; - static char foo[] = "foo"; - static char bar[] = "bar"; - char *argv[] = { program, a, foo, bar, NULL }; - int c; - - c = getopt (4, argv, "ab"); - if (!(c == 'a')) - return 1; - c = getopt (4, argv, "ab"); - if (!(c == -1)) - return 2; - if (!(optind == 2)) - return 3; - return 0; -} -]])], - [gl_cv_func_getopt_posix=maybe], - [gl_cv_func_getopt_posix=no]) - if test $gl_cv_func_getopt_posix = maybe; then - dnl Sanity check with '+'. Succeeds everywhere (except on MSVC, - dnl which lacks and getopt() entirely). - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include -#include -#include - -int -main () -{ - static char program[] = "program"; - static char donald[] = "donald"; - static char p[] = "-p"; - static char billy[] = "billy"; - static char duck[] = "duck"; - static char a[] = "-a"; - static char bar[] = "bar"; - char *argv[] = { program, donald, p, billy, duck, a, bar, NULL }; - int c; - - c = getopt (7, argv, "+abp:q:"); - if (!(c == -1)) - return 4; - if (!(strcmp (argv[0], "program") == 0)) - return 5; - if (!(strcmp (argv[1], "donald") == 0)) - return 6; - if (!(strcmp (argv[2], "-p") == 0)) - return 7; - if (!(strcmp (argv[3], "billy") == 0)) - return 8; - if (!(strcmp (argv[4], "duck") == 0)) - return 9; - if (!(strcmp (argv[5], "-a") == 0)) - return 10; - if (!(strcmp (argv[6], "bar") == 0)) - return 11; - if (!(optind == 1)) - return 12; - return 0; -} -]])], - [gl_cv_func_getopt_posix=maybe], - [gl_cv_func_getopt_posix=no]) - fi - if test $gl_cv_func_getopt_posix = maybe; then - dnl Detect Mac OS X 10.5, AIX 7.1, mingw bug. - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include -#include -#include - -int -main () -{ - static char program[] = "program"; - static char ab[] = "-ab"; - char *argv[3] = { program, ab, NULL }; - if (getopt (2, argv, "ab:") != 'a') - return 13; - if (getopt (2, argv, "ab:") != '?') - return 14; - if (optopt != 'b') - return 15; - if (optind != 2) - return 16; - return 0; -} -]])], - [gl_cv_func_getopt_posix=yes], - [gl_cv_func_getopt_posix=no]) - fi - else - case "$host_os" in - darwin* | aix* | mingw*) gl_cv_func_getopt_posix="guessing no";; - *) gl_cv_func_getopt_posix="guessing yes";; - esac - fi - ]) - case "$gl_cv_func_getopt_posix" in - *no) gl_replace_getopt=yes ;; - esac - fi - - if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then - AC_CACHE_CHECK([for working GNU getopt function], [gl_cv_func_getopt_gnu], - [# Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the - # optstring is necessary for programs like m4 that have POSIX-mandated - # semantics for supporting options interspersed with files. - # Also, since getopt_long is a GNU extension, we require optind=0. - # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT; - # so take care to revert to the correct (non-)export state. -dnl GNU Coding Standards currently allow awk but not env; besides, env -dnl is ambiguous with environment values that contain newlines. - gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }' - case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" - #include - #include - ]GL_NOCRASH[ - ]], [[ - int result = 0; - - nocrash_init(); - - /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw, - and fails on Mac OS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5, - OSF/1 5.1, Solaris 10. */ - { - static char conftest[] = "conftest"; - static char plus[] = "-+"; - char *argv[3] = { conftest, plus, NULL }; - opterr = 0; - if (getopt (2, argv, "+a") != '?') - result |= 1; - } - /* This code succeeds on glibc 2.8, mingw, - and fails on Mac OS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11, - IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */ - { - static char program[] = "program"; - static char p[] = "-p"; - static char foo[] = "foo"; - static char bar[] = "bar"; - char *argv[] = { program, p, foo, bar, NULL }; - - optind = 1; - if (getopt (4, argv, "p::") != 'p') - result |= 2; - else if (optarg != NULL) - result |= 4; - else if (getopt (4, argv, "p::") != -1) - result |= 6; - else if (optind != 2) - result |= 8; - } - /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */ - { - static char program[] = "program"; - static char foo[] = "foo"; - static char p[] = "-p"; - char *argv[] = { program, foo, p, NULL }; - optind = 0; - if (getopt (3, argv, "-p") != 1) - result |= 16; - else if (getopt (3, argv, "-p") != 'p') - result |= 16; - } - /* This code fails on glibc 2.11. */ - { - static char program[] = "program"; - static char b[] = "-b"; - static char a[] = "-a"; - char *argv[] = { program, b, a, NULL }; - optind = opterr = 0; - if (getopt (3, argv, "+:a:b") != 'b') - result |= 32; - else if (getopt (3, argv, "+:a:b") != ':') - result |= 32; - } - /* This code dumps core on glibc 2.14. */ - { - static char program[] = "program"; - static char w[] = "-W"; - static char dummy[] = "dummy"; - char *argv[] = { program, w, dummy, NULL }; - optind = opterr = 1; - if (getopt (3, argv, "W;") != 'W') - result |= 64; - } - return result; - ]])], - [gl_cv_func_getopt_gnu=yes], - [gl_cv_func_getopt_gnu=no], - [dnl Cross compiling. Assume the worst, even on glibc platforms. - gl_cv_func_getopt_gnu="guessing no" - ]) - case $gl_had_POSIXLY_CORRECT in - exported) ;; - yes) AS_UNSET([POSIXLY_CORRECT]); POSIXLY_CORRECT=1 ;; - *) AS_UNSET([POSIXLY_CORRECT]) ;; - esac - ]) - if test "$gl_cv_func_getopt_gnu" != yes; then - gl_replace_getopt=yes - else - AC_CACHE_CHECK([for working GNU getopt_long function], - [gl_cv_func_getopt_long_gnu], - [AC_RUN_IFELSE( - [AC_LANG_PROGRAM( - [[#include - #include - #include - ]], - [[static const struct option long_options[] = - { - { "xtremely-",no_argument, NULL, 1003 }, - { "xtra", no_argument, NULL, 1001 }, - { "xtreme", no_argument, NULL, 1002 }, - { "xtremely", no_argument, NULL, 1003 }, - { NULL, 0, NULL, 0 } - }; - /* This code fails on OpenBSD 5.0. */ - { - static char program[] = "program"; - static char xtremel[] = "--xtremel"; - char *argv[] = { program, xtremel, NULL }; - int option_index; - optind = 1; opterr = 0; - if (getopt_long (2, argv, "", long_options, &option_index) != 1003) - return 1; - } - return 0; - ]])], - [gl_cv_func_getopt_long_gnu=yes], - [gl_cv_func_getopt_long_gnu=no], - [dnl Cross compiling. Guess no on OpenBSD, yes otherwise. - case "$host_os" in - openbsd*) gl_cv_func_getopt_long_gnu="guessing no";; - *) gl_cv_func_getopt_long_gnu="guessing yes";; - esac - ]) - ]) - case "$gl_cv_func_getopt_long_gnu" in - *yes) ;; - *) gl_replace_getopt=yes ;; - esac - fi - fi -]) - -AC_DEFUN([gl_GETOPT_SUBSTITUTE_HEADER], -[ - GETOPT_H=getopt.h - AC_DEFINE([__GETOPT_PREFIX], [[rpl_]], - [Define to rpl_ if the getopt replacement functions and variables - should be used.]) - AC_SUBST([GETOPT_H]) -]) - -# Prerequisites of lib/getopt*. -AC_DEFUN([gl_PREREQ_GETOPT], -[ - AC_CHECK_DECLS_ONCE([getenv]) -]) diff --git a/gl/m4/gettime.m4 b/gl/m4/gettime.m4 deleted file mode 100644 index 1cdab27..0000000 --- a/gl/m4/gettime.m4 +++ /dev/null @@ -1,13 +0,0 @@ -# gettime.m4 serial 8 -dnl Copyright (C) 2002, 2004-2006, 2009-2017 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_GETTIME], -[ - dnl Prerequisites of lib/gettime.c. - AC_REQUIRE([gl_CLOCK_TIME]) - AC_REQUIRE([gl_TIMESPEC]) - AC_CHECK_FUNCS_ONCE([gettimeofday nanotime]) -]) diff --git a/gl/m4/gettimeofday.m4 b/gl/m4/gettimeofday.m4 deleted file mode 100644 index 4f501e5..0000000 --- a/gl/m4/gettimeofday.m4 +++ /dev/null @@ -1,138 +0,0 @@ -# serial 21 - -# Copyright (C) 2001-2003, 2005, 2007, 2009-2017 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -dnl From Jim Meyering. - -AC_DEFUN([gl_FUNC_GETTIMEOFDAY], -[ - AC_REQUIRE([AC_C_RESTRICT]) - AC_REQUIRE([gl_HEADER_SYS_TIME_H]) - AC_REQUIRE([gl_HEADER_SYS_TIME_H_DEFAULTS]) - AC_CHECK_FUNCS_ONCE([gettimeofday]) - - gl_gettimeofday_timezone=void - if test $ac_cv_func_gettimeofday != yes; then - HAVE_GETTIMEOFDAY=0 - else - gl_FUNC_GETTIMEOFDAY_CLOBBER - AC_CACHE_CHECK([for gettimeofday with POSIX signature], - [gl_cv_func_gettimeofday_posix_signature], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[#include - struct timeval c; - int gettimeofday (struct timeval *restrict, void *restrict); - ]], - [[/* glibc uses struct timezone * rather than the POSIX void * - if _GNU_SOURCE is defined. However, since the only portable - use of gettimeofday uses NULL as the second parameter, and - since the glibc definition is actually more typesafe, it is - not worth wrapping this to get a compliant signature. */ - int (*f) (struct timeval *restrict, void *restrict) - = gettimeofday; - int x = f (&c, 0); - return !(x | c.tv_sec | c.tv_usec); - ]])], - [gl_cv_func_gettimeofday_posix_signature=yes], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[#include -int gettimeofday (struct timeval *restrict, struct timezone *restrict); - ]])], - [gl_cv_func_gettimeofday_posix_signature=almost], - [gl_cv_func_gettimeofday_posix_signature=no])])]) - if test $gl_cv_func_gettimeofday_posix_signature = almost; then - gl_gettimeofday_timezone='struct timezone' - elif test $gl_cv_func_gettimeofday_posix_signature != yes; then - REPLACE_GETTIMEOFDAY=1 - fi - dnl If we override 'struct timeval', we also have to override gettimeofday. - if test $REPLACE_STRUCT_TIMEVAL = 1; then - REPLACE_GETTIMEOFDAY=1 - fi - m4_ifdef([gl_FUNC_TZSET_CLOBBER], [ - gl_FUNC_TZSET_CLOBBER - case "$gl_cv_func_tzset_clobber" in - *yes) - REPLACE_GETTIMEOFDAY=1 - gl_GETTIMEOFDAY_REPLACE_LOCALTIME - AC_DEFINE([tzset], [rpl_tzset], - [Define to rpl_tzset if the wrapper function should be used.]) - AC_DEFINE([TZSET_CLOBBERS_LOCALTIME], [1], - [Define if tzset clobbers localtime's static buffer.]) - ;; - esac - ]) - fi - AC_DEFINE_UNQUOTED([GETTIMEOFDAY_TIMEZONE], [$gl_gettimeofday_timezone], - [Define this to 'void' or 'struct timezone' to match the system's - declaration of the second argument to gettimeofday.]) -]) - - -dnl See if gettimeofday clobbers the static buffer that localtime uses -dnl for its return value. The gettimeofday function from Mac OS X 10.0.4 -dnl (i.e., Darwin 1.3.7) has this problem. -dnl -dnl If it does, then arrange to use gettimeofday and localtime only via -dnl the wrapper functions that work around the problem. - -AC_DEFUN([gl_FUNC_GETTIMEOFDAY_CLOBBER], -[ - AC_REQUIRE([gl_HEADER_SYS_TIME_H]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - - AC_CACHE_CHECK([whether gettimeofday clobbers localtime buffer], - [gl_cv_func_gettimeofday_clobber], - [AC_RUN_IFELSE( - [AC_LANG_PROGRAM( - [[#include - #include - #include - #include - ]], - [[ - time_t t = 0; - struct tm *lt; - struct tm saved_lt; - struct timeval tv; - lt = localtime (&t); - saved_lt = *lt; - gettimeofday (&tv, NULL); - return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0; - ]])], - [gl_cv_func_gettimeofday_clobber=no], - [gl_cv_func_gettimeofday_clobber=yes], - [# When cross-compiling: - case "$host_os" in - # Guess all is fine on glibc systems. - *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;; - # If we don't know, assume the worst. - *) gl_cv_func_gettimeofday_clobber="guessing yes" ;; - esac - ])]) - - case "$gl_cv_func_gettimeofday_clobber" in - *yes) - REPLACE_GETTIMEOFDAY=1 - gl_GETTIMEOFDAY_REPLACE_LOCALTIME - AC_DEFINE([GETTIMEOFDAY_CLOBBERS_LOCALTIME], [1], - [Define if gettimeofday clobbers the localtime buffer.]) - ;; - esac -]) - -AC_DEFUN([gl_GETTIMEOFDAY_REPLACE_LOCALTIME], [ - REPLACE_GMTIME=1 - REPLACE_LOCALTIME=1 -]) - -# Prerequisites of lib/gettimeofday.c. -AC_DEFUN([gl_PREREQ_GETTIMEOFDAY], [ - AC_CHECK_HEADERS([sys/timeb.h]) - AC_CHECK_FUNCS([_ftime]) -]) diff --git a/gl/m4/gnulib-cache.m4 b/gl/m4/gnulib-cache.m4 deleted file mode 100644 index e5dbb55..0000000 --- a/gl/m4/gnulib-cache.m4 +++ /dev/null @@ -1,64 +0,0 @@ -# Copyright (C) 2002-2017 Free Software Foundation, Inc. -# -# This file is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or -# (at your option) any later version. -# -# This file is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this file. If not, see . -# -# As a special exception to the GNU General Public License, -# this file may be distributed as part of a program that -# contains a configuration script generated by Autoconf, under -# the same distribution terms as the rest of that program. -# -# Generated by gnulib-tool. -# -# This file represents the specification of how gnulib-tool is used. -# It acts as a cache: It is written and read by gnulib-tool. -# In projects that use version control, this file is meant to be put under -# version control, like the configure.ac and various Makefile.am files. - - -# Specification in the form of a command-line invocation: -# gnulib-tool --import --local-dir=gl/override --lib=libgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --no-conditional-dependencies --libtool --macro-prefix=gl --no-vc-files autobuild fdl-1.3 gendocs getopt-gnu gettime gnupload maintainer-makefile manywarnings pmccabe2html progname read-file stdint update-copyright valgrind-tests version-etc-fsf warnings - -# Specification in the form of a few gnulib-tool.m4 macro invocations: -gl_LOCAL_DIR([gl/override]) -gl_MODULES([ - autobuild - fdl-1.3 - gendocs - getopt-gnu - gettime - gnupload - maintainer-makefile - manywarnings - pmccabe2html - progname - read-file - stdint - update-copyright - valgrind-tests - version-etc-fsf - warnings -]) -gl_AVOID([]) -gl_SOURCE_BASE([gl]) -gl_M4_BASE([gl/m4]) -gl_PO_BASE([]) -gl_DOC_BASE([doc]) -gl_TESTS_BASE([tests]) -gl_LIB([libgnu]) -gl_MAKEFILE_NAME([]) -gl_LIBTOOL -gl_MACRO_PREFIX([gl]) -gl_PO_DOMAIN([]) -gl_WITNESS_C_MACRO([]) -gl_VC_FILES([false]) diff --git a/gl/m4/gnulib-common.m4 b/gl/m4/gnulib-common.m4 deleted file mode 100644 index 7d9b40b..0000000 --- a/gl/m4/gnulib-common.m4 +++ /dev/null @@ -1,462 +0,0 @@ -# gnulib-common.m4 serial 36 -dnl Copyright (C) 2007-2017 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -# gl_COMMON -# is expanded unconditionally through gnulib-tool magic. -AC_DEFUN([gl_COMMON], [ - dnl Use AC_REQUIRE here, so that the code is expanded once only. - AC_REQUIRE([gl_00GNULIB]) - AC_REQUIRE([gl_COMMON_BODY]) -]) -AC_DEFUN([gl_COMMON_BODY], [ - AH_VERBATIM([_Noreturn], -[/* The _Noreturn keyword of C11. */ -#if ! (defined _Noreturn \ - || (defined __STDC_VERSION__ && 201112 <= __STDC_VERSION__)) -# if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \ - || 0x5110 <= __SUNPRO_C) -# define _Noreturn __attribute__ ((__noreturn__)) -# elif defined _MSC_VER && 1200 <= _MSC_VER -# define _Noreturn __declspec (noreturn) -# else -# define _Noreturn -# endif -#endif -]) - AH_VERBATIM([isoc99_inline], -[/* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports - the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of - earlier versions), but does not display it by setting __GNUC_STDC_INLINE__. - __APPLE__ && __MACH__ test for Mac OS X. - __APPLE_CC__ tests for the Apple compiler and its version. - __STDC_VERSION__ tests for the C99 mode. */ -#if defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && !defined __cplusplus && __STDC_VERSION__ >= 199901L && !defined __GNUC_STDC_INLINE__ -# define __GNUC_STDC_INLINE__ 1 -#endif]) - AH_VERBATIM([unused_parameter], -[/* Define as a marker that can be attached to declarations that might not - be used. This helps to reduce warnings, such as from - GCC -Wunused-parameter. */ -#if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) -# define _GL_UNUSED __attribute__ ((__unused__)) -#else -# define _GL_UNUSED -#endif -/* The name _UNUSED_PARAMETER_ is an earlier spelling, although the name - is a misnomer outside of parameter lists. */ -#define _UNUSED_PARAMETER_ _GL_UNUSED - -/* gcc supports the "unused" attribute on possibly unused labels, and - g++ has since version 4.5. Note to support C++ as well as C, - _GL_UNUSED_LABEL should be used with a trailing ; */ -#if !defined __cplusplus || __GNUC__ > 4 \ - || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5) -# define _GL_UNUSED_LABEL _GL_UNUSED -#else -# define _GL_UNUSED_LABEL -#endif - -/* The __pure__ attribute was added in gcc 2.96. */ -#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) -# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) -#else -# define _GL_ATTRIBUTE_PURE /* empty */ -#endif - -/* The __const__ attribute was added in gcc 2.95. */ -#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) -# define _GL_ATTRIBUTE_CONST __attribute__ ((__const__)) -#else -# define _GL_ATTRIBUTE_CONST /* empty */ -#endif -]) - dnl Preparation for running test programs: - dnl Tell glibc to write diagnostics from -D_FORTIFY_SOURCE=2 to stderr, not - dnl to /dev/tty, so they can be redirected to log files. Such diagnostics - dnl arise e.g., in the macros gl_PRINTF_DIRECTIVE_N, gl_SNPRINTF_DIRECTIVE_N. - LIBC_FATAL_STDERR_=1 - export LIBC_FATAL_STDERR_ -]) - -# gl_MODULE_INDICATOR_CONDITION -# expands to a C preprocessor expression that evaluates to 1 or 0, depending -# whether a gnulib module that has been requested shall be considered present -# or not. -m4_define([gl_MODULE_INDICATOR_CONDITION], [1]) - -# gl_MODULE_INDICATOR_SET_VARIABLE([modulename]) -# sets the shell variable that indicates the presence of the given module to -# a C preprocessor expression that will evaluate to 1. -AC_DEFUN([gl_MODULE_INDICATOR_SET_VARIABLE], -[ - gl_MODULE_INDICATOR_SET_VARIABLE_AUX( - [GNULIB_[]m4_translit([[$1]], - [abcdefghijklmnopqrstuvwxyz./-], - [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])], - [gl_MODULE_INDICATOR_CONDITION]) -]) - -# gl_MODULE_INDICATOR_SET_VARIABLE_AUX([variable]) -# modifies the shell variable to include the gl_MODULE_INDICATOR_CONDITION. -# The shell variable's value is a C preprocessor expression that evaluates -# to 0 or 1. -AC_DEFUN([gl_MODULE_INDICATOR_SET_VARIABLE_AUX], -[ - m4_if(m4_defn([gl_MODULE_INDICATOR_CONDITION]), [1], - [ - dnl Simplify the expression VALUE || 1 to 1. - $1=1 - ], - [gl_MODULE_INDICATOR_SET_VARIABLE_AUX_OR([$1], - [gl_MODULE_INDICATOR_CONDITION])]) -]) - -# gl_MODULE_INDICATOR_SET_VARIABLE_AUX_OR([variable], [condition]) -# modifies the shell variable to include the given condition. The shell -# variable's value is a C preprocessor expression that evaluates to 0 or 1. -AC_DEFUN([gl_MODULE_INDICATOR_SET_VARIABLE_AUX_OR], -[ - dnl Simplify the expression 1 || CONDITION to 1. - if test "$[]$1" != 1; then - dnl Simplify the expression 0 || CONDITION to CONDITION. - if test "$[]$1" = 0; then - $1=$2 - else - $1="($[]$1 || $2)" - fi - fi -]) - -# gl_MODULE_INDICATOR([modulename]) -# defines a C macro indicating the presence of the given module -# in a location where it can be used. -# | Value | Value | -# | in lib/ | in tests/ | -# --------------------------------------------+---------+-----------+ -# Module present among main modules: | 1 | 1 | -# --------------------------------------------+---------+-----------+ -# Module present among tests-related modules: | 0 | 1 | -# --------------------------------------------+---------+-----------+ -# Module not present at all: | 0 | 0 | -# --------------------------------------------+---------+-----------+ -AC_DEFUN([gl_MODULE_INDICATOR], -[ - AC_DEFINE_UNQUOTED([GNULIB_]m4_translit([[$1]], - [abcdefghijklmnopqrstuvwxyz./-], - [ABCDEFGHIJKLMNOPQRSTUVWXYZ___]), - [gl_MODULE_INDICATOR_CONDITION], - [Define to a C preprocessor expression that evaluates to 1 or 0, - depending whether the gnulib module $1 shall be considered present.]) -]) - -# gl_MODULE_INDICATOR_FOR_TESTS([modulename]) -# defines a C macro indicating the presence of the given module -# in lib or tests. This is useful to determine whether the module -# should be tested. -# | Value | Value | -# | in lib/ | in tests/ | -# --------------------------------------------+---------+-----------+ -# Module present among main modules: | 1 | 1 | -# --------------------------------------------+---------+-----------+ -# Module present among tests-related modules: | 1 | 1 | -# --------------------------------------------+---------+-----------+ -# Module not present at all: | 0 | 0 | -# --------------------------------------------+---------+-----------+ -AC_DEFUN([gl_MODULE_INDICATOR_FOR_TESTS], -[ - AC_DEFINE([GNULIB_TEST_]m4_translit([[$1]], - [abcdefghijklmnopqrstuvwxyz./-], - [ABCDEFGHIJKLMNOPQRSTUVWXYZ___]), [1], - [Define to 1 when the gnulib module $1 should be tested.]) -]) - -# gl_ASSERT_NO_GNULIB_POSIXCHECK -# asserts that there will never be a need to #define GNULIB_POSIXCHECK. -# and thereby enables an optimization of configure and config.h. -# Used by Emacs. -AC_DEFUN([gl_ASSERT_NO_GNULIB_POSIXCHECK], -[ - dnl Override gl_WARN_ON_USE_PREPARE. - dnl But hide this definition from 'aclocal'. - AC_DEFUN([gl_W][ARN_ON_USE_PREPARE], []) -]) - -# gl_ASSERT_NO_GNULIB_TESTS -# asserts that there will be no gnulib tests in the scope of the configure.ac -# and thereby enables an optimization of config.h. -# Used by Emacs. -AC_DEFUN([gl_ASSERT_NO_GNULIB_TESTS], -[ - dnl Override gl_MODULE_INDICATOR_FOR_TESTS. - AC_DEFUN([gl_MODULE_INDICATOR_FOR_TESTS], []) -]) - -# Test whether exists. -# Set HAVE_FEATURES_H. -AC_DEFUN([gl_FEATURES_H], -[ - AC_CHECK_HEADERS_ONCE([features.h]) - if test $ac_cv_header_features_h = yes; then - HAVE_FEATURES_H=1 - else - HAVE_FEATURES_H=0 - fi - AC_SUBST([HAVE_FEATURES_H]) -]) - -# m4_foreach_w -# is a backport of autoconf-2.59c's m4_foreach_w. -# Remove this macro when we can assume autoconf >= 2.60. -m4_ifndef([m4_foreach_w], - [m4_define([m4_foreach_w], - [m4_foreach([$1], m4_split(m4_normalize([$2]), [ ]), [$3])])]) - -# AS_VAR_IF(VAR, VALUE, [IF-MATCH], [IF-NOT-MATCH]) -# ---------------------------------------------------- -# Backport of autoconf-2.63b's macro. -# Remove this macro when we can assume autoconf >= 2.64. -m4_ifndef([AS_VAR_IF], -[m4_define([AS_VAR_IF], -[AS_IF([test x"AS_VAR_GET([$1])" = x""$2], [$3], [$4])])]) - -# gl_PROG_CC_C99 -# Modifies the value of the shell variable CC in an attempt to make $CC -# understand ISO C99 source code. -# This is like AC_PROG_CC_C99, except that -# - AC_PROG_CC_C99 did not exist in Autoconf versions < 2.60, -# - AC_PROG_CC_C99 does not mix well with AC_PROG_CC_STDC -# , -# but many more packages use AC_PROG_CC_STDC than AC_PROG_CC_C99 -# . -# Remaining problems: -# - When AC_PROG_CC_STDC is invoked twice, it adds the C99 enabling options -# to CC twice -# . -# - AC_PROG_CC_STDC is likely to change now that C11 is an ISO standard. -AC_DEFUN([gl_PROG_CC_C99], -[ - dnl Change that version number to the minimum Autoconf version that supports - dnl mixing AC_PROG_CC_C99 calls with AC_PROG_CC_STDC calls. - m4_version_prereq([9.0], - [AC_REQUIRE([AC_PROG_CC_C99])], - [AC_REQUIRE([AC_PROG_CC_STDC])]) -]) - -# gl_PROG_AR_RANLIB -# Determines the values for AR, ARFLAGS, RANLIB that fit with the compiler. -# The user can set the variables AR, ARFLAGS, RANLIB if he wants to override -# the values. -AC_DEFUN([gl_PROG_AR_RANLIB], -[ - dnl Minix 3 comes with two toolchains: The Amsterdam Compiler Kit compiler - dnl as "cc", and GCC as "gcc". They have different object file formats and - dnl library formats. In particular, the GNU binutils programs ar and ranlib - dnl produce libraries that work only with gcc, not with cc. - AC_REQUIRE([AC_PROG_CC]) - AC_BEFORE([$0], [AM_PROG_AR]) - AC_CACHE_CHECK([for Minix Amsterdam compiler], [gl_cv_c_amsterdam_compiler], - [ - AC_EGREP_CPP([Amsterdam], - [ -#ifdef __ACK__ -Amsterdam -#endif - ], - [gl_cv_c_amsterdam_compiler=yes], - [gl_cv_c_amsterdam_compiler=no]) - ]) - - dnl Don't compete with AM_PROG_AR's decision about AR/ARFLAGS if we are not - dnl building with __ACK__. - if test $gl_cv_c_amsterdam_compiler = yes; then - if test -z "$AR"; then - AR='cc -c.a' - fi - if test -z "$ARFLAGS"; then - ARFLAGS='-o' - fi - else - dnl AM_PROG_AR was added in automake v1.11.2. AM_PROG_AR does not AC_SUBST - dnl ARFLAGS variable (it is filed into Makefile.in directly by automake - dnl script on-demand, if not specified by ./configure of course). - dnl Don't AC_REQUIRE the AM_PROG_AR otherwise the code for __ACK__ above - dnl will be ignored. Also, pay attention to call AM_PROG_AR in else block - dnl because AM_PROG_AR is written so it could re-set AR variable even for - dnl __ACK__. It may seem like its easier to avoid calling the macro here, - dnl but we need to AC_SUBST both AR/ARFLAGS (thus those must have some good - dnl default value and automake should usually know them). - m4_ifdef([AM_PROG_AR], [AM_PROG_AR], [:]) - fi - - dnl In case the code above has not helped with setting AR/ARFLAGS, use - dnl Automake-documented default values for AR and ARFLAGS, but prefer - dnl ${host}-ar over ar (useful for cross-compiling). - AC_CHECK_TOOL([AR], [ar], [ar]) - if test -z "$ARFLAGS"; then - ARFLAGS='cr' - fi - - AC_SUBST([AR]) - AC_SUBST([ARFLAGS]) - if test -z "$RANLIB"; then - if test $gl_cv_c_amsterdam_compiler = yes; then - RANLIB=':' - else - dnl Use the ranlib program if it is available. - AC_PROG_RANLIB - fi - fi - AC_SUBST([RANLIB]) -]) - -# AC_PROG_MKDIR_P -# is a backport of autoconf-2.60's AC_PROG_MKDIR_P, with a fix -# for interoperability with automake-1.9.6 from autoconf-2.62. -# Remove this macro when we can assume autoconf >= 2.62 or -# autoconf >= 2.60 && automake >= 1.10. -# AC_AUTOCONF_VERSION was introduced in 2.62, so use that as the witness. -m4_ifndef([AC_AUTOCONF_VERSION],[ -m4_ifdef([AC_PROG_MKDIR_P], [ - dnl For automake-1.9.6 && autoconf < 2.62: Ensure MKDIR_P is AC_SUBSTed. - m4_define([AC_PROG_MKDIR_P], - m4_defn([AC_PROG_MKDIR_P])[ - AC_SUBST([MKDIR_P])])], [ - dnl For autoconf < 2.60: Backport of AC_PROG_MKDIR_P. - AC_DEFUN_ONCE([AC_PROG_MKDIR_P], - [AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake - MKDIR_P='$(mkdir_p)' - AC_SUBST([MKDIR_P])])]) -]) - -# AC_C_RESTRICT -# This definition is copied from post-2.69 Autoconf and overrides the -# AC_C_RESTRICT macro from autoconf 2.60..2.69. It can be removed -# once autoconf >= 2.70 can be assumed. It's painful to check version -# numbers, and in practice this macro is more up-to-date than Autoconf -# is, so override Autoconf unconditionally. -AC_DEFUN([AC_C_RESTRICT], -[AC_CACHE_CHECK([for C/C++ restrict keyword], [ac_cv_c_restrict], - [ac_cv_c_restrict=no - # The order here caters to the fact that C++ does not require restrict. - for ac_kw in __restrict __restrict__ _Restrict restrict; do - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[typedef int *int_ptr; - int foo (int_ptr $ac_kw ip) { return ip[0]; } - int bar (int [$ac_kw]); /* Catch GCC bug 14050. */ - int bar (int ip[$ac_kw]) { return ip[0]; } - ]], - [[int s[1]; - int *$ac_kw t = s; - t[0] = 0; - return foo (t) + bar (t); - ]])], - [ac_cv_c_restrict=$ac_kw]) - test "$ac_cv_c_restrict" != no && break - done - ]) - AH_VERBATIM([restrict], -[/* Define to the equivalent of the C99 'restrict' keyword, or to - nothing if this is not supported. Do not define if restrict is - supported directly. */ -#undef restrict -/* Work around a bug in Sun C++: it does not support _Restrict or - __restrict__, even though the corresponding Sun C compiler ends up with - "#define restrict _Restrict" or "#define restrict __restrict__" in the - previous line. Perhaps some future version of Sun C++ will work with - restrict; if so, hopefully it defines __RESTRICT like Sun C does. */ -#if defined __SUNPRO_CC && !defined __RESTRICT -# define _Restrict -# define __restrict__ -#endif]) - case $ac_cv_c_restrict in - restrict) ;; - no) AC_DEFINE([restrict], []) ;; - *) AC_DEFINE_UNQUOTED([restrict], [$ac_cv_c_restrict]) ;; - esac -])# AC_C_RESTRICT - -# gl_BIGENDIAN -# is like AC_C_BIGENDIAN, except that it can be AC_REQUIREd. -# Note that AC_REQUIRE([AC_C_BIGENDIAN]) does not work reliably because some -# macros invoke AC_C_BIGENDIAN with arguments. -AC_DEFUN([gl_BIGENDIAN], -[ - AC_C_BIGENDIAN -]) - -# gl_CACHE_VAL_SILENT(cache-id, command-to-set-it) -# is like AC_CACHE_VAL(cache-id, command-to-set-it), except that it does not -# output a spurious "(cached)" mark in the midst of other configure output. -# This macro should be used instead of AC_CACHE_VAL when it is not surrounded -# by an AC_MSG_CHECKING/AC_MSG_RESULT pair. -AC_DEFUN([gl_CACHE_VAL_SILENT], -[ - saved_as_echo_n="$as_echo_n" - as_echo_n=':' - AC_CACHE_VAL([$1], [$2]) - as_echo_n="$saved_as_echo_n" -]) - -# AS_VAR_COPY was added in autoconf 2.63b -m4_define_default([AS_VAR_COPY], -[AS_LITERAL_IF([$1[]$2], [$1=$$2], [eval $1=\$$2])]) - -# AC_PROG_SED was added in autoconf 2.59b -m4_ifndef([AC_PROG_SED], -[AC_DEFUN([AC_PROG_SED], -[AC_CACHE_CHECK([for a sed that does not truncate output], ac_cv_path_SED, - [dnl ac_script should not contain more than 99 commands (for HP-UX sed), - dnl but more than about 7000 bytes, to catch a limit in Solaris 8 /usr/ucb/sed. - ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ - for ac_i in 1 2 3 4 5 6 7; do - ac_script="$ac_script$as_nl$ac_script" - done - echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed - AS_UNSET([ac_script]) - if test -z "$SED"; then - ac_path_SED_found=false - _AS_PATH_WALK([], [ - 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_EXECUTABLE_P(["$ac_path_SED"]) || continue - case `"$ac_path_SED" --version 2>&1` in - *GNU*) ac_cv_path_SED=$ac_path_SED ac_path_SED_found=:;; - *) - ac_count=0 - _AS_ECHO_N([0123456789]) >conftest.in - while : - do - cat conftest.in conftest.in >conftest.tmp - mv conftest.tmp conftest.in - cp conftest.in conftest.nl - echo >> conftest.nl - "$ac_path_SED" -f conftest.sed conftest.out 2>/dev/null || break - diff conftest.out conftest.nl >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` - if test $ac_count -gt ${ac_path_SED_max-0}; then - # Best so far, but keep looking for better - ac_cv_path_SED=$ac_path_SED - ac_path_SED_max=$ac_count - fi - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; - esac - $ac_path_SED_found && break 3 - done - done]) - if test -z "$ac_cv_path_SED"; then - AC_ERROR([no acceptable sed could be found in \$PATH]) - fi - else - ac_cv_path_SED=$SED - fi - SED="$ac_cv_path_SED" - AC_SUBST([SED])dnl - rm -f conftest.sed -])])]) diff --git a/gl/m4/gnulib-comp.m4 b/gl/m4/gnulib-comp.m4 deleted file mode 100644 index 20a1e48..0000000 --- a/gl/m4/gnulib-comp.m4 +++ /dev/null @@ -1,473 +0,0 @@ -# DO NOT EDIT! GENERATED AUTOMATICALLY! -# Copyright (C) 2002-2017 Free Software Foundation, Inc. -# -# This file is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or -# (at your option) any later version. -# -# This file is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this file. If not, see . -# -# As a special exception to the GNU General Public License, -# this file may be distributed as part of a program that -# contains a configuration script generated by Autoconf, under -# the same distribution terms as the rest of that program. -# -# Generated by gnulib-tool. -# -# This file represents the compiled summary of the specification in -# gnulib-cache.m4. It lists the computed macro invocations that need -# to be invoked from configure.ac. -# In projects that use version control, this file can be treated like -# other built files. - - -# This macro should be invoked from ./configure.ac, in the section -# "Checks for programs", right after AC_PROG_CC, and certainly before -# any checks for libraries, header files, types and library functions. -AC_DEFUN([gl_EARLY], -[ - m4_pattern_forbid([^gl_[A-Z]])dnl the gnulib macro namespace - m4_pattern_allow([^gl_ES$])dnl a valid locale name - m4_pattern_allow([^gl_LIBOBJS$])dnl a variable - m4_pattern_allow([^gl_LTLIBOBJS$])dnl a variable - - # Pre-early section. - AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) - AC_REQUIRE([gl_PROG_AR_RANLIB]) - - # Code from module absolute-header: - # Code from module autobuild: - AB_INIT - # Code from module clock-time: - # Code from module errno: - # Code from module extensions: - # Code from module extern-inline: - # Code from module fdl-1.3: - # Code from module fstat: - # Code from module ftell: - # Code from module ftello: - AC_REQUIRE([AC_FUNC_FSEEKO]) - # Code from module gendocs: - # Code from module getopt-gnu: - # Code from module getopt-posix: - # Code from module gettext-h: - # Code from module gettime: - # Code from module gettimeofday: - # Code from module gnumakefile: - # Code from module gnupload: - # Code from module include_next: - # Code from module largefile: - AC_REQUIRE([AC_SYS_LARGEFILE]) - # Code from module limits-h: - # Code from module lseek: - # Code from module maintainer-makefile: - # Code from module malloc-posix: - # Code from module manywarnings: - # Code from module msvc-inval: - # Code from module msvc-nothrow: - # Code from module multiarch: - # Code from module nocrash: - # Code from module pmccabe2html: - # Code from module progname: - # Code from module read-file: - # Code from module realloc-posix: - # Code from module snippet/_Noreturn: - # Code from module snippet/arg-nonnull: - # Code from module snippet/c++defs: - # Code from module snippet/warn-on-use: - # Code from module ssize_t: - # Code from module stdarg: - dnl Some compilers (e.g., AIX 5.3 cc) need to be in c99 mode - dnl for the builtin va_copy to work. With Autoconf 2.60 or later, - dnl gl_PROG_CC_C99 arranges for this. With older Autoconf gl_PROG_CC_C99 - dnl shouldn't hurt, though installers are on their own to set c99 mode. - gl_PROG_CC_C99 - # Code from module stddef: - # Code from module stdint: - # Code from module stdio: - # Code from module stdlib: - # Code from module sys_stat: - # Code from module sys_time: - # Code from module sys_types: - # Code from module time: - # Code from module timespec: - # Code from module unistd: - # Code from module update-copyright: - # Code from module useless-if-before-free: - # Code from module valgrind-tests: - # Code from module vc-list-files: - # Code from module version-etc: - # Code from module version-etc-fsf: - # Code from module warnings: -]) - -# This macro should be invoked from ./configure.ac, in the section -# "Check for header files, types and library functions". -AC_DEFUN([gl_INIT], -[ - AM_CONDITIONAL([GL_COND_LIBTOOL], [true]) - gl_cond_libtool=true - gl_m4_base='gl/m4' - m4_pushdef([AC_LIBOBJ], m4_defn([gl_LIBOBJ])) - m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gl_REPLACE_FUNCS])) - m4_pushdef([AC_LIBSOURCES], m4_defn([gl_LIBSOURCES])) - m4_pushdef([gl_LIBSOURCES_LIST], []) - m4_pushdef([gl_LIBSOURCES_DIR], []) - gl_COMMON - gl_source_base='gl' - gl_CLOCK_TIME - gl_HEADER_ERRNO_H - AC_REQUIRE([gl_EXTERN_INLINE]) - gl_FUNC_FSTAT - if test $REPLACE_FSTAT = 1; then - AC_LIBOBJ([fstat]) - gl_PREREQ_FSTAT - fi - gl_SYS_STAT_MODULE_INDICATOR([fstat]) - gl_FUNC_FTELL - if test $REPLACE_FTELL = 1; then - AC_LIBOBJ([ftell]) - fi - gl_STDIO_MODULE_INDICATOR([ftell]) - gl_FUNC_FTELLO - if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then - AC_LIBOBJ([ftello]) - gl_PREREQ_FTELLO - fi - gl_STDIO_MODULE_INDICATOR([ftello]) - gl_FUNC_GETOPT_GNU - if test $REPLACE_GETOPT = 1; then - AC_LIBOBJ([getopt]) - AC_LIBOBJ([getopt1]) - gl_PREREQ_GETOPT - dnl Arrange for unistd.h to include getopt.h. - GNULIB_GL_UNISTD_H_GETOPT=1 - fi - AC_SUBST([GNULIB_GL_UNISTD_H_GETOPT]) - gl_FUNC_GETOPT_POSIX - if test $REPLACE_GETOPT = 1; then - AC_LIBOBJ([getopt]) - AC_LIBOBJ([getopt1]) - gl_PREREQ_GETOPT - dnl Arrange for unistd.h to include getopt.h. - GNULIB_GL_UNISTD_H_GETOPT=1 - fi - AC_SUBST([GNULIB_GL_UNISTD_H_GETOPT]) - AC_SUBST([LIBINTL]) - AC_SUBST([LTLIBINTL]) - gl_GETTIME - gl_FUNC_GETTIMEOFDAY - if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then - AC_LIBOBJ([gettimeofday]) - gl_PREREQ_GETTIMEOFDAY - fi - gl_SYS_TIME_MODULE_INDICATOR([gettimeofday]) - # Autoconf 2.61a.99 and earlier don't support linking a file only - # in VPATH builds. But since GNUmakefile is for maintainer use - # only, it does not matter if we skip the link with older autoconf. - # Automake 1.10.1 and earlier try to remove GNUmakefile in non-VPATH - # builds, so use a shell variable to bypass this. - GNUmakefile=GNUmakefile - m4_if(m4_version_compare([2.61a.100], - m4_defn([m4_PACKAGE_VERSION])), [1], [], - [AC_CONFIG_LINKS([$GNUmakefile:$GNUmakefile], [], - [GNUmakefile=$GNUmakefile])]) - AC_REQUIRE([gl_LARGEFILE]) - gl_LIMITS_H - gl_FUNC_LSEEK - if test $REPLACE_LSEEK = 1; then - AC_LIBOBJ([lseek]) - fi - gl_UNISTD_MODULE_INDICATOR([lseek]) - AC_CONFIG_COMMANDS_PRE([m4_ifdef([AH_HEADER], - [AC_SUBST([CONFIG_INCLUDE], m4_defn([AH_HEADER]))])]) - AC_REQUIRE([AC_PROG_SED]) - gl_FUNC_MALLOC_POSIX - if test $REPLACE_MALLOC = 1; then - AC_LIBOBJ([malloc]) - fi - gl_STDLIB_MODULE_INDICATOR([malloc-posix]) - AC_REQUIRE([gl_MSVC_INVAL]) - if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then - AC_LIBOBJ([msvc-inval]) - fi - AC_REQUIRE([gl_MSVC_NOTHROW]) - if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then - AC_LIBOBJ([msvc-nothrow]) - fi - gl_MULTIARCH - AC_PATH_PROG([PMCCABE], [pmccabe], [false]) - AC_CHECK_DECLS([program_invocation_name], [], [], [#include ]) - AC_CHECK_DECLS([program_invocation_short_name], [], [], [#include ]) - gl_PREREQ_READ_FILE - gl_FUNC_REALLOC_POSIX - if test $REPLACE_REALLOC = 1; then - AC_LIBOBJ([realloc]) - fi - gl_STDLIB_MODULE_INDICATOR([realloc-posix]) - gt_TYPE_SSIZE_T - gl_STDARG_H - gl_STDDEF_H - gl_STDINT_H - gl_STDIO_H - gl_STDLIB_H - gl_HEADER_SYS_STAT_H - AC_PROG_MKDIR_P - gl_HEADER_SYS_TIME_H - AC_PROG_MKDIR_P - gl_SYS_TYPES_H - AC_PROG_MKDIR_P - gl_HEADER_TIME_H - gl_TIMESPEC - gl_UNISTD_H - gl_VALGRIND_TESTS - gl_VERSION_ETC - # End of code from modules - m4_ifval(gl_LIBSOURCES_LIST, [ - m4_syscmd([test ! -d ]m4_defn([gl_LIBSOURCES_DIR])[ || - for gl_file in ]gl_LIBSOURCES_LIST[ ; do - if test ! -r ]m4_defn([gl_LIBSOURCES_DIR])[/$gl_file ; then - echo "missing file ]m4_defn([gl_LIBSOURCES_DIR])[/$gl_file" >&2 - exit 1 - fi - done])dnl - m4_if(m4_sysval, [0], [], - [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])]) - ]) - m4_popdef([gl_LIBSOURCES_DIR]) - m4_popdef([gl_LIBSOURCES_LIST]) - m4_popdef([AC_LIBSOURCES]) - m4_popdef([AC_REPLACE_FUNCS]) - m4_popdef([AC_LIBOBJ]) - AC_CONFIG_COMMANDS_PRE([ - gl_libobjs= - gl_ltlibobjs= - if test -n "$gl_LIBOBJS"; then - # Remove the extension. - sed_drop_objext='s/\.o$//;s/\.obj$//' - for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do - gl_libobjs="$gl_libobjs $i.$ac_objext" - gl_ltlibobjs="$gl_ltlibobjs $i.lo" - done - fi - AC_SUBST([gl_LIBOBJS], [$gl_libobjs]) - AC_SUBST([gl_LTLIBOBJS], [$gl_ltlibobjs]) - ]) - gltests_libdeps= - gltests_ltlibdeps= - m4_pushdef([AC_LIBOBJ], m4_defn([gltests_LIBOBJ])) - m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gltests_REPLACE_FUNCS])) - m4_pushdef([AC_LIBSOURCES], m4_defn([gltests_LIBSOURCES])) - m4_pushdef([gltests_LIBSOURCES_LIST], []) - m4_pushdef([gltests_LIBSOURCES_DIR], []) - gl_COMMON - gl_source_base='tests' -changequote(,)dnl - gltests_WITNESS=IN_`echo "${PACKAGE-$PACKAGE_TARNAME}" | LC_ALL=C tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ | LC_ALL=C sed -e 's/[^A-Z0-9_]/_/g'`_GNULIB_TESTS -changequote([, ])dnl - AC_SUBST([gltests_WITNESS]) - gl_module_indicator_condition=$gltests_WITNESS - m4_pushdef([gl_MODULE_INDICATOR_CONDITION], [$gl_module_indicator_condition]) - gl_VALGRIND_TESTS - m4_popdef([gl_MODULE_INDICATOR_CONDITION]) - m4_ifval(gltests_LIBSOURCES_LIST, [ - m4_syscmd([test ! -d ]m4_defn([gltests_LIBSOURCES_DIR])[ || - for gl_file in ]gltests_LIBSOURCES_LIST[ ; do - if test ! -r ]m4_defn([gltests_LIBSOURCES_DIR])[/$gl_file ; then - echo "missing file ]m4_defn([gltests_LIBSOURCES_DIR])[/$gl_file" >&2 - exit 1 - fi - done])dnl - m4_if(m4_sysval, [0], [], - [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])]) - ]) - m4_popdef([gltests_LIBSOURCES_DIR]) - m4_popdef([gltests_LIBSOURCES_LIST]) - m4_popdef([AC_LIBSOURCES]) - m4_popdef([AC_REPLACE_FUNCS]) - m4_popdef([AC_LIBOBJ]) - AC_CONFIG_COMMANDS_PRE([ - gltests_libobjs= - gltests_ltlibobjs= - if test -n "$gltests_LIBOBJS"; then - # Remove the extension. - sed_drop_objext='s/\.o$//;s/\.obj$//' - for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do - gltests_libobjs="$gltests_libobjs $i.$ac_objext" - gltests_ltlibobjs="$gltests_ltlibobjs $i.lo" - done - fi - AC_SUBST([gltests_LIBOBJS], [$gltests_libobjs]) - AC_SUBST([gltests_LTLIBOBJS], [$gltests_ltlibobjs]) - ]) -]) - -# Like AC_LIBOBJ, except that the module name goes -# into gl_LIBOBJS instead of into LIBOBJS. -AC_DEFUN([gl_LIBOBJ], [ - AS_LITERAL_IF([$1], [gl_LIBSOURCES([$1.c])])dnl - gl_LIBOBJS="$gl_LIBOBJS $1.$ac_objext" -]) - -# Like AC_REPLACE_FUNCS, except that the module name goes -# into gl_LIBOBJS instead of into LIBOBJS. -AC_DEFUN([gl_REPLACE_FUNCS], [ - m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl - AC_CHECK_FUNCS([$1], , [gl_LIBOBJ($ac_func)]) -]) - -# Like AC_LIBSOURCES, except the directory where the source file is -# expected is derived from the gnulib-tool parameterization, -# and alloca is special cased (for the alloca-opt module). -# We could also entirely rely on EXTRA_lib..._SOURCES. -AC_DEFUN([gl_LIBSOURCES], [ - m4_foreach([_gl_NAME], [$1], [ - m4_if(_gl_NAME, [alloca.c], [], [ - m4_define([gl_LIBSOURCES_DIR], [gl]) - m4_append([gl_LIBSOURCES_LIST], _gl_NAME, [ ]) - ]) - ]) -]) - -# Like AC_LIBOBJ, except that the module name goes -# into gltests_LIBOBJS instead of into LIBOBJS. -AC_DEFUN([gltests_LIBOBJ], [ - AS_LITERAL_IF([$1], [gltests_LIBSOURCES([$1.c])])dnl - gltests_LIBOBJS="$gltests_LIBOBJS $1.$ac_objext" -]) - -# Like AC_REPLACE_FUNCS, except that the module name goes -# into gltests_LIBOBJS instead of into LIBOBJS. -AC_DEFUN([gltests_REPLACE_FUNCS], [ - m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl - AC_CHECK_FUNCS([$1], , [gltests_LIBOBJ($ac_func)]) -]) - -# Like AC_LIBSOURCES, except the directory where the source file is -# expected is derived from the gnulib-tool parameterization, -# and alloca is special cased (for the alloca-opt module). -# We could also entirely rely on EXTRA_lib..._SOURCES. -AC_DEFUN([gltests_LIBSOURCES], [ - m4_foreach([_gl_NAME], [$1], [ - m4_if(_gl_NAME, [alloca.c], [], [ - m4_define([gltests_LIBSOURCES_DIR], [tests]) - m4_append([gltests_LIBSOURCES_LIST], _gl_NAME, [ ]) - ]) - ]) -]) - -# This macro records the list of files which have been installed by -# gnulib-tool and may be removed by future gnulib-tool invocations. -AC_DEFUN([gl_FILE_LIST], [ - build-aux/gendocs.sh - build-aux/gnupload - build-aux/pmccabe.css - build-aux/pmccabe2html - build-aux/snippet/_Noreturn.h - build-aux/snippet/arg-nonnull.h - build-aux/snippet/c++defs.h - build-aux/snippet/warn-on-use.h - build-aux/update-copyright - build-aux/useless-if-before-free - build-aux/vc-list-files - doc/fdl-1.3.texi - doc/gendocs_template - doc/gendocs_template_min - lib/errno.in.h - lib/fstat.c - lib/ftell.c - lib/ftello.c - lib/getopt.c - lib/getopt.in.h - lib/getopt1.c - lib/getopt_int.h - lib/gettext.h - lib/gettime.c - lib/gettimeofday.c - lib/limits.in.h - lib/lseek.c - lib/malloc.c - lib/msvc-inval.c - lib/msvc-inval.h - lib/msvc-nothrow.c - lib/msvc-nothrow.h - lib/progname.c - lib/progname.h - lib/read-file.c - lib/read-file.h - lib/realloc.c - lib/stdarg.in.h - lib/stddef.in.h - lib/stdint.in.h - lib/stdio-impl.h - lib/stdio.in.h - lib/stdlib.in.h - lib/sys_stat.in.h - lib/sys_time.in.h - lib/sys_types.in.h - lib/time.in.h - lib/timespec.c - lib/timespec.h - lib/unistd.c - lib/unistd.in.h - lib/version-etc-fsf.c - lib/version-etc.c - lib/version-etc.h - m4/00gnulib.m4 - m4/absolute-header.m4 - m4/autobuild.m4 - m4/clock_time.m4 - m4/errno_h.m4 - m4/extensions.m4 - m4/extern-inline.m4 - m4/fseeko.m4 - m4/fstat.m4 - m4/ftell.m4 - m4/ftello.m4 - m4/getopt.m4 - m4/gettime.m4 - m4/gettimeofday.m4 - m4/gnulib-common.m4 - m4/include_next.m4 - m4/largefile.m4 - m4/limits-h.m4 - m4/longlong.m4 - m4/lseek.m4 - m4/malloc.m4 - m4/manywarnings.m4 - m4/msvc-inval.m4 - m4/msvc-nothrow.m4 - m4/multiarch.m4 - m4/nocrash.m4 - m4/off_t.m4 - m4/read-file.m4 - m4/realloc.m4 - m4/ssize_t.m4 - m4/stdarg.m4 - m4/stddef_h.m4 - m4/stdint.m4 - m4/stdio_h.m4 - m4/stdlib_h.m4 - m4/sys_socket_h.m4 - m4/sys_stat_h.m4 - m4/sys_time_h.m4 - m4/sys_types_h.m4 - m4/time_h.m4 - m4/timespec.m4 - m4/unistd_h.m4 - m4/valgrind-tests.m4 - m4/version-etc.m4 - m4/warn-on-use.m4 - m4/warnings.m4 - m4/wchar_t.m4 - m4/wint_t.m4 - top/GNUmakefile - top/maint.mk -]) diff --git a/gl/m4/gnulib-tool.m4 b/gl/m4/gnulib-tool.m4 deleted file mode 100644 index 2e2d8f6..0000000 --- a/gl/m4/gnulib-tool.m4 +++ /dev/null @@ -1,57 +0,0 @@ -# gnulib-tool.m4 serial 2 -dnl Copyright (C) 2004-2005, 2009-2017 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl The following macros need not be invoked explicitly. -dnl Invoking them does nothing except to declare default arguments -dnl for "gnulib-tool --import". - -dnl Usage: gl_LOCAL_DIR([DIR]) -AC_DEFUN([gl_LOCAL_DIR], []) - -dnl Usage: gl_MODULES([module1 module2 ...]) -AC_DEFUN([gl_MODULES], []) - -dnl Usage: gl_AVOID([module1 module2 ...]) -AC_DEFUN([gl_AVOID], []) - -dnl Usage: gl_SOURCE_BASE([DIR]) -AC_DEFUN([gl_SOURCE_BASE], []) - -dnl Usage: gl_M4_BASE([DIR]) -AC_DEFUN([gl_M4_BASE], []) - -dnl Usage: gl_PO_BASE([DIR]) -AC_DEFUN([gl_PO_BASE], []) - -dnl Usage: gl_DOC_BASE([DIR]) -AC_DEFUN([gl_DOC_BASE], []) - -dnl Usage: gl_TESTS_BASE([DIR]) -AC_DEFUN([gl_TESTS_BASE], []) - -dnl Usage: gl_WITH_TESTS -AC_DEFUN([gl_WITH_TESTS], []) - -dnl Usage: gl_LIB([LIBNAME]) -AC_DEFUN([gl_LIB], []) - -dnl Usage: gl_LGPL or gl_LGPL([VERSION]) -AC_DEFUN([gl_LGPL], []) - -dnl Usage: gl_MAKEFILE_NAME([FILENAME]) -AC_DEFUN([gl_MAKEFILE_NAME], []) - -dnl Usage: gl_LIBTOOL -AC_DEFUN([gl_LIBTOOL], []) - -dnl Usage: gl_MACRO_PREFIX([PREFIX]) -AC_DEFUN([gl_MACRO_PREFIX], []) - -dnl Usage: gl_PO_DOMAIN([DOMAIN]) -AC_DEFUN([gl_PO_DOMAIN], []) - -dnl Usage: gl_VC_FILES([BOOLEAN]) -AC_DEFUN([gl_VC_FILES], []) diff --git a/gl/m4/include_next.m4 b/gl/m4/include_next.m4 deleted file mode 100644 index e687e23..0000000 --- a/gl/m4/include_next.m4 +++ /dev/null @@ -1,223 +0,0 @@ -# include_next.m4 serial 23 -dnl Copyright (C) 2006-2017 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Paul Eggert and Derek Price. - -dnl Sets INCLUDE_NEXT and PRAGMA_SYSTEM_HEADER. -dnl -dnl INCLUDE_NEXT expands to 'include_next' if the compiler supports it, or to -dnl 'include' otherwise. -dnl -dnl INCLUDE_NEXT_AS_FIRST_DIRECTIVE expands to 'include_next' if the compiler -dnl supports it in the special case that it is the first include directive in -dnl the given file, or to 'include' otherwise. -dnl -dnl PRAGMA_SYSTEM_HEADER can be used in files that contain #include_next, -dnl so as to avoid GCC warnings when the gcc option -pedantic is used. -dnl '#pragma GCC system_header' has the same effect as if the file was found -dnl through the include search path specified with '-isystem' options (as -dnl opposed to the search path specified with '-I' options). Namely, gcc -dnl does not warn about some things, and on some systems (Solaris and Interix) -dnl __STDC__ evaluates to 0 instead of to 1. The latter is an undesired side -dnl effect; we are therefore careful to use 'defined __STDC__' or '1' instead -dnl of plain '__STDC__'. -dnl -dnl PRAGMA_COLUMNS can be used in files that override system header files, so -dnl as to avoid compilation errors on HP NonStop systems when the gnulib file -dnl is included by a system header file that does a "#pragma COLUMNS 80" (which -dnl has the effect of truncating the lines of that file and all files that it -dnl includes to 80 columns) and the gnulib file has lines longer than 80 -dnl columns. - -AC_DEFUN([gl_INCLUDE_NEXT], -[ - AC_LANG_PREPROC_REQUIRE() - AC_CACHE_CHECK([whether the preprocessor supports include_next], - [gl_cv_have_include_next], - [rm -rf conftestd1a conftestd1b conftestd2 - mkdir conftestd1a conftestd1b conftestd2 - dnl IBM C 9.0, 10.1 (original versions, prior to the 2009-01 updates) on - dnl AIX 6.1 support include_next when used as first preprocessor directive - dnl in a file, but not when preceded by another include directive. Check - dnl for this bug by including . - dnl Additionally, with this same compiler, include_next is a no-op when - dnl used in a header file that was included by specifying its absolute - dnl file name. Despite these two bugs, include_next is used in the - dnl compiler's . By virtue of the second bug, we need to use - dnl include_next as well in this case. - cat < conftestd1a/conftest.h -#define DEFINED_IN_CONFTESTD1 -#include_next -#ifdef DEFINED_IN_CONFTESTD2 -int foo; -#else -#error "include_next doesn't work" -#endif -EOF - cat < conftestd1b/conftest.h -#define DEFINED_IN_CONFTESTD1 -#include -#include_next -#ifdef DEFINED_IN_CONFTESTD2 -int foo; -#else -#error "include_next doesn't work" -#endif -EOF - cat < conftestd2/conftest.h -#ifndef DEFINED_IN_CONFTESTD1 -#error "include_next test doesn't work" -#endif -#define DEFINED_IN_CONFTESTD2 -EOF - gl_save_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2" -dnl We intentionally avoid using AC_LANG_SOURCE here. - AC_COMPILE_IFELSE([AC_LANG_DEFINES_PROVIDED[#include ]], - [gl_cv_have_include_next=yes], - [CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2" - AC_COMPILE_IFELSE([AC_LANG_DEFINES_PROVIDED[#include ]], - [gl_cv_have_include_next=buggy], - [gl_cv_have_include_next=no]) - ]) - CPPFLAGS="$gl_save_CPPFLAGS" - rm -rf conftestd1a conftestd1b conftestd2 - ]) - PRAGMA_SYSTEM_HEADER= - if test $gl_cv_have_include_next = yes; then - INCLUDE_NEXT=include_next - INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next - if test -n "$GCC"; then - PRAGMA_SYSTEM_HEADER='#pragma GCC system_header' - fi - else - if test $gl_cv_have_include_next = buggy; then - INCLUDE_NEXT=include - INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next - else - INCLUDE_NEXT=include - INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include - fi - fi - AC_SUBST([INCLUDE_NEXT]) - AC_SUBST([INCLUDE_NEXT_AS_FIRST_DIRECTIVE]) - AC_SUBST([PRAGMA_SYSTEM_HEADER]) - AC_CACHE_CHECK([whether system header files limit the line length], - [gl_cv_pragma_columns], - [dnl HP NonStop systems, which define __TANDEM, have this misfeature. - AC_EGREP_CPP([choke me], - [ -#ifdef __TANDEM -choke me -#endif - ], - [gl_cv_pragma_columns=yes], - [gl_cv_pragma_columns=no]) - ]) - if test $gl_cv_pragma_columns = yes; then - PRAGMA_COLUMNS="#pragma COLUMNS 10000" - else - PRAGMA_COLUMNS= - fi - AC_SUBST([PRAGMA_COLUMNS]) -]) - -# gl_CHECK_NEXT_HEADERS(HEADER1 HEADER2 ...) -# ------------------------------------------ -# For each arg foo.h, if #include_next works, define NEXT_FOO_H to be -# ''; otherwise define it to be -# '"///usr/include/foo.h"', or whatever other absolute file name is suitable. -# Also, if #include_next works as first preprocessing directive in a file, -# define NEXT_AS_FIRST_DIRECTIVE_FOO_H to be ''; otherwise define it to -# be -# '"///usr/include/foo.h"', or whatever other absolute file name is suitable. -# That way, a header file with the following line: -# #@INCLUDE_NEXT@ @NEXT_FOO_H@ -# or -# #@INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ @NEXT_AS_FIRST_DIRECTIVE_FOO_H@ -# behaves (after sed substitution) as if it contained -# #include_next -# even if the compiler does not support include_next. -# The three "///" are to pacify Sun C 5.8, which otherwise would say -# "warning: #include of /usr/include/... may be non-portable". -# Use '""', not '<>', so that the /// cannot be confused with a C99 comment. -# Note: This macro assumes that the header file is not empty after -# preprocessing, i.e. it does not only define preprocessor macros but also -# provides some type/enum definitions or function/variable declarations. -# -# This macro also checks whether each header exists, by invoking -# AC_CHECK_HEADERS_ONCE or AC_CHECK_HEADERS on each argument. -AC_DEFUN([gl_CHECK_NEXT_HEADERS], -[ - gl_NEXT_HEADERS_INTERNAL([$1], [check]) -]) - -# gl_NEXT_HEADERS(HEADER1 HEADER2 ...) -# ------------------------------------ -# Like gl_CHECK_NEXT_HEADERS, except do not check whether the headers exist. -# This is suitable for headers like that are standardized by C89 -# and therefore can be assumed to exist. -AC_DEFUN([gl_NEXT_HEADERS], -[ - gl_NEXT_HEADERS_INTERNAL([$1], [assume]) -]) - -# The guts of gl_CHECK_NEXT_HEADERS and gl_NEXT_HEADERS. -AC_DEFUN([gl_NEXT_HEADERS_INTERNAL], -[ - AC_REQUIRE([gl_INCLUDE_NEXT]) - AC_REQUIRE([AC_CANONICAL_HOST]) - - m4_if([$2], [check], - [AC_CHECK_HEADERS_ONCE([$1]) - ]) - -dnl FIXME: gl_next_header and gl_header_exists must be used unquoted -dnl until we can assume autoconf 2.64 or newer. - m4_foreach_w([gl_HEADER_NAME], [$1], - [AS_VAR_PUSHDEF([gl_next_header], - [gl_cv_next_]m4_defn([gl_HEADER_NAME])) - if test $gl_cv_have_include_next = yes; then - AS_VAR_SET(gl_next_header, ['<'gl_HEADER_NAME'>']) - else - AC_CACHE_CHECK( - [absolute name of <]m4_defn([gl_HEADER_NAME])[>], - m4_defn([gl_next_header]), - [m4_if([$2], [check], - [AS_VAR_PUSHDEF([gl_header_exists], - [ac_cv_header_]m4_defn([gl_HEADER_NAME])) - if test AS_VAR_GET(gl_header_exists) = yes; then - AS_VAR_POPDEF([gl_header_exists]) - ]) - gl_ABSOLUTE_HEADER_ONE(gl_HEADER_NAME) - AS_VAR_COPY([gl_header], [gl_cv_absolute_]AS_TR_SH(gl_HEADER_NAME)) - AS_VAR_SET(gl_next_header, ['"'$gl_header'"']) - m4_if([$2], [check], - [else - AS_VAR_SET(gl_next_header, ['<'gl_HEADER_NAME'>']) - fi - ]) - ]) - fi - AC_SUBST( - AS_TR_CPP([NEXT_]m4_defn([gl_HEADER_NAME])), - [AS_VAR_GET(gl_next_header)]) - if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' - gl_next_as_first_directive='<'gl_HEADER_NAME'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=AS_VAR_GET(gl_next_header) - fi - AC_SUBST( - AS_TR_CPP([NEXT_AS_FIRST_DIRECTIVE_]m4_defn([gl_HEADER_NAME])), - [$gl_next_as_first_directive]) - AS_VAR_POPDEF([gl_next_header])]) -]) - -# Autoconf 2.68 added warnings for our use of AC_COMPILE_IFELSE; -# this fallback is safe for all earlier autoconf versions. -m4_define_default([AC_LANG_DEFINES_PROVIDED]) diff --git a/gl/m4/largefile.m4 b/gl/m4/largefile.m4 deleted file mode 100644 index 790f7c0..0000000 --- a/gl/m4/largefile.m4 +++ /dev/null @@ -1,146 +0,0 @@ -# Enable large files on systems where this is not the default. - -# Copyright 1992-1996, 1998-2017 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# The following implementation works around a problem in autoconf <= 2.69; -# AC_SYS_LARGEFILE does not configure for large inodes on Mac OS X 10.5, -# or configures them incorrectly in some cases. -m4_version_prereq([2.70], [] ,[ - -# _AC_SYS_LARGEFILE_TEST_INCLUDES -# ------------------------------- -m4_define([_AC_SYS_LARGEFILE_TEST_INCLUDES], -[@%:@include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -@%:@define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]];[]dnl -]) - - -# _AC_SYS_LARGEFILE_MACRO_VALUE(C-MACRO, VALUE, -# CACHE-VAR, -# DESCRIPTION, -# PROLOGUE, [FUNCTION-BODY]) -# -------------------------------------------------------- -m4_define([_AC_SYS_LARGEFILE_MACRO_VALUE], -[AC_CACHE_CHECK([for $1 value needed for large files], [$3], -[while :; do - m4_ifval([$6], [AC_LINK_IFELSE], [AC_COMPILE_IFELSE])( - [AC_LANG_PROGRAM([$5], [$6])], - [$3=no; break]) - m4_ifval([$6], [AC_LINK_IFELSE], [AC_COMPILE_IFELSE])( - [AC_LANG_PROGRAM([@%:@define $1 $2 -$5], [$6])], - [$3=$2; break]) - $3=unknown - break -done]) -case $$3 in #( - no | unknown) ;; - *) AC_DEFINE_UNQUOTED([$1], [$$3], [$4]);; -esac -rm -rf conftest*[]dnl -])# _AC_SYS_LARGEFILE_MACRO_VALUE - - -# AC_SYS_LARGEFILE -# ---------------- -# By default, many hosts won't let programs access large files; -# one must use special compiler options to get large-file access to work. -# For more details about this brain damage please see: -# http://www.unix-systems.org/version2/whatsnew/lfs20mar.html -AC_DEFUN([AC_SYS_LARGEFILE], -[AC_ARG_ENABLE(largefile, - [ --disable-largefile omit support for large files]) -if test "$enable_largefile" != no; then - - AC_CACHE_CHECK([for special C compiler options needed for large files], - ac_cv_sys_largefile_CC, - [ac_cv_sys_largefile_CC=no - if test "$GCC" != yes; then - ac_save_CC=$CC - while :; do - # IRIX 6.2 and later do not support large files by default, - # so use the C compiler's -n32 option if that helps. - AC_LANG_CONFTEST([AC_LANG_PROGRAM([_AC_SYS_LARGEFILE_TEST_INCLUDES])]) - AC_COMPILE_IFELSE([], [break]) - CC="$CC -n32" - AC_COMPILE_IFELSE([], [ac_cv_sys_largefile_CC=' -n32'; break]) - break - done - CC=$ac_save_CC - rm -f conftest.$ac_ext - fi]) - if test "$ac_cv_sys_largefile_CC" != no; then - CC=$CC$ac_cv_sys_largefile_CC - fi - - _AC_SYS_LARGEFILE_MACRO_VALUE(_FILE_OFFSET_BITS, 64, - ac_cv_sys_file_offset_bits, - [Number of bits in a file offset, on hosts where this is settable.], - [_AC_SYS_LARGEFILE_TEST_INCLUDES]) - if test $ac_cv_sys_file_offset_bits = unknown; then - _AC_SYS_LARGEFILE_MACRO_VALUE(_LARGE_FILES, 1, - ac_cv_sys_large_files, - [Define for large files, on AIX-style hosts.], - [_AC_SYS_LARGEFILE_TEST_INCLUDES]) - fi - - AC_DEFINE([_DARWIN_USE_64_BIT_INODE], [1], - [Enable large inode numbers on Mac OS X 10.5.]) -fi -])# AC_SYS_LARGEFILE -])# m4_version_prereq 2.70 - -# Enable large files on systems where this is implemented by Gnulib, not by the -# system headers. -# Set the variables WINDOWS_64_BIT_OFF_T, WINDOWS_64_BIT_ST_SIZE if Gnulib -# overrides ensure that off_t or 'struct size.st_size' are 64-bit, respectively. -AC_DEFUN([gl_LARGEFILE], -[ - AC_REQUIRE([AC_CANONICAL_HOST]) - case "$host_os" in - mingw*) - dnl Native Windows. - dnl mingw64 defines off_t to a 64-bit type already, if - dnl _FILE_OFFSET_BITS=64, which is ensured by AC_SYS_LARGEFILE. - AC_CACHE_CHECK([for 64-bit off_t], [gl_cv_type_off_t_64], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[#include - int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1]; - ]], - [[]])], - [gl_cv_type_off_t_64=yes], [gl_cv_type_off_t_64=no]) - ]) - if test $gl_cv_type_off_t_64 = no; then - WINDOWS_64_BIT_OFF_T=1 - else - WINDOWS_64_BIT_OFF_T=0 - fi - dnl But all native Windows platforms (including mingw64) have a 32-bit - dnl st_size member in 'struct stat'. - WINDOWS_64_BIT_ST_SIZE=1 - ;; - *) - dnl Nothing to do on gnulib's side. - dnl A 64-bit off_t is - dnl - already the default on Mac OS X, FreeBSD, NetBSD, OpenBSD, IRIX, - dnl OSF/1, Cygwin, - dnl - enabled by _FILE_OFFSET_BITS=64 (ensured by AC_SYS_LARGEFILE) on - dnl glibc, HP-UX, Solaris, - dnl - enabled by _LARGE_FILES=1 (ensured by AC_SYS_LARGEFILE) on AIX, - dnl - impossible to achieve on Minix 3.1.8. - WINDOWS_64_BIT_OFF_T=0 - WINDOWS_64_BIT_ST_SIZE=0 - ;; - esac -]) diff --git a/gl/m4/limits-h.m4 b/gl/m4/limits-h.m4 deleted file mode 100644 index 443f91b..0000000 --- a/gl/m4/limits-h.m4 +++ /dev/null @@ -1,31 +0,0 @@ -dnl Check whether limits.h has needed features. - -dnl Copyright 2016-2017 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Paul Eggert. - -AC_DEFUN_ONCE([gl_LIMITS_H], -[ - gl_CHECK_NEXT_HEADERS([limits.h]) - - AC_CACHE_CHECK([whether limits.h has ULLONG_WIDTH etc.], - [gl_cv_header_limits_width], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([[#ifndef __STDC_WANT_IEC_60559_BFP_EXT__ - #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 - #endif - #include - int ullw = ULLONG_WIDTH;]])], - [gl_cv_header_limits_width=yes], - [gl_cv_header_limits_width=no])]) - if test "$gl_cv_header_limits_width" = yes; then - LIMITS_H= - else - LIMITS_H=limits.h - fi - AC_SUBST([LIMITS_H]) - AM_CONDITIONAL([GL_GENERATE_LIMITS_H], [test -n "$LIMITS_H"]) -]) diff --git a/gl/m4/longlong.m4 b/gl/m4/longlong.m4 deleted file mode 100644 index 9a3294b..0000000 --- a/gl/m4/longlong.m4 +++ /dev/null @@ -1,113 +0,0 @@ -# longlong.m4 serial 17 -dnl Copyright (C) 1999-2007, 2009-2017 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Paul Eggert. - -# Define HAVE_LONG_LONG_INT if 'long long int' works. -# This fixes a bug in Autoconf 2.61, and can be faster -# than what's in Autoconf 2.62 through 2.68. - -# Note: If the type 'long long int' exists but is only 32 bits large -# (as on some very old compilers), HAVE_LONG_LONG_INT will not be -# defined. In this case you can treat 'long long int' like 'long int'. - -AC_DEFUN([AC_TYPE_LONG_LONG_INT], -[ - AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT]) - AC_CACHE_CHECK([for long long int], [ac_cv_type_long_long_int], - [ac_cv_type_long_long_int=yes - if test "x${ac_cv_prog_cc_c99-no}" = xno; then - ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int - if test $ac_cv_type_long_long_int = yes; then - dnl Catch a bug in Tandem NonStop Kernel (OSS) cc -O circa 2004. - dnl If cross compiling, assume the bug is not important, since - dnl nobody cross compiles for this platform as far as we know. - AC_RUN_IFELSE( - [AC_LANG_PROGRAM( - [[@%:@include - @%:@ifndef LLONG_MAX - @%:@ define HALF \ - (1LL << (sizeof (long long int) * CHAR_BIT - 2)) - @%:@ define LLONG_MAX (HALF - 1 + HALF) - @%:@endif]], - [[long long int n = 1; - int i; - for (i = 0; ; i++) - { - long long int m = n << i; - if (m >> i != n) - return 1; - if (LLONG_MAX / 2 < m) - break; - } - return 0;]])], - [], - [ac_cv_type_long_long_int=no], - [:]) - fi - fi]) - if test $ac_cv_type_long_long_int = yes; then - AC_DEFINE([HAVE_LONG_LONG_INT], [1], - [Define to 1 if the system has the type 'long long int'.]) - fi -]) - -# Define HAVE_UNSIGNED_LONG_LONG_INT if 'unsigned long long int' works. -# This fixes a bug in Autoconf 2.61, and can be faster -# than what's in Autoconf 2.62 through 2.68. - -# Note: If the type 'unsigned long long int' exists but is only 32 bits -# large (as on some very old compilers), AC_TYPE_UNSIGNED_LONG_LONG_INT -# will not be defined. In this case you can treat 'unsigned long long int' -# like 'unsigned long int'. - -AC_DEFUN([AC_TYPE_UNSIGNED_LONG_LONG_INT], -[ - AC_CACHE_CHECK([for unsigned long long int], - [ac_cv_type_unsigned_long_long_int], - [ac_cv_type_unsigned_long_long_int=yes - if test "x${ac_cv_prog_cc_c99-no}" = xno; then - AC_LINK_IFELSE( - [_AC_TYPE_LONG_LONG_SNIPPET], - [], - [ac_cv_type_unsigned_long_long_int=no]) - fi]) - if test $ac_cv_type_unsigned_long_long_int = yes; then - AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], [1], - [Define to 1 if the system has the type 'unsigned long long int'.]) - fi -]) - -# Expands to a C program that can be used to test for simultaneous support -# of 'long long' and 'unsigned long long'. We don't want to say that -# 'long long' is available if 'unsigned long long' is not, or vice versa, -# because too many programs rely on the symmetry between signed and unsigned -# integer types (excluding 'bool'). -AC_DEFUN([_AC_TYPE_LONG_LONG_SNIPPET], -[ - AC_LANG_PROGRAM( - [[/* For now, do not test the preprocessor; as of 2007 there are too many - implementations with broken preprocessors. Perhaps this can - be revisited in 2012. In the meantime, code should not expect - #if to work with literals wider than 32 bits. */ - /* Test literals. */ - long long int ll = 9223372036854775807ll; - long long int nll = -9223372036854775807LL; - unsigned long long int ull = 18446744073709551615ULL; - /* Test constant expressions. */ - typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) - ? 1 : -1)]; - typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 - ? 1 : -1)]; - int i = 63;]], - [[/* Test availability of runtime routines for shift and division. */ - long long int llmax = 9223372036854775807ll; - unsigned long long int ullmax = 18446744073709551615ull; - return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) - | (llmax / ll) | (llmax % ll) - | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) - | (ullmax / ull) | (ullmax % ull));]]) -]) diff --git a/gl/m4/lseek.m4 b/gl/m4/lseek.m4 deleted file mode 100644 index 627e772..0000000 --- a/gl/m4/lseek.m4 +++ /dev/null @@ -1,71 +0,0 @@ -# lseek.m4 serial 10 -dnl Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_LSEEK], -[ - AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) - - AC_REQUIRE([AC_CANONICAL_HOST]) - AC_REQUIRE([AC_PROG_CC]) - AC_CHECK_HEADERS_ONCE([unistd.h]) - AC_CACHE_CHECK([whether lseek detects pipes], [gl_cv_func_lseek_pipe], - [case "$host_os" in - mingw*) - dnl Native Windows. - dnl The result of lseek (fd, (off_t)0, SEEK_CUR) or - dnl SetFilePointer(handle, 0, NULL, FILE_CURRENT) - dnl for a pipe depends on the environment: In a Cygwin 1.5 - dnl environment it succeeds (wrong); in a Cygwin 1.7 environment - dnl it fails with a wrong errno value. - gl_cv_func_lseek_pipe=no - ;; - *) - if test $cross_compiling = no; then - AC_LINK_IFELSE([AC_LANG_PROGRAM([[ -#include /* for off_t */ -#include /* for SEEK_CUR */ -#if HAVE_UNISTD_H -# include -#else /* on Windows with MSVC */ -# include -#endif -]], [[ - /* Exit with success only if stdin is seekable. */ - return lseek (0, (off_t)0, SEEK_CUR) < 0; -]])], - [if test -s conftest$ac_exeext \ - && ./conftest$ac_exeext < conftest.$ac_ext \ - && test 1 = "`echo hi \ - | { ./conftest$ac_exeext; echo $?; cat >/dev/null; }`"; then - gl_cv_func_lseek_pipe=yes - else - gl_cv_func_lseek_pipe=no - fi - ], - [gl_cv_func_lseek_pipe=no]) - else - AC_COMPILE_IFELSE( - [AC_LANG_SOURCE([[ -#if defined __BEOS__ -/* BeOS mistakenly return 0 when trying to seek on pipes. */ - Choke me. -#endif]])], - [gl_cv_func_lseek_pipe=yes], [gl_cv_func_lseek_pipe=no]) - fi - ;; - esac - ]) - if test $gl_cv_func_lseek_pipe = no; then - REPLACE_LSEEK=1 - AC_DEFINE([LSEEK_PIPE_BROKEN], [1], - [Define to 1 if lseek does not detect pipes.]) - fi - - AC_REQUIRE([gl_SYS_TYPES_H]) - if test $WINDOWS_64_BIT_OFF_T = 1; then - REPLACE_LSEEK=1 - fi -]) diff --git a/gl/m4/malloc.m4 b/gl/m4/malloc.m4 deleted file mode 100644 index e1d2ec6..0000000 --- a/gl/m4/malloc.m4 +++ /dev/null @@ -1,101 +0,0 @@ -# malloc.m4 serial 15 -dnl Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -m4_version_prereq([2.70], [] ,[ - -# This is adapted with modifications from upstream Autoconf here: -# http://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=04be2b7a29d65d9a08e64e8e56e594c91749598c -AC_DEFUN([_AC_FUNC_MALLOC_IF], -[ - AC_REQUIRE([AC_HEADER_STDC])dnl - AC_REQUIRE([AC_CANONICAL_HOST])dnl for cross-compiles - AC_CHECK_HEADERS([stdlib.h]) - AC_CACHE_CHECK([for GNU libc compatible malloc], - [ac_cv_func_malloc_0_nonnull], - [AC_RUN_IFELSE( - [AC_LANG_PROGRAM( - [[#if defined STDC_HEADERS || defined HAVE_STDLIB_H - # include - #else - char *malloc (); - #endif - ]], - [[char *p = malloc (0); - int result = !p; - free (p); - return result;]]) - ], - [ac_cv_func_malloc_0_nonnull=yes], - [ac_cv_func_malloc_0_nonnull=no], - [case "$host_os" in - # Guess yes on platforms where we know the result. - *-gnu* | freebsd* | netbsd* | openbsd* \ - | hpux* | solaris* | cygwin* | mingw*) - ac_cv_func_malloc_0_nonnull=yes ;; - # If we don't know, assume the worst. - *) ac_cv_func_malloc_0_nonnull=no ;; - esac - ]) - ]) - AS_IF([test $ac_cv_func_malloc_0_nonnull = yes], [$1], [$2]) -])# _AC_FUNC_MALLOC_IF - -]) - -# gl_FUNC_MALLOC_GNU -# ------------------ -# Test whether 'malloc (0)' is handled like in GNU libc, and replace malloc if -# it is not. -AC_DEFUN([gl_FUNC_MALLOC_GNU], -[ - AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) - dnl _AC_FUNC_MALLOC_IF is defined in Autoconf. - _AC_FUNC_MALLOC_IF( - [AC_DEFINE([HAVE_MALLOC_GNU], [1], - [Define to 1 if your system has a GNU libc compatible 'malloc' - function, and to 0 otherwise.])], - [AC_DEFINE([HAVE_MALLOC_GNU], [0]) - REPLACE_MALLOC=1 - ]) -]) - -# gl_FUNC_MALLOC_POSIX -# -------------------- -# Test whether 'malloc' is POSIX compliant (sets errno to ENOMEM when it -# fails), and replace malloc if it is not. -AC_DEFUN([gl_FUNC_MALLOC_POSIX], -[ - AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) - AC_REQUIRE([gl_CHECK_MALLOC_POSIX]) - if test $gl_cv_func_malloc_posix = yes; then - AC_DEFINE([HAVE_MALLOC_POSIX], [1], - [Define if the 'malloc' function is POSIX compliant.]) - else - REPLACE_MALLOC=1 - fi -]) - -# Test whether malloc, realloc, calloc are POSIX compliant, -# Set gl_cv_func_malloc_posix to yes or no accordingly. -AC_DEFUN([gl_CHECK_MALLOC_POSIX], -[ - AC_CACHE_CHECK([whether malloc, realloc, calloc are POSIX compliant], - [gl_cv_func_malloc_posix], - [ - dnl It is too dangerous to try to allocate a large amount of memory: - dnl some systems go to their knees when you do that. So assume that - dnl all Unix implementations of the function are POSIX compliant. - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[]], - [[#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - choke me - #endif - ]])], - [gl_cv_func_malloc_posix=yes], - [gl_cv_func_malloc_posix=no]) - ]) -]) diff --git a/gl/m4/manywarnings.m4 b/gl/m4/manywarnings.m4 deleted file mode 100644 index 0f06ade..0000000 --- a/gl/m4/manywarnings.m4 +++ /dev/null @@ -1,276 +0,0 @@ -# manywarnings.m4 serial 8 -dnl Copyright (C) 2008-2017 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Simon Josefsson - -# gl_MANYWARN_COMPLEMENT(OUTVAR, LISTVAR, REMOVEVAR) -# -------------------------------------------------- -# Copy LISTVAR to OUTVAR except for the entries in REMOVEVAR. -# Elements separated by whitespace. In set logic terms, the function -# does OUTVAR = LISTVAR \ REMOVEVAR. -AC_DEFUN([gl_MANYWARN_COMPLEMENT], -[ - gl_warn_set= - set x $2; shift - for gl_warn_item - do - case " $3 " in - *" $gl_warn_item "*) - ;; - *) - gl_warn_set="$gl_warn_set $gl_warn_item" - ;; - esac - done - $1=$gl_warn_set -]) - -# gl_MANYWARN_ALL_GCC(VARIABLE) -# ----------------------------- -# Add all documented GCC warning parameters to variable VARIABLE. -# Note that you need to test them using gl_WARN_ADD if you want to -# make sure your gcc understands it. -AC_DEFUN([gl_MANYWARN_ALL_GCC], -[ - dnl First, check for some issues that only occur when combining multiple - dnl gcc warning categories. - AC_REQUIRE([AC_PROG_CC]) - if test -n "$GCC"; then - - dnl Check if -W -Werror -Wno-missing-field-initializers is supported - dnl with the current $CC $CFLAGS $CPPFLAGS. - AC_MSG_CHECKING([whether -Wno-missing-field-initializers is supported]) - AC_CACHE_VAL([gl_cv_cc_nomfi_supported], [ - gl_save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -W -Werror -Wno-missing-field-initializers" - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([[]], [[]])], - [gl_cv_cc_nomfi_supported=yes], - [gl_cv_cc_nomfi_supported=no]) - CFLAGS="$gl_save_CFLAGS"]) - AC_MSG_RESULT([$gl_cv_cc_nomfi_supported]) - - if test "$gl_cv_cc_nomfi_supported" = yes; then - dnl Now check whether -Wno-missing-field-initializers is needed - dnl for the { 0, } construct. - AC_MSG_CHECKING([whether -Wno-missing-field-initializers is needed]) - AC_CACHE_VAL([gl_cv_cc_nomfi_needed], [ - gl_save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -W -Werror" - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[int f (void) - { - typedef struct { int a; int b; } s_t; - s_t s1 = { 0, }; - return s1.b; - } - ]], - [[]])], - [gl_cv_cc_nomfi_needed=no], - [gl_cv_cc_nomfi_needed=yes]) - CFLAGS="$gl_save_CFLAGS" - ]) - AC_MSG_RESULT([$gl_cv_cc_nomfi_needed]) - fi - - dnl Next, check if -Werror -Wuninitialized is useful with the - dnl user's choice of $CFLAGS; some versions of gcc warn that it - dnl has no effect if -O is not also used - AC_MSG_CHECKING([whether -Wuninitialized is supported]) - AC_CACHE_VAL([gl_cv_cc_uninitialized_supported], [ - gl_save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -Werror -Wuninitialized" - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([[]], [[]])], - [gl_cv_cc_uninitialized_supported=yes], - [gl_cv_cc_uninitialized_supported=no]) - CFLAGS="$gl_save_CFLAGS"]) - AC_MSG_RESULT([$gl_cv_cc_uninitialized_supported]) - - fi - - # List all gcc warning categories. - # To compare this list to your installed GCC's, run this Bash command: - # - # comm -3 \ - # <(sed -n 's/^ *\(-[^ ]*\) .*/\1/p' manywarnings.m4 | sort) \ - # <(gcc --help=warnings | sed -n 's/^ \(-[^ ]*\) .*/\1/p' | sort | - # grep -v -x -f <( - # awk '/^[^#]/ {print $1}' ../build-aux/gcc-warning.spec)) - - gl_manywarn_set= - for gl_manywarn_item in \ - -fno-common \ - -W \ - -Wabi \ - -Waddress \ - -Waggressive-loop-optimizations \ - -Wall \ - -Wattributes \ - -Wbad-function-cast \ - -Wbool-compare \ - -Wbuiltin-macro-redefined \ - -Wcast-align \ - -Wchar-subscripts \ - -Wchkp \ - -Wclobbered \ - -Wcomment \ - -Wcomments \ - -Wcoverage-mismatch \ - -Wcpp \ - -Wdate-time \ - -Wdeprecated \ - -Wdeprecated-declarations \ - -Wdesignated-init \ - -Wdisabled-optimization \ - -Wdiscarded-array-qualifiers \ - -Wdiscarded-qualifiers \ - -Wdiv-by-zero \ - -Wdouble-promotion \ - -Wduplicated-cond \ - -Wempty-body \ - -Wendif-labels \ - -Wenum-compare \ - -Wextra \ - -Wformat-contains-nul \ - -Wformat-extra-args \ - -Wformat-nonliteral \ - -Wformat-security \ - -Wformat-signedness \ - -Wformat-y2k \ - -Wformat-zero-length \ - -Wframe-address \ - -Wfree-nonheap-object \ - -Whsa \ - -Wignored-attributes \ - -Wignored-qualifiers \ - -Wimplicit \ - -Wimplicit-function-declaration \ - -Wimplicit-int \ - -Wincompatible-pointer-types \ - -Winit-self \ - -Winline \ - -Wint-conversion \ - -Wint-to-pointer-cast \ - -Winvalid-memory-model \ - -Winvalid-pch \ - -Wjump-misses-init \ - -Wlogical-not-parentheses \ - -Wlogical-op \ - -Wmain \ - -Wmaybe-uninitialized \ - -Wmemset-transposed-args \ - -Wmisleading-indentation \ - -Wmissing-braces \ - -Wmissing-declarations \ - -Wmissing-field-initializers \ - -Wmissing-include-dirs \ - -Wmissing-parameter-type \ - -Wmissing-prototypes \ - -Wmultichar \ - -Wnarrowing \ - -Wnested-externs \ - -Wnonnull \ - -Wnonnull-compare \ - -Wnull-dereference \ - -Wodr \ - -Wold-style-declaration \ - -Wold-style-definition \ - -Wopenmp-simd \ - -Woverflow \ - -Woverlength-strings \ - -Woverride-init \ - -Wpacked \ - -Wpacked-bitfield-compat \ - -Wparentheses \ - -Wpointer-arith \ - -Wpointer-sign \ - -Wpointer-to-int-cast \ - -Wpragmas \ - -Wreturn-local-addr \ - -Wreturn-type \ - -Wscalar-storage-order \ - -Wsequence-point \ - -Wshadow \ - -Wshift-count-negative \ - -Wshift-count-overflow \ - -Wshift-negative-value \ - -Wsizeof-array-argument \ - -Wsizeof-pointer-memaccess \ - -Wstack-protector \ - -Wstrict-aliasing \ - -Wstrict-overflow \ - -Wstrict-prototypes \ - -Wsuggest-attribute=const \ - -Wsuggest-attribute=format \ - -Wsuggest-attribute=noreturn \ - -Wsuggest-attribute=pure \ - -Wsuggest-final-methods \ - -Wsuggest-final-types \ - -Wswitch \ - -Wswitch-bool \ - -Wswitch-default \ - -Wsync-nand \ - -Wsystem-headers \ - -Wtautological-compare \ - -Wtrampolines \ - -Wtrigraphs \ - -Wtype-limits \ - -Wuninitialized \ - -Wunknown-pragmas \ - -Wunsafe-loop-optimizations \ - -Wunused \ - -Wunused-but-set-parameter \ - -Wunused-but-set-variable \ - -Wunused-function \ - -Wunused-label \ - -Wunused-local-typedefs \ - -Wunused-macros \ - -Wunused-parameter \ - -Wunused-result \ - -Wunused-value \ - -Wunused-variable \ - -Wvarargs \ - -Wvariadic-macros \ - -Wvector-operation-performance \ - -Wvla \ - -Wvolatile-register-var \ - -Wwrite-strings \ - \ - ; do - gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item" - done - - # gcc --help=warnings outputs an unusual form for these options; list - # them here so that the above 'comm' command doesn't report a false match. - gl_manywarn_set="$gl_manywarn_set -Warray-bounds=2" - gl_manywarn_set="$gl_manywarn_set -Wnormalized=nfc" - gl_manywarn_set="$gl_manywarn_set -Wshift-overflow=2" - gl_manywarn_set="$gl_manywarn_set -Wunused-const-variable=2" - - # These are needed for older GCC versions. - if test -n "$GCC"; then - case `($CC --version) 2>/dev/null` in - 'gcc (GCC) '[[0-3]].* | \ - 'gcc (GCC) '4.[[0-7]].*) - gl_manywarn_set="$gl_manywarn_set -fdiagnostics-show-option" - gl_manywarn_set="$gl_manywarn_set -funit-at-a-time" - ;; - esac - fi - - # Disable specific options as needed. - if test "$gl_cv_cc_nomfi_needed" = yes; then - gl_manywarn_set="$gl_manywarn_set -Wno-missing-field-initializers" - fi - - if test "$gl_cv_cc_uninitialized_supported" = no; then - gl_manywarn_set="$gl_manywarn_set -Wno-uninitialized" - fi - - $1=$gl_manywarn_set -]) diff --git a/gl/m4/msvc-inval.m4 b/gl/m4/msvc-inval.m4 deleted file mode 100644 index 3324375..0000000 --- a/gl/m4/msvc-inval.m4 +++ /dev/null @@ -1,19 +0,0 @@ -# msvc-inval.m4 serial 1 -dnl Copyright (C) 2011-2017 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_MSVC_INVAL], -[ - AC_CHECK_FUNCS_ONCE([_set_invalid_parameter_handler]) - if test $ac_cv_func__set_invalid_parameter_handler = yes; then - HAVE_MSVC_INVALID_PARAMETER_HANDLER=1 - AC_DEFINE([HAVE_MSVC_INVALID_PARAMETER_HANDLER], [1], - [Define to 1 on MSVC platforms that have the "invalid parameter handler" - concept.]) - else - HAVE_MSVC_INVALID_PARAMETER_HANDLER=0 - fi - AC_SUBST([HAVE_MSVC_INVALID_PARAMETER_HANDLER]) -]) diff --git a/gl/m4/msvc-nothrow.m4 b/gl/m4/msvc-nothrow.m4 deleted file mode 100644 index 3014661..0000000 --- a/gl/m4/msvc-nothrow.m4 +++ /dev/null @@ -1,10 +0,0 @@ -# msvc-nothrow.m4 serial 1 -dnl Copyright (C) 2011-2017 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_MSVC_NOTHROW], -[ - AC_REQUIRE([gl_MSVC_INVAL]) -]) diff --git a/gl/m4/multiarch.m4 b/gl/m4/multiarch.m4 deleted file mode 100644 index 30006cb..0000000 --- a/gl/m4/multiarch.m4 +++ /dev/null @@ -1,62 +0,0 @@ -# multiarch.m4 serial 7 -dnl Copyright (C) 2008-2017 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -# Determine whether the compiler is or may be producing universal binaries. -# -# On Mac OS X 10.5 and later systems, the user can create libraries and -# executables that work on multiple system types--known as "fat" or -# "universal" binaries--by specifying multiple '-arch' options to the -# compiler but only a single '-arch' option to the preprocessor. Like -# this: -# -# ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ -# CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ -# CPP="gcc -E" CXXCPP="g++ -E" -# -# Detect this situation and set APPLE_UNIVERSAL_BUILD accordingly. - -AC_DEFUN_ONCE([gl_MULTIARCH], -[ - dnl Code similar to autoconf-2.63 AC_C_BIGENDIAN. - gl_cv_c_multiarch=no - AC_COMPILE_IFELSE( - [AC_LANG_SOURCE( - [[#ifndef __APPLE_CC__ - not a universal capable compiler - #endif - typedef int dummy; - ]])], - [ - dnl Check for potential -arch flags. It is not universal unless - dnl there are at least two -arch flags with different values. - arch= - prev= - for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do - if test -n "$prev"; then - case $word in - i?86 | x86_64 | ppc | ppc64) - if test -z "$arch" || test "$arch" = "$word"; then - arch="$word" - else - gl_cv_c_multiarch=yes - fi - ;; - esac - prev= - else - if test "x$word" = "x-arch"; then - prev=arch - fi - fi - done - ]) - if test $gl_cv_c_multiarch = yes; then - APPLE_UNIVERSAL_BUILD=1 - else - APPLE_UNIVERSAL_BUILD=0 - fi - AC_SUBST([APPLE_UNIVERSAL_BUILD]) -]) diff --git a/gl/m4/nocrash.m4 b/gl/m4/nocrash.m4 deleted file mode 100644 index 2c2c5fb..0000000 --- a/gl/m4/nocrash.m4 +++ /dev/null @@ -1,131 +0,0 @@ -# nocrash.m4 serial 4 -dnl Copyright (C) 2005, 2009-2017 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl Based on libsigsegv, from Bruno Haible and Paolo Bonzini. - -AC_PREREQ([2.13]) - -dnl Expands to some code for use in .c programs that will cause the configure -dnl test to exit instead of crashing. This is useful to avoid triggering -dnl action from a background debugger and to avoid core dumps. -dnl Usage: ... -dnl ]GL_NOCRASH[ -dnl ... -dnl int main() { nocrash_init(); ... } -AC_DEFUN([GL_NOCRASH],[[ -#include -#if defined __MACH__ && defined __APPLE__ -/* Avoid a crash on Mac OS X. */ -#include -#include -#include -#include -#include -#include -/* The exception port on which our thread listens. */ -static mach_port_t our_exception_port; -/* The main function of the thread listening for exceptions of type - EXC_BAD_ACCESS. */ -static void * -mach_exception_thread (void *arg) -{ - /* Buffer for a message to be received. */ - struct { - mach_msg_header_t head; - mach_msg_body_t msgh_body; - char data[1024]; - } msg; - mach_msg_return_t retval; - /* Wait for a message on the exception port. */ - retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg), - our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL); - if (retval != MACH_MSG_SUCCESS) - abort (); - exit (1); -} -static void -nocrash_init (void) -{ - mach_port_t self = mach_task_self (); - /* Allocate a port on which the thread shall listen for exceptions. */ - if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port) - == KERN_SUCCESS) { - /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */ - if (mach_port_insert_right (self, our_exception_port, our_exception_port, - MACH_MSG_TYPE_MAKE_SEND) - == KERN_SUCCESS) { - /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting - for us. */ - exception_mask_t mask = EXC_MASK_BAD_ACCESS; - /* Create the thread listening on the exception port. */ - pthread_attr_t attr; - pthread_t thread; - if (pthread_attr_init (&attr) == 0 - && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0 - && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) { - pthread_attr_destroy (&attr); - /* Replace the exception port info for these exceptions with our own. - Note that we replace the exception port for the entire task, not only - for a particular thread. This has the effect that when our exception - port gets the message, the thread specific exception port has already - been asked, and we don't need to bother about it. - See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */ - task_set_exception_ports (self, mask, our_exception_port, - EXCEPTION_DEFAULT, MACHINE_THREAD_STATE); - } - } - } -} -#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -/* Avoid a crash on native Windows. */ -#define WIN32_LEAN_AND_MEAN -#include -#include -static LONG WINAPI -exception_filter (EXCEPTION_POINTERS *ExceptionInfo) -{ - switch (ExceptionInfo->ExceptionRecord->ExceptionCode) - { - case EXCEPTION_ACCESS_VIOLATION: - case EXCEPTION_IN_PAGE_ERROR: - case EXCEPTION_STACK_OVERFLOW: - case EXCEPTION_GUARD_PAGE: - case EXCEPTION_PRIV_INSTRUCTION: - case EXCEPTION_ILLEGAL_INSTRUCTION: - case EXCEPTION_DATATYPE_MISALIGNMENT: - case EXCEPTION_ARRAY_BOUNDS_EXCEEDED: - case EXCEPTION_NONCONTINUABLE_EXCEPTION: - exit (1); - } - return EXCEPTION_CONTINUE_SEARCH; -} -static void -nocrash_init (void) -{ - SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter); -} -#else -/* Avoid a crash on POSIX systems. */ -#include -#include -/* A POSIX signal handler. */ -static void -exception_handler (int sig) -{ - _exit (1); -} -static void -nocrash_init (void) -{ -#ifdef SIGSEGV - signal (SIGSEGV, exception_handler); -#endif -#ifdef SIGBUS - signal (SIGBUS, exception_handler); -#endif -} -#endif -]]) diff --git a/gl/m4/off_t.m4 b/gl/m4/off_t.m4 deleted file mode 100644 index 92c45ef..0000000 --- a/gl/m4/off_t.m4 +++ /dev/null @@ -1,18 +0,0 @@ -# off_t.m4 serial 1 -dnl Copyright (C) 2012-2017 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl Check whether to override the 'off_t' type. -dnl Set WINDOWS_64_BIT_OFF_T. - -AC_DEFUN([gl_TYPE_OFF_T], -[ - m4_ifdef([gl_LARGEFILE], [ - AC_REQUIRE([gl_LARGEFILE]) - ], [ - WINDOWS_64_BIT_OFF_T=0 - ]) - AC_SUBST([WINDOWS_64_BIT_OFF_T]) -]) diff --git a/gl/m4/read-file.m4 b/gl/m4/read-file.m4 deleted file mode 100644 index 5540000..0000000 --- a/gl/m4/read-file.m4 +++ /dev/null @@ -1,8 +0,0 @@ -# read-file.m4 serial 3 -dnl Copyright (C) 2002-2006, 2009-2017 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -# Prerequisites of lib/read-file.c. -AC_DEFUN([gl_PREREQ_READ_FILE], [:]) diff --git a/gl/m4/realloc.m4 b/gl/m4/realloc.m4 deleted file mode 100644 index 3d05b44..0000000 --- a/gl/m4/realloc.m4 +++ /dev/null @@ -1,79 +0,0 @@ -# realloc.m4 serial 14 -dnl Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -m4_version_prereq([2.70], [] ,[ - -# This is adapted with modifications from upstream Autoconf here: -# http://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=04be2b7a29d65d9a08e64e8e56e594c91749598c -AC_DEFUN([_AC_FUNC_REALLOC_IF], -[ - AC_REQUIRE([AC_HEADER_STDC])dnl - AC_REQUIRE([AC_CANONICAL_HOST])dnl for cross-compiles - AC_CHECK_HEADERS([stdlib.h]) - AC_CACHE_CHECK([for GNU libc compatible realloc], - [ac_cv_func_realloc_0_nonnull], - [AC_RUN_IFELSE( - [AC_LANG_PROGRAM( - [[#if defined STDC_HEADERS || defined HAVE_STDLIB_H - # include - #else - char *realloc (); - #endif - ]], - [[char *p = realloc (0, 0); - int result = !p; - free (p); - return result;]]) - ], - [ac_cv_func_realloc_0_nonnull=yes], - [ac_cv_func_realloc_0_nonnull=no], - [case "$host_os" in - # Guess yes on platforms where we know the result. - *-gnu* | freebsd* | netbsd* | openbsd* \ - | hpux* | solaris* | cygwin* | mingw*) - ac_cv_func_realloc_0_nonnull=yes ;; - # If we don't know, assume the worst. - *) ac_cv_func_realloc_0_nonnull=no ;; - esac - ]) - ]) - AS_IF([test $ac_cv_func_realloc_0_nonnull = yes], [$1], [$2]) -])# AC_FUNC_REALLOC - -]) - -# gl_FUNC_REALLOC_GNU -# ------------------- -# Test whether 'realloc (0, 0)' is handled like in GNU libc, and replace -# realloc if it is not. -AC_DEFUN([gl_FUNC_REALLOC_GNU], -[ - AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) - dnl _AC_FUNC_REALLOC_IF is defined in Autoconf. - _AC_FUNC_REALLOC_IF( - [AC_DEFINE([HAVE_REALLOC_GNU], [1], - [Define to 1 if your system has a GNU libc compatible 'realloc' - function, and to 0 otherwise.])], - [AC_DEFINE([HAVE_REALLOC_GNU], [0]) - REPLACE_REALLOC=1 - ]) -])# gl_FUNC_REALLOC_GNU - -# gl_FUNC_REALLOC_POSIX -# --------------------- -# Test whether 'realloc' is POSIX compliant (sets errno to ENOMEM when it -# fails), and replace realloc if it is not. -AC_DEFUN([gl_FUNC_REALLOC_POSIX], -[ - AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) - AC_REQUIRE([gl_CHECK_MALLOC_POSIX]) - if test $gl_cv_func_malloc_posix = yes; then - AC_DEFINE([HAVE_REALLOC_POSIX], [1], - [Define if the 'realloc' function is POSIX compliant.]) - else - REPLACE_REALLOC=1 - fi -]) diff --git a/gl/m4/ssize_t.m4 b/gl/m4/ssize_t.m4 deleted file mode 100644 index 66ba9d4..0000000 --- a/gl/m4/ssize_t.m4 +++ /dev/null @@ -1,23 +0,0 @@ -# ssize_t.m4 serial 5 (gettext-0.18.2) -dnl Copyright (C) 2001-2003, 2006, 2010-2017 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Bruno Haible. -dnl Test whether ssize_t is defined. - -AC_DEFUN([gt_TYPE_SSIZE_T], -[ - AC_CACHE_CHECK([for ssize_t], [gt_cv_ssize_t], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[#include ]], - [[int x = sizeof (ssize_t *) + sizeof (ssize_t); - return !x;]])], - [gt_cv_ssize_t=yes], [gt_cv_ssize_t=no])]) - if test $gt_cv_ssize_t = no; then - AC_DEFINE([ssize_t], [int], - [Define as a signed type of the same size as size_t.]) - fi -]) diff --git a/gl/m4/stdarg.m4 b/gl/m4/stdarg.m4 deleted file mode 100644 index 40db5e4..0000000 --- a/gl/m4/stdarg.m4 +++ /dev/null @@ -1,78 +0,0 @@ -# stdarg.m4 serial 6 -dnl Copyright (C) 2006, 2008-2017 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Bruno Haible. -dnl Provide a working va_copy in combination with . - -AC_DEFUN([gl_STDARG_H], -[ - STDARG_H='' - NEXT_STDARG_H='' - AC_MSG_CHECKING([for va_copy]) - AC_CACHE_VAL([gl_cv_func_va_copy], [ - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[#include ]], - [[ -#ifndef va_copy -void (*func) (va_list, va_list) = va_copy; -#endif - ]])], - [gl_cv_func_va_copy=yes], - [gl_cv_func_va_copy=no])]) - AC_MSG_RESULT([$gl_cv_func_va_copy]) - if test $gl_cv_func_va_copy = no; then - dnl Provide a substitute. - dnl Usually a simple definition in is enough. Not so on AIX 5 - dnl with some versions of the /usr/vac/bin/cc compiler. It has an - dnl which does '#undef va_copy', leading to a missing va_copy symbol. For - dnl this platform, we use an substitute. But we cannot use this - dnl approach on other platforms, because often defines only - dnl preprocessor macros and gl_ABSOLUTE_HEADER, gl_CHECK_NEXT_HEADERS do - dnl not work in this situation. - AC_EGREP_CPP([vaccine], - [#if defined _AIX && !defined __GNUC__ - AIX vaccine - #endif - ], [gl_aixcc=yes], [gl_aixcc=no]) - if test $gl_aixcc = yes; then - dnl Provide a substitute file. - STDARG_H=stdarg.h - gl_NEXT_HEADERS([stdarg.h]) - dnl Fallback for the case when contains only macro definitions. - if test "$gl_cv_next_stdarg_h" = '""'; then - gl_cv_next_stdarg_h='"///usr/include/stdarg.h"' - NEXT_STDARG_H="$gl_cv_next_stdarg_h" - fi - else - dnl Provide a substitute in , either __va_copy or as a simple - dnl assignment. - gl_CACHE_VAL_SILENT([gl_cv_func___va_copy], [ - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[#include ]], - [[ -#ifndef __va_copy -error, bail out -#endif - ]])], - [gl_cv_func___va_copy=yes], - [gl_cv_func___va_copy=no])]) - if test $gl_cv_func___va_copy = yes; then - AC_DEFINE([va_copy], [__va_copy], - [Define as a macro for copying va_list variables.]) - else - AH_VERBATIM([gl_VA_COPY], [/* A replacement for va_copy, if needed. */ -#define gl_va_copy(a,b) ((a) = (b))]) - AC_DEFINE([va_copy], [gl_va_copy], - [Define as a macro for copying va_list variables.]) - fi - fi - fi - AC_SUBST([STDARG_H]) - AM_CONDITIONAL([GL_GENERATE_STDARG_H], [test -n "$STDARG_H"]) - AC_SUBST([NEXT_STDARG_H]) -]) diff --git a/gl/m4/stddef_h.m4 b/gl/m4/stddef_h.m4 deleted file mode 100644 index f45def1..0000000 --- a/gl/m4/stddef_h.m4 +++ /dev/null @@ -1,51 +0,0 @@ -dnl A placeholder for , for platforms that have issues. -# stddef_h.m4 serial 5 -dnl Copyright (C) 2009-2017 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_STDDEF_H], -[ - AC_REQUIRE([gl_STDDEF_H_DEFAULTS]) - AC_REQUIRE([gt_TYPE_WCHAR_T]) - STDDEF_H= - AC_CHECK_TYPE([max_align_t], [], [HAVE_MAX_ALIGN_T=0; STDDEF_H=stddef.h], - [[#include - ]]) - if test $gt_cv_c_wchar_t = no; then - HAVE_WCHAR_T=0 - STDDEF_H=stddef.h - fi - AC_CACHE_CHECK([whether NULL can be used in arbitrary expressions], - [gl_cv_decl_null_works], - [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include - int test[2 * (sizeof NULL == sizeof (void *)) -1]; -]])], - [gl_cv_decl_null_works=yes], - [gl_cv_decl_null_works=no])]) - if test $gl_cv_decl_null_works = no; then - REPLACE_NULL=1 - STDDEF_H=stddef.h - fi - AC_SUBST([STDDEF_H]) - AM_CONDITIONAL([GL_GENERATE_STDDEF_H], [test -n "$STDDEF_H"]) - if test -n "$STDDEF_H"; then - gl_NEXT_HEADERS([stddef.h]) - fi -]) - -AC_DEFUN([gl_STDDEF_MODULE_INDICATOR], -[ - dnl Use AC_REQUIRE here, so that the default settings are expanded once only. - AC_REQUIRE([gl_STDDEF_H_DEFAULTS]) - gl_MODULE_INDICATOR_SET_VARIABLE([$1]) -]) - -AC_DEFUN([gl_STDDEF_H_DEFAULTS], -[ - dnl Assume proper GNU behavior unless another module says otherwise. - REPLACE_NULL=0; AC_SUBST([REPLACE_NULL]) - HAVE_MAX_ALIGN_T=1; AC_SUBST([HAVE_MAX_ALIGN_T]) - HAVE_WCHAR_T=1; AC_SUBST([HAVE_WCHAR_T]) -]) diff --git a/gl/m4/stdint.m4 b/gl/m4/stdint.m4 deleted file mode 100644 index 4ac854d..0000000 --- a/gl/m4/stdint.m4 +++ /dev/null @@ -1,541 +0,0 @@ -# stdint.m4 serial 50 -dnl Copyright (C) 2001-2017 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Paul Eggert and Bruno Haible. -dnl Test whether is supported or must be substituted. - -AC_DEFUN_ONCE([gl_STDINT_H], -[ - AC_PREREQ([2.59])dnl - - AC_REQUIRE([gl_LIMITS_H]) - AC_REQUIRE([gt_TYPE_WINT_T]) - - dnl Check for long long int and unsigned long long int. - AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) - if test $ac_cv_type_long_long_int = yes; then - HAVE_LONG_LONG_INT=1 - else - HAVE_LONG_LONG_INT=0 - fi - AC_SUBST([HAVE_LONG_LONG_INT]) - AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT]) - if test $ac_cv_type_unsigned_long_long_int = yes; then - HAVE_UNSIGNED_LONG_LONG_INT=1 - else - HAVE_UNSIGNED_LONG_LONG_INT=0 - fi - AC_SUBST([HAVE_UNSIGNED_LONG_LONG_INT]) - - dnl Check for , in the same way as gl_WCHAR_H does. - AC_CHECK_HEADERS_ONCE([wchar.h]) - if test $ac_cv_header_wchar_h = yes; then - HAVE_WCHAR_H=1 - else - HAVE_WCHAR_H=0 - fi - AC_SUBST([HAVE_WCHAR_H]) - - dnl Check for . - dnl AC_INCLUDES_DEFAULT defines $ac_cv_header_inttypes_h. - if test $ac_cv_header_inttypes_h = yes; then - HAVE_INTTYPES_H=1 - else - HAVE_INTTYPES_H=0 - fi - AC_SUBST([HAVE_INTTYPES_H]) - - dnl Check for . - dnl AC_INCLUDES_DEFAULT defines $ac_cv_header_sys_types_h. - if test $ac_cv_header_sys_types_h = yes; then - HAVE_SYS_TYPES_H=1 - else - HAVE_SYS_TYPES_H=0 - fi - AC_SUBST([HAVE_SYS_TYPES_H]) - - gl_CHECK_NEXT_HEADERS([stdint.h]) - if test $ac_cv_header_stdint_h = yes; then - HAVE_STDINT_H=1 - else - HAVE_STDINT_H=0 - fi - AC_SUBST([HAVE_STDINT_H]) - - dnl Now see whether we need a substitute . - if test $ac_cv_header_stdint_h = yes; then - AC_CACHE_CHECK([whether stdint.h conforms to C99], - [gl_cv_header_working_stdint_h], - [gl_cv_header_working_stdint_h=no - AC_COMPILE_IFELSE([ - AC_LANG_PROGRAM([[ -#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ -#define __STDC_CONSTANT_MACROS 1 -#define __STDC_LIMIT_MACROS 1 -#include -/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in . */ -#if !(defined WCHAR_MIN && defined WCHAR_MAX) -#error "WCHAR_MIN, WCHAR_MAX not defined in " -#endif -] -gl_STDINT_INCLUDES -[ -#ifdef INT8_MAX -int8_t a1 = INT8_MAX; -int8_t a1min = INT8_MIN; -#endif -#ifdef INT16_MAX -int16_t a2 = INT16_MAX; -int16_t a2min = INT16_MIN; -#endif -#ifdef INT32_MAX -int32_t a3 = INT32_MAX; -int32_t a3min = INT32_MIN; -#endif -#ifdef INT64_MAX -int64_t a4 = INT64_MAX; -int64_t a4min = INT64_MIN; -#endif -#ifdef UINT8_MAX -uint8_t b1 = UINT8_MAX; -#else -typedef int b1[(unsigned char) -1 != 255 ? 1 : -1]; -#endif -#ifdef UINT16_MAX -uint16_t b2 = UINT16_MAX; -#endif -#ifdef UINT32_MAX -uint32_t b3 = UINT32_MAX; -#endif -#ifdef UINT64_MAX -uint64_t b4 = UINT64_MAX; -#endif -int_least8_t c1 = INT8_C (0x7f); -int_least8_t c1max = INT_LEAST8_MAX; -int_least8_t c1min = INT_LEAST8_MIN; -int_least16_t c2 = INT16_C (0x7fff); -int_least16_t c2max = INT_LEAST16_MAX; -int_least16_t c2min = INT_LEAST16_MIN; -int_least32_t c3 = INT32_C (0x7fffffff); -int_least32_t c3max = INT_LEAST32_MAX; -int_least32_t c3min = INT_LEAST32_MIN; -int_least64_t c4 = INT64_C (0x7fffffffffffffff); -int_least64_t c4max = INT_LEAST64_MAX; -int_least64_t c4min = INT_LEAST64_MIN; -uint_least8_t d1 = UINT8_C (0xff); -uint_least8_t d1max = UINT_LEAST8_MAX; -uint_least16_t d2 = UINT16_C (0xffff); -uint_least16_t d2max = UINT_LEAST16_MAX; -uint_least32_t d3 = UINT32_C (0xffffffff); -uint_least32_t d3max = UINT_LEAST32_MAX; -uint_least64_t d4 = UINT64_C (0xffffffffffffffff); -uint_least64_t d4max = UINT_LEAST64_MAX; -int_fast8_t e1 = INT_FAST8_MAX; -int_fast8_t e1min = INT_FAST8_MIN; -int_fast16_t e2 = INT_FAST16_MAX; -int_fast16_t e2min = INT_FAST16_MIN; -int_fast32_t e3 = INT_FAST32_MAX; -int_fast32_t e3min = INT_FAST32_MIN; -int_fast64_t e4 = INT_FAST64_MAX; -int_fast64_t e4min = INT_FAST64_MIN; -uint_fast8_t f1 = UINT_FAST8_MAX; -uint_fast16_t f2 = UINT_FAST16_MAX; -uint_fast32_t f3 = UINT_FAST32_MAX; -uint_fast64_t f4 = UINT_FAST64_MAX; -#ifdef INTPTR_MAX -intptr_t g = INTPTR_MAX; -intptr_t gmin = INTPTR_MIN; -#endif -#ifdef UINTPTR_MAX -uintptr_t h = UINTPTR_MAX; -#endif -intmax_t i = INTMAX_MAX; -uintmax_t j = UINTMAX_MAX; - -/* Check that SIZE_MAX has the correct type, if possible. */ -#if 201112 <= __STDC_VERSION__ -int k = _Generic (SIZE_MAX, size_t: 0); -#elif (2 <= __GNUC__ || defined __IBM__TYPEOF__ \ - || (0x5110 <= __SUNPRO_C && !__STDC__)) -extern size_t k; -extern __typeof__ (SIZE_MAX) k; -#endif - -#include /* for CHAR_BIT */ -#define TYPE_MINIMUM(t) \ - ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t))) -#define TYPE_MAXIMUM(t) \ - ((t) ((t) 0 < (t) -1 \ - ? (t) -1 \ - : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1))) -struct s { - int check_PTRDIFF: - PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t) - && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t) - ? 1 : -1; - /* Detect bug in FreeBSD 6.0 / ia64. */ - int check_SIG_ATOMIC: - SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t) - && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t) - ? 1 : -1; - int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1; - int check_WCHAR: - WCHAR_MIN == TYPE_MINIMUM (wchar_t) - && WCHAR_MAX == TYPE_MAXIMUM (wchar_t) - ? 1 : -1; - /* Detect bug in mingw. */ - int check_WINT: - WINT_MIN == TYPE_MINIMUM (wint_t) - && WINT_MAX == TYPE_MAXIMUM (wint_t) - ? 1 : -1; - - /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */ - int check_UINT8_C: - (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1; - int check_UINT16_C: - (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1; - - /* Detect bugs in OpenBSD 3.9 stdint.h. */ -#ifdef UINT8_MAX - int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1; -#endif -#ifdef UINT16_MAX - int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1; -#endif -#ifdef UINT32_MAX - int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1; -#endif -#ifdef UINT64_MAX - int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1; -#endif - int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1; - int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1; - int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1; - int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1; - int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1; - int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1; - int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1; - int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1; - int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1; - int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1; - int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1; -}; - ]])], - [dnl Determine whether the various *_MIN, *_MAX macros are usable - dnl in preprocessor expression. We could do it by compiling a test - dnl program for each of these macros. It is faster to run a program - dnl that inspects the macro expansion. - dnl This detects a bug on HP-UX 11.23/ia64. - AC_RUN_IFELSE([ - AC_LANG_PROGRAM([[ -#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ -#define __STDC_CONSTANT_MACROS 1 -#define __STDC_LIMIT_MACROS 1 -#include -] -gl_STDINT_INCLUDES -[ -#include -#include -#define MVAL(macro) MVAL1(macro) -#define MVAL1(expression) #expression -static const char *macro_values[] = - { -#ifdef INT8_MAX - MVAL (INT8_MAX), -#endif -#ifdef INT16_MAX - MVAL (INT16_MAX), -#endif -#ifdef INT32_MAX - MVAL (INT32_MAX), -#endif -#ifdef INT64_MAX - MVAL (INT64_MAX), -#endif -#ifdef UINT8_MAX - MVAL (UINT8_MAX), -#endif -#ifdef UINT16_MAX - MVAL (UINT16_MAX), -#endif -#ifdef UINT32_MAX - MVAL (UINT32_MAX), -#endif -#ifdef UINT64_MAX - MVAL (UINT64_MAX), -#endif - NULL - }; -]], [[ - const char **mv; - for (mv = macro_values; *mv != NULL; mv++) - { - const char *value = *mv; - /* Test whether it looks like a cast expression. */ - if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0 - || strncmp (value, "((unsigned short)"/*)*/, 17) == 0 - || strncmp (value, "((unsigned char)"/*)*/, 16) == 0 - || strncmp (value, "((int)"/*)*/, 6) == 0 - || strncmp (value, "((signed short)"/*)*/, 15) == 0 - || strncmp (value, "((signed char)"/*)*/, 14) == 0) - return mv - macro_values + 1; - } - return 0; -]])], - [gl_cv_header_working_stdint_h=yes], - [], - [dnl When cross-compiling, assume it works. - gl_cv_header_working_stdint_h=yes - ]) - ]) - ]) - fi - - HAVE_C99_STDINT_H=0 - HAVE_SYS_BITYPES_H=0 - HAVE_SYS_INTTYPES_H=0 - STDINT_H=stdint.h - if test "$gl_cv_header_working_stdint_h" = yes; then - HAVE_C99_STDINT_H=1 - dnl Now see whether the system works without - dnl __STDC_CONSTANT_MACROS/__STDC_LIMIT_MACROS defined. - AC_CACHE_CHECK([whether stdint.h predates C++11], - [gl_cv_header_stdint_predates_cxx11_h], - [gl_cv_header_stdint_predates_cxx11_h=yes - AC_COMPILE_IFELSE([ - AC_LANG_PROGRAM([[ -#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ -#include -] -gl_STDINT_INCLUDES -[ -intmax_t im = INTMAX_MAX; -int32_t i32 = INT32_C (0x7fffffff); - ]])], - [gl_cv_header_stdint_predates_cxx11_h=no])]) - - if test "$gl_cv_header_stdint_predates_cxx11_h" = yes; then - AC_DEFINE([__STDC_CONSTANT_MACROS], [1], - [Define to 1 if the system predates C++11.]) - AC_DEFINE([__STDC_LIMIT_MACROS], [1], - [Define to 1 if the system predates C++11.]) - fi - AC_CACHE_CHECK([whether stdint.h has UINTMAX_WIDTH etc.], - [gl_cv_header_stdint_width], - [gl_cv_header_stdint_width=no - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([[ - /* Work if build is not clean. */ - #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 - #ifndef __STDC_WANT_IEC_60559_BFP_EXT__ - #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 - #endif - #include - ]gl_STDINT_INCLUDES[ - int iw = UINTMAX_WIDTH; - ]])], - [gl_cv_header_stdint_width=yes])]) - if test "$gl_cv_header_stdint_width" = yes; then - STDINT_H= - fi - else - dnl Check for , and for - dnl (used in Linux libc4 >= 4.6.7 and libc5). - AC_CHECK_HEADERS([sys/inttypes.h sys/bitypes.h]) - if test $ac_cv_header_sys_inttypes_h = yes; then - HAVE_SYS_INTTYPES_H=1 - fi - if test $ac_cv_header_sys_bitypes_h = yes; then - HAVE_SYS_BITYPES_H=1 - fi - gl_STDINT_TYPE_PROPERTIES - fi - - dnl The substitute stdint.h needs the substitute limit.h's _GL_INTEGER_WIDTH. - LIMITS_H=limits.h - AM_CONDITIONAL([GL_GENERATE_LIMITS_H], [test -n "$LIMITS_H"]) - - AC_SUBST([HAVE_C99_STDINT_H]) - AC_SUBST([HAVE_SYS_BITYPES_H]) - AC_SUBST([HAVE_SYS_INTTYPES_H]) - AC_SUBST([STDINT_H]) - AM_CONDITIONAL([GL_GENERATE_STDINT_H], [test -n "$STDINT_H"]) -]) - -dnl gl_STDINT_BITSIZEOF(TYPES, INCLUDES) -dnl Determine the size of each of the given types in bits. -AC_DEFUN([gl_STDINT_BITSIZEOF], -[ - dnl Use a shell loop, to avoid bloating configure, and - dnl - extra AH_TEMPLATE calls, so that autoheader knows what to put into - dnl config.h.in, - dnl - extra AC_SUBST calls, so that the right substitutions are made. - m4_foreach_w([gltype], [$1], - [AH_TEMPLATE([BITSIZEOF_]m4_translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]), - [Define to the number of bits in type ']gltype['.])]) - for gltype in $1 ; do - AC_CACHE_CHECK([for bit size of $gltype], [gl_cv_bitsizeof_${gltype}], - [AC_COMPUTE_INT([result], [sizeof ($gltype) * CHAR_BIT], - [$2 -#include ], [result=unknown]) - eval gl_cv_bitsizeof_${gltype}=\$result - ]) - eval result=\$gl_cv_bitsizeof_${gltype} - if test $result = unknown; then - dnl Use a nonempty default, because some compilers, such as IRIX 5 cc, - dnl do a syntax check even on unused #if conditions and give an error - dnl on valid C code like this: - dnl #if 0 - dnl # if > 32 - dnl # endif - dnl #endif - result=0 - fi - GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` - AC_DEFINE_UNQUOTED([BITSIZEOF_${GLTYPE}], [$result]) - eval BITSIZEOF_${GLTYPE}=\$result - done - m4_foreach_w([gltype], [$1], - [AC_SUBST([BITSIZEOF_]m4_translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]))]) -]) - -dnl gl_CHECK_TYPES_SIGNED(TYPES, INCLUDES) -dnl Determine the signedness of each of the given types. -dnl Define HAVE_SIGNED_TYPE if type is signed. -AC_DEFUN([gl_CHECK_TYPES_SIGNED], -[ - dnl Use a shell loop, to avoid bloating configure, and - dnl - extra AH_TEMPLATE calls, so that autoheader knows what to put into - dnl config.h.in, - dnl - extra AC_SUBST calls, so that the right substitutions are made. - m4_foreach_w([gltype], [$1], - [AH_TEMPLATE([HAVE_SIGNED_]m4_translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]), - [Define to 1 if ']gltype[' is a signed integer type.])]) - for gltype in $1 ; do - AC_CACHE_CHECK([whether $gltype is signed], [gl_cv_type_${gltype}_signed], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([$2[ - int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];]])], - result=yes, result=no) - eval gl_cv_type_${gltype}_signed=\$result - ]) - eval result=\$gl_cv_type_${gltype}_signed - GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` - if test "$result" = yes; then - AC_DEFINE_UNQUOTED([HAVE_SIGNED_${GLTYPE}], [1]) - eval HAVE_SIGNED_${GLTYPE}=1 - else - eval HAVE_SIGNED_${GLTYPE}=0 - fi - done - m4_foreach_w([gltype], [$1], - [AC_SUBST([HAVE_SIGNED_]m4_translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]))]) -]) - -dnl gl_INTEGER_TYPE_SUFFIX(TYPES, INCLUDES) -dnl Determine the suffix to use for integer constants of the given types. -dnl Define t_SUFFIX for each such type. -AC_DEFUN([gl_INTEGER_TYPE_SUFFIX], -[ - dnl Use a shell loop, to avoid bloating configure, and - dnl - extra AH_TEMPLATE calls, so that autoheader knows what to put into - dnl config.h.in, - dnl - extra AC_SUBST calls, so that the right substitutions are made. - m4_foreach_w([gltype], [$1], - [AH_TEMPLATE(m4_translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_])[_SUFFIX], - [Define to l, ll, u, ul, ull, etc., as suitable for - constants of type ']gltype['.])]) - for gltype in $1 ; do - AC_CACHE_CHECK([for $gltype integer literal suffix], - [gl_cv_type_${gltype}_suffix], - [eval gl_cv_type_${gltype}_suffix=no - eval result=\$gl_cv_type_${gltype}_signed - if test "$result" = yes; then - glsufu= - else - glsufu=u - fi - for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do - case $glsuf in - '') gltype1='int';; - l) gltype1='long int';; - ll) gltype1='long long int';; - i64) gltype1='__int64';; - u) gltype1='unsigned int';; - ul) gltype1='unsigned long int';; - ull) gltype1='unsigned long long int';; - ui64)gltype1='unsigned __int64';; - esac - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([$2[ - extern $gltype foo; - extern $gltype1 foo;]])], - [eval gl_cv_type_${gltype}_suffix=\$glsuf]) - eval result=\$gl_cv_type_${gltype}_suffix - test "$result" != no && break - done]) - GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` - eval result=\$gl_cv_type_${gltype}_suffix - test "$result" = no && result= - eval ${GLTYPE}_SUFFIX=\$result - AC_DEFINE_UNQUOTED([${GLTYPE}_SUFFIX], [$result]) - done - m4_foreach_w([gltype], [$1], - [AC_SUBST(m4_translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_])[_SUFFIX])]) -]) - -dnl gl_STDINT_INCLUDES -AC_DEFUN([gl_STDINT_INCLUDES], -[[ - /* BSD/OS 4.0.1 has a bug: , and must be - included before . */ - #include - #include - #if HAVE_WCHAR_H - # include - # include - # include - #endif -]]) - -dnl gl_STDINT_TYPE_PROPERTIES -dnl Compute HAVE_SIGNED_t, BITSIZEOF_t and t_SUFFIX, for all the types t -dnl of interest to stdint.in.h. -AC_DEFUN([gl_STDINT_TYPE_PROPERTIES], -[ - AC_REQUIRE([gl_MULTIARCH]) - if test $APPLE_UNIVERSAL_BUILD = 0; then - gl_STDINT_BITSIZEOF([ptrdiff_t size_t], - [gl_STDINT_INCLUDES]) - fi - gl_STDINT_BITSIZEOF([sig_atomic_t wchar_t wint_t], - [gl_STDINT_INCLUDES]) - gl_CHECK_TYPES_SIGNED([sig_atomic_t wchar_t wint_t], - [gl_STDINT_INCLUDES]) - gl_cv_type_ptrdiff_t_signed=yes - gl_cv_type_size_t_signed=no - if test $APPLE_UNIVERSAL_BUILD = 0; then - gl_INTEGER_TYPE_SUFFIX([ptrdiff_t size_t], - [gl_STDINT_INCLUDES]) - fi - gl_INTEGER_TYPE_SUFFIX([sig_atomic_t wchar_t wint_t], - [gl_STDINT_INCLUDES]) - - dnl If wint_t is smaller than 'int', it cannot satisfy the ISO C 99 - dnl requirement that wint_t is "unchanged by default argument promotions". - dnl In this case gnulib's and override wint_t. - dnl Set the variable BITSIZEOF_WINT_T accordingly. - if test $GNULIB_OVERRIDES_WINT_T = 1; then - BITSIZEOF_WINT_T=32 - fi -]) - -dnl Autoconf >= 2.61 has AC_COMPUTE_INT built-in. -dnl Remove this when we can assume autoconf >= 2.61. -m4_ifdef([AC_COMPUTE_INT], [], [ - AC_DEFUN([AC_COMPUTE_INT], [_AC_COMPUTE_INT([$2],[$1],[$3],[$4])]) -]) diff --git a/gl/m4/stdio_h.m4 b/gl/m4/stdio_h.m4 deleted file mode 100644 index 9ffbb85..0000000 --- a/gl/m4/stdio_h.m4 +++ /dev/null @@ -1,225 +0,0 @@ -# stdio_h.m4 serial 48 -dnl Copyright (C) 2007-2017 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_STDIO_H], -[ - AH_VERBATIM([MINGW_ANSI_STDIO], -[/* Use GNU style printf and scanf. */ -#ifndef __USE_MINGW_ANSI_STDIO -# undef __USE_MINGW_ANSI_STDIO -#endif -]) - AC_DEFINE([__USE_MINGW_ANSI_STDIO]) - AC_REQUIRE([gl_STDIO_H_DEFAULTS]) - gl_NEXT_HEADERS([stdio.h]) - - dnl Determine whether __USE_MINGW_ANSI_STDIO makes printf and - dnl inttypes.h behave like gnu instead of system; we must give our - dnl printf wrapper the right attribute to match. - AC_CACHE_CHECK([which flavor of printf attribute matches inttypes macros], - [gl_cv_func_printf_attribute_flavor], - [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - #define __STDC_FORMAT_MACROS 1 - #include - #include - /* For non-mingw systems, compilation will trivially succeed. - For mingw, compilation will succeed for older mingw (system - printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */ - #if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) && \ - (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) - extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1]; - #endif - ]])], [gl_cv_func_printf_attribute_flavor=system], - [gl_cv_func_printf_attribute_flavor=gnu])]) - if test "$gl_cv_func_printf_attribute_flavor" = gnu; then - AC_DEFINE([GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU], [1], - [Define to 1 if printf and friends should be labeled with - attribute "__gnu_printf__" instead of "__printf__"]) - fi - - dnl No need to create extra modules for these functions. Everyone who uses - dnl likely needs them. - GNULIB_FSCANF=1 - gl_MODULE_INDICATOR([fscanf]) - GNULIB_SCANF=1 - gl_MODULE_INDICATOR([scanf]) - GNULIB_FGETC=1 - GNULIB_GETC=1 - GNULIB_GETCHAR=1 - GNULIB_FGETS=1 - GNULIB_FREAD=1 - dnl This ifdef is necessary to avoid an error "missing file lib/stdio-read.c" - dnl "expected source file, required through AC_LIBSOURCES, not found". It is - dnl also an optimization, to avoid performing a configure check whose result - dnl is not used. But it does not make the test of GNULIB_STDIO_H_NONBLOCKING - dnl or GNULIB_NONBLOCKING redundant. - m4_ifdef([gl_NONBLOCKING_IO], [ - gl_NONBLOCKING_IO - if test $gl_cv_have_nonblocking != yes; then - REPLACE_STDIO_READ_FUNCS=1 - AC_LIBOBJ([stdio-read]) - fi - ]) - - dnl No need to create extra modules for these functions. Everyone who uses - dnl likely needs them. - GNULIB_FPRINTF=1 - GNULIB_PRINTF=1 - GNULIB_VFPRINTF=1 - GNULIB_VPRINTF=1 - GNULIB_FPUTC=1 - GNULIB_PUTC=1 - GNULIB_PUTCHAR=1 - GNULIB_FPUTS=1 - GNULIB_PUTS=1 - GNULIB_FWRITE=1 - dnl This ifdef is necessary to avoid an error "missing file lib/stdio-write.c" - dnl "expected source file, required through AC_LIBSOURCES, not found". It is - dnl also an optimization, to avoid performing a configure check whose result - dnl is not used. But it does not make the test of GNULIB_STDIO_H_SIGPIPE or - dnl GNULIB_SIGPIPE redundant. - m4_ifdef([gl_SIGNAL_SIGPIPE], [ - gl_SIGNAL_SIGPIPE - if test $gl_cv_header_signal_h_SIGPIPE != yes; then - REPLACE_STDIO_WRITE_FUNCS=1 - AC_LIBOBJ([stdio-write]) - fi - ]) - dnl This ifdef is necessary to avoid an error "missing file lib/stdio-write.c" - dnl "expected source file, required through AC_LIBSOURCES, not found". It is - dnl also an optimization, to avoid performing a configure check whose result - dnl is not used. But it does not make the test of GNULIB_STDIO_H_NONBLOCKING - dnl or GNULIB_NONBLOCKING redundant. - m4_ifdef([gl_NONBLOCKING_IO], [ - gl_NONBLOCKING_IO - if test $gl_cv_have_nonblocking != yes; then - REPLACE_STDIO_WRITE_FUNCS=1 - AC_LIBOBJ([stdio-write]) - fi - ]) - - dnl Check for declarations of anything we want to poison if the - dnl corresponding gnulib module is not in use, and which is not - dnl guaranteed by both C89 and C11. - gl_WARN_ON_USE_PREPARE([[#include - ]], [dprintf fpurge fseeko ftello getdelim getline gets pclose popen - renameat snprintf tmpfile vdprintf vsnprintf]) -]) - -AC_DEFUN([gl_STDIO_MODULE_INDICATOR], -[ - dnl Use AC_REQUIRE here, so that the default settings are expanded once only. - AC_REQUIRE([gl_STDIO_H_DEFAULTS]) - gl_MODULE_INDICATOR_SET_VARIABLE([$1]) - dnl Define it also as a C macro, for the benefit of the unit tests. - gl_MODULE_INDICATOR_FOR_TESTS([$1]) -]) - -AC_DEFUN([gl_STDIO_H_DEFAULTS], -[ - GNULIB_DPRINTF=0; AC_SUBST([GNULIB_DPRINTF]) - GNULIB_FCLOSE=0; AC_SUBST([GNULIB_FCLOSE]) - GNULIB_FDOPEN=0; AC_SUBST([GNULIB_FDOPEN]) - GNULIB_FFLUSH=0; AC_SUBST([GNULIB_FFLUSH]) - GNULIB_FGETC=0; AC_SUBST([GNULIB_FGETC]) - GNULIB_FGETS=0; AC_SUBST([GNULIB_FGETS]) - GNULIB_FOPEN=0; AC_SUBST([GNULIB_FOPEN]) - GNULIB_FPRINTF=0; AC_SUBST([GNULIB_FPRINTF]) - GNULIB_FPRINTF_POSIX=0; AC_SUBST([GNULIB_FPRINTF_POSIX]) - GNULIB_FPURGE=0; AC_SUBST([GNULIB_FPURGE]) - GNULIB_FPUTC=0; AC_SUBST([GNULIB_FPUTC]) - GNULIB_FPUTS=0; AC_SUBST([GNULIB_FPUTS]) - GNULIB_FREAD=0; AC_SUBST([GNULIB_FREAD]) - GNULIB_FREOPEN=0; AC_SUBST([GNULIB_FREOPEN]) - GNULIB_FSCANF=0; AC_SUBST([GNULIB_FSCANF]) - GNULIB_FSEEK=0; AC_SUBST([GNULIB_FSEEK]) - GNULIB_FSEEKO=0; AC_SUBST([GNULIB_FSEEKO]) - GNULIB_FTELL=0; AC_SUBST([GNULIB_FTELL]) - GNULIB_FTELLO=0; AC_SUBST([GNULIB_FTELLO]) - GNULIB_FWRITE=0; AC_SUBST([GNULIB_FWRITE]) - GNULIB_GETC=0; AC_SUBST([GNULIB_GETC]) - GNULIB_GETCHAR=0; AC_SUBST([GNULIB_GETCHAR]) - GNULIB_GETDELIM=0; AC_SUBST([GNULIB_GETDELIM]) - GNULIB_GETLINE=0; AC_SUBST([GNULIB_GETLINE]) - GNULIB_OBSTACK_PRINTF=0; AC_SUBST([GNULIB_OBSTACK_PRINTF]) - GNULIB_OBSTACK_PRINTF_POSIX=0; AC_SUBST([GNULIB_OBSTACK_PRINTF_POSIX]) - GNULIB_PCLOSE=0; AC_SUBST([GNULIB_PCLOSE]) - GNULIB_PERROR=0; AC_SUBST([GNULIB_PERROR]) - GNULIB_POPEN=0; AC_SUBST([GNULIB_POPEN]) - GNULIB_PRINTF=0; AC_SUBST([GNULIB_PRINTF]) - GNULIB_PRINTF_POSIX=0; AC_SUBST([GNULIB_PRINTF_POSIX]) - GNULIB_PUTC=0; AC_SUBST([GNULIB_PUTC]) - GNULIB_PUTCHAR=0; AC_SUBST([GNULIB_PUTCHAR]) - GNULIB_PUTS=0; AC_SUBST([GNULIB_PUTS]) - GNULIB_REMOVE=0; AC_SUBST([GNULIB_REMOVE]) - GNULIB_RENAME=0; AC_SUBST([GNULIB_RENAME]) - GNULIB_RENAMEAT=0; AC_SUBST([GNULIB_RENAMEAT]) - GNULIB_SCANF=0; AC_SUBST([GNULIB_SCANF]) - GNULIB_SNPRINTF=0; AC_SUBST([GNULIB_SNPRINTF]) - GNULIB_SPRINTF_POSIX=0; AC_SUBST([GNULIB_SPRINTF_POSIX]) - GNULIB_STDIO_H_NONBLOCKING=0; AC_SUBST([GNULIB_STDIO_H_NONBLOCKING]) - GNULIB_STDIO_H_SIGPIPE=0; AC_SUBST([GNULIB_STDIO_H_SIGPIPE]) - GNULIB_TMPFILE=0; AC_SUBST([GNULIB_TMPFILE]) - GNULIB_VASPRINTF=0; AC_SUBST([GNULIB_VASPRINTF]) - GNULIB_VFSCANF=0; AC_SUBST([GNULIB_VFSCANF]) - GNULIB_VSCANF=0; AC_SUBST([GNULIB_VSCANF]) - GNULIB_VDPRINTF=0; AC_SUBST([GNULIB_VDPRINTF]) - GNULIB_VFPRINTF=0; AC_SUBST([GNULIB_VFPRINTF]) - GNULIB_VFPRINTF_POSIX=0; AC_SUBST([GNULIB_VFPRINTF_POSIX]) - GNULIB_VPRINTF=0; AC_SUBST([GNULIB_VPRINTF]) - GNULIB_VPRINTF_POSIX=0; AC_SUBST([GNULIB_VPRINTF_POSIX]) - GNULIB_VSNPRINTF=0; AC_SUBST([GNULIB_VSNPRINTF]) - GNULIB_VSPRINTF_POSIX=0; AC_SUBST([GNULIB_VSPRINTF_POSIX]) - dnl Assume proper GNU behavior unless another module says otherwise. - HAVE_DECL_FPURGE=1; AC_SUBST([HAVE_DECL_FPURGE]) - HAVE_DECL_FSEEKO=1; AC_SUBST([HAVE_DECL_FSEEKO]) - HAVE_DECL_FTELLO=1; AC_SUBST([HAVE_DECL_FTELLO]) - HAVE_DECL_GETDELIM=1; AC_SUBST([HAVE_DECL_GETDELIM]) - HAVE_DECL_GETLINE=1; AC_SUBST([HAVE_DECL_GETLINE]) - HAVE_DECL_OBSTACK_PRINTF=1; AC_SUBST([HAVE_DECL_OBSTACK_PRINTF]) - HAVE_DECL_SNPRINTF=1; AC_SUBST([HAVE_DECL_SNPRINTF]) - HAVE_DECL_VSNPRINTF=1; AC_SUBST([HAVE_DECL_VSNPRINTF]) - HAVE_DPRINTF=1; AC_SUBST([HAVE_DPRINTF]) - HAVE_FSEEKO=1; AC_SUBST([HAVE_FSEEKO]) - HAVE_FTELLO=1; AC_SUBST([HAVE_FTELLO]) - HAVE_PCLOSE=1; AC_SUBST([HAVE_PCLOSE]) - HAVE_POPEN=1; AC_SUBST([HAVE_POPEN]) - HAVE_RENAMEAT=1; AC_SUBST([HAVE_RENAMEAT]) - HAVE_VASPRINTF=1; AC_SUBST([HAVE_VASPRINTF]) - HAVE_VDPRINTF=1; AC_SUBST([HAVE_VDPRINTF]) - REPLACE_DPRINTF=0; AC_SUBST([REPLACE_DPRINTF]) - REPLACE_FCLOSE=0; AC_SUBST([REPLACE_FCLOSE]) - REPLACE_FDOPEN=0; AC_SUBST([REPLACE_FDOPEN]) - REPLACE_FFLUSH=0; AC_SUBST([REPLACE_FFLUSH]) - REPLACE_FOPEN=0; AC_SUBST([REPLACE_FOPEN]) - REPLACE_FPRINTF=0; AC_SUBST([REPLACE_FPRINTF]) - REPLACE_FPURGE=0; AC_SUBST([REPLACE_FPURGE]) - REPLACE_FREOPEN=0; AC_SUBST([REPLACE_FREOPEN]) - REPLACE_FSEEK=0; AC_SUBST([REPLACE_FSEEK]) - REPLACE_FSEEKO=0; AC_SUBST([REPLACE_FSEEKO]) - REPLACE_FTELL=0; AC_SUBST([REPLACE_FTELL]) - REPLACE_FTELLO=0; AC_SUBST([REPLACE_FTELLO]) - REPLACE_GETDELIM=0; AC_SUBST([REPLACE_GETDELIM]) - REPLACE_GETLINE=0; AC_SUBST([REPLACE_GETLINE]) - REPLACE_OBSTACK_PRINTF=0; AC_SUBST([REPLACE_OBSTACK_PRINTF]) - REPLACE_PERROR=0; AC_SUBST([REPLACE_PERROR]) - REPLACE_POPEN=0; AC_SUBST([REPLACE_POPEN]) - REPLACE_PRINTF=0; AC_SUBST([REPLACE_PRINTF]) - REPLACE_REMOVE=0; AC_SUBST([REPLACE_REMOVE]) - REPLACE_RENAME=0; AC_SUBST([REPLACE_RENAME]) - REPLACE_RENAMEAT=0; AC_SUBST([REPLACE_RENAMEAT]) - REPLACE_SNPRINTF=0; AC_SUBST([REPLACE_SNPRINTF]) - REPLACE_SPRINTF=0; AC_SUBST([REPLACE_SPRINTF]) - REPLACE_STDIO_READ_FUNCS=0; AC_SUBST([REPLACE_STDIO_READ_FUNCS]) - REPLACE_STDIO_WRITE_FUNCS=0; AC_SUBST([REPLACE_STDIO_WRITE_FUNCS]) - REPLACE_TMPFILE=0; AC_SUBST([REPLACE_TMPFILE]) - REPLACE_VASPRINTF=0; AC_SUBST([REPLACE_VASPRINTF]) - REPLACE_VDPRINTF=0; AC_SUBST([REPLACE_VDPRINTF]) - REPLACE_VFPRINTF=0; AC_SUBST([REPLACE_VFPRINTF]) - REPLACE_VPRINTF=0; AC_SUBST([REPLACE_VPRINTF]) - REPLACE_VSNPRINTF=0; AC_SUBST([REPLACE_VSNPRINTF]) - REPLACE_VSPRINTF=0; AC_SUBST([REPLACE_VSPRINTF]) -]) diff --git a/gl/m4/stdlib_h.m4 b/gl/m4/stdlib_h.m4 deleted file mode 100644 index 110fe2d..0000000 --- a/gl/m4/stdlib_h.m4 +++ /dev/null @@ -1,120 +0,0 @@ -# stdlib_h.m4 serial 43 -dnl Copyright (C) 2007-2017 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_STDLIB_H], -[ - AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) - gl_NEXT_HEADERS([stdlib.h]) - - dnl Check for declarations of anything we want to poison if the - dnl corresponding gnulib module is not in use, and which is not - dnl guaranteed by C89. - gl_WARN_ON_USE_PREPARE([[#include -#if HAVE_SYS_LOADAVG_H -# include -#endif -#if HAVE_RANDOM_H -# include -#endif - ]], [_Exit atoll canonicalize_file_name getloadavg getsubopt grantpt - initstate initstate_r mkdtemp mkostemp mkostemps mkstemp mkstemps - posix_openpt ptsname ptsname_r qsort_r random random_r realpath rpmatch - secure_getenv setenv setstate setstate_r srandom srandom_r - strtod strtoll strtoull unlockpt unsetenv]) -]) - -AC_DEFUN([gl_STDLIB_MODULE_INDICATOR], -[ - dnl Use AC_REQUIRE here, so that the default settings are expanded once only. - AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) - gl_MODULE_INDICATOR_SET_VARIABLE([$1]) - dnl Define it also as a C macro, for the benefit of the unit tests. - gl_MODULE_INDICATOR_FOR_TESTS([$1]) -]) - -AC_DEFUN([gl_STDLIB_H_DEFAULTS], -[ - GNULIB__EXIT=0; AC_SUBST([GNULIB__EXIT]) - GNULIB_ATOLL=0; AC_SUBST([GNULIB_ATOLL]) - GNULIB_CALLOC_POSIX=0; AC_SUBST([GNULIB_CALLOC_POSIX]) - GNULIB_CANONICALIZE_FILE_NAME=0; AC_SUBST([GNULIB_CANONICALIZE_FILE_NAME]) - GNULIB_GETLOADAVG=0; AC_SUBST([GNULIB_GETLOADAVG]) - GNULIB_GETSUBOPT=0; AC_SUBST([GNULIB_GETSUBOPT]) - GNULIB_GRANTPT=0; AC_SUBST([GNULIB_GRANTPT]) - GNULIB_MALLOC_POSIX=0; AC_SUBST([GNULIB_MALLOC_POSIX]) - GNULIB_MBTOWC=0; AC_SUBST([GNULIB_MBTOWC]) - GNULIB_MKDTEMP=0; AC_SUBST([GNULIB_MKDTEMP]) - GNULIB_MKOSTEMP=0; AC_SUBST([GNULIB_MKOSTEMP]) - GNULIB_MKOSTEMPS=0; AC_SUBST([GNULIB_MKOSTEMPS]) - GNULIB_MKSTEMP=0; AC_SUBST([GNULIB_MKSTEMP]) - GNULIB_MKSTEMPS=0; AC_SUBST([GNULIB_MKSTEMPS]) - GNULIB_POSIX_OPENPT=0; AC_SUBST([GNULIB_POSIX_OPENPT]) - GNULIB_PTSNAME=0; AC_SUBST([GNULIB_PTSNAME]) - GNULIB_PTSNAME_R=0; AC_SUBST([GNULIB_PTSNAME_R]) - GNULIB_PUTENV=0; AC_SUBST([GNULIB_PUTENV]) - GNULIB_QSORT_R=0; AC_SUBST([GNULIB_QSORT_R]) - GNULIB_RANDOM=0; AC_SUBST([GNULIB_RANDOM]) - GNULIB_RANDOM_R=0; AC_SUBST([GNULIB_RANDOM_R]) - GNULIB_REALLOC_POSIX=0; AC_SUBST([GNULIB_REALLOC_POSIX]) - GNULIB_REALPATH=0; AC_SUBST([GNULIB_REALPATH]) - GNULIB_RPMATCH=0; AC_SUBST([GNULIB_RPMATCH]) - GNULIB_SECURE_GETENV=0; AC_SUBST([GNULIB_SECURE_GETENV]) - GNULIB_SETENV=0; AC_SUBST([GNULIB_SETENV]) - GNULIB_STRTOD=0; AC_SUBST([GNULIB_STRTOD]) - GNULIB_STRTOLL=0; AC_SUBST([GNULIB_STRTOLL]) - GNULIB_STRTOULL=0; AC_SUBST([GNULIB_STRTOULL]) - GNULIB_SYSTEM_POSIX=0; AC_SUBST([GNULIB_SYSTEM_POSIX]) - GNULIB_UNLOCKPT=0; AC_SUBST([GNULIB_UNLOCKPT]) - GNULIB_UNSETENV=0; AC_SUBST([GNULIB_UNSETENV]) - GNULIB_WCTOMB=0; AC_SUBST([GNULIB_WCTOMB]) - dnl Assume proper GNU behavior unless another module says otherwise. - HAVE__EXIT=1; AC_SUBST([HAVE__EXIT]) - HAVE_ATOLL=1; AC_SUBST([HAVE_ATOLL]) - HAVE_CANONICALIZE_FILE_NAME=1; AC_SUBST([HAVE_CANONICALIZE_FILE_NAME]) - HAVE_DECL_GETLOADAVG=1; AC_SUBST([HAVE_DECL_GETLOADAVG]) - HAVE_GETSUBOPT=1; AC_SUBST([HAVE_GETSUBOPT]) - HAVE_GRANTPT=1; AC_SUBST([HAVE_GRANTPT]) - HAVE_MKDTEMP=1; AC_SUBST([HAVE_MKDTEMP]) - HAVE_MKOSTEMP=1; AC_SUBST([HAVE_MKOSTEMP]) - HAVE_MKOSTEMPS=1; AC_SUBST([HAVE_MKOSTEMPS]) - HAVE_MKSTEMP=1; AC_SUBST([HAVE_MKSTEMP]) - HAVE_MKSTEMPS=1; AC_SUBST([HAVE_MKSTEMPS]) - HAVE_POSIX_OPENPT=1; AC_SUBST([HAVE_POSIX_OPENPT]) - HAVE_PTSNAME=1; AC_SUBST([HAVE_PTSNAME]) - HAVE_PTSNAME_R=1; AC_SUBST([HAVE_PTSNAME_R]) - HAVE_QSORT_R=1; AC_SUBST([HAVE_QSORT_R]) - HAVE_RANDOM=1; AC_SUBST([HAVE_RANDOM]) - HAVE_RANDOM_H=1; AC_SUBST([HAVE_RANDOM_H]) - HAVE_RANDOM_R=1; AC_SUBST([HAVE_RANDOM_R]) - HAVE_REALPATH=1; AC_SUBST([HAVE_REALPATH]) - HAVE_RPMATCH=1; AC_SUBST([HAVE_RPMATCH]) - HAVE_SECURE_GETENV=1; AC_SUBST([HAVE_SECURE_GETENV]) - HAVE_SETENV=1; AC_SUBST([HAVE_SETENV]) - HAVE_DECL_SETENV=1; AC_SUBST([HAVE_DECL_SETENV]) - HAVE_STRTOD=1; AC_SUBST([HAVE_STRTOD]) - HAVE_STRTOLL=1; AC_SUBST([HAVE_STRTOLL]) - HAVE_STRTOULL=1; AC_SUBST([HAVE_STRTOULL]) - HAVE_STRUCT_RANDOM_DATA=1; AC_SUBST([HAVE_STRUCT_RANDOM_DATA]) - HAVE_SYS_LOADAVG_H=0; AC_SUBST([HAVE_SYS_LOADAVG_H]) - HAVE_UNLOCKPT=1; AC_SUBST([HAVE_UNLOCKPT]) - HAVE_DECL_UNSETENV=1; AC_SUBST([HAVE_DECL_UNSETENV]) - REPLACE_CALLOC=0; AC_SUBST([REPLACE_CALLOC]) - REPLACE_CANONICALIZE_FILE_NAME=0; AC_SUBST([REPLACE_CANONICALIZE_FILE_NAME]) - REPLACE_MALLOC=0; AC_SUBST([REPLACE_MALLOC]) - REPLACE_MBTOWC=0; AC_SUBST([REPLACE_MBTOWC]) - REPLACE_MKSTEMP=0; AC_SUBST([REPLACE_MKSTEMP]) - REPLACE_PTSNAME=0; AC_SUBST([REPLACE_PTSNAME]) - REPLACE_PTSNAME_R=0; AC_SUBST([REPLACE_PTSNAME_R]) - REPLACE_PUTENV=0; AC_SUBST([REPLACE_PUTENV]) - REPLACE_QSORT_R=0; AC_SUBST([REPLACE_QSORT_R]) - REPLACE_RANDOM_R=0; AC_SUBST([REPLACE_RANDOM_R]) - REPLACE_REALLOC=0; AC_SUBST([REPLACE_REALLOC]) - REPLACE_REALPATH=0; AC_SUBST([REPLACE_REALPATH]) - REPLACE_SETENV=0; AC_SUBST([REPLACE_SETENV]) - REPLACE_STRTOD=0; AC_SUBST([REPLACE_STRTOD]) - REPLACE_UNSETENV=0; AC_SUBST([REPLACE_UNSETENV]) - REPLACE_WCTOMB=0; AC_SUBST([REPLACE_WCTOMB]) -]) diff --git a/gl/m4/sys_socket_h.m4 b/gl/m4/sys_socket_h.m4 deleted file mode 100644 index 3ecbe7c..0000000 --- a/gl/m4/sys_socket_h.m4 +++ /dev/null @@ -1,176 +0,0 @@ -# sys_socket_h.m4 serial 23 -dnl Copyright (C) 2005-2017 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Simon Josefsson. - -AC_DEFUN([gl_HEADER_SYS_SOCKET], -[ - AC_REQUIRE([gl_SYS_SOCKET_H_DEFAULTS]) - AC_REQUIRE([AC_CANONICAL_HOST]) - - dnl On OSF/1, the functions recv(), send(), recvfrom(), sendto() have - dnl old-style declarations (with return type 'int' instead of 'ssize_t') - dnl unless _POSIX_PII_SOCKET is defined. - case "$host_os" in - osf*) - AC_DEFINE([_POSIX_PII_SOCKET], [1], - [Define to 1 in order to get the POSIX compatible declarations - of socket functions.]) - ;; - esac - - AC_CACHE_CHECK([whether is self-contained], - [gl_cv_header_sys_socket_h_selfcontained], - [ - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[]])], - [gl_cv_header_sys_socket_h_selfcontained=yes], - [gl_cv_header_sys_socket_h_selfcontained=no]) - ]) - if test $gl_cv_header_sys_socket_h_selfcontained = yes; then - dnl If the shutdown function exists, should define - dnl SHUT_RD, SHUT_WR, SHUT_RDWR. - AC_CHECK_FUNCS([shutdown]) - if test $ac_cv_func_shutdown = yes; then - AC_CACHE_CHECK([whether defines the SHUT_* macros], - [gl_cv_header_sys_socket_h_shut], - [ - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([[#include ]], - [[int a[] = { SHUT_RD, SHUT_WR, SHUT_RDWR };]])], - [gl_cv_header_sys_socket_h_shut=yes], - [gl_cv_header_sys_socket_h_shut=no]) - ]) - if test $gl_cv_header_sys_socket_h_shut = no; then - SYS_SOCKET_H='sys/socket.h' - fi - fi - fi - # We need to check for ws2tcpip.h now. - gl_PREREQ_SYS_H_SOCKET - AC_CHECK_TYPES([struct sockaddr_storage, sa_family_t],,,[ - /* sys/types.h is not needed according to POSIX, but the - sys/socket.h in i386-unknown-freebsd4.10 and - powerpc-apple-darwin5.5 required it. */ -#include -#ifdef HAVE_SYS_SOCKET_H -#include -#endif -#ifdef HAVE_WS2TCPIP_H -#include -#endif -]) - if test $ac_cv_type_struct_sockaddr_storage = no; then - HAVE_STRUCT_SOCKADDR_STORAGE=0 - fi - if test $ac_cv_type_sa_family_t = no; then - HAVE_SA_FAMILY_T=0 - fi - if test $ac_cv_type_struct_sockaddr_storage != no; then - AC_CHECK_MEMBERS([struct sockaddr_storage.ss_family], - [], - [HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=0], - [#include - #ifdef HAVE_SYS_SOCKET_H - #include - #endif - #ifdef HAVE_WS2TCPIP_H - #include - #endif - ]) - fi - if test $HAVE_STRUCT_SOCKADDR_STORAGE = 0 || test $HAVE_SA_FAMILY_T = 0 \ - || test $HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = 0; then - SYS_SOCKET_H='sys/socket.h' - fi - gl_PREREQ_SYS_H_WINSOCK2 - - dnl Check for declarations of anything we want to poison if the - dnl corresponding gnulib module is not in use. - gl_WARN_ON_USE_PREPARE([[ -/* Some systems require prerequisite headers. */ -#include -#include - ]], [socket connect accept bind getpeername getsockname getsockopt - listen recv send recvfrom sendto setsockopt shutdown accept4]) -]) - -AC_DEFUN([gl_PREREQ_SYS_H_SOCKET], -[ - dnl Check prerequisites of the replacement. - AC_REQUIRE([gl_CHECK_SOCKET_HEADERS]) - gl_CHECK_NEXT_HEADERS([sys/socket.h]) - if test $ac_cv_header_sys_socket_h = yes; then - HAVE_SYS_SOCKET_H=1 - HAVE_WS2TCPIP_H=0 - else - HAVE_SYS_SOCKET_H=0 - if test $ac_cv_header_ws2tcpip_h = yes; then - HAVE_WS2TCPIP_H=1 - else - HAVE_WS2TCPIP_H=0 - fi - fi - AC_SUBST([HAVE_SYS_SOCKET_H]) - AC_SUBST([HAVE_WS2TCPIP_H]) -]) - -# Common prerequisites of the replacement and of the -# replacement. -# Sets and substitutes HAVE_WINSOCK2_H. -AC_DEFUN([gl_PREREQ_SYS_H_WINSOCK2], -[ - m4_ifdef([gl_UNISTD_H_DEFAULTS], [AC_REQUIRE([gl_UNISTD_H_DEFAULTS])]) - m4_ifdef([gl_SYS_IOCTL_H_DEFAULTS], [AC_REQUIRE([gl_SYS_IOCTL_H_DEFAULTS])]) - AC_CHECK_HEADERS_ONCE([sys/socket.h]) - if test $ac_cv_header_sys_socket_h != yes; then - dnl We cannot use AC_CHECK_HEADERS_ONCE here, because that would make - dnl the check for those headers unconditional; yet cygwin reports - dnl that the headers are present but cannot be compiled (since on - dnl cygwin, all socket information should come from sys/socket.h). - AC_CHECK_HEADERS([winsock2.h]) - fi - if test "$ac_cv_header_winsock2_h" = yes; then - HAVE_WINSOCK2_H=1 - UNISTD_H_HAVE_WINSOCK2_H=1 - SYS_IOCTL_H_HAVE_WINSOCK2_H=1 - else - HAVE_WINSOCK2_H=0 - fi - AC_SUBST([HAVE_WINSOCK2_H]) -]) - -AC_DEFUN([gl_SYS_SOCKET_MODULE_INDICATOR], -[ - dnl Use AC_REQUIRE here, so that the default settings are expanded once only. - AC_REQUIRE([gl_SYS_SOCKET_H_DEFAULTS]) - gl_MODULE_INDICATOR_SET_VARIABLE([$1]) - dnl Define it also as a C macro, for the benefit of the unit tests. - gl_MODULE_INDICATOR_FOR_TESTS([$1]) -]) - -AC_DEFUN([gl_SYS_SOCKET_H_DEFAULTS], -[ - GNULIB_SOCKET=0; AC_SUBST([GNULIB_SOCKET]) - GNULIB_CONNECT=0; AC_SUBST([GNULIB_CONNECT]) - GNULIB_ACCEPT=0; AC_SUBST([GNULIB_ACCEPT]) - GNULIB_BIND=0; AC_SUBST([GNULIB_BIND]) - GNULIB_GETPEERNAME=0; AC_SUBST([GNULIB_GETPEERNAME]) - GNULIB_GETSOCKNAME=0; AC_SUBST([GNULIB_GETSOCKNAME]) - GNULIB_GETSOCKOPT=0; AC_SUBST([GNULIB_GETSOCKOPT]) - GNULIB_LISTEN=0; AC_SUBST([GNULIB_LISTEN]) - GNULIB_RECV=0; AC_SUBST([GNULIB_RECV]) - GNULIB_SEND=0; AC_SUBST([GNULIB_SEND]) - GNULIB_RECVFROM=0; AC_SUBST([GNULIB_RECVFROM]) - GNULIB_SENDTO=0; AC_SUBST([GNULIB_SENDTO]) - GNULIB_SETSOCKOPT=0; AC_SUBST([GNULIB_SETSOCKOPT]) - GNULIB_SHUTDOWN=0; AC_SUBST([GNULIB_SHUTDOWN]) - GNULIB_ACCEPT4=0; AC_SUBST([GNULIB_ACCEPT4]) - HAVE_STRUCT_SOCKADDR_STORAGE=1; AC_SUBST([HAVE_STRUCT_SOCKADDR_STORAGE]) - HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=1; - AC_SUBST([HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY]) - HAVE_SA_FAMILY_T=1; AC_SUBST([HAVE_SA_FAMILY_T]) - HAVE_ACCEPT4=1; AC_SUBST([HAVE_ACCEPT4]) -]) diff --git a/gl/m4/sys_stat_h.m4 b/gl/m4/sys_stat_h.m4 deleted file mode 100644 index 1e34ac4..0000000 --- a/gl/m4/sys_stat_h.m4 +++ /dev/null @@ -1,96 +0,0 @@ -# sys_stat_h.m4 serial 28 -*- Autoconf -*- -dnl Copyright (C) 2006-2017 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Eric Blake. -dnl Provide a GNU-like . - -AC_DEFUN([gl_HEADER_SYS_STAT_H], -[ - AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS]) - - dnl Check for broken stat macros. - AC_REQUIRE([AC_HEADER_STAT]) - - gl_CHECK_NEXT_HEADERS([sys/stat.h]) - - dnl Ensure the type mode_t gets defined. - AC_REQUIRE([AC_TYPE_MODE_T]) - - dnl Whether to override 'struct stat'. - m4_ifdef([gl_LARGEFILE], [ - AC_REQUIRE([gl_LARGEFILE]) - ], [ - WINDOWS_64_BIT_ST_SIZE=0 - ]) - AC_SUBST([WINDOWS_64_BIT_ST_SIZE]) - if test $WINDOWS_64_BIT_ST_SIZE = 1; then - AC_DEFINE([_GL_WINDOWS_64_BIT_ST_SIZE], [1], - [Define to 1 if Gnulib overrides 'struct stat' on Windows so that - struct stat.st_size becomes 64-bit.]) - fi - - dnl Define types that are supposed to be defined in or - dnl . - AC_CHECK_TYPE([nlink_t], [], - [AC_DEFINE([nlink_t], [int], - [Define to the type of st_nlink in struct stat, or a supertype.])], - [#include - #include ]) - - dnl Check for declarations of anything we want to poison if the - dnl corresponding gnulib module is not in use. - gl_WARN_ON_USE_PREPARE([[#include - ]], [fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat - mknod mknodat stat utimensat]) -]) # gl_HEADER_SYS_STAT_H - -AC_DEFUN([gl_SYS_STAT_MODULE_INDICATOR], -[ - dnl Use AC_REQUIRE here, so that the default settings are expanded once only. - AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS]) - gl_MODULE_INDICATOR_SET_VARIABLE([$1]) - dnl Define it also as a C macro, for the benefit of the unit tests. - gl_MODULE_INDICATOR_FOR_TESTS([$1]) -]) - -AC_DEFUN([gl_SYS_STAT_H_DEFAULTS], -[ - AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) dnl for REPLACE_FCHDIR - GNULIB_FCHMODAT=0; AC_SUBST([GNULIB_FCHMODAT]) - GNULIB_FSTAT=0; AC_SUBST([GNULIB_FSTAT]) - GNULIB_FSTATAT=0; AC_SUBST([GNULIB_FSTATAT]) - GNULIB_FUTIMENS=0; AC_SUBST([GNULIB_FUTIMENS]) - GNULIB_LCHMOD=0; AC_SUBST([GNULIB_LCHMOD]) - GNULIB_LSTAT=0; AC_SUBST([GNULIB_LSTAT]) - GNULIB_MKDIRAT=0; AC_SUBST([GNULIB_MKDIRAT]) - GNULIB_MKFIFO=0; AC_SUBST([GNULIB_MKFIFO]) - GNULIB_MKFIFOAT=0; AC_SUBST([GNULIB_MKFIFOAT]) - GNULIB_MKNOD=0; AC_SUBST([GNULIB_MKNOD]) - GNULIB_MKNODAT=0; AC_SUBST([GNULIB_MKNODAT]) - GNULIB_STAT=0; AC_SUBST([GNULIB_STAT]) - GNULIB_UTIMENSAT=0; AC_SUBST([GNULIB_UTIMENSAT]) - dnl Assume proper GNU behavior unless another module says otherwise. - HAVE_FCHMODAT=1; AC_SUBST([HAVE_FCHMODAT]) - HAVE_FSTATAT=1; AC_SUBST([HAVE_FSTATAT]) - HAVE_FUTIMENS=1; AC_SUBST([HAVE_FUTIMENS]) - HAVE_LCHMOD=1; AC_SUBST([HAVE_LCHMOD]) - HAVE_LSTAT=1; AC_SUBST([HAVE_LSTAT]) - HAVE_MKDIRAT=1; AC_SUBST([HAVE_MKDIRAT]) - HAVE_MKFIFO=1; AC_SUBST([HAVE_MKFIFO]) - HAVE_MKFIFOAT=1; AC_SUBST([HAVE_MKFIFOAT]) - HAVE_MKNOD=1; AC_SUBST([HAVE_MKNOD]) - HAVE_MKNODAT=1; AC_SUBST([HAVE_MKNODAT]) - HAVE_UTIMENSAT=1; AC_SUBST([HAVE_UTIMENSAT]) - REPLACE_FSTAT=0; AC_SUBST([REPLACE_FSTAT]) - REPLACE_FSTATAT=0; AC_SUBST([REPLACE_FSTATAT]) - REPLACE_FUTIMENS=0; AC_SUBST([REPLACE_FUTIMENS]) - REPLACE_LSTAT=0; AC_SUBST([REPLACE_LSTAT]) - REPLACE_MKDIR=0; AC_SUBST([REPLACE_MKDIR]) - REPLACE_MKFIFO=0; AC_SUBST([REPLACE_MKFIFO]) - REPLACE_MKNOD=0; AC_SUBST([REPLACE_MKNOD]) - REPLACE_STAT=0; AC_SUBST([REPLACE_STAT]) - REPLACE_UTIMENSAT=0; AC_SUBST([REPLACE_UTIMENSAT]) -]) diff --git a/gl/m4/sys_time_h.m4 b/gl/m4/sys_time_h.m4 deleted file mode 100644 index e622dbe..0000000 --- a/gl/m4/sys_time_h.m4 +++ /dev/null @@ -1,111 +0,0 @@ -# Configure a replacement for . -# serial 8 - -# Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# Written by Paul Eggert and Martin Lambers. - -AC_DEFUN([gl_HEADER_SYS_TIME_H], -[ - dnl Use AC_REQUIRE here, so that the REPLACE_GETTIMEOFDAY=0 statement - dnl below is expanded once only, before all REPLACE_GETTIMEOFDAY=1 - dnl statements that occur in other macros. - AC_REQUIRE([gl_HEADER_SYS_TIME_H_BODY]) -]) - -AC_DEFUN([gl_HEADER_SYS_TIME_H_BODY], -[ - AC_REQUIRE([AC_C_RESTRICT]) - AC_REQUIRE([gl_HEADER_SYS_TIME_H_DEFAULTS]) - AC_CHECK_HEADERS_ONCE([sys/time.h]) - gl_CHECK_NEXT_HEADERS([sys/time.h]) - - if test $ac_cv_header_sys_time_h != yes; then - HAVE_SYS_TIME_H=0 - fi - - dnl On native Windows with MSVC, 'struct timeval' is defined in - dnl only. So include that header in the list. - gl_PREREQ_SYS_H_WINSOCK2 - AC_CACHE_CHECK([for struct timeval], [gl_cv_sys_struct_timeval], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[#if HAVE_SYS_TIME_H - #include - #endif - #include - #if HAVE_WINSOCK2_H - # include - #endif - ]], - [[static struct timeval x; x.tv_sec = x.tv_usec;]])], - [gl_cv_sys_struct_timeval=yes], - [gl_cv_sys_struct_timeval=no]) - ]) - if test $gl_cv_sys_struct_timeval != yes; then - HAVE_STRUCT_TIMEVAL=0 - else - dnl On native Windows with a 64-bit 'time_t', 'struct timeval' is defined - dnl (in and for mingw64, in only - dnl for MSVC) with a tv_sec field of type 'long' (32-bit!), which is - dnl smaller than the 'time_t' type mandated by POSIX. - dnl On OpenBSD 5.1 amd64, tv_sec is 64 bits and time_t 32 bits, but - dnl that is good enough. - AC_CACHE_CHECK([for wide-enough struct timeval.tv_sec member], - [gl_cv_sys_struct_timeval_tv_sec], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[#if HAVE_SYS_TIME_H - #include - #endif - #include - #if HAVE_WINSOCK2_H - # include - #endif - ]], - [[static struct timeval x; - typedef int verify_tv_sec_type[ - sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1 - ]; - ]])], - [gl_cv_sys_struct_timeval_tv_sec=yes], - [gl_cv_sys_struct_timeval_tv_sec=no]) - ]) - if test $gl_cv_sys_struct_timeval_tv_sec != yes; then - REPLACE_STRUCT_TIMEVAL=1 - fi - fi - - dnl Check for declarations of anything we want to poison if the - dnl corresponding gnulib module is not in use. - gl_WARN_ON_USE_PREPARE([[ -#if HAVE_SYS_TIME_H -# include -#endif -#include - ]], [gettimeofday]) -]) - -AC_DEFUN([gl_SYS_TIME_MODULE_INDICATOR], -[ - dnl Use AC_REQUIRE here, so that the default settings are expanded once only. - AC_REQUIRE([gl_HEADER_SYS_TIME_H_DEFAULTS]) - gl_MODULE_INDICATOR_SET_VARIABLE([$1]) - dnl Define it also as a C macro, for the benefit of the unit tests. - gl_MODULE_INDICATOR_FOR_TESTS([$1]) -]) - -AC_DEFUN([gl_HEADER_SYS_TIME_H_DEFAULTS], -[ - GNULIB_GETTIMEOFDAY=0; AC_SUBST([GNULIB_GETTIMEOFDAY]) - dnl Assume POSIX behavior unless another module says otherwise. - HAVE_GETTIMEOFDAY=1; AC_SUBST([HAVE_GETTIMEOFDAY]) - HAVE_STRUCT_TIMEVAL=1; AC_SUBST([HAVE_STRUCT_TIMEVAL]) - HAVE_SYS_TIME_H=1; AC_SUBST([HAVE_SYS_TIME_H]) - HAVE_TIMEZONE_T=0; AC_SUBST([HAVE_TIMEZONE_T]) - REPLACE_GETTIMEOFDAY=0; AC_SUBST([REPLACE_GETTIMEOFDAY]) - REPLACE_STRUCT_TIMEVAL=0; AC_SUBST([REPLACE_STRUCT_TIMEVAL]) -]) diff --git a/gl/m4/sys_types_h.m4 b/gl/m4/sys_types_h.m4 deleted file mode 100644 index 2eb4e9e..0000000 --- a/gl/m4/sys_types_h.m4 +++ /dev/null @@ -1,49 +0,0 @@ -# sys_types_h.m4 serial 6 -dnl Copyright (C) 2011-2017 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN_ONCE([gl_SYS_TYPES_H], -[ - AC_REQUIRE([gl_SYS_TYPES_H_DEFAULTS]) - gl_NEXT_HEADERS([sys/types.h]) - - dnl Ensure the type pid_t gets defined. - AC_REQUIRE([AC_TYPE_PID_T]) - - dnl Ensure the type mode_t gets defined. - AC_REQUIRE([AC_TYPE_MODE_T]) - - dnl Whether to override the 'off_t' type. - AC_REQUIRE([gl_TYPE_OFF_T]) -]) - -AC_DEFUN([gl_SYS_TYPES_H_DEFAULTS], -[ -]) - -# This works around a buggy version in autoconf <= 2.69. -# See - -m4_version_prereq([2.70], [], [ - -# This is taken from the following Autoconf patch: -# http://git.sv.gnu.org/cgit/autoconf.git/commit/?id=e17a30e98 - -m4_undefine([AC_HEADER_MAJOR]) -AC_DEFUN([AC_HEADER_MAJOR], -[AC_CHECK_HEADERS_ONCE([sys/types.h]) -AC_CHECK_HEADER([sys/mkdev.h], - [AC_DEFINE([MAJOR_IN_MKDEV], [1], - [Define to 1 if `major', `minor', and `makedev' are declared in - .])]) -if test $ac_cv_header_sys_mkdev_h = no; then - AC_CHECK_HEADER([sys/sysmacros.h], - [AC_DEFINE([MAJOR_IN_SYSMACROS], [1], - [Define to 1 if `major', `minor', and `makedev' are declared in - .])]) -fi -]) - -]) diff --git a/gl/m4/time_h.m4 b/gl/m4/time_h.m4 deleted file mode 100644 index b925678..0000000 --- a/gl/m4/time_h.m4 +++ /dev/null @@ -1,134 +0,0 @@ -# Configure a more-standard replacement for . - -# Copyright (C) 2000-2001, 2003-2007, 2009-2017 Free Software Foundation, Inc. - -# serial 9 - -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# Written by Paul Eggert and Jim Meyering. - -AC_DEFUN([gl_HEADER_TIME_H], -[ - dnl Use AC_REQUIRE here, so that the default behavior below is expanded - dnl once only, before all statements that occur in other macros. - AC_REQUIRE([gl_HEADER_TIME_H_BODY]) -]) - -AC_DEFUN([gl_HEADER_TIME_H_BODY], -[ - AC_REQUIRE([AC_C_RESTRICT]) - AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS]) - gl_NEXT_HEADERS([time.h]) - AC_REQUIRE([gl_CHECK_TYPE_STRUCT_TIMESPEC]) -]) - -dnl Check whether 'struct timespec' is declared -dnl in time.h, sys/time.h, pthread.h, or unistd.h. - -AC_DEFUN([gl_CHECK_TYPE_STRUCT_TIMESPEC], -[ - AC_CHECK_HEADERS_ONCE([sys/time.h]) - AC_CACHE_CHECK([for struct timespec in ], - [gl_cv_sys_struct_timespec_in_time_h], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[#include - ]], - [[static struct timespec x; x.tv_sec = x.tv_nsec;]])], - [gl_cv_sys_struct_timespec_in_time_h=yes], - [gl_cv_sys_struct_timespec_in_time_h=no])]) - - TIME_H_DEFINES_STRUCT_TIMESPEC=0 - SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0 - PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0 - UNISTD_H_DEFINES_STRUCT_TIMESPEC=0 - if test $gl_cv_sys_struct_timespec_in_time_h = yes; then - TIME_H_DEFINES_STRUCT_TIMESPEC=1 - else - AC_CACHE_CHECK([for struct timespec in ], - [gl_cv_sys_struct_timespec_in_sys_time_h], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[#include - ]], - [[static struct timespec x; x.tv_sec = x.tv_nsec;]])], - [gl_cv_sys_struct_timespec_in_sys_time_h=yes], - [gl_cv_sys_struct_timespec_in_sys_time_h=no])]) - if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then - SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1 - else - AC_CACHE_CHECK([for struct timespec in ], - [gl_cv_sys_struct_timespec_in_pthread_h], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[#include - ]], - [[static struct timespec x; x.tv_sec = x.tv_nsec;]])], - [gl_cv_sys_struct_timespec_in_pthread_h=yes], - [gl_cv_sys_struct_timespec_in_pthread_h=no])]) - if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then - PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1 - else - AC_CACHE_CHECK([for struct timespec in ], - [gl_cv_sys_struct_timespec_in_unistd_h], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[#include - ]], - [[static struct timespec x; x.tv_sec = x.tv_nsec;]])], - [gl_cv_sys_struct_timespec_in_unistd_h=yes], - [gl_cv_sys_struct_timespec_in_unistd_h=no])]) - if test $gl_cv_sys_struct_timespec_in_unistd_h = yes; then - UNISTD_H_DEFINES_STRUCT_TIMESPEC=1 - fi - fi - fi - fi - AC_SUBST([TIME_H_DEFINES_STRUCT_TIMESPEC]) - AC_SUBST([SYS_TIME_H_DEFINES_STRUCT_TIMESPEC]) - AC_SUBST([PTHREAD_H_DEFINES_STRUCT_TIMESPEC]) - AC_SUBST([UNISTD_H_DEFINES_STRUCT_TIMESPEC]) -]) - -AC_DEFUN([gl_TIME_MODULE_INDICATOR], -[ - dnl Use AC_REQUIRE here, so that the default settings are expanded once only. - AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS]) - gl_MODULE_INDICATOR_SET_VARIABLE([$1]) - dnl Define it also as a C macro, for the benefit of the unit tests. - gl_MODULE_INDICATOR_FOR_TESTS([$1]) -]) - -AC_DEFUN([gl_HEADER_TIME_H_DEFAULTS], -[ - GNULIB_MKTIME=0; AC_SUBST([GNULIB_MKTIME]) - GNULIB_NANOSLEEP=0; AC_SUBST([GNULIB_NANOSLEEP]) - GNULIB_STRPTIME=0; AC_SUBST([GNULIB_STRPTIME]) - GNULIB_TIMEGM=0; AC_SUBST([GNULIB_TIMEGM]) - GNULIB_TIME_R=0; AC_SUBST([GNULIB_TIME_R]) - GNULIB_TIME_RZ=0; AC_SUBST([GNULIB_TIME_RZ]) - dnl Assume proper GNU behavior unless another module says otherwise. - HAVE_DECL_LOCALTIME_R=1; AC_SUBST([HAVE_DECL_LOCALTIME_R]) - HAVE_NANOSLEEP=1; AC_SUBST([HAVE_NANOSLEEP]) - HAVE_STRPTIME=1; AC_SUBST([HAVE_STRPTIME]) - HAVE_TIMEGM=1; AC_SUBST([HAVE_TIMEGM]) - dnl If another module says to replace or to not replace, do that. - dnl Otherwise, replace only if someone compiles with -DGNULIB_PORTCHECK; - dnl this lets maintainers check for portability. - REPLACE_LOCALTIME_R=GNULIB_PORTCHECK; AC_SUBST([REPLACE_LOCALTIME_R]) - REPLACE_MKTIME=GNULIB_PORTCHECK; AC_SUBST([REPLACE_MKTIME]) - REPLACE_NANOSLEEP=GNULIB_PORTCHECK; AC_SUBST([REPLACE_NANOSLEEP]) - REPLACE_TIMEGM=GNULIB_PORTCHECK; AC_SUBST([REPLACE_TIMEGM]) - - dnl Hack so that the time module doesn't depend on the sys_time module. - dnl First, default GNULIB_GETTIMEOFDAY to 0 if sys_time is absent. - : ${GNULIB_GETTIMEOFDAY=0}; AC_SUBST([GNULIB_GETTIMEOFDAY]) - dnl Second, it's OK to not use GNULIB_PORTCHECK for REPLACE_GMTIME - dnl and REPLACE_LOCALTIME, as portability to Solaris 2.6 and earlier - dnl is no longer a big deal. - REPLACE_GMTIME=0; AC_SUBST([REPLACE_GMTIME]) - REPLACE_LOCALTIME=0; AC_SUBST([REPLACE_LOCALTIME]) -]) diff --git a/gl/m4/timespec.m4 b/gl/m4/timespec.m4 deleted file mode 100644 index c901468..0000000 --- a/gl/m4/timespec.m4 +++ /dev/null @@ -1,11 +0,0 @@ -#serial 15 - -# Copyright (C) 2000-2001, 2003-2007, 2009-2017 Free Software Foundation, Inc. - -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -dnl From Jim Meyering - -AC_DEFUN([gl_TIMESPEC], [:]) diff --git a/gl/m4/unistd_h.m4 b/gl/m4/unistd_h.m4 deleted file mode 100644 index 25aef19..0000000 --- a/gl/m4/unistd_h.m4 +++ /dev/null @@ -1,190 +0,0 @@ -# unistd_h.m4 serial 69 -dnl Copyright (C) 2006-2017 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl Written by Simon Josefsson, Bruno Haible. - -AC_DEFUN([gl_UNISTD_H], -[ - dnl Use AC_REQUIRE here, so that the default behavior below is expanded - dnl once only, before all statements that occur in other macros. - AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) - - gl_CHECK_NEXT_HEADERS([unistd.h]) - if test $ac_cv_header_unistd_h = yes; then - HAVE_UNISTD_H=1 - else - HAVE_UNISTD_H=0 - fi - AC_SUBST([HAVE_UNISTD_H]) - - dnl Ensure the type pid_t gets defined. - AC_REQUIRE([AC_TYPE_PID_T]) - - dnl Determine WINDOWS_64_BIT_OFF_T. - AC_REQUIRE([gl_TYPE_OFF_T]) - - dnl Check for declarations of anything we want to poison if the - dnl corresponding gnulib module is not in use. - gl_WARN_ON_USE_PREPARE([[ -#if HAVE_UNISTD_H -# include -#endif -/* Some systems declare various items in the wrong headers. */ -#if !(defined __GLIBC__ && !defined __UCLIBC__) -# include -# include -# include -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -# include -# endif -#endif - ]], [chdir chown dup dup2 dup3 environ euidaccess faccessat fchdir fchownat - fdatasync fsync ftruncate getcwd getdomainname getdtablesize getgroups - gethostname getlogin getlogin_r getpagesize - getusershell setusershell endusershell - group_member isatty lchown link linkat lseek pipe pipe2 pread pwrite - readlink readlinkat rmdir sethostname sleep symlink symlinkat ttyname_r - unlink unlinkat usleep]) -]) - -AC_DEFUN([gl_UNISTD_MODULE_INDICATOR], -[ - dnl Use AC_REQUIRE here, so that the default settings are expanded once only. - AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) - gl_MODULE_INDICATOR_SET_VARIABLE([$1]) - dnl Define it also as a C macro, for the benefit of the unit tests. - gl_MODULE_INDICATOR_FOR_TESTS([$1]) -]) - -AC_DEFUN([gl_UNISTD_H_DEFAULTS], -[ - GNULIB_CHDIR=0; AC_SUBST([GNULIB_CHDIR]) - GNULIB_CHOWN=0; AC_SUBST([GNULIB_CHOWN]) - GNULIB_CLOSE=0; AC_SUBST([GNULIB_CLOSE]) - GNULIB_DUP=0; AC_SUBST([GNULIB_DUP]) - GNULIB_DUP2=0; AC_SUBST([GNULIB_DUP2]) - GNULIB_DUP3=0; AC_SUBST([GNULIB_DUP3]) - GNULIB_ENVIRON=0; AC_SUBST([GNULIB_ENVIRON]) - GNULIB_EUIDACCESS=0; AC_SUBST([GNULIB_EUIDACCESS]) - GNULIB_FACCESSAT=0; AC_SUBST([GNULIB_FACCESSAT]) - GNULIB_FCHDIR=0; AC_SUBST([GNULIB_FCHDIR]) - GNULIB_FCHOWNAT=0; AC_SUBST([GNULIB_FCHOWNAT]) - GNULIB_FDATASYNC=0; AC_SUBST([GNULIB_FDATASYNC]) - GNULIB_FSYNC=0; AC_SUBST([GNULIB_FSYNC]) - GNULIB_FTRUNCATE=0; AC_SUBST([GNULIB_FTRUNCATE]) - GNULIB_GETCWD=0; AC_SUBST([GNULIB_GETCWD]) - GNULIB_GETDOMAINNAME=0; AC_SUBST([GNULIB_GETDOMAINNAME]) - GNULIB_GETDTABLESIZE=0; AC_SUBST([GNULIB_GETDTABLESIZE]) - GNULIB_GETGROUPS=0; AC_SUBST([GNULIB_GETGROUPS]) - GNULIB_GETHOSTNAME=0; AC_SUBST([GNULIB_GETHOSTNAME]) - GNULIB_GETLOGIN=0; AC_SUBST([GNULIB_GETLOGIN]) - GNULIB_GETLOGIN_R=0; AC_SUBST([GNULIB_GETLOGIN_R]) - GNULIB_GETPAGESIZE=0; AC_SUBST([GNULIB_GETPAGESIZE]) - GNULIB_GETUSERSHELL=0; AC_SUBST([GNULIB_GETUSERSHELL]) - GNULIB_GROUP_MEMBER=0; AC_SUBST([GNULIB_GROUP_MEMBER]) - GNULIB_ISATTY=0; AC_SUBST([GNULIB_ISATTY]) - GNULIB_LCHOWN=0; AC_SUBST([GNULIB_LCHOWN]) - GNULIB_LINK=0; AC_SUBST([GNULIB_LINK]) - GNULIB_LINKAT=0; AC_SUBST([GNULIB_LINKAT]) - GNULIB_LSEEK=0; AC_SUBST([GNULIB_LSEEK]) - GNULIB_PIPE=0; AC_SUBST([GNULIB_PIPE]) - GNULIB_PIPE2=0; AC_SUBST([GNULIB_PIPE2]) - GNULIB_PREAD=0; AC_SUBST([GNULIB_PREAD]) - GNULIB_PWRITE=0; AC_SUBST([GNULIB_PWRITE]) - GNULIB_READ=0; AC_SUBST([GNULIB_READ]) - GNULIB_READLINK=0; AC_SUBST([GNULIB_READLINK]) - GNULIB_READLINKAT=0; AC_SUBST([GNULIB_READLINKAT]) - GNULIB_RMDIR=0; AC_SUBST([GNULIB_RMDIR]) - GNULIB_SETHOSTNAME=0; AC_SUBST([GNULIB_SETHOSTNAME]) - GNULIB_SLEEP=0; AC_SUBST([GNULIB_SLEEP]) - GNULIB_SYMLINK=0; AC_SUBST([GNULIB_SYMLINK]) - GNULIB_SYMLINKAT=0; AC_SUBST([GNULIB_SYMLINKAT]) - GNULIB_TTYNAME_R=0; AC_SUBST([GNULIB_TTYNAME_R]) - GNULIB_UNISTD_H_NONBLOCKING=0; AC_SUBST([GNULIB_UNISTD_H_NONBLOCKING]) - GNULIB_UNISTD_H_SIGPIPE=0; AC_SUBST([GNULIB_UNISTD_H_SIGPIPE]) - GNULIB_UNLINK=0; AC_SUBST([GNULIB_UNLINK]) - GNULIB_UNLINKAT=0; AC_SUBST([GNULIB_UNLINKAT]) - GNULIB_USLEEP=0; AC_SUBST([GNULIB_USLEEP]) - GNULIB_WRITE=0; AC_SUBST([GNULIB_WRITE]) - dnl Assume proper GNU behavior unless another module says otherwise. - HAVE_CHOWN=1; AC_SUBST([HAVE_CHOWN]) - HAVE_DUP2=1; AC_SUBST([HAVE_DUP2]) - HAVE_DUP3=1; AC_SUBST([HAVE_DUP3]) - HAVE_EUIDACCESS=1; AC_SUBST([HAVE_EUIDACCESS]) - HAVE_FACCESSAT=1; AC_SUBST([HAVE_FACCESSAT]) - HAVE_FCHDIR=1; AC_SUBST([HAVE_FCHDIR]) - HAVE_FCHOWNAT=1; AC_SUBST([HAVE_FCHOWNAT]) - HAVE_FDATASYNC=1; AC_SUBST([HAVE_FDATASYNC]) - HAVE_FSYNC=1; AC_SUBST([HAVE_FSYNC]) - HAVE_FTRUNCATE=1; AC_SUBST([HAVE_FTRUNCATE]) - HAVE_GETDTABLESIZE=1; AC_SUBST([HAVE_GETDTABLESIZE]) - HAVE_GETGROUPS=1; AC_SUBST([HAVE_GETGROUPS]) - HAVE_GETHOSTNAME=1; AC_SUBST([HAVE_GETHOSTNAME]) - HAVE_GETLOGIN=1; AC_SUBST([HAVE_GETLOGIN]) - HAVE_GETPAGESIZE=1; AC_SUBST([HAVE_GETPAGESIZE]) - HAVE_GROUP_MEMBER=1; AC_SUBST([HAVE_GROUP_MEMBER]) - HAVE_LCHOWN=1; AC_SUBST([HAVE_LCHOWN]) - HAVE_LINK=1; AC_SUBST([HAVE_LINK]) - HAVE_LINKAT=1; AC_SUBST([HAVE_LINKAT]) - HAVE_PIPE=1; AC_SUBST([HAVE_PIPE]) - HAVE_PIPE2=1; AC_SUBST([HAVE_PIPE2]) - HAVE_PREAD=1; AC_SUBST([HAVE_PREAD]) - HAVE_PWRITE=1; AC_SUBST([HAVE_PWRITE]) - HAVE_READLINK=1; AC_SUBST([HAVE_READLINK]) - HAVE_READLINKAT=1; AC_SUBST([HAVE_READLINKAT]) - HAVE_SETHOSTNAME=1; AC_SUBST([HAVE_SETHOSTNAME]) - HAVE_SLEEP=1; AC_SUBST([HAVE_SLEEP]) - HAVE_SYMLINK=1; AC_SUBST([HAVE_SYMLINK]) - HAVE_SYMLINKAT=1; AC_SUBST([HAVE_SYMLINKAT]) - HAVE_UNLINKAT=1; AC_SUBST([HAVE_UNLINKAT]) - HAVE_USLEEP=1; AC_SUBST([HAVE_USLEEP]) - HAVE_DECL_ENVIRON=1; AC_SUBST([HAVE_DECL_ENVIRON]) - HAVE_DECL_FCHDIR=1; AC_SUBST([HAVE_DECL_FCHDIR]) - HAVE_DECL_FDATASYNC=1; AC_SUBST([HAVE_DECL_FDATASYNC]) - HAVE_DECL_GETDOMAINNAME=1; AC_SUBST([HAVE_DECL_GETDOMAINNAME]) - HAVE_DECL_GETLOGIN=1; AC_SUBST([HAVE_DECL_GETLOGIN]) - HAVE_DECL_GETLOGIN_R=1; AC_SUBST([HAVE_DECL_GETLOGIN_R]) - HAVE_DECL_GETPAGESIZE=1; AC_SUBST([HAVE_DECL_GETPAGESIZE]) - HAVE_DECL_GETUSERSHELL=1; AC_SUBST([HAVE_DECL_GETUSERSHELL]) - HAVE_DECL_SETHOSTNAME=1; AC_SUBST([HAVE_DECL_SETHOSTNAME]) - HAVE_DECL_TTYNAME_R=1; AC_SUBST([HAVE_DECL_TTYNAME_R]) - HAVE_OS_H=0; AC_SUBST([HAVE_OS_H]) - HAVE_SYS_PARAM_H=0; AC_SUBST([HAVE_SYS_PARAM_H]) - REPLACE_CHOWN=0; AC_SUBST([REPLACE_CHOWN]) - REPLACE_CLOSE=0; AC_SUBST([REPLACE_CLOSE]) - REPLACE_DUP=0; AC_SUBST([REPLACE_DUP]) - REPLACE_DUP2=0; AC_SUBST([REPLACE_DUP2]) - REPLACE_FCHOWNAT=0; AC_SUBST([REPLACE_FCHOWNAT]) - REPLACE_FTRUNCATE=0; AC_SUBST([REPLACE_FTRUNCATE]) - REPLACE_GETCWD=0; AC_SUBST([REPLACE_GETCWD]) - REPLACE_GETDOMAINNAME=0; AC_SUBST([REPLACE_GETDOMAINNAME]) - REPLACE_GETDTABLESIZE=0; AC_SUBST([REPLACE_GETDTABLESIZE]) - REPLACE_GETLOGIN_R=0; AC_SUBST([REPLACE_GETLOGIN_R]) - REPLACE_GETGROUPS=0; AC_SUBST([REPLACE_GETGROUPS]) - REPLACE_GETPAGESIZE=0; AC_SUBST([REPLACE_GETPAGESIZE]) - REPLACE_ISATTY=0; AC_SUBST([REPLACE_ISATTY]) - REPLACE_LCHOWN=0; AC_SUBST([REPLACE_LCHOWN]) - REPLACE_LINK=0; AC_SUBST([REPLACE_LINK]) - REPLACE_LINKAT=0; AC_SUBST([REPLACE_LINKAT]) - REPLACE_LSEEK=0; AC_SUBST([REPLACE_LSEEK]) - REPLACE_PREAD=0; AC_SUBST([REPLACE_PREAD]) - REPLACE_PWRITE=0; AC_SUBST([REPLACE_PWRITE]) - REPLACE_READ=0; AC_SUBST([REPLACE_READ]) - REPLACE_READLINK=0; AC_SUBST([REPLACE_READLINK]) - REPLACE_READLINKAT=0; AC_SUBST([REPLACE_READLINKAT]) - REPLACE_RMDIR=0; AC_SUBST([REPLACE_RMDIR]) - REPLACE_SLEEP=0; AC_SUBST([REPLACE_SLEEP]) - REPLACE_SYMLINK=0; AC_SUBST([REPLACE_SYMLINK]) - REPLACE_SYMLINKAT=0; AC_SUBST([REPLACE_SYMLINKAT]) - REPLACE_TTYNAME_R=0; AC_SUBST([REPLACE_TTYNAME_R]) - REPLACE_UNLINK=0; AC_SUBST([REPLACE_UNLINK]) - REPLACE_UNLINKAT=0; AC_SUBST([REPLACE_UNLINKAT]) - REPLACE_USLEEP=0; AC_SUBST([REPLACE_USLEEP]) - REPLACE_WRITE=0; AC_SUBST([REPLACE_WRITE]) - UNISTD_H_HAVE_WINSOCK2_H=0; AC_SUBST([UNISTD_H_HAVE_WINSOCK2_H]) - UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0; - AC_SUBST([UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS]) -]) diff --git a/gl/m4/valgrind-tests.m4 b/gl/m4/valgrind-tests.m4 deleted file mode 100644 index 8a6650b..0000000 --- a/gl/m4/valgrind-tests.m4 +++ /dev/null @@ -1,37 +0,0 @@ -# valgrind-tests.m4 serial 3 -dnl Copyright (C) 2008-2017 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Simon Josefsson - -# gl_VALGRIND_TESTS() -# ------------------- -# Check if valgrind is available, and set VALGRIND to it if available. -AC_DEFUN([gl_VALGRIND_TESTS], -[ - AC_ARG_ENABLE(valgrind-tests, - AS_HELP_STRING([--disable-valgrind-tests], - [don't try to run self tests under valgrind]), - [opt_valgrind_tests=$enableval], [opt_valgrind_tests=yes]) - - # Run self-tests under valgrind? - if test "$opt_valgrind_tests" = "yes" && test "$cross_compiling" = no; then - AC_CHECK_PROGS(VALGRIND, valgrind) - fi - - OPTS="-q --error-exitcode=6 --leak-check=no" - - if test -n "$VALGRIND" \ - && $VALGRIND $OPTS $SHELL -c 'exit 0' > /dev/null 2>&1; then - opt_valgrind_tests=yes - VALGRIND="$VALGRIND $OPTS" - else - opt_valgrind_tests=no - VALGRIND= - fi - - AC_MSG_CHECKING([whether self tests are run under valgrind]) - AC_MSG_RESULT($opt_valgrind_tests) -]) diff --git a/gl/m4/version-etc.m4 b/gl/m4/version-etc.m4 deleted file mode 100644 index c099101..0000000 --- a/gl/m4/version-etc.m4 +++ /dev/null @@ -1,33 +0,0 @@ -# version-etc.m4 serial 1 -# Copyright (C) 2009-2017 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -dnl $1 - configure flag and define name -dnl $2 - human readable description -m4_define([gl_VERSION_ETC_FLAG], -[dnl - AC_ARG_WITH([$1], [AS_HELP_STRING([--with-$1], [$2])], - [dnl - case $withval in - yes|no) ;; - *) AC_DEFINE_UNQUOTED(AS_TR_CPP([PACKAGE_$1]), ["$withval"], [$2]) ;; - esac - ]) -]) - -AC_DEFUN([gl_VERSION_ETC], -[dnl - gl_VERSION_ETC_FLAG([packager], - [String identifying the packager of this software]) - gl_VERSION_ETC_FLAG([packager-version], - [Packager-specific version information]) - gl_VERSION_ETC_FLAG([packager-bug-reports], - [Packager info for bug reports (URL/e-mail/...)]) - if test "X$with_packager" = "X" && \ - test "X$with_packager_version$with_packager_bug_reports" != "X" - then - AC_MSG_ERROR([The --with-packager-{bug-reports,version} options require --with-packager]) - fi -]) diff --git a/gl/m4/warn-on-use.m4 b/gl/m4/warn-on-use.m4 deleted file mode 100644 index 25ce737..0000000 --- a/gl/m4/warn-on-use.m4 +++ /dev/null @@ -1,47 +0,0 @@ -# warn-on-use.m4 serial 5 -dnl Copyright (C) 2010-2017 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -# gl_WARN_ON_USE_PREPARE(INCLUDES, NAMES) -# --------------------------------------- -# For each whitespace-separated element in the list of NAMES, define -# HAVE_RAW_DECL_name if the function has a declaration among INCLUDES -# even after being undefined as a macro. -# -# See warn-on-use.h for some hints on how to poison function names, as -# well as ideas on poisoning global variables and macros. NAMES may -# include global variables, but remember that only functions work with -# _GL_WARN_ON_USE. Typically, INCLUDES only needs to list a single -# header, but if the replacement header pulls in other headers because -# some systems declare functions in the wrong header, then INCLUDES -# should do likewise. -# -# It is generally safe to assume declarations for functions declared -# in the intersection of C89 and C11 (such as printf) without -# needing gl_WARN_ON_USE_PREPARE. -AC_DEFUN([gl_WARN_ON_USE_PREPARE], -[ - m4_foreach_w([gl_decl], [$2], - [AH_TEMPLATE([HAVE_RAW_DECL_]AS_TR_CPP(m4_defn([gl_decl])), - [Define to 1 if ]m4_defn([gl_decl])[ is declared even after - undefining macros.])])dnl -dnl FIXME: gl_Symbol must be used unquoted until we can assume -dnl autoconf 2.64 or newer. - for gl_func in m4_flatten([$2]); do - AS_VAR_PUSHDEF([gl_Symbol], [gl_cv_have_raw_decl_$gl_func])dnl - AC_CACHE_CHECK([whether $gl_func is declared without a macro], - gl_Symbol, - [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([$1], -[@%:@undef $gl_func - (void) $gl_func;])], - [AS_VAR_SET(gl_Symbol, [yes])], [AS_VAR_SET(gl_Symbol, [no])])]) - AS_VAR_IF(gl_Symbol, [yes], - [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_RAW_DECL_$gl_func]), [1]) - dnl shortcut - if the raw declaration exists, then set a cache - dnl variable to allow skipping any later AC_CHECK_DECL efforts - eval ac_cv_have_decl_$gl_func=yes]) - AS_VAR_POPDEF([gl_Symbol])dnl - done -]) diff --git a/gl/m4/warnings.m4 b/gl/m4/warnings.m4 deleted file mode 100644 index e697174..0000000 --- a/gl/m4/warnings.m4 +++ /dev/null @@ -1,79 +0,0 @@ -# warnings.m4 serial 11 -dnl Copyright (C) 2008-2017 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Simon Josefsson - -# gl_AS_VAR_APPEND(VAR, VALUE) -# ---------------------------- -# Provide the functionality of AS_VAR_APPEND if Autoconf does not have it. -m4_ifdef([AS_VAR_APPEND], -[m4_copy([AS_VAR_APPEND], [gl_AS_VAR_APPEND])], -[m4_define([gl_AS_VAR_APPEND], -[AS_VAR_SET([$1], [AS_VAR_GET([$1])$2])])]) - - -# gl_COMPILER_OPTION_IF(OPTION, [IF-SUPPORTED], [IF-NOT-SUPPORTED], -# [PROGRAM = AC_LANG_PROGRAM()]) -# ----------------------------------------------------------------- -# Check if the compiler supports OPTION when compiling PROGRAM. -# -# FIXME: gl_Warn must be used unquoted until we can assume Autoconf -# 2.64 or newer. -AC_DEFUN([gl_COMPILER_OPTION_IF], -[AS_VAR_PUSHDEF([gl_Warn], [gl_cv_warn_[]_AC_LANG_ABBREV[]_$1])dnl -AS_VAR_PUSHDEF([gl_Flags], [_AC_LANG_PREFIX[]FLAGS])dnl -AS_LITERAL_IF([$1], - [m4_pushdef([gl_Positive], m4_bpatsubst([$1], [^-Wno-], [-W]))], - [gl_positive="$1" -case $gl_positive in - -Wno-*) gl_positive=-W`expr "X$gl_positive" : 'X-Wno-\(.*\)'` ;; -esac -m4_pushdef([gl_Positive], [$gl_positive])])dnl -AC_CACHE_CHECK([whether _AC_LANG compiler handles $1], m4_defn([gl_Warn]), [ - gl_save_compiler_FLAGS="$gl_Flags" - gl_AS_VAR_APPEND(m4_defn([gl_Flags]), - [" $gl_unknown_warnings_are_errors ]m4_defn([gl_Positive])["]) - AC_LINK_IFELSE([m4_default([$4], [AC_LANG_PROGRAM([])])], - [AS_VAR_SET(gl_Warn, [yes])], - [AS_VAR_SET(gl_Warn, [no])]) - gl_Flags="$gl_save_compiler_FLAGS" -]) -AS_VAR_IF(gl_Warn, [yes], [$2], [$3]) -m4_popdef([gl_Positive])dnl -AS_VAR_POPDEF([gl_Flags])dnl -AS_VAR_POPDEF([gl_Warn])dnl -]) - -# gl_UNKNOWN_WARNINGS_ARE_ERRORS -# ------------------------------ -# Clang doesn't complain about unknown warning options unless one also -# specifies -Wunknown-warning-option -Werror. Detect this. -AC_DEFUN([gl_UNKNOWN_WARNINGS_ARE_ERRORS], -[gl_COMPILER_OPTION_IF([-Werror -Wunknown-warning-option], - [gl_unknown_warnings_are_errors='-Wunknown-warning-option -Werror'], - [gl_unknown_warnings_are_errors=])]) - -# gl_WARN_ADD(OPTION, [VARIABLE = WARN_CFLAGS], -# [PROGRAM = AC_LANG_PROGRAM()]) -# --------------------------------------------- -# Adds parameter to WARN_CFLAGS if the compiler supports it when -# compiling PROGRAM. For example, gl_WARN_ADD([-Wparentheses]). -# -# If VARIABLE is a variable name, AC_SUBST it. -AC_DEFUN([gl_WARN_ADD], -[AC_REQUIRE([gl_UNKNOWN_WARNINGS_ARE_ERRORS]) -gl_COMPILER_OPTION_IF([$1], - [gl_AS_VAR_APPEND(m4_if([$2], [], [[WARN_CFLAGS]], [[$2]]), [" $1"])], - [], - [$3]) -m4_ifval([$2], - [AS_LITERAL_IF([$2], [AC_SUBST([$2])])], - [AC_SUBST([WARN_CFLAGS])])dnl -]) - -# Local Variables: -# mode: autoconf -# End: diff --git a/gl/m4/wchar_t.m4 b/gl/m4/wchar_t.m4 deleted file mode 100644 index 11783d2..0000000 --- a/gl/m4/wchar_t.m4 +++ /dev/null @@ -1,24 +0,0 @@ -# wchar_t.m4 serial 4 (gettext-0.18.2) -dnl Copyright (C) 2002-2003, 2008-2017 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Bruno Haible. -dnl Test whether has the 'wchar_t' type. -dnl Prerequisite: AC_PROG_CC - -AC_DEFUN([gt_TYPE_WCHAR_T], -[ - AC_CACHE_CHECK([for wchar_t], [gt_cv_c_wchar_t], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[#include - wchar_t foo = (wchar_t)'\0';]], - [[]])], - [gt_cv_c_wchar_t=yes], - [gt_cv_c_wchar_t=no])]) - if test $gt_cv_c_wchar_t = yes; then - AC_DEFINE([HAVE_WCHAR_T], [1], [Define if you have the 'wchar_t' type.]) - fi -]) diff --git a/gl/m4/wint_t.m4 b/gl/m4/wint_t.m4 deleted file mode 100644 index 65e25a4..0000000 --- a/gl/m4/wint_t.m4 +++ /dev/null @@ -1,62 +0,0 @@ -# wint_t.m4 serial 6 -dnl Copyright (C) 2003, 2007-2017 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Bruno Haible. -dnl Test whether has the 'wint_t' type and whether gnulib's -dnl or would, if present, override 'wint_t'. -dnl Prerequisite: AC_PROG_CC - -AC_DEFUN([gt_TYPE_WINT_T], -[ - AC_CACHE_CHECK([for wint_t], [gt_cv_c_wint_t], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[ -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be included - before . */ -#include -#include -#include -#include - wint_t foo = (wchar_t)'\0';]], - [[]])], - [gt_cv_c_wint_t=yes], - [gt_cv_c_wint_t=no])]) - if test $gt_cv_c_wint_t = yes; then - AC_DEFINE([HAVE_WINT_T], [1], [Define if you have the 'wint_t' type.]) - - dnl Determine whether gnulib's or would, if present, - dnl override 'wint_t'. - AC_CACHE_CHECK([whether wint_t is too small], - [gl_cv_type_wint_t_too_small], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([[ -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#if !(defined __GLIBC__ && !defined __UCLIBC__) -# include -# include -# include -#endif -#include - int verify[sizeof (wint_t) < sizeof (int) ? -1 : 1]; - ]])], - [gl_cv_type_wint_t_too_small=no], - [gl_cv_type_wint_t_too_small=yes])]) - if test $gl_cv_type_wint_t_too_small = yes; then - GNULIB_OVERRIDES_WINT_T=1 - else - GNULIB_OVERRIDES_WINT_T=0 - fi - else - GNULIB_OVERRIDES_WINT_T=0 - fi - AC_SUBST([GNULIB_OVERRIDES_WINT_T]) -]) diff --git a/gl/malloc.c b/gl/malloc.c deleted file mode 100644 index eeaf12b..0000000 --- a/gl/malloc.c +++ /dev/null @@ -1,56 +0,0 @@ -/* malloc() function that is glibc compatible. - - Copyright (C) 1997-1998, 2006-2007, 2009-2017 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ - -/* written by Jim Meyering and Bruno Haible */ - -#define _GL_USE_STDLIB_ALLOC 1 -#include -/* Only the AC_FUNC_MALLOC macro defines 'malloc' already in config.h. */ -#ifdef malloc -# define NEED_MALLOC_GNU 1 -# undef malloc -/* Whereas the gnulib module 'malloc-gnu' defines HAVE_MALLOC_GNU. */ -#elif GNULIB_MALLOC_GNU && !HAVE_MALLOC_GNU -# define NEED_MALLOC_GNU 1 -#endif - -#include - -#include - -/* Allocate an N-byte block of memory from the heap. - If N is zero, allocate a 1-byte block. */ - -void * -rpl_malloc (size_t n) -{ - void *result; - -#if NEED_MALLOC_GNU - if (n == 0) - n = 1; -#endif - - result = malloc (n); - -#if !HAVE_MALLOC_POSIX - if (result == NULL) - errno = ENOMEM; -#endif - - return result; -} diff --git a/gl/msvc-inval.c b/gl/msvc-inval.c deleted file mode 100644 index 7139e93..0000000 --- a/gl/msvc-inval.c +++ /dev/null @@ -1,129 +0,0 @@ -/* Invalid parameter handler for MSVC runtime libraries. - Copyright (C) 2011-2017 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, see . */ - -#include - -/* Specification. */ -#include "msvc-inval.h" - -#if HAVE_MSVC_INVALID_PARAMETER_HANDLER \ - && !(MSVC_INVALID_PARAMETER_HANDLING == SANE_LIBRARY_HANDLING) - -/* Get _invalid_parameter_handler type and _set_invalid_parameter_handler - declaration. */ -# include - -# if MSVC_INVALID_PARAMETER_HANDLING == DEFAULT_HANDLING - -static void __cdecl -gl_msvc_invalid_parameter_handler (const wchar_t *expression, - const wchar_t *function, - const wchar_t *file, - unsigned int line, - uintptr_t dummy) -{ -} - -# else - -/* Get declarations of the native Windows API functions. */ -# define WIN32_LEAN_AND_MEAN -# include - -# if defined _MSC_VER - -static void __cdecl -gl_msvc_invalid_parameter_handler (const wchar_t *expression, - const wchar_t *function, - const wchar_t *file, - unsigned int line, - uintptr_t dummy) -{ - RaiseException (STATUS_GNULIB_INVALID_PARAMETER, 0, 0, NULL); -} - -# else - -/* An index to thread-local storage. */ -static DWORD tls_index; -static int tls_initialized /* = 0 */; - -/* Used as a fallback only. */ -static struct gl_msvc_inval_per_thread not_per_thread; - -struct gl_msvc_inval_per_thread * -gl_msvc_inval_current (void) -{ - if (!tls_initialized) - { - tls_index = TlsAlloc (); - tls_initialized = 1; - } - if (tls_index == TLS_OUT_OF_INDEXES) - /* TlsAlloc had failed. */ - return ¬_per_thread; - else - { - struct gl_msvc_inval_per_thread *pointer = - (struct gl_msvc_inval_per_thread *) TlsGetValue (tls_index); - if (pointer == NULL) - { - /* First call. Allocate a new 'struct gl_msvc_inval_per_thread'. */ - pointer = - (struct gl_msvc_inval_per_thread *) - malloc (sizeof (struct gl_msvc_inval_per_thread)); - if (pointer == NULL) - /* Could not allocate memory. Use the global storage. */ - pointer = ¬_per_thread; - TlsSetValue (tls_index, pointer); - } - return pointer; - } -} - -static void __cdecl -gl_msvc_invalid_parameter_handler (const wchar_t *expression, - const wchar_t *function, - const wchar_t *file, - unsigned int line, - uintptr_t dummy) -{ - struct gl_msvc_inval_per_thread *current = gl_msvc_inval_current (); - if (current->restart_valid) - longjmp (current->restart, 1); - else - /* An invalid parameter notification from outside the gnulib code. - Give the caller a chance to intervene. */ - RaiseException (STATUS_GNULIB_INVALID_PARAMETER, 0, 0, NULL); -} - -# endif - -# endif - -static int gl_msvc_inval_initialized /* = 0 */; - -void -gl_msvc_inval_ensure_handler (void) -{ - if (gl_msvc_inval_initialized == 0) - { - _set_invalid_parameter_handler (gl_msvc_invalid_parameter_handler); - gl_msvc_inval_initialized = 1; - } -} - -#endif diff --git a/gl/msvc-inval.h b/gl/msvc-inval.h deleted file mode 100644 index 6e216d6..0000000 --- a/gl/msvc-inval.h +++ /dev/null @@ -1,222 +0,0 @@ -/* Invalid parameter handler for MSVC runtime libraries. - Copyright (C) 2011-2017 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, see . */ - -#ifndef _MSVC_INVAL_H -#define _MSVC_INVAL_H - -/* With MSVC runtime libraries with the "invalid parameter handler" concept, - functions like fprintf(), dup2(), or close() crash when the caller passes - an invalid argument. But POSIX wants error codes (such as EINVAL or EBADF) - instead. - This file defines macros that turn such an invalid parameter notification - into a non-local exit. An error code can then be produced at the target - of this exit. You can thus write code like - - TRY_MSVC_INVAL - { - - } - CATCH_MSVC_INVAL - { - - } - DONE_MSVC_INVAL; - - This entire block expands to a single statement. - - The handling of invalid parameters can be done in three ways: - - * The default way, which is reasonable for programs (not libraries): - AC_DEFINE([MSVC_INVALID_PARAMETER_HANDLING], [DEFAULT_HANDLING]) - - * The way for libraries that make "hairy" calls (like close(-1), or - fclose(fp) where fileno(fp) is closed, or simply getdtablesize()): - AC_DEFINE([MSVC_INVALID_PARAMETER_HANDLING], [HAIRY_LIBRARY_HANDLING]) - - * The way for libraries that make no "hairy" calls: - AC_DEFINE([MSVC_INVALID_PARAMETER_HANDLING], [SANE_LIBRARY_HANDLING]) - */ - -#define DEFAULT_HANDLING 0 -#define HAIRY_LIBRARY_HANDLING 1 -#define SANE_LIBRARY_HANDLING 2 - -#if HAVE_MSVC_INVALID_PARAMETER_HANDLER \ - && !(MSVC_INVALID_PARAMETER_HANDLING == SANE_LIBRARY_HANDLING) -/* A native Windows platform with the "invalid parameter handler" concept, - and either DEFAULT_HANDLING or HAIRY_LIBRARY_HANDLING. */ - -# if MSVC_INVALID_PARAMETER_HANDLING == DEFAULT_HANDLING -/* Default handling. */ - -# ifdef __cplusplus -extern "C" { -# endif - -/* Ensure that the invalid parameter handler in installed that just returns. - Because we assume no other part of the program installs a different - invalid parameter handler, this solution is multithread-safe. */ -extern void gl_msvc_inval_ensure_handler (void); - -# ifdef __cplusplus -} -# endif - -# define TRY_MSVC_INVAL \ - do \ - { \ - gl_msvc_inval_ensure_handler (); \ - if (1) -# define CATCH_MSVC_INVAL \ - else -# define DONE_MSVC_INVAL \ - } \ - while (0) - -# else -/* Handling for hairy libraries. */ - -# include - -/* Gnulib can define its own status codes, as described in the page - "Raising Software Exceptions" on microsoft.com - . - Our status codes are composed of - - 0xE0000000, mandatory for all user-defined status codes, - - 0x474E550, a API identifier ("GNU"), - - 0, 1, 2, ..., used to distinguish different status codes from the - same API. */ -# define STATUS_GNULIB_INVALID_PARAMETER (0xE0000000 + 0x474E550 + 0) - -# if defined _MSC_VER -/* A compiler that supports __try/__except, as described in the page - "try-except statement" on microsoft.com - . - With __try/__except, we can use the multithread-safe exception handling. */ - -# ifdef __cplusplus -extern "C" { -# endif - -/* Ensure that the invalid parameter handler in installed that raises a - software exception with code STATUS_GNULIB_INVALID_PARAMETER. - Because we assume no other part of the program installs a different - invalid parameter handler, this solution is multithread-safe. */ -extern void gl_msvc_inval_ensure_handler (void); - -# ifdef __cplusplus -} -# endif - -# define TRY_MSVC_INVAL \ - do \ - { \ - gl_msvc_inval_ensure_handler (); \ - __try -# define CATCH_MSVC_INVAL \ - __except (GetExceptionCode () == STATUS_GNULIB_INVALID_PARAMETER \ - ? EXCEPTION_EXECUTE_HANDLER \ - : EXCEPTION_CONTINUE_SEARCH) -# define DONE_MSVC_INVAL \ - } \ - while (0) - -# else -/* Any compiler. - We can only use setjmp/longjmp. */ - -# include - -# ifdef __cplusplus -extern "C" { -# endif - -struct gl_msvc_inval_per_thread -{ - /* The restart that will resume execution at the code between - CATCH_MSVC_INVAL and DONE_MSVC_INVAL. It is enabled only between - TRY_MSVC_INVAL and CATCH_MSVC_INVAL. */ - jmp_buf restart; - - /* Tells whether the contents of restart is valid. */ - int restart_valid; -}; - -/* Ensure that the invalid parameter handler in installed that passes - control to the gl_msvc_inval_restart if it is valid, or raises a - software exception with code STATUS_GNULIB_INVALID_PARAMETER otherwise. - Because we assume no other part of the program installs a different - invalid parameter handler, this solution is multithread-safe. */ -extern void gl_msvc_inval_ensure_handler (void); - -/* Return a pointer to the per-thread data for the current thread. */ -extern struct gl_msvc_inval_per_thread *gl_msvc_inval_current (void); - -# ifdef __cplusplus -} -# endif - -# define TRY_MSVC_INVAL \ - do \ - { \ - struct gl_msvc_inval_per_thread *msvc_inval_current; \ - gl_msvc_inval_ensure_handler (); \ - msvc_inval_current = gl_msvc_inval_current (); \ - /* First, initialize gl_msvc_inval_restart. */ \ - if (setjmp (msvc_inval_current->restart) == 0) \ - { \ - /* Then, mark it as valid. */ \ - msvc_inval_current->restart_valid = 1; -# define CATCH_MSVC_INVAL \ - /* Execution completed. \ - Mark gl_msvc_inval_restart as invalid. */ \ - msvc_inval_current->restart_valid = 0; \ - } \ - else \ - { \ - /* Execution triggered an invalid parameter notification. \ - Mark gl_msvc_inval_restart as invalid. */ \ - msvc_inval_current->restart_valid = 0; -# define DONE_MSVC_INVAL \ - } \ - } \ - while (0) - -# endif - -# endif - -#else -/* A platform that does not need to the invalid parameter handler, - or when SANE_LIBRARY_HANDLING is desired. */ - -/* The braces here avoid GCC warnings like - "warning: suggest explicit braces to avoid ambiguous 'else'". */ -# define TRY_MSVC_INVAL \ - do \ - { \ - if (1) -# define CATCH_MSVC_INVAL \ - else -# define DONE_MSVC_INVAL \ - } \ - while (0) - -#endif - -#endif /* _MSVC_INVAL_H */ diff --git a/gl/msvc-nothrow.c b/gl/msvc-nothrow.c deleted file mode 100644 index d127eb4..0000000 --- a/gl/msvc-nothrow.c +++ /dev/null @@ -1,49 +0,0 @@ -/* Wrappers that don't throw invalid parameter notifications - with MSVC runtime libraries. - Copyright (C) 2011-2017 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, see . */ - -#include - -/* Specification. */ -#include "msvc-nothrow.h" - -/* Get declarations of the native Windows API functions. */ -#define WIN32_LEAN_AND_MEAN -#include - -#include "msvc-inval.h" - -#undef _get_osfhandle - -#if HAVE_MSVC_INVALID_PARAMETER_HANDLER -intptr_t -_gl_nothrow_get_osfhandle (int fd) -{ - intptr_t result; - - TRY_MSVC_INVAL - { - result = _get_osfhandle (fd); - } - CATCH_MSVC_INVAL - { - result = (intptr_t) INVALID_HANDLE_VALUE; - } - DONE_MSVC_INVAL; - - return result; -} -#endif diff --git a/gl/msvc-nothrow.h b/gl/msvc-nothrow.h deleted file mode 100644 index c70efc7..0000000 --- a/gl/msvc-nothrow.h +++ /dev/null @@ -1,43 +0,0 @@ -/* Wrappers that don't throw invalid parameter notifications - with MSVC runtime libraries. - Copyright (C) 2011-2017 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, see . */ - -#ifndef _MSVC_NOTHROW_H -#define _MSVC_NOTHROW_H - -/* With MSVC runtime libraries with the "invalid parameter handler" concept, - functions like fprintf(), dup2(), or close() crash when the caller passes - an invalid argument. But POSIX wants error codes (such as EINVAL or EBADF) - instead. - This file defines wrappers that turn such an invalid parameter notification - into an error code. */ - -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - -/* Get original declaration of _get_osfhandle. */ -# include - -# if HAVE_MSVC_INVALID_PARAMETER_HANDLER - -/* Override _get_osfhandle. */ -extern intptr_t _gl_nothrow_get_osfhandle (int fd); -# define _get_osfhandle _gl_nothrow_get_osfhandle - -# endif - -#endif - -#endif /* _MSVC_NOTHROW_H */ diff --git a/gl/override/doc/gendocs_template.diff b/gl/override/doc/gendocs_template.diff deleted file mode 100644 index 1b3a137..0000000 --- a/gl/override/doc/gendocs_template.diff +++ /dev/null @@ -1,20 +0,0 @@ -diff --git a/doc/gendocs_template b/doc/gendocs_template -index 874689c..477d454 100755 ---- a/doc/gendocs_template -+++ b/doc/gendocs_template -@@ -41,6 +41,15 @@ - (%%TEXI_TGZ_SIZE%%K bytes gzipped tar file) - - -+

There is also an API reference manual: -+ -+

-+

-+ -

(This page generated by the %%SCRIPTNAME%% - script.)

- diff --git a/gl/override/m4/valgrind-tests.m4.diff b/gl/override/m4/valgrind-tests.m4.diff deleted file mode 100644 index ecec0d0..0000000 --- a/gl/override/m4/valgrind-tests.m4.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- gl/m4/valgrind-tests.m4.orig 2011-11-25 00:22:13.922991882 +0100 -+++ gl/m4/valgrind-tests.m4 2011-11-25 00:22:23.114450252 +0100 -@@ -21,7 +21,7 @@ - AC_CHECK_PROGS(VALGRIND, valgrind) - fi - -- OPTS="-q --error-exitcode=1 --leak-check=full" -+ OPTS="-q --error-exitcode=6 --leak-check=no" - - if test -n "$VALGRIND" \ - && $VALGRIND $OPTS $SHELL -c 'exit 0' > /dev/null 2>&1; then diff --git a/gl/progname.c b/gl/progname.c deleted file mode 100644 index 05b2a7f..0000000 --- a/gl/progname.c +++ /dev/null @@ -1,92 +0,0 @@ -/* Program name management. - Copyright (C) 2001-2003, 2005-2017 Free Software Foundation, Inc. - Written by Bruno Haible , 2001. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - - -#include - -/* Specification. */ -#undef ENABLE_RELOCATABLE /* avoid defining set_program_name as a macro */ -#include "progname.h" - -#include /* get program_invocation_name declaration */ -#include -#include -#include - - -/* String containing name the program is called with. - To be initialized by main(). */ -const char *program_name = NULL; - -/* Set program_name, based on argv[0]. - argv0 must be a string allocated with indefinite extent, and must not be - modified after this call. */ -void -set_program_name (const char *argv0) -{ - /* libtool creates a temporary executable whose name is sometimes prefixed - with "lt-" (depends on the platform). It also makes argv[0] absolute. - But the name of the temporary executable is a detail that should not be - visible to the end user and to the test suite. - Remove this "/.libs/" or "/.libs/lt-" prefix here. */ - const char *slash; - const char *base; - - /* Sanity check. POSIX requires the invoking process to pass a non-NULL - argv[0]. */ - if (argv0 == NULL) - { - /* It's a bug in the invoking program. Help diagnosing it. */ - fputs ("A NULL argv[0] was passed through an exec system call.\n", - stderr); - abort (); - } - - slash = strrchr (argv0, '/'); - base = (slash != NULL ? slash + 1 : argv0); - if (base - argv0 >= 7 && strncmp (base - 7, "/.libs/", 7) == 0) - { - argv0 = base; - if (strncmp (base, "lt-", 3) == 0) - { - argv0 = base + 3; - /* On glibc systems, remove the "lt-" prefix from the variable - program_invocation_short_name. */ -#if HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME - program_invocation_short_name = (char *) argv0; -#endif - } - } - - /* But don't strip off a leading / in general, because when the user - runs - /some/hidden/place/bin/cp foo foo - he should get the error message - /some/hidden/place/bin/cp: `foo' and `foo' are the same file - not - cp: `foo' and `foo' are the same file - */ - - program_name = argv0; - - /* On glibc systems, the error() function comes from libc and uses the - variable program_invocation_name, not program_name. So set this variable - as well. */ -#if HAVE_DECL_PROGRAM_INVOCATION_NAME - program_invocation_name = (char *) argv0; -#endif -} diff --git a/gl/progname.h b/gl/progname.h deleted file mode 100644 index f33881c..0000000 --- a/gl/progname.h +++ /dev/null @@ -1,62 +0,0 @@ -/* Program name management. - Copyright (C) 2001-2004, 2006, 2009-2017 Free Software Foundation, Inc. - Written by Bruno Haible , 2001. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#ifndef _PROGNAME_H -#define _PROGNAME_H - -/* Programs using this file should do the following in main(): - set_program_name (argv[0]); - */ - - -#ifdef __cplusplus -extern "C" { -#endif - - -/* String containing name the program is called with. */ -extern const char *program_name; - -/* Set program_name, based on argv[0]. - argv0 must be a string allocated with indefinite extent, and must not be - modified after this call. */ -extern void set_program_name (const char *argv0); - -#if ENABLE_RELOCATABLE - -/* Set program_name, based on argv[0], and original installation prefix and - directory, for relocatability. */ -extern void set_program_name_and_installdir (const char *argv0, - const char *orig_installprefix, - const char *orig_installdir); -#undef set_program_name -#define set_program_name(ARG0) \ - set_program_name_and_installdir (ARG0, INSTALLPREFIX, INSTALLDIR) - -/* Return the full pathname of the current executable, based on the earlier - call to set_program_name_and_installdir. Return NULL if unknown. */ -extern char *get_full_program_name (void); - -#endif - - -#ifdef __cplusplus -} -#endif - - -#endif /* _PROGNAME_H */ diff --git a/gl/read-file.c b/gl/read-file.c deleted file mode 100644 index 2418053..0000000 --- a/gl/read-file.c +++ /dev/null @@ -1,188 +0,0 @@ -/* read-file.c -- read file contents into a string - Copyright (C) 2006, 2009-2017 Free Software Foundation, Inc. - Written by Simon Josefsson and Bruno Haible. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ - -#include - -#include "read-file.h" - -/* Get fstat. */ -#include - -/* Get ftello. */ -#include - -/* Get SIZE_MAX. */ -#include - -/* Get malloc, realloc, free. */ -#include - -/* Get errno. */ -#include - -/* Read a STREAM and return a newly allocated string with the content, - and set *LENGTH to the length of the string. The string is - zero-terminated, but the terminating zero byte is not counted in - *LENGTH. On errors, *LENGTH is undefined, errno preserves the - values set by system functions (if any), and NULL is returned. */ -char * -fread_file (FILE *stream, size_t *length) -{ - char *buf = NULL; - size_t alloc = BUFSIZ; - - /* For a regular file, allocate a buffer that has exactly the right - size. This avoids the need to do dynamic reallocations later. */ - { - struct stat st; - - if (fstat (fileno (stream), &st) >= 0 && S_ISREG (st.st_mode)) - { - off_t pos = ftello (stream); - - if (pos >= 0 && pos < st.st_size) - { - off_t alloc_off = st.st_size - pos; - - /* '1' below, accounts for the trailing NUL. */ - if (SIZE_MAX - 1 < alloc_off) - { - errno = ENOMEM; - return NULL; - } - - alloc = alloc_off + 1; - } - } - } - - if (!(buf = malloc (alloc))) - return NULL; /* errno is ENOMEM. */ - - { - size_t size = 0; /* number of bytes read so far */ - int save_errno; - - for (;;) - { - /* This reads 1 more than the size of a regular file - so that we get eof immediately. */ - size_t requested = alloc - size; - size_t count = fread (buf + size, 1, requested, stream); - size += count; - - if (count != requested) - { - save_errno = errno; - if (ferror (stream)) - break; - - /* Shrink the allocated memory if possible. */ - if (size < alloc - 1) - { - char *smaller_buf = realloc (buf, size + 1); - if (smaller_buf != NULL) - buf = smaller_buf; - } - - buf[size] = '\0'; - *length = size; - return buf; - } - - { - char *new_buf; - - if (alloc == SIZE_MAX) - { - save_errno = ENOMEM; - break; - } - - if (alloc < SIZE_MAX - alloc / 2) - alloc = alloc + alloc / 2; - else - alloc = SIZE_MAX; - - if (!(new_buf = realloc (buf, alloc))) - { - save_errno = errno; - break; - } - - buf = new_buf; - } - } - - free (buf); - errno = save_errno; - return NULL; - } -} - -static char * -internal_read_file (const char *filename, size_t *length, const char *mode) -{ - FILE *stream = fopen (filename, mode); - char *out; - int save_errno; - - if (!stream) - return NULL; - - out = fread_file (stream, length); - - save_errno = errno; - - if (fclose (stream) != 0) - { - if (out) - { - save_errno = errno; - free (out); - } - errno = save_errno; - return NULL; - } - - return out; -} - -/* Open and read the contents of FILENAME, and return a newly - allocated string with the content, and set *LENGTH to the length of - the string. The string is zero-terminated, but the terminating - zero byte is not counted in *LENGTH. On errors, *LENGTH is - undefined, errno preserves the values set by system functions (if - any), and NULL is returned. */ -char * -read_file (const char *filename, size_t *length) -{ - return internal_read_file (filename, length, "r"); -} - -/* Open (on non-POSIX systems, in binary mode) and read the contents - of FILENAME, and return a newly allocated string with the content, - and set LENGTH to the length of the string. The string is - zero-terminated, but the terminating zero byte is not counted in - the LENGTH variable. On errors, *LENGTH is undefined, errno - preserves the values set by system functions (if any), and NULL is - returned. */ -char * -read_binary_file (const char *filename, size_t *length) -{ - return internal_read_file (filename, length, "rb"); -} diff --git a/gl/read-file.h b/gl/read-file.h deleted file mode 100644 index 23e0920..0000000 --- a/gl/read-file.h +++ /dev/null @@ -1,33 +0,0 @@ -/* read-file.h -- read file contents into a string - Copyright (C) 2006, 2009-2017 Free Software Foundation, Inc. - Written by Simon Josefsson. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ - -#ifndef READ_FILE_H -#define READ_FILE_H - -/* Get size_t. */ -#include - -/* Get FILE. */ -#include - -extern char *fread_file (FILE * stream, size_t * length); - -extern char *read_file (const char *filename, size_t * length); - -extern char *read_binary_file (const char *filename, size_t * length); - -#endif /* READ_FILE_H */ diff --git a/gl/realloc.c b/gl/realloc.c deleted file mode 100644 index 526b487..0000000 --- a/gl/realloc.c +++ /dev/null @@ -1,79 +0,0 @@ -/* realloc() function that is glibc compatible. - - Copyright (C) 1997, 2003-2004, 2006-2007, 2009-2017 Free Software - Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* written by Jim Meyering and Bruno Haible */ - -#define _GL_USE_STDLIB_ALLOC 1 -#include - -/* Only the AC_FUNC_REALLOC macro defines 'realloc' already in config.h. */ -#ifdef realloc -# define NEED_REALLOC_GNU 1 -/* Whereas the gnulib module 'realloc-gnu' defines HAVE_REALLOC_GNU. */ -#elif GNULIB_REALLOC_GNU && !HAVE_REALLOC_GNU -# define NEED_REALLOC_GNU 1 -#endif - -/* Infer the properties of the system's malloc function. - The gnulib module 'malloc-gnu' defines HAVE_MALLOC_GNU. */ -#if GNULIB_MALLOC_GNU && HAVE_MALLOC_GNU -# define SYSTEM_MALLOC_GLIBC_COMPATIBLE 1 -#endif - -#include - -#include - -/* Change the size of an allocated block of memory P to N bytes, - with error checking. If N is zero, change it to 1. If P is NULL, - use malloc. */ - -void * -rpl_realloc (void *p, size_t n) -{ - void *result; - -#if NEED_REALLOC_GNU - if (n == 0) - { - n = 1; - - /* In theory realloc might fail, so don't rely on it to free. */ - free (p); - p = NULL; - } -#endif - - if (p == NULL) - { -#if GNULIB_REALLOC_GNU && !NEED_REALLOC_GNU && !SYSTEM_MALLOC_GLIBC_COMPATIBLE - if (n == 0) - n = 1; -#endif - result = malloc (n); - } - else - result = realloc (p, n); - -#if !HAVE_REALLOC_POSIX - if (result == NULL) - errno = ENOMEM; -#endif - - return result; -} diff --git a/gl/stdarg.in.h b/gl/stdarg.in.h deleted file mode 100644 index 3785cd1..0000000 --- a/gl/stdarg.in.h +++ /dev/null @@ -1,35 +0,0 @@ -/* Substitute for and wrapper around . - Copyright (C) 2008-2017 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ - -#ifndef _@GUARD_PREFIX@_STDARG_H - -#if __GNUC__ >= 3 -@PRAGMA_SYSTEM_HEADER@ -#endif -@PRAGMA_COLUMNS@ - -/* The include_next requires a split double-inclusion guard. */ -#@INCLUDE_NEXT@ @NEXT_STDARG_H@ - -#ifndef _@GUARD_PREFIX@_STDARG_H -#define _@GUARD_PREFIX@_STDARG_H - -#ifndef va_copy -# define va_copy(a,b) ((a) = (b)) -#endif - -#endif /* _@GUARD_PREFIX@_STDARG_H */ -#endif /* _@GUARD_PREFIX@_STDARG_H */ diff --git a/gl/stddef.in.h b/gl/stddef.in.h deleted file mode 100644 index 5b496a6..0000000 --- a/gl/stddef.in.h +++ /dev/null @@ -1,110 +0,0 @@ -/* A substitute for POSIX 2008 , for platforms that have issues. - - Copyright (C) 2009-2017 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ - -/* Written by Eric Blake. */ - -/* - * POSIX 2008 for platforms that have issues. - * - */ - -#if __GNUC__ >= 3 -@PRAGMA_SYSTEM_HEADER@ -#endif -@PRAGMA_COLUMNS@ - -#if defined __need_wchar_t || defined __need_size_t \ - || defined __need_ptrdiff_t || defined __need_NULL \ - || defined __need_wint_t -/* Special invocation convention inside gcc header files. In - particular, gcc provides a version of that blindly - redefines NULL even when __need_wint_t was defined, even though - wint_t is not normally provided by . Hence, we must - remember if special invocation has ever been used to obtain wint_t, - in which case we need to clean up NULL yet again. */ - -# if !(defined _@GUARD_PREFIX@_STDDEF_H && defined _GL_STDDEF_WINT_T) -# ifdef __need_wint_t -# define _GL_STDDEF_WINT_T -# endif -# @INCLUDE_NEXT@ @NEXT_STDDEF_H@ -# endif - -#else -/* Normal invocation convention. */ - -# ifndef _@GUARD_PREFIX@_STDDEF_H - -/* The include_next requires a split double-inclusion guard. */ - -# @INCLUDE_NEXT@ @NEXT_STDDEF_H@ - -/* On NetBSD 5.0, the definition of NULL lacks proper parentheses. */ -# if (@REPLACE_NULL@ \ - && (!defined _@GUARD_PREFIX@_STDDEF_H || defined _GL_STDDEF_WINT_T)) -# undef NULL -# ifdef __cplusplus - /* ISO C++ says that the macro NULL must expand to an integer constant - expression, hence '((void *) 0)' is not allowed in C++. */ -# if __GNUG__ >= 3 - /* GNU C++ has a __null macro that behaves like an integer ('int' or - 'long') but has the same size as a pointer. Use that, to avoid - warnings. */ -# define NULL __null -# else -# define NULL 0L -# endif -# else -# define NULL ((void *) 0) -# endif -# endif - -# ifndef _@GUARD_PREFIX@_STDDEF_H -# define _@GUARD_PREFIX@_STDDEF_H - -/* Some platforms lack wchar_t. */ -#if !@HAVE_WCHAR_T@ -# define wchar_t int -#endif - -/* Some platforms lack max_align_t. The check for _GCC_MAX_ALIGN_T is - a hack in case the configure-time test was done with g++ even though - we are currently compiling with gcc. */ -#if ! (@HAVE_MAX_ALIGN_T@ || defined _GCC_MAX_ALIGN_T) -/* On the x86, the maximum storage alignment of double, long, etc. is 4, - but GCC's C11 ABI for x86 says that max_align_t has an alignment of 8, - and the C11 standard allows this. Work around this problem by - using __alignof__ (which returns 8 for double) rather than _Alignof - (which returns 4), and align each union member accordingly. */ -# ifdef __GNUC__ -# define _GL_STDDEF_ALIGNAS(type) \ - __attribute__ ((__aligned__ (__alignof__ (type)))) -# else -# define _GL_STDDEF_ALIGNAS(type) /* */ -# endif -typedef union -{ - char *__p _GL_STDDEF_ALIGNAS (char *); - double __d _GL_STDDEF_ALIGNAS (double); - long double __ld _GL_STDDEF_ALIGNAS (long double); - long int __i _GL_STDDEF_ALIGNAS (long int); -} max_align_t; -#endif - -# endif /* _@GUARD_PREFIX@_STDDEF_H */ -# endif /* _@GUARD_PREFIX@_STDDEF_H */ -#endif /* __need_XXX */ diff --git a/gl/stdint.in.h b/gl/stdint.in.h deleted file mode 100644 index d899c1e..0000000 --- a/gl/stdint.in.h +++ /dev/null @@ -1,707 +0,0 @@ -/* Copyright (C) 2001-2002, 2004-2017 Free Software Foundation, Inc. - Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood. - This file is part of gnulib. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ - -/* - * ISO C 99 for platforms that lack it. - * - */ - -#ifndef _@GUARD_PREFIX@_STDINT_H - -#if __GNUC__ >= 3 -@PRAGMA_SYSTEM_HEADER@ -#endif -@PRAGMA_COLUMNS@ - -/* When including a system file that in turn includes , - use the system , not our substitute. This avoids - problems with (for example) VMS, whose includes - . */ -#define _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H - -/* On Android (Bionic libc), includes this file before - having defined 'time_t'. Therefore in this case avoid including - other system header files; just include the system's . - Ideally we should test __BIONIC__ here, but it is only defined after - has been included; hence test __ANDROID__ instead. */ -#if defined __ANDROID__ && defined _GL_INCLUDING_SYS_TYPES_H -# @INCLUDE_NEXT@ @NEXT_STDINT_H@ -#else - -/* Get those types that are already defined in other system include - files, so that we can "#define int8_t signed char" below without - worrying about a later system include file containing a "typedef - signed char int8_t;" that will get messed up by our macro. Our - macros should all be consistent with the system versions, except - for the "fast" types and macros, which we recommend against using - in public interfaces due to compiler differences. */ - -#if @HAVE_STDINT_H@ -# if defined __sgi && ! defined __c99 - /* Bypass IRIX's if in C89 mode, since it merely annoys users - with "This header file is to be used only for c99 mode compilations" - diagnostics. */ -# define __STDINT_H__ -# endif - - /* Some pre-C++11 implementations need this. */ -# ifdef __cplusplus -# ifndef __STDC_CONSTANT_MACROS -# define __STDC_CONSTANT_MACROS 1 -# endif -# ifndef __STDC_LIMIT_MACROS -# define __STDC_LIMIT_MACROS 1 -# endif -# endif - - /* Other systems may have an incomplete or buggy . - Include it before , since any "#include " - in would reinclude us, skipping our contents because - _@GUARD_PREFIX@_STDINT_H is defined. - The include_next requires a split double-inclusion guard. */ -# @INCLUDE_NEXT@ @NEXT_STDINT_H@ -#endif - -#if ! defined _@GUARD_PREFIX@_STDINT_H && ! defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H -#define _@GUARD_PREFIX@_STDINT_H - -/* Get SCHAR_MIN, SCHAR_MAX, UCHAR_MAX, INT_MIN, INT_MAX, - LONG_MIN, LONG_MAX, ULONG_MAX, _GL_INTEGER_WIDTH. */ -#include - -/* Override WINT_MIN and WINT_MAX if gnulib's or overrides - wint_t. */ -#if @GNULIB_OVERRIDES_WINT_T@ -# undef WINT_MIN -# undef WINT_MAX -# define WINT_MIN 0x0U -# define WINT_MAX 0xffffffffU -#endif - -#if ! @HAVE_C99_STDINT_H@ - -/* defines some of the stdint.h types as well, on glibc, - IRIX 6.5, and OpenBSD 3.8 (via ). - AIX 5.2 isn't needed and causes troubles. - Mac OS X 10.4.6 includes (which is us), but - relies on the system definitions, so include - after @NEXT_STDINT_H@. */ -# if @HAVE_SYS_TYPES_H@ && ! defined _AIX -# include -# endif - -# if @HAVE_INTTYPES_H@ - /* In OpenBSD 3.8, includes , which defines - int{8,16,32,64}_t, uint{8,16,32,64}_t and __BIT_TYPES_DEFINED__. - also defines intptr_t and uintptr_t. */ -# include -# elif @HAVE_SYS_INTTYPES_H@ - /* Solaris 7 has the types except the *_fast*_t types, and - the macros except for *_FAST*_*, INTPTR_MIN, PTRDIFF_MIN, PTRDIFF_MAX. */ -# include -# endif - -# if @HAVE_SYS_BITYPES_H@ && ! defined __BIT_TYPES_DEFINED__ - /* Linux libc4 >= 4.6.7 and libc5 have a that defines - int{8,16,32,64}_t and __BIT_TYPES_DEFINED__. In libc5 >= 5.2.2 it is - included by . */ -# include -# endif - -# undef _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H - -/* Minimum and maximum values for an integer type under the usual assumption. - Return an unspecified value if BITS == 0, adding a check to pacify - picky compilers. */ - -# define _STDINT_MIN(signed, bits, zero) \ - ((signed) ? ~ _STDINT_MAX (signed, bits, zero) : (zero)) - -# define _STDINT_MAX(signed, bits, zero) \ - (((((zero) + 1) << ((bits) ? (bits) - 1 - (signed) : 0)) - 1) * 2 + 1) - -#if !GNULIB_defined_stdint_types - -/* 7.18.1.1. Exact-width integer types */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits. */ - -# undef int8_t -# undef uint8_t -typedef signed char gl_int8_t; -typedef unsigned char gl_uint8_t; -# define int8_t gl_int8_t -# define uint8_t gl_uint8_t - -# undef int16_t -# undef uint16_t -typedef short int gl_int16_t; -typedef unsigned short int gl_uint16_t; -# define int16_t gl_int16_t -# define uint16_t gl_uint16_t - -# undef int32_t -# undef uint32_t -typedef int gl_int32_t; -typedef unsigned int gl_uint32_t; -# define int32_t gl_int32_t -# define uint32_t gl_uint32_t - -/* If the system defines INT64_MAX, assume int64_t works. That way, - if the underlying platform defines int64_t to be a 64-bit long long - int, the code below won't mistakenly define it to be a 64-bit long - int, which would mess up C++ name mangling. We must use #ifdef - rather than #if, to avoid an error with HP-UX 10.20 cc. */ - -# ifdef INT64_MAX -# define GL_INT64_T -# else -/* Do not undefine int64_t if gnulib is not being used with 64-bit - types, since otherwise it breaks platforms like Tandem/NSK. */ -# if LONG_MAX >> 31 >> 31 == 1 -# undef int64_t -typedef long int gl_int64_t; -# define int64_t gl_int64_t -# define GL_INT64_T -# elif defined _MSC_VER -# undef int64_t -typedef __int64 gl_int64_t; -# define int64_t gl_int64_t -# define GL_INT64_T -# elif @HAVE_LONG_LONG_INT@ -# undef int64_t -typedef long long int gl_int64_t; -# define int64_t gl_int64_t -# define GL_INT64_T -# endif -# endif - -# ifdef UINT64_MAX -# define GL_UINT64_T -# else -# if ULONG_MAX >> 31 >> 31 >> 1 == 1 -# undef uint64_t -typedef unsigned long int gl_uint64_t; -# define uint64_t gl_uint64_t -# define GL_UINT64_T -# elif defined _MSC_VER -# undef uint64_t -typedef unsigned __int64 gl_uint64_t; -# define uint64_t gl_uint64_t -# define GL_UINT64_T -# elif @HAVE_UNSIGNED_LONG_LONG_INT@ -# undef uint64_t -typedef unsigned long long int gl_uint64_t; -# define uint64_t gl_uint64_t -# define GL_UINT64_T -# endif -# endif - -/* Avoid collision with Solaris 2.5.1 etc. */ -# define _UINT8_T -# define _UINT32_T -# define _UINT64_T - - -/* 7.18.1.2. Minimum-width integer types */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits. Therefore the leastN_t types - are the same as the corresponding N_t types. */ - -# undef int_least8_t -# undef uint_least8_t -# undef int_least16_t -# undef uint_least16_t -# undef int_least32_t -# undef uint_least32_t -# undef int_least64_t -# undef uint_least64_t -# define int_least8_t int8_t -# define uint_least8_t uint8_t -# define int_least16_t int16_t -# define uint_least16_t uint16_t -# define int_least32_t int32_t -# define uint_least32_t uint32_t -# ifdef GL_INT64_T -# define int_least64_t int64_t -# endif -# ifdef GL_UINT64_T -# define uint_least64_t uint64_t -# endif - -/* 7.18.1.3. Fastest minimum-width integer types */ - -/* Note: Other substitutes may define these types differently. - It is not recommended to use these types in public header files. */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits. Therefore the fastN_t types - are taken from the same list of types. The following code normally - uses types consistent with glibc, as that lessens the chance of - incompatibility with older GNU hosts. */ - -# undef int_fast8_t -# undef uint_fast8_t -# undef int_fast16_t -# undef uint_fast16_t -# undef int_fast32_t -# undef uint_fast32_t -# undef int_fast64_t -# undef uint_fast64_t -typedef signed char gl_int_fast8_t; -typedef unsigned char gl_uint_fast8_t; - -# ifdef __sun -/* Define types compatible with SunOS 5.10, so that code compiled under - earlier SunOS versions works with code compiled under SunOS 5.10. */ -typedef int gl_int_fast32_t; -typedef unsigned int gl_uint_fast32_t; -# else -typedef long int gl_int_fast32_t; -typedef unsigned long int gl_uint_fast32_t; -# endif -typedef gl_int_fast32_t gl_int_fast16_t; -typedef gl_uint_fast32_t gl_uint_fast16_t; - -# define int_fast8_t gl_int_fast8_t -# define uint_fast8_t gl_uint_fast8_t -# define int_fast16_t gl_int_fast16_t -# define uint_fast16_t gl_uint_fast16_t -# define int_fast32_t gl_int_fast32_t -# define uint_fast32_t gl_uint_fast32_t -# ifdef GL_INT64_T -# define int_fast64_t int64_t -# endif -# ifdef GL_UINT64_T -# define uint_fast64_t uint64_t -# endif - -/* 7.18.1.4. Integer types capable of holding object pointers */ - -/* kLIBC's stdint.h defines _INTPTR_T_DECLARED and needs its own - definitions of intptr_t and uintptr_t (which use int and unsigned) - to avoid clashes with declarations of system functions like sbrk. */ -# ifndef _INTPTR_T_DECLARED -# undef intptr_t -# undef uintptr_t -typedef long int gl_intptr_t; -typedef unsigned long int gl_uintptr_t; -# define intptr_t gl_intptr_t -# define uintptr_t gl_uintptr_t -# endif - -/* 7.18.1.5. Greatest-width integer types */ - -/* Note: These types are compiler dependent. It may be unwise to use them in - public header files. */ - -/* If the system defines INTMAX_MAX, assume that intmax_t works, and - similarly for UINTMAX_MAX and uintmax_t. This avoids problems with - assuming one type where another is used by the system. */ - -# ifndef INTMAX_MAX -# undef INTMAX_C -# undef intmax_t -# if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1 -typedef long long int gl_intmax_t; -# define intmax_t gl_intmax_t -# elif defined GL_INT64_T -# define intmax_t int64_t -# else -typedef long int gl_intmax_t; -# define intmax_t gl_intmax_t -# endif -# endif - -# ifndef UINTMAX_MAX -# undef UINTMAX_C -# undef uintmax_t -# if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1 -typedef unsigned long long int gl_uintmax_t; -# define uintmax_t gl_uintmax_t -# elif defined GL_UINT64_T -# define uintmax_t uint64_t -# else -typedef unsigned long int gl_uintmax_t; -# define uintmax_t gl_uintmax_t -# endif -# endif - -/* Verify that intmax_t and uintmax_t have the same size. Too much code - breaks if this is not the case. If this check fails, the reason is likely - to be found in the autoconf macros. */ -typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t) - ? 1 : -1]; - -# define GNULIB_defined_stdint_types 1 -# endif /* !GNULIB_defined_stdint_types */ - -/* 7.18.2. Limits of specified-width integer types */ - -/* 7.18.2.1. Limits of exact-width integer types */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits. */ - -# undef INT8_MIN -# undef INT8_MAX -# undef UINT8_MAX -# define INT8_MIN (~ INT8_MAX) -# define INT8_MAX 127 -# define UINT8_MAX 255 - -# undef INT16_MIN -# undef INT16_MAX -# undef UINT16_MAX -# define INT16_MIN (~ INT16_MAX) -# define INT16_MAX 32767 -# define UINT16_MAX 65535 - -# undef INT32_MIN -# undef INT32_MAX -# undef UINT32_MAX -# define INT32_MIN (~ INT32_MAX) -# define INT32_MAX 2147483647 -# define UINT32_MAX 4294967295U - -# if defined GL_INT64_T && ! defined INT64_MAX -/* Prefer (- INTMAX_C (1) << 63) over (~ INT64_MAX) because SunPRO C 5.0 - evaluates the latter incorrectly in preprocessor expressions. */ -# define INT64_MIN (- INTMAX_C (1) << 63) -# define INT64_MAX INTMAX_C (9223372036854775807) -# endif - -# if defined GL_UINT64_T && ! defined UINT64_MAX -# define UINT64_MAX UINTMAX_C (18446744073709551615) -# endif - -/* 7.18.2.2. Limits of minimum-width integer types */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits. Therefore the leastN_t types - are the same as the corresponding N_t types. */ - -# undef INT_LEAST8_MIN -# undef INT_LEAST8_MAX -# undef UINT_LEAST8_MAX -# define INT_LEAST8_MIN INT8_MIN -# define INT_LEAST8_MAX INT8_MAX -# define UINT_LEAST8_MAX UINT8_MAX - -# undef INT_LEAST16_MIN -# undef INT_LEAST16_MAX -# undef UINT_LEAST16_MAX -# define INT_LEAST16_MIN INT16_MIN -# define INT_LEAST16_MAX INT16_MAX -# define UINT_LEAST16_MAX UINT16_MAX - -# undef INT_LEAST32_MIN -# undef INT_LEAST32_MAX -# undef UINT_LEAST32_MAX -# define INT_LEAST32_MIN INT32_MIN -# define INT_LEAST32_MAX INT32_MAX -# define UINT_LEAST32_MAX UINT32_MAX - -# undef INT_LEAST64_MIN -# undef INT_LEAST64_MAX -# ifdef GL_INT64_T -# define INT_LEAST64_MIN INT64_MIN -# define INT_LEAST64_MAX INT64_MAX -# endif - -# undef UINT_LEAST64_MAX -# ifdef GL_UINT64_T -# define UINT_LEAST64_MAX UINT64_MAX -# endif - -/* 7.18.2.3. Limits of fastest minimum-width integer types */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits. Therefore the fastN_t types - are taken from the same list of types. */ - -# undef INT_FAST8_MIN -# undef INT_FAST8_MAX -# undef UINT_FAST8_MAX -# define INT_FAST8_MIN SCHAR_MIN -# define INT_FAST8_MAX SCHAR_MAX -# define UINT_FAST8_MAX UCHAR_MAX - -# undef INT_FAST16_MIN -# undef INT_FAST16_MAX -# undef UINT_FAST16_MAX -# define INT_FAST16_MIN INT_FAST32_MIN -# define INT_FAST16_MAX INT_FAST32_MAX -# define UINT_FAST16_MAX UINT_FAST32_MAX - -# undef INT_FAST32_MIN -# undef INT_FAST32_MAX -# undef UINT_FAST32_MAX -# ifdef __sun -# define INT_FAST32_MIN INT_MIN -# define INT_FAST32_MAX INT_MAX -# define UINT_FAST32_MAX UINT_MAX -# else -# define INT_FAST32_MIN LONG_MIN -# define INT_FAST32_MAX LONG_MAX -# define UINT_FAST32_MAX ULONG_MAX -# endif - -# undef INT_FAST64_MIN -# undef INT_FAST64_MAX -# ifdef GL_INT64_T -# define INT_FAST64_MIN INT64_MIN -# define INT_FAST64_MAX INT64_MAX -# endif - -# undef UINT_FAST64_MAX -# ifdef GL_UINT64_T -# define UINT_FAST64_MAX UINT64_MAX -# endif - -/* 7.18.2.4. Limits of integer types capable of holding object pointers */ - -# undef INTPTR_MIN -# undef INTPTR_MAX -# undef UINTPTR_MAX -# define INTPTR_MIN LONG_MIN -# define INTPTR_MAX LONG_MAX -# define UINTPTR_MAX ULONG_MAX - -/* 7.18.2.5. Limits of greatest-width integer types */ - -# ifndef INTMAX_MAX -# undef INTMAX_MIN -# ifdef INT64_MAX -# define INTMAX_MIN INT64_MIN -# define INTMAX_MAX INT64_MAX -# else -# define INTMAX_MIN INT32_MIN -# define INTMAX_MAX INT32_MAX -# endif -# endif - -# ifndef UINTMAX_MAX -# ifdef UINT64_MAX -# define UINTMAX_MAX UINT64_MAX -# else -# define UINTMAX_MAX UINT32_MAX -# endif -# endif - -/* 7.18.3. Limits of other integer types */ - -/* ptrdiff_t limits */ -# undef PTRDIFF_MIN -# undef PTRDIFF_MAX -# if @APPLE_UNIVERSAL_BUILD@ -# ifdef _LP64 -# define PTRDIFF_MIN _STDINT_MIN (1, 64, 0l) -# define PTRDIFF_MAX _STDINT_MAX (1, 64, 0l) -# else -# define PTRDIFF_MIN _STDINT_MIN (1, 32, 0) -# define PTRDIFF_MAX _STDINT_MAX (1, 32, 0) -# endif -# else -# define PTRDIFF_MIN \ - _STDINT_MIN (1, @BITSIZEOF_PTRDIFF_T@, 0@PTRDIFF_T_SUFFIX@) -# define PTRDIFF_MAX \ - _STDINT_MAX (1, @BITSIZEOF_PTRDIFF_T@, 0@PTRDIFF_T_SUFFIX@) -# endif - -/* sig_atomic_t limits */ -# undef SIG_ATOMIC_MIN -# undef SIG_ATOMIC_MAX -# define SIG_ATOMIC_MIN \ - _STDINT_MIN (@HAVE_SIGNED_SIG_ATOMIC_T@, @BITSIZEOF_SIG_ATOMIC_T@, \ - 0@SIG_ATOMIC_T_SUFFIX@) -# define SIG_ATOMIC_MAX \ - _STDINT_MAX (@HAVE_SIGNED_SIG_ATOMIC_T@, @BITSIZEOF_SIG_ATOMIC_T@, \ - 0@SIG_ATOMIC_T_SUFFIX@) - - -/* size_t limit */ -# undef SIZE_MAX -# if @APPLE_UNIVERSAL_BUILD@ -# ifdef _LP64 -# define SIZE_MAX _STDINT_MAX (0, 64, 0ul) -# else -# define SIZE_MAX _STDINT_MAX (0, 32, 0ul) -# endif -# else -# define SIZE_MAX _STDINT_MAX (0, @BITSIZEOF_SIZE_T@, 0@SIZE_T_SUFFIX@) -# endif - -/* wchar_t limits */ -/* Get WCHAR_MIN, WCHAR_MAX. - This include is not on the top, above, because on OSF/1 4.0 we have a - sequence of nested includes - -> -> -> , and the latter includes - and assumes its types are already defined. */ -# if @HAVE_WCHAR_H@ && ! (defined WCHAR_MIN && defined WCHAR_MAX) - /* BSD/OS 4.0.1 has a bug: , and must be - included before . */ -# include -# include -# include -# define _GL_JUST_INCLUDE_SYSTEM_WCHAR_H -# include -# undef _GL_JUST_INCLUDE_SYSTEM_WCHAR_H -# endif -# undef WCHAR_MIN -# undef WCHAR_MAX -# define WCHAR_MIN \ - _STDINT_MIN (@HAVE_SIGNED_WCHAR_T@, @BITSIZEOF_WCHAR_T@, 0@WCHAR_T_SUFFIX@) -# define WCHAR_MAX \ - _STDINT_MAX (@HAVE_SIGNED_WCHAR_T@, @BITSIZEOF_WCHAR_T@, 0@WCHAR_T_SUFFIX@) - -/* wint_t limits */ -# undef WINT_MIN -# undef WINT_MAX -# define WINT_MIN \ - _STDINT_MIN (@HAVE_SIGNED_WINT_T@, @BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@) -# define WINT_MAX \ - _STDINT_MAX (@HAVE_SIGNED_WINT_T@, @BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@) - -/* 7.18.4. Macros for integer constants */ - -/* 7.18.4.1. Macros for minimum-width integer constants */ -/* According to ISO C 99 Technical Corrigendum 1 */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits, and int is 32 bits. */ - -# undef INT8_C -# undef UINT8_C -# define INT8_C(x) x -# define UINT8_C(x) x - -# undef INT16_C -# undef UINT16_C -# define INT16_C(x) x -# define UINT16_C(x) x - -# undef INT32_C -# undef UINT32_C -# define INT32_C(x) x -# define UINT32_C(x) x ## U - -# undef INT64_C -# undef UINT64_C -# if LONG_MAX >> 31 >> 31 == 1 -# define INT64_C(x) x##L -# elif defined _MSC_VER -# define INT64_C(x) x##i64 -# elif @HAVE_LONG_LONG_INT@ -# define INT64_C(x) x##LL -# endif -# if ULONG_MAX >> 31 >> 31 >> 1 == 1 -# define UINT64_C(x) x##UL -# elif defined _MSC_VER -# define UINT64_C(x) x##ui64 -# elif @HAVE_UNSIGNED_LONG_LONG_INT@ -# define UINT64_C(x) x##ULL -# endif - -/* 7.18.4.2. Macros for greatest-width integer constants */ - -# ifndef INTMAX_C -# if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1 -# define INTMAX_C(x) x##LL -# elif defined GL_INT64_T -# define INTMAX_C(x) INT64_C(x) -# else -# define INTMAX_C(x) x##L -# endif -# endif - -# ifndef UINTMAX_C -# if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1 -# define UINTMAX_C(x) x##ULL -# elif defined GL_UINT64_T -# define UINTMAX_C(x) UINT64_C(x) -# else -# define UINTMAX_C(x) x##UL -# endif -# endif - -#endif /* !@HAVE_C99_STDINT_H@ */ - -/* Macros specified by ISO/IEC TS 18661-1:2014. */ - -#if (!defined UINTMAX_WIDTH \ - && (defined _GNU_SOURCE || defined __STDC_WANT_IEC_60559_BFP_EXT__)) -# ifdef INT8_MAX -# define INT8_WIDTH _GL_INTEGER_WIDTH (INT8_MIN, INT8_MAX) -# endif -# ifdef UINT8_MAX -# define UINT8_WIDTH _GL_INTEGER_WIDTH (0, UINT8_MAX) -# endif -# ifdef INT16_MAX -# define INT16_WIDTH _GL_INTEGER_WIDTH (INT16_MIN, INT16_MAX) -# endif -# ifdef UINT16_MAX -# define UINT16_WIDTH _GL_INTEGER_WIDTH (0, UINT16_MAX) -# endif -# ifdef INT32_MAX -# define INT32_WIDTH _GL_INTEGER_WIDTH (INT32_MIN, INT32_MAX) -# endif -# ifdef UINT32_MAX -# define UINT32_WIDTH _GL_INTEGER_WIDTH (0, UINT32_MAX) -# endif -# ifdef INT64_MAX -# define INT64_WIDTH _GL_INTEGER_WIDTH (INT64_MIN, INT64_MAX) -# endif -# ifdef UINT64_MAX -# define UINT64_WIDTH _GL_INTEGER_WIDTH (0, UINT64_MAX) -# endif -# define INT_LEAST8_WIDTH _GL_INTEGER_WIDTH (INT_LEAST8_MIN, INT_LEAST8_MAX) -# define UINT_LEAST8_WIDTH _GL_INTEGER_WIDTH (0, UINT_LEAST8_MAX) -# define INT_LEAST16_WIDTH _GL_INTEGER_WIDTH (INT_LEAST16_MIN, INT_LEAST16_MAX) -# define UINT_LEAST16_WIDTH _GL_INTEGER_WIDTH (0, UINT_LEAST16_MAX) -# define INT_LEAST32_WIDTH _GL_INTEGER_WIDTH (INT_LEAST32_MIN, INT_LEAST32_MAX) -# define UINT_LEAST32_WIDTH _GL_INTEGER_WIDTH (0, UINT_LEAST32_MAX) -# define INT_LEAST64_WIDTH _GL_INTEGER_WIDTH (INT_LEAST64_MIN, INT_LEAST64_MAX) -# define UINT_LEAST64_WIDTH _GL_INTEGER_WIDTH (0, UINT_LEAST64_MAX) -# define INT_FAST8_WIDTH _GL_INTEGER_WIDTH (INT_FAST8_MIN, INT_FAST8_MAX) -# define UINT_FAST8_WIDTH _GL_INTEGER_WIDTH (0, UINT_FAST8_MAX) -# define INT_FAST16_WIDTH _GL_INTEGER_WIDTH (INT_FAST16_MIN, INT_FAST16_MAX) -# define UINT_FAST16_WIDTH _GL_INTEGER_WIDTH (0, UINT_FAST16_MAX) -# define INT_FAST32_WIDTH _GL_INTEGER_WIDTH (INT_FAST32_MIN, INT_FAST32_MAX) -# define UINT_FAST32_WIDTH _GL_INTEGER_WIDTH (0, UINT_FAST32_MAX) -# define INT_FAST64_WIDTH _GL_INTEGER_WIDTH (INT_FAST64_MIN, INT_FAST64_MAX) -# define UINT_FAST64_WIDTH _GL_INTEGER_WIDTH (0, UINT_FAST64_MAX) -# define INTPTR_WIDTH _GL_INTEGER_WIDTH (INTPTR_MIN, INTPTR_MAX) -# define UINTPTR_WIDTH _GL_INTEGER_WIDTH (0, UINTPTR_MAX) -# define INTMAX_WIDTH _GL_INTEGER_WIDTH (INTMAX_MIN, INTMAX_MAX) -# define UINTMAX_WIDTH _GL_INTEGER_WIDTH (0, UINTMAX_MAX) -# define PTRDIFF_WIDTH _GL_INTEGER_WIDTH (PTRDIFF_MIN, PTRDIFF_MAX) -# define SIZE_WIDTH _GL_INTEGER_WIDTH (0, SIZE_MAX) -# define WCHAR_WIDTH _GL_INTEGER_WIDTH (WCHAR_MIN, WCHAR_MAX) -# ifdef WINT_MAX -# define WINT_WIDTH _GL_INTEGER_WIDTH (WINT_MIN, WINT_MAX) -# endif -# ifdef SIG_ATOMIC_MAX -# define SIG_ATOMIC_WIDTH _GL_INTEGER_WIDTH (SIG_ATOMIC_MIN, SIG_ATOMIC_MAX) -# endif -#endif /* !WINT_WIDTH && (_GNU_SOURCE || __STDC_WANT_IEC_60559_BFP_EXT__) */ - -#endif /* _@GUARD_PREFIX@_STDINT_H */ -#endif /* !(defined __ANDROID__ && ...) */ -#endif /* !defined _@GUARD_PREFIX@_STDINT_H && !defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H */ diff --git a/gl/stdio-impl.h b/gl/stdio-impl.h deleted file mode 100644 index 75a945e..0000000 --- a/gl/stdio-impl.h +++ /dev/null @@ -1,140 +0,0 @@ -/* Implementation details of FILE streams. - Copyright (C) 2007-2008, 2010-2017 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Many stdio implementations have the same logic and therefore can share - the same implementation of stdio extension API, except that some fields - have different naming conventions, or their access requires some casts. */ - - -/* BSD stdio derived implementations. */ - -#if defined __NetBSD__ /* NetBSD */ -/* Get __NetBSD_Version__. */ -# include -#endif - -#include /* For detecting Plan9. */ - -#if defined __sferror || defined __DragonFly__ || defined __ANDROID__ - /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */ - -# if defined __DragonFly__ /* DragonFly */ - /* See . */ -# define fp_ ((struct { struct __FILE_public pub; \ - struct { unsigned char *_base; int _size; } _bf; \ - void *cookie; \ - void *_close; \ - void *_read; \ - void *_seek; \ - void *_write; \ - struct { unsigned char *_base; int _size; } _ub; \ - int _ur; \ - unsigned char _ubuf[3]; \ - unsigned char _nbuf[1]; \ - struct { unsigned char *_base; int _size; } _lb; \ - int _blksize; \ - fpos_t _offset; \ - /* More fields, not relevant here. */ \ - } *) fp) - /* See . */ -# define _p pub._p -# define _flags pub._flags -# define _r pub._r -# define _w pub._w -# else -# define fp_ fp -# endif - -# if (defined __NetBSD__ && __NetBSD_Version__ >= 105270000) || defined __OpenBSD__ || defined __minix || defined __ANDROID__ /* NetBSD >= 1.5ZA, OpenBSD, Minix 3, Android */ - /* See - and */ - struct __sfileext - { - struct __sbuf _ub; /* ungetc buffer */ - /* More fields, not relevant here. */ - }; -# define fp_ub ((struct __sfileext *) fp->_ext._base)->_ub -# else /* FreeBSD, NetBSD <= 1.5Z, DragonFly, Mac OS X, Cygwin, Android */ -# define fp_ub fp_->_ub -# endif - -# define HASUB(fp) (fp_ub._base != NULL) - -#endif - - -/* SystemV derived implementations. */ - -#ifdef __TANDEM /* NonStop Kernel */ -# ifndef _IOERR -/* These values were determined by the program 'stdioext-flags' at - . */ -# define _IOERR 0x40 -# define _IOREAD 0x80 -# define _IOWRT 0x4 -# define _IORW 0x100 -# endif -#endif - -#if defined _IOERR - -# if defined __sun && defined _LP64 /* Solaris/{SPARC,AMD64} 64-bit */ -# define fp_ ((struct { unsigned char *_ptr; \ - unsigned char *_base; \ - unsigned char *_end; \ - long _cnt; \ - int _file; \ - unsigned int _flag; \ - } *) fp) -# else -# define fp_ fp -# endif - -# if defined _SCO_DS /* OpenServer */ -# define _cnt __cnt -# define _ptr __ptr -# define _base __base -# define _flag __flag -# endif - -#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* newer Windows with MSVC */ - -/* does not define the innards of FILE any more. */ -# define WINDOWS_OPAQUE_FILE - -struct _gl_real_FILE -{ - /* Note: Compared to older Windows and to mingw, it has the fields - _base and _cnt swapped. */ - unsigned char *_ptr; - unsigned char *_base; - int _cnt; - int _flag; - int _file; - int _charbuf; - int _bufsiz; -}; -# define fp_ ((struct _gl_real_FILE *) fp) - -/* These values were determined by a program similar to the one at - . */ -# define _IOREAD 0x1 -# define _IOWRT 0x2 -# define _IORW 0x4 -# define _IOEOF 0x8 -# define _IOERR 0x10 - -#endif diff --git a/gl/stdio.in.h b/gl/stdio.in.h deleted file mode 100644 index d706377..0000000 --- a/gl/stdio.in.h +++ /dev/null @@ -1,1377 +0,0 @@ -/* A GNU-like . - - Copyright (C) 2004, 2007-2017 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ - -#if __GNUC__ >= 3 -@PRAGMA_SYSTEM_HEADER@ -#endif -@PRAGMA_COLUMNS@ - -#if defined __need_FILE || defined __need___FILE || defined _GL_ALREADY_INCLUDING_STDIO_H -/* Special invocation convention: - - Inside glibc header files. - - On OSF/1 5.1 we have a sequence of nested includes - -> -> -> -> - -> -> -> . - In this situation, the functions are not yet declared, therefore we cannot - provide the C++ aliases. */ - -#@INCLUDE_NEXT@ @NEXT_STDIO_H@ - -#else -/* Normal invocation convention. */ - -#ifndef _@GUARD_PREFIX@_STDIO_H - -#define _GL_ALREADY_INCLUDING_STDIO_H - -/* The include_next requires a split double-inclusion guard. */ -#@INCLUDE_NEXT@ @NEXT_STDIO_H@ - -#undef _GL_ALREADY_INCLUDING_STDIO_H - -#ifndef _@GUARD_PREFIX@_STDIO_H -#define _@GUARD_PREFIX@_STDIO_H - -/* Get va_list. Needed on many systems, including glibc 2.8. */ -#include - -#include - -/* Get off_t and ssize_t. Needed on many systems, including glibc 2.8 - and eglibc 2.11.2. - May also define off_t to a 64-bit type on native Windows. */ -#include - -/* The __attribute__ feature is available in gcc versions 2.5 and later. - The __-protected variants of the attributes 'format' and 'printf' are - accepted by gcc versions 2.6.4 (effectively 2.7) and later. - We enable _GL_ATTRIBUTE_FORMAT only if these are supported too, because - gnulib and libintl do '#define printf __printf__' when they override - the 'printf' function. */ -#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) -# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec)) -#else -# define _GL_ATTRIBUTE_FORMAT(spec) /* empty */ -#endif - -/* _GL_ATTRIBUTE_FORMAT_PRINTF - indicates to GCC that the function takes a format string and arguments, - where the format string directives are the ones standardized by ISO C99 - and POSIX. */ -#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) -# define _GL_ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__gnu_printf__, formatstring_parameter, first_argument)) -#else -# define _GL_ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument)) -#endif - -/* _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM is like _GL_ATTRIBUTE_FORMAT_PRINTF, - except that it indicates to GCC that the supported format string directives - are the ones of the system printf(), rather than the ones standardized by - ISO C99 and POSIX. */ -#if GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU -# define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT_PRINTF (formatstring_parameter, first_argument) -#else -# define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument)) -#endif - -/* _GL_ATTRIBUTE_FORMAT_SCANF - indicates to GCC that the function takes a format string and arguments, - where the format string directives are the ones standardized by ISO C99 - and POSIX. */ -#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) -# define _GL_ATTRIBUTE_FORMAT_SCANF(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__gnu_scanf__, formatstring_parameter, first_argument)) -#else -# define _GL_ATTRIBUTE_FORMAT_SCANF(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__scanf__, formatstring_parameter, first_argument)) -#endif - -/* _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM is like _GL_ATTRIBUTE_FORMAT_SCANF, - except that it indicates to GCC that the supported format string directives - are the ones of the system scanf(), rather than the ones standardized by - ISO C99 and POSIX. */ -#define _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__scanf__, formatstring_parameter, first_argument)) - -/* Solaris 10 declares renameat in , not in . */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (@GNULIB_RENAMEAT@ || defined GNULIB_POSIXCHECK) && defined __sun \ - && ! defined __GLIBC__ -# include -#endif - -/* MSVC declares 'perror' in , not in . We must include - it before we #define perror rpl_perror. */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (@GNULIB_PERROR@ || defined GNULIB_POSIXCHECK) \ - && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) \ - && ! defined __GLIBC__ -# include -#endif - -/* MSVC declares 'remove' in , not in . We must include - it before we #define remove rpl_remove. */ -/* MSVC declares 'rename' in , not in . We must include - it before we #define rename rpl_rename. */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (@GNULIB_REMOVE@ || @GNULIB_RENAME@ || defined GNULIB_POSIXCHECK) \ - && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) \ - && ! defined __GLIBC__ -# include -#endif - - -/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ - -/* The definition of _GL_ARG_NONNULL is copied here. */ - -/* The definition of _GL_WARN_ON_USE is copied here. */ - -/* Macros for stringification. */ -#define _GL_STDIO_STRINGIZE(token) #token -#define _GL_STDIO_MACROEXPAND_AND_STRINGIZE(token) _GL_STDIO_STRINGIZE(token) - -/* When also using extern inline, suppress the use of static inline in - standard headers of problematic Apple configurations, as Libc at - least through Libc-825.26 (2013-04-09) mishandles it; see, e.g., - . - Perhaps Apple will fix this some day. */ -#if (defined _GL_EXTERN_INLINE_IN_USE && defined __APPLE__ \ - && defined __GNUC__ && defined __STDC__) -# undef putc_unlocked -#endif - -#if @GNULIB_DPRINTF@ -# if @REPLACE_DPRINTF@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define dprintf rpl_dprintf -# endif -_GL_FUNCDECL_RPL (dprintf, int, (int fd, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (dprintf, int, (int fd, const char *format, ...)); -# else -# if !@HAVE_DPRINTF@ -_GL_FUNCDECL_SYS (dprintf, int, (int fd, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (dprintf, int, (int fd, const char *format, ...)); -# endif -_GL_CXXALIASWARN (dprintf); -#elif defined GNULIB_POSIXCHECK -# undef dprintf -# if HAVE_RAW_DECL_DPRINTF -_GL_WARN_ON_USE (dprintf, "dprintf is unportable - " - "use gnulib module dprintf for portability"); -# endif -#endif - -#if @GNULIB_FCLOSE@ -/* Close STREAM and its underlying file descriptor. */ -# if @REPLACE_FCLOSE@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define fclose rpl_fclose -# endif -_GL_FUNCDECL_RPL (fclose, int, (FILE *stream) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fclose, int, (FILE *stream)); -# else -_GL_CXXALIAS_SYS (fclose, int, (FILE *stream)); -# endif -_GL_CXXALIASWARN (fclose); -#elif defined GNULIB_POSIXCHECK -# undef fclose -/* Assume fclose is always declared. */ -_GL_WARN_ON_USE (fclose, "fclose is not always POSIX compliant - " - "use gnulib module fclose for portable POSIX compliance"); -#endif - -#if @GNULIB_FDOPEN@ -# if @REPLACE_FDOPEN@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fdopen -# define fdopen rpl_fdopen -# endif -_GL_FUNCDECL_RPL (fdopen, FILE *, (int fd, const char *mode) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (fdopen, FILE *, (int fd, const char *mode)); -# else -_GL_CXXALIAS_SYS (fdopen, FILE *, (int fd, const char *mode)); -# endif -_GL_CXXALIASWARN (fdopen); -#elif defined GNULIB_POSIXCHECK -# undef fdopen -/* Assume fdopen is always declared. */ -_GL_WARN_ON_USE (fdopen, "fdopen on native Windows platforms is not POSIX compliant - " - "use gnulib module fdopen for portability"); -#endif - -#if @GNULIB_FFLUSH@ -/* Flush all pending data on STREAM according to POSIX rules. Both - output and seekable input streams are supported. - Note! LOSS OF DATA can occur if fflush is applied on an input stream - that is _not_seekable_ or on an update stream that is _not_seekable_ - and in which the most recent operation was input. Seekability can - be tested with lseek(fileno(fp),0,SEEK_CUR). */ -# if @REPLACE_FFLUSH@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define fflush rpl_fflush -# endif -_GL_FUNCDECL_RPL (fflush, int, (FILE *gl_stream)); -_GL_CXXALIAS_RPL (fflush, int, (FILE *gl_stream)); -# else -_GL_CXXALIAS_SYS (fflush, int, (FILE *gl_stream)); -# endif -_GL_CXXALIASWARN (fflush); -#elif defined GNULIB_POSIXCHECK -# undef fflush -/* Assume fflush is always declared. */ -_GL_WARN_ON_USE (fflush, "fflush is not always POSIX compliant - " - "use gnulib module fflush for portable POSIX compliance"); -#endif - -#if @GNULIB_FGETC@ -# if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fgetc -# define fgetc rpl_fgetc -# endif -_GL_FUNCDECL_RPL (fgetc, int, (FILE *stream) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fgetc, int, (FILE *stream)); -# else -_GL_CXXALIAS_SYS (fgetc, int, (FILE *stream)); -# endif -_GL_CXXALIASWARN (fgetc); -#endif - -#if @GNULIB_FGETS@ -# if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fgets -# define fgets rpl_fgets -# endif -_GL_FUNCDECL_RPL (fgets, char *, (char *s, int n, FILE *stream) - _GL_ARG_NONNULL ((1, 3))); -_GL_CXXALIAS_RPL (fgets, char *, (char *s, int n, FILE *stream)); -# else -_GL_CXXALIAS_SYS (fgets, char *, (char *s, int n, FILE *stream)); -# endif -_GL_CXXALIASWARN (fgets); -#endif - -#if @GNULIB_FOPEN@ -# if @REPLACE_FOPEN@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fopen -# define fopen rpl_fopen -# endif -_GL_FUNCDECL_RPL (fopen, FILE *, (const char *filename, const char *mode) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (fopen, FILE *, (const char *filename, const char *mode)); -# else -_GL_CXXALIAS_SYS (fopen, FILE *, (const char *filename, const char *mode)); -# endif -_GL_CXXALIASWARN (fopen); -#elif defined GNULIB_POSIXCHECK -# undef fopen -/* Assume fopen is always declared. */ -_GL_WARN_ON_USE (fopen, "fopen on native Windows platforms is not POSIX compliant - " - "use gnulib module fopen for portability"); -#endif - -#if @GNULIB_FPRINTF_POSIX@ || @GNULIB_FPRINTF@ -# if (@GNULIB_FPRINTF_POSIX@ && @REPLACE_FPRINTF@) \ - || (@GNULIB_FPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@)) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define fprintf rpl_fprintf -# endif -# define GNULIB_overrides_fprintf 1 -# if @GNULIB_FPRINTF_POSIX@ || @GNULIB_VFPRINTF_POSIX@ -_GL_FUNCDECL_RPL (fprintf, int, (FILE *fp, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -# else -_GL_FUNCDECL_RPL (fprintf, int, (FILE *fp, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (2, 3) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_RPL (fprintf, int, (FILE *fp, const char *format, ...)); -# else -_GL_CXXALIAS_SYS (fprintf, int, (FILE *fp, const char *format, ...)); -# endif -_GL_CXXALIASWARN (fprintf); -#endif -#if !@GNULIB_FPRINTF_POSIX@ && defined GNULIB_POSIXCHECK -# if !GNULIB_overrides_fprintf -# undef fprintf -# endif -/* Assume fprintf is always declared. */ -_GL_WARN_ON_USE (fprintf, "fprintf is not always POSIX compliant - " - "use gnulib module fprintf-posix for portable " - "POSIX compliance"); -#endif - -#if @GNULIB_FPURGE@ -/* Discard all pending buffered I/O data on STREAM. - STREAM must not be wide-character oriented. - When discarding pending output, the file position is set back to where it - was before the write calls. When discarding pending input, the file - position is advanced to match the end of the previously read input. - Return 0 if successful. Upon error, return -1 and set errno. */ -# if @REPLACE_FPURGE@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define fpurge rpl_fpurge -# endif -_GL_FUNCDECL_RPL (fpurge, int, (FILE *gl_stream) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fpurge, int, (FILE *gl_stream)); -# else -# if !@HAVE_DECL_FPURGE@ -_GL_FUNCDECL_SYS (fpurge, int, (FILE *gl_stream) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (fpurge, int, (FILE *gl_stream)); -# endif -_GL_CXXALIASWARN (fpurge); -#elif defined GNULIB_POSIXCHECK -# undef fpurge -# if HAVE_RAW_DECL_FPURGE -_GL_WARN_ON_USE (fpurge, "fpurge is not always present - " - "use gnulib module fpurge for portability"); -# endif -#endif - -#if @GNULIB_FPUTC@ -# if @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fputc -# define fputc rpl_fputc -# endif -_GL_FUNCDECL_RPL (fputc, int, (int c, FILE *stream) _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (fputc, int, (int c, FILE *stream)); -# else -_GL_CXXALIAS_SYS (fputc, int, (int c, FILE *stream)); -# endif -_GL_CXXALIASWARN (fputc); -#endif - -#if @GNULIB_FPUTS@ -# if @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fputs -# define fputs rpl_fputs -# endif -_GL_FUNCDECL_RPL (fputs, int, (const char *string, FILE *stream) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (fputs, int, (const char *string, FILE *stream)); -# else -_GL_CXXALIAS_SYS (fputs, int, (const char *string, FILE *stream)); -# endif -_GL_CXXALIASWARN (fputs); -#endif - -#if @GNULIB_FREAD@ -# if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fread -# define fread rpl_fread -# endif -_GL_FUNCDECL_RPL (fread, size_t, (void *ptr, size_t s, size_t n, FILE *stream) - _GL_ARG_NONNULL ((4))); -_GL_CXXALIAS_RPL (fread, size_t, (void *ptr, size_t s, size_t n, FILE *stream)); -# else -_GL_CXXALIAS_SYS (fread, size_t, (void *ptr, size_t s, size_t n, FILE *stream)); -# endif -_GL_CXXALIASWARN (fread); -#endif - -#if @GNULIB_FREOPEN@ -# if @REPLACE_FREOPEN@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef freopen -# define freopen rpl_freopen -# endif -_GL_FUNCDECL_RPL (freopen, FILE *, - (const char *filename, const char *mode, FILE *stream) - _GL_ARG_NONNULL ((2, 3))); -_GL_CXXALIAS_RPL (freopen, FILE *, - (const char *filename, const char *mode, FILE *stream)); -# else -_GL_CXXALIAS_SYS (freopen, FILE *, - (const char *filename, const char *mode, FILE *stream)); -# endif -_GL_CXXALIASWARN (freopen); -#elif defined GNULIB_POSIXCHECK -# undef freopen -/* Assume freopen is always declared. */ -_GL_WARN_ON_USE (freopen, - "freopen on native Windows platforms is not POSIX compliant - " - "use gnulib module freopen for portability"); -#endif - -#if @GNULIB_FSCANF@ -# if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fscanf -# define fscanf rpl_fscanf -# endif -_GL_FUNCDECL_RPL (fscanf, int, (FILE *stream, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (2, 3) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (fscanf, int, (FILE *stream, const char *format, ...)); -# else -_GL_CXXALIAS_SYS (fscanf, int, (FILE *stream, const char *format, ...)); -# endif -_GL_CXXALIASWARN (fscanf); -#endif - - -/* Set up the following warnings, based on which modules are in use. - GNU Coding Standards discourage the use of fseek, since it imposes - an arbitrary limitation on some 32-bit hosts. Remember that the - fseek module depends on the fseeko module, so we only have three - cases to consider: - - 1. The developer is not using either module. Issue a warning under - GNULIB_POSIXCHECK for both functions, to remind them that both - functions have bugs on some systems. _GL_NO_LARGE_FILES has no - impact on this warning. - - 2. The developer is using both modules. They may be unaware of the - arbitrary limitations of fseek, so issue a warning under - GNULIB_POSIXCHECK. On the other hand, they may be using both - modules intentionally, so the developer can define - _GL_NO_LARGE_FILES in the compilation units where the use of fseek - is safe, to silence the warning. - - 3. The developer is using the fseeko module, but not fseek. Gnulib - guarantees that fseek will still work around platform bugs in that - case, but we presume that the developer is aware of the pitfalls of - fseek and was trying to avoid it, so issue a warning even when - GNULIB_POSIXCHECK is undefined. Again, _GL_NO_LARGE_FILES can be - defined to silence the warning in particular compilation units. - In C++ compilations with GNULIB_NAMESPACE, in order to avoid that - fseek gets defined as a macro, it is recommended that the developer - uses the fseek module, even if he is not calling the fseek function. - - Most gnulib clients that perform stream operations should fall into - category 3. */ - -#if @GNULIB_FSEEK@ -# if defined GNULIB_POSIXCHECK && !defined _GL_NO_LARGE_FILES -# define _GL_FSEEK_WARN /* Category 2, above. */ -# undef fseek -# endif -# if @REPLACE_FSEEK@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fseek -# define fseek rpl_fseek -# endif -_GL_FUNCDECL_RPL (fseek, int, (FILE *fp, long offset, int whence) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fseek, int, (FILE *fp, long offset, int whence)); -# else -_GL_CXXALIAS_SYS (fseek, int, (FILE *fp, long offset, int whence)); -# endif -_GL_CXXALIASWARN (fseek); -#endif - -#if @GNULIB_FSEEKO@ -# if !@GNULIB_FSEEK@ && !defined _GL_NO_LARGE_FILES -# define _GL_FSEEK_WARN /* Category 3, above. */ -# undef fseek -# endif -# if @REPLACE_FSEEKO@ -/* Provide an fseeko function that is aware of a preceding fflush(), and which - detects pipes. */ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fseeko -# define fseeko rpl_fseeko -# endif -_GL_FUNCDECL_RPL (fseeko, int, (FILE *fp, off_t offset, int whence) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fseeko, int, (FILE *fp, off_t offset, int whence)); -# else -# if ! @HAVE_DECL_FSEEKO@ -_GL_FUNCDECL_SYS (fseeko, int, (FILE *fp, off_t offset, int whence) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (fseeko, int, (FILE *fp, off_t offset, int whence)); -# endif -_GL_CXXALIASWARN (fseeko); -#elif defined GNULIB_POSIXCHECK -# define _GL_FSEEK_WARN /* Category 1, above. */ -# undef fseek -# undef fseeko -# if HAVE_RAW_DECL_FSEEKO -_GL_WARN_ON_USE (fseeko, "fseeko is unportable - " - "use gnulib module fseeko for portability"); -# endif -#endif - -#ifdef _GL_FSEEK_WARN -# undef _GL_FSEEK_WARN -/* Here, either fseek is undefined (but C89 guarantees that it is - declared), or it is defined as rpl_fseek (declared above). */ -_GL_WARN_ON_USE (fseek, "fseek cannot handle files larger than 4 GB " - "on 32-bit platforms - " - "use fseeko function for handling of large files"); -#endif - - -/* ftell, ftello. See the comments on fseek/fseeko. */ - -#if @GNULIB_FTELL@ -# if defined GNULIB_POSIXCHECK && !defined _GL_NO_LARGE_FILES -# define _GL_FTELL_WARN /* Category 2, above. */ -# undef ftell -# endif -# if @REPLACE_FTELL@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ftell -# define ftell rpl_ftell -# endif -_GL_FUNCDECL_RPL (ftell, long, (FILE *fp) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (ftell, long, (FILE *fp)); -# else -_GL_CXXALIAS_SYS (ftell, long, (FILE *fp)); -# endif -_GL_CXXALIASWARN (ftell); -#endif - -#if @GNULIB_FTELLO@ -# if !@GNULIB_FTELL@ && !defined _GL_NO_LARGE_FILES -# define _GL_FTELL_WARN /* Category 3, above. */ -# undef ftell -# endif -# if @REPLACE_FTELLO@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ftello -# define ftello rpl_ftello -# endif -_GL_FUNCDECL_RPL (ftello, off_t, (FILE *fp) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (ftello, off_t, (FILE *fp)); -# else -# if ! @HAVE_DECL_FTELLO@ -_GL_FUNCDECL_SYS (ftello, off_t, (FILE *fp) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (ftello, off_t, (FILE *fp)); -# endif -_GL_CXXALIASWARN (ftello); -#elif defined GNULIB_POSIXCHECK -# define _GL_FTELL_WARN /* Category 1, above. */ -# undef ftell -# undef ftello -# if HAVE_RAW_DECL_FTELLO -_GL_WARN_ON_USE (ftello, "ftello is unportable - " - "use gnulib module ftello for portability"); -# endif -#endif - -#ifdef _GL_FTELL_WARN -# undef _GL_FTELL_WARN -/* Here, either ftell is undefined (but C89 guarantees that it is - declared), or it is defined as rpl_ftell (declared above). */ -_GL_WARN_ON_USE (ftell, "ftell cannot handle files larger than 4 GB " - "on 32-bit platforms - " - "use ftello function for handling of large files"); -#endif - - -#if @GNULIB_FWRITE@ -# if @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fwrite -# define fwrite rpl_fwrite -# endif -_GL_FUNCDECL_RPL (fwrite, size_t, - (const void *ptr, size_t s, size_t n, FILE *stream) - _GL_ARG_NONNULL ((1, 4))); -_GL_CXXALIAS_RPL (fwrite, size_t, - (const void *ptr, size_t s, size_t n, FILE *stream)); -# else -_GL_CXXALIAS_SYS (fwrite, size_t, - (const void *ptr, size_t s, size_t n, FILE *stream)); - -/* Work around bug 11959 when fortifying glibc 2.4 through 2.15 - , - which sometimes causes an unwanted diagnostic for fwrite calls. - This affects only function declaration attributes under certain - versions of gcc and clang, and is not needed for C++. */ -# if (0 < __USE_FORTIFY_LEVEL \ - && __GLIBC__ == 2 && 4 <= __GLIBC_MINOR__ && __GLIBC_MINOR__ <= 15 \ - && 3 < __GNUC__ + (4 <= __GNUC_MINOR__) \ - && !defined __cplusplus) -# undef fwrite -# undef fwrite_unlocked -extern size_t __REDIRECT (rpl_fwrite, - (const void *__restrict, size_t, size_t, - FILE *__restrict), - fwrite); -extern size_t __REDIRECT (rpl_fwrite_unlocked, - (const void *__restrict, size_t, size_t, - FILE *__restrict), - fwrite_unlocked); -# define fwrite rpl_fwrite -# define fwrite_unlocked rpl_fwrite_unlocked -# endif -# endif -_GL_CXXALIASWARN (fwrite); -#endif - -#if @GNULIB_GETC@ -# if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef getc -# define getc rpl_fgetc -# endif -_GL_FUNCDECL_RPL (fgetc, int, (FILE *stream) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL_1 (getc, rpl_fgetc, int, (FILE *stream)); -# else -_GL_CXXALIAS_SYS (getc, int, (FILE *stream)); -# endif -_GL_CXXALIASWARN (getc); -#endif - -#if @GNULIB_GETCHAR@ -# if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef getchar -# define getchar rpl_getchar -# endif -_GL_FUNCDECL_RPL (getchar, int, (void)); -_GL_CXXALIAS_RPL (getchar, int, (void)); -# else -_GL_CXXALIAS_SYS (getchar, int, (void)); -# endif -_GL_CXXALIASWARN (getchar); -#endif - -#if @GNULIB_GETDELIM@ -/* Read input, up to (and including) the next occurrence of DELIMITER, from - STREAM, store it in *LINEPTR (and NUL-terminate it). - *LINEPTR is a pointer returned from malloc (or NULL), pointing to *LINESIZE - bytes of space. It is realloc'd as necessary. - Return the number of bytes read and stored at *LINEPTR (not including the - NUL terminator), or -1 on error or EOF. */ -# if @REPLACE_GETDELIM@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef getdelim -# define getdelim rpl_getdelim -# endif -_GL_FUNCDECL_RPL (getdelim, ssize_t, - (char **lineptr, size_t *linesize, int delimiter, - FILE *stream) - _GL_ARG_NONNULL ((1, 2, 4))); -_GL_CXXALIAS_RPL (getdelim, ssize_t, - (char **lineptr, size_t *linesize, int delimiter, - FILE *stream)); -# else -# if !@HAVE_DECL_GETDELIM@ -_GL_FUNCDECL_SYS (getdelim, ssize_t, - (char **lineptr, size_t *linesize, int delimiter, - FILE *stream) - _GL_ARG_NONNULL ((1, 2, 4))); -# endif -_GL_CXXALIAS_SYS (getdelim, ssize_t, - (char **lineptr, size_t *linesize, int delimiter, - FILE *stream)); -# endif -_GL_CXXALIASWARN (getdelim); -#elif defined GNULIB_POSIXCHECK -# undef getdelim -# if HAVE_RAW_DECL_GETDELIM -_GL_WARN_ON_USE (getdelim, "getdelim is unportable - " - "use gnulib module getdelim for portability"); -# endif -#endif - -#if @GNULIB_GETLINE@ -/* Read a line, up to (and including) the next newline, from STREAM, store it - in *LINEPTR (and NUL-terminate it). - *LINEPTR is a pointer returned from malloc (or NULL), pointing to *LINESIZE - bytes of space. It is realloc'd as necessary. - Return the number of bytes read and stored at *LINEPTR (not including the - NUL terminator), or -1 on error or EOF. */ -# if @REPLACE_GETLINE@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef getline -# define getline rpl_getline -# endif -_GL_FUNCDECL_RPL (getline, ssize_t, - (char **lineptr, size_t *linesize, FILE *stream) - _GL_ARG_NONNULL ((1, 2, 3))); -_GL_CXXALIAS_RPL (getline, ssize_t, - (char **lineptr, size_t *linesize, FILE *stream)); -# else -# if !@HAVE_DECL_GETLINE@ -_GL_FUNCDECL_SYS (getline, ssize_t, - (char **lineptr, size_t *linesize, FILE *stream) - _GL_ARG_NONNULL ((1, 2, 3))); -# endif -_GL_CXXALIAS_SYS (getline, ssize_t, - (char **lineptr, size_t *linesize, FILE *stream)); -# endif -# if @HAVE_DECL_GETLINE@ -_GL_CXXALIASWARN (getline); -# endif -#elif defined GNULIB_POSIXCHECK -# undef getline -# if HAVE_RAW_DECL_GETLINE -_GL_WARN_ON_USE (getline, "getline is unportable - " - "use gnulib module getline for portability"); -# endif -#endif - -/* It is very rare that the developer ever has full control of stdin, - so any use of gets warrants an unconditional warning; besides, C11 - removed it. */ -#undef gets -#if HAVE_RAW_DECL_GETS && !defined __cplusplus -_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); -#endif - -#if @GNULIB_OBSTACK_PRINTF@ || @GNULIB_OBSTACK_PRINTF_POSIX@ -struct obstack; -/* Grow an obstack with formatted output. Return the number of - bytes added to OBS. No trailing nul byte is added, and the - object should be closed with obstack_finish before use. Upon - memory allocation error, call obstack_alloc_failed_handler. Upon - other error, return -1. */ -# if @REPLACE_OBSTACK_PRINTF@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define obstack_printf rpl_obstack_printf -# endif -_GL_FUNCDECL_RPL (obstack_printf, int, - (struct obstack *obs, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (obstack_printf, int, - (struct obstack *obs, const char *format, ...)); -# else -# if !@HAVE_DECL_OBSTACK_PRINTF@ -_GL_FUNCDECL_SYS (obstack_printf, int, - (struct obstack *obs, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (obstack_printf, int, - (struct obstack *obs, const char *format, ...)); -# endif -_GL_CXXALIASWARN (obstack_printf); -# if @REPLACE_OBSTACK_PRINTF@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define obstack_vprintf rpl_obstack_vprintf -# endif -_GL_FUNCDECL_RPL (obstack_vprintf, int, - (struct obstack *obs, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (obstack_vprintf, int, - (struct obstack *obs, const char *format, va_list args)); -# else -# if !@HAVE_DECL_OBSTACK_PRINTF@ -_GL_FUNCDECL_SYS (obstack_vprintf, int, - (struct obstack *obs, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (obstack_vprintf, int, - (struct obstack *obs, const char *format, va_list args)); -# endif -_GL_CXXALIASWARN (obstack_vprintf); -#endif - -#if @GNULIB_PCLOSE@ -# if !@HAVE_PCLOSE@ -_GL_FUNCDECL_SYS (pclose, int, (FILE *stream) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (pclose, int, (FILE *stream)); -_GL_CXXALIASWARN (pclose); -#elif defined GNULIB_POSIXCHECK -# undef pclose -# if HAVE_RAW_DECL_PCLOSE -_GL_WARN_ON_USE (pclose, "pclose is unportable - " - "use gnulib module pclose for more portability"); -# endif -#endif - -#if @GNULIB_PERROR@ -/* Print a message to standard error, describing the value of ERRNO, - (if STRING is not NULL and not empty) prefixed with STRING and ": ", - and terminated with a newline. */ -# if @REPLACE_PERROR@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define perror rpl_perror -# endif -_GL_FUNCDECL_RPL (perror, void, (const char *string)); -_GL_CXXALIAS_RPL (perror, void, (const char *string)); -# else -_GL_CXXALIAS_SYS (perror, void, (const char *string)); -# endif -_GL_CXXALIASWARN (perror); -#elif defined GNULIB_POSIXCHECK -# undef perror -/* Assume perror is always declared. */ -_GL_WARN_ON_USE (perror, "perror is not always POSIX compliant - " - "use gnulib module perror for portability"); -#endif - -#if @GNULIB_POPEN@ -# if @REPLACE_POPEN@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef popen -# define popen rpl_popen -# endif -_GL_FUNCDECL_RPL (popen, FILE *, (const char *cmd, const char *mode) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (popen, FILE *, (const char *cmd, const char *mode)); -# else -# if !@HAVE_POPEN@ -_GL_FUNCDECL_SYS (popen, FILE *, (const char *cmd, const char *mode) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (popen, FILE *, (const char *cmd, const char *mode)); -# endif -_GL_CXXALIASWARN (popen); -#elif defined GNULIB_POSIXCHECK -# undef popen -# if HAVE_RAW_DECL_POPEN -_GL_WARN_ON_USE (popen, "popen is buggy on some platforms - " - "use gnulib module popen or pipe for more portability"); -# endif -#endif - -#if @GNULIB_PRINTF_POSIX@ || @GNULIB_PRINTF@ -# if (@GNULIB_PRINTF_POSIX@ && @REPLACE_PRINTF@) \ - || (@GNULIB_PRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@)) -# if defined __GNUC__ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -/* Don't break __attribute__((format(printf,M,N))). */ -# define printf __printf__ -# endif -# if @GNULIB_PRINTF_POSIX@ || @GNULIB_VFPRINTF_POSIX@ -_GL_FUNCDECL_RPL_1 (__printf__, int, - (const char *format, ...) - __asm__ (@ASM_SYMBOL_PREFIX@ - _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_printf)) - _GL_ATTRIBUTE_FORMAT_PRINTF (1, 2) - _GL_ARG_NONNULL ((1))); -# else -_GL_FUNCDECL_RPL_1 (__printf__, int, - (const char *format, ...) - __asm__ (@ASM_SYMBOL_PREFIX@ - _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_printf)) - _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (1, 2) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_RPL_1 (printf, __printf__, int, (const char *format, ...)); -# else -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define printf rpl_printf -# endif -_GL_FUNCDECL_RPL (printf, int, - (const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (1, 2) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (printf, int, (const char *format, ...)); -# endif -# define GNULIB_overrides_printf 1 -# else -_GL_CXXALIAS_SYS (printf, int, (const char *format, ...)); -# endif -_GL_CXXALIASWARN (printf); -#endif -#if !@GNULIB_PRINTF_POSIX@ && defined GNULIB_POSIXCHECK -# if !GNULIB_overrides_printf -# undef printf -# endif -/* Assume printf is always declared. */ -_GL_WARN_ON_USE (printf, "printf is not always POSIX compliant - " - "use gnulib module printf-posix for portable " - "POSIX compliance"); -#endif - -#if @GNULIB_PUTC@ -# if @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef putc -# define putc rpl_fputc -# endif -_GL_FUNCDECL_RPL (fputc, int, (int c, FILE *stream) _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL_1 (putc, rpl_fputc, int, (int c, FILE *stream)); -# else -_GL_CXXALIAS_SYS (putc, int, (int c, FILE *stream)); -# endif -_GL_CXXALIASWARN (putc); -#endif - -#if @GNULIB_PUTCHAR@ -# if @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef putchar -# define putchar rpl_putchar -# endif -_GL_FUNCDECL_RPL (putchar, int, (int c)); -_GL_CXXALIAS_RPL (putchar, int, (int c)); -# else -_GL_CXXALIAS_SYS (putchar, int, (int c)); -# endif -_GL_CXXALIASWARN (putchar); -#endif - -#if @GNULIB_PUTS@ -# if @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef puts -# define puts rpl_puts -# endif -_GL_FUNCDECL_RPL (puts, int, (const char *string) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (puts, int, (const char *string)); -# else -_GL_CXXALIAS_SYS (puts, int, (const char *string)); -# endif -_GL_CXXALIASWARN (puts); -#endif - -#if @GNULIB_REMOVE@ -# if @REPLACE_REMOVE@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef remove -# define remove rpl_remove -# endif -_GL_FUNCDECL_RPL (remove, int, (const char *name) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (remove, int, (const char *name)); -# else -_GL_CXXALIAS_SYS (remove, int, (const char *name)); -# endif -_GL_CXXALIASWARN (remove); -#elif defined GNULIB_POSIXCHECK -# undef remove -/* Assume remove is always declared. */ -_GL_WARN_ON_USE (remove, "remove cannot handle directories on some platforms - " - "use gnulib module remove for more portability"); -#endif - -#if @GNULIB_RENAME@ -# if @REPLACE_RENAME@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef rename -# define rename rpl_rename -# endif -_GL_FUNCDECL_RPL (rename, int, - (const char *old_filename, const char *new_filename) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (rename, int, - (const char *old_filename, const char *new_filename)); -# else -_GL_CXXALIAS_SYS (rename, int, - (const char *old_filename, const char *new_filename)); -# endif -_GL_CXXALIASWARN (rename); -#elif defined GNULIB_POSIXCHECK -# undef rename -/* Assume rename is always declared. */ -_GL_WARN_ON_USE (rename, "rename is buggy on some platforms - " - "use gnulib module rename for more portability"); -#endif - -#if @GNULIB_RENAMEAT@ -# if @REPLACE_RENAMEAT@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef renameat -# define renameat rpl_renameat -# endif -_GL_FUNCDECL_RPL (renameat, int, - (int fd1, char const *file1, int fd2, char const *file2) - _GL_ARG_NONNULL ((2, 4))); -_GL_CXXALIAS_RPL (renameat, int, - (int fd1, char const *file1, int fd2, char const *file2)); -# else -# if !@HAVE_RENAMEAT@ -_GL_FUNCDECL_SYS (renameat, int, - (int fd1, char const *file1, int fd2, char const *file2) - _GL_ARG_NONNULL ((2, 4))); -# endif -_GL_CXXALIAS_SYS (renameat, int, - (int fd1, char const *file1, int fd2, char const *file2)); -# endif -_GL_CXXALIASWARN (renameat); -#elif defined GNULIB_POSIXCHECK -# undef renameat -# if HAVE_RAW_DECL_RENAMEAT -_GL_WARN_ON_USE (renameat, "renameat is not portable - " - "use gnulib module renameat for portability"); -# endif -#endif - -#if @GNULIB_SCANF@ -# if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@ -# if defined __GNUC__ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef scanf -/* Don't break __attribute__((format(scanf,M,N))). */ -# define scanf __scanf__ -# endif -_GL_FUNCDECL_RPL_1 (__scanf__, int, - (const char *format, ...) - __asm__ (@ASM_SYMBOL_PREFIX@ - _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_scanf)) - _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (1, 2) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL_1 (scanf, __scanf__, int, (const char *format, ...)); -# else -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef scanf -# define scanf rpl_scanf -# endif -_GL_FUNCDECL_RPL (scanf, int, (const char *format, ...) - _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (1, 2) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (scanf, int, (const char *format, ...)); -# endif -# else -_GL_CXXALIAS_SYS (scanf, int, (const char *format, ...)); -# endif -_GL_CXXALIASWARN (scanf); -#endif - -#if @GNULIB_SNPRINTF@ -# if @REPLACE_SNPRINTF@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define snprintf rpl_snprintf -# endif -_GL_FUNCDECL_RPL (snprintf, int, - (char *str, size_t size, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 4) - _GL_ARG_NONNULL ((3))); -_GL_CXXALIAS_RPL (snprintf, int, - (char *str, size_t size, const char *format, ...)); -# else -# if !@HAVE_DECL_SNPRINTF@ -_GL_FUNCDECL_SYS (snprintf, int, - (char *str, size_t size, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 4) - _GL_ARG_NONNULL ((3))); -# endif -_GL_CXXALIAS_SYS (snprintf, int, - (char *str, size_t size, const char *format, ...)); -# endif -_GL_CXXALIASWARN (snprintf); -#elif defined GNULIB_POSIXCHECK -# undef snprintf -# if HAVE_RAW_DECL_SNPRINTF -_GL_WARN_ON_USE (snprintf, "snprintf is unportable - " - "use gnulib module snprintf for portability"); -# endif -#endif - -/* Some people would argue that all sprintf uses should be warned about - (for example, OpenBSD issues a link warning for it), - since it can cause security holes due to buffer overruns. - However, we believe that sprintf can be used safely, and is more - efficient than snprintf in those safe cases; and as proof of our - belief, we use sprintf in several gnulib modules. So this header - intentionally avoids adding a warning to sprintf except when - GNULIB_POSIXCHECK is defined. */ - -#if @GNULIB_SPRINTF_POSIX@ -# if @REPLACE_SPRINTF@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define sprintf rpl_sprintf -# endif -_GL_FUNCDECL_RPL (sprintf, int, (char *str, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (sprintf, int, (char *str, const char *format, ...)); -# else -_GL_CXXALIAS_SYS (sprintf, int, (char *str, const char *format, ...)); -# endif -_GL_CXXALIASWARN (sprintf); -#elif defined GNULIB_POSIXCHECK -# undef sprintf -/* Assume sprintf is always declared. */ -_GL_WARN_ON_USE (sprintf, "sprintf is not always POSIX compliant - " - "use gnulib module sprintf-posix for portable " - "POSIX compliance"); -#endif - -#if @GNULIB_TMPFILE@ -# if @REPLACE_TMPFILE@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define tmpfile rpl_tmpfile -# endif -_GL_FUNCDECL_RPL (tmpfile, FILE *, (void)); -_GL_CXXALIAS_RPL (tmpfile, FILE *, (void)); -# else -_GL_CXXALIAS_SYS (tmpfile, FILE *, (void)); -# endif -_GL_CXXALIASWARN (tmpfile); -#elif defined GNULIB_POSIXCHECK -# undef tmpfile -# if HAVE_RAW_DECL_TMPFILE -_GL_WARN_ON_USE (tmpfile, "tmpfile is not usable on mingw - " - "use gnulib module tmpfile for portability"); -# endif -#endif - -#if @GNULIB_VASPRINTF@ -/* Write formatted output to a string dynamically allocated with malloc(). - If the memory allocation succeeds, store the address of the string in - *RESULT and return the number of resulting bytes, excluding the trailing - NUL. Upon memory allocation error, or some other error, return -1. */ -# if @REPLACE_VASPRINTF@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define asprintf rpl_asprintf -# endif -_GL_FUNCDECL_RPL (asprintf, int, - (char **result, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (asprintf, int, - (char **result, const char *format, ...)); -# else -# if !@HAVE_VASPRINTF@ -_GL_FUNCDECL_SYS (asprintf, int, - (char **result, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (asprintf, int, - (char **result, const char *format, ...)); -# endif -_GL_CXXALIASWARN (asprintf); -# if @REPLACE_VASPRINTF@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vasprintf rpl_vasprintf -# endif -_GL_FUNCDECL_RPL (vasprintf, int, - (char **result, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (vasprintf, int, - (char **result, const char *format, va_list args)); -# else -# if !@HAVE_VASPRINTF@ -_GL_FUNCDECL_SYS (vasprintf, int, - (char **result, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (vasprintf, int, - (char **result, const char *format, va_list args)); -# endif -_GL_CXXALIASWARN (vasprintf); -#endif - -#if @GNULIB_VDPRINTF@ -# if @REPLACE_VDPRINTF@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vdprintf rpl_vdprintf -# endif -_GL_FUNCDECL_RPL (vdprintf, int, (int fd, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (vdprintf, int, (int fd, const char *format, va_list args)); -# else -# if !@HAVE_VDPRINTF@ -_GL_FUNCDECL_SYS (vdprintf, int, (int fd, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((2))); -# endif -/* Need to cast, because on Solaris, the third parameter will likely be - __va_list args. */ -_GL_CXXALIAS_SYS_CAST (vdprintf, int, - (int fd, const char *format, va_list args)); -# endif -_GL_CXXALIASWARN (vdprintf); -#elif defined GNULIB_POSIXCHECK -# undef vdprintf -# if HAVE_RAW_DECL_VDPRINTF -_GL_WARN_ON_USE (vdprintf, "vdprintf is unportable - " - "use gnulib module vdprintf for portability"); -# endif -#endif - -#if @GNULIB_VFPRINTF_POSIX@ || @GNULIB_VFPRINTF@ -# if (@GNULIB_VFPRINTF_POSIX@ && @REPLACE_VFPRINTF@) \ - || (@GNULIB_VFPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@)) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vfprintf rpl_vfprintf -# endif -# define GNULIB_overrides_vfprintf 1 -# if @GNULIB_VFPRINTF_POSIX@ -_GL_FUNCDECL_RPL (vfprintf, int, (FILE *fp, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -# else -_GL_FUNCDECL_RPL (vfprintf, int, (FILE *fp, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (2, 0) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_RPL (vfprintf, int, (FILE *fp, const char *format, va_list args)); -# else -/* Need to cast, because on Solaris, the third parameter is - __va_list args - and GCC's fixincludes did not change this to __gnuc_va_list. */ -_GL_CXXALIAS_SYS_CAST (vfprintf, int, - (FILE *fp, const char *format, va_list args)); -# endif -_GL_CXXALIASWARN (vfprintf); -#endif -#if !@GNULIB_VFPRINTF_POSIX@ && defined GNULIB_POSIXCHECK -# if !GNULIB_overrides_vfprintf -# undef vfprintf -# endif -/* Assume vfprintf is always declared. */ -_GL_WARN_ON_USE (vfprintf, "vfprintf is not always POSIX compliant - " - "use gnulib module vfprintf-posix for portable " - "POSIX compliance"); -#endif - -#if @GNULIB_VFSCANF@ -# if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef vfscanf -# define vfscanf rpl_vfscanf -# endif -_GL_FUNCDECL_RPL (vfscanf, int, - (FILE *stream, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (2, 0) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (vfscanf, int, - (FILE *stream, const char *format, va_list args)); -# else -_GL_CXXALIAS_SYS (vfscanf, int, - (FILE *stream, const char *format, va_list args)); -# endif -_GL_CXXALIASWARN (vfscanf); -#endif - -#if @GNULIB_VPRINTF_POSIX@ || @GNULIB_VPRINTF@ -# if (@GNULIB_VPRINTF_POSIX@ && @REPLACE_VPRINTF@) \ - || (@GNULIB_VPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@)) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vprintf rpl_vprintf -# endif -# define GNULIB_overrides_vprintf 1 -# if @GNULIB_VPRINTF_POSIX@ || @GNULIB_VFPRINTF_POSIX@ -_GL_FUNCDECL_RPL (vprintf, int, (const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (1, 0) - _GL_ARG_NONNULL ((1))); -# else -_GL_FUNCDECL_RPL (vprintf, int, (const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (1, 0) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_RPL (vprintf, int, (const char *format, va_list args)); -# else -/* Need to cast, because on Solaris, the second parameter is - __va_list args - and GCC's fixincludes did not change this to __gnuc_va_list. */ -_GL_CXXALIAS_SYS_CAST (vprintf, int, (const char *format, va_list args)); -# endif -_GL_CXXALIASWARN (vprintf); -#endif -#if !@GNULIB_VPRINTF_POSIX@ && defined GNULIB_POSIXCHECK -# if !GNULIB_overrides_vprintf -# undef vprintf -# endif -/* Assume vprintf is always declared. */ -_GL_WARN_ON_USE (vprintf, "vprintf is not always POSIX compliant - " - "use gnulib module vprintf-posix for portable " - "POSIX compliance"); -#endif - -#if @GNULIB_VSCANF@ -# if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef vscanf -# define vscanf rpl_vscanf -# endif -_GL_FUNCDECL_RPL (vscanf, int, (const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (1, 0) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (vscanf, int, (const char *format, va_list args)); -# else -_GL_CXXALIAS_SYS (vscanf, int, (const char *format, va_list args)); -# endif -_GL_CXXALIASWARN (vscanf); -#endif - -#if @GNULIB_VSNPRINTF@ -# if @REPLACE_VSNPRINTF@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vsnprintf rpl_vsnprintf -# endif -_GL_FUNCDECL_RPL (vsnprintf, int, - (char *str, size_t size, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 0) - _GL_ARG_NONNULL ((3))); -_GL_CXXALIAS_RPL (vsnprintf, int, - (char *str, size_t size, const char *format, va_list args)); -# else -# if !@HAVE_DECL_VSNPRINTF@ -_GL_FUNCDECL_SYS (vsnprintf, int, - (char *str, size_t size, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 0) - _GL_ARG_NONNULL ((3))); -# endif -_GL_CXXALIAS_SYS (vsnprintf, int, - (char *str, size_t size, const char *format, va_list args)); -# endif -_GL_CXXALIASWARN (vsnprintf); -#elif defined GNULIB_POSIXCHECK -# undef vsnprintf -# if HAVE_RAW_DECL_VSNPRINTF -_GL_WARN_ON_USE (vsnprintf, "vsnprintf is unportable - " - "use gnulib module vsnprintf for portability"); -# endif -#endif - -#if @GNULIB_VSPRINTF_POSIX@ -# if @REPLACE_VSPRINTF@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vsprintf rpl_vsprintf -# endif -_GL_FUNCDECL_RPL (vsprintf, int, - (char *str, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (vsprintf, int, - (char *str, const char *format, va_list args)); -# else -/* Need to cast, because on Solaris, the third parameter is - __va_list args - and GCC's fixincludes did not change this to __gnuc_va_list. */ -_GL_CXXALIAS_SYS_CAST (vsprintf, int, - (char *str, const char *format, va_list args)); -# endif -_GL_CXXALIASWARN (vsprintf); -#elif defined GNULIB_POSIXCHECK -# undef vsprintf -/* Assume vsprintf is always declared. */ -_GL_WARN_ON_USE (vsprintf, "vsprintf is not always POSIX compliant - " - "use gnulib module vsprintf-posix for portable " - "POSIX compliance"); -#endif - -#endif /* _@GUARD_PREFIX@_STDIO_H */ -#endif /* _@GUARD_PREFIX@_STDIO_H */ -#endif diff --git a/gl/stdlib.in.h b/gl/stdlib.in.h deleted file mode 100644 index b5cf9d3..0000000 --- a/gl/stdlib.in.h +++ /dev/null @@ -1,992 +0,0 @@ -/* A GNU-like . - - Copyright (C) 1995, 2001-2004, 2006-2017 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#if __GNUC__ >= 3 -@PRAGMA_SYSTEM_HEADER@ -#endif -@PRAGMA_COLUMNS@ - -#if defined __need_system_stdlib_h || defined __need_malloc_and_calloc -/* Special invocation conventions inside some gnulib header files, - and inside some glibc header files, respectively. */ - -#@INCLUDE_NEXT@ @NEXT_STDLIB_H@ - -#else -/* Normal invocation convention. */ - -#ifndef _@GUARD_PREFIX@_STDLIB_H - -/* The include_next requires a split double-inclusion guard. */ -#@INCLUDE_NEXT@ @NEXT_STDLIB_H@ - -#ifndef _@GUARD_PREFIX@_STDLIB_H -#define _@GUARD_PREFIX@_STDLIB_H - -/* NetBSD 5.0 mis-defines NULL. */ -#include - -/* MirBSD 10 defines WEXITSTATUS in , not in . */ -#if @GNULIB_SYSTEM_POSIX@ && !defined WEXITSTATUS -# include -#endif - -/* Solaris declares getloadavg() in . */ -#if (@GNULIB_GETLOADAVG@ || defined GNULIB_POSIXCHECK) && @HAVE_SYS_LOADAVG_H@ -# include -#endif - -/* Native Windows platforms declare mktemp() in . */ -#if 0 && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) -# include -#endif - -#if @GNULIB_RANDOM_R@ - -/* OSF/1 5.1 declares 'struct random_data' in , which is included - from if _REENTRANT is defined. Include it whenever we need - 'struct random_data'. */ -# if @HAVE_RANDOM_H@ -# include -# endif - -# if !@HAVE_STRUCT_RANDOM_DATA@ || @REPLACE_RANDOM_R@ || !@HAVE_RANDOM_R@ -# include -# endif - -# if !@HAVE_STRUCT_RANDOM_DATA@ -/* Define 'struct random_data'. - But allow multiple gnulib generated replacements to coexist. */ -# if !GNULIB_defined_struct_random_data -struct random_data -{ - int32_t *fptr; /* Front pointer. */ - int32_t *rptr; /* Rear pointer. */ - int32_t *state; /* Array of state values. */ - int rand_type; /* Type of random number generator. */ - int rand_deg; /* Degree of random number generator. */ - int rand_sep; /* Distance between front and rear. */ - int32_t *end_ptr; /* Pointer behind state table. */ -}; -# define GNULIB_defined_struct_random_data 1 -# endif -# endif -#endif - -#if (@GNULIB_MKSTEMP@ || @GNULIB_MKSTEMPS@ || @GNULIB_GETSUBOPT@ || defined GNULIB_POSIXCHECK) && ! defined __GLIBC__ && !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) -/* On Mac OS X 10.3, only declares mkstemp. */ -/* On Mac OS X 10.5, only declares mkstemps. */ -/* On Cygwin 1.7.1, only declares getsubopt. */ -/* But avoid namespace pollution on glibc systems and native Windows. */ -# include -#endif - -/* The __attribute__ feature is available in gcc versions 2.5 and later. - The attribute __pure__ was added in gcc 2.96. */ -#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) -# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) -#else -# define _GL_ATTRIBUTE_PURE /* empty */ -#endif - -/* The definition of _Noreturn is copied here. */ - -/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ - -/* The definition of _GL_ARG_NONNULL is copied here. */ - -/* The definition of _GL_WARN_ON_USE is copied here. */ - - -/* Some systems do not define EXIT_*, despite otherwise supporting C89. */ -#ifndef EXIT_SUCCESS -# define EXIT_SUCCESS 0 -#endif -/* Tandem/NSK and other platforms that define EXIT_FAILURE as -1 interfere - with proper operation of xargs. */ -#ifndef EXIT_FAILURE -# define EXIT_FAILURE 1 -#elif EXIT_FAILURE != 1 -# undef EXIT_FAILURE -# define EXIT_FAILURE 1 -#endif - - -#if @GNULIB__EXIT@ -/* Terminate the current process with the given return code, without running - the 'atexit' handlers. */ -# if !@HAVE__EXIT@ -_GL_FUNCDECL_SYS (_Exit, _Noreturn void, (int status)); -# endif -_GL_CXXALIAS_SYS (_Exit, void, (int status)); -_GL_CXXALIASWARN (_Exit); -#elif defined GNULIB_POSIXCHECK -# undef _Exit -# if HAVE_RAW_DECL__EXIT -_GL_WARN_ON_USE (_Exit, "_Exit is unportable - " - "use gnulib module _Exit for portability"); -# endif -#endif - - -#if @GNULIB_ATOLL@ -/* Parse a signed decimal integer. - Returns the value of the integer. Errors are not detected. */ -# if !@HAVE_ATOLL@ -_GL_FUNCDECL_SYS (atoll, long long, (const char *string) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (atoll, long long, (const char *string)); -_GL_CXXALIASWARN (atoll); -#elif defined GNULIB_POSIXCHECK -# undef atoll -# if HAVE_RAW_DECL_ATOLL -_GL_WARN_ON_USE (atoll, "atoll is unportable - " - "use gnulib module atoll for portability"); -# endif -#endif - -#if @GNULIB_CALLOC_POSIX@ -# if @REPLACE_CALLOC@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef calloc -# define calloc rpl_calloc -# endif -_GL_FUNCDECL_RPL (calloc, void *, (size_t nmemb, size_t size)); -_GL_CXXALIAS_RPL (calloc, void *, (size_t nmemb, size_t size)); -# else -_GL_CXXALIAS_SYS (calloc, void *, (size_t nmemb, size_t size)); -# endif -_GL_CXXALIASWARN (calloc); -#elif defined GNULIB_POSIXCHECK -# undef calloc -/* Assume calloc is always declared. */ -_GL_WARN_ON_USE (calloc, "calloc is not POSIX compliant everywhere - " - "use gnulib module calloc-posix for portability"); -#endif - -#if @GNULIB_CANONICALIZE_FILE_NAME@ -# if @REPLACE_CANONICALIZE_FILE_NAME@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define canonicalize_file_name rpl_canonicalize_file_name -# endif -_GL_FUNCDECL_RPL (canonicalize_file_name, char *, (const char *name) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (canonicalize_file_name, char *, (const char *name)); -# else -# if !@HAVE_CANONICALIZE_FILE_NAME@ -_GL_FUNCDECL_SYS (canonicalize_file_name, char *, (const char *name) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (canonicalize_file_name, char *, (const char *name)); -# endif -_GL_CXXALIASWARN (canonicalize_file_name); -#elif defined GNULIB_POSIXCHECK -# undef canonicalize_file_name -# if HAVE_RAW_DECL_CANONICALIZE_FILE_NAME -_GL_WARN_ON_USE (canonicalize_file_name, - "canonicalize_file_name is unportable - " - "use gnulib module canonicalize-lgpl for portability"); -# endif -#endif - -#if @GNULIB_GETLOADAVG@ -/* Store max(NELEM,3) load average numbers in LOADAVG[]. - The three numbers are the load average of the last 1 minute, the last 5 - minutes, and the last 15 minutes, respectively. - LOADAVG is an array of NELEM numbers. */ -# if !@HAVE_DECL_GETLOADAVG@ -_GL_FUNCDECL_SYS (getloadavg, int, (double loadavg[], int nelem) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (getloadavg, int, (double loadavg[], int nelem)); -_GL_CXXALIASWARN (getloadavg); -#elif defined GNULIB_POSIXCHECK -# undef getloadavg -# if HAVE_RAW_DECL_GETLOADAVG -_GL_WARN_ON_USE (getloadavg, "getloadavg is not portable - " - "use gnulib module getloadavg for portability"); -# endif -#endif - -#if @GNULIB_GETSUBOPT@ -/* Assuming *OPTIONP is a comma separated list of elements of the form - "token" or "token=value", getsubopt parses the first of these elements. - If the first element refers to a "token" that is member of the given - NULL-terminated array of tokens: - - It replaces the comma with a NUL byte, updates *OPTIONP to point past - the first option and the comma, sets *VALUEP to the value of the - element (or NULL if it doesn't contain an "=" sign), - - It returns the index of the "token" in the given array of tokens. - Otherwise it returns -1, and *OPTIONP and *VALUEP are undefined. - For more details see the POSIX:2001 specification. - http://www.opengroup.org/susv3xsh/getsubopt.html */ -# if !@HAVE_GETSUBOPT@ -_GL_FUNCDECL_SYS (getsubopt, int, - (char **optionp, char *const *tokens, char **valuep) - _GL_ARG_NONNULL ((1, 2, 3))); -# endif -_GL_CXXALIAS_SYS (getsubopt, int, - (char **optionp, char *const *tokens, char **valuep)); -_GL_CXXALIASWARN (getsubopt); -#elif defined GNULIB_POSIXCHECK -# undef getsubopt -# if HAVE_RAW_DECL_GETSUBOPT -_GL_WARN_ON_USE (getsubopt, "getsubopt is unportable - " - "use gnulib module getsubopt for portability"); -# endif -#endif - -#if @GNULIB_GRANTPT@ -/* Change the ownership and access permission of the slave side of the - pseudo-terminal whose master side is specified by FD. */ -# if !@HAVE_GRANTPT@ -_GL_FUNCDECL_SYS (grantpt, int, (int fd)); -# endif -_GL_CXXALIAS_SYS (grantpt, int, (int fd)); -_GL_CXXALIASWARN (grantpt); -#elif defined GNULIB_POSIXCHECK -# undef grantpt -# if HAVE_RAW_DECL_GRANTPT -_GL_WARN_ON_USE (grantpt, "grantpt is not portable - " - "use gnulib module grantpt for portability"); -# endif -#endif - -/* If _GL_USE_STDLIB_ALLOC is nonzero, the including module does not - rely on GNU or POSIX semantics for malloc and realloc (for example, - by never specifying a zero size), so it does not need malloc or - realloc to be redefined. */ -#if @GNULIB_MALLOC_POSIX@ -# if @REPLACE_MALLOC@ -# if !((defined __cplusplus && defined GNULIB_NAMESPACE) \ - || _GL_USE_STDLIB_ALLOC) -# undef malloc -# define malloc rpl_malloc -# endif -_GL_FUNCDECL_RPL (malloc, void *, (size_t size)); -_GL_CXXALIAS_RPL (malloc, void *, (size_t size)); -# else -_GL_CXXALIAS_SYS (malloc, void *, (size_t size)); -# endif -_GL_CXXALIASWARN (malloc); -#elif defined GNULIB_POSIXCHECK && !_GL_USE_STDLIB_ALLOC -# undef malloc -/* Assume malloc is always declared. */ -_GL_WARN_ON_USE (malloc, "malloc is not POSIX compliant everywhere - " - "use gnulib module malloc-posix for portability"); -#endif - -/* Convert a multibyte character to a wide character. */ -#if @GNULIB_MBTOWC@ -# if @REPLACE_MBTOWC@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef mbtowc -# define mbtowc rpl_mbtowc -# endif -_GL_FUNCDECL_RPL (mbtowc, int, (wchar_t *pwc, const char *s, size_t n)); -_GL_CXXALIAS_RPL (mbtowc, int, (wchar_t *pwc, const char *s, size_t n)); -# else -_GL_CXXALIAS_SYS (mbtowc, int, (wchar_t *pwc, const char *s, size_t n)); -# endif -_GL_CXXALIASWARN (mbtowc); -#endif - -#if @GNULIB_MKDTEMP@ -/* Create a unique temporary directory from TEMPLATE. - The last six characters of TEMPLATE must be "XXXXXX"; - they are replaced with a string that makes the directory name unique. - Returns TEMPLATE, or a null pointer if it cannot get a unique name. - The directory is created mode 700. */ -# if !@HAVE_MKDTEMP@ -_GL_FUNCDECL_SYS (mkdtemp, char *, (char * /*template*/) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (mkdtemp, char *, (char * /*template*/)); -_GL_CXXALIASWARN (mkdtemp); -#elif defined GNULIB_POSIXCHECK -# undef mkdtemp -# if HAVE_RAW_DECL_MKDTEMP -_GL_WARN_ON_USE (mkdtemp, "mkdtemp is unportable - " - "use gnulib module mkdtemp for portability"); -# endif -#endif - -#if @GNULIB_MKOSTEMP@ -/* Create a unique temporary file from TEMPLATE. - The last six characters of TEMPLATE must be "XXXXXX"; - they are replaced with a string that makes the file name unique. - The flags are a bitmask, possibly including O_CLOEXEC (defined in ) - and O_TEXT, O_BINARY (defined in "binary-io.h"). - The file is then created, with the specified flags, ensuring it didn't exist - before. - The file is created read-write (mask at least 0600 & ~umask), but it may be - world-readable and world-writable (mask 0666 & ~umask), depending on the - implementation. - Returns the open file descriptor if successful, otherwise -1 and errno - set. */ -# if !@HAVE_MKOSTEMP@ -_GL_FUNCDECL_SYS (mkostemp, int, (char * /*template*/, int /*flags*/) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (mkostemp, int, (char * /*template*/, int /*flags*/)); -_GL_CXXALIASWARN (mkostemp); -#elif defined GNULIB_POSIXCHECK -# undef mkostemp -# if HAVE_RAW_DECL_MKOSTEMP -_GL_WARN_ON_USE (mkostemp, "mkostemp is unportable - " - "use gnulib module mkostemp for portability"); -# endif -#endif - -#if @GNULIB_MKOSTEMPS@ -/* Create a unique temporary file from TEMPLATE. - The last six characters of TEMPLATE before a suffix of length - SUFFIXLEN must be "XXXXXX"; - they are replaced with a string that makes the file name unique. - The flags are a bitmask, possibly including O_CLOEXEC (defined in ) - and O_TEXT, O_BINARY (defined in "binary-io.h"). - The file is then created, with the specified flags, ensuring it didn't exist - before. - The file is created read-write (mask at least 0600 & ~umask), but it may be - world-readable and world-writable (mask 0666 & ~umask), depending on the - implementation. - Returns the open file descriptor if successful, otherwise -1 and errno - set. */ -# if !@HAVE_MKOSTEMPS@ -_GL_FUNCDECL_SYS (mkostemps, int, - (char * /*template*/, int /*suffixlen*/, int /*flags*/) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (mkostemps, int, - (char * /*template*/, int /*suffixlen*/, int /*flags*/)); -_GL_CXXALIASWARN (mkostemps); -#elif defined GNULIB_POSIXCHECK -# undef mkostemps -# if HAVE_RAW_DECL_MKOSTEMPS -_GL_WARN_ON_USE (mkostemps, "mkostemps is unportable - " - "use gnulib module mkostemps for portability"); -# endif -#endif - -#if @GNULIB_MKSTEMP@ -/* Create a unique temporary file from TEMPLATE. - The last six characters of TEMPLATE must be "XXXXXX"; - they are replaced with a string that makes the file name unique. - The file is then created, ensuring it didn't exist before. - The file is created read-write (mask at least 0600 & ~umask), but it may be - world-readable and world-writable (mask 0666 & ~umask), depending on the - implementation. - Returns the open file descriptor if successful, otherwise -1 and errno - set. */ -# if @REPLACE_MKSTEMP@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define mkstemp rpl_mkstemp -# endif -_GL_FUNCDECL_RPL (mkstemp, int, (char * /*template*/) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (mkstemp, int, (char * /*template*/)); -# else -# if ! @HAVE_MKSTEMP@ -_GL_FUNCDECL_SYS (mkstemp, int, (char * /*template*/) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (mkstemp, int, (char * /*template*/)); -# endif -_GL_CXXALIASWARN (mkstemp); -#elif defined GNULIB_POSIXCHECK -# undef mkstemp -# if HAVE_RAW_DECL_MKSTEMP -_GL_WARN_ON_USE (mkstemp, "mkstemp is unportable - " - "use gnulib module mkstemp for portability"); -# endif -#endif - -#if @GNULIB_MKSTEMPS@ -/* Create a unique temporary file from TEMPLATE. - The last six characters of TEMPLATE prior to a suffix of length - SUFFIXLEN must be "XXXXXX"; - they are replaced with a string that makes the file name unique. - The file is then created, ensuring it didn't exist before. - The file is created read-write (mask at least 0600 & ~umask), but it may be - world-readable and world-writable (mask 0666 & ~umask), depending on the - implementation. - Returns the open file descriptor if successful, otherwise -1 and errno - set. */ -# if !@HAVE_MKSTEMPS@ -_GL_FUNCDECL_SYS (mkstemps, int, (char * /*template*/, int /*suffixlen*/) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (mkstemps, int, (char * /*template*/, int /*suffixlen*/)); -_GL_CXXALIASWARN (mkstemps); -#elif defined GNULIB_POSIXCHECK -# undef mkstemps -# if HAVE_RAW_DECL_MKSTEMPS -_GL_WARN_ON_USE (mkstemps, "mkstemps is unportable - " - "use gnulib module mkstemps for portability"); -# endif -#endif - -#if @GNULIB_POSIX_OPENPT@ -/* Return an FD open to the master side of a pseudo-terminal. Flags should - include O_RDWR, and may also include O_NOCTTY. */ -# if !@HAVE_POSIX_OPENPT@ -_GL_FUNCDECL_SYS (posix_openpt, int, (int flags)); -# endif -_GL_CXXALIAS_SYS (posix_openpt, int, (int flags)); -_GL_CXXALIASWARN (posix_openpt); -#elif defined GNULIB_POSIXCHECK -# undef posix_openpt -# if HAVE_RAW_DECL_POSIX_OPENPT -_GL_WARN_ON_USE (posix_openpt, "posix_openpt is not portable - " - "use gnulib module posix_openpt for portability"); -# endif -#endif - -#if @GNULIB_PTSNAME@ -/* Return the pathname of the pseudo-terminal slave associated with - the master FD is open on, or NULL on errors. */ -# if @REPLACE_PTSNAME@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ptsname -# define ptsname rpl_ptsname -# endif -_GL_FUNCDECL_RPL (ptsname, char *, (int fd)); -_GL_CXXALIAS_RPL (ptsname, char *, (int fd)); -# else -# if !@HAVE_PTSNAME@ -_GL_FUNCDECL_SYS (ptsname, char *, (int fd)); -# endif -_GL_CXXALIAS_SYS (ptsname, char *, (int fd)); -# endif -_GL_CXXALIASWARN (ptsname); -#elif defined GNULIB_POSIXCHECK -# undef ptsname -# if HAVE_RAW_DECL_PTSNAME -_GL_WARN_ON_USE (ptsname, "ptsname is not portable - " - "use gnulib module ptsname for portability"); -# endif -#endif - -#if @GNULIB_PTSNAME_R@ -/* Set the pathname of the pseudo-terminal slave associated with - the master FD is open on and return 0, or set errno and return - non-zero on errors. */ -# if @REPLACE_PTSNAME_R@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ptsname_r -# define ptsname_r rpl_ptsname_r -# endif -_GL_FUNCDECL_RPL (ptsname_r, int, (int fd, char *buf, size_t len)); -_GL_CXXALIAS_RPL (ptsname_r, int, (int fd, char *buf, size_t len)); -# else -# if !@HAVE_PTSNAME_R@ -_GL_FUNCDECL_SYS (ptsname_r, int, (int fd, char *buf, size_t len)); -# endif -_GL_CXXALIAS_SYS (ptsname_r, int, (int fd, char *buf, size_t len)); -# endif -_GL_CXXALIASWARN (ptsname_r); -#elif defined GNULIB_POSIXCHECK -# undef ptsname_r -# if HAVE_RAW_DECL_PTSNAME_R -_GL_WARN_ON_USE (ptsname_r, "ptsname_r is not portable - " - "use gnulib module ptsname_r for portability"); -# endif -#endif - -#if @GNULIB_PUTENV@ -# if @REPLACE_PUTENV@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef putenv -# define putenv rpl_putenv -# endif -_GL_FUNCDECL_RPL (putenv, int, (char *string) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (putenv, int, (char *string)); -# else -_GL_CXXALIAS_SYS (putenv, int, (char *string)); -# endif -_GL_CXXALIASWARN (putenv); -#endif - -#if @GNULIB_QSORT_R@ -/* Sort an array of NMEMB elements, starting at address BASE, each element - occupying SIZE bytes, in ascending order according to the comparison - function COMPARE. */ -# if @REPLACE_QSORT_R@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef qsort_r -# define qsort_r rpl_qsort_r -# endif -_GL_FUNCDECL_RPL (qsort_r, void, (void *base, size_t nmemb, size_t size, - int (*compare) (void const *, void const *, - void *), - void *arg) _GL_ARG_NONNULL ((1, 4))); -_GL_CXXALIAS_RPL (qsort_r, void, (void *base, size_t nmemb, size_t size, - int (*compare) (void const *, void const *, - void *), - void *arg)); -# else -# if !@HAVE_QSORT_R@ -_GL_FUNCDECL_SYS (qsort_r, void, (void *base, size_t nmemb, size_t size, - int (*compare) (void const *, void const *, - void *), - void *arg) _GL_ARG_NONNULL ((1, 4))); -# endif -_GL_CXXALIAS_SYS (qsort_r, void, (void *base, size_t nmemb, size_t size, - int (*compare) (void const *, void const *, - void *), - void *arg)); -# endif -_GL_CXXALIASWARN (qsort_r); -#elif defined GNULIB_POSIXCHECK -# undef qsort_r -# if HAVE_RAW_DECL_QSORT_R -_GL_WARN_ON_USE (qsort_r, "qsort_r is not portable - " - "use gnulib module qsort_r for portability"); -# endif -#endif - - -#if @GNULIB_RANDOM_R@ -# if !@HAVE_RANDOM_R@ -# ifndef RAND_MAX -# define RAND_MAX 2147483647 -# endif -# endif -#endif - - -#if @GNULIB_RANDOM@ -# if !@HAVE_RANDOM@ -_GL_FUNCDECL_SYS (random, long, (void)); -# endif -_GL_CXXALIAS_SYS (random, long, (void)); -_GL_CXXALIASWARN (random); -#elif defined GNULIB_POSIXCHECK -# undef random -# if HAVE_RAW_DECL_RANDOM -_GL_WARN_ON_USE (random, "random is unportable - " - "use gnulib module random for portability"); -# endif -#endif - -#if @GNULIB_RANDOM@ -# if !@HAVE_RANDOM@ -_GL_FUNCDECL_SYS (srandom, void, (unsigned int seed)); -# endif -_GL_CXXALIAS_SYS (srandom, void, (unsigned int seed)); -_GL_CXXALIASWARN (srandom); -#elif defined GNULIB_POSIXCHECK -# undef srandom -# if HAVE_RAW_DECL_SRANDOM -_GL_WARN_ON_USE (srandom, "srandom is unportable - " - "use gnulib module random for portability"); -# endif -#endif - -#if @GNULIB_RANDOM@ -# if !@HAVE_RANDOM@ -_GL_FUNCDECL_SYS (initstate, char *, - (unsigned int seed, char *buf, size_t buf_size) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (initstate, char *, - (unsigned int seed, char *buf, size_t buf_size)); -_GL_CXXALIASWARN (initstate); -#elif defined GNULIB_POSIXCHECK -# undef initstate -# if HAVE_RAW_DECL_INITSTATE_R -_GL_WARN_ON_USE (initstate, "initstate is unportable - " - "use gnulib module random for portability"); -# endif -#endif - -#if @GNULIB_RANDOM@ -# if !@HAVE_RANDOM@ -_GL_FUNCDECL_SYS (setstate, char *, (char *arg_state) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (setstate, char *, (char *arg_state)); -_GL_CXXALIASWARN (setstate); -#elif defined GNULIB_POSIXCHECK -# undef setstate -# if HAVE_RAW_DECL_SETSTATE_R -_GL_WARN_ON_USE (setstate, "setstate is unportable - " - "use gnulib module random for portability"); -# endif -#endif - - -#if @GNULIB_RANDOM_R@ -# if @REPLACE_RANDOM_R@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef random_r -# define random_r rpl_random_r -# endif -_GL_FUNCDECL_RPL (random_r, int, (struct random_data *buf, int32_t *result) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (random_r, int, (struct random_data *buf, int32_t *result)); -# else -# if !@HAVE_RANDOM_R@ -_GL_FUNCDECL_SYS (random_r, int, (struct random_data *buf, int32_t *result) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (random_r, int, (struct random_data *buf, int32_t *result)); -# endif -_GL_CXXALIASWARN (random_r); -#elif defined GNULIB_POSIXCHECK -# undef random_r -# if HAVE_RAW_DECL_RANDOM_R -_GL_WARN_ON_USE (random_r, "random_r is unportable - " - "use gnulib module random_r for portability"); -# endif -#endif - -#if @GNULIB_RANDOM_R@ -# if @REPLACE_RANDOM_R@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef srandom_r -# define srandom_r rpl_srandom_r -# endif -_GL_FUNCDECL_RPL (srandom_r, int, - (unsigned int seed, struct random_data *rand_state) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (srandom_r, int, - (unsigned int seed, struct random_data *rand_state)); -# else -# if !@HAVE_RANDOM_R@ -_GL_FUNCDECL_SYS (srandom_r, int, - (unsigned int seed, struct random_data *rand_state) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (srandom_r, int, - (unsigned int seed, struct random_data *rand_state)); -# endif -_GL_CXXALIASWARN (srandom_r); -#elif defined GNULIB_POSIXCHECK -# undef srandom_r -# if HAVE_RAW_DECL_SRANDOM_R -_GL_WARN_ON_USE (srandom_r, "srandom_r is unportable - " - "use gnulib module random_r for portability"); -# endif -#endif - -#if @GNULIB_RANDOM_R@ -# if @REPLACE_RANDOM_R@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef initstate_r -# define initstate_r rpl_initstate_r -# endif -_GL_FUNCDECL_RPL (initstate_r, int, - (unsigned int seed, char *buf, size_t buf_size, - struct random_data *rand_state) - _GL_ARG_NONNULL ((2, 4))); -_GL_CXXALIAS_RPL (initstate_r, int, - (unsigned int seed, char *buf, size_t buf_size, - struct random_data *rand_state)); -# else -# if !@HAVE_RANDOM_R@ -_GL_FUNCDECL_SYS (initstate_r, int, - (unsigned int seed, char *buf, size_t buf_size, - struct random_data *rand_state) - _GL_ARG_NONNULL ((2, 4))); -# endif -_GL_CXXALIAS_SYS (initstate_r, int, - (unsigned int seed, char *buf, size_t buf_size, - struct random_data *rand_state)); -# endif -_GL_CXXALIASWARN (initstate_r); -#elif defined GNULIB_POSIXCHECK -# undef initstate_r -# if HAVE_RAW_DECL_INITSTATE_R -_GL_WARN_ON_USE (initstate_r, "initstate_r is unportable - " - "use gnulib module random_r for portability"); -# endif -#endif - -#if @GNULIB_RANDOM_R@ -# if @REPLACE_RANDOM_R@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef setstate_r -# define setstate_r rpl_setstate_r -# endif -_GL_FUNCDECL_RPL (setstate_r, int, - (char *arg_state, struct random_data *rand_state) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (setstate_r, int, - (char *arg_state, struct random_data *rand_state)); -# else -# if !@HAVE_RANDOM_R@ -_GL_FUNCDECL_SYS (setstate_r, int, - (char *arg_state, struct random_data *rand_state) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (setstate_r, int, - (char *arg_state, struct random_data *rand_state)); -# endif -_GL_CXXALIASWARN (setstate_r); -#elif defined GNULIB_POSIXCHECK -# undef setstate_r -# if HAVE_RAW_DECL_SETSTATE_R -_GL_WARN_ON_USE (setstate_r, "setstate_r is unportable - " - "use gnulib module random_r for portability"); -# endif -#endif - - -#if @GNULIB_REALLOC_POSIX@ -# if @REPLACE_REALLOC@ -# if !((defined __cplusplus && defined GNULIB_NAMESPACE) \ - || _GL_USE_STDLIB_ALLOC) -# undef realloc -# define realloc rpl_realloc -# endif -_GL_FUNCDECL_RPL (realloc, void *, (void *ptr, size_t size)); -_GL_CXXALIAS_RPL (realloc, void *, (void *ptr, size_t size)); -# else -_GL_CXXALIAS_SYS (realloc, void *, (void *ptr, size_t size)); -# endif -_GL_CXXALIASWARN (realloc); -#elif defined GNULIB_POSIXCHECK && !_GL_USE_STDLIB_ALLOC -# undef realloc -/* Assume realloc is always declared. */ -_GL_WARN_ON_USE (realloc, "realloc is not POSIX compliant everywhere - " - "use gnulib module realloc-posix for portability"); -#endif - -#if @GNULIB_REALPATH@ -# if @REPLACE_REALPATH@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define realpath rpl_realpath -# endif -_GL_FUNCDECL_RPL (realpath, char *, (const char *name, char *resolved) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (realpath, char *, (const char *name, char *resolved)); -# else -# if !@HAVE_REALPATH@ -_GL_FUNCDECL_SYS (realpath, char *, (const char *name, char *resolved) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (realpath, char *, (const char *name, char *resolved)); -# endif -_GL_CXXALIASWARN (realpath); -#elif defined GNULIB_POSIXCHECK -# undef realpath -# if HAVE_RAW_DECL_REALPATH -_GL_WARN_ON_USE (realpath, "realpath is unportable - use gnulib module " - "canonicalize or canonicalize-lgpl for portability"); -# endif -#endif - -#if @GNULIB_RPMATCH@ -/* Test a user response to a question. - Return 1 if it is affirmative, 0 if it is negative, or -1 if not clear. */ -# if !@HAVE_RPMATCH@ -_GL_FUNCDECL_SYS (rpmatch, int, (const char *response) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (rpmatch, int, (const char *response)); -_GL_CXXALIASWARN (rpmatch); -#elif defined GNULIB_POSIXCHECK -# undef rpmatch -# if HAVE_RAW_DECL_RPMATCH -_GL_WARN_ON_USE (rpmatch, "rpmatch is unportable - " - "use gnulib module rpmatch for portability"); -# endif -#endif - -#if @GNULIB_SECURE_GETENV@ -/* Look up NAME in the environment, returning 0 in insecure situations. */ -# if !@HAVE_SECURE_GETENV@ -_GL_FUNCDECL_SYS (secure_getenv, char *, - (char const *name) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (secure_getenv, char *, (char const *name)); -_GL_CXXALIASWARN (secure_getenv); -#elif defined GNULIB_POSIXCHECK -# undef secure_getenv -# if HAVE_RAW_DECL_SECURE_GETENV -_GL_WARN_ON_USE (secure_getenv, "secure_getenv is unportable - " - "use gnulib module secure_getenv for portability"); -# endif -#endif - -#if @GNULIB_SETENV@ -/* Set NAME to VALUE in the environment. - If REPLACE is nonzero, overwrite an existing value. */ -# if @REPLACE_SETENV@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef setenv -# define setenv rpl_setenv -# endif -_GL_FUNCDECL_RPL (setenv, int, - (const char *name, const char *value, int replace) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (setenv, int, - (const char *name, const char *value, int replace)); -# else -# if !@HAVE_DECL_SETENV@ -_GL_FUNCDECL_SYS (setenv, int, - (const char *name, const char *value, int replace) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (setenv, int, - (const char *name, const char *value, int replace)); -# endif -# if !(@REPLACE_SETENV@ && !@HAVE_DECL_SETENV@) -_GL_CXXALIASWARN (setenv); -# endif -#elif defined GNULIB_POSIXCHECK -# undef setenv -# if HAVE_RAW_DECL_SETENV -_GL_WARN_ON_USE (setenv, "setenv is unportable - " - "use gnulib module setenv for portability"); -# endif -#endif - -#if @GNULIB_STRTOD@ - /* Parse a double from STRING, updating ENDP if appropriate. */ -# if @REPLACE_STRTOD@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define strtod rpl_strtod -# endif -_GL_FUNCDECL_RPL (strtod, double, (const char *str, char **endp) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (strtod, double, (const char *str, char **endp)); -# else -# if !@HAVE_STRTOD@ -_GL_FUNCDECL_SYS (strtod, double, (const char *str, char **endp) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (strtod, double, (const char *str, char **endp)); -# endif -_GL_CXXALIASWARN (strtod); -#elif defined GNULIB_POSIXCHECK -# undef strtod -# if HAVE_RAW_DECL_STRTOD -_GL_WARN_ON_USE (strtod, "strtod is unportable - " - "use gnulib module strtod for portability"); -# endif -#endif - -#if @GNULIB_STRTOLL@ -/* Parse a signed integer whose textual representation starts at STRING. - The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0, - it may be decimal or octal (with prefix "0") or hexadecimal (with prefix - "0x"). - If ENDPTR is not NULL, the address of the first byte after the integer is - stored in *ENDPTR. - Upon overflow, the return value is LLONG_MAX or LLONG_MIN, and errno is set - to ERANGE. */ -# if !@HAVE_STRTOLL@ -_GL_FUNCDECL_SYS (strtoll, long long, - (const char *string, char **endptr, int base) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (strtoll, long long, - (const char *string, char **endptr, int base)); -_GL_CXXALIASWARN (strtoll); -#elif defined GNULIB_POSIXCHECK -# undef strtoll -# if HAVE_RAW_DECL_STRTOLL -_GL_WARN_ON_USE (strtoll, "strtoll is unportable - " - "use gnulib module strtoll for portability"); -# endif -#endif - -#if @GNULIB_STRTOULL@ -/* Parse an unsigned integer whose textual representation starts at STRING. - The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0, - it may be decimal or octal (with prefix "0") or hexadecimal (with prefix - "0x"). - If ENDPTR is not NULL, the address of the first byte after the integer is - stored in *ENDPTR. - Upon overflow, the return value is ULLONG_MAX, and errno is set to - ERANGE. */ -# if !@HAVE_STRTOULL@ -_GL_FUNCDECL_SYS (strtoull, unsigned long long, - (const char *string, char **endptr, int base) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (strtoull, unsigned long long, - (const char *string, char **endptr, int base)); -_GL_CXXALIASWARN (strtoull); -#elif defined GNULIB_POSIXCHECK -# undef strtoull -# if HAVE_RAW_DECL_STRTOULL -_GL_WARN_ON_USE (strtoull, "strtoull is unportable - " - "use gnulib module strtoull for portability"); -# endif -#endif - -#if @GNULIB_UNLOCKPT@ -/* Unlock the slave side of the pseudo-terminal whose master side is specified - by FD, so that it can be opened. */ -# if !@HAVE_UNLOCKPT@ -_GL_FUNCDECL_SYS (unlockpt, int, (int fd)); -# endif -_GL_CXXALIAS_SYS (unlockpt, int, (int fd)); -_GL_CXXALIASWARN (unlockpt); -#elif defined GNULIB_POSIXCHECK -# undef unlockpt -# if HAVE_RAW_DECL_UNLOCKPT -_GL_WARN_ON_USE (unlockpt, "unlockpt is not portable - " - "use gnulib module unlockpt for portability"); -# endif -#endif - -#if @GNULIB_UNSETENV@ -/* Remove the variable NAME from the environment. */ -# if @REPLACE_UNSETENV@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef unsetenv -# define unsetenv rpl_unsetenv -# endif -_GL_FUNCDECL_RPL (unsetenv, int, (const char *name) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (unsetenv, int, (const char *name)); -# else -# if !@HAVE_DECL_UNSETENV@ -_GL_FUNCDECL_SYS (unsetenv, int, (const char *name) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (unsetenv, int, (const char *name)); -# endif -# if !(@REPLACE_UNSETENV@ && !@HAVE_DECL_UNSETENV@) -_GL_CXXALIASWARN (unsetenv); -# endif -#elif defined GNULIB_POSIXCHECK -# undef unsetenv -# if HAVE_RAW_DECL_UNSETENV -_GL_WARN_ON_USE (unsetenv, "unsetenv is unportable - " - "use gnulib module unsetenv for portability"); -# endif -#endif - -/* Convert a wide character to a multibyte character. */ -#if @GNULIB_WCTOMB@ -# if @REPLACE_WCTOMB@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef wctomb -# define wctomb rpl_wctomb -# endif -_GL_FUNCDECL_RPL (wctomb, int, (char *s, wchar_t wc)); -_GL_CXXALIAS_RPL (wctomb, int, (char *s, wchar_t wc)); -# else -_GL_CXXALIAS_SYS (wctomb, int, (char *s, wchar_t wc)); -# endif -_GL_CXXALIASWARN (wctomb); -#endif - - -#endif /* _@GUARD_PREFIX@_STDLIB_H */ -#endif /* _@GUARD_PREFIX@_STDLIB_H */ -#endif diff --git a/gl/sys_stat.in.h b/gl/sys_stat.in.h deleted file mode 100644 index d5ca343..0000000 --- a/gl/sys_stat.in.h +++ /dev/null @@ -1,732 +0,0 @@ -/* Provide a more complete sys/stat header file. - Copyright (C) 2005-2017 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ - -/* Written by Eric Blake, Paul Eggert, and Jim Meyering. */ - -/* This file is supposed to be used on platforms where is - incomplete. It is intended to provide definitions and prototypes - needed by an application. Start with what the system provides. */ - -#if __GNUC__ >= 3 -@PRAGMA_SYSTEM_HEADER@ -#endif -@PRAGMA_COLUMNS@ - -#if defined __need_system_sys_stat_h -/* Special invocation convention. */ - -#@INCLUDE_NEXT@ @NEXT_SYS_STAT_H@ - -#else -/* Normal invocation convention. */ - -#ifndef _@GUARD_PREFIX@_SYS_STAT_H - -/* Get nlink_t. - May also define off_t to a 64-bit type on native Windows. */ -#include - -/* Get struct timespec. */ -#include - -/* The include_next requires a split double-inclusion guard. */ -#@INCLUDE_NEXT@ @NEXT_SYS_STAT_H@ - -#ifndef _@GUARD_PREFIX@_SYS_STAT_H -#define _@GUARD_PREFIX@_SYS_STAT_H - -/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ - -/* The definition of _GL_ARG_NONNULL is copied here. */ - -/* The definition of _GL_WARN_ON_USE is copied here. */ - -/* Before doing "#define mkdir rpl_mkdir" below, we need to include all - headers that may declare mkdir(). Native Windows platforms declare mkdir - in and/or , not in . */ -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -# include /* mingw32, mingw64 */ -# include /* mingw64, MSVC 9 */ -#endif - -/* Native Windows platforms declare umask() in . */ -#if 0 && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) -# include -#endif - -/* Large File Support on native Windows. */ -#if @WINDOWS_64_BIT_ST_SIZE@ -# define stat _stati64 -#endif - -#ifndef S_IFIFO -# ifdef _S_IFIFO -# define S_IFIFO _S_IFIFO -# endif -#endif - -#ifndef S_IFMT -# define S_IFMT 0170000 -#endif - -#if STAT_MACROS_BROKEN -# undef S_ISBLK -# undef S_ISCHR -# undef S_ISDIR -# undef S_ISFIFO -# undef S_ISLNK -# undef S_ISNAM -# undef S_ISMPB -# undef S_ISMPC -# undef S_ISNWK -# undef S_ISREG -# undef S_ISSOCK -#endif - -#ifndef S_ISBLK -# ifdef S_IFBLK -# define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK) -# else -# define S_ISBLK(m) 0 -# endif -#endif - -#ifndef S_ISCHR -# ifdef S_IFCHR -# define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR) -# else -# define S_ISCHR(m) 0 -# endif -#endif - -#ifndef S_ISDIR -# ifdef S_IFDIR -# define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) -# else -# define S_ISDIR(m) 0 -# endif -#endif - -#ifndef S_ISDOOR /* Solaris 2.5 and up */ -# define S_ISDOOR(m) 0 -#endif - -#ifndef S_ISFIFO -# ifdef S_IFIFO -# define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO) -# else -# define S_ISFIFO(m) 0 -# endif -#endif - -#ifndef S_ISLNK -# ifdef S_IFLNK -# define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK) -# else -# define S_ISLNK(m) 0 -# endif -#endif - -#ifndef S_ISMPB /* V7 */ -# ifdef S_IFMPB -# define S_ISMPB(m) (((m) & S_IFMT) == S_IFMPB) -# define S_ISMPC(m) (((m) & S_IFMT) == S_IFMPC) -# else -# define S_ISMPB(m) 0 -# define S_ISMPC(m) 0 -# endif -#endif - -#ifndef S_ISMPX /* AIX */ -# define S_ISMPX(m) 0 -#endif - -#ifndef S_ISNAM /* Xenix */ -# ifdef S_IFNAM -# define S_ISNAM(m) (((m) & S_IFMT) == S_IFNAM) -# else -# define S_ISNAM(m) 0 -# endif -#endif - -#ifndef S_ISNWK /* HP/UX */ -# ifdef S_IFNWK -# define S_ISNWK(m) (((m) & S_IFMT) == S_IFNWK) -# else -# define S_ISNWK(m) 0 -# endif -#endif - -#ifndef S_ISPORT /* Solaris 10 and up */ -# define S_ISPORT(m) 0 -#endif - -#ifndef S_ISREG -# ifdef S_IFREG -# define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) -# else -# define S_ISREG(m) 0 -# endif -#endif - -#ifndef S_ISSOCK -# ifdef S_IFSOCK -# define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK) -# else -# define S_ISSOCK(m) 0 -# endif -#endif - - -#ifndef S_TYPEISMQ -# define S_TYPEISMQ(p) 0 -#endif - -#ifndef S_TYPEISTMO -# define S_TYPEISTMO(p) 0 -#endif - - -#ifndef S_TYPEISSEM -# ifdef S_INSEM -# define S_TYPEISSEM(p) (S_ISNAM ((p)->st_mode) && (p)->st_rdev == S_INSEM) -# else -# define S_TYPEISSEM(p) 0 -# endif -#endif - -#ifndef S_TYPEISSHM -# ifdef S_INSHD -# define S_TYPEISSHM(p) (S_ISNAM ((p)->st_mode) && (p)->st_rdev == S_INSHD) -# else -# define S_TYPEISSHM(p) 0 -# endif -#endif - -/* high performance ("contiguous data") */ -#ifndef S_ISCTG -# define S_ISCTG(p) 0 -#endif - -/* Cray DMF (data migration facility): off line, with data */ -#ifndef S_ISOFD -# define S_ISOFD(p) 0 -#endif - -/* Cray DMF (data migration facility): off line, with no data */ -#ifndef S_ISOFL -# define S_ISOFL(p) 0 -#endif - -/* 4.4BSD whiteout */ -#ifndef S_ISWHT -# define S_ISWHT(m) 0 -#endif - -/* If any of the following are undefined, - define them to their de facto standard values. */ -#if !S_ISUID -# define S_ISUID 04000 -#endif -#if !S_ISGID -# define S_ISGID 02000 -#endif - -/* S_ISVTX is a common extension to POSIX. */ -#ifndef S_ISVTX -# define S_ISVTX 01000 -#endif - -#if !S_IRUSR && S_IREAD -# define S_IRUSR S_IREAD -#endif -#if !S_IRUSR -# define S_IRUSR 00400 -#endif -#if !S_IRGRP -# define S_IRGRP (S_IRUSR >> 3) -#endif -#if !S_IROTH -# define S_IROTH (S_IRUSR >> 6) -#endif - -#if !S_IWUSR && S_IWRITE -# define S_IWUSR S_IWRITE -#endif -#if !S_IWUSR -# define S_IWUSR 00200 -#endif -#if !S_IWGRP -# define S_IWGRP (S_IWUSR >> 3) -#endif -#if !S_IWOTH -# define S_IWOTH (S_IWUSR >> 6) -#endif - -#if !S_IXUSR && S_IEXEC -# define S_IXUSR S_IEXEC -#endif -#if !S_IXUSR -# define S_IXUSR 00100 -#endif -#if !S_IXGRP -# define S_IXGRP (S_IXUSR >> 3) -#endif -#if !S_IXOTH -# define S_IXOTH (S_IXUSR >> 6) -#endif - -#if !S_IRWXU -# define S_IRWXU (S_IRUSR | S_IWUSR | S_IXUSR) -#endif -#if !S_IRWXG -# define S_IRWXG (S_IRGRP | S_IWGRP | S_IXGRP) -#endif -#if !S_IRWXO -# define S_IRWXO (S_IROTH | S_IWOTH | S_IXOTH) -#endif - -/* S_IXUGO is a common extension to POSIX. */ -#if !S_IXUGO -# define S_IXUGO (S_IXUSR | S_IXGRP | S_IXOTH) -#endif - -#ifndef S_IRWXUGO -# define S_IRWXUGO (S_IRWXU | S_IRWXG | S_IRWXO) -#endif - -/* Macros for futimens and utimensat. */ -#ifndef UTIME_NOW -# define UTIME_NOW (-1) -# define UTIME_OMIT (-2) -#endif - - -#if @GNULIB_FCHMODAT@ -# if !@HAVE_FCHMODAT@ -_GL_FUNCDECL_SYS (fchmodat, int, - (int fd, char const *file, mode_t mode, int flag) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (fchmodat, int, - (int fd, char const *file, mode_t mode, int flag)); -_GL_CXXALIASWARN (fchmodat); -#elif defined GNULIB_POSIXCHECK -# undef fchmodat -# if HAVE_RAW_DECL_FCHMODAT -_GL_WARN_ON_USE (fchmodat, "fchmodat is not portable - " - "use gnulib module openat for portability"); -# endif -#endif - - -#if @GNULIB_FSTAT@ -# if @REPLACE_FSTAT@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fstat -# define fstat rpl_fstat -# endif -_GL_FUNCDECL_RPL (fstat, int, (int fd, struct stat *buf) _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (fstat, int, (int fd, struct stat *buf)); -# else -_GL_CXXALIAS_SYS (fstat, int, (int fd, struct stat *buf)); -# endif -_GL_CXXALIASWARN (fstat); -#elif @WINDOWS_64_BIT_ST_SIZE@ -/* Above, we define stat to _stati64. */ -# define fstat _fstati64 -#elif defined GNULIB_POSIXCHECK -# undef fstat -# if HAVE_RAW_DECL_FSTAT -_GL_WARN_ON_USE (fstat, "fstat has portability problems - " - "use gnulib module fstat for portability"); -# endif -#endif - - -#if @GNULIB_FSTATAT@ -# if @REPLACE_FSTATAT@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fstatat -# define fstatat rpl_fstatat -# endif -_GL_FUNCDECL_RPL (fstatat, int, - (int fd, char const *name, struct stat *st, int flags) - _GL_ARG_NONNULL ((2, 3))); -_GL_CXXALIAS_RPL (fstatat, int, - (int fd, char const *name, struct stat *st, int flags)); -# else -# if !@HAVE_FSTATAT@ -_GL_FUNCDECL_SYS (fstatat, int, - (int fd, char const *name, struct stat *st, int flags) - _GL_ARG_NONNULL ((2, 3))); -# endif -_GL_CXXALIAS_SYS (fstatat, int, - (int fd, char const *name, struct stat *st, int flags)); -# endif -_GL_CXXALIASWARN (fstatat); -#elif defined GNULIB_POSIXCHECK -# undef fstatat -# if HAVE_RAW_DECL_FSTATAT -_GL_WARN_ON_USE (fstatat, "fstatat is not portable - " - "use gnulib module openat for portability"); -# endif -#endif - - -#if @GNULIB_FUTIMENS@ -/* Use the rpl_ prefix also on Solaris <= 9, because on Solaris 9 our futimens - implementation relies on futimesat, which on Solaris 10 makes an invocation - to futimens that is meant to invoke the libc's futimens(), not gnulib's - futimens(). */ -# if @REPLACE_FUTIMENS@ || (!@HAVE_FUTIMENS@ && defined __sun) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef futimens -# define futimens rpl_futimens -# endif -_GL_FUNCDECL_RPL (futimens, int, (int fd, struct timespec const times[2])); -_GL_CXXALIAS_RPL (futimens, int, (int fd, struct timespec const times[2])); -# else -# if !@HAVE_FUTIMENS@ -_GL_FUNCDECL_SYS (futimens, int, (int fd, struct timespec const times[2])); -# endif -_GL_CXXALIAS_SYS (futimens, int, (int fd, struct timespec const times[2])); -# endif -# if @HAVE_FUTIMENS@ -_GL_CXXALIASWARN (futimens); -# endif -#elif defined GNULIB_POSIXCHECK -# undef futimens -# if HAVE_RAW_DECL_FUTIMENS -_GL_WARN_ON_USE (futimens, "futimens is not portable - " - "use gnulib module futimens for portability"); -# endif -#endif - - -#if @GNULIB_LCHMOD@ -/* Change the mode of FILENAME to MODE, without dereferencing it if FILENAME - denotes a symbolic link. */ -# if !@HAVE_LCHMOD@ -/* The lchmod replacement follows symbolic links. Callers should take - this into account; lchmod should be applied only to arguments that - are known to not be symbolic links. On hosts that lack lchmod, - this can lead to race conditions between the check and the - invocation of lchmod, but we know of no workarounds that are - reliable in general. You might try requesting support for lchmod - from your operating system supplier. */ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define lchmod chmod -# endif -/* Need to cast, because on mingw, the second parameter of chmod is - int mode. */ -_GL_CXXALIAS_RPL_CAST_1 (lchmod, chmod, int, - (const char *filename, mode_t mode)); -# else -# if 0 /* assume already declared */ -_GL_FUNCDECL_SYS (lchmod, int, (const char *filename, mode_t mode) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (lchmod, int, (const char *filename, mode_t mode)); -# endif -# if @HAVE_LCHMOD@ -_GL_CXXALIASWARN (lchmod); -# endif -#elif defined GNULIB_POSIXCHECK -# undef lchmod -# if HAVE_RAW_DECL_LCHMOD -_GL_WARN_ON_USE (lchmod, "lchmod is unportable - " - "use gnulib module lchmod for portability"); -# endif -#endif - - -#if @GNULIB_LSTAT@ -# if ! @HAVE_LSTAT@ -/* mingw does not support symlinks, therefore it does not have lstat. But - without links, stat does just fine. */ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define lstat stat -# endif -_GL_CXXALIAS_RPL_1 (lstat, stat, int, (const char *name, struct stat *buf)); -# elif @REPLACE_LSTAT@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef lstat -# define lstat rpl_lstat -# endif -_GL_FUNCDECL_RPL (lstat, int, (const char *name, struct stat *buf) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (lstat, int, (const char *name, struct stat *buf)); -# else -_GL_CXXALIAS_SYS (lstat, int, (const char *name, struct stat *buf)); -# endif -# if @HAVE_LSTAT@ -_GL_CXXALIASWARN (lstat); -# endif -#elif defined GNULIB_POSIXCHECK -# undef lstat -# if HAVE_RAW_DECL_LSTAT -_GL_WARN_ON_USE (lstat, "lstat is unportable - " - "use gnulib module lstat for portability"); -# endif -#endif - - -#if @REPLACE_MKDIR@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef mkdir -# define mkdir rpl_mkdir -# endif -_GL_FUNCDECL_RPL (mkdir, int, (char const *name, mode_t mode) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (mkdir, int, (char const *name, mode_t mode)); -#else -/* mingw's _mkdir() function has 1 argument, but we pass 2 arguments. - Additionally, it declares _mkdir (and depending on compile flags, an - alias mkdir), only in the nonstandard includes and , - which are included above. */ -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - -# if !GNULIB_defined_rpl_mkdir -static int -rpl_mkdir (char const *name, mode_t mode) -{ - return _mkdir (name); -} -# define GNULIB_defined_rpl_mkdir 1 -# endif - -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define mkdir rpl_mkdir -# endif -_GL_CXXALIAS_RPL (mkdir, int, (char const *name, mode_t mode)); -# else -_GL_CXXALIAS_SYS (mkdir, int, (char const *name, mode_t mode)); -# endif -#endif -_GL_CXXALIASWARN (mkdir); - - -#if @GNULIB_MKDIRAT@ -# if !@HAVE_MKDIRAT@ -_GL_FUNCDECL_SYS (mkdirat, int, (int fd, char const *file, mode_t mode) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (mkdirat, int, (int fd, char const *file, mode_t mode)); -_GL_CXXALIASWARN (mkdirat); -#elif defined GNULIB_POSIXCHECK -# undef mkdirat -# if HAVE_RAW_DECL_MKDIRAT -_GL_WARN_ON_USE (mkdirat, "mkdirat is not portable - " - "use gnulib module openat for portability"); -# endif -#endif - - -#if @GNULIB_MKFIFO@ -# if @REPLACE_MKFIFO@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef mkfifo -# define mkfifo rpl_mkfifo -# endif -_GL_FUNCDECL_RPL (mkfifo, int, (char const *file, mode_t mode) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (mkfifo, int, (char const *file, mode_t mode)); -# else -# if !@HAVE_MKFIFO@ -_GL_FUNCDECL_SYS (mkfifo, int, (char const *file, mode_t mode) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (mkfifo, int, (char const *file, mode_t mode)); -# endif -_GL_CXXALIASWARN (mkfifo); -#elif defined GNULIB_POSIXCHECK -# undef mkfifo -# if HAVE_RAW_DECL_MKFIFO -_GL_WARN_ON_USE (mkfifo, "mkfifo is not portable - " - "use gnulib module mkfifo for portability"); -# endif -#endif - - -#if @GNULIB_MKFIFOAT@ -# if !@HAVE_MKFIFOAT@ -_GL_FUNCDECL_SYS (mkfifoat, int, (int fd, char const *file, mode_t mode) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (mkfifoat, int, (int fd, char const *file, mode_t mode)); -_GL_CXXALIASWARN (mkfifoat); -#elif defined GNULIB_POSIXCHECK -# undef mkfifoat -# if HAVE_RAW_DECL_MKFIFOAT -_GL_WARN_ON_USE (mkfifoat, "mkfifoat is not portable - " - "use gnulib module mkfifoat for portability"); -# endif -#endif - - -#if @GNULIB_MKNOD@ -# if @REPLACE_MKNOD@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef mknod -# define mknod rpl_mknod -# endif -_GL_FUNCDECL_RPL (mknod, int, (char const *file, mode_t mode, dev_t dev) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (mknod, int, (char const *file, mode_t mode, dev_t dev)); -# else -# if !@HAVE_MKNOD@ -_GL_FUNCDECL_SYS (mknod, int, (char const *file, mode_t mode, dev_t dev) - _GL_ARG_NONNULL ((1))); -# endif -/* Need to cast, because on OSF/1 5.1, the third parameter is '...'. */ -_GL_CXXALIAS_SYS_CAST (mknod, int, (char const *file, mode_t mode, dev_t dev)); -# endif -_GL_CXXALIASWARN (mknod); -#elif defined GNULIB_POSIXCHECK -# undef mknod -# if HAVE_RAW_DECL_MKNOD -_GL_WARN_ON_USE (mknod, "mknod is not portable - " - "use gnulib module mknod for portability"); -# endif -#endif - - -#if @GNULIB_MKNODAT@ -# if !@HAVE_MKNODAT@ -_GL_FUNCDECL_SYS (mknodat, int, - (int fd, char const *file, mode_t mode, dev_t dev) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (mknodat, int, - (int fd, char const *file, mode_t mode, dev_t dev)); -_GL_CXXALIASWARN (mknodat); -#elif defined GNULIB_POSIXCHECK -# undef mknodat -# if HAVE_RAW_DECL_MKNODAT -_GL_WARN_ON_USE (mknodat, "mknodat is not portable - " - "use gnulib module mkfifoat for portability"); -# endif -#endif - - -#if @GNULIB_STAT@ -# if @REPLACE_STAT@ -/* We can't use the object-like #define stat rpl_stat, because of - struct stat. This means that rpl_stat will not be used if the user - does (stat)(a,b). Oh well. */ -# if defined _AIX && defined stat && defined _LARGE_FILES - /* With _LARGE_FILES defined, AIX (only) defines stat to stat64, - so we have to replace stat64() instead of stat(). */ -# undef stat64 -# define stat64(name, st) rpl_stat (name, st) -# elif @WINDOWS_64_BIT_ST_SIZE@ - /* Above, we define stat to _stati64. */ -# if defined __MINGW32__ && defined _stati64 -# ifndef _USE_32BIT_TIME_T - /* The system headers define _stati64 to _stat64. */ -# undef _stat64 -# define _stat64(name, st) rpl_stat (name, st) -# endif -# elif defined _MSC_VER && defined _stati64 -# ifdef _USE_32BIT_TIME_T - /* The system headers define _stati64 to _stat32i64. */ -# undef _stat32i64 -# define _stat32i64(name, st) rpl_stat (name, st) -# else - /* The system headers define _stati64 to _stat64. */ -# undef _stat64 -# define _stat64(name, st) rpl_stat (name, st) -# endif -# else -# undef _stati64 -# define _stati64(name, st) rpl_stat (name, st) -# endif -# elif defined __MINGW32__ && defined stat -# ifdef _USE_32BIT_TIME_T - /* The system headers define stat to _stat32i64. */ -# undef _stat32i64 -# define _stat32i64(name, st) rpl_stat (name, st) -# else - /* The system headers define stat to _stat64. */ -# undef _stat64 -# define _stat64(name, st) rpl_stat (name, st) -# endif -# elif defined _MSC_VER && defined stat -# ifdef _USE_32BIT_TIME_T - /* The system headers define stat to _stat32. */ -# undef _stat32 -# define _stat32(name, st) rpl_stat (name, st) -# else - /* The system headers define stat to _stat64i32. */ -# undef _stat64i32 -# define _stat64i32(name, st) rpl_stat (name, st) -# endif -# else /* !(_AIX ||__MINGW32__ || _MSC_VER) */ -# undef stat -# define stat(name, st) rpl_stat (name, st) -# endif /* !_LARGE_FILES */ -_GL_EXTERN_C int stat (const char *name, struct stat *buf) - _GL_ARG_NONNULL ((1, 2)); -# endif -#elif defined GNULIB_POSIXCHECK -# undef stat -# if HAVE_RAW_DECL_STAT -_GL_WARN_ON_USE (stat, "stat is unportable - " - "use gnulib module stat for portability"); -# endif -#endif - - -#if @GNULIB_UTIMENSAT@ -/* Use the rpl_ prefix also on Solaris <= 9, because on Solaris 9 our utimensat - implementation relies on futimesat, which on Solaris 10 makes an invocation - to utimensat that is meant to invoke the libc's utimensat(), not gnulib's - utimensat(). */ -# if @REPLACE_UTIMENSAT@ || (!@HAVE_UTIMENSAT@ && defined __sun) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef utimensat -# define utimensat rpl_utimensat -# endif -_GL_FUNCDECL_RPL (utimensat, int, (int fd, char const *name, - struct timespec const times[2], int flag) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (utimensat, int, (int fd, char const *name, - struct timespec const times[2], int flag)); -# else -# if !@HAVE_UTIMENSAT@ -_GL_FUNCDECL_SYS (utimensat, int, (int fd, char const *name, - struct timespec const times[2], int flag) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (utimensat, int, (int fd, char const *name, - struct timespec const times[2], int flag)); -# endif -# if @HAVE_UTIMENSAT@ -_GL_CXXALIASWARN (utimensat); -# endif -#elif defined GNULIB_POSIXCHECK -# undef utimensat -# if HAVE_RAW_DECL_UTIMENSAT -_GL_WARN_ON_USE (utimensat, "utimensat is not portable - " - "use gnulib module utimensat for portability"); -# endif -#endif - - -#endif /* _@GUARD_PREFIX@_SYS_STAT_H */ -#endif /* _@GUARD_PREFIX@_SYS_STAT_H */ -#endif diff --git a/gl/sys_time.in.h b/gl/sys_time.in.h deleted file mode 100644 index 57739bc..0000000 --- a/gl/sys_time.in.h +++ /dev/null @@ -1,220 +0,0 @@ -/* Provide a more complete sys/time.h. - - Copyright (C) 2007-2017 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ - -/* Written by Paul Eggert. */ - -#ifndef _@GUARD_PREFIX@_SYS_TIME_H - -#if __GNUC__ >= 3 -@PRAGMA_SYSTEM_HEADER@ -#endif -@PRAGMA_COLUMNS@ - -/* On Cygwin and on many BSDish systems, includes itself - recursively via . - Simply delegate to the system's header in this case; it is a no-op. - Without this extra ifdef, the C++ gettimeofday declaration below - would be a forward declaration in gnulib's nested . */ -#if defined _CYGWIN_SYS_TIME_H || defined _SYS_TIME_H || defined _SYS_TIME_H_ -# @INCLUDE_NEXT@ @NEXT_SYS_TIME_H@ -#else - -/* The include_next requires a split double-inclusion guard. */ -#if @HAVE_SYS_TIME_H@ -# @INCLUDE_NEXT@ @NEXT_SYS_TIME_H@ -#endif - -#ifndef _@GUARD_PREFIX@_SYS_TIME_H -#define _@GUARD_PREFIX@_SYS_TIME_H - -#if ! @HAVE_SYS_TIME_H@ -# include -#endif - -/* On native Windows with MSVC, get the 'struct timeval' type. - Also, on native Windows with a 64-bit time_t, where we are overriding the - 'struct timeval' type, get all declarations of system functions whose - signature contains 'struct timeval'. */ -#if (defined _MSC_VER || @REPLACE_STRUCT_TIMEVAL@) && @HAVE_WINSOCK2_H@ && !defined _GL_INCLUDING_WINSOCK2_H -# define _GL_INCLUDING_WINSOCK2_H -# include -# undef _GL_INCLUDING_WINSOCK2_H -#endif - -/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ - -/* The definition of _GL_ARG_NONNULL is copied here. */ - -/* The definition of _GL_WARN_ON_USE is copied here. */ - -#ifdef __cplusplus -extern "C" { -#endif - -#if !@HAVE_STRUCT_TIMEVAL@ || @REPLACE_STRUCT_TIMEVAL@ - -# if @REPLACE_STRUCT_TIMEVAL@ -# define timeval rpl_timeval -# endif - -# if !GNULIB_defined_struct_timeval -struct timeval -{ - time_t tv_sec; - long int tv_usec; -}; -# define GNULIB_defined_struct_timeval 1 -# endif - -#endif - -#ifdef __cplusplus -} -#endif - -#if @GNULIB_GETTIMEOFDAY@ -# if @REPLACE_GETTIMEOFDAY@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef gettimeofday -# define gettimeofday rpl_gettimeofday -# endif -_GL_FUNCDECL_RPL (gettimeofday, int, - (struct timeval *restrict, void *restrict) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (gettimeofday, int, - (struct timeval *restrict, void *restrict)); -# else -# if !@HAVE_GETTIMEOFDAY@ -_GL_FUNCDECL_SYS (gettimeofday, int, - (struct timeval *restrict, void *restrict) - _GL_ARG_NONNULL ((1))); -# endif -/* Need to cast, because on glibc systems, by default, the second argument is - struct timezone *. */ -_GL_CXXALIAS_SYS_CAST (gettimeofday, int, - (struct timeval *restrict, void *restrict)); -# endif -_GL_CXXALIASWARN (gettimeofday); -# if defined __cplusplus && defined GNULIB_NAMESPACE -namespace GNULIB_NAMESPACE { - typedef ::timeval -#undef timeval - timeval; -} -# endif -#elif defined GNULIB_POSIXCHECK -# undef gettimeofday -# if HAVE_RAW_DECL_GETTIMEOFDAY -_GL_WARN_ON_USE (gettimeofday, "gettimeofday is unportable - " - "use gnulib module gettimeofday for portability"); -# endif -#endif - -/* Hide some function declarations from . */ - -#if defined _MSC_VER && @HAVE_WINSOCK2_H@ -# if !defined _@GUARD_PREFIX@_UNISTD_H -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef close -# define close close_used_without_including_unistd_h -# else - _GL_WARN_ON_USE (close, - "close() used without including "); -# endif -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef gethostname -# define gethostname gethostname_used_without_including_unistd_h -# else - _GL_WARN_ON_USE (gethostname, - "gethostname() used without including "); -# endif -# endif -# if !defined _@GUARD_PREFIX@_SYS_SOCKET_H -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef socket -# define socket socket_used_without_including_sys_socket_h -# undef connect -# define connect connect_used_without_including_sys_socket_h -# undef accept -# define accept accept_used_without_including_sys_socket_h -# undef bind -# define bind bind_used_without_including_sys_socket_h -# undef getpeername -# define getpeername getpeername_used_without_including_sys_socket_h -# undef getsockname -# define getsockname getsockname_used_without_including_sys_socket_h -# undef getsockopt -# define getsockopt getsockopt_used_without_including_sys_socket_h -# undef listen -# define listen listen_used_without_including_sys_socket_h -# undef recv -# define recv recv_used_without_including_sys_socket_h -# undef send -# define send send_used_without_including_sys_socket_h -# undef recvfrom -# define recvfrom recvfrom_used_without_including_sys_socket_h -# undef sendto -# define sendto sendto_used_without_including_sys_socket_h -# undef setsockopt -# define setsockopt setsockopt_used_without_including_sys_socket_h -# undef shutdown -# define shutdown shutdown_used_without_including_sys_socket_h -# else - _GL_WARN_ON_USE (socket, - "socket() used without including "); - _GL_WARN_ON_USE (connect, - "connect() used without including "); - _GL_WARN_ON_USE (accept, - "accept() used without including "); - _GL_WARN_ON_USE (bind, - "bind() used without including "); - _GL_WARN_ON_USE (getpeername, - "getpeername() used without including "); - _GL_WARN_ON_USE (getsockname, - "getsockname() used without including "); - _GL_WARN_ON_USE (getsockopt, - "getsockopt() used without including "); - _GL_WARN_ON_USE (listen, - "listen() used without including "); - _GL_WARN_ON_USE (recv, - "recv() used without including "); - _GL_WARN_ON_USE (send, - "send() used without including "); - _GL_WARN_ON_USE (recvfrom, - "recvfrom() used without including "); - _GL_WARN_ON_USE (sendto, - "sendto() used without including "); - _GL_WARN_ON_USE (setsockopt, - "setsockopt() used without including "); - _GL_WARN_ON_USE (shutdown, - "shutdown() used without including "); -# endif -# endif -# if !defined _@GUARD_PREFIX@_SYS_SELECT_H -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef select -# define select select_used_without_including_sys_select_h -# else - _GL_WARN_ON_USE (select, - "select() used without including "); -# endif -# endif -#endif - -#endif /* _@GUARD_PREFIX@_SYS_TIME_H */ -#endif /* _CYGWIN_SYS_TIME_H */ -#endif /* _@GUARD_PREFIX@_SYS_TIME_H */ diff --git a/gl/sys_types.in.h b/gl/sys_types.in.h deleted file mode 100644 index 30ebfbd..0000000 --- a/gl/sys_types.in.h +++ /dev/null @@ -1,53 +0,0 @@ -/* Provide a more complete sys/types.h. - - Copyright (C) 2011-2017 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ - -#if __GNUC__ >= 3 -@PRAGMA_SYSTEM_HEADER@ -#endif -@PRAGMA_COLUMNS@ - -#ifndef _@GUARD_PREFIX@_SYS_TYPES_H - -/* The include_next requires a split double-inclusion guard. */ -# define _GL_INCLUDING_SYS_TYPES_H -#@INCLUDE_NEXT@ @NEXT_SYS_TYPES_H@ -# undef _GL_INCLUDING_SYS_TYPES_H - -#ifndef _@GUARD_PREFIX@_SYS_TYPES_H -#define _@GUARD_PREFIX@_SYS_TYPES_H - -/* Override off_t if Large File Support is requested on native Windows. */ -#if @WINDOWS_64_BIT_OFF_T@ -/* Same as int64_t in . */ -# if defined _MSC_VER -# define off_t __int64 -# else -# define off_t long long int -# endif -/* Indicator, for gnulib internal purposes. */ -# define _GL_WINDOWS_64_BIT_OFF_T 1 -#endif - -/* MSVC 9 defines size_t in , not in . */ -/* But avoid namespace pollution on glibc systems. */ -#if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) \ - && ! defined __GLIBC__ -# include -#endif - -#endif /* _@GUARD_PREFIX@_SYS_TYPES_H */ -#endif /* _@GUARD_PREFIX@_SYS_TYPES_H */ diff --git a/gl/time.in.h b/gl/time.in.h deleted file mode 100644 index fef8980..0000000 --- a/gl/time.in.h +++ /dev/null @@ -1,297 +0,0 @@ -/* A more-standard . - - Copyright (C) 2007-2017 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ - -#if __GNUC__ >= 3 -@PRAGMA_SYSTEM_HEADER@ -#endif -@PRAGMA_COLUMNS@ - -/* Don't get in the way of glibc when it includes time.h merely to - declare a few standard symbols, rather than to declare all the - symbols. (However, skip this for MinGW as it treats __need_time_t - incompatibly.) Also, Solaris 8 eventually includes itself - recursively; if that is happening, just include the system - without adding our own declarations. */ -#if (((defined __need_time_t || defined __need_clock_t \ - || defined __need_timespec) \ - && !defined __MINGW32__) \ - || defined _@GUARD_PREFIX@_TIME_H) - -# @INCLUDE_NEXT@ @NEXT_TIME_H@ - -#else - -# define _@GUARD_PREFIX@_TIME_H - -# @INCLUDE_NEXT@ @NEXT_TIME_H@ - -/* NetBSD 5.0 mis-defines NULL. */ -# include - -/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ - -/* The definition of _GL_ARG_NONNULL is copied here. */ - -/* The definition of _GL_WARN_ON_USE is copied here. */ - -/* Some systems don't define struct timespec (e.g., AIX 4.1, Ultrix 4.3). - Or they define it with the wrong member names or define it in - (e.g., FreeBSD circa 1997). Stock Mingw prior to 3.0 does not define it, - but the pthreads-win32 library defines it in . */ -# if ! @TIME_H_DEFINES_STRUCT_TIMESPEC@ -# if @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ -# include -# elif @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@ -# include -# elif @UNISTD_H_DEFINES_STRUCT_TIMESPEC@ -# include -# else - -# ifdef __cplusplus -extern "C" { -# endif - -# if !GNULIB_defined_struct_timespec -# undef timespec -# define timespec rpl_timespec -struct timespec -{ - time_t tv_sec; - long int tv_nsec; -}; -# define GNULIB_defined_struct_timespec 1 -# endif - -# ifdef __cplusplus -} -# endif - -# endif -# endif - -# if !GNULIB_defined_struct_time_t_must_be_integral -/* Per http://austingroupbugs.net/view.php?id=327, POSIX requires - time_t to be an integer type, even though C99 permits floating - point. We don't know of any implementation that uses floating - point, and it is much easier to write code that doesn't have to - worry about that corner case, so we force the issue. */ -struct __time_t_must_be_integral { - unsigned int __floating_time_t_unsupported : (time_t) 1; -}; -# define GNULIB_defined_struct_time_t_must_be_integral 1 -# endif - -/* Sleep for at least RQTP seconds unless interrupted, If interrupted, - return -1 and store the remaining time into RMTP. See - . */ -# if @GNULIB_NANOSLEEP@ -# if @REPLACE_NANOSLEEP@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define nanosleep rpl_nanosleep -# endif -_GL_FUNCDECL_RPL (nanosleep, int, - (struct timespec const *__rqtp, struct timespec *__rmtp) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (nanosleep, int, - (struct timespec const *__rqtp, struct timespec *__rmtp)); -# else -# if ! @HAVE_NANOSLEEP@ -_GL_FUNCDECL_SYS (nanosleep, int, - (struct timespec const *__rqtp, struct timespec *__rmtp) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (nanosleep, int, - (struct timespec const *__rqtp, struct timespec *__rmtp)); -# endif -_GL_CXXALIASWARN (nanosleep); -# endif - -/* Return the 'time_t' representation of TP and normalize TP. */ -# if @GNULIB_MKTIME@ -# if @REPLACE_MKTIME@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define mktime rpl_mktime -# endif -_GL_FUNCDECL_RPL (mktime, time_t, (struct tm *__tp) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (mktime, time_t, (struct tm *__tp)); -# else -_GL_CXXALIAS_SYS (mktime, time_t, (struct tm *__tp)); -# endif -_GL_CXXALIASWARN (mktime); -# endif - -/* Convert TIMER to RESULT, assuming local time and UTC respectively. See - and - . */ -# if @GNULIB_TIME_R@ -# if @REPLACE_LOCALTIME_R@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef localtime_r -# define localtime_r rpl_localtime_r -# endif -_GL_FUNCDECL_RPL (localtime_r, struct tm *, (time_t const *restrict __timer, - struct tm *restrict __result) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (localtime_r, struct tm *, (time_t const *restrict __timer, - struct tm *restrict __result)); -# else -# if ! @HAVE_DECL_LOCALTIME_R@ -_GL_FUNCDECL_SYS (localtime_r, struct tm *, (time_t const *restrict __timer, - struct tm *restrict __result) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (localtime_r, struct tm *, (time_t const *restrict __timer, - struct tm *restrict __result)); -# endif -# if @HAVE_DECL_LOCALTIME_R@ -_GL_CXXALIASWARN (localtime_r); -# endif -# if @REPLACE_LOCALTIME_R@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef gmtime_r -# define gmtime_r rpl_gmtime_r -# endif -_GL_FUNCDECL_RPL (gmtime_r, struct tm *, (time_t const *restrict __timer, - struct tm *restrict __result) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (gmtime_r, struct tm *, (time_t const *restrict __timer, - struct tm *restrict __result)); -# else -# if ! @HAVE_DECL_LOCALTIME_R@ -_GL_FUNCDECL_SYS (gmtime_r, struct tm *, (time_t const *restrict __timer, - struct tm *restrict __result) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (gmtime_r, struct tm *, (time_t const *restrict __timer, - struct tm *restrict __result)); -# endif -# if @HAVE_DECL_LOCALTIME_R@ -_GL_CXXALIASWARN (gmtime_r); -# endif -# endif - -/* Convert TIMER to RESULT, assuming local time and UTC respectively. See - and - . */ -# if @GNULIB_GETTIMEOFDAY@ -# if @REPLACE_LOCALTIME@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef localtime -# define localtime rpl_localtime -# endif -_GL_FUNCDECL_RPL (localtime, struct tm *, (time_t const *__timer) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (localtime, struct tm *, (time_t const *__timer)); -# else -_GL_CXXALIAS_SYS (localtime, struct tm *, (time_t const *__timer)); -# endif -_GL_CXXALIASWARN (localtime); -# endif - -# if @GNULIB_GETTIMEOFDAY@ -# if @REPLACE_GMTIME@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef gmtime -# define gmtime rpl_gmtime -# endif -_GL_FUNCDECL_RPL (gmtime, struct tm *, (time_t const *__timer) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (gmtime, struct tm *, (time_t const *__timer)); -# else -_GL_CXXALIAS_SYS (gmtime, struct tm *, (time_t const *__timer)); -# endif -_GL_CXXALIASWARN (gmtime); -# endif - -/* Parse BUF as a timestamp, assuming FORMAT specifies its layout, and store - the resulting broken-down time into TM. See - . */ -# if @GNULIB_STRPTIME@ -# if ! @HAVE_STRPTIME@ -_GL_FUNCDECL_SYS (strptime, char *, (char const *restrict __buf, - char const *restrict __format, - struct tm *restrict __tm) - _GL_ARG_NONNULL ((1, 2, 3))); -# endif -_GL_CXXALIAS_SYS (strptime, char *, (char const *restrict __buf, - char const *restrict __format, - struct tm *restrict __tm)); -_GL_CXXALIASWARN (strptime); -# endif - -# if defined _GNU_SOURCE && @GNULIB_TIME_RZ@ && ! @HAVE_TIMEZONE_T@ -typedef struct tm_zone *timezone_t; -_GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); -_GL_CXXALIAS_SYS (tzalloc, timezone_t, (char const *__name)); -_GL_FUNCDECL_SYS (tzfree, void, (timezone_t __tz)); -_GL_CXXALIAS_SYS (tzfree, void, (timezone_t __tz)); -_GL_FUNCDECL_SYS (localtime_rz, struct tm *, - (timezone_t __tz, time_t const *restrict __timer, - struct tm *restrict __result) _GL_ARG_NONNULL ((2, 3))); -_GL_CXXALIAS_SYS (localtime_rz, struct tm *, - (timezone_t __tz, time_t const *restrict __timer, - struct tm *restrict __result)); -_GL_FUNCDECL_SYS (mktime_z, time_t, - (timezone_t __tz, struct tm *restrict __result) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_SYS (mktime_z, time_t, - (timezone_t __tz, struct tm *restrict __result)); -# endif - -/* Convert TM to a time_t value, assuming UTC. */ -# if @GNULIB_TIMEGM@ -# if @REPLACE_TIMEGM@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef timegm -# define timegm rpl_timegm -# endif -_GL_FUNCDECL_RPL (timegm, time_t, (struct tm *__tm) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (timegm, time_t, (struct tm *__tm)); -# else -# if ! @HAVE_TIMEGM@ -_GL_FUNCDECL_SYS (timegm, time_t, (struct tm *__tm) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (timegm, time_t, (struct tm *__tm)); -# endif -_GL_CXXALIASWARN (timegm); -# endif - -/* Encourage applications to avoid unsafe functions that can overrun - buffers when given outlandish struct tm values. Portable - applications should use strftime (or even sprintf) instead. */ -# if defined GNULIB_POSIXCHECK -# undef asctime -_GL_WARN_ON_USE (asctime, "asctime can overrun buffers in some cases - " - "better use strftime (or even sprintf) instead"); -# endif -# if defined GNULIB_POSIXCHECK -# undef asctime_r -_GL_WARN_ON_USE (asctime, "asctime_r can overrun buffers in some cases - " - "better use strftime (or even sprintf) instead"); -# endif -# if defined GNULIB_POSIXCHECK -# undef ctime -_GL_WARN_ON_USE (asctime, "ctime can overrun buffers in some cases - " - "better use strftime (or even sprintf) instead"); -# endif -# if defined GNULIB_POSIXCHECK -# undef ctime_r -_GL_WARN_ON_USE (asctime, "ctime_r can overrun buffers in some cases - " - "better use strftime (or even sprintf) instead"); -# endif - -#endif diff --git a/gl/timespec.c b/gl/timespec.c deleted file mode 100644 index 2b6098e..0000000 --- a/gl/timespec.c +++ /dev/null @@ -1,3 +0,0 @@ -#include -#define _GL_TIMESPEC_INLINE _GL_EXTERN_INLINE -#include "timespec.h" diff --git a/gl/timespec.h b/gl/timespec.h deleted file mode 100644 index a5eca79..0000000 --- a/gl/timespec.h +++ /dev/null @@ -1,112 +0,0 @@ -/* timespec -- System time interface - - Copyright (C) 2000, 2002, 2004-2005, 2007, 2009-2017 Free Software - Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#if ! defined TIMESPEC_H -# define TIMESPEC_H - -# include - -#ifndef _GL_INLINE_HEADER_BEGIN - #error "Please include config.h first." -#endif -_GL_INLINE_HEADER_BEGIN -#ifndef _GL_TIMESPEC_INLINE -# define _GL_TIMESPEC_INLINE _GL_INLINE -#endif - -/* Resolution of timespec timestamps (in units per second), and log - base 10 of the resolution. */ - -enum { TIMESPEC_RESOLUTION = 1000000000 }; -enum { LOG10_TIMESPEC_RESOLUTION = 9 }; - -/* Return a timespec with seconds S and nanoseconds NS. */ - -_GL_TIMESPEC_INLINE struct timespec -make_timespec (time_t s, long int ns) -{ - struct timespec r; - r.tv_sec = s; - r.tv_nsec = ns; - return r; -} - -/* Return negative, zero, positive if A < B, A == B, A > B, respectively. - - For each timestamp T, this code assumes that either: - - * T.tv_nsec is in the range 0..999999999; or - * T.tv_sec corresponds to a valid leap second on a host that supports - leap seconds, and T.tv_nsec is in the range 1000000000..1999999999; or - * T.tv_sec is the minimum time_t value and T.tv_nsec is -1; or - T.tv_sec is the maximum time_t value and T.tv_nsec is 2000000000. - This allows for special struct timespec values that are less or - greater than all possible valid timestamps. - - In all these cases, it is safe to subtract two tv_nsec values and - convert the result to integer without worrying about overflow on - any platform of interest to the GNU project, since all such - platforms have 32-bit int or wider. - - Replacing "(int) (a.tv_nsec - b.tv_nsec)" with something like - "a.tv_nsec < b.tv_nsec ? -1 : a.tv_nsec > b.tv_nsec" would cause - this function to work in some cases where the above assumption is - violated, but not in all cases (e.g., a.tv_sec==1, a.tv_nsec==-2, - b.tv_sec==0, b.tv_nsec==999999999) and is arguably not worth the - extra instructions. Using a subtraction has the advantage of - detecting some invalid cases on platforms that detect integer - overflow. - - The (int) cast avoids a gcc -Wconversion warning. */ - -_GL_TIMESPEC_INLINE int _GL_ATTRIBUTE_PURE -timespec_cmp (struct timespec a, struct timespec b) -{ - return (a.tv_sec < b.tv_sec ? -1 - : a.tv_sec > b.tv_sec ? 1 - : (int) (a.tv_nsec - b.tv_nsec)); -} - -/* Return -1, 0, 1, depending on the sign of A. A.tv_nsec must be - nonnegative. */ -_GL_TIMESPEC_INLINE int _GL_ATTRIBUTE_PURE -timespec_sign (struct timespec a) -{ - return a.tv_sec < 0 ? -1 : a.tv_sec || a.tv_nsec; -} - -struct timespec timespec_add (struct timespec, struct timespec) - _GL_ATTRIBUTE_CONST; -struct timespec timespec_sub (struct timespec, struct timespec) - _GL_ATTRIBUTE_CONST; -struct timespec dtotimespec (double) - _GL_ATTRIBUTE_CONST; - -/* Return an approximation to A, of type 'double'. */ -_GL_TIMESPEC_INLINE double -timespectod (struct timespec a) -{ - return a.tv_sec + a.tv_nsec / 1e9; -} - -void gettime (struct timespec *); -int settime (struct timespec const *); - -_GL_INLINE_HEADER_END - -#endif diff --git a/gl/unistd.c b/gl/unistd.c deleted file mode 100644 index 72bad1c..0000000 --- a/gl/unistd.c +++ /dev/null @@ -1,4 +0,0 @@ -#include -#define _GL_UNISTD_INLINE _GL_EXTERN_INLINE -#include "unistd.h" -typedef int dummy; diff --git a/gl/unistd.in.h b/gl/unistd.in.h deleted file mode 100644 index d5fa34d..0000000 --- a/gl/unistd.in.h +++ /dev/null @@ -1,1590 +0,0 @@ -/* Substitute for and wrapper around . - Copyright (C) 2003-2017 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ - -#ifndef _@GUARD_PREFIX@_UNISTD_H - -#if __GNUC__ >= 3 -@PRAGMA_SYSTEM_HEADER@ -#endif -@PRAGMA_COLUMNS@ - -#ifdef _GL_INCLUDING_UNISTD_H -/* Special invocation convention: - - On Mac OS X 10.3.9 we have a sequence of nested includes - -> -> -> - In this situation, the functions are not yet declared, therefore we cannot - provide the C++ aliases. */ - -#@INCLUDE_NEXT@ @NEXT_UNISTD_H@ - -#else -/* Normal invocation convention. */ - -/* The include_next requires a split double-inclusion guard. */ -#if @HAVE_UNISTD_H@ -# define _GL_INCLUDING_UNISTD_H -# @INCLUDE_NEXT@ @NEXT_UNISTD_H@ -# undef _GL_INCLUDING_UNISTD_H -#endif - -/* Get all possible declarations of gethostname(). */ -#if @GNULIB_GETHOSTNAME@ && @UNISTD_H_HAVE_WINSOCK2_H@ \ - && !defined _GL_INCLUDING_WINSOCK2_H -# define _GL_INCLUDING_WINSOCK2_H -# include -# undef _GL_INCLUDING_WINSOCK2_H -#endif - -#if !defined _@GUARD_PREFIX@_UNISTD_H && !defined _GL_INCLUDING_WINSOCK2_H -#define _@GUARD_PREFIX@_UNISTD_H - -/* NetBSD 5.0 mis-defines NULL. Also get size_t. */ -#include - -/* mingw doesn't define the SEEK_* or *_FILENO macros in . */ -/* MSVC declares 'unlink' in , not in . We must include - it before we #define unlink rpl_unlink. */ -/* Cygwin 1.7.1 declares symlinkat in , not in . */ -/* But avoid namespace pollution on glibc systems. */ -#if (!(defined SEEK_CUR && defined SEEK_END && defined SEEK_SET) \ - || ((@GNULIB_UNLINK@ || defined GNULIB_POSIXCHECK) \ - && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)) \ - || ((@GNULIB_SYMLINKAT@ || defined GNULIB_POSIXCHECK) \ - && defined __CYGWIN__)) \ - && ! defined __GLIBC__ -# include -#endif - -/* Cygwin 1.7.1 declares unlinkat in , not in . */ -/* But avoid namespace pollution on glibc systems. */ -#if (@GNULIB_UNLINKAT@ || defined GNULIB_POSIXCHECK) && defined __CYGWIN__ \ - && ! defined __GLIBC__ -# include -#endif - -/* mingw fails to declare _exit in . */ -/* mingw, MSVC, BeOS, Haiku declare environ in , not in - . */ -/* Solaris declares getcwd not only in but also in . */ -/* OSF Tru64 Unix cannot see gnulib rpl_strtod when system is - included here. */ -/* But avoid namespace pollution on glibc systems. */ -#if !defined __GLIBC__ && !defined __osf__ -# define __need_system_stdlib_h -# include -# undef __need_system_stdlib_h -#endif - -/* Native Windows platforms declare chdir, getcwd, rmdir in - and/or , not in . - They also declare access(), chmod(), close(), dup(), dup2(), isatty(), - lseek(), read(), unlink(), write() in . */ -#if ((@GNULIB_CHDIR@ || @GNULIB_GETCWD@ || @GNULIB_RMDIR@ \ - || defined GNULIB_POSIXCHECK) \ - && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)) -# include /* mingw32, mingw64 */ -# include /* mingw64, MSVC 9 */ -#elif (@GNULIB_CLOSE@ || @GNULIB_DUP@ || @GNULIB_DUP2@ || @GNULIB_ISATTY@ \ - || @GNULIB_LSEEK@ || @GNULIB_READ@ || @GNULIB_UNLINK@ || @GNULIB_WRITE@ \ - || defined GNULIB_POSIXCHECK) \ - && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) -# include -#endif - -/* AIX and OSF/1 5.1 declare getdomainname in , not in . - NonStop Kernel declares gethostname in , not in . */ -/* But avoid namespace pollution on glibc systems. */ -#if ((@GNULIB_GETDOMAINNAME@ && (defined _AIX || defined __osf__)) \ - || (@GNULIB_GETHOSTNAME@ && defined __TANDEM)) \ - && !defined __GLIBC__ -# include -#endif - -/* MSVC defines off_t in . - May also define off_t to a 64-bit type on native Windows. */ -#if !@HAVE_UNISTD_H@ || @WINDOWS_64_BIT_OFF_T@ -/* Get off_t. */ -# include -#endif - -#if (@GNULIB_READ@ || @GNULIB_WRITE@ \ - || @GNULIB_READLINK@ || @GNULIB_READLINKAT@ \ - || @GNULIB_PREAD@ || @GNULIB_PWRITE@ || defined GNULIB_POSIXCHECK) -/* Get ssize_t. */ -# include -#endif - -/* Get getopt(), optarg, optind, opterr, optopt. - But avoid namespace pollution on glibc systems. */ -#if @GNULIB_UNISTD_H_GETOPT@ && !defined __GLIBC__ && !defined _GL_SYSTEM_GETOPT -# define __need_getopt -# include -#endif - -#ifndef _GL_INLINE_HEADER_BEGIN - #error "Please include config.h first." -#endif -_GL_INLINE_HEADER_BEGIN -#ifndef _GL_UNISTD_INLINE -# define _GL_UNISTD_INLINE _GL_INLINE -#endif - -/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ - -/* The definition of _GL_ARG_NONNULL is copied here. */ - -/* The definition of _GL_WARN_ON_USE is copied here. */ - - -/* Hide some function declarations from . */ - -#if @GNULIB_GETHOSTNAME@ && @UNISTD_H_HAVE_WINSOCK2_H@ -# if !defined _@GUARD_PREFIX@_SYS_SOCKET_H -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef socket -# define socket socket_used_without_including_sys_socket_h -# undef connect -# define connect connect_used_without_including_sys_socket_h -# undef accept -# define accept accept_used_without_including_sys_socket_h -# undef bind -# define bind bind_used_without_including_sys_socket_h -# undef getpeername -# define getpeername getpeername_used_without_including_sys_socket_h -# undef getsockname -# define getsockname getsockname_used_without_including_sys_socket_h -# undef getsockopt -# define getsockopt getsockopt_used_without_including_sys_socket_h -# undef listen -# define listen listen_used_without_including_sys_socket_h -# undef recv -# define recv recv_used_without_including_sys_socket_h -# undef send -# define send send_used_without_including_sys_socket_h -# undef recvfrom -# define recvfrom recvfrom_used_without_including_sys_socket_h -# undef sendto -# define sendto sendto_used_without_including_sys_socket_h -# undef setsockopt -# define setsockopt setsockopt_used_without_including_sys_socket_h -# undef shutdown -# define shutdown shutdown_used_without_including_sys_socket_h -# else - _GL_WARN_ON_USE (socket, - "socket() used without including "); - _GL_WARN_ON_USE (connect, - "connect() used without including "); - _GL_WARN_ON_USE (accept, - "accept() used without including "); - _GL_WARN_ON_USE (bind, - "bind() used without including "); - _GL_WARN_ON_USE (getpeername, - "getpeername() used without including "); - _GL_WARN_ON_USE (getsockname, - "getsockname() used without including "); - _GL_WARN_ON_USE (getsockopt, - "getsockopt() used without including "); - _GL_WARN_ON_USE (listen, - "listen() used without including "); - _GL_WARN_ON_USE (recv, - "recv() used without including "); - _GL_WARN_ON_USE (send, - "send() used without including "); - _GL_WARN_ON_USE (recvfrom, - "recvfrom() used without including "); - _GL_WARN_ON_USE (sendto, - "sendto() used without including "); - _GL_WARN_ON_USE (setsockopt, - "setsockopt() used without including "); - _GL_WARN_ON_USE (shutdown, - "shutdown() used without including "); -# endif -# endif -# if !defined _@GUARD_PREFIX@_SYS_SELECT_H -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef select -# define select select_used_without_including_sys_select_h -# else - _GL_WARN_ON_USE (select, - "select() used without including "); -# endif -# endif -#endif - - -/* OS/2 EMX lacks these macros. */ -#ifndef STDIN_FILENO -# define STDIN_FILENO 0 -#endif -#ifndef STDOUT_FILENO -# define STDOUT_FILENO 1 -#endif -#ifndef STDERR_FILENO -# define STDERR_FILENO 2 -#endif - -/* Ensure *_OK macros exist. */ -#ifndef F_OK -# define F_OK 0 -# define X_OK 1 -# define W_OK 2 -# define R_OK 4 -#endif - - -/* Declare overridden functions. */ - - -#if defined GNULIB_POSIXCHECK -/* The access() function is a security risk. */ -_GL_WARN_ON_USE (access, "the access function is a security risk - " - "use the gnulib module faccessat instead"); -#endif - - -#if @GNULIB_CHDIR@ -_GL_CXXALIAS_SYS (chdir, int, (const char *file) _GL_ARG_NONNULL ((1))); -_GL_CXXALIASWARN (chdir); -#elif defined GNULIB_POSIXCHECK -# undef chdir -# if HAVE_RAW_DECL_CHDIR -_GL_WARN_ON_USE (chown, "chdir is not always in - " - "use gnulib module chdir for portability"); -# endif -#endif - - -#if @GNULIB_CHOWN@ -/* Change the owner of FILE to UID (if UID is not -1) and the group of FILE - to GID (if GID is not -1). Follow symbolic links. - Return 0 if successful, otherwise -1 and errno set. - See the POSIX:2008 specification - . */ -# if @REPLACE_DUP2@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define dup2 rpl_dup2 -# endif -_GL_FUNCDECL_RPL (dup2, int, (int oldfd, int newfd)); -_GL_CXXALIAS_RPL (dup2, int, (int oldfd, int newfd)); -# else -# if !@HAVE_DUP2@ -_GL_FUNCDECL_SYS (dup2, int, (int oldfd, int newfd)); -# endif -_GL_CXXALIAS_SYS (dup2, int, (int oldfd, int newfd)); -# endif -_GL_CXXALIASWARN (dup2); -#elif defined GNULIB_POSIXCHECK -# undef dup2 -# if HAVE_RAW_DECL_DUP2 -_GL_WARN_ON_USE (dup2, "dup2 is unportable - " - "use gnulib module dup2 for portability"); -# endif -#endif - - -#if @GNULIB_DUP3@ -/* Copy the file descriptor OLDFD into file descriptor NEWFD, with the - specified flags. - The flags are a bitmask, possibly including O_CLOEXEC (defined in ) - and O_TEXT, O_BINARY (defined in "binary-io.h"). - Close NEWFD first if it is open. - Return newfd if successful, otherwise -1 and errno set. - See the Linux man page at - . */ -# if @HAVE_DUP3@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define dup3 rpl_dup3 -# endif -_GL_FUNCDECL_RPL (dup3, int, (int oldfd, int newfd, int flags)); -_GL_CXXALIAS_RPL (dup3, int, (int oldfd, int newfd, int flags)); -# else -_GL_FUNCDECL_SYS (dup3, int, (int oldfd, int newfd, int flags)); -_GL_CXXALIAS_SYS (dup3, int, (int oldfd, int newfd, int flags)); -# endif -_GL_CXXALIASWARN (dup3); -#elif defined GNULIB_POSIXCHECK -# undef dup3 -# if HAVE_RAW_DECL_DUP3 -_GL_WARN_ON_USE (dup3, "dup3 is unportable - " - "use gnulib module dup3 for portability"); -# endif -#endif - - -#if @GNULIB_ENVIRON@ -# if !@HAVE_DECL_ENVIRON@ -/* Set of environment variables and values. An array of strings of the form - "VARIABLE=VALUE", terminated with a NULL. */ -# if defined __APPLE__ && defined __MACH__ -# include -# if !TARGET_OS_IPHONE && !TARGET_IPHONE_SIMULATOR -# define _GL_USE_CRT_EXTERNS -# endif -# endif -# ifdef _GL_USE_CRT_EXTERNS -# include -# define environ (*_NSGetEnviron ()) -# else -# ifdef __cplusplus -extern "C" { -# endif -extern char **environ; -# ifdef __cplusplus -} -# endif -# endif -# endif -#elif defined GNULIB_POSIXCHECK -# if HAVE_RAW_DECL_ENVIRON -_GL_UNISTD_INLINE char *** -rpl_environ (void) -{ - return &environ; -} -_GL_WARN_ON_USE (rpl_environ, "environ is unportable - " - "use gnulib module environ for portability"); -# undef environ -# define environ (*rpl_environ ()) -# endif -#endif - - -#if @GNULIB_EUIDACCESS@ -/* Like access(), except that it uses the effective user id and group id of - the current process. */ -# if !@HAVE_EUIDACCESS@ -_GL_FUNCDECL_SYS (euidaccess, int, (const char *filename, int mode) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (euidaccess, int, (const char *filename, int mode)); -_GL_CXXALIASWARN (euidaccess); -# if defined GNULIB_POSIXCHECK -/* Like access(), this function is a security risk. */ -_GL_WARN_ON_USE (euidaccess, "the euidaccess function is a security risk - " - "use the gnulib module faccessat instead"); -# endif -#elif defined GNULIB_POSIXCHECK -# undef euidaccess -# if HAVE_RAW_DECL_EUIDACCESS -_GL_WARN_ON_USE (euidaccess, "euidaccess is unportable - " - "use gnulib module euidaccess for portability"); -# endif -#endif - - -#if @GNULIB_FACCESSAT@ -# if !@HAVE_FACCESSAT@ -_GL_FUNCDECL_SYS (faccessat, int, - (int fd, char const *file, int mode, int flag) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (faccessat, int, - (int fd, char const *file, int mode, int flag)); -_GL_CXXALIASWARN (faccessat); -#elif defined GNULIB_POSIXCHECK -# undef faccessat -# if HAVE_RAW_DECL_FACCESSAT -_GL_WARN_ON_USE (faccessat, "faccessat is not portable - " - "use gnulib module faccessat for portability"); -# endif -#endif - - -#if @GNULIB_FCHDIR@ -/* Change the process' current working directory to the directory on which - the given file descriptor is open. - Return 0 if successful, otherwise -1 and errno set. - See the POSIX:2008 specification - . */ -# if ! @HAVE_FCHDIR@ -_GL_FUNCDECL_SYS (fchdir, int, (int /*fd*/)); - -/* Gnulib internal hooks needed to maintain the fchdir metadata. */ -_GL_EXTERN_C int _gl_register_fd (int fd, const char *filename) - _GL_ARG_NONNULL ((2)); -_GL_EXTERN_C void _gl_unregister_fd (int fd); -_GL_EXTERN_C int _gl_register_dup (int oldfd, int newfd); -_GL_EXTERN_C const char *_gl_directory_name (int fd); - -# else -# if !@HAVE_DECL_FCHDIR@ -_GL_FUNCDECL_SYS (fchdir, int, (int /*fd*/)); -# endif -# endif -_GL_CXXALIAS_SYS (fchdir, int, (int /*fd*/)); -_GL_CXXALIASWARN (fchdir); -#elif defined GNULIB_POSIXCHECK -# undef fchdir -# if HAVE_RAW_DECL_FCHDIR -_GL_WARN_ON_USE (fchdir, "fchdir is unportable - " - "use gnulib module fchdir for portability"); -# endif -#endif - - -#if @GNULIB_FCHOWNAT@ -# if @REPLACE_FCHOWNAT@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fchownat -# define fchownat rpl_fchownat -# endif -_GL_FUNCDECL_RPL (fchownat, int, (int fd, char const *file, - uid_t owner, gid_t group, int flag) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (fchownat, int, (int fd, char const *file, - uid_t owner, gid_t group, int flag)); -# else -# if !@HAVE_FCHOWNAT@ -_GL_FUNCDECL_SYS (fchownat, int, (int fd, char const *file, - uid_t owner, gid_t group, int flag) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (fchownat, int, (int fd, char const *file, - uid_t owner, gid_t group, int flag)); -# endif -_GL_CXXALIASWARN (fchownat); -#elif defined GNULIB_POSIXCHECK -# undef fchownat -# if HAVE_RAW_DECL_FCHOWNAT -_GL_WARN_ON_USE (fchownat, "fchownat is not portable - " - "use gnulib module openat for portability"); -# endif -#endif - - -#if @GNULIB_FDATASYNC@ -/* Synchronize changes to a file. - Return 0 if successful, otherwise -1 and errno set. - See POSIX:2008 specification - . */ -# if !@HAVE_FDATASYNC@ || !@HAVE_DECL_FDATASYNC@ -_GL_FUNCDECL_SYS (fdatasync, int, (int fd)); -# endif -_GL_CXXALIAS_SYS (fdatasync, int, (int fd)); -_GL_CXXALIASWARN (fdatasync); -#elif defined GNULIB_POSIXCHECK -# undef fdatasync -# if HAVE_RAW_DECL_FDATASYNC -_GL_WARN_ON_USE (fdatasync, "fdatasync is unportable - " - "use gnulib module fdatasync for portability"); -# endif -#endif - - -#if @GNULIB_FSYNC@ -/* Synchronize changes, including metadata, to a file. - Return 0 if successful, otherwise -1 and errno set. - See POSIX:2008 specification - . */ -# if !@HAVE_FSYNC@ -_GL_FUNCDECL_SYS (fsync, int, (int fd)); -# endif -_GL_CXXALIAS_SYS (fsync, int, (int fd)); -_GL_CXXALIASWARN (fsync); -#elif defined GNULIB_POSIXCHECK -# undef fsync -# if HAVE_RAW_DECL_FSYNC -_GL_WARN_ON_USE (fsync, "fsync is unportable - " - "use gnulib module fsync for portability"); -# endif -#endif - - -#if @GNULIB_FTRUNCATE@ -/* Change the size of the file to which FD is opened to become equal to LENGTH. - Return 0 if successful, otherwise -1 and errno set. - See the POSIX:2008 specification - . */ -# if @REPLACE_FTRUNCATE@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ftruncate -# define ftruncate rpl_ftruncate -# endif -_GL_FUNCDECL_RPL (ftruncate, int, (int fd, off_t length)); -_GL_CXXALIAS_RPL (ftruncate, int, (int fd, off_t length)); -# else -# if !@HAVE_FTRUNCATE@ -_GL_FUNCDECL_SYS (ftruncate, int, (int fd, off_t length)); -# endif -_GL_CXXALIAS_SYS (ftruncate, int, (int fd, off_t length)); -# endif -_GL_CXXALIASWARN (ftruncate); -#elif defined GNULIB_POSIXCHECK -# undef ftruncate -# if HAVE_RAW_DECL_FTRUNCATE -_GL_WARN_ON_USE (ftruncate, "ftruncate is unportable - " - "use gnulib module ftruncate for portability"); -# endif -#endif - - -#if @GNULIB_GETCWD@ -/* Get the name of the current working directory, and put it in SIZE bytes - of BUF. - Return BUF if successful, or NULL if the directory couldn't be determined - or SIZE was too small. - See the POSIX:2008 specification - . - Additionally, the gnulib module 'getcwd' guarantees the following GNU - extension: If BUF is NULL, an array is allocated with 'malloc'; the array - is SIZE bytes long, unless SIZE == 0, in which case it is as big as - necessary. */ -# if @REPLACE_GETCWD@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define getcwd rpl_getcwd -# endif -_GL_FUNCDECL_RPL (getcwd, char *, (char *buf, size_t size)); -_GL_CXXALIAS_RPL (getcwd, char *, (char *buf, size_t size)); -# else -/* Need to cast, because on mingw, the second parameter is - int size. */ -_GL_CXXALIAS_SYS_CAST (getcwd, char *, (char *buf, size_t size)); -# endif -_GL_CXXALIASWARN (getcwd); -#elif defined GNULIB_POSIXCHECK -# undef getcwd -# if HAVE_RAW_DECL_GETCWD -_GL_WARN_ON_USE (getcwd, "getcwd is unportable - " - "use gnulib module getcwd for portability"); -# endif -#endif - - -#if @GNULIB_GETDOMAINNAME@ -/* Return the NIS domain name of the machine. - WARNING! The NIS domain name is unrelated to the fully qualified host name - of the machine. It is also unrelated to email addresses. - WARNING! The NIS domain name is usually the empty string or "(none)" when - not using NIS. - - Put up to LEN bytes of the NIS domain name into NAME. - Null terminate it if the name is shorter than LEN. - If the NIS domain name is longer than LEN, set errno = EINVAL and return -1. - Return 0 if successful, otherwise set errno and return -1. */ -# if @REPLACE_GETDOMAINNAME@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef getdomainname -# define getdomainname rpl_getdomainname -# endif -_GL_FUNCDECL_RPL (getdomainname, int, (char *name, size_t len) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (getdomainname, int, (char *name, size_t len)); -# else -# if !@HAVE_DECL_GETDOMAINNAME@ -_GL_FUNCDECL_SYS (getdomainname, int, (char *name, size_t len) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (getdomainname, int, (char *name, size_t len)); -# endif -_GL_CXXALIASWARN (getdomainname); -#elif defined GNULIB_POSIXCHECK -# undef getdomainname -# if HAVE_RAW_DECL_GETDOMAINNAME -_GL_WARN_ON_USE (getdomainname, "getdomainname is unportable - " - "use gnulib module getdomainname for portability"); -# endif -#endif - - -#if @GNULIB_GETDTABLESIZE@ -/* Return the maximum number of file descriptors in the current process. - In POSIX, this is same as sysconf (_SC_OPEN_MAX). */ -# if @REPLACE_GETDTABLESIZE@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef getdtablesize -# define getdtablesize rpl_getdtablesize -# endif -_GL_FUNCDECL_RPL (getdtablesize, int, (void)); -_GL_CXXALIAS_RPL (getdtablesize, int, (void)); -# else -# if !@HAVE_GETDTABLESIZE@ -_GL_FUNCDECL_SYS (getdtablesize, int, (void)); -# endif -_GL_CXXALIAS_SYS (getdtablesize, int, (void)); -# endif -_GL_CXXALIASWARN (getdtablesize); -#elif defined GNULIB_POSIXCHECK -# undef getdtablesize -# if HAVE_RAW_DECL_GETDTABLESIZE -_GL_WARN_ON_USE (getdtablesize, "getdtablesize is unportable - " - "use gnulib module getdtablesize for portability"); -# endif -#endif - - -#if @GNULIB_GETGROUPS@ -/* Return the supplemental groups that the current process belongs to. - It is unspecified whether the effective group id is in the list. - If N is 0, return the group count; otherwise, N describes how many - entries are available in GROUPS. Return -1 and set errno if N is - not 0 and not large enough. Fails with ENOSYS on some systems. */ -# if @REPLACE_GETGROUPS@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef getgroups -# define getgroups rpl_getgroups -# endif -_GL_FUNCDECL_RPL (getgroups, int, (int n, gid_t *groups)); -_GL_CXXALIAS_RPL (getgroups, int, (int n, gid_t *groups)); -# else -# if !@HAVE_GETGROUPS@ -_GL_FUNCDECL_SYS (getgroups, int, (int n, gid_t *groups)); -# endif -_GL_CXXALIAS_SYS (getgroups, int, (int n, gid_t *groups)); -# endif -_GL_CXXALIASWARN (getgroups); -#elif defined GNULIB_POSIXCHECK -# undef getgroups -# if HAVE_RAW_DECL_GETGROUPS -_GL_WARN_ON_USE (getgroups, "getgroups is unportable - " - "use gnulib module getgroups for portability"); -# endif -#endif - - -#if @GNULIB_GETHOSTNAME@ -/* Return the standard host name of the machine. - WARNING! The host name may or may not be fully qualified. - - Put up to LEN bytes of the host name into NAME. - Null terminate it if the name is shorter than LEN. - If the host name is longer than LEN, set errno = EINVAL and return -1. - Return 0 if successful, otherwise set errno and return -1. */ -# if @UNISTD_H_HAVE_WINSOCK2_H@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef gethostname -# define gethostname rpl_gethostname -# endif -_GL_FUNCDECL_RPL (gethostname, int, (char *name, size_t len) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (gethostname, int, (char *name, size_t len)); -# else -# if !@HAVE_GETHOSTNAME@ -_GL_FUNCDECL_SYS (gethostname, int, (char *name, size_t len) - _GL_ARG_NONNULL ((1))); -# endif -/* Need to cast, because on Solaris 10 and OSF/1 5.1 systems, the second - parameter is - int len. */ -_GL_CXXALIAS_SYS_CAST (gethostname, int, (char *name, size_t len)); -# endif -_GL_CXXALIASWARN (gethostname); -#elif @UNISTD_H_HAVE_WINSOCK2_H@ -# undef gethostname -# define gethostname gethostname_used_without_requesting_gnulib_module_gethostname -#elif defined GNULIB_POSIXCHECK -# undef gethostname -# if HAVE_RAW_DECL_GETHOSTNAME -_GL_WARN_ON_USE (gethostname, "gethostname is unportable - " - "use gnulib module gethostname for portability"); -# endif -#endif - - -#if @GNULIB_GETLOGIN@ -/* Returns the user's login name, or NULL if it cannot be found. Upon error, - returns NULL with errno set. - - See . - - Most programs don't need to use this function, because the information is - available through environment variables: - ${LOGNAME-$USER} on Unix platforms, - $USERNAME on native Windows platforms. - */ -# if !@HAVE_DECL_GETLOGIN@ -_GL_FUNCDECL_SYS (getlogin, char *, (void)); -# endif -_GL_CXXALIAS_SYS (getlogin, char *, (void)); -_GL_CXXALIASWARN (getlogin); -#elif defined GNULIB_POSIXCHECK -# undef getlogin -# if HAVE_RAW_DECL_GETLOGIN -_GL_WARN_ON_USE (getlogin, "getlogin is unportable - " - "use gnulib module getlogin for portability"); -# endif -#endif - - -#if @GNULIB_GETLOGIN_R@ -/* Copies the user's login name to NAME. - The array pointed to by NAME has room for SIZE bytes. - - Returns 0 if successful. Upon error, an error number is returned, or -1 in - the case that the login name cannot be found but no specific error is - provided (this case is hopefully rare but is left open by the POSIX spec). - - See . - - Most programs don't need to use this function, because the information is - available through environment variables: - ${LOGNAME-$USER} on Unix platforms, - $USERNAME on native Windows platforms. - */ -# if @REPLACE_GETLOGIN_R@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define getlogin_r rpl_getlogin_r -# endif -_GL_FUNCDECL_RPL (getlogin_r, int, (char *name, size_t size) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (getlogin_r, int, (char *name, size_t size)); -# else -# if !@HAVE_DECL_GETLOGIN_R@ -_GL_FUNCDECL_SYS (getlogin_r, int, (char *name, size_t size) - _GL_ARG_NONNULL ((1))); -# endif -/* Need to cast, because on Solaris 10 systems, the second argument is - int size. */ -_GL_CXXALIAS_SYS_CAST (getlogin_r, int, (char *name, size_t size)); -# endif -_GL_CXXALIASWARN (getlogin_r); -#elif defined GNULIB_POSIXCHECK -# undef getlogin_r -# if HAVE_RAW_DECL_GETLOGIN_R -_GL_WARN_ON_USE (getlogin_r, "getlogin_r is unportable - " - "use gnulib module getlogin_r for portability"); -# endif -#endif - - -#if @GNULIB_GETPAGESIZE@ -# if @REPLACE_GETPAGESIZE@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define getpagesize rpl_getpagesize -# endif -_GL_FUNCDECL_RPL (getpagesize, int, (void)); -_GL_CXXALIAS_RPL (getpagesize, int, (void)); -# else -# if !@HAVE_GETPAGESIZE@ -# if !defined getpagesize -/* This is for POSIX systems. */ -# if !defined _gl_getpagesize && defined _SC_PAGESIZE -# if ! (defined __VMS && __VMS_VER < 70000000) -# define _gl_getpagesize() sysconf (_SC_PAGESIZE) -# endif -# endif -/* This is for older VMS. */ -# if !defined _gl_getpagesize && defined __VMS -# ifdef __ALPHA -# define _gl_getpagesize() 8192 -# else -# define _gl_getpagesize() 512 -# endif -# endif -/* This is for BeOS. */ -# if !defined _gl_getpagesize && @HAVE_OS_H@ -# include -# if defined B_PAGE_SIZE -# define _gl_getpagesize() B_PAGE_SIZE -# endif -# endif -/* This is for AmigaOS4.0. */ -# if !defined _gl_getpagesize && defined __amigaos4__ -# define _gl_getpagesize() 2048 -# endif -/* This is for older Unix systems. */ -# if !defined _gl_getpagesize && @HAVE_SYS_PARAM_H@ -# include -# ifdef EXEC_PAGESIZE -# define _gl_getpagesize() EXEC_PAGESIZE -# else -# ifdef NBPG -# ifndef CLSIZE -# define CLSIZE 1 -# endif -# define _gl_getpagesize() (NBPG * CLSIZE) -# else -# ifdef NBPC -# define _gl_getpagesize() NBPC -# endif -# endif -# endif -# endif -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define getpagesize() _gl_getpagesize () -# else -# if !GNULIB_defined_getpagesize_function -_GL_UNISTD_INLINE int -getpagesize () -{ - return _gl_getpagesize (); -} -# define GNULIB_defined_getpagesize_function 1 -# endif -# endif -# endif -# endif -/* Need to cast, because on Cygwin 1.5.x systems, the return type is size_t. */ -_GL_CXXALIAS_SYS_CAST (getpagesize, int, (void)); -# endif -# if @HAVE_DECL_GETPAGESIZE@ -_GL_CXXALIASWARN (getpagesize); -# endif -#elif defined GNULIB_POSIXCHECK -# undef getpagesize -# if HAVE_RAW_DECL_GETPAGESIZE -_GL_WARN_ON_USE (getpagesize, "getpagesize is unportable - " - "use gnulib module getpagesize for portability"); -# endif -#endif - - -#if @GNULIB_GETUSERSHELL@ -/* Return the next valid login shell on the system, or NULL when the end of - the list has been reached. */ -# if !@HAVE_DECL_GETUSERSHELL@ -_GL_FUNCDECL_SYS (getusershell, char *, (void)); -# endif -_GL_CXXALIAS_SYS (getusershell, char *, (void)); -_GL_CXXALIASWARN (getusershell); -#elif defined GNULIB_POSIXCHECK -# undef getusershell -# if HAVE_RAW_DECL_GETUSERSHELL -_GL_WARN_ON_USE (getusershell, "getusershell is unportable - " - "use gnulib module getusershell for portability"); -# endif -#endif - -#if @GNULIB_GETUSERSHELL@ -/* Rewind to pointer that is advanced at each getusershell() call. */ -# if !@HAVE_DECL_GETUSERSHELL@ -_GL_FUNCDECL_SYS (setusershell, void, (void)); -# endif -_GL_CXXALIAS_SYS (setusershell, void, (void)); -_GL_CXXALIASWARN (setusershell); -#elif defined GNULIB_POSIXCHECK -# undef setusershell -# if HAVE_RAW_DECL_SETUSERSHELL -_GL_WARN_ON_USE (setusershell, "setusershell is unportable - " - "use gnulib module getusershell for portability"); -# endif -#endif - -#if @GNULIB_GETUSERSHELL@ -/* Free the pointer that is advanced at each getusershell() call and - associated resources. */ -# if !@HAVE_DECL_GETUSERSHELL@ -_GL_FUNCDECL_SYS (endusershell, void, (void)); -# endif -_GL_CXXALIAS_SYS (endusershell, void, (void)); -_GL_CXXALIASWARN (endusershell); -#elif defined GNULIB_POSIXCHECK -# undef endusershell -# if HAVE_RAW_DECL_ENDUSERSHELL -_GL_WARN_ON_USE (endusershell, "endusershell is unportable - " - "use gnulib module getusershell for portability"); -# endif -#endif - - -#if @GNULIB_GROUP_MEMBER@ -/* Determine whether group id is in calling user's group list. */ -# if !@HAVE_GROUP_MEMBER@ -_GL_FUNCDECL_SYS (group_member, int, (gid_t gid)); -# endif -_GL_CXXALIAS_SYS (group_member, int, (gid_t gid)); -_GL_CXXALIASWARN (group_member); -#elif defined GNULIB_POSIXCHECK -# undef group_member -# if HAVE_RAW_DECL_GROUP_MEMBER -_GL_WARN_ON_USE (group_member, "group_member is unportable - " - "use gnulib module group-member for portability"); -# endif -#endif - - -#if @GNULIB_ISATTY@ -# if @REPLACE_ISATTY@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef isatty -# define isatty rpl_isatty -# endif -_GL_FUNCDECL_RPL (isatty, int, (int fd)); -_GL_CXXALIAS_RPL (isatty, int, (int fd)); -# else -_GL_CXXALIAS_SYS (isatty, int, (int fd)); -# endif -_GL_CXXALIASWARN (isatty); -#elif defined GNULIB_POSIXCHECK -# undef isatty -# if HAVE_RAW_DECL_ISATTY -_GL_WARN_ON_USE (isatty, "isatty has portability problems on native Windows - " - "use gnulib module isatty for portability"); -# endif -#endif - - -#if @GNULIB_LCHOWN@ -/* Change the owner of FILE to UID (if UID is not -1) and the group of FILE - to GID (if GID is not -1). Do not follow symbolic links. - Return 0 if successful, otherwise -1 and errno set. - See the POSIX:2008 specification - . */ -# if @REPLACE_LCHOWN@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef lchown -# define lchown rpl_lchown -# endif -_GL_FUNCDECL_RPL (lchown, int, (char const *file, uid_t owner, gid_t group) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (lchown, int, (char const *file, uid_t owner, gid_t group)); -# else -# if !@HAVE_LCHOWN@ -_GL_FUNCDECL_SYS (lchown, int, (char const *file, uid_t owner, gid_t group) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (lchown, int, (char const *file, uid_t owner, gid_t group)); -# endif -_GL_CXXALIASWARN (lchown); -#elif defined GNULIB_POSIXCHECK -# undef lchown -# if HAVE_RAW_DECL_LCHOWN -_GL_WARN_ON_USE (lchown, "lchown is unportable to pre-POSIX.1-2001 systems - " - "use gnulib module lchown for portability"); -# endif -#endif - - -#if @GNULIB_LINK@ -/* Create a new hard link for an existing file. - Return 0 if successful, otherwise -1 and errno set. - See POSIX:2008 specification - . */ -# if @REPLACE_LINK@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define link rpl_link -# endif -_GL_FUNCDECL_RPL (link, int, (const char *path1, const char *path2) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (link, int, (const char *path1, const char *path2)); -# else -# if !@HAVE_LINK@ -_GL_FUNCDECL_SYS (link, int, (const char *path1, const char *path2) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (link, int, (const char *path1, const char *path2)); -# endif -_GL_CXXALIASWARN (link); -#elif defined GNULIB_POSIXCHECK -# undef link -# if HAVE_RAW_DECL_LINK -_GL_WARN_ON_USE (link, "link is unportable - " - "use gnulib module link for portability"); -# endif -#endif - - -#if @GNULIB_LINKAT@ -/* Create a new hard link for an existing file, relative to two - directories. FLAG controls whether symlinks are followed. - Return 0 if successful, otherwise -1 and errno set. */ -# if @REPLACE_LINKAT@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef linkat -# define linkat rpl_linkat -# endif -_GL_FUNCDECL_RPL (linkat, int, - (int fd1, const char *path1, int fd2, const char *path2, - int flag) - _GL_ARG_NONNULL ((2, 4))); -_GL_CXXALIAS_RPL (linkat, int, - (int fd1, const char *path1, int fd2, const char *path2, - int flag)); -# else -# if !@HAVE_LINKAT@ -_GL_FUNCDECL_SYS (linkat, int, - (int fd1, const char *path1, int fd2, const char *path2, - int flag) - _GL_ARG_NONNULL ((2, 4))); -# endif -_GL_CXXALIAS_SYS (linkat, int, - (int fd1, const char *path1, int fd2, const char *path2, - int flag)); -# endif -_GL_CXXALIASWARN (linkat); -#elif defined GNULIB_POSIXCHECK -# undef linkat -# if HAVE_RAW_DECL_LINKAT -_GL_WARN_ON_USE (linkat, "linkat is unportable - " - "use gnulib module linkat for portability"); -# endif -#endif - - -#if @GNULIB_LSEEK@ -/* Set the offset of FD relative to SEEK_SET, SEEK_CUR, or SEEK_END. - Return the new offset if successful, otherwise -1 and errno set. - See the POSIX:2008 specification - . */ -# if @REPLACE_LSEEK@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define lseek rpl_lseek -# endif -_GL_FUNCDECL_RPL (lseek, off_t, (int fd, off_t offset, int whence)); -_GL_CXXALIAS_RPL (lseek, off_t, (int fd, off_t offset, int whence)); -# else -_GL_CXXALIAS_SYS (lseek, off_t, (int fd, off_t offset, int whence)); -# endif -_GL_CXXALIASWARN (lseek); -#elif defined GNULIB_POSIXCHECK -# undef lseek -# if HAVE_RAW_DECL_LSEEK -_GL_WARN_ON_USE (lseek, "lseek does not fail with ESPIPE on pipes on some " - "systems - use gnulib module lseek for portability"); -# endif -#endif - - -#if @GNULIB_PIPE@ -/* Create a pipe, defaulting to O_BINARY mode. - Store the read-end as fd[0] and the write-end as fd[1]. - Return 0 upon success, or -1 with errno set upon failure. */ -# if !@HAVE_PIPE@ -_GL_FUNCDECL_SYS (pipe, int, (int fd[2]) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (pipe, int, (int fd[2])); -_GL_CXXALIASWARN (pipe); -#elif defined GNULIB_POSIXCHECK -# undef pipe -# if HAVE_RAW_DECL_PIPE -_GL_WARN_ON_USE (pipe, "pipe is unportable - " - "use gnulib module pipe-posix for portability"); -# endif -#endif - - -#if @GNULIB_PIPE2@ -/* Create a pipe, applying the given flags when opening the read-end of the - pipe and the write-end of the pipe. - The flags are a bitmask, possibly including O_CLOEXEC (defined in ) - and O_TEXT, O_BINARY (defined in "binary-io.h"). - Store the read-end as fd[0] and the write-end as fd[1]. - Return 0 upon success, or -1 with errno set upon failure. - See also the Linux man page at - . */ -# if @HAVE_PIPE2@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define pipe2 rpl_pipe2 -# endif -_GL_FUNCDECL_RPL (pipe2, int, (int fd[2], int flags) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (pipe2, int, (int fd[2], int flags)); -# else -_GL_FUNCDECL_SYS (pipe2, int, (int fd[2], int flags) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_SYS (pipe2, int, (int fd[2], int flags)); -# endif -_GL_CXXALIASWARN (pipe2); -#elif defined GNULIB_POSIXCHECK -# undef pipe2 -# if HAVE_RAW_DECL_PIPE2 -_GL_WARN_ON_USE (pipe2, "pipe2 is unportable - " - "use gnulib module pipe2 for portability"); -# endif -#endif - - -#if @GNULIB_PREAD@ -/* Read at most BUFSIZE bytes from FD into BUF, starting at OFFSET. - Return the number of bytes placed into BUF if successful, otherwise - set errno and return -1. 0 indicates EOF. - See the POSIX:2008 specification - . */ -# if @REPLACE_PREAD@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef pread -# define pread rpl_pread -# endif -_GL_FUNCDECL_RPL (pread, ssize_t, - (int fd, void *buf, size_t bufsize, off_t offset) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (pread, ssize_t, - (int fd, void *buf, size_t bufsize, off_t offset)); -# else -# if !@HAVE_PREAD@ -_GL_FUNCDECL_SYS (pread, ssize_t, - (int fd, void *buf, size_t bufsize, off_t offset) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (pread, ssize_t, - (int fd, void *buf, size_t bufsize, off_t offset)); -# endif -_GL_CXXALIASWARN (pread); -#elif defined GNULIB_POSIXCHECK -# undef pread -# if HAVE_RAW_DECL_PREAD -_GL_WARN_ON_USE (pread, "pread is unportable - " - "use gnulib module pread for portability"); -# endif -#endif - - -#if @GNULIB_PWRITE@ -/* Write at most BUFSIZE bytes from BUF into FD, starting at OFFSET. - Return the number of bytes written if successful, otherwise - set errno and return -1. 0 indicates nothing written. See the - POSIX:2008 specification - . */ -# if @REPLACE_PWRITE@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef pwrite -# define pwrite rpl_pwrite -# endif -_GL_FUNCDECL_RPL (pwrite, ssize_t, - (int fd, const void *buf, size_t bufsize, off_t offset) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (pwrite, ssize_t, - (int fd, const void *buf, size_t bufsize, off_t offset)); -# else -# if !@HAVE_PWRITE@ -_GL_FUNCDECL_SYS (pwrite, ssize_t, - (int fd, const void *buf, size_t bufsize, off_t offset) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (pwrite, ssize_t, - (int fd, const void *buf, size_t bufsize, off_t offset)); -# endif -_GL_CXXALIASWARN (pwrite); -#elif defined GNULIB_POSIXCHECK -# undef pwrite -# if HAVE_RAW_DECL_PWRITE -_GL_WARN_ON_USE (pwrite, "pwrite is unportable - " - "use gnulib module pwrite for portability"); -# endif -#endif - - -#if @GNULIB_READ@ -/* Read up to COUNT bytes from file descriptor FD into the buffer starting - at BUF. See the POSIX:2008 specification - . */ -# if @REPLACE_READ@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef read -# define read rpl_read -# endif -_GL_FUNCDECL_RPL (read, ssize_t, (int fd, void *buf, size_t count) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (read, ssize_t, (int fd, void *buf, size_t count)); -# else -/* Need to cast, because on mingw, the third parameter is - unsigned int count - and the return type is 'int'. */ -_GL_CXXALIAS_SYS_CAST (read, ssize_t, (int fd, void *buf, size_t count)); -# endif -_GL_CXXALIASWARN (read); -#endif - - -#if @GNULIB_READLINK@ -/* Read the contents of the symbolic link FILE and place the first BUFSIZE - bytes of it into BUF. Return the number of bytes placed into BUF if - successful, otherwise -1 and errno set. - See the POSIX:2008 specification - . */ -# if @REPLACE_READLINK@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define readlink rpl_readlink -# endif -_GL_FUNCDECL_RPL (readlink, ssize_t, - (const char *file, char *buf, size_t bufsize) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (readlink, ssize_t, - (const char *file, char *buf, size_t bufsize)); -# else -# if !@HAVE_READLINK@ -_GL_FUNCDECL_SYS (readlink, ssize_t, - (const char *file, char *buf, size_t bufsize) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (readlink, ssize_t, - (const char *file, char *buf, size_t bufsize)); -# endif -_GL_CXXALIASWARN (readlink); -#elif defined GNULIB_POSIXCHECK -# undef readlink -# if HAVE_RAW_DECL_READLINK -_GL_WARN_ON_USE (readlink, "readlink is unportable - " - "use gnulib module readlink for portability"); -# endif -#endif - - -#if @GNULIB_READLINKAT@ -# if @REPLACE_READLINKAT@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define readlinkat rpl_readlinkat -# endif -_GL_FUNCDECL_RPL (readlinkat, ssize_t, - (int fd, char const *file, char *buf, size_t len) - _GL_ARG_NONNULL ((2, 3))); -_GL_CXXALIAS_RPL (readlinkat, ssize_t, - (int fd, char const *file, char *buf, size_t len)); -# else -# if !@HAVE_READLINKAT@ -_GL_FUNCDECL_SYS (readlinkat, ssize_t, - (int fd, char const *file, char *buf, size_t len) - _GL_ARG_NONNULL ((2, 3))); -# endif -_GL_CXXALIAS_SYS (readlinkat, ssize_t, - (int fd, char const *file, char *buf, size_t len)); -# endif -_GL_CXXALIASWARN (readlinkat); -#elif defined GNULIB_POSIXCHECK -# undef readlinkat -# if HAVE_RAW_DECL_READLINKAT -_GL_WARN_ON_USE (readlinkat, "readlinkat is not portable - " - "use gnulib module readlinkat for portability"); -# endif -#endif - - -#if @GNULIB_RMDIR@ -/* Remove the directory DIR. */ -# if @REPLACE_RMDIR@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define rmdir rpl_rmdir -# endif -_GL_FUNCDECL_RPL (rmdir, int, (char const *name) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (rmdir, int, (char const *name)); -# else -_GL_CXXALIAS_SYS (rmdir, int, (char const *name)); -# endif -_GL_CXXALIASWARN (rmdir); -#elif defined GNULIB_POSIXCHECK -# undef rmdir -# if HAVE_RAW_DECL_RMDIR -_GL_WARN_ON_USE (rmdir, "rmdir is unportable - " - "use gnulib module rmdir for portability"); -# endif -#endif - - -#if @GNULIB_SETHOSTNAME@ -/* Set the host name of the machine. - The host name may or may not be fully qualified. - - Put LEN bytes of NAME into the host name. - Return 0 if successful, otherwise, set errno and return -1. - - Platforms with no ability to set the hostname return -1 and set - errno = ENOSYS. */ -# if !@HAVE_SETHOSTNAME@ || !@HAVE_DECL_SETHOSTNAME@ -_GL_FUNCDECL_SYS (sethostname, int, (const char *name, size_t len) - _GL_ARG_NONNULL ((1))); -# endif -/* Need to cast, because on Solaris 11 2011-10, Mac OS X 10.5, IRIX 6.5 - and FreeBSD 6.4 the second parameter is int. On Solaris 11 - 2011-10, the first parameter is not const. */ -_GL_CXXALIAS_SYS_CAST (sethostname, int, (const char *name, size_t len)); -_GL_CXXALIASWARN (sethostname); -#elif defined GNULIB_POSIXCHECK -# undef sethostname -# if HAVE_RAW_DECL_SETHOSTNAME -_GL_WARN_ON_USE (sethostname, "sethostname is unportable - " - "use gnulib module sethostname for portability"); -# endif -#endif - - -#if @GNULIB_SLEEP@ -/* Pause the execution of the current thread for N seconds. - Returns the number of seconds left to sleep. - See the POSIX:2008 specification - . */ -# if @REPLACE_SLEEP@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef sleep -# define sleep rpl_sleep -# endif -_GL_FUNCDECL_RPL (sleep, unsigned int, (unsigned int n)); -_GL_CXXALIAS_RPL (sleep, unsigned int, (unsigned int n)); -# else -# if !@HAVE_SLEEP@ -_GL_FUNCDECL_SYS (sleep, unsigned int, (unsigned int n)); -# endif -_GL_CXXALIAS_SYS (sleep, unsigned int, (unsigned int n)); -# endif -_GL_CXXALIASWARN (sleep); -#elif defined GNULIB_POSIXCHECK -# undef sleep -# if HAVE_RAW_DECL_SLEEP -_GL_WARN_ON_USE (sleep, "sleep is unportable - " - "use gnulib module sleep for portability"); -# endif -#endif - - -#if @GNULIB_SYMLINK@ -# if @REPLACE_SYMLINK@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef symlink -# define symlink rpl_symlink -# endif -_GL_FUNCDECL_RPL (symlink, int, (char const *contents, char const *file) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (symlink, int, (char const *contents, char const *file)); -# else -# if !@HAVE_SYMLINK@ -_GL_FUNCDECL_SYS (symlink, int, (char const *contents, char const *file) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (symlink, int, (char const *contents, char const *file)); -# endif -_GL_CXXALIASWARN (symlink); -#elif defined GNULIB_POSIXCHECK -# undef symlink -# if HAVE_RAW_DECL_SYMLINK -_GL_WARN_ON_USE (symlink, "symlink is not portable - " - "use gnulib module symlink for portability"); -# endif -#endif - - -#if @GNULIB_SYMLINKAT@ -# if @REPLACE_SYMLINKAT@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef symlinkat -# define symlinkat rpl_symlinkat -# endif -_GL_FUNCDECL_RPL (symlinkat, int, - (char const *contents, int fd, char const *file) - _GL_ARG_NONNULL ((1, 3))); -_GL_CXXALIAS_RPL (symlinkat, int, - (char const *contents, int fd, char const *file)); -# else -# if !@HAVE_SYMLINKAT@ -_GL_FUNCDECL_SYS (symlinkat, int, - (char const *contents, int fd, char const *file) - _GL_ARG_NONNULL ((1, 3))); -# endif -_GL_CXXALIAS_SYS (symlinkat, int, - (char const *contents, int fd, char const *file)); -# endif -_GL_CXXALIASWARN (symlinkat); -#elif defined GNULIB_POSIXCHECK -# undef symlinkat -# if HAVE_RAW_DECL_SYMLINKAT -_GL_WARN_ON_USE (symlinkat, "symlinkat is not portable - " - "use gnulib module symlinkat for portability"); -# endif -#endif - - -#if @GNULIB_TTYNAME_R@ -/* Store at most BUFLEN characters of the pathname of the terminal FD is - open on in BUF. Return 0 on success, otherwise an error number. */ -# if @REPLACE_TTYNAME_R@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ttyname_r -# define ttyname_r rpl_ttyname_r -# endif -_GL_FUNCDECL_RPL (ttyname_r, int, - (int fd, char *buf, size_t buflen) _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (ttyname_r, int, - (int fd, char *buf, size_t buflen)); -# else -# if !@HAVE_DECL_TTYNAME_R@ -_GL_FUNCDECL_SYS (ttyname_r, int, - (int fd, char *buf, size_t buflen) _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (ttyname_r, int, - (int fd, char *buf, size_t buflen)); -# endif -_GL_CXXALIASWARN (ttyname_r); -#elif defined GNULIB_POSIXCHECK -# undef ttyname_r -# if HAVE_RAW_DECL_TTYNAME_R -_GL_WARN_ON_USE (ttyname_r, "ttyname_r is not portable - " - "use gnulib module ttyname_r for portability"); -# endif -#endif - - -#if @GNULIB_UNLINK@ -# if @REPLACE_UNLINK@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef unlink -# define unlink rpl_unlink -# endif -_GL_FUNCDECL_RPL (unlink, int, (char const *file) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (unlink, int, (char const *file)); -# else -_GL_CXXALIAS_SYS (unlink, int, (char const *file)); -# endif -_GL_CXXALIASWARN (unlink); -#elif defined GNULIB_POSIXCHECK -# undef unlink -# if HAVE_RAW_DECL_UNLINK -_GL_WARN_ON_USE (unlink, "unlink is not portable - " - "use gnulib module unlink for portability"); -# endif -#endif - - -#if @GNULIB_UNLINKAT@ -# if @REPLACE_UNLINKAT@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef unlinkat -# define unlinkat rpl_unlinkat -# endif -_GL_FUNCDECL_RPL (unlinkat, int, (int fd, char const *file, int flag) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (unlinkat, int, (int fd, char const *file, int flag)); -# else -# if !@HAVE_UNLINKAT@ -_GL_FUNCDECL_SYS (unlinkat, int, (int fd, char const *file, int flag) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (unlinkat, int, (int fd, char const *file, int flag)); -# endif -_GL_CXXALIASWARN (unlinkat); -#elif defined GNULIB_POSIXCHECK -# undef unlinkat -# if HAVE_RAW_DECL_UNLINKAT -_GL_WARN_ON_USE (unlinkat, "unlinkat is not portable - " - "use gnulib module openat for portability"); -# endif -#endif - - -#if @GNULIB_USLEEP@ -/* Pause the execution of the current thread for N microseconds. - Returns 0 on completion, or -1 on range error. - See the POSIX:2001 specification - . */ -# if @REPLACE_USLEEP@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef usleep -# define usleep rpl_usleep -# endif -_GL_FUNCDECL_RPL (usleep, int, (useconds_t n)); -_GL_CXXALIAS_RPL (usleep, int, (useconds_t n)); -# else -# if !@HAVE_USLEEP@ -_GL_FUNCDECL_SYS (usleep, int, (useconds_t n)); -# endif -_GL_CXXALIAS_SYS (usleep, int, (useconds_t n)); -# endif -_GL_CXXALIASWARN (usleep); -#elif defined GNULIB_POSIXCHECK -# undef usleep -# if HAVE_RAW_DECL_USLEEP -_GL_WARN_ON_USE (usleep, "usleep is unportable - " - "use gnulib module usleep for portability"); -# endif -#endif - - -#if @GNULIB_WRITE@ -/* Write up to COUNT bytes starting at BUF to file descriptor FD. - See the POSIX:2008 specification - . */ -# if @REPLACE_WRITE@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef write -# define write rpl_write -# endif -_GL_FUNCDECL_RPL (write, ssize_t, (int fd, const void *buf, size_t count) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (write, ssize_t, (int fd, const void *buf, size_t count)); -# else -/* Need to cast, because on mingw, the third parameter is - unsigned int count - and the return type is 'int'. */ -_GL_CXXALIAS_SYS_CAST (write, ssize_t, (int fd, const void *buf, size_t count)); -# endif -_GL_CXXALIASWARN (write); -#endif - -_GL_INLINE_HEADER_END - -#endif /* _@GUARD_PREFIX@_UNISTD_H */ -#endif /* _GL_INCLUDING_UNISTD_H */ -#endif /* _@GUARD_PREFIX@_UNISTD_H */ diff --git a/gl/version-etc-fsf.c b/gl/version-etc-fsf.c deleted file mode 100644 index 6b6f582..0000000 --- a/gl/version-etc-fsf.c +++ /dev/null @@ -1,30 +0,0 @@ -/* Variable with FSF copyright information, for version-etc. - Copyright (C) 1999-2006, 2009-2017 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Jim Meyering. */ - -#include - -/* Specification. */ -#include "version-etc.h" - -/* Default copyright goes to the FSF. */ - -const char version_etc_copyright[] = - /* Do *not* mark this string for translation. %s is a copyright - symbol suitable for this locale, and %d is the copyright - year. */ - "Copyright %s %d Free Software Foundation, Inc."; diff --git a/gl/version-etc.c b/gl/version-etc.c deleted file mode 100644 index ce84af3..0000000 --- a/gl/version-etc.c +++ /dev/null @@ -1,258 +0,0 @@ -/* Print --version and bug-reporting information in a consistent format. - Copyright (C) 1999-2017 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Jim Meyering. */ - -#include - -/* Specification. */ -#include "version-etc.h" - -#include -#include -#include - -#if USE_UNLOCKED_IO -# include "unlocked-io.h" -#endif - -#include "gettext.h" -#define _(msgid) gettext (msgid) - -/* If you use AM_INIT_AUTOMAKE's no-define option, - PACKAGE is not defined. Use PACKAGE_TARNAME instead. */ -#if ! defined PACKAGE && defined PACKAGE_TARNAME -# define PACKAGE PACKAGE_TARNAME -#endif - -enum { COPYRIGHT_YEAR = 2017 }; - -/* The three functions below display the --version information the - standard way. - - If COMMAND_NAME is NULL, the PACKAGE is assumed to be the name of - the program. The formats are therefore: - - PACKAGE VERSION - - or - - COMMAND_NAME (PACKAGE) VERSION. - - The functions differ in the way they are passed author names. */ - -/* Display the --version information the standard way. - - Author names are given in the array AUTHORS. N_AUTHORS is the - number of elements in the array. */ -void -version_etc_arn (FILE *stream, - const char *command_name, const char *package, - const char *version, - const char * const * authors, size_t n_authors) -{ - if (command_name) - fprintf (stream, "%s (%s) %s\n", command_name, package, version); - else - fprintf (stream, "%s %s\n", package, version); - -#ifdef PACKAGE_PACKAGER -# ifdef PACKAGE_PACKAGER_VERSION - fprintf (stream, _("Packaged by %s (%s)\n"), PACKAGE_PACKAGER, - PACKAGE_PACKAGER_VERSION); -# else - fprintf (stream, _("Packaged by %s\n"), PACKAGE_PACKAGER); -# endif -#endif - - /* TRANSLATORS: Translate "(C)" to the copyright symbol - (C-in-a-circle), if this symbol is available in the user's - locale. Otherwise, do not translate "(C)"; leave it as-is. */ - fprintf (stream, version_etc_copyright, _("(C)"), COPYRIGHT_YEAR); - - fputs (_("\ -\n\ -License GPLv3+: GNU GPL version 3 or later .\n\ -This is free software: you are free to change and redistribute it.\n\ -There is NO WARRANTY, to the extent permitted by law.\n\ -\n\ -"), - stream); - - switch (n_authors) - { - case 0: - /* The caller must provide at least one author name. */ - abort (); - case 1: - /* TRANSLATORS: %s denotes an author name. */ - fprintf (stream, _("Written by %s.\n"), authors[0]); - break; - case 2: - /* TRANSLATORS: Each %s denotes an author name. */ - fprintf (stream, _("Written by %s and %s.\n"), authors[0], authors[1]); - break; - case 3: - /* TRANSLATORS: Each %s denotes an author name. */ - fprintf (stream, _("Written by %s, %s, and %s.\n"), - authors[0], authors[1], authors[2]); - break; - case 4: - /* TRANSLATORS: Each %s denotes an author name. - You can use line breaks, estimating that each author name occupies - ca. 16 screen columns and that a screen line has ca. 80 columns. */ - fprintf (stream, _("Written by %s, %s, %s,\nand %s.\n"), - authors[0], authors[1], authors[2], authors[3]); - break; - case 5: - /* TRANSLATORS: Each %s denotes an author name. - You can use line breaks, estimating that each author name occupies - ca. 16 screen columns and that a screen line has ca. 80 columns. */ - fprintf (stream, _("Written by %s, %s, %s,\n%s, and %s.\n"), - authors[0], authors[1], authors[2], authors[3], authors[4]); - break; - case 6: - /* TRANSLATORS: Each %s denotes an author name. - You can use line breaks, estimating that each author name occupies - ca. 16 screen columns and that a screen line has ca. 80 columns. */ - fprintf (stream, _("Written by %s, %s, %s,\n%s, %s, and %s.\n"), - authors[0], authors[1], authors[2], authors[3], authors[4], - authors[5]); - break; - case 7: - /* TRANSLATORS: Each %s denotes an author name. - You can use line breaks, estimating that each author name occupies - ca. 16 screen columns and that a screen line has ca. 80 columns. */ - fprintf (stream, _("Written by %s, %s, %s,\n%s, %s, %s, and %s.\n"), - authors[0], authors[1], authors[2], authors[3], authors[4], - authors[5], authors[6]); - break; - case 8: - /* TRANSLATORS: Each %s denotes an author name. - You can use line breaks, estimating that each author name occupies - ca. 16 screen columns and that a screen line has ca. 80 columns. */ - fprintf (stream, _("\ -Written by %s, %s, %s,\n%s, %s, %s, %s,\nand %s.\n"), - authors[0], authors[1], authors[2], authors[3], authors[4], - authors[5], authors[6], authors[7]); - break; - case 9: - /* TRANSLATORS: Each %s denotes an author name. - You can use line breaks, estimating that each author name occupies - ca. 16 screen columns and that a screen line has ca. 80 columns. */ - fprintf (stream, _("\ -Written by %s, %s, %s,\n%s, %s, %s, %s,\n%s, and %s.\n"), - authors[0], authors[1], authors[2], authors[3], authors[4], - authors[5], authors[6], authors[7], authors[8]); - break; - default: - /* 10 or more authors. Use an abbreviation, since the human reader - will probably not want to read the entire list anyway. */ - /* TRANSLATORS: Each %s denotes an author name. - You can use line breaks, estimating that each author name occupies - ca. 16 screen columns and that a screen line has ca. 80 columns. */ - fprintf (stream, _("\ -Written by %s, %s, %s,\n%s, %s, %s, %s,\n%s, %s, and others.\n"), - authors[0], authors[1], authors[2], authors[3], authors[4], - authors[5], authors[6], authors[7], authors[8]); - break; - } -} - -/* Display the --version information the standard way. See the initial - comment to this module, for more information. - - Author names are given in the NULL-terminated array AUTHORS. */ -void -version_etc_ar (FILE *stream, - const char *command_name, const char *package, - const char *version, const char * const * authors) -{ - size_t n_authors; - - for (n_authors = 0; authors[n_authors]; n_authors++) - ; - version_etc_arn (stream, command_name, package, version, authors, n_authors); -} - -/* Display the --version information the standard way. See the initial - comment to this module, for more information. - - Author names are given in the NULL-terminated va_list AUTHORS. */ -void -version_etc_va (FILE *stream, - const char *command_name, const char *package, - const char *version, va_list authors) -{ - size_t n_authors; - const char *authtab[10]; - - for (n_authors = 0; - n_authors < 10 - && (authtab[n_authors] = va_arg (authors, const char *)) != NULL; - n_authors++) - ; - version_etc_arn (stream, command_name, package, version, - authtab, n_authors); -} - - -/* Display the --version information the standard way. - - If COMMAND_NAME is NULL, the PACKAGE is assumed to be the name of - the program. The formats are therefore: - - PACKAGE VERSION - - or - - COMMAND_NAME (PACKAGE) VERSION. - - The authors names are passed as separate arguments, with an additional - NULL argument at the end. */ -void -version_etc (FILE *stream, - const char *command_name, const char *package, - const char *version, /* const char *author1, ...*/ ...) -{ - va_list authors; - - va_start (authors, version); - version_etc_va (stream, command_name, package, version, authors); - va_end (authors); -} - -void -emit_bug_reporting_address (void) -{ - /* TRANSLATORS: The placeholder indicates the bug-reporting address - for this package. Please add _another line_ saying - "Report translation bugs to <...>\n" with the address for translation - bugs (typically your translation team's web or email address). */ - printf (_("\nReport bugs to: %s\n"), PACKAGE_BUGREPORT); -#ifdef PACKAGE_PACKAGER_BUG_REPORTS - printf (_("Report %s bugs to: %s\n"), PACKAGE_PACKAGER, - PACKAGE_PACKAGER_BUG_REPORTS); -#endif -#ifdef PACKAGE_URL - printf (_("%s home page: <%s>\n"), PACKAGE_NAME, PACKAGE_URL); -#else - printf (_("%s home page: \n"), - PACKAGE_NAME, PACKAGE); -#endif - fputs (_("General help using GNU software: \n"), - stdout); -} diff --git a/gl/version-etc.h b/gl/version-etc.h deleted file mode 100644 index b931de8..0000000 --- a/gl/version-etc.h +++ /dev/null @@ -1,78 +0,0 @@ -/* Print --version and bug-reporting information in a consistent format. - Copyright (C) 1999, 2003, 2005, 2009-2017 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Jim Meyering. */ - -#ifndef VERSION_ETC_H -# define VERSION_ETC_H 1 - -# include -# include - -/* The 'sentinel' attribute was added in gcc 4.0. */ -#ifndef _GL_ATTRIBUTE_SENTINEL -# if 4 <= __GNUC__ -# define _GL_ATTRIBUTE_SENTINEL __attribute__ ((__sentinel__)) -# else -# define _GL_ATTRIBUTE_SENTINEL /* empty */ -# endif -#endif - -extern const char version_etc_copyright[]; - -/* The three functions below display the --version information in the - standard way: command and package names, package version, followed - by a short GPLv3+ notice and a list of up to 10 author names. - - If COMMAND_NAME is NULL, the PACKAGE is assumed to be the name of - the program. The formats are therefore: - - PACKAGE VERSION - - or - - COMMAND_NAME (PACKAGE) VERSION. - - The functions differ in the way they are passed author names: */ - -/* N_AUTHORS names are supplied in array AUTHORS. */ -extern void version_etc_arn (FILE *stream, - const char *command_name, const char *package, - const char *version, - const char * const * authors, size_t n_authors); - -/* Names are passed in the NULL-terminated array AUTHORS. */ -extern void version_etc_ar (FILE *stream, - const char *command_name, const char *package, - const char *version, const char * const * authors); - -/* Names are passed in the NULL-terminated va_list. */ -extern void version_etc_va (FILE *stream, - const char *command_name, const char *package, - const char *version, va_list authors); - -/* Names are passed as separate arguments, with an additional - NULL argument at the end. */ -extern void version_etc (FILE *stream, - const char *command_name, const char *package, - const char *version, - /* const char *author1, ..., NULL */ ...) - _GL_ATTRIBUTE_SENTINEL; - -/* Display the usual "Report bugs to" stanza. */ -extern void emit_bug_reporting_address (void); - -#endif /* VERSION_ETC_H */ diff --git a/gtk-doc.make b/gtk-doc.make deleted file mode 100644 index 1f75dfd..0000000 --- a/gtk-doc.make +++ /dev/null @@ -1,280 +0,0 @@ -# -*- mode: makefile -*- - -#################################### -# Everything below here is generic # -#################################### - -if GTK_DOC_USE_LIBTOOL -GTKDOC_CC = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -GTKDOC_LD = $(LIBTOOL) --tag=CC --mode=link $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -GTKDOC_RUN = $(LIBTOOL) --mode=execute -else -GTKDOC_CC = $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -GTKDOC_LD = $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -GTKDOC_RUN = -endif - -# We set GPATH here; this gives us semantics for GNU make -# which are more like other make's VPATH, when it comes to -# whether a source that is a target of one rule is then -# searched for in VPATH/GPATH. -# -GPATH = $(srcdir) - -TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE) - -SETUP_FILES = \ - $(content_files) \ - $(DOC_MAIN_SGML_FILE) \ - $(DOC_MODULE)-sections.txt \ - $(DOC_MODULE)-overrides.txt - -EXTRA_DIST = \ - $(HTML_IMAGES) \ - $(SETUP_FILES) - -DOC_STAMPS=setup-build.stamp scan-build.stamp tmpl-build.stamp sgml-build.stamp \ - html-build.stamp pdf-build.stamp \ - tmpl.stamp sgml.stamp html.stamp pdf.stamp - -SCANOBJ_FILES = \ - $(DOC_MODULE).args \ - $(DOC_MODULE).hierarchy \ - $(DOC_MODULE).interfaces \ - $(DOC_MODULE).prerequisites \ - $(DOC_MODULE).signals - -REPORT_FILES = \ - $(DOC_MODULE)-undocumented.txt \ - $(DOC_MODULE)-undeclared.txt \ - $(DOC_MODULE)-unused.txt - -CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS) - -if ENABLE_GTK_DOC -if GTK_DOC_BUILD_HTML -HTML_BUILD_STAMP=html-build.stamp -else -HTML_BUILD_STAMP= -endif -if GTK_DOC_BUILD_PDF -PDF_BUILD_STAMP=pdf-build.stamp -else -PDF_BUILD_STAMP= -endif - -all-local: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP) -else -all-local: -endif - -docs: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP) - -$(REPORT_FILES): sgml-build.stamp - -#### setup #### - -setup-build.stamp: - -@if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ - echo ' DOC Preparing build'; \ - files=`echo $(SETUP_FILES) $(expand_content_files) $(DOC_MODULE).types`; \ - if test "x$$files" != "x" ; then \ - for file in $$files ; do \ - test -f $(abs_srcdir)/$$file && \ - cp -pu $(abs_srcdir)/$$file $(abs_builddir)/ || true; \ - done; \ - fi; \ - test -d $(abs_srcdir)/tmpl && \ - { cp -rp $(abs_srcdir)/tmpl $(abs_builddir)/; \ - chmod -R u+w $(abs_builddir)/tmpl; } \ - fi - @touch setup-build.stamp - -#### scan #### - -scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB) - @echo ' DOC Scanning header files' - @_source_dir='' ; \ - for i in $(DOC_SOURCE_DIR) ; do \ - _source_dir="$${_source_dir} --source-dir=$$i" ; \ - done ; \ - gtkdoc-scan --module=$(DOC_MODULE) --ignore-headers="$(IGNORE_HFILES)" $${_source_dir} $(SCAN_OPTIONS) $(EXTRA_HFILES) - @if grep -l '^..*$$' $(DOC_MODULE).types > /dev/null 2>&1 ; then \ - echo " DOC Introspecting gobjects"; \ - scanobj_options=""; \ - gtkdoc-scangobj 2>&1 --help | grep >/dev/null "\-\-verbose"; \ - if test "$(?)" = "0"; then \ - if test "x$(V)" = "x1"; then \ - scanobj_options="--verbose"; \ - fi; \ - fi; \ - CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" \ - gtkdoc-scangobj $(SCANGOBJ_OPTIONS) $$scanobj_options --module=$(DOC_MODULE); \ - else \ - for i in $(SCANOBJ_FILES) ; do \ - test -f $$i || touch $$i ; \ - done \ - fi - @touch scan-build.stamp - -$(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp - @true - -#### templates #### - -tmpl-build.stamp: setup-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt - @echo ' DOC Rebuilding template files' - @gtkdoc-mktmpl --module=$(DOC_MODULE) $(MKTMPL_OPTIONS) - @if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ - if test -w $(abs_srcdir) ; then \ - cp -rp $(abs_builddir)/tmpl $(abs_srcdir)/; \ - fi \ - fi - @touch tmpl-build.stamp - -tmpl.stamp: tmpl-build.stamp - @true - -$(srcdir)/tmpl/*.sgml: - @true - -#### xml #### - -sgml-build.stamp: tmpl.stamp $(DOC_MODULE)-sections.txt $(srcdir)/tmpl/*.sgml $(expand_content_files) - @echo ' DOC Building XML' - @-chmod -R u+w $(srcdir) - @_source_dir='' ; \ - for i in $(DOC_SOURCE_DIR) ; do \ - _source_dir="$${_source_dir} --source-dir=$$i" ; \ - done ; \ - gtkdoc-mkdb --module=$(DOC_MODULE) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $${_source_dir} $(MKDB_OPTIONS) - @touch sgml-build.stamp - -sgml.stamp: sgml-build.stamp - @true - -#### html #### - -html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) - @echo ' DOC Building HTML' - @rm -rf html - @mkdir html - @mkhtml_options=""; \ - gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-verbose"; \ - if test "$(?)" = "0"; then \ - if test "x$(V)" = "x1"; then \ - mkhtml_options="$$mkhtml_options --verbose"; \ - fi; \ - fi; \ - gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-path"; \ - if test "$(?)" = "0"; then \ - mkhtml_options="$$mkhtml_options --path=\"$(abs_srcdir)\""; \ - fi; \ - cd html && gtkdoc-mkhtml $$mkhtml_options $(MKHTML_OPTIONS) $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE) - -@test "x$(HTML_IMAGES)" = "x" || \ - for file in $(HTML_IMAGES) ; do \ - if test -f $(abs_srcdir)/$$file ; then \ - cp $(abs_srcdir)/$$file $(abs_builddir)/html; \ - fi; \ - if test -f $(abs_builddir)/$$file ; then \ - cp $(abs_builddir)/$$file $(abs_builddir)/html; \ - fi; \ - done; - @echo ' DOC Fixing cross-references' - @gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS) - @touch html-build.stamp - -#### pdf #### - -pdf-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) - @echo ' DOC Building PDF' - @rm -f $(DOC_MODULE).pdf - @mkpdf_options=""; \ - gtkdoc-mkpdf 2>&1 --help | grep >/dev/null "\-\-verbose"; \ - if test "$(?)" = "0"; then \ - if test "x$(V)" = "x1"; then \ - mkpdf_options="$$mkpdf_options --verbose"; \ - fi; \ - fi; \ - if test "x$(HTML_IMAGES)" != "x"; then \ - for img in $(HTML_IMAGES); do \ - part=`dirname $$img`; \ - echo $$mkpdf_options | grep >/dev/null "\-\-imgdir=$$part "; \ - if test $$? != 0; then \ - mkpdf_options="$$mkpdf_options --imgdir=$$part"; \ - fi; \ - done; \ - fi; \ - gtkdoc-mkpdf --path="$(abs_srcdir)" $$mkpdf_options $(DOC_MODULE) $(DOC_MAIN_SGML_FILE) $(MKPDF_OPTIONS) - @touch pdf-build.stamp - -############## - -clean-local: - @rm -f *~ *.bak - @rm -rf .libs - -distclean-local: - @rm -rf xml html $(REPORT_FILES) $(DOC_MODULE).pdf \ - $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt - @if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ - rm -f $(SETUP_FILES) $(expand_content_files) $(DOC_MODULE).types; \ - rm -rf tmpl; \ - fi - -maintainer-clean-local: clean - @rm -rf xml html - -install-data-local: - @installfiles=`echo $(builddir)/html/*`; \ - if test "$$installfiles" = '$(builddir)/html/*'; \ - then echo 1>&2 'Nothing to install' ; \ - else \ - if test -n "$(DOC_MODULE_VERSION)"; then \ - installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \ - else \ - installdir="$(DESTDIR)$(TARGET_DIR)"; \ - fi; \ - $(mkinstalldirs) $${installdir} ; \ - for i in $$installfiles; do \ - echo ' $(INSTALL_DATA) '$$i ; \ - $(INSTALL_DATA) $$i $${installdir}; \ - done; \ - if test -n "$(DOC_MODULE_VERSION)"; then \ - mv -f $${installdir}/$(DOC_MODULE).devhelp2 \ - $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp2; \ - fi; \ - $(GTKDOC_REBASE) --relative --dest-dir=$(DESTDIR) --html-dir=$${installdir}; \ - fi - -uninstall-local: - @if test -n "$(DOC_MODULE_VERSION)"; then \ - installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \ - else \ - installdir="$(DESTDIR)$(TARGET_DIR)"; \ - fi; \ - rm -rf $${installdir} - -# -# Require gtk-doc when making dist -# -if ENABLE_GTK_DOC -dist-check-gtkdoc: -else -dist-check-gtkdoc: - @echo "*** gtk-doc must be installed and enabled in order to make dist" - @false -endif - -dist-hook: dist-check-gtkdoc dist-hook-local - @mkdir $(distdir)/tmpl - @mkdir $(distdir)/html - @-cp ./tmpl/*.sgml $(distdir)/tmpl - @cp ./html/* $(distdir)/html - @-cp ./$(DOC_MODULE).pdf $(distdir)/ - @-cp ./$(DOC_MODULE).types $(distdir)/ - @-cp ./$(DOC_MODULE)-sections.txt $(distdir)/ - @cd $(distdir) && rm -f $(DISTCLEANFILES) - @$(GTKDOC_REBASE) --online --relative --html-dir=$(distdir)/html - -.PHONY : dist-hook-local docs diff --git a/lib/ASN1.c b/lib/ASN1.c deleted file mode 100644 index 586dcca..0000000 --- a/lib/ASN1.c +++ /dev/null @@ -1,3004 +0,0 @@ -/* A Bison parser, made by GNU Bison 3.0.4. */ - -/* Bison implementation for Yacc-like parsers in C - - Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* As a special exception, you may create a larger work that contains - part or all of the Bison parser skeleton and distribute that work - under terms of your choice, so long as that work isn't itself a - parser generator using the skeleton or a modified version thereof - as a parser skeleton. Alternatively, if you modify or redistribute - the parser skeleton itself, you may (at your option) remove this - special exception, which will cause the skeleton and the resulting - Bison output files to be licensed under the GNU General Public - License without this special exception. - - This special exception was added by the Free Software Foundation in - version 2.2 of Bison. */ - -/* C LALR(1) parser skeleton written by Richard Stallman, by - simplifying the original so-called "semantic" parser. */ - -/* All symbols defined below should begin with yy or YY, to avoid - infringing on user name space. This should be done even for local - variables, as they might otherwise be expanded by user macros. - There are some unavoidable exceptions within include files to - define necessary library symbols; they are noted "INFRINGES ON - USER NAME SPACE" below. */ - -/* Identify Bison output. */ -#define YYBISON 1 - -/* Bison version. */ -#define YYBISON_VERSION "3.0.4" - -/* Skeleton name. */ -#define YYSKELETON_NAME "yacc.c" - -/* Pure parsers. */ -#define YYPURE 0 - -/* Push parsers. */ -#define YYPUSH 0 - -/* Pull parsers. */ -#define YYPULL 1 - - -/* Substitute the variable and function names. */ -#define yyparse _asn1_yyparse -#define yylex _asn1_yylex -#define yyerror _asn1_yyerror -#define yydebug _asn1_yydebug -#define yynerrs _asn1_yynerrs - -#define yylval _asn1_yylval -#define yychar _asn1_yychar - -/* Copy the first part of user declarations. */ -#line 1 "ASN1.y" /* yacc.c:339 */ - -/* - * Copyright (C) 2001-2014 Free Software Foundation, Inc. - * - * This file is part of LIBTASN1. - * - * The LIBTASN1 library is free software; you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA - */ - -/*****************************************************/ -/* File: x509_ASN.y */ -/* Description: input file for 'bison' program. */ -/* The output file is a parser (in C language) for */ -/* ASN.1 syntax */ -/*****************************************************/ - -#include -#include -#include -#include - -static FILE *file_asn1; /* Pointer to file to parse */ -static int result_parse = 0; /* result of the parser - algorithm */ -static asn1_node p_tree; /* pointer to the root of the - structure created by the - parser*/ -static unsigned int line_number; /* line number describing the - parser position inside the - file */ -static char last_error[ASN1_MAX_ERROR_DESCRIPTION_SIZE] = ""; -static char last_error_token[ASN1_MAX_ERROR_DESCRIPTION_SIZE+1] = ""; /* used when expected errors occur */ -static char last_token[ASN1_MAX_NAME_SIZE+1] = ""; /* last token find in the file - to parse before the 'parse - error' */ -extern char _asn1_identifierMissing[]; -static const char *file_name; /* file to parse */ - -static void _asn1_yyerror (const char *); -static int _asn1_yylex(void); - - -#line 130 "ASN1.c" /* yacc.c:339 */ - -# ifndef YY_NULLPTR -# if defined __cplusplus && 201103L <= __cplusplus -# define YY_NULLPTR nullptr -# else -# define YY_NULLPTR 0 -# endif -# endif - -/* Enabling verbose error messages. */ -#ifdef YYERROR_VERBOSE -# undef YYERROR_VERBOSE -# define YYERROR_VERBOSE 1 -#else -# define YYERROR_VERBOSE 1 -#endif - - -/* Debug traces. */ -#ifndef YYDEBUG -# define YYDEBUG 0 -#endif -#if YYDEBUG -extern int _asn1_yydebug; -#endif - -/* Token type. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - enum yytokentype - { - ASSIG = 258, - NUM = 259, - IDENTIFIER = 260, - OPTIONAL = 261, - INTEGER = 262, - SIZE = 263, - OCTET = 264, - STRING = 265, - SEQUENCE = 266, - BIT = 267, - UNIVERSAL = 268, - PRIVATE = 269, - APPLICATION = 270, - DEFAULT = 271, - CHOICE = 272, - OF = 273, - OBJECT = 274, - STR_IDENTIFIER = 275, - BOOLEAN = 276, - ASN1_TRUE = 277, - ASN1_FALSE = 278, - TOKEN_NULL = 279, - ANY = 280, - DEFINED = 281, - BY = 282, - SET = 283, - EXPLICIT = 284, - IMPLICIT = 285, - DEFINITIONS = 286, - TAGS = 287, - BEGIN = 288, - END = 289, - UTCTime = 290, - GeneralizedTime = 291, - GeneralString = 292, - NumericString = 293, - IA5String = 294, - TeletexString = 295, - PrintableString = 296, - UniversalString = 297, - BMPString = 298, - UTF8String = 299, - VisibleString = 300, - FROM = 301, - IMPORTS = 302, - ENUMERATED = 303 - }; -#endif -/* Tokens. */ -#define ASSIG 258 -#define NUM 259 -#define IDENTIFIER 260 -#define OPTIONAL 261 -#define INTEGER 262 -#define SIZE 263 -#define OCTET 264 -#define STRING 265 -#define SEQUENCE 266 -#define BIT 267 -#define UNIVERSAL 268 -#define PRIVATE 269 -#define APPLICATION 270 -#define DEFAULT 271 -#define CHOICE 272 -#define OF 273 -#define OBJECT 274 -#define STR_IDENTIFIER 275 -#define BOOLEAN 276 -#define ASN1_TRUE 277 -#define ASN1_FALSE 278 -#define TOKEN_NULL 279 -#define ANY 280 -#define DEFINED 281 -#define BY 282 -#define SET 283 -#define EXPLICIT 284 -#define IMPLICIT 285 -#define DEFINITIONS 286 -#define TAGS 287 -#define BEGIN 288 -#define END 289 -#define UTCTime 290 -#define GeneralizedTime 291 -#define GeneralString 292 -#define NumericString 293 -#define IA5String 294 -#define TeletexString 295 -#define PrintableString 296 -#define UniversalString 297 -#define BMPString 298 -#define UTF8String 299 -#define VisibleString 300 -#define FROM 301 -#define IMPORTS 302 -#define ENUMERATED 303 - -/* Value type. */ -#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED - -union YYSTYPE -{ -#line 62 "ASN1.y" /* yacc.c:355 */ - - unsigned int constant; - char str[ASN1_MAX_NAME_SIZE+1]; - asn1_node node; - -#line 269 "ASN1.c" /* yacc.c:355 */ -}; - -typedef union YYSTYPE YYSTYPE; -# define YYSTYPE_IS_TRIVIAL 1 -# define YYSTYPE_IS_DECLARED 1 -#endif - - -extern YYSTYPE _asn1_yylval; - -int _asn1_yyparse (void); - - - -/* Copy the second part of user declarations. */ - -#line 286 "ASN1.c" /* yacc.c:358 */ - -#ifdef short -# undef short -#endif - -#ifdef YYTYPE_UINT8 -typedef YYTYPE_UINT8 yytype_uint8; -#else -typedef unsigned char yytype_uint8; -#endif - -#ifdef YYTYPE_INT8 -typedef YYTYPE_INT8 yytype_int8; -#else -typedef signed char yytype_int8; -#endif - -#ifdef YYTYPE_UINT16 -typedef YYTYPE_UINT16 yytype_uint16; -#else -typedef unsigned short int yytype_uint16; -#endif - -#ifdef YYTYPE_INT16 -typedef YYTYPE_INT16 yytype_int16; -#else -typedef short int yytype_int16; -#endif - -#ifndef YYSIZE_T -# ifdef __SIZE_TYPE__ -# define YYSIZE_T __SIZE_TYPE__ -# elif defined size_t -# define YYSIZE_T size_t -# elif ! defined YYSIZE_T -# include /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t -# else -# define YYSIZE_T unsigned int -# endif -#endif - -#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) - -#ifndef YY_ -# if defined YYENABLE_NLS && YYENABLE_NLS -# if ENABLE_NLS -# include /* INFRINGES ON USER NAME SPACE */ -# define YY_(Msgid) dgettext ("bison-runtime", Msgid) -# endif -# endif -# ifndef YY_ -# define YY_(Msgid) Msgid -# endif -#endif - -#ifndef YY_ATTRIBUTE -# if (defined __GNUC__ \ - && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \ - || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C -# define YY_ATTRIBUTE(Spec) __attribute__(Spec) -# else -# define YY_ATTRIBUTE(Spec) /* empty */ -# endif -#endif - -#ifndef YY_ATTRIBUTE_PURE -# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) -#endif - -#ifndef YY_ATTRIBUTE_UNUSED -# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) -#endif - -#if !defined _Noreturn \ - && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112) -# if defined _MSC_VER && 1200 <= _MSC_VER -# define _Noreturn __declspec (noreturn) -# else -# define _Noreturn YY_ATTRIBUTE ((__noreturn__)) -# endif -#endif - -/* Suppress unused-variable warnings by "using" E. */ -#if ! defined lint || defined __GNUC__ -# define YYUSE(E) ((void) (E)) -#else -# define YYUSE(E) /* empty */ -#endif - -#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ -/* Suppress an incorrect diagnostic about yylval being uninitialized. */ -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ - _Pragma ("GCC diagnostic push") \ - _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ - _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") -# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ - _Pragma ("GCC diagnostic pop") -#else -# define YY_INITIAL_VALUE(Value) Value -#endif -#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -# define YY_IGNORE_MAYBE_UNINITIALIZED_END -#endif -#ifndef YY_INITIAL_VALUE -# define YY_INITIAL_VALUE(Value) /* Nothing. */ -#endif - - -#if ! defined yyoverflow || YYERROR_VERBOSE - -/* The parser invokes alloca or malloc; define the necessary symbols. */ - -# ifdef YYSTACK_USE_ALLOCA -# if YYSTACK_USE_ALLOCA -# ifdef __GNUC__ -# define YYSTACK_ALLOC __builtin_alloca -# elif defined __BUILTIN_VA_ARG_INCR -# include /* INFRINGES ON USER NAME SPACE */ -# elif defined _AIX -# define YYSTACK_ALLOC __alloca -# elif defined _MSC_VER -# include /* INFRINGES ON USER NAME SPACE */ -# define alloca _alloca -# else -# define YYSTACK_ALLOC alloca -# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS -# include /* INFRINGES ON USER NAME SPACE */ - /* Use EXIT_SUCCESS as a witness for stdlib.h. */ -# ifndef EXIT_SUCCESS -# define EXIT_SUCCESS 0 -# endif -# endif -# endif -# endif -# endif - -# ifdef YYSTACK_ALLOC - /* Pacify GCC's 'empty if-body' warning. */ -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) -# ifndef YYSTACK_ALLOC_MAXIMUM - /* The OS might guarantee only one guard page at the bottom of the stack, - and a page size can be as small as 4096 bytes. So we cannot safely - invoke alloca (N) if N exceeds 4096. Use a slightly smaller number - to allow for a few compiler-allocated temporary stack slots. */ -# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ -# endif -# else -# define YYSTACK_ALLOC YYMALLOC -# define YYSTACK_FREE YYFREE -# ifndef YYSTACK_ALLOC_MAXIMUM -# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM -# endif -# if (defined __cplusplus && ! defined EXIT_SUCCESS \ - && ! ((defined YYMALLOC || defined malloc) \ - && (defined YYFREE || defined free))) -# include /* INFRINGES ON USER NAME SPACE */ -# ifndef EXIT_SUCCESS -# define EXIT_SUCCESS 0 -# endif -# endif -# ifndef YYMALLOC -# define YYMALLOC malloc -# if ! defined malloc && ! defined EXIT_SUCCESS -void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# ifndef YYFREE -# define YYFREE free -# if ! defined free && ! defined EXIT_SUCCESS -void free (void *); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# endif -#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ - - -#if (! defined yyoverflow \ - && (! defined __cplusplus \ - || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) - -/* A type that is properly aligned for any stack member. */ -union yyalloc -{ - yytype_int16 yyss_alloc; - YYSTYPE yyvs_alloc; -}; - -/* The size of the maximum gap between one aligned stack and the next. */ -# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) - -/* The size of an array large to enough to hold all stacks, each with - N elements. */ -# define YYSTACK_BYTES(N) \ - ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ - + YYSTACK_GAP_MAXIMUM) - -# define YYCOPY_NEEDED 1 - -/* Relocate STACK from its old location to the new one. The - local variables YYSIZE and YYSTACKSIZE give the old and new number of - elements in the stack, and YYPTR gives the new location of the - stack. Advance YYPTR to a properly aligned location for the next - stack. */ -# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ - do \ - { \ - YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ - Stack = &yyptr->Stack_alloc; \ - yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / sizeof (*yyptr); \ - } \ - while (0) - -#endif - -#if defined YYCOPY_NEEDED && YYCOPY_NEEDED -/* Copy COUNT objects from SRC to DST. The source and destination do - not overlap. */ -# ifndef YYCOPY -# if defined __GNUC__ && 1 < __GNUC__ -# define YYCOPY(Dst, Src, Count) \ - __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) -# else -# define YYCOPY(Dst, Src, Count) \ - do \ - { \ - YYSIZE_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (Dst)[yyi] = (Src)[yyi]; \ - } \ - while (0) -# endif -# endif -#endif /* !YYCOPY_NEEDED */ - -/* YYFINAL -- State number of the termination state. */ -#define YYFINAL 5 -/* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 223 - -/* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 60 -/* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 52 -/* YYNRULES -- Number of rules. */ -#define YYNRULES 128 -/* YYNSTATES -- Number of states. */ -#define YYNSTATES 223 - -/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned - by yylex, with out-of-bounds checking. */ -#define YYUNDEFTOK 2 -#define YYMAXUTOK 303 - -#define YYTRANSLATE(YYX) \ - ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) - -/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM - as returned by yylex, without out-of-bounds checking. */ -static const yytype_uint8 yytranslate[] = -{ - 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 51, 52, 2, 49, 53, 50, 59, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 54, 2, 55, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 57, 56, 58, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, - 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, - 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, - 45, 46, 47, 48 -}; - -#if YYDEBUG - /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ -static const yytype_uint16 yyrline[] = -{ - 0, 135, 135, 148, 149, 152, 155, 156, 159, 160, - 163, 164, 165, 168, 169, 172, 174, 179, 180, 184, - 186, 191, 192, 196, 197, 198, 201, 203, 207, 208, - 209, 212, 214, 215, 219, 220, 224, 225, 227, 228, - 235, 238, 239, 242, 244, 250, 251, 254, 255, 259, - 260, 264, 265, 269, 270, 274, 275, 279, 280, 284, - 285, 289, 290, 294, 295, 299, 300, 304, 309, 310, - 314, 315, 316, 321, 327, 330, 332, 335, 336, 337, - 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, - 348, 349, 350, 351, 352, 353, 354, 355, 358, 359, - 364, 365, 368, 371, 374, 375, 379, 381, 383, 388, - 390, 392, 397, 401, 402, 407, 409, 412, 416, 421, - 427, 428, 431, 432, 436, 439, 441, 465, 466 -}; -#endif - -#if YYDEBUG || YYERROR_VERBOSE || 1 -/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. - First, the terminals, then, starting at YYNTOKENS, nonterminals. */ -static const char *const yytname[] = -{ - "$end", "error", "$undefined", "\"::=\"", "NUM", "IDENTIFIER", - "OPTIONAL", "INTEGER", "SIZE", "OCTET", "STRING", "SEQUENCE", "BIT", - "UNIVERSAL", "PRIVATE", "APPLICATION", "DEFAULT", "CHOICE", "OF", - "OBJECT", "STR_IDENTIFIER", "BOOLEAN", "ASN1_TRUE", "ASN1_FALSE", - "TOKEN_NULL", "ANY", "DEFINED", "BY", "SET", "EXPLICIT", "IMPLICIT", - "DEFINITIONS", "TAGS", "BEGIN", "END", "UTCTime", "GeneralizedTime", - "GeneralString", "NumericString", "IA5String", "TeletexString", - "PrintableString", "UniversalString", "BMPString", "UTF8String", - "VisibleString", "FROM", "IMPORTS", "ENUMERATED", "'+'", "'-'", "'('", - "')'", "','", "'['", "']'", "'|'", "'{'", "'}'", "'.'", "$accept", - "definitions", "pos_num", "neg_num", "pos_neg_num", "num_identifier", - "int_identifier", "pos_neg_identifier", "constant", "constant_list", - "obj_constant", "obj_constant_list", "class", "tag_type", "tag", - "default", "pos_neg_list", "integer_def", "boolean_def", "Time", - "size_def2", "size_def", "generalstring_def", "numericstring_def", - "ia5string_def", "teletexstring_def", "printablestring_def", - "universalstring_def", "bmpstring_def", "utf8string_def", - "visiblestring_def", "octet_string_def", "bit_element", - "bit_element_list", "bit_string_def", "enumerated_def", "object_def", - "type_assig_right", "type_assig_right_tag", - "type_assig_right_tag_default", "type_assig", "type_assig_list", - "sequence_def", "set_def", "choise_def", "any_def", "type_def", - "constant_def", "type_constant", "type_constant_list", "definitions_id", - "explicit_implicit", YY_NULLPTR -}; -#endif - -# ifdef YYPRINT -/* YYTOKNUM[NUM] -- (External) token number corresponding to the - (internal) symbol number NUM (which must be that of a token). */ -static const yytype_uint16 yytoknum[] = -{ - 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, - 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, - 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, - 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, - 295, 296, 297, 298, 299, 300, 301, 302, 303, 43, - 45, 40, 41, 44, 91, 93, 124, 123, 125, 46 -}; -# endif - -#define YYPACT_NINF -129 - -#define yypact_value_is_default(Yystate) \ - (!!((Yystate) == (-129))) - -#define YYTABLE_NINF -12 - -#define yytable_value_is_error(Yytable_value) \ - 0 - - /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - STATE-NUM. */ -static const yytype_int16 yypact[] = -{ - 36, -7, 74, 22, 3, -129, 26, -129, 34, -129, - -129, -129, 5, -129, -129, 55, 89, -129, -129, 97, - 57, 101, -129, 122, 141, 132, -129, -129, -129, 32, - 77, 77, 152, 165, 150, -129, -129, 6, 119, 167, - 18, 168, 124, 159, -129, -129, 156, 21, -129, -129, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 126, - 30, 38, 121, 133, -129, -129, -129, -129, -129, -129, - -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, - -129, -129, -129, -129, -129, -129, 128, 58, 183, 136, - 180, -129, -129, 20, 6, 121, 184, 172, -3, 184, - -129, 164, 121, 184, 174, -129, -129, -129, -129, -129, - -129, -129, -129, -129, 188, 139, -129, -129, -129, 191, - -129, -129, -129, 42, 149, -129, 192, 193, -129, -129, - -129, 142, 169, 146, 151, 58, -129, 53, -129, -129, - 77, -129, 71, 121, 188, -129, 83, 195, -129, 90, - 121, 153, -129, 94, -129, 148, 147, -129, 197, -129, - 154, 43, 7, -129, -129, 149, -129, -21, -129, 58, - 155, 20, -129, 24, -129, 184, -129, -129, 114, -129, - -129, -129, -129, 201, 188, -129, -129, 157, 158, -129, - 58, -129, 23, -129, 160, 162, -129, -129, -129, 54, - -129, -129, -129, 163, -129, 47, -129, -129, 169, -129, - -129, -129, -129, -129, -129, -129, -129, 204, 166, 170, - -129, -129, -129 -}; - - /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. - Performed when YYTABLE does not specify something else to do. Zero - means the default is an error. */ -static const yytype_uint8 yydefact[] = -{ - 0, 126, 0, 0, 0, 1, 0, 8, 9, 125, - 19, 21, 0, 127, 128, 0, 0, 124, 22, 0, - 0, 0, 20, 0, 0, 0, 120, 121, 122, 0, - 0, 0, 0, 0, 0, 2, 123, 75, 36, 0, - 0, 0, 0, 0, 40, 97, 113, 0, 41, 42, - 47, 49, 51, 53, 55, 57, 59, 61, 63, 0, - 0, 28, 0, 77, 79, 80, 83, 84, 85, 86, - 87, 88, 89, 90, 91, 81, 82, 78, 93, 98, - 116, 92, 96, 94, 95, 115, 0, 0, 0, 0, - 0, 45, 76, 0, 65, 0, 0, 0, 70, 0, - 74, 0, 0, 0, 0, 48, 50, 52, 54, 56, - 58, 60, 62, 64, 0, 0, 23, 24, 25, 0, - 29, 30, 99, 0, 0, 3, 0, 0, 6, 7, - 119, 0, 0, 0, 0, 0, 17, 0, 66, 107, - 0, 104, 0, 0, 0, 71, 0, 0, 110, 0, - 0, 0, 68, 0, 26, 0, 3, 12, 0, 34, - 0, 0, 0, 4, 5, 0, 9, 0, 46, 0, - 0, 0, 37, 100, 103, 0, 106, 108, 0, 112, - 114, 109, 111, 0, 0, 73, 27, 5, 0, 38, - 0, 118, 0, 43, 0, 0, 15, 18, 102, 0, - 101, 105, 72, 0, 69, 0, 35, 117, 0, 16, - 14, 32, 33, 13, 31, 67, 10, 0, 0, 0, - 11, 39, 44 -}; - - /* YYPGOTO[NTERM-NUM]. */ -static const yytype_int16 yypgoto[] = -{ - -129, -129, -129, -129, -120, -128, 4, -129, 39, -129, - -12, -92, -129, -129, -129, -129, -129, -129, -129, -129, - 130, -34, -129, -129, -129, -129, -129, -129, -129, -129, - -129, -129, 27, 68, -129, -129, -129, -60, -30, -129, - 46, 72, -129, -129, -129, -129, -129, -129, 194, -129, - -129, -129 -}; - - /* YYDEFGOTO[NTERM-NUM]. */ -static const yytype_int16 yydefgoto[] = -{ - -1, 2, 128, 129, 130, 10, 160, 214, 136, 137, - 11, 12, 119, 61, 62, 200, 161, 63, 64, 65, - 91, 92, 66, 67, 68, 69, 70, 71, 72, 73, - 74, 75, 152, 153, 76, 77, 78, 79, 80, 174, - 141, 142, 81, 82, 83, 84, 26, 27, 28, 29, - 3, 15 -}; - - /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If - positive, shift that token. If negative, reduce the rule whose - number is the opposite. If YYTABLE_NINF, syntax error. */ -static const yytype_int16 yytable[] = -{ - 18, 85, 122, 159, 167, 89, 97, 7, 8, 7, - 8, 7, 8, 104, 89, 170, 105, 106, 107, 108, - 109, 110, 111, 112, 113, 134, 89, 7, 8, 89, - 198, 193, 162, 24, 115, 139, 95, 25, 194, 102, - 199, 1, 148, 116, 117, 118, 156, 157, 90, 195, - 4, 216, 157, 6, 144, 13, 14, 90, 125, 210, - 138, 9, 125, 17, 145, 191, 35, 120, 121, 90, - 206, 135, 90, 192, 5, 96, 211, 212, 103, 213, - 219, 207, 37, 177, 38, 16, 39, 19, 40, 41, - 182, 126, 158, 20, 42, 189, 43, 217, 44, 190, - 21, 45, 46, 126, 127, 47, 171, 126, 127, 22, - 173, 172, 48, 49, 50, 51, 52, 53, 54, 55, - 56, 57, 58, 24, 175, 59, 37, 25, 38, 176, - 39, 60, 40, 41, 23, 31, 175, 32, 42, 33, - 43, 179, 44, 175, 30, 45, 46, 184, 181, 47, - 18, 34, 185, 7, 8, 86, 48, 49, 50, 51, - 52, 53, 54, 55, 56, 57, 58, 184, 87, 59, - 88, 146, 202, 7, 166, 149, 93, 94, 98, 100, - 18, 99, 101, 114, 123, 124, 131, 132, 89, 140, - 143, 147, 150, 151, 154, 155, 163, 164, 168, 165, - 180, 187, 169, 186, 183, 203, -10, 196, 220, 218, - 197, 204, 178, 188, 209, 215, -11, 205, 221, 208, - 133, 201, 222, 36 -}; - -static const yytype_uint8 yycheck[] = -{ - 12, 31, 62, 123, 132, 8, 40, 4, 5, 4, - 5, 4, 5, 47, 8, 135, 50, 51, 52, 53, - 54, 55, 56, 57, 58, 5, 8, 4, 5, 8, - 6, 52, 124, 1, 4, 95, 18, 5, 59, 18, - 16, 5, 102, 13, 14, 15, 4, 5, 51, 169, - 57, 4, 5, 31, 57, 29, 30, 51, 4, 5, - 94, 58, 4, 58, 98, 58, 34, 29, 30, 51, - 190, 51, 51, 165, 0, 57, 22, 23, 57, 199, - 208, 58, 5, 143, 7, 51, 9, 32, 11, 12, - 150, 49, 50, 4, 17, 52, 19, 50, 21, 56, - 3, 24, 25, 49, 50, 28, 53, 49, 50, 52, - 140, 58, 35, 36, 37, 38, 39, 40, 41, 42, - 43, 44, 45, 1, 53, 48, 5, 5, 7, 58, - 9, 54, 11, 12, 33, 3, 53, 5, 17, 7, - 19, 58, 21, 53, 3, 24, 25, 53, 58, 28, - 162, 19, 58, 4, 5, 3, 35, 36, 37, 38, - 39, 40, 41, 42, 43, 44, 45, 53, 3, 48, - 20, 99, 58, 4, 5, 103, 57, 10, 10, 20, - 192, 57, 26, 57, 51, 57, 3, 51, 8, 5, - 18, 27, 18, 5, 55, 4, 4, 4, 52, 57, - 5, 4, 51, 55, 51, 4, 59, 52, 4, 205, - 171, 184, 144, 59, 52, 52, 59, 59, 52, 59, - 90, 175, 52, 29 -}; - - /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing - symbol of state STATE-NUM. */ -static const yytype_uint8 yystos[] = -{ - 0, 5, 61, 110, 57, 0, 31, 4, 5, 58, - 65, 70, 71, 29, 30, 111, 51, 58, 70, 32, - 4, 3, 52, 33, 1, 5, 106, 107, 108, 109, - 3, 3, 5, 7, 19, 34, 108, 5, 7, 9, - 11, 12, 17, 19, 21, 24, 25, 28, 35, 36, - 37, 38, 39, 40, 41, 42, 43, 44, 45, 48, - 54, 73, 74, 77, 78, 79, 82, 83, 84, 85, - 86, 87, 88, 89, 90, 91, 94, 95, 96, 97, - 98, 102, 103, 104, 105, 98, 3, 3, 20, 8, - 51, 80, 81, 57, 10, 18, 57, 81, 10, 57, - 20, 26, 18, 57, 81, 81, 81, 81, 81, 81, - 81, 81, 81, 81, 57, 4, 13, 14, 15, 72, - 29, 30, 97, 51, 57, 4, 49, 50, 62, 63, - 64, 3, 51, 80, 5, 51, 68, 69, 81, 97, - 5, 100, 101, 18, 57, 81, 101, 27, 97, 101, - 18, 5, 92, 93, 55, 4, 4, 5, 50, 64, - 66, 76, 71, 4, 4, 57, 5, 65, 52, 51, - 64, 53, 58, 98, 99, 53, 58, 97, 93, 58, - 5, 58, 97, 51, 53, 58, 55, 4, 59, 52, - 56, 58, 71, 52, 59, 64, 52, 68, 6, 16, - 75, 100, 58, 4, 92, 59, 64, 58, 59, 52, - 5, 22, 23, 64, 67, 52, 4, 50, 66, 65, - 4, 52, 52 -}; - - /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const yytype_uint8 yyr1[] = -{ - 0, 60, 61, 62, 62, 63, 64, 64, 65, 65, - 66, 66, 66, 67, 67, 68, 68, 69, 69, 70, - 70, 71, 71, 72, 72, 72, 73, 73, 74, 74, - 74, 75, 75, 75, 76, 76, 77, 77, 77, 77, - 78, 79, 79, 80, 80, 81, 81, 82, 82, 83, - 83, 84, 84, 85, 85, 86, 86, 87, 87, 88, - 88, 89, 89, 90, 90, 91, 91, 92, 93, 93, - 94, 94, 94, 95, 96, 97, 97, 97, 97, 97, - 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, - 97, 97, 97, 97, 97, 97, 97, 97, 98, 98, - 99, 99, 99, 100, 101, 101, 102, 102, 102, 103, - 103, 103, 104, 105, 105, 106, 106, 107, 107, 107, - 108, 108, 109, 109, 110, 110, 110, 111, 111 -}; - - /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ -static const yytype_uint8 yyr2[] = -{ - 0, 2, 8, 1, 2, 2, 1, 1, 1, 1, - 1, 2, 1, 1, 1, 3, 4, 1, 3, 1, - 4, 1, 2, 1, 1, 1, 3, 4, 1, 2, - 2, 2, 2, 2, 1, 3, 1, 4, 4, 7, - 1, 1, 1, 4, 7, 1, 3, 1, 2, 1, - 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, - 2, 1, 2, 1, 2, 2, 3, 4, 1, 3, - 2, 3, 5, 4, 2, 1, 2, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, - 1, 2, 2, 2, 1, 3, 4, 3, 4, 4, - 3, 4, 4, 1, 4, 3, 3, 7, 6, 4, - 1, 1, 1, 2, 4, 3, 1, 1, 1 -}; - - -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) -#define YYEMPTY (-2) -#define YYEOF 0 - -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrorlab - - -#define YYRECOVERING() (!!yyerrstatus) - -#define YYBACKUP(Token, Value) \ -do \ - if (yychar == YYEMPTY) \ - { \ - yychar = (Token); \ - yylval = (Value); \ - YYPOPSTACK (yylen); \ - yystate = *yyssp; \ - goto yybackup; \ - } \ - else \ - { \ - yyerror (YY_("syntax error: cannot back up")); \ - YYERROR; \ - } \ -while (0) - -/* Error token number */ -#define YYTERROR 1 -#define YYERRCODE 256 - - - -/* Enable debugging if requested. */ -#if YYDEBUG - -# ifndef YYFPRINTF -# include /* INFRINGES ON USER NAME SPACE */ -# define YYFPRINTF fprintf -# endif - -# define YYDPRINTF(Args) \ -do { \ - if (yydebug) \ - YYFPRINTF Args; \ -} while (0) - -/* This macro is provided for backward compatibility. */ -#ifndef YY_LOCATION_PRINT -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) -#endif - - -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yy_symbol_print (stderr, \ - Type, Value); \ - YYFPRINTF (stderr, "\n"); \ - } \ -} while (0) - - -/*----------------------------------------. -| Print this symbol's value on YYOUTPUT. | -`----------------------------------------*/ - -static void -yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) -{ - FILE *yyo = yyoutput; - YYUSE (yyo); - if (!yyvaluep) - return; -# ifdef YYPRINT - if (yytype < YYNTOKENS) - YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); -# endif - YYUSE (yytype); -} - - -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ - -static void -yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) -{ - YYFPRINTF (yyoutput, "%s %s (", - yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); - - yy_symbol_value_print (yyoutput, yytype, yyvaluep); - YYFPRINTF (yyoutput, ")"); -} - -/*------------------------------------------------------------------. -| yy_stack_print -- Print the state stack from its BOTTOM up to its | -| TOP (included). | -`------------------------------------------------------------------*/ - -static void -yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) -{ - YYFPRINTF (stderr, "Stack now"); - for (; yybottom <= yytop; yybottom++) - { - int yybot = *yybottom; - YYFPRINTF (stderr, " %d", yybot); - } - YYFPRINTF (stderr, "\n"); -} - -# define YY_STACK_PRINT(Bottom, Top) \ -do { \ - if (yydebug) \ - yy_stack_print ((Bottom), (Top)); \ -} while (0) - - -/*------------------------------------------------. -| Report that the YYRULE is going to be reduced. | -`------------------------------------------------*/ - -static void -yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule) -{ - unsigned long int yylno = yyrline[yyrule]; - int yynrhs = yyr2[yyrule]; - int yyi; - YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", - yyrule - 1, yylno); - /* The symbols being reduced. */ - for (yyi = 0; yyi < yynrhs; yyi++) - { - YYFPRINTF (stderr, " $%d = ", yyi + 1); - yy_symbol_print (stderr, - yystos[yyssp[yyi + 1 - yynrhs]], - &(yyvsp[(yyi + 1) - (yynrhs)]) - ); - YYFPRINTF (stderr, "\n"); - } -} - -# define YY_REDUCE_PRINT(Rule) \ -do { \ - if (yydebug) \ - yy_reduce_print (yyssp, yyvsp, Rule); \ -} while (0) - -/* Nonzero means print parse trace. It is left uninitialized so that - multiple parsers can coexist. */ -int yydebug; -#else /* !YYDEBUG */ -# define YYDPRINTF(Args) -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) -# define YY_STACK_PRINT(Bottom, Top) -# define YY_REDUCE_PRINT(Rule) -#endif /* !YYDEBUG */ - - -/* YYINITDEPTH -- initial size of the parser's stacks. */ -#ifndef YYINITDEPTH -# define YYINITDEPTH 200 -#endif - -/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only - if the built-in stack extension method is used). - - Do not make this value too large; the results are undefined if - YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) - evaluated with infinite-precision integer arithmetic. */ - -#ifndef YYMAXDEPTH -# define YYMAXDEPTH 10000 -#endif - - -#if YYERROR_VERBOSE - -# ifndef yystrlen -# if defined __GLIBC__ && defined _STRING_H -# define yystrlen strlen -# else -/* Return the length of YYSTR. */ -static YYSIZE_T -yystrlen (const char *yystr) -{ - YYSIZE_T yylen; - for (yylen = 0; yystr[yylen]; yylen++) - continue; - return yylen; -} -# endif -# endif - -# ifndef yystpcpy -# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE -# define yystpcpy stpcpy -# else -/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in - YYDEST. */ -static char * -yystpcpy (char *yydest, const char *yysrc) -{ - char *yyd = yydest; - const char *yys = yysrc; - - while ((*yyd++ = *yys++) != '\0') - continue; - - return yyd - 1; -} -# endif -# endif - -# ifndef yytnamerr -/* Copy to YYRES the contents of YYSTR after stripping away unnecessary - quotes and backslashes, so that it's suitable for yyerror. The - heuristic is that double-quoting is unnecessary unless the string - contains an apostrophe, a comma, or backslash (other than - backslash-backslash). YYSTR is taken from yytname. If YYRES is - null, do not copy; instead, return the length of what the result - would have been. */ -static YYSIZE_T -yytnamerr (char *yyres, const char *yystr) -{ - if (*yystr == '"') - { - YYSIZE_T yyn = 0; - char const *yyp = yystr; - - for (;;) - switch (*++yyp) - { - case '\'': - case ',': - goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - /* Fall through. */ - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; - - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } - do_not_strip_quotes: ; - } - - if (! yyres) - return yystrlen (yystr); - - return yystpcpy (yyres, yystr) - yyres; -} -# endif - -/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message - about the unexpected token YYTOKEN for the state stack whose top is - YYSSP. - - Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is - not large enough to hold the message. In that case, also set - *YYMSG_ALLOC to the required number of bytes. Return 2 if the - required number of bytes is too large to store. */ -static int -yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, - yytype_int16 *yyssp, int yytoken) -{ - YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]); - YYSIZE_T yysize = yysize0; - enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; - /* Internationalized format string. */ - const char *yyformat = YY_NULLPTR; - /* Arguments of yyformat. */ - char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; - /* Number of reported tokens (one for the "unexpected", one per - "expected"). */ - int yycount = 0; - - /* There are many possibilities here to consider: - - If this state is a consistent state with a default action, then - the only way this function was invoked is if the default action - is an error action. In that case, don't check for expected - tokens because there are none. - - The only way there can be no lookahead present (in yychar) is if - this state is a consistent state with a default action. Thus, - detecting the absence of a lookahead is sufficient to determine - that there is no unexpected or expected token to report. In that - case, just report a simple "syntax error". - - Don't assume there isn't a lookahead just because this state is a - consistent state with a default action. There might have been a - previous inconsistent state, consistent state with a non-default - action, or user semantic action that manipulated yychar. - - Of course, the expected token list depends on states to have - correct lookahead information, and it depends on the parser not - to perform extra reductions after fetching a lookahead from the - scanner and before detecting a syntax error. Thus, state merging - (from LALR or IELR) and default reductions corrupt the expected - token list. However, the list is correct for canonical LR with - one exception: it will still contain any token that will not be - accepted due to an error action in a later state. - */ - if (yytoken != YYEMPTY) - { - int yyn = yypact[*yyssp]; - yyarg[yycount++] = yytname[yytoken]; - if (!yypact_value_is_default (yyn)) - { - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. In other words, skip the first -YYN actions for - this state because they are default actions. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn + 1; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yyx; - - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR - && !yytable_value_is_error (yytable[yyx + yyn])) - { - if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) - { - yycount = 1; - yysize = yysize0; - break; - } - yyarg[yycount++] = yytname[yyx]; - { - YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); - if (! (yysize <= yysize1 - && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) - return 2; - yysize = yysize1; - } - } - } - } - - switch (yycount) - { -# define YYCASE_(N, S) \ - case N: \ - yyformat = S; \ - break - YYCASE_(0, YY_("syntax error")); - YYCASE_(1, YY_("syntax error, unexpected %s")); - YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); - YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); - YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); - YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); -# undef YYCASE_ - } - - { - YYSIZE_T yysize1 = yysize + yystrlen (yyformat); - if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) - return 2; - yysize = yysize1; - } - - if (*yymsg_alloc < yysize) - { - *yymsg_alloc = 2 * yysize; - if (! (yysize <= *yymsg_alloc - && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) - *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; - return 1; - } - - /* Avoid sprintf, as that infringes on the user's name space. - Don't have undefined behavior even if the translation - produced a string with the wrong number of "%s"s. */ - { - char *yyp = *yymsg; - int yyi = 0; - while ((*yyp = *yyformat) != '\0') - if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) - { - yyp += yytnamerr (yyp, yyarg[yyi++]); - yyformat += 2; - } - else - { - yyp++; - yyformat++; - } - } - return 0; -} -#endif /* YYERROR_VERBOSE */ - -/*-----------------------------------------------. -| Release the memory associated to this symbol. | -`-----------------------------------------------*/ - -static void -yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) -{ - YYUSE (yyvaluep); - if (!yymsg) - yymsg = "Deleting"; - YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); - - YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - YYUSE (yytype); - YY_IGNORE_MAYBE_UNINITIALIZED_END -} - - - - -/* The lookahead symbol. */ -int yychar; - -/* The semantic value of the lookahead symbol. */ -YYSTYPE yylval; -/* Number of syntax errors so far. */ -int yynerrs; - - -/*----------. -| yyparse. | -`----------*/ - -int -yyparse (void) -{ - int yystate; - /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus; - - /* The stacks and their tools: - 'yyss': related to states. - 'yyvs': related to semantic values. - - Refer to the stacks through separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ - - /* The state stack. */ - yytype_int16 yyssa[YYINITDEPTH]; - yytype_int16 *yyss; - yytype_int16 *yyssp; - - /* The semantic value stack. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs; - YYSTYPE *yyvsp; - - YYSIZE_T yystacksize; - - int yyn; - int yyresult; - /* Lookahead token as an internal (translated) token number. */ - int yytoken = 0; - /* The variables used to return semantic value and location from the - action routines. */ - YYSTYPE yyval; - -#if YYERROR_VERBOSE - /* Buffer for error messages, and its allocated size. */ - char yymsgbuf[128]; - char *yymsg = yymsgbuf; - YYSIZE_T yymsg_alloc = sizeof yymsgbuf; -#endif - -#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) - - /* The number of symbols on the RHS of the reduced rule. - Keep to zero when no symbol should be popped. */ - int yylen = 0; - - yyssp = yyss = yyssa; - yyvsp = yyvs = yyvsa; - yystacksize = YYINITDEPTH; - - YYDPRINTF ((stderr, "Starting parse\n")); - - yystate = 0; - yyerrstatus = 0; - yynerrs = 0; - yychar = YYEMPTY; /* Cause a token to be read. */ - goto yysetstate; - -/*------------------------------------------------------------. -| yynewstate -- Push a new state, which is found in yystate. | -`------------------------------------------------------------*/ - yynewstate: - /* In all cases, when you get here, the value and location stacks - have just been pushed. So pushing a state here evens the stacks. */ - yyssp++; - - yysetstate: - *yyssp = yystate; - - if (yyss + yystacksize - 1 <= yyssp) - { - /* Get the current used size of the three stacks, in elements. */ - YYSIZE_T yysize = yyssp - yyss + 1; - -#ifdef yyoverflow - { - /* Give user a chance to reallocate the stack. Use copies of - these so that the &'s don't force the real ones into - memory. */ - YYSTYPE *yyvs1 = yyvs; - yytype_int16 *yyss1 = yyss; - - /* Each stack pointer address is followed by the size of the - data in use in that stack, in bytes. This used to be a - conditional around just the two extra args, but that might - be undefined if yyoverflow is a macro. */ - yyoverflow (YY_("memory exhausted"), - &yyss1, yysize * sizeof (*yyssp), - &yyvs1, yysize * sizeof (*yyvsp), - &yystacksize); - - yyss = yyss1; - yyvs = yyvs1; - } -#else /* no yyoverflow */ -# ifndef YYSTACK_RELOCATE - goto yyexhaustedlab; -# else - /* Extend the stack our own way. */ - if (YYMAXDEPTH <= yystacksize) - goto yyexhaustedlab; - yystacksize *= 2; - if (YYMAXDEPTH < yystacksize) - yystacksize = YYMAXDEPTH; - - { - yytype_int16 *yyss1 = yyss; - union yyalloc *yyptr = - (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); - if (! yyptr) - goto yyexhaustedlab; - YYSTACK_RELOCATE (yyss_alloc, yyss); - YYSTACK_RELOCATE (yyvs_alloc, yyvs); -# undef YYSTACK_RELOCATE - if (yyss1 != yyssa) - YYSTACK_FREE (yyss1); - } -# endif -#endif /* no yyoverflow */ - - yyssp = yyss + yysize - 1; - yyvsp = yyvs + yysize - 1; - - YYDPRINTF ((stderr, "Stack size increased to %lu\n", - (unsigned long int) yystacksize)); - - if (yyss + yystacksize - 1 <= yyssp) - YYABORT; - } - - YYDPRINTF ((stderr, "Entering state %d\n", yystate)); - - if (yystate == YYFINAL) - YYACCEPT; - - goto yybackup; - -/*-----------. -| yybackup. | -`-----------*/ -yybackup: - - /* Do appropriate processing given the current state. Read a - lookahead token if we need one and don't already have one. */ - - /* First try to decide what to do without reference to lookahead token. */ - yyn = yypact[yystate]; - if (yypact_value_is_default (yyn)) - goto yydefault; - - /* Not known => get a lookahead token if don't already have one. */ - - /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ - if (yychar == YYEMPTY) - { - YYDPRINTF ((stderr, "Reading a token: ")); - yychar = yylex (); - } - - if (yychar <= YYEOF) - { - yychar = yytoken = YYEOF; - YYDPRINTF ((stderr, "Now at end of input.\n")); - } - else - { - yytoken = YYTRANSLATE (yychar); - YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); - } - - /* If the proper action on seeing token YYTOKEN is to reduce or to - detect an error, take that action. */ - yyn += yytoken; - if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) - goto yydefault; - yyn = yytable[yyn]; - if (yyn <= 0) - { - if (yytable_value_is_error (yyn)) - goto yyerrlab; - yyn = -yyn; - goto yyreduce; - } - - /* Count tokens shifted since error; after three, turn off error - status. */ - if (yyerrstatus) - yyerrstatus--; - - /* Shift the lookahead token. */ - YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); - - /* Discard the shifted token. */ - yychar = YYEMPTY; - - yystate = yyn; - YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - *++yyvsp = yylval; - YY_IGNORE_MAYBE_UNINITIALIZED_END - - goto yynewstate; - - -/*-----------------------------------------------------------. -| yydefault -- do the default action for the current state. | -`-----------------------------------------------------------*/ -yydefault: - yyn = yydefact[yystate]; - if (yyn == 0) - goto yyerrlab; - goto yyreduce; - - -/*-----------------------------. -| yyreduce -- Do a reduction. | -`-----------------------------*/ -yyreduce: - /* yyn is the number of a rule to reduce with. */ - yylen = yyr2[yyn]; - - /* If YYLEN is nonzero, implement the default value of the action: - '$$ = $1'. - - Otherwise, the following line sets YYVAL to garbage. - This behavior is undocumented and Bison - users should not rely upon it. Assigning to YYVAL - unconditionally makes the parser a bit smaller, and it avoids a - GCC warning that YYVAL may be used uninitialized. */ - yyval = yyvsp[1-yylen]; - - - YY_REDUCE_PRINT (yyn); - switch (yyn) - { - case 2: -#line 138 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_DEFINITIONS|(yyvsp[-5].constant)); - _asn1_set_name((yyval.node),_asn1_get_name((yyvsp[-7].node))); - _asn1_set_name((yyvsp[-7].node),""); - _asn1_set_right((yyvsp[-7].node),(yyvsp[-1].node)); - _asn1_set_down((yyval.node),(yyvsp[-7].node)); - - p_tree=(yyval.node); - } -#line 1546 "ASN1.c" /* yacc.c:1646 */ - break; - - case 3: -#line 148 "ASN1.y" /* yacc.c:1646 */ - {snprintf((yyval.str),sizeof((yyval.str)),"%s",(yyvsp[0].str));} -#line 1552 "ASN1.c" /* yacc.c:1646 */ - break; - - case 4: -#line 149 "ASN1.y" /* yacc.c:1646 */ - {snprintf((yyval.str),sizeof((yyval.str)),"%s",(yyvsp[0].str));} -#line 1558 "ASN1.c" /* yacc.c:1646 */ - break; - - case 5: -#line 152 "ASN1.y" /* yacc.c:1646 */ - {snprintf((yyval.str),sizeof((yyval.str)),"-%s",(yyvsp[0].str));} -#line 1564 "ASN1.c" /* yacc.c:1646 */ - break; - - case 6: -#line 155 "ASN1.y" /* yacc.c:1646 */ - {snprintf((yyval.str),sizeof((yyval.str)),"%s",(yyvsp[0].str));} -#line 1570 "ASN1.c" /* yacc.c:1646 */ - break; - - case 7: -#line 156 "ASN1.y" /* yacc.c:1646 */ - {snprintf((yyval.str),sizeof((yyval.str)),"%s",(yyvsp[0].str));} -#line 1576 "ASN1.c" /* yacc.c:1646 */ - break; - - case 8: -#line 159 "ASN1.y" /* yacc.c:1646 */ - {snprintf((yyval.str),sizeof((yyval.str)),"%s",(yyvsp[0].str));} -#line 1582 "ASN1.c" /* yacc.c:1646 */ - break; - - case 9: -#line 160 "ASN1.y" /* yacc.c:1646 */ - {snprintf((yyval.str),sizeof((yyval.str)),"%s",(yyvsp[0].str));} -#line 1588 "ASN1.c" /* yacc.c:1646 */ - break; - - case 10: -#line 163 "ASN1.y" /* yacc.c:1646 */ - {snprintf((yyval.str),sizeof((yyval.str)),"%s",(yyvsp[0].str));} -#line 1594 "ASN1.c" /* yacc.c:1646 */ - break; - - case 11: -#line 164 "ASN1.y" /* yacc.c:1646 */ - {snprintf((yyval.str),sizeof((yyval.str)),"-%s",(yyvsp[0].str));} -#line 1600 "ASN1.c" /* yacc.c:1646 */ - break; - - case 12: -#line 165 "ASN1.y" /* yacc.c:1646 */ - {snprintf((yyval.str),sizeof((yyval.str)),"%s",(yyvsp[0].str));} -#line 1606 "ASN1.c" /* yacc.c:1646 */ - break; - - case 13: -#line 168 "ASN1.y" /* yacc.c:1646 */ - {snprintf((yyval.str),sizeof((yyval.str)),"%s",(yyvsp[0].str));} -#line 1612 "ASN1.c" /* yacc.c:1646 */ - break; - - case 14: -#line 169 "ASN1.y" /* yacc.c:1646 */ - {snprintf((yyval.str),sizeof((yyval.str)),"%s",(yyvsp[0].str));} -#line 1618 "ASN1.c" /* yacc.c:1646 */ - break; - - case 15: -#line 172 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_CONSTANT); - _asn1_set_value((yyval.node),(yyvsp[-1].str),strlen((yyvsp[-1].str))+1);} -#line 1625 "ASN1.c" /* yacc.c:1646 */ - break; - - case 16: -#line 174 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_CONSTANT); - _asn1_set_name((yyval.node),(yyvsp[-3].str)); - _asn1_set_value((yyval.node),(yyvsp[-1].str),strlen((yyvsp[-1].str))+1);} -#line 1633 "ASN1.c" /* yacc.c:1646 */ - break; - - case 17: -#line 179 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=(yyvsp[0].node);} -#line 1639 "ASN1.c" /* yacc.c:1646 */ - break; - - case 18: -#line 180 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=(yyvsp[-2].node); - _asn1_set_right(_asn1_get_last_right((yyvsp[-2].node)),(yyvsp[0].node));} -#line 1646 "ASN1.c" /* yacc.c:1646 */ - break; - - case 19: -#line 184 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_CONSTANT); - _asn1_set_value((yyval.node),(yyvsp[0].str),strlen((yyvsp[0].str))+1);} -#line 1653 "ASN1.c" /* yacc.c:1646 */ - break; - - case 20: -#line 186 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_CONSTANT); - _asn1_set_name((yyval.node),(yyvsp[-3].str)); - _asn1_set_value((yyval.node),(yyvsp[-1].str),strlen((yyvsp[-1].str))+1);} -#line 1661 "ASN1.c" /* yacc.c:1646 */ - break; - - case 21: -#line 191 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=(yyvsp[0].node);} -#line 1667 "ASN1.c" /* yacc.c:1646 */ - break; - - case 22: -#line 192 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=(yyvsp[-1].node); - _asn1_set_right(_asn1_get_last_right((yyvsp[-1].node)),(yyvsp[0].node));} -#line 1674 "ASN1.c" /* yacc.c:1646 */ - break; - - case 23: -#line 196 "ASN1.y" /* yacc.c:1646 */ - {(yyval.constant)=CONST_UNIVERSAL;} -#line 1680 "ASN1.c" /* yacc.c:1646 */ - break; - - case 24: -#line 197 "ASN1.y" /* yacc.c:1646 */ - {(yyval.constant)=CONST_PRIVATE;} -#line 1686 "ASN1.c" /* yacc.c:1646 */ - break; - - case 25: -#line 198 "ASN1.y" /* yacc.c:1646 */ - {(yyval.constant)=CONST_APPLICATION;} -#line 1692 "ASN1.c" /* yacc.c:1646 */ - break; - - case 26: -#line 201 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_TAG); - _asn1_set_value((yyval.node),(yyvsp[-1].str),strlen((yyvsp[-1].str))+1);} -#line 1699 "ASN1.c" /* yacc.c:1646 */ - break; - - case 27: -#line 203 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_TAG | (yyvsp[-2].constant)); - _asn1_set_value((yyval.node),(yyvsp[-1].str),strlen((yyvsp[-1].str))+1);} -#line 1706 "ASN1.c" /* yacc.c:1646 */ - break; - - case 28: -#line 207 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=(yyvsp[0].node);} -#line 1712 "ASN1.c" /* yacc.c:1646 */ - break; - - case 29: -#line 208 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_mod_type((yyvsp[-1].node),CONST_EXPLICIT);} -#line 1718 "ASN1.c" /* yacc.c:1646 */ - break; - - case 30: -#line 209 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_mod_type((yyvsp[-1].node),CONST_IMPLICIT);} -#line 1724 "ASN1.c" /* yacc.c:1646 */ - break; - - case 31: -#line 212 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_DEFAULT); - _asn1_set_value((yyval.node),(yyvsp[0].str),strlen((yyvsp[0].str))+1);} -#line 1731 "ASN1.c" /* yacc.c:1646 */ - break; - - case 32: -#line 214 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_DEFAULT|CONST_TRUE);} -#line 1737 "ASN1.c" /* yacc.c:1646 */ - break; - - case 33: -#line 215 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_DEFAULT|CONST_FALSE);} -#line 1743 "ASN1.c" /* yacc.c:1646 */ - break; - - case 36: -#line 224 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_INTEGER);} -#line 1749 "ASN1.c" /* yacc.c:1646 */ - break; - - case 37: -#line 225 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_INTEGER|CONST_LIST); - _asn1_set_down((yyval.node),(yyvsp[-1].node));} -#line 1756 "ASN1.c" /* yacc.c:1646 */ - break; - - case 38: -#line 227 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_INTEGER);} -#line 1762 "ASN1.c" /* yacc.c:1646 */ - break; - - case 39: -#line 229 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_INTEGER|CONST_MIN_MAX); - _asn1_set_down((yyval.node),_asn1_add_static_node(ASN1_ETYPE_SIZE)); - _asn1_set_value(_asn1_get_down((yyval.node)),(yyvsp[-1].str),strlen((yyvsp[-1].str))+1); - _asn1_set_name(_asn1_get_down((yyval.node)),(yyvsp[-4].str));} -#line 1771 "ASN1.c" /* yacc.c:1646 */ - break; - - case 40: -#line 235 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_BOOLEAN);} -#line 1777 "ASN1.c" /* yacc.c:1646 */ - break; - - case 41: -#line 238 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_UTC_TIME);} -#line 1783 "ASN1.c" /* yacc.c:1646 */ - break; - - case 42: -#line 239 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_GENERALIZED_TIME);} -#line 1789 "ASN1.c" /* yacc.c:1646 */ - break; - - case 43: -#line 242 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_SIZE|CONST_1_PARAM); - _asn1_set_value((yyval.node),(yyvsp[-1].str),strlen((yyvsp[-1].str))+1);} -#line 1796 "ASN1.c" /* yacc.c:1646 */ - break; - - case 44: -#line 245 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_SIZE|CONST_MIN_MAX); - _asn1_set_value((yyval.node),(yyvsp[-4].str),strlen((yyvsp[-4].str))+1); - _asn1_set_name((yyval.node),(yyvsp[-1].str));} -#line 1804 "ASN1.c" /* yacc.c:1646 */ - break; - - case 45: -#line 250 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=(yyvsp[0].node);} -#line 1810 "ASN1.c" /* yacc.c:1646 */ - break; - - case 46: -#line 251 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=(yyvsp[-1].node);} -#line 1816 "ASN1.c" /* yacc.c:1646 */ - break; - - case 47: -#line 254 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_GENERALSTRING);} -#line 1822 "ASN1.c" /* yacc.c:1646 */ - break; - - case 48: -#line 255 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_GENERALSTRING|CONST_SIZE); - _asn1_set_down((yyval.node),(yyvsp[0].node));} -#line 1829 "ASN1.c" /* yacc.c:1646 */ - break; - - case 49: -#line 259 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_NUMERIC_STRING|CONST_UNIVERSAL);} -#line 1835 "ASN1.c" /* yacc.c:1646 */ - break; - - case 50: -#line 260 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_NUMERIC_STRING|CONST_SIZE); - _asn1_set_down((yyval.node),(yyvsp[0].node));} -#line 1842 "ASN1.c" /* yacc.c:1646 */ - break; - - case 51: -#line 264 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_IA5_STRING);} -#line 1848 "ASN1.c" /* yacc.c:1646 */ - break; - - case 52: -#line 265 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_IA5_STRING|CONST_SIZE); - _asn1_set_down((yyval.node),(yyvsp[0].node));} -#line 1855 "ASN1.c" /* yacc.c:1646 */ - break; - - case 53: -#line 269 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_TELETEX_STRING);} -#line 1861 "ASN1.c" /* yacc.c:1646 */ - break; - - case 54: -#line 270 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_TELETEX_STRING|CONST_SIZE); - _asn1_set_down((yyval.node),(yyvsp[0].node));} -#line 1868 "ASN1.c" /* yacc.c:1646 */ - break; - - case 55: -#line 274 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_PRINTABLE_STRING);} -#line 1874 "ASN1.c" /* yacc.c:1646 */ - break; - - case 56: -#line 275 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_PRINTABLE_STRING|CONST_SIZE); - _asn1_set_down((yyval.node),(yyvsp[0].node));} -#line 1881 "ASN1.c" /* yacc.c:1646 */ - break; - - case 57: -#line 279 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_UNIVERSAL_STRING);} -#line 1887 "ASN1.c" /* yacc.c:1646 */ - break; - - case 58: -#line 280 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_UNIVERSAL_STRING|CONST_SIZE); - _asn1_set_down((yyval.node),(yyvsp[0].node));} -#line 1894 "ASN1.c" /* yacc.c:1646 */ - break; - - case 59: -#line 284 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_BMP_STRING);} -#line 1900 "ASN1.c" /* yacc.c:1646 */ - break; - - case 60: -#line 285 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_BMP_STRING|CONST_SIZE); - _asn1_set_down((yyval.node),(yyvsp[0].node));} -#line 1907 "ASN1.c" /* yacc.c:1646 */ - break; - - case 61: -#line 289 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_UTF8_STRING);} -#line 1913 "ASN1.c" /* yacc.c:1646 */ - break; - - case 62: -#line 290 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_UTF8_STRING|CONST_SIZE); - _asn1_set_down((yyval.node),(yyvsp[0].node));} -#line 1920 "ASN1.c" /* yacc.c:1646 */ - break; - - case 63: -#line 294 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_VISIBLE_STRING);} -#line 1926 "ASN1.c" /* yacc.c:1646 */ - break; - - case 64: -#line 295 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_VISIBLE_STRING|CONST_SIZE); - _asn1_set_down((yyval.node),(yyvsp[0].node));} -#line 1933 "ASN1.c" /* yacc.c:1646 */ - break; - - case 65: -#line 299 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_OCTET_STRING);} -#line 1939 "ASN1.c" /* yacc.c:1646 */ - break; - - case 66: -#line 300 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_OCTET_STRING|CONST_SIZE); - _asn1_set_down((yyval.node),(yyvsp[0].node));} -#line 1946 "ASN1.c" /* yacc.c:1646 */ - break; - - case 67: -#line 304 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_CONSTANT); - _asn1_set_name((yyval.node),(yyvsp[-3].str)); - _asn1_set_value((yyval.node),(yyvsp[-1].str),strlen((yyvsp[-1].str))+1);} -#line 1954 "ASN1.c" /* yacc.c:1646 */ - break; - - case 68: -#line 309 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=(yyvsp[0].node);} -#line 1960 "ASN1.c" /* yacc.c:1646 */ - break; - - case 69: -#line 310 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=(yyvsp[-2].node); - _asn1_set_right(_asn1_get_last_right((yyvsp[-2].node)),(yyvsp[0].node));} -#line 1967 "ASN1.c" /* yacc.c:1646 */ - break; - - case 70: -#line 314 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_BIT_STRING);} -#line 1973 "ASN1.c" /* yacc.c:1646 */ - break; - - case 71: -#line 315 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_BIT_STRING|CONST_SIZE);} -#line 1979 "ASN1.c" /* yacc.c:1646 */ - break; - - case 72: -#line 317 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_BIT_STRING|CONST_LIST); - _asn1_set_down((yyval.node),(yyvsp[-1].node));} -#line 1986 "ASN1.c" /* yacc.c:1646 */ - break; - - case 73: -#line 322 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_ENUMERATED|CONST_LIST); - _asn1_set_down((yyval.node),(yyvsp[-1].node));} -#line 1993 "ASN1.c" /* yacc.c:1646 */ - break; - - case 74: -#line 327 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_OBJECT_ID);} -#line 1999 "ASN1.c" /* yacc.c:1646 */ - break; - - case 75: -#line 330 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_IDENTIFIER); - _asn1_set_value((yyval.node),(yyvsp[0].str),strlen((yyvsp[0].str))+1);} -#line 2006 "ASN1.c" /* yacc.c:1646 */ - break; - - case 76: -#line 332 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_IDENTIFIER|CONST_SIZE); - _asn1_set_value((yyval.node),(yyvsp[-1].str),strlen((yyvsp[-1].str))+1); - _asn1_set_down((yyval.node),(yyvsp[0].node));} -#line 2014 "ASN1.c" /* yacc.c:1646 */ - break; - - case 77: -#line 335 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=(yyvsp[0].node);} -#line 2020 "ASN1.c" /* yacc.c:1646 */ - break; - - case 78: -#line 336 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=(yyvsp[0].node);} -#line 2026 "ASN1.c" /* yacc.c:1646 */ - break; - - case 79: -#line 337 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=(yyvsp[0].node);} -#line 2032 "ASN1.c" /* yacc.c:1646 */ - break; - - case 81: -#line 339 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=(yyvsp[0].node);} -#line 2038 "ASN1.c" /* yacc.c:1646 */ - break; - - case 82: -#line 340 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=(yyvsp[0].node);} -#line 2044 "ASN1.c" /* yacc.c:1646 */ - break; - - case 83: -#line 341 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=(yyvsp[0].node);} -#line 2050 "ASN1.c" /* yacc.c:1646 */ - break; - - case 84: -#line 342 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=(yyvsp[0].node);} -#line 2056 "ASN1.c" /* yacc.c:1646 */ - break; - - case 85: -#line 343 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=(yyvsp[0].node);} -#line 2062 "ASN1.c" /* yacc.c:1646 */ - break; - - case 86: -#line 344 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=(yyvsp[0].node);} -#line 2068 "ASN1.c" /* yacc.c:1646 */ - break; - - case 87: -#line 345 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=(yyvsp[0].node);} -#line 2074 "ASN1.c" /* yacc.c:1646 */ - break; - - case 88: -#line 346 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=(yyvsp[0].node);} -#line 2080 "ASN1.c" /* yacc.c:1646 */ - break; - - case 89: -#line 347 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=(yyvsp[0].node);} -#line 2086 "ASN1.c" /* yacc.c:1646 */ - break; - - case 90: -#line 348 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=(yyvsp[0].node);} -#line 2092 "ASN1.c" /* yacc.c:1646 */ - break; - - case 91: -#line 349 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=(yyvsp[0].node);} -#line 2098 "ASN1.c" /* yacc.c:1646 */ - break; - - case 92: -#line 350 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=(yyvsp[0].node);} -#line 2104 "ASN1.c" /* yacc.c:1646 */ - break; - - case 93: -#line 351 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=(yyvsp[0].node);} -#line 2110 "ASN1.c" /* yacc.c:1646 */ - break; - - case 94: -#line 352 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=(yyvsp[0].node);} -#line 2116 "ASN1.c" /* yacc.c:1646 */ - break; - - case 95: -#line 353 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=(yyvsp[0].node);} -#line 2122 "ASN1.c" /* yacc.c:1646 */ - break; - - case 96: -#line 354 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=(yyvsp[0].node);} -#line 2128 "ASN1.c" /* yacc.c:1646 */ - break; - - case 97: -#line 355 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_NULL);} -#line 2134 "ASN1.c" /* yacc.c:1646 */ - break; - - case 98: -#line 358 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=(yyvsp[0].node);} -#line 2140 "ASN1.c" /* yacc.c:1646 */ - break; - - case 99: -#line 359 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_mod_type((yyvsp[0].node),CONST_TAG); - _asn1_set_right((yyvsp[-1].node),_asn1_get_down((yyval.node))); - _asn1_set_down((yyval.node),(yyvsp[-1].node));} -#line 2148 "ASN1.c" /* yacc.c:1646 */ - break; - - case 100: -#line 364 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=(yyvsp[0].node);} -#line 2154 "ASN1.c" /* yacc.c:1646 */ - break; - - case 101: -#line 365 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_mod_type((yyvsp[-1].node),CONST_DEFAULT); - _asn1_set_right((yyvsp[0].node),_asn1_get_down((yyval.node))); - _asn1_set_down((yyval.node),(yyvsp[0].node));} -#line 2162 "ASN1.c" /* yacc.c:1646 */ - break; - - case 102: -#line 368 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_mod_type((yyvsp[-1].node),CONST_OPTION);} -#line 2168 "ASN1.c" /* yacc.c:1646 */ - break; - - case 103: -#line 371 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_set_name((yyvsp[0].node),(yyvsp[-1].str));} -#line 2174 "ASN1.c" /* yacc.c:1646 */ - break; - - case 104: -#line 374 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=(yyvsp[0].node);} -#line 2180 "ASN1.c" /* yacc.c:1646 */ - break; - - case 105: -#line 375 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=(yyvsp[-2].node); - _asn1_set_right(_asn1_get_last_right((yyvsp[-2].node)),(yyvsp[0].node));} -#line 2187 "ASN1.c" /* yacc.c:1646 */ - break; - - case 106: -#line 379 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_SEQUENCE); - _asn1_set_down((yyval.node),(yyvsp[-1].node));} -#line 2194 "ASN1.c" /* yacc.c:1646 */ - break; - - case 107: -#line 381 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_SEQUENCE_OF); - _asn1_set_down((yyval.node),(yyvsp[0].node));} -#line 2201 "ASN1.c" /* yacc.c:1646 */ - break; - - case 108: -#line 383 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_SEQUENCE_OF|CONST_SIZE); - _asn1_set_right((yyvsp[-2].node),(yyvsp[0].node)); - _asn1_set_down((yyval.node),(yyvsp[-2].node));} -#line 2209 "ASN1.c" /* yacc.c:1646 */ - break; - - case 109: -#line 388 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_SET); - _asn1_set_down((yyval.node),(yyvsp[-1].node));} -#line 2216 "ASN1.c" /* yacc.c:1646 */ - break; - - case 110: -#line 390 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_SET_OF); - _asn1_set_down((yyval.node),(yyvsp[0].node));} -#line 2223 "ASN1.c" /* yacc.c:1646 */ - break; - - case 111: -#line 392 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_SET_OF|CONST_SIZE); - _asn1_set_right((yyvsp[-2].node),(yyvsp[0].node)); - _asn1_set_down((yyval.node),(yyvsp[-2].node));} -#line 2231 "ASN1.c" /* yacc.c:1646 */ - break; - - case 112: -#line 397 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_CHOICE); - _asn1_set_down((yyval.node),(yyvsp[-1].node));} -#line 2238 "ASN1.c" /* yacc.c:1646 */ - break; - - case 113: -#line 401 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_ANY);} -#line 2244 "ASN1.c" /* yacc.c:1646 */ - break; - - case 114: -#line 402 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_ANY|CONST_DEFINED_BY); - _asn1_set_down((yyval.node),_asn1_add_static_node(ASN1_ETYPE_CONSTANT)); - _asn1_set_name(_asn1_get_down((yyval.node)),(yyvsp[0].str));} -#line 2252 "ASN1.c" /* yacc.c:1646 */ - break; - - case 115: -#line 407 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_set_name((yyvsp[0].node),(yyvsp[-2].str));} -#line 2258 "ASN1.c" /* yacc.c:1646 */ - break; - - case 116: -#line 409 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_set_name((yyvsp[0].node), last_error_token);} -#line 2264 "ASN1.c" /* yacc.c:1646 */ - break; - - case 117: -#line 413 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_OBJECT_ID|CONST_ASSIGN); - _asn1_set_name((yyval.node),(yyvsp[-6].str)); - _asn1_set_down((yyval.node),(yyvsp[-1].node));} -#line 2272 "ASN1.c" /* yacc.c:1646 */ - break; - - case 118: -#line 417 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_OBJECT_ID|CONST_ASSIGN|CONST_1_PARAM); - _asn1_set_name((yyval.node),(yyvsp[-5].str)); - _asn1_set_value((yyval.node),(yyvsp[-4].str),strlen((yyvsp[-4].str))+1); - _asn1_set_down((yyval.node),(yyvsp[-1].node));} -#line 2281 "ASN1.c" /* yacc.c:1646 */ - break; - - case 119: -#line 422 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_INTEGER|CONST_ASSIGN); - _asn1_set_name((yyval.node),(yyvsp[-3].str)); - _asn1_set_value((yyval.node),(yyvsp[0].str),strlen((yyvsp[0].str))+1);} -#line 2289 "ASN1.c" /* yacc.c:1646 */ - break; - - case 120: -#line 427 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=(yyvsp[0].node);} -#line 2295 "ASN1.c" /* yacc.c:1646 */ - break; - - case 121: -#line 428 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=(yyvsp[0].node);} -#line 2301 "ASN1.c" /* yacc.c:1646 */ - break; - - case 122: -#line 431 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=(yyvsp[0].node);} -#line 2307 "ASN1.c" /* yacc.c:1646 */ - break; - - case 123: -#line 432 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=(yyvsp[-1].node); - _asn1_set_right(_asn1_get_last_right((yyvsp[-1].node)),(yyvsp[0].node));} -#line 2314 "ASN1.c" /* yacc.c:1646 */ - break; - - case 124: -#line 436 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_OBJECT_ID); - _asn1_set_down((yyval.node),(yyvsp[-1].node)); - _asn1_set_name((yyval.node),(yyvsp[-3].str));} -#line 2322 "ASN1.c" /* yacc.c:1646 */ - break; - - case 125: -#line 439 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_OBJECT_ID); - _asn1_set_name((yyval.node),(yyvsp[-2].str));} -#line 2329 "ASN1.c" /* yacc.c:1646 */ - break; - - case 126: -#line 441 "ASN1.y" /* yacc.c:1646 */ - {(yyval.node)=_asn1_add_static_node(ASN1_ETYPE_OBJECT_ID); - _asn1_set_name((yyval.node),(yyvsp[0].str));} -#line 2336 "ASN1.c" /* yacc.c:1646 */ - break; - - case 127: -#line 465 "ASN1.y" /* yacc.c:1646 */ - {(yyval.constant)=CONST_EXPLICIT;} -#line 2342 "ASN1.c" /* yacc.c:1646 */ - break; - - case 128: -#line 466 "ASN1.y" /* yacc.c:1646 */ - {(yyval.constant)=CONST_IMPLICIT;} -#line 2348 "ASN1.c" /* yacc.c:1646 */ - break; - - -#line 2352 "ASN1.c" /* yacc.c:1646 */ - default: break; - } - /* User semantic actions sometimes alter yychar, and that requires - that yytoken be updated with the new translation. We take the - approach of translating immediately before every use of yytoken. - One alternative is translating here after every semantic action, - but that translation would be missed if the semantic action invokes - YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or - if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an - incorrect destructor might then be invoked immediately. In the - case of YYERROR or YYBACKUP, subsequent parser actions might lead - to an incorrect destructor call or verbose syntax error message - before the lookahead is translated. */ - YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); - - YYPOPSTACK (yylen); - yylen = 0; - YY_STACK_PRINT (yyss, yyssp); - - *++yyvsp = yyval; - - /* Now 'shift' the result of the reduction. Determine what state - that goes to, based on the state we popped back to and the rule - number reduced by. */ - - yyn = yyr1[yyn]; - - yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; - if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) - yystate = yytable[yystate]; - else - yystate = yydefgoto[yyn - YYNTOKENS]; - - goto yynewstate; - - -/*--------------------------------------. -| yyerrlab -- here on detecting error. | -`--------------------------------------*/ -yyerrlab: - /* Make sure we have latest lookahead translation. See comments at - user semantic actions for why this is necessary. */ - yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); - - /* If not already recovering from an error, report this error. */ - if (!yyerrstatus) - { - ++yynerrs; -#if ! YYERROR_VERBOSE - yyerror (YY_("syntax error")); -#else -# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ - yyssp, yytoken) - { - char const *yymsgp = YY_("syntax error"); - int yysyntax_error_status; - yysyntax_error_status = YYSYNTAX_ERROR; - if (yysyntax_error_status == 0) - yymsgp = yymsg; - else if (yysyntax_error_status == 1) - { - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); - yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); - if (!yymsg) - { - yymsg = yymsgbuf; - yymsg_alloc = sizeof yymsgbuf; - yysyntax_error_status = 2; - } - else - { - yysyntax_error_status = YYSYNTAX_ERROR; - yymsgp = yymsg; - } - } - yyerror (yymsgp); - if (yysyntax_error_status == 2) - goto yyexhaustedlab; - } -# undef YYSYNTAX_ERROR -#endif - } - - - - if (yyerrstatus == 3) - { - /* If just tried and failed to reuse lookahead token after an - error, discard it. */ - - if (yychar <= YYEOF) - { - /* Return failure if at end of input. */ - if (yychar == YYEOF) - YYABORT; - } - else - { - yydestruct ("Error: discarding", - yytoken, &yylval); - yychar = YYEMPTY; - } - } - - /* Else will try to reuse lookahead token after shifting the error - token. */ - goto yyerrlab1; - - -/*---------------------------------------------------. -| yyerrorlab -- error raised explicitly by YYERROR. | -`---------------------------------------------------*/ -yyerrorlab: - - /* Pacify compilers like GCC when the user code never invokes - YYERROR and the label yyerrorlab therefore never appears in user - code. */ - if (/*CONSTCOND*/ 0) - goto yyerrorlab; - - /* Do not reclaim the symbols of the rule whose action triggered - this YYERROR. */ - YYPOPSTACK (yylen); - yylen = 0; - YY_STACK_PRINT (yyss, yyssp); - yystate = *yyssp; - goto yyerrlab1; - - -/*-------------------------------------------------------------. -| yyerrlab1 -- common code for both syntax error and YYERROR. | -`-------------------------------------------------------------*/ -yyerrlab1: - yyerrstatus = 3; /* Each real token shifted decrements this. */ - - for (;;) - { - yyn = yypact[yystate]; - if (!yypact_value_is_default (yyn)) - { - yyn += YYTERROR; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) - { - yyn = yytable[yyn]; - if (0 < yyn) - break; - } - } - - /* Pop the current state because it cannot handle the error token. */ - if (yyssp == yyss) - YYABORT; - - - yydestruct ("Error: popping", - yystos[yystate], yyvsp); - YYPOPSTACK (1); - yystate = *yyssp; - YY_STACK_PRINT (yyss, yyssp); - } - - YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - *++yyvsp = yylval; - YY_IGNORE_MAYBE_UNINITIALIZED_END - - - /* Shift the error token. */ - YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); - - yystate = yyn; - goto yynewstate; - - -/*-------------------------------------. -| yyacceptlab -- YYACCEPT comes here. | -`-------------------------------------*/ -yyacceptlab: - yyresult = 0; - goto yyreturn; - -/*-----------------------------------. -| yyabortlab -- YYABORT comes here. | -`-----------------------------------*/ -yyabortlab: - yyresult = 1; - goto yyreturn; - -#if !defined yyoverflow || YYERROR_VERBOSE -/*-------------------------------------------------. -| yyexhaustedlab -- memory exhaustion comes here. | -`-------------------------------------------------*/ -yyexhaustedlab: - yyerror (YY_("memory exhausted")); - yyresult = 2; - /* Fall through. */ -#endif - -yyreturn: - if (yychar != YYEMPTY) - { - /* Make sure we have latest lookahead translation. See comments at - user semantic actions for why this is necessary. */ - yytoken = YYTRANSLATE (yychar); - yydestruct ("Cleanup: discarding lookahead", - yytoken, &yylval); - } - /* Do not reclaim the symbols of the rule whose action triggered - this YYABORT or YYACCEPT. */ - YYPOPSTACK (yylen); - YY_STACK_PRINT (yyss, yyssp); - while (yyssp != yyss) - { - yydestruct ("Cleanup: popping", - yystos[*yyssp], yyvsp); - YYPOPSTACK (1); - } -#ifndef yyoverflow - if (yyss != yyssa) - YYSTACK_FREE (yyss); -#endif -#if YYERROR_VERBOSE - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); -#endif - return yyresult; -} -#line 470 "ASN1.y" /* yacc.c:1906 */ - - - - -static const char *key_word[] = { - "::=","OPTIONAL","INTEGER","SIZE","OCTET","STRING", - "SEQUENCE","BIT","UNIVERSAL","PRIVATE","OPTIONAL", - "DEFAULT","CHOICE","OF","OBJECT","IDENTIFIER", - "BOOLEAN","TRUE","FALSE","APPLICATION","ANY","DEFINED", - "SET","BY","EXPLICIT","IMPLICIT","DEFINITIONS","TAGS", - "BEGIN","END","UTCTime","GeneralizedTime", - "GeneralString","FROM","IMPORTS","NULL","ENUMERATED", - "NumericString", "IA5String", "TeletexString", "PrintableString", - "UniversalString", "BMPString", "UTF8String", "VisibleString"}; - -static const int key_word_token[] = { - ASSIG, OPTIONAL, INTEGER, SIZE, OCTET, STRING, SEQUENCE, BIT, UNIVERSAL, - PRIVATE, OPTIONAL, DEFAULT, CHOICE, OF, OBJECT, STR_IDENTIFIER, - BOOLEAN, ASN1_TRUE, ASN1_FALSE, APPLICATION, ANY, DEFINED, SET, BY, - EXPLICIT, IMPLICIT, DEFINITIONS, TAGS, BEGIN, END, UTCTime, - GeneralizedTime, GeneralString, FROM, IMPORTS, TOKEN_NULL, - ENUMERATED, NumericString, IA5String, TeletexString, PrintableString, - UniversalString, BMPString, UTF8String, VisibleString -}; - -/*************************************************************/ -/* Function: _asn1_yylex */ -/* Description: looks for tokens in file_asn1 pointer file. */ -/* Return: int */ -/* Token identifier or ASCII code or 0(zero: End Of File) */ -/*************************************************************/ -static int -_asn1_yylex () -{ - int c, counter = 0, k, lastc; - char string[ASN1_MAX_NAME_SIZE + 1]; /* will contain the next token */ - size_t i; - - while (1) - { - while ((c = fgetc (file_asn1)) == ' ' || c == '\t' || c == '\n') - if (c == '\n') - line_number++; - - if (c == EOF) - { - snprintf (last_token, sizeof(last_token), "End Of File"); - return 0; - } - - if (c == '(' || c == ')' || c == '[' || c == ']' || - c == '{' || c == '}' || c == ',' || c == '.' || - c == '+' || c == '|') - { - last_token[0] = c; - last_token[1] = 0; - return c; - } - if (c == '-') - { /* Maybe the first '-' of a comment */ - if ((c = fgetc (file_asn1)) != '-') - { - ungetc (c, file_asn1); - last_token[0] = '-'; - last_token[1] = 0; - return '-'; - } - else - { /* Comments */ - lastc = 0; - counter = 0; - /* A comment finishes at the next double hypen or the end of line */ - while ((c = fgetc (file_asn1)) != EOF && c != '\n' && - (lastc != '-' || (lastc == '-' && c != '-'))) - lastc = c; - if (c == EOF) - { - snprintf (last_token, sizeof(last_token), "End Of File"); - return 0; - } - else - { - if (c == '\n') - line_number++; - continue; /* next char, please! (repeat the search) */ - } - } - } - string[counter++] = c; - /* Till the end of the token */ - while (! - ((c = fgetc (file_asn1)) == EOF || c == ' ' || c == '\t' - || c == '\n' || c == '(' || c == ')' || c == '[' || c == ']' - || c == '{' || c == '}' || c == ',' || c == '.')) - { - if (counter >= ASN1_MAX_NAME_SIZE) - { - result_parse = ASN1_NAME_TOO_LONG; - return 0; - } - string[counter++] = c; - } - ungetc (c, file_asn1); - string[counter] = 0; - snprintf (last_token, sizeof(last_token), "%s", string); - - /* Is STRING a number? */ - for (k = 0; k < counter; k++) - if (!isdigit ((int)string[k])) - break; - if (k >= counter) - { - snprintf (yylval.str, sizeof(yylval.str), "%s", string); - return NUM; /* return the number */ - } - - /* Is STRING a keyword? */ - for (i = 0; i < (sizeof (key_word) / sizeof (char *)); i++) - if (!strcmp (string, key_word[i])) - return key_word_token[i]; - - /* STRING is an IDENTIFIER */ - snprintf (yylval.str, sizeof(yylval.str), "%s", string); - return IDENTIFIER; - } -} - -/*************************************************************/ -/* Function: _asn1_create_errorDescription */ -/* Description: creates a string with the description of the*/ -/* error. */ -/* Parameters: */ -/* error : error to describe. */ -/* error_desc: string that will contain the */ -/* description. */ -/*************************************************************/ -static void -_asn1_create_errorDescription (int error, char *error_desc) -{ - if (error_desc == NULL) - return; - - - switch (error) - { - case ASN1_FILE_NOT_FOUND: - snprintf(error_desc, ASN1_MAX_ERROR_DESCRIPTION_SIZE, "%s file was not found", file_name); - break; - case ASN1_SYNTAX_ERROR: - snprintf(error_desc, ASN1_MAX_ERROR_DESCRIPTION_SIZE, "%s", last_error); - break; - case ASN1_NAME_TOO_LONG: - snprintf (error_desc, ASN1_MAX_ERROR_DESCRIPTION_SIZE, - "%s:%u: name too long (more than %u characters)", file_name, - line_number, (unsigned)ASN1_MAX_NAME_SIZE); - break; - case ASN1_IDENTIFIER_NOT_FOUND: - snprintf (error_desc, ASN1_MAX_ERROR_DESCRIPTION_SIZE, - "%s:: identifier '%s' not found", file_name, - _asn1_identifierMissing); - break; - default: - error_desc[0] = 0; - break; - } - -} - -/** - * asn1_parser2tree: - * @file: specify the path and the name of file that contains - * ASN.1 declarations. - * @definitions: return the pointer to the structure created from - * "file" ASN.1 declarations. - * @error_desc: return the error description or an empty - * string if success. - * - * Function used to start the parse algorithm. Creates the structures - * needed to manage the definitions included in @file file. - * - * Returns: %ASN1_SUCCESS if the file has a correct syntax and every - * identifier is known, %ASN1_ELEMENT_NOT_EMPTY if @definitions not - * %NULL, %ASN1_FILE_NOT_FOUND if an error occurred while - * opening @file, %ASN1_SYNTAX_ERROR if the syntax is not - * correct, %ASN1_IDENTIFIER_NOT_FOUND if in the file there is an - * identifier that is not defined, %ASN1_NAME_TOO_LONG if in the - * file there is an identifier whith more than %ASN1_MAX_NAME_SIZE - * characters. - **/ -int -asn1_parser2tree (const char *file, asn1_node * definitions, - char *error_desc) -{ - - p_tree = NULL; - - if (*definitions != NULL) - return ASN1_ELEMENT_NOT_EMPTY; - - *definitions = NULL; - - file_name = file; - - /* open the file to parse */ - file_asn1 = fopen (file, "r"); - - if (file_asn1 == NULL) - { - result_parse = ASN1_FILE_NOT_FOUND; - } - else - { - result_parse = ASN1_SUCCESS; - - line_number = 1; - yyparse (); - - fclose (file_asn1); - - if (result_parse == ASN1_SUCCESS) - { /* syntax OK */ - /* set IMPLICIT or EXPLICIT property */ - _asn1_set_default_tag (p_tree); - /* set CONST_SET and CONST_NOT_USED */ - _asn1_type_set_config (p_tree); - /* check the identifier definitions */ - result_parse = _asn1_check_identifier (p_tree); - if (result_parse == ASN1_SUCCESS) - { /* all identifier defined */ - /* Delete the list and keep the ASN1 structure */ - _asn1_delete_list (); - /* Convert into DER coding the value assign to INTEGER constants */ - _asn1_change_integer_value (p_tree); - /* Expand the IDs of OBJECT IDENTIFIER constants */ - _asn1_expand_object_id (p_tree); - - *definitions = p_tree; - } - else /* some identifiers not defined */ - /* Delete the list and the ASN1 structure */ - _asn1_delete_list_and_nodes (); - } - else /* syntax error */ - /* Delete the list and the ASN1 structure */ - _asn1_delete_list_and_nodes (); - } - - _asn1_create_errorDescription (result_parse, error_desc); - - return result_parse; -} - -/** - * asn1_parser2array: - * @inputFileName: specify the path and the name of file that - * contains ASN.1 declarations. - * @outputFileName: specify the path and the name of file that will - * contain the C vector definition. - * @vectorName: specify the name of the C vector. - * @error_desc: return the error description or an empty - * string if success. - * - * Function that generates a C structure from an ASN1 file. Creates a - * file containing a C vector to use to manage the definitions - * included in @inputFileName file. If @inputFileName is - * "/aa/bb/xx.yy" and @outputFileName is %NULL, the file created is - * "/aa/bb/xx_asn1_tab.c". If @vectorName is %NULL the vector name - * will be "xx_asn1_tab". - * - * Returns: %ASN1_SUCCESS if the file has a correct syntax and every - * identifier is known, %ASN1_FILE_NOT_FOUND if an error occurred - * while opening @inputFileName, %ASN1_SYNTAX_ERROR if the syntax is - * not correct, %ASN1_IDENTIFIER_NOT_FOUND if in the file there is - * an identifier that is not defined, %ASN1_NAME_TOO_LONG if in the - * file there is an identifier whith more than %ASN1_MAX_NAME_SIZE - * characters. - **/ -int -asn1_parser2array (const char *inputFileName, const char *outputFileName, - const char *vectorName, char *error_desc) -{ - char *file_out_name = NULL; - char *vector_name = NULL; - const char *char_p, *slash_p, *dot_p; - - p_tree = NULL; - - file_name = inputFileName; - - /* open the file to parse */ - file_asn1 = fopen (inputFileName, "r"); - - if (file_asn1 == NULL) - result_parse = ASN1_FILE_NOT_FOUND; - else - { - result_parse = ASN1_SUCCESS; - - line_number = 1; - yyparse (); - - fclose (file_asn1); - - if (result_parse == ASN1_SUCCESS) - { /* syntax OK */ - /* set IMPLICIT or EXPLICIT property */ - _asn1_set_default_tag (p_tree); - /* set CONST_SET and CONST_NOT_USED */ - _asn1_type_set_config (p_tree); - /* check the identifier definitions */ - result_parse = _asn1_check_identifier (p_tree); - - if (result_parse == ASN1_SUCCESS) - { /* all identifier defined */ - - /* searching the last '/' and '.' in inputFileName */ - char_p = inputFileName; - slash_p = inputFileName; - while ((char_p = strchr (char_p, '/'))) - { - char_p++; - slash_p = char_p; - } - - char_p = slash_p; - dot_p = inputFileName + strlen (inputFileName); - - while ((char_p = strchr (char_p, '.'))) - { - dot_p = char_p; - char_p++; - } - - if (outputFileName == NULL) - { - /* file_out_name = inputFileName + _asn1_tab.c */ - file_out_name = malloc (dot_p - inputFileName + 1 + - strlen ("_asn1_tab.c")); - memcpy (file_out_name, inputFileName, - dot_p - inputFileName); - file_out_name[dot_p - inputFileName] = 0; - strcat (file_out_name, "_asn1_tab.c"); - } - else - { - /* file_out_name = inputFileName */ - file_out_name = - (char *) malloc (strlen (outputFileName) + 1); - strcpy (file_out_name, outputFileName); - } - - if (vectorName == NULL) - { - /* vector_name = file name + _asn1_tab */ - vector_name = malloc (dot_p - slash_p + 1 + - strlen ("_asn1_tab")); - memcpy (vector_name, slash_p, dot_p - slash_p); - vector_name[dot_p - slash_p] = 0; - strcat (vector_name, "_asn1_tab"); - } - else - { - /* vector_name = vectorName */ - vector_name = (char *) malloc (strlen (vectorName) + 1); - strcpy (vector_name, vectorName); - } - - /* Save structure in a file */ - _asn1_create_static_structure (p_tree, - file_out_name, vector_name); - - free (file_out_name); - free (vector_name); - } /* result == OK */ - } /* result == OK */ - - /* Delete the list and the ASN1 structure */ - _asn1_delete_list_and_nodes (); - } /* inputFile exist */ - - _asn1_create_errorDescription (result_parse, error_desc); - - return result_parse; -} - -/*************************************************************/ -/* Function: _asn1_yyerror */ -/* Description: function called when there are syntax errors*/ -/* Parameters: */ -/* char *s : error description */ -/* Return: int */ -/* */ -/*************************************************************/ -static void -_asn1_yyerror (const char *s) -{ - /* Sends the error description to the std_out */ - - if (strcmp (last_token, "VisibleString") == 0 || - strcmp (last_token, "PrintableString") == 0 || - strcmp (last_token, "UniversalString") == 0 || - strcmp (last_token, "IA5String") == 0 || - strcmp (last_token, "UTF8String") == 0 || - strcmp (last_token, "NumericString") == 0 || - strcmp (last_token, "TeletexString") == 0 || - strcmp (last_token, "BMPString") == 0) - { - snprintf (last_error_token, sizeof(last_error_token), - "%s", last_token); - fprintf(stderr, "%s:%u: Warning: %s is a built-in ASN.1 type.\n", - file_name, line_number, last_token); - return; - } - last_error_token[0] = 0; - - if (result_parse != ASN1_NAME_TOO_LONG) - { - snprintf (last_error, sizeof(last_error), - "%s:%u: Error: %s near '%s'", file_name, - line_number, s, last_token); - result_parse = ASN1_SYNTAX_ERROR; - } - - return; -} diff --git a/lib/ASN1.y b/lib/ASN1.y deleted file mode 100644 index 534a9f1..0000000 --- a/lib/ASN1.y +++ /dev/null @@ -1,894 +0,0 @@ -%{ -/* - * Copyright (C) 2001-2014 Free Software Foundation, Inc. - * - * This file is part of LIBTASN1. - * - * The LIBTASN1 library is free software; you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA - */ - -/*****************************************************/ -/* File: x509_ASN.y */ -/* Description: input file for 'bison' program. */ -/* The output file is a parser (in C language) for */ -/* ASN.1 syntax */ -/*****************************************************/ - -#include -#include -#include -#include - -static FILE *file_asn1; /* Pointer to file to parse */ -static int result_parse = 0; /* result of the parser - algorithm */ -static asn1_node p_tree; /* pointer to the root of the - structure created by the - parser*/ -static unsigned int line_number; /* line number describing the - parser position inside the - file */ -static char last_error[ASN1_MAX_ERROR_DESCRIPTION_SIZE] = ""; -static char last_error_token[ASN1_MAX_ERROR_DESCRIPTION_SIZE+1] = ""; /* used when expected errors occur */ -static char last_token[ASN1_MAX_NAME_SIZE+1] = ""; /* last token find in the file - to parse before the 'parse - error' */ -extern char _asn1_identifierMissing[]; -static const char *file_name; /* file to parse */ - -static void _asn1_yyerror (const char *); -static int _asn1_yylex(void); - -%} - -/* Prefix symbols and functions with _asn1_ */ -/* %define parse.lac full */ -%error-verbose -%name-prefix "_asn1_yy" - -%union { - unsigned int constant; - char str[ASN1_MAX_NAME_SIZE+1]; - asn1_node node; -} - - -%token ASSIG "::=" -%token NUM -%token IDENTIFIER -%token OPTIONAL -%token INTEGER -%token SIZE -%token OCTET -%token STRING -%token SEQUENCE -%token BIT -%token UNIVERSAL -%token PRIVATE -%token APPLICATION -%token DEFAULT -%token CHOICE -%token OF -%token OBJECT -%token STR_IDENTIFIER -%token BOOLEAN -%token ASN1_TRUE -%token ASN1_FALSE -%token TOKEN_NULL -%token ANY -%token DEFINED -%token BY -%token SET -%token EXPLICIT -%token IMPLICIT -%token DEFINITIONS -%token TAGS -%token BEGIN -%token END -%token UTCTime -%token GeneralizedTime -%token GeneralString -%token NumericString -%token IA5String -%token TeletexString -%token PrintableString -%token UniversalString -%token BMPString -%token UTF8String -%token VisibleString - -%token FROM -%token IMPORTS -%token ENUMERATED - -%type octet_string_def constant constant_list type_assig_right -%type integer_def type_assig type_assig_list sequence_def type_def -%type bit_string_def default size_def choise_def object_def -%type boolean_def any_def size_def2 obj_constant obj_constant_list -%type constant_def type_constant type_constant_list definitions -%type definitions_id Time bit_element bit_element_list set_def -%type tag_type tag type_assig_right_tag generalstring_def -%type numericstring_def ia5string_def printablestring_def universalstring_def -%type bmpstring_def utf8string_def visiblestring_def teletexstring_def -%type type_assig_right_tag_default enumerated_def -%type pos_num neg_num pos_neg_num pos_neg_identifier pos_neg_list -%type num_identifier -%type int_identifier -%type class explicit_implicit - -%% - - -definitions: definitions_id - DEFINITIONS explicit_implicit TAGS "::=" BEGIN /* imports_def */ - type_constant_list END - {$$=_asn1_add_static_node(ASN1_ETYPE_DEFINITIONS|$3); - _asn1_set_name($$,_asn1_get_name($1)); - _asn1_set_name($1,""); - _asn1_set_right($1,$7); - _asn1_set_down($$,$1); - - p_tree=$$; - } -; - -pos_num : NUM {snprintf($$,sizeof($$),"%s",$1);} - | '+' NUM {snprintf($$,sizeof($$),"%s",$2);} -; - -neg_num : '-' NUM {snprintf($$,sizeof($$),"-%s",$2);} -; - -pos_neg_num : pos_num {snprintf($$,sizeof($$),"%s",$1);} - | neg_num {snprintf($$,sizeof($$),"%s",$1);} -; - -num_identifier : NUM {snprintf($$,sizeof($$),"%s",$1);} - | IDENTIFIER {snprintf($$,sizeof($$),"%s",$1);} -; - -int_identifier : NUM {snprintf($$,sizeof($$),"%s",$1);} - | '-' NUM {snprintf($$,sizeof($$),"-%s",$2);} - | IDENTIFIER {snprintf($$,sizeof($$),"%s",$1);} -; - -pos_neg_identifier : pos_neg_num {snprintf($$,sizeof($$),"%s",$1);} - | IDENTIFIER {snprintf($$,sizeof($$),"%s",$1);} -; - -constant: '(' pos_neg_num ')' {$$=_asn1_add_static_node(ASN1_ETYPE_CONSTANT); - _asn1_set_value($$,$2,strlen($2)+1);} - | IDENTIFIER'('pos_neg_num')' {$$=_asn1_add_static_node(ASN1_ETYPE_CONSTANT); - _asn1_set_name($$,$1); - _asn1_set_value($$,$3,strlen($3)+1);} -; - -constant_list: constant {$$=$1;} - | constant_list ',' constant {$$=$1; - _asn1_set_right(_asn1_get_last_right($1),$3);} -; - -obj_constant: num_identifier {$$=_asn1_add_static_node(ASN1_ETYPE_CONSTANT); - _asn1_set_value($$,$1,strlen($1)+1);} - | IDENTIFIER'('NUM')' {$$=_asn1_add_static_node(ASN1_ETYPE_CONSTANT); - _asn1_set_name($$,$1); - _asn1_set_value($$,$3,strlen($3)+1);} -; - -obj_constant_list: obj_constant {$$=$1;} - | obj_constant_list obj_constant {$$=$1; - _asn1_set_right(_asn1_get_last_right($1),$2);} -; - -class : UNIVERSAL {$$=CONST_UNIVERSAL;} - | PRIVATE {$$=CONST_PRIVATE;} - | APPLICATION {$$=CONST_APPLICATION;} -; - -tag_type : '[' NUM ']' {$$=_asn1_add_static_node(ASN1_ETYPE_TAG); - _asn1_set_value($$,$2,strlen($2)+1);} - | '[' class NUM ']' {$$=_asn1_add_static_node(ASN1_ETYPE_TAG | $2); - _asn1_set_value($$,$3,strlen($3)+1);} -; - -tag : tag_type {$$=$1;} - | tag_type EXPLICIT {$$=_asn1_mod_type($1,CONST_EXPLICIT);} - | tag_type IMPLICIT {$$=_asn1_mod_type($1,CONST_IMPLICIT);} -; - -default : DEFAULT pos_neg_identifier {$$=_asn1_add_static_node(ASN1_ETYPE_DEFAULT); - _asn1_set_value($$,$2,strlen($2)+1);} - | DEFAULT ASN1_TRUE {$$=_asn1_add_static_node(ASN1_ETYPE_DEFAULT|CONST_TRUE);} - | DEFAULT ASN1_FALSE {$$=_asn1_add_static_node(ASN1_ETYPE_DEFAULT|CONST_FALSE);} -; - - -pos_neg_list: pos_neg_num - | pos_neg_list '|' pos_neg_num -; - - -integer_def: INTEGER {$$=_asn1_add_static_node(ASN1_ETYPE_INTEGER);} - | INTEGER'{'constant_list'}' {$$=_asn1_add_static_node(ASN1_ETYPE_INTEGER|CONST_LIST); - _asn1_set_down($$,$3);} - | integer_def'(' pos_neg_list ')' {$$=_asn1_add_static_node(ASN1_ETYPE_INTEGER);} - | integer_def'('int_identifier'.''.'int_identifier')' - {$$=_asn1_add_static_node(ASN1_ETYPE_INTEGER|CONST_MIN_MAX); - _asn1_set_down($$,_asn1_add_static_node(ASN1_ETYPE_SIZE)); - _asn1_set_value(_asn1_get_down($$),$6,strlen($6)+1); - _asn1_set_name(_asn1_get_down($$),$3);} -; - -boolean_def: BOOLEAN {$$=_asn1_add_static_node(ASN1_ETYPE_BOOLEAN);} -; - -Time: UTCTime {$$=_asn1_add_static_node(ASN1_ETYPE_UTC_TIME);} - | GeneralizedTime {$$=_asn1_add_static_node(ASN1_ETYPE_GENERALIZED_TIME);} -; - -size_def2: SIZE'('num_identifier')' {$$=_asn1_add_static_node(ASN1_ETYPE_SIZE|CONST_1_PARAM); - _asn1_set_value($$,$3,strlen($3)+1);} - | SIZE'('num_identifier'.''.'num_identifier')' - {$$=_asn1_add_static_node(ASN1_ETYPE_SIZE|CONST_MIN_MAX); - _asn1_set_value($$,$3,strlen($3)+1); - _asn1_set_name($$,$6);} -; - -size_def: size_def2 {$$=$1;} - | '(' size_def2 ')' {$$=$2;} -; - -generalstring_def: GeneralString {$$=_asn1_add_static_node(ASN1_ETYPE_GENERALSTRING);} - | GeneralString size_def {$$=_asn1_add_static_node(ASN1_ETYPE_GENERALSTRING|CONST_SIZE); - _asn1_set_down($$,$2);} -; - -numericstring_def: NumericString {$$=_asn1_add_static_node(ASN1_ETYPE_NUMERIC_STRING|CONST_UNIVERSAL);} - | NumericString size_def {$$=_asn1_add_static_node(ASN1_ETYPE_NUMERIC_STRING|CONST_SIZE); - _asn1_set_down($$,$2);} -; - -ia5string_def: IA5String {$$=_asn1_add_static_node(ASN1_ETYPE_IA5_STRING);} - | IA5String size_def {$$=_asn1_add_static_node(ASN1_ETYPE_IA5_STRING|CONST_SIZE); - _asn1_set_down($$,$2);} -; - -teletexstring_def: TeletexString {$$=_asn1_add_static_node(ASN1_ETYPE_TELETEX_STRING);} - | TeletexString size_def {$$=_asn1_add_static_node(ASN1_ETYPE_TELETEX_STRING|CONST_SIZE); - _asn1_set_down($$,$2);} -; - -printablestring_def: PrintableString {$$=_asn1_add_static_node(ASN1_ETYPE_PRINTABLE_STRING);} - | PrintableString size_def {$$=_asn1_add_static_node(ASN1_ETYPE_PRINTABLE_STRING|CONST_SIZE); - _asn1_set_down($$,$2);} -; - -universalstring_def: UniversalString {$$=_asn1_add_static_node(ASN1_ETYPE_UNIVERSAL_STRING);} - | UniversalString size_def {$$=_asn1_add_static_node(ASN1_ETYPE_UNIVERSAL_STRING|CONST_SIZE); - _asn1_set_down($$,$2);} -; - -bmpstring_def: BMPString {$$=_asn1_add_static_node(ASN1_ETYPE_BMP_STRING);} - | BMPString size_def {$$=_asn1_add_static_node(ASN1_ETYPE_BMP_STRING|CONST_SIZE); - _asn1_set_down($$,$2);} -; - -utf8string_def: UTF8String {$$=_asn1_add_static_node(ASN1_ETYPE_UTF8_STRING);} - | UTF8String size_def {$$=_asn1_add_static_node(ASN1_ETYPE_UTF8_STRING|CONST_SIZE); - _asn1_set_down($$,$2);} -; - -visiblestring_def: VisibleString {$$=_asn1_add_static_node(ASN1_ETYPE_VISIBLE_STRING);} - | VisibleString size_def {$$=_asn1_add_static_node(ASN1_ETYPE_VISIBLE_STRING|CONST_SIZE); - _asn1_set_down($$,$2);} -; - -octet_string_def : OCTET STRING {$$=_asn1_add_static_node(ASN1_ETYPE_OCTET_STRING);} - | OCTET STRING size_def {$$=_asn1_add_static_node(ASN1_ETYPE_OCTET_STRING|CONST_SIZE); - _asn1_set_down($$,$3);} -; - -bit_element : IDENTIFIER'('NUM')' {$$=_asn1_add_static_node(ASN1_ETYPE_CONSTANT); - _asn1_set_name($$,$1); - _asn1_set_value($$,$3,strlen($3)+1);} -; - -bit_element_list : bit_element {$$=$1;} - | bit_element_list ',' bit_element {$$=$1; - _asn1_set_right(_asn1_get_last_right($1),$3);} -; - -bit_string_def : BIT STRING {$$=_asn1_add_static_node(ASN1_ETYPE_BIT_STRING);} - | BIT STRING size_def {$$=_asn1_add_static_node(ASN1_ETYPE_BIT_STRING|CONST_SIZE);} - | BIT STRING'{'bit_element_list'}' - {$$=_asn1_add_static_node(ASN1_ETYPE_BIT_STRING|CONST_LIST); - _asn1_set_down($$,$4);} -; - -enumerated_def : ENUMERATED'{'bit_element_list'}' - {$$=_asn1_add_static_node(ASN1_ETYPE_ENUMERATED|CONST_LIST); - _asn1_set_down($$,$3);} -; - - -object_def : OBJECT STR_IDENTIFIER {$$=_asn1_add_static_node(ASN1_ETYPE_OBJECT_ID);} -; - -type_assig_right: IDENTIFIER {$$=_asn1_add_static_node(ASN1_ETYPE_IDENTIFIER); - _asn1_set_value($$,$1,strlen($1)+1);} - | IDENTIFIER size_def {$$=_asn1_add_static_node(ASN1_ETYPE_IDENTIFIER|CONST_SIZE); - _asn1_set_value($$,$1,strlen($1)+1); - _asn1_set_down($$,$2);} - | integer_def {$$=$1;} - | enumerated_def {$$=$1;} - | boolean_def {$$=$1;} - | Time - | octet_string_def {$$=$1;} - | bit_string_def {$$=$1;} - | generalstring_def {$$=$1;} - | numericstring_def {$$=$1;} - | ia5string_def {$$=$1;} - | teletexstring_def {$$=$1;} - | printablestring_def {$$=$1;} - | universalstring_def {$$=$1;} - | bmpstring_def {$$=$1;} - | utf8string_def {$$=$1;} - | visiblestring_def {$$=$1;} - | sequence_def {$$=$1;} - | object_def {$$=$1;} - | choise_def {$$=$1;} - | any_def {$$=$1;} - | set_def {$$=$1;} - | TOKEN_NULL {$$=_asn1_add_static_node(ASN1_ETYPE_NULL);} -; - -type_assig_right_tag : type_assig_right {$$=$1;} - | tag type_assig_right {$$=_asn1_mod_type($2,CONST_TAG); - _asn1_set_right($1,_asn1_get_down($$)); - _asn1_set_down($$,$1);} -; - -type_assig_right_tag_default : type_assig_right_tag {$$=$1;} - | type_assig_right_tag default {$$=_asn1_mod_type($1,CONST_DEFAULT); - _asn1_set_right($2,_asn1_get_down($$)); - _asn1_set_down($$,$2);} - | type_assig_right_tag OPTIONAL {$$=_asn1_mod_type($1,CONST_OPTION);} -; - -type_assig : IDENTIFIER type_assig_right_tag_default {$$=_asn1_set_name($2,$1);} -; - -type_assig_list : type_assig {$$=$1;} - | type_assig_list','type_assig {$$=$1; - _asn1_set_right(_asn1_get_last_right($1),$3);} -; - -sequence_def : SEQUENCE'{'type_assig_list'}' {$$=_asn1_add_static_node(ASN1_ETYPE_SEQUENCE); - _asn1_set_down($$,$3);} - | SEQUENCE OF type_assig_right {$$=_asn1_add_static_node(ASN1_ETYPE_SEQUENCE_OF); - _asn1_set_down($$,$3);} - | SEQUENCE size_def OF type_assig_right {$$=_asn1_add_static_node(ASN1_ETYPE_SEQUENCE_OF|CONST_SIZE); - _asn1_set_right($2,$4); - _asn1_set_down($$,$2);} -; - -set_def : SET'{'type_assig_list'}' {$$=_asn1_add_static_node(ASN1_ETYPE_SET); - _asn1_set_down($$,$3);} - | SET OF type_assig_right {$$=_asn1_add_static_node(ASN1_ETYPE_SET_OF); - _asn1_set_down($$,$3);} - | SET size_def OF type_assig_right {$$=_asn1_add_static_node(ASN1_ETYPE_SET_OF|CONST_SIZE); - _asn1_set_right($2,$4); - _asn1_set_down($$,$2);} -; - -choise_def : CHOICE'{'type_assig_list'}' {$$=_asn1_add_static_node(ASN1_ETYPE_CHOICE); - _asn1_set_down($$,$3);} -; - -any_def : ANY {$$=_asn1_add_static_node(ASN1_ETYPE_ANY);} - | ANY DEFINED BY IDENTIFIER {$$=_asn1_add_static_node(ASN1_ETYPE_ANY|CONST_DEFINED_BY); - _asn1_set_down($$,_asn1_add_static_node(ASN1_ETYPE_CONSTANT)); - _asn1_set_name(_asn1_get_down($$),$4);} -; - -type_def : IDENTIFIER "::=" type_assig_right_tag {$$=_asn1_set_name($3,$1);} - /* below should match: BMPString ::= [UNIVERSAL 30] IMPLICIT OCTET STRING etc*/ - | error "::=" type_assig_right_tag {$$=_asn1_set_name($3, last_error_token);} -; - -constant_def : IDENTIFIER OBJECT STR_IDENTIFIER "::=" '{'obj_constant_list'}' - {$$=_asn1_add_static_node(ASN1_ETYPE_OBJECT_ID|CONST_ASSIGN); - _asn1_set_name($$,$1); - _asn1_set_down($$,$6);} - | IDENTIFIER IDENTIFIER "::=" '{' obj_constant_list '}' - {$$=_asn1_add_static_node(ASN1_ETYPE_OBJECT_ID|CONST_ASSIGN|CONST_1_PARAM); - _asn1_set_name($$,$1); - _asn1_set_value($$,$2,strlen($2)+1); - _asn1_set_down($$,$5);} - | IDENTIFIER INTEGER "::=" pos_neg_num - {$$=_asn1_add_static_node(ASN1_ETYPE_INTEGER|CONST_ASSIGN); - _asn1_set_name($$,$1); - _asn1_set_value($$,$4,strlen($4)+1);} -; - -type_constant: type_def {$$=$1;} - | constant_def {$$=$1;} -; - -type_constant_list : type_constant {$$=$1;} - | type_constant_list type_constant {$$=$1; - _asn1_set_right(_asn1_get_last_right($1),$2);} -; - -definitions_id : IDENTIFIER '{' obj_constant_list '}' {$$=_asn1_add_static_node(ASN1_ETYPE_OBJECT_ID); - _asn1_set_down($$,$3); - _asn1_set_name($$,$1);} - | IDENTIFIER '{' '}' {$$=_asn1_add_static_node(ASN1_ETYPE_OBJECT_ID); - _asn1_set_name($$,$1);} - | IDENTIFIER {$$=_asn1_add_static_node(ASN1_ETYPE_OBJECT_ID); - _asn1_set_name($$,$1);} -; - -/* -identifier_list : IDENTIFIER {$$=_asn1_add_static_node(ASN1_ETYPE_IDENTIFIER); - _asn1_set_name($$,$1);} - | identifier_list IDENTIFIER - {$$=$1; - _asn1_set_right(_asn1_get_last_right($$),_asn1_add_static_node(ASN1_ETYPE_IDENTIFIER)); - _asn1_set_name(_asn1_get_last_right($$),$2);} -; - - -imports_def : empty {$$=NULL;} - | IMPORTS identifier_list FROM IDENTIFIER obj_constant_list - {$$=_asn1_add_static_node(ASN1_ETYPE_IMPORTS); - _asn1_set_down($$,_asn1_add_static_node(ASN1_ETYPE_OBJECT_ID)); - _asn1_set_name(_asn1_get_down($$),$4); - _asn1_set_down(_asn1_get_down($$),$5); - _asn1_set_right($$,$2);} -; -*/ - -explicit_implicit : EXPLICIT {$$=CONST_EXPLICIT;} - | IMPLICIT {$$=CONST_IMPLICIT;} -; - - -%% - - - -static const char *key_word[] = { - "::=","OPTIONAL","INTEGER","SIZE","OCTET","STRING", - "SEQUENCE","BIT","UNIVERSAL","PRIVATE","OPTIONAL", - "DEFAULT","CHOICE","OF","OBJECT","IDENTIFIER", - "BOOLEAN","TRUE","FALSE","APPLICATION","ANY","DEFINED", - "SET","BY","EXPLICIT","IMPLICIT","DEFINITIONS","TAGS", - "BEGIN","END","UTCTime","GeneralizedTime", - "GeneralString","FROM","IMPORTS","NULL","ENUMERATED", - "NumericString", "IA5String", "TeletexString", "PrintableString", - "UniversalString", "BMPString", "UTF8String", "VisibleString"}; - -static const int key_word_token[] = { - ASSIG, OPTIONAL, INTEGER, SIZE, OCTET, STRING, SEQUENCE, BIT, UNIVERSAL, - PRIVATE, OPTIONAL, DEFAULT, CHOICE, OF, OBJECT, STR_IDENTIFIER, - BOOLEAN, ASN1_TRUE, ASN1_FALSE, APPLICATION, ANY, DEFINED, SET, BY, - EXPLICIT, IMPLICIT, DEFINITIONS, TAGS, BEGIN, END, UTCTime, - GeneralizedTime, GeneralString, FROM, IMPORTS, TOKEN_NULL, - ENUMERATED, NumericString, IA5String, TeletexString, PrintableString, - UniversalString, BMPString, UTF8String, VisibleString -}; - -/*************************************************************/ -/* Function: _asn1_yylex */ -/* Description: looks for tokens in file_asn1 pointer file. */ -/* Return: int */ -/* Token identifier or ASCII code or 0(zero: End Of File) */ -/*************************************************************/ -static int -_asn1_yylex () -{ - int c, counter = 0, k, lastc; - char string[ASN1_MAX_NAME_SIZE + 1]; /* will contain the next token */ - size_t i; - - while (1) - { - while ((c = fgetc (file_asn1)) == ' ' || c == '\t' || c == '\n') - if (c == '\n') - line_number++; - - if (c == EOF) - { - snprintf (last_token, sizeof(last_token), "End Of File"); - return 0; - } - - if (c == '(' || c == ')' || c == '[' || c == ']' || - c == '{' || c == '}' || c == ',' || c == '.' || - c == '+' || c == '|') - { - last_token[0] = c; - last_token[1] = 0; - return c; - } - if (c == '-') - { /* Maybe the first '-' of a comment */ - if ((c = fgetc (file_asn1)) != '-') - { - ungetc (c, file_asn1); - last_token[0] = '-'; - last_token[1] = 0; - return '-'; - } - else - { /* Comments */ - lastc = 0; - counter = 0; - /* A comment finishes at the next double hypen or the end of line */ - while ((c = fgetc (file_asn1)) != EOF && c != '\n' && - (lastc != '-' || (lastc == '-' && c != '-'))) - lastc = c; - if (c == EOF) - { - snprintf (last_token, sizeof(last_token), "End Of File"); - return 0; - } - else - { - if (c == '\n') - line_number++; - continue; /* next char, please! (repeat the search) */ - } - } - } - string[counter++] = c; - /* Till the end of the token */ - while (! - ((c = fgetc (file_asn1)) == EOF || c == ' ' || c == '\t' - || c == '\n' || c == '(' || c == ')' || c == '[' || c == ']' - || c == '{' || c == '}' || c == ',' || c == '.')) - { - if (counter >= ASN1_MAX_NAME_SIZE) - { - result_parse = ASN1_NAME_TOO_LONG; - return 0; - } - string[counter++] = c; - } - ungetc (c, file_asn1); - string[counter] = 0; - snprintf (last_token, sizeof(last_token), "%s", string); - - /* Is STRING a number? */ - for (k = 0; k < counter; k++) - if (!isdigit ((int)string[k])) - break; - if (k >= counter) - { - snprintf (yylval.str, sizeof(yylval.str), "%s", string); - return NUM; /* return the number */ - } - - /* Is STRING a keyword? */ - for (i = 0; i < (sizeof (key_word) / sizeof (char *)); i++) - if (!strcmp (string, key_word[i])) - return key_word_token[i]; - - /* STRING is an IDENTIFIER */ - snprintf (yylval.str, sizeof(yylval.str), "%s", string); - return IDENTIFIER; - } -} - -/*************************************************************/ -/* Function: _asn1_create_errorDescription */ -/* Description: creates a string with the description of the*/ -/* error. */ -/* Parameters: */ -/* error : error to describe. */ -/* error_desc: string that will contain the */ -/* description. */ -/*************************************************************/ -static void -_asn1_create_errorDescription (int error, char *error_desc) -{ - if (error_desc == NULL) - return; - - - switch (error) - { - case ASN1_FILE_NOT_FOUND: - snprintf(error_desc, ASN1_MAX_ERROR_DESCRIPTION_SIZE, "%s file was not found", file_name); - break; - case ASN1_SYNTAX_ERROR: - snprintf(error_desc, ASN1_MAX_ERROR_DESCRIPTION_SIZE, "%s", last_error); - break; - case ASN1_NAME_TOO_LONG: - snprintf (error_desc, ASN1_MAX_ERROR_DESCRIPTION_SIZE, - "%s:%u: name too long (more than %u characters)", file_name, - line_number, (unsigned)ASN1_MAX_NAME_SIZE); - break; - case ASN1_IDENTIFIER_NOT_FOUND: - snprintf (error_desc, ASN1_MAX_ERROR_DESCRIPTION_SIZE, - "%s:: identifier '%s' not found", file_name, - _asn1_identifierMissing); - break; - default: - error_desc[0] = 0; - break; - } - -} - -/** - * asn1_parser2tree: - * @file: specify the path and the name of file that contains - * ASN.1 declarations. - * @definitions: return the pointer to the structure created from - * "file" ASN.1 declarations. - * @error_desc: return the error description or an empty - * string if success. - * - * Function used to start the parse algorithm. Creates the structures - * needed to manage the definitions included in @file file. - * - * Returns: %ASN1_SUCCESS if the file has a correct syntax and every - * identifier is known, %ASN1_ELEMENT_NOT_EMPTY if @definitions not - * %NULL, %ASN1_FILE_NOT_FOUND if an error occurred while - * opening @file, %ASN1_SYNTAX_ERROR if the syntax is not - * correct, %ASN1_IDENTIFIER_NOT_FOUND if in the file there is an - * identifier that is not defined, %ASN1_NAME_TOO_LONG if in the - * file there is an identifier whith more than %ASN1_MAX_NAME_SIZE - * characters. - **/ -int -asn1_parser2tree (const char *file, asn1_node * definitions, - char *error_desc) -{ - - p_tree = NULL; - - if (*definitions != NULL) - return ASN1_ELEMENT_NOT_EMPTY; - - *definitions = NULL; - - file_name = file; - - /* open the file to parse */ - file_asn1 = fopen (file, "r"); - - if (file_asn1 == NULL) - { - result_parse = ASN1_FILE_NOT_FOUND; - } - else - { - result_parse = ASN1_SUCCESS; - - line_number = 1; - yyparse (); - - fclose (file_asn1); - - if (result_parse == ASN1_SUCCESS) - { /* syntax OK */ - /* set IMPLICIT or EXPLICIT property */ - _asn1_set_default_tag (p_tree); - /* set CONST_SET and CONST_NOT_USED */ - _asn1_type_set_config (p_tree); - /* check the identifier definitions */ - result_parse = _asn1_check_identifier (p_tree); - if (result_parse == ASN1_SUCCESS) - { /* all identifier defined */ - /* Delete the list and keep the ASN1 structure */ - _asn1_delete_list (); - /* Convert into DER coding the value assign to INTEGER constants */ - _asn1_change_integer_value (p_tree); - /* Expand the IDs of OBJECT IDENTIFIER constants */ - _asn1_expand_object_id (p_tree); - - *definitions = p_tree; - } - else /* some identifiers not defined */ - /* Delete the list and the ASN1 structure */ - _asn1_delete_list_and_nodes (); - } - else /* syntax error */ - /* Delete the list and the ASN1 structure */ - _asn1_delete_list_and_nodes (); - } - - _asn1_create_errorDescription (result_parse, error_desc); - - return result_parse; -} - -/** - * asn1_parser2array: - * @inputFileName: specify the path and the name of file that - * contains ASN.1 declarations. - * @outputFileName: specify the path and the name of file that will - * contain the C vector definition. - * @vectorName: specify the name of the C vector. - * @error_desc: return the error description or an empty - * string if success. - * - * Function that generates a C structure from an ASN1 file. Creates a - * file containing a C vector to use to manage the definitions - * included in @inputFileName file. If @inputFileName is - * "/aa/bb/xx.yy" and @outputFileName is %NULL, the file created is - * "/aa/bb/xx_asn1_tab.c". If @vectorName is %NULL the vector name - * will be "xx_asn1_tab". - * - * Returns: %ASN1_SUCCESS if the file has a correct syntax and every - * identifier is known, %ASN1_FILE_NOT_FOUND if an error occurred - * while opening @inputFileName, %ASN1_SYNTAX_ERROR if the syntax is - * not correct, %ASN1_IDENTIFIER_NOT_FOUND if in the file there is - * an identifier that is not defined, %ASN1_NAME_TOO_LONG if in the - * file there is an identifier whith more than %ASN1_MAX_NAME_SIZE - * characters. - **/ -int -asn1_parser2array (const char *inputFileName, const char *outputFileName, - const char *vectorName, char *error_desc) -{ - char *file_out_name = NULL; - char *vector_name = NULL; - const char *char_p, *slash_p, *dot_p; - - p_tree = NULL; - - file_name = inputFileName; - - /* open the file to parse */ - file_asn1 = fopen (inputFileName, "r"); - - if (file_asn1 == NULL) - result_parse = ASN1_FILE_NOT_FOUND; - else - { - result_parse = ASN1_SUCCESS; - - line_number = 1; - yyparse (); - - fclose (file_asn1); - - if (result_parse == ASN1_SUCCESS) - { /* syntax OK */ - /* set IMPLICIT or EXPLICIT property */ - _asn1_set_default_tag (p_tree); - /* set CONST_SET and CONST_NOT_USED */ - _asn1_type_set_config (p_tree); - /* check the identifier definitions */ - result_parse = _asn1_check_identifier (p_tree); - - if (result_parse == ASN1_SUCCESS) - { /* all identifier defined */ - - /* searching the last '/' and '.' in inputFileName */ - char_p = inputFileName; - slash_p = inputFileName; - while ((char_p = strchr (char_p, '/'))) - { - char_p++; - slash_p = char_p; - } - - char_p = slash_p; - dot_p = inputFileName + strlen (inputFileName); - - while ((char_p = strchr (char_p, '.'))) - { - dot_p = char_p; - char_p++; - } - - if (outputFileName == NULL) - { - /* file_out_name = inputFileName + _asn1_tab.c */ - file_out_name = malloc (dot_p - inputFileName + 1 + - strlen ("_asn1_tab.c")); - memcpy (file_out_name, inputFileName, - dot_p - inputFileName); - file_out_name[dot_p - inputFileName] = 0; - strcat (file_out_name, "_asn1_tab.c"); - } - else - { - /* file_out_name = inputFileName */ - file_out_name = - (char *) malloc (strlen (outputFileName) + 1); - strcpy (file_out_name, outputFileName); - } - - if (vectorName == NULL) - { - /* vector_name = file name + _asn1_tab */ - vector_name = malloc (dot_p - slash_p + 1 + - strlen ("_asn1_tab")); - memcpy (vector_name, slash_p, dot_p - slash_p); - vector_name[dot_p - slash_p] = 0; - strcat (vector_name, "_asn1_tab"); - } - else - { - /* vector_name = vectorName */ - vector_name = (char *) malloc (strlen (vectorName) + 1); - strcpy (vector_name, vectorName); - } - - /* Save structure in a file */ - _asn1_create_static_structure (p_tree, - file_out_name, vector_name); - - free (file_out_name); - free (vector_name); - } /* result == OK */ - } /* result == OK */ - - /* Delete the list and the ASN1 structure */ - _asn1_delete_list_and_nodes (); - } /* inputFile exist */ - - _asn1_create_errorDescription (result_parse, error_desc); - - return result_parse; -} - -/*************************************************************/ -/* Function: _asn1_yyerror */ -/* Description: function called when there are syntax errors*/ -/* Parameters: */ -/* char *s : error description */ -/* Return: int */ -/* */ -/*************************************************************/ -static void -_asn1_yyerror (const char *s) -{ - /* Sends the error description to the std_out */ - - if (strcmp (last_token, "VisibleString") == 0 || - strcmp (last_token, "PrintableString") == 0 || - strcmp (last_token, "UniversalString") == 0 || - strcmp (last_token, "IA5String") == 0 || - strcmp (last_token, "UTF8String") == 0 || - strcmp (last_token, "NumericString") == 0 || - strcmp (last_token, "TeletexString") == 0 || - strcmp (last_token, "BMPString") == 0) - { - snprintf (last_error_token, sizeof(last_error_token), - "%s", last_token); - fprintf(stderr, "%s:%u: Warning: %s is a built-in ASN.1 type.\n", - file_name, line_number, last_token); - return; - } - last_error_token[0] = 0; - - if (result_parse != ASN1_NAME_TOO_LONG) - { - snprintf (last_error, sizeof(last_error), - "%s:%u: Error: %s near '%s'", file_name, - line_number, s, last_token); - result_parse = ASN1_SYNTAX_ERROR; - } - - return; -} diff --git a/lib/Makefile.am b/lib/Makefile.am deleted file mode 100644 index 8b6a0f0..0000000 --- a/lib/Makefile.am +++ /dev/null @@ -1,59 +0,0 @@ -## Process this file with automake to produce Makefile.in -# Copyright (C) 2002-2014 Free Software Foundation, Inc. -# -# This file is part of LIBTASN1. -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -SUBDIRS = gllib - -AM_CFLAGS = $(WARN_CFLAGS) $(WERROR_CFLAGS) $(CFLAG_VISIBILITY) -AM_CPPFLAGS = -I$(srcdir)/gllib -DASN1_BUILDING - -include_HEADERS = libtasn1.h - -pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = libtasn1.pc - -lib_LTLIBRARIES = libtasn1.la - -libtasn1_la_SOURCES = \ - ASN1.y \ - coding.c \ - decoding.c \ - element.c \ - element.h \ - errors.c \ - gstr.c \ - gstr.h \ - int.h \ - libtasn1.h \ - libtasn1.map \ - parser_aux.c \ - parser_aux.h \ - structure.c \ - structure.h \ - version.c - -libtasn1_la_LIBADD = gllib/libgnu.la - -libtasn1_la_LDFLAGS = \ - -no-undefined \ - -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) - -if HAVE_LD_VERSION_SCRIPT -libtasn1_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libtasn1.map -else -libtasn1_la_LDFLAGS += -export-symbols-regex '^(asn1|libtasn1_).*' -endif diff --git a/lib/coding.c b/lib/coding.c deleted file mode 100644 index 7141df7..0000000 --- a/lib/coding.c +++ /dev/null @@ -1,1347 +0,0 @@ -/* - * Copyright (C) 2002-2014 Free Software Foundation, Inc. - * - * This file is part of LIBTASN1. - * - * The LIBTASN1 library is free software; you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA - */ - - -/*****************************************************/ -/* File: coding.c */ -/* Description: Functions to create a DER coding of */ -/* an ASN1 type. */ -/*****************************************************/ - -#include -#include "parser_aux.h" -#include -#include "element.h" -#include "minmax.h" -#include - -#define MAX_TAG_LEN 16 - -/******************************************************/ -/* Function : _asn1_error_description_value_not_found */ -/* Description: creates the ErrorDescription string */ -/* for the ASN1_VALUE_NOT_FOUND error. */ -/* Parameters: */ -/* node: node of the tree where the value is NULL. */ -/* ErrorDescription: string returned. */ -/* Return: */ -/******************************************************/ -static void -_asn1_error_description_value_not_found (asn1_node node, - char *ErrorDescription) -{ - - if (ErrorDescription == NULL) - return; - - Estrcpy (ErrorDescription, ":: value of element '"); - _asn1_hierarchical_name (node, ErrorDescription + strlen (ErrorDescription), - ASN1_MAX_ERROR_DESCRIPTION_SIZE - 40); - Estrcat (ErrorDescription, "' not found"); - -} - -/** - * asn1_length_der: - * @len: value to convert. - * @der: buffer to hold the returned encoding (may be %NULL). - * @der_len: number of meaningful bytes of ANS (der[0]..der[der_len-1]). - * - * Creates the DER encoding of the provided length value. - * The @der buffer must have enough room for the output. The maximum - * length this function will encode is %ASN1_MAX_LENGTH_SIZE. - * - * To know the size of the DER encoding use a %NULL value for @der. - **/ -void -asn1_length_der (unsigned long int len, unsigned char *der, int *der_len) -{ - int k; - unsigned char temp[ASN1_MAX_LENGTH_SIZE]; -#if SIZEOF_UNSIGNED_LONG_INT > 8 - len &= 0xFFFFFFFFFFFFFFFF; -#endif - - if (len < 128) - { - /* short form */ - if (der != NULL) - der[0] = (unsigned char) len; - *der_len = 1; - } - else - { - /* Long form */ - k = 0; - while (len) - { - temp[k++] = len & 0xFF; - len = len >> 8; - } - *der_len = k + 1; - if (der != NULL) - { - der[0] = ((unsigned char) k & 0x7F) + 128; - while (k--) - der[*der_len - 1 - k] = temp[k]; - } - } -} - -/******************************************************/ -/* Function : _asn1_tag_der */ -/* Description: creates the DER coding for the CLASS */ -/* and TAG parameters. */ -/* It is limited by the ASN1_MAX_TAG_SIZE variable */ -/* Parameters: */ -/* class: value to convert. */ -/* tag_value: value to convert. */ -/* ans: string returned. */ -/* ans_len: number of meaningful bytes of ANS */ -/* (ans[0]..ans[ans_len-1]). */ -/* Return: */ -/******************************************************/ -static void -_asn1_tag_der (unsigned char class, unsigned int tag_value, - unsigned char *ans, int *ans_len) -{ - int k; - unsigned char temp[ASN1_MAX_TAG_SIZE]; - - if (tag_value < 31) - { - /* short form */ - ans[0] = (class & 0xE0) + ((unsigned char) (tag_value & 0x1F)); - *ans_len = 1; - } - else - { - /* Long form */ - ans[0] = (class & 0xE0) + 31; - k = 0; - while (tag_value != 0) - { - temp[k++] = tag_value & 0x7F; - tag_value >>= 7; - - if (k > ASN1_MAX_TAG_SIZE - 1) - break; /* will not encode larger tags */ - } - *ans_len = k + 1; - while (k--) - ans[*ans_len - 1 - k] = temp[k] + 128; - ans[*ans_len - 1] -= 128; - } -} - -/** - * asn1_octet_der: - * @str: the input data. - * @str_len: STR length (str[0]..str[*str_len-1]). - * @der: encoded string returned. - * @der_len: number of meaningful bytes of DER (der[0]..der[der_len-1]). - * - * Creates a length-value DER encoding for the input data. - * The DER encoding of the input data will be placed in the @der variable. - * - * Note that the OCTET STRING tag is not included in the output. - * - * This function does not return any value because it is expected - * that @der_len will contain enough bytes to store the string - * plus the DER encoding. The DER encoding size can be obtained using - * asn1_length_der(). - **/ -void -asn1_octet_der (const unsigned char *str, int str_len, - unsigned char *der, int *der_len) -{ - int len_len; - - if (der == NULL || str_len < 0) - return; - - asn1_length_der (str_len, der, &len_len); - memcpy (der + len_len, str, str_len); - *der_len = str_len + len_len; -} - - -/** - * asn1_encode_simple_der: - * @etype: The type of the string to be encoded (ASN1_ETYPE_) - * @str: the string data. - * @str_len: the string length - * @tl: the encoded tag and length - * @tl_len: the bytes of the @tl field - * - * Creates the DER encoding for various simple ASN.1 types like strings etc. - * It stores the tag and length in @tl, which should have space for at least - * %ASN1_MAX_TL_SIZE bytes. Initially @tl_len should contain the size of @tl. - * - * The complete DER encoding should consist of the value in @tl appended - * with the provided @str. - * - * Returns: %ASN1_SUCCESS if successful or an error value. - **/ -int -asn1_encode_simple_der (unsigned int etype, const unsigned char *str, - unsigned int str_len, unsigned char *tl, - unsigned int *tl_len) -{ - int tag_len, len_len; - unsigned tlen; - unsigned char der_tag[ASN1_MAX_TAG_SIZE]; - unsigned char der_length[ASN1_MAX_LENGTH_SIZE]; - unsigned char *p; - - if (str == NULL) - return ASN1_VALUE_NOT_VALID; - - if (ETYPE_OK (etype) == 0) - return ASN1_VALUE_NOT_VALID; - - /* doesn't handle constructed classes */ - if (ETYPE_CLASS (etype) != ASN1_CLASS_UNIVERSAL) - return ASN1_VALUE_NOT_VALID; - - _asn1_tag_der (ETYPE_CLASS (etype), ETYPE_TAG (etype), der_tag, &tag_len); - - asn1_length_der (str_len, der_length, &len_len); - - if (tag_len <= 0 || len_len <= 0) - return ASN1_VALUE_NOT_VALID; - - tlen = tag_len + len_len; - - if (*tl_len < tlen) - return ASN1_MEM_ERROR; - - p = tl; - memcpy (p, der_tag, tag_len); - p += tag_len; - memcpy (p, der_length, len_len); - - *tl_len = tlen; - - return ASN1_SUCCESS; -} - -/******************************************************/ -/* Function : _asn1_time_der */ -/* Description: creates the DER coding for a TIME */ -/* type (length included). */ -/* Parameters: */ -/* str: TIME null-terminated string. */ -/* der: string returned. */ -/* der_len: number of meaningful bytes of DER */ -/* (der[0]..der[ans_len-1]). Initially it */ -/* if must store the lenght of DER. */ -/* Return: */ -/* ASN1_MEM_ERROR when DER isn't big enough */ -/* ASN1_SUCCESS otherwise */ -/******************************************************/ -static int -_asn1_time_der (unsigned char *str, int str_len, unsigned char *der, - int *der_len) -{ - int len_len; - int max_len; - - max_len = *der_len; - - asn1_length_der (str_len, (max_len > 0) ? der : NULL, &len_len); - - if ((len_len + str_len) <= max_len) - memcpy (der + len_len, str, str_len); - *der_len = len_len + str_len; - - if ((*der_len) > max_len) - return ASN1_MEM_ERROR; - - return ASN1_SUCCESS; -} - - -/* -void -_asn1_get_utctime_der(unsigned char *der,int *der_len,unsigned char *str) -{ - int len_len,str_len; - char temp[20]; - - if(str==NULL) return; - str_len=asn1_get_length_der(der,*der_len,&len_len); - if (str_len<0) return; - memcpy(temp,der+len_len,str_len); - *der_len=str_len+len_len; - switch(str_len){ - case 11: - temp[10]=0; - strcat(temp,"00+0000"); - break; - case 13: - temp[12]=0; - strcat(temp,"+0000"); - break; - case 15: - temp[15]=0; - memmove(temp+12,temp+10,6); - temp[10]=temp[11]='0'; - break; - case 17: - temp[17]=0; - break; - default: - return; - } - strcpy(str,temp); -} -*/ - -/******************************************************/ -/* Function : _asn1_objectid_der */ -/* Description: creates the DER coding for an */ -/* OBJECT IDENTIFIER type (length included). */ -/* Parameters: */ -/* str: OBJECT IDENTIFIER null-terminated string. */ -/* der: string returned. */ -/* der_len: number of meaningful bytes of DER */ -/* (der[0]..der[ans_len-1]). Initially it */ -/* must store the length of DER. */ -/* Return: */ -/* ASN1_MEM_ERROR when DER isn't big enough */ -/* ASN1_SUCCESS if succesful */ -/* or an error value. */ -/******************************************************/ -static int -_asn1_objectid_der (unsigned char *str, unsigned char *der, int *der_len) -{ - int len_len, counter, k, first, max_len; - char *temp, *n_end, *n_start; - unsigned char bit7; - uint64_t val, val1 = 0; - int str_len = _asn1_strlen (str); - - max_len = *der_len; - - temp = malloc (str_len + 2); - if (temp == NULL) - return ASN1_MEM_ALLOC_ERROR; - - memcpy (temp, str, str_len); - temp[str_len] = '.'; - temp[str_len + 1] = 0; - - counter = 0; - n_start = temp; - while ((n_end = strchr (n_start, '.'))) - { - *n_end = 0; - val = _asn1_strtou64 (n_start, NULL, 10); - counter++; - - if (counter == 1) - val1 = val; - else if (counter == 2) - { - if (max_len > 0) - der[0] = 40 * val1 + val; - *der_len = 1; - } - else - { - first = 0; - for (k = sizeof(val); k >= 0; k--) - { - bit7 = (val >> (k * 7)) & 0x7F; - if (bit7 || first || !k) - { - if (k) - bit7 |= 0x80; - if (max_len > (*der_len)) - der[*der_len] = bit7; - (*der_len)++; - first = 1; - } - } - - } - n_start = n_end + 1; - } - - asn1_length_der (*der_len, NULL, &len_len); - if (max_len >= (*der_len + len_len)) - { - memmove (der + len_len, der, *der_len); - asn1_length_der (*der_len, der, &len_len); - } - *der_len += len_len; - - free (temp); - - if (max_len < (*der_len)) - return ASN1_MEM_ERROR; - - return ASN1_SUCCESS; -} - - -static const unsigned char bit_mask[] = - { 0xFF, 0xFE, 0xFC, 0xF8, 0xF0, 0xE0, 0xC0, 0x80 }; - -/** - * asn1_bit_der: - * @str: BIT string. - * @bit_len: number of meaningful bits in STR. - * @der: string returned. - * @der_len: number of meaningful bytes of DER - * (der[0]..der[ans_len-1]). - * - * Creates a length-value DER encoding for the input data - * as it would have been for a BIT STRING. - * The DER encoded data will be copied in @der. - * - * Note that the BIT STRING tag is not included in the output. - * - * This function does not return any value because it is expected - * that @der_len will contain enough bytes to store the string - * plus the DER encoding. The DER encoding size can be obtained using - * asn1_length_der(). - **/ -void -asn1_bit_der (const unsigned char *str, int bit_len, - unsigned char *der, int *der_len) -{ - int len_len, len_byte, len_pad; - - if (der == NULL) - return; - - len_byte = bit_len >> 3; - len_pad = 8 - (bit_len & 7); - if (len_pad == 8) - len_pad = 0; - else - len_byte++; - asn1_length_der (len_byte + 1, der, &len_len); - der[len_len] = len_pad; - - if (str) - memcpy (der + len_len + 1, str, len_byte); - der[len_len + len_byte] &= bit_mask[len_pad]; - *der_len = len_byte + len_len + 1; -} - - -/******************************************************/ -/* Function : _asn1_complete_explicit_tag */ -/* Description: add the length coding to the EXPLICIT */ -/* tags. */ -/* Parameters: */ -/* node: pointer to the tree element. */ -/* der: string with the DER coding of the whole tree*/ -/* counter: number of meaningful bytes of DER */ -/* (der[0]..der[*counter-1]). */ -/* max_len: size of der vector */ -/* Return: */ -/* ASN1_MEM_ERROR if der vector isn't big enough, */ -/* otherwise ASN1_SUCCESS. */ -/******************************************************/ -static int -_asn1_complete_explicit_tag (asn1_node node, unsigned char *der, - int *counter, int *max_len) -{ - asn1_node p; - int is_tag_implicit, len2, len3; - unsigned char temp[SIZEOF_UNSIGNED_INT]; - - is_tag_implicit = 0; - - if (node->type & CONST_TAG) - { - p = node->down; - if (p == NULL) - return ASN1_DER_ERROR; - /* When there are nested tags we must complete them reverse to - the order they were created. This is because completing a tag - modifies all data within it, including the incomplete tags - which store buffer positions -- simon@josefsson.org 2002-09-06 - */ - while (p->right) - p = p->right; - while (p && p != node->down->left) - { - if (type_field (p->type) == ASN1_ETYPE_TAG) - { - if (p->type & CONST_EXPLICIT) - { - len2 = strtol (p->name, NULL, 10); - _asn1_set_name (p, NULL); - - asn1_length_der (*counter - len2, temp, &len3); - if (len3 <= (*max_len)) - { - memmove (der + len2 + len3, der + len2, - *counter - len2); - memcpy (der + len2, temp, len3); - } - *max_len -= len3; - *counter += len3; - is_tag_implicit = 0; - } - else - { /* CONST_IMPLICIT */ - if (!is_tag_implicit) - { - is_tag_implicit = 1; - } - } - } - p = p->left; - } - } - - if (*max_len < 0) - return ASN1_MEM_ERROR; - - return ASN1_SUCCESS; -} - -const tag_and_class_st _asn1_tags[] = { - [ASN1_ETYPE_GENERALSTRING] = - {ASN1_TAG_GENERALSTRING, ASN1_CLASS_UNIVERSAL, "type:GENERALSTRING"}, - [ASN1_ETYPE_NUMERIC_STRING] = - {ASN1_TAG_NUMERIC_STRING, ASN1_CLASS_UNIVERSAL, "type:NUMERIC_STR"}, - [ASN1_ETYPE_IA5_STRING] = - {ASN1_TAG_IA5_STRING, ASN1_CLASS_UNIVERSAL, "type:IA5_STR"}, - [ASN1_ETYPE_TELETEX_STRING] = - {ASN1_TAG_TELETEX_STRING, ASN1_CLASS_UNIVERSAL, "type:TELETEX_STR"}, - [ASN1_ETYPE_PRINTABLE_STRING] = - {ASN1_TAG_PRINTABLE_STRING, ASN1_CLASS_UNIVERSAL, "type:PRINTABLE_STR"}, - [ASN1_ETYPE_UNIVERSAL_STRING] = - {ASN1_TAG_UNIVERSAL_STRING, ASN1_CLASS_UNIVERSAL, "type:UNIVERSAL_STR"}, - [ASN1_ETYPE_BMP_STRING] = - {ASN1_TAG_BMP_STRING, ASN1_CLASS_UNIVERSAL, "type:BMP_STR"}, - [ASN1_ETYPE_UTF8_STRING] = - {ASN1_TAG_UTF8_STRING, ASN1_CLASS_UNIVERSAL, "type:UTF8_STR"}, - [ASN1_ETYPE_VISIBLE_STRING] = - {ASN1_TAG_VISIBLE_STRING, ASN1_CLASS_UNIVERSAL, "type:VISIBLE_STR"}, - [ASN1_ETYPE_OCTET_STRING] = - {ASN1_TAG_OCTET_STRING, ASN1_CLASS_UNIVERSAL, "type:OCT_STR"}, - [ASN1_ETYPE_BIT_STRING] = - {ASN1_TAG_BIT_STRING, ASN1_CLASS_UNIVERSAL, "type:BIT_STR"}, - [ASN1_ETYPE_OBJECT_ID] = - {ASN1_TAG_OBJECT_ID, ASN1_CLASS_UNIVERSAL, "type:OBJ_ID"}, - [ASN1_ETYPE_NULL] = {ASN1_TAG_NULL, ASN1_CLASS_UNIVERSAL, "type:NULL"}, - [ASN1_ETYPE_BOOLEAN] = - {ASN1_TAG_BOOLEAN, ASN1_CLASS_UNIVERSAL, "type:BOOLEAN"}, - [ASN1_ETYPE_INTEGER] = - {ASN1_TAG_INTEGER, ASN1_CLASS_UNIVERSAL, "type:INTEGER"}, - [ASN1_ETYPE_ENUMERATED] = - {ASN1_TAG_ENUMERATED, ASN1_CLASS_UNIVERSAL, "type:ENUMERATED"}, - [ASN1_ETYPE_SEQUENCE] = - {ASN1_TAG_SEQUENCE, ASN1_CLASS_UNIVERSAL | ASN1_CLASS_STRUCTURED, - "type:SEQUENCE"}, - [ASN1_ETYPE_SEQUENCE_OF] = - {ASN1_TAG_SEQUENCE, ASN1_CLASS_UNIVERSAL | ASN1_CLASS_STRUCTURED, - "type:SEQ_OF"}, - [ASN1_ETYPE_SET] = - {ASN1_TAG_SET, ASN1_CLASS_UNIVERSAL | ASN1_CLASS_STRUCTURED, "type:SET"}, - [ASN1_ETYPE_SET_OF] = - {ASN1_TAG_SET, ASN1_CLASS_UNIVERSAL | ASN1_CLASS_STRUCTURED, - "type:SET_OF"}, - [ASN1_ETYPE_GENERALIZED_TIME] = - {ASN1_TAG_GENERALIZEDTime, ASN1_CLASS_UNIVERSAL, "type:GENERALIZED_TIME"}, - [ASN1_ETYPE_UTC_TIME] = - {ASN1_TAG_UTCTime, ASN1_CLASS_UNIVERSAL, "type:UTC_TIME"}, -}; - -unsigned int _asn1_tags_size = sizeof (_asn1_tags) / sizeof (_asn1_tags[0]); - -/******************************************************/ -/* Function : _asn1_insert_tag_der */ -/* Description: creates the DER coding of tags of one */ -/* NODE. */ -/* Parameters: */ -/* node: pointer to the tree element. */ -/* der: string returned */ -/* counter: number of meaningful bytes of DER */ -/* (counter[0]..der[*counter-1]). */ -/* max_len: size of der vector */ -/* Return: */ -/* ASN1_GENERIC_ERROR if the type is unknown, */ -/* ASN1_MEM_ERROR if der vector isn't big enough, */ -/* otherwise ASN1_SUCCESS. */ -/******************************************************/ -static int -_asn1_insert_tag_der (asn1_node node, unsigned char *der, int *counter, - int *max_len) -{ - asn1_node p; - int tag_len, is_tag_implicit; - unsigned char class, class_implicit = 0, temp[MAX(SIZEOF_UNSIGNED_INT * 3 + 1, LTOSTR_MAX_SIZE)]; - unsigned long tag_implicit = 0; - unsigned char tag_der[MAX_TAG_LEN]; - - is_tag_implicit = 0; - - if (node->type & CONST_TAG) - { - p = node->down; - while (p) - { - if (type_field (p->type) == ASN1_ETYPE_TAG) - { - if (p->type & CONST_APPLICATION) - class = ASN1_CLASS_APPLICATION; - else if (p->type & CONST_UNIVERSAL) - class = ASN1_CLASS_UNIVERSAL; - else if (p->type & CONST_PRIVATE) - class = ASN1_CLASS_PRIVATE; - else - class = ASN1_CLASS_CONTEXT_SPECIFIC; - - if (p->type & CONST_EXPLICIT) - { - if (is_tag_implicit) - _asn1_tag_der (class_implicit, tag_implicit, tag_der, - &tag_len); - else - _asn1_tag_der (class | ASN1_CLASS_STRUCTURED, - _asn1_strtoul (p->value, NULL, 10), - tag_der, &tag_len); - - *max_len -= tag_len; - if (der && *max_len >= 0) - memcpy (der + *counter, tag_der, tag_len); - *counter += tag_len; - - _asn1_ltostr (*counter, (char *) temp); - _asn1_set_name (p, (const char *) temp); - - is_tag_implicit = 0; - } - else - { /* CONST_IMPLICIT */ - if (!is_tag_implicit) - { - if ((type_field (node->type) == ASN1_ETYPE_SEQUENCE) || - (type_field (node->type) == ASN1_ETYPE_SEQUENCE_OF) - || (type_field (node->type) == ASN1_ETYPE_SET) - || (type_field (node->type) == ASN1_ETYPE_SET_OF)) - class |= ASN1_CLASS_STRUCTURED; - class_implicit = class; - tag_implicit = _asn1_strtoul (p->value, NULL, 10); - is_tag_implicit = 1; - } - } - } - p = p->right; - } - } - - if (is_tag_implicit) - { - _asn1_tag_der (class_implicit, tag_implicit, tag_der, &tag_len); - } - else - { - unsigned type = type_field (node->type); - switch (type) - { - CASE_HANDLED_ETYPES: - _asn1_tag_der (_asn1_tags[type].class, _asn1_tags[type].tag, - tag_der, &tag_len); - break; - case ASN1_ETYPE_TAG: - case ASN1_ETYPE_CHOICE: - case ASN1_ETYPE_ANY: - tag_len = 0; - break; - default: - return ASN1_GENERIC_ERROR; - } - } - - *max_len -= tag_len; - if (der && *max_len >= 0) - memcpy (der + *counter, tag_der, tag_len); - *counter += tag_len; - - if (*max_len < 0) - return ASN1_MEM_ERROR; - - return ASN1_SUCCESS; -} - -/******************************************************/ -/* Function : _asn1_ordering_set */ -/* Description: puts the elements of a SET type in */ -/* the correct order according to DER rules. */ -/* Parameters: */ -/* der: string with the DER coding. */ -/* node: pointer to the SET element. */ -/* Return: */ -/* ASN1_SUCCESS if successful */ -/* or an error value. */ -/******************************************************/ -static int -_asn1_ordering_set (unsigned char *der, int der_len, asn1_node node) -{ - struct vet - { - int end; - unsigned long value; - struct vet *next, *prev; - }; - - int counter, len, len2; - struct vet *first, *last, *p_vet, *p2_vet; - asn1_node p; - unsigned char class, *temp; - unsigned long tag, t; - int err; - - counter = 0; - - if (type_field (node->type) != ASN1_ETYPE_SET) - return ASN1_VALUE_NOT_VALID; - - p = node->down; - while (p && ((type_field (p->type) == ASN1_ETYPE_TAG) || - (type_field (p->type) == ASN1_ETYPE_SIZE))) - p = p->right; - - if ((p == NULL) || (p->right == NULL)) - return ASN1_SUCCESS; - - first = last = NULL; - while (p) - { - p_vet = malloc (sizeof (struct vet)); - if (p_vet == NULL) - { - err = ASN1_MEM_ALLOC_ERROR; - goto error; - } - - p_vet->next = NULL; - p_vet->prev = last; - if (first == NULL) - first = p_vet; - else - last->next = p_vet; - last = p_vet; - - /* tag value calculation */ - err = asn1_get_tag_der (der + counter, der_len - counter, &class, &len2, - &tag); - if (err != ASN1_SUCCESS) - goto error; - - t = ((unsigned int)class) << 24; - p_vet->value = t | tag; - counter += len2; - - /* extraction and length */ - len2 = asn1_get_length_der (der + counter, der_len - counter, &len); - if (len2 < 0) - { - err = ASN1_DER_ERROR; - goto error; - } - counter += len + len2; - - p_vet->end = counter; - p = p->right; - } - - p_vet = first; - - while (p_vet) - { - p2_vet = p_vet->next; - counter = 0; - while (p2_vet) - { - if (p_vet->value > p2_vet->value) - { - /* change position */ - temp = malloc (p_vet->end - counter); - if (temp == NULL) - { - err = ASN1_MEM_ALLOC_ERROR; - goto error; - } - - memcpy (temp, der + counter, p_vet->end - counter); - memcpy (der + counter, der + p_vet->end, - p2_vet->end - p_vet->end); - memcpy (der + counter + p2_vet->end - p_vet->end, temp, - p_vet->end - counter); - free (temp); - - tag = p_vet->value; - p_vet->value = p2_vet->value; - p2_vet->value = tag; - - p_vet->end = counter + (p2_vet->end - p_vet->end); - } - counter = p_vet->end; - - p2_vet = p2_vet->next; - p_vet = p_vet->next; - } - - if (p_vet != first) - p_vet->prev->next = NULL; - else - first = NULL; - free (p_vet); - p_vet = first; - } - return ASN1_SUCCESS; - -error: - while (first != NULL) - { - p_vet = first; - first = first->next; - free(p_vet); - } - return err; -} - -/******************************************************/ -/* Function : _asn1_ordering_set_of */ -/* Description: puts the elements of a SET OF type in */ -/* the correct order according to DER rules. */ -/* Parameters: */ -/* der: string with the DER coding. */ -/* node: pointer to the SET OF element. */ -/* Return: */ -/* ASN1_SUCCESS if successful */ -/* or an error value. */ -/******************************************************/ -static int -_asn1_ordering_set_of (unsigned char *der, int der_len, asn1_node node) -{ - struct vet - { - int end; - struct vet *next, *prev; - }; - - int counter, len, len2, change; - struct vet *first, *last, *p_vet, *p2_vet; - asn1_node p; - unsigned char *temp, class; - unsigned long k, length; - int err; - - counter = 0; - - if (type_field (node->type) != ASN1_ETYPE_SET_OF) - return ASN1_VALUE_NOT_VALID; - - p = node->down; - while (p && ((type_field (p->type) == ASN1_ETYPE_TAG) || - (type_field (p->type) == ASN1_ETYPE_SIZE))) - p = p->right; - if (p == NULL) - return ASN1_VALUE_NOT_VALID; - p = p->right; - - if ((p == NULL) || (p->right == NULL)) - return ASN1_SUCCESS; - - first = last = NULL; - while (p) - { - p_vet = malloc (sizeof (struct vet)); - if (p_vet == NULL) - { - err = ASN1_MEM_ALLOC_ERROR; - goto error; - } - - p_vet->next = NULL; - p_vet->prev = last; - if (first == NULL) - first = p_vet; - else - last->next = p_vet; - last = p_vet; - - /* extraction of tag and length */ - if (der_len - counter > 0) - { - - err = asn1_get_tag_der (der + counter, der_len - counter, &class, - &len, NULL); - if (err != ASN1_SUCCESS) - goto error; - counter += len; - - len2 = asn1_get_length_der (der + counter, der_len - counter, &len); - if (len2 < 0) - { - err = ASN1_DER_ERROR; - goto error; - } - counter += len + len2; - } - else - { - err = ASN1_DER_ERROR; - goto error; - } - - p_vet->end = counter; - p = p->right; - } - - p_vet = first; - - while (p_vet) - { - p2_vet = p_vet->next; - counter = 0; - while (p2_vet) - { - length = MIN(p_vet->end - counter, p2_vet->end - p_vet->end); - change = -1; - for (k = 0; k < length; k++) - if (der[counter + k] > der[p_vet->end + k]) - { - change = 1; - break; - } - else if (der[counter + k] < der[p_vet->end + k]) - { - change = 0; - break; - } - - if ((change == -1) - && ((p_vet->end - counter) > (p2_vet->end - p_vet->end))) - change = 1; - - if (change == 1) - { - /* change position */ - temp = malloc (p_vet->end - counter); - if (temp == NULL) - { - err = ASN1_MEM_ALLOC_ERROR; - goto error; - } - - memcpy (temp, der + counter, (p_vet->end) - counter); - memcpy (der + counter, der + (p_vet->end), - (p2_vet->end) - (p_vet->end)); - memcpy (der + counter + (p2_vet->end) - (p_vet->end), temp, - (p_vet->end) - counter); - free (temp); - - p_vet->end = counter + (p2_vet->end - p_vet->end); - } - counter = p_vet->end; - - p2_vet = p2_vet->next; - p_vet = p_vet->next; - } - - if (p_vet != first) - p_vet->prev->next = NULL; - else - first = NULL; - free (p_vet); - p_vet = first; - } - return ASN1_SUCCESS; - -error: - while (first != NULL) - { - p_vet = first; - first = first->next; - free(p_vet); - } - return err; -} - -/** - * asn1_der_coding: - * @element: pointer to an ASN1 element - * @name: the name of the structure you want to encode (it must be - * inside *POINTER). - * @ider: vector that will contain the DER encoding. DER must be a - * pointer to memory cells already allocated. - * @len: number of bytes of *@ider: @ider[0]..@ider[len-1], Initialy - * holds the sizeof of der vector. - * @ErrorDescription: return the error description or an empty - * string if success. - * - * Creates the DER encoding for the NAME structure (inside *POINTER - * structure). - * - * Returns: %ASN1_SUCCESS if DER encoding OK, %ASN1_ELEMENT_NOT_FOUND - * if @name is not a valid element, %ASN1_VALUE_NOT_FOUND if there - * is an element without a value, %ASN1_MEM_ERROR if the @ider - * vector isn't big enough and in this case @len will contain the - * length needed. - **/ -int -asn1_der_coding (asn1_node element, const char *name, void *ider, int *len, - char *ErrorDescription) -{ - asn1_node node, p, p2; - unsigned char temp[MAX(LTOSTR_MAX_SIZE, SIZEOF_UNSIGNED_LONG_INT * 3 + 1)]; - int counter, counter_old, len2, len3, move, max_len, max_len_old; - int err; - unsigned char *der = ider; - - if (ErrorDescription) - ErrorDescription[0] = 0; - - node = asn1_find_node (element, name); - if (node == NULL) - return ASN1_ELEMENT_NOT_FOUND; - - /* Node is now a locally allocated variable. - * That is because in some point we modify the - * structure, and I don't know why! --nmav - */ - node = _asn1_copy_structure3 (node); - if (node == NULL) - return ASN1_ELEMENT_NOT_FOUND; - - max_len = *len; - - counter = 0; - move = DOWN; - p = node; - - while (1) - { - - counter_old = counter; - max_len_old = max_len; - if (move != UP) - { - p->start = counter; - err = _asn1_insert_tag_der (p, der, &counter, &max_len); - if (err != ASN1_SUCCESS && err != ASN1_MEM_ERROR) - goto error; - } - switch (type_field (p->type)) - { - case ASN1_ETYPE_NULL: - max_len--; - if (max_len >= 0) - der[counter] = 0; - counter++; - move = RIGHT; - break; - case ASN1_ETYPE_BOOLEAN: - if ((p->type & CONST_DEFAULT) && (p->value == NULL)) - { - counter = counter_old; - max_len = max_len_old; - } - else - { - if (p->value == NULL) - { - _asn1_error_description_value_not_found (p, - ErrorDescription); - err = ASN1_VALUE_NOT_FOUND; - goto error; - } - max_len -= 2; - if (max_len >= 0) - { - der[counter++] = 1; - if (p->value[0] == 'F') - der[counter++] = 0; - else - der[counter++] = 0xFF; - } - else - counter += 2; - } - move = RIGHT; - break; - case ASN1_ETYPE_INTEGER: - case ASN1_ETYPE_ENUMERATED: - if ((p->type & CONST_DEFAULT) && (p->value == NULL)) - { - counter = counter_old; - max_len = max_len_old; - } - else - { - if (p->value == NULL) - { - _asn1_error_description_value_not_found (p, - ErrorDescription); - err = ASN1_VALUE_NOT_FOUND; - goto error; - } - len2 = asn1_get_length_der (p->value, p->value_len, &len3); - if (len2 < 0) - { - err = ASN1_DER_ERROR; - goto error; - } - max_len -= len2 + len3; - if (max_len >= 0) - memcpy (der + counter, p->value, len3 + len2); - counter += len3 + len2; - } - move = RIGHT; - break; - case ASN1_ETYPE_OBJECT_ID: - if ((p->type & CONST_DEFAULT) && (p->value == NULL)) - { - counter = counter_old; - max_len = max_len_old; - } - else - { - if (p->value == NULL) - { - _asn1_error_description_value_not_found (p, - ErrorDescription); - err = ASN1_VALUE_NOT_FOUND; - goto error; - } - len2 = max_len; - err = _asn1_objectid_der (p->value, der + counter, &len2); - if (err != ASN1_SUCCESS && err != ASN1_MEM_ERROR) - goto error; - - max_len -= len2; - counter += len2; - } - move = RIGHT; - break; - case ASN1_ETYPE_GENERALIZED_TIME: - case ASN1_ETYPE_UTC_TIME: - if (p->value == NULL) - { - _asn1_error_description_value_not_found (p, ErrorDescription); - err = ASN1_VALUE_NOT_FOUND; - goto error; - } - len2 = max_len; - err = _asn1_time_der (p->value, p->value_len, der + counter, &len2); - if (err != ASN1_SUCCESS && err != ASN1_MEM_ERROR) - goto error; - - max_len -= len2; - counter += len2; - move = RIGHT; - break; - case ASN1_ETYPE_OCTET_STRING: - case ASN1_ETYPE_GENERALSTRING: - case ASN1_ETYPE_NUMERIC_STRING: - case ASN1_ETYPE_IA5_STRING: - case ASN1_ETYPE_TELETEX_STRING: - case ASN1_ETYPE_PRINTABLE_STRING: - case ASN1_ETYPE_UNIVERSAL_STRING: - case ASN1_ETYPE_BMP_STRING: - case ASN1_ETYPE_UTF8_STRING: - case ASN1_ETYPE_VISIBLE_STRING: - case ASN1_ETYPE_BIT_STRING: - if (p->value == NULL) - { - _asn1_error_description_value_not_found (p, ErrorDescription); - err = ASN1_VALUE_NOT_FOUND; - goto error; - } - len2 = asn1_get_length_der (p->value, p->value_len, &len3); - if (len2 < 0) - { - err = ASN1_DER_ERROR; - goto error; - } - max_len -= len2 + len3; - if (max_len >= 0) - memcpy (der + counter, p->value, len3 + len2); - counter += len3 + len2; - move = RIGHT; - break; - case ASN1_ETYPE_SEQUENCE: - case ASN1_ETYPE_SET: - if (move != UP) - { - p->tmp_ival = counter; - if (p->down == NULL) - { - move = UP; - continue; - } - else - { - p2 = p->down; - while (p2 && (type_field (p2->type) == ASN1_ETYPE_TAG)) - p2 = p2->right; - if (p2) - { - p = p2; - move = RIGHT; - continue; - } - move = UP; - continue; - } - } - else - { /* move==UP */ - len2 = p->tmp_ival; - p->tmp_ival = 0; - if ((type_field (p->type) == ASN1_ETYPE_SET) && (max_len >= 0)) - { - err = _asn1_ordering_set (der + len2, counter - len2, p); - if (err != ASN1_SUCCESS) - goto error; - } - asn1_length_der (counter - len2, temp, &len3); - max_len -= len3; - if (max_len >= 0) - { - memmove (der + len2 + len3, der + len2, counter - len2); - memcpy (der + len2, temp, len3); - } - counter += len3; - move = RIGHT; - } - break; - case ASN1_ETYPE_SEQUENCE_OF: - case ASN1_ETYPE_SET_OF: - if (move != UP) - { - p->tmp_ival = counter; - p = p->down; - while ((type_field (p->type) == ASN1_ETYPE_TAG) - || (type_field (p->type) == ASN1_ETYPE_SIZE)) - p = p->right; - if (p->right) - { - p = p->right; - move = RIGHT; - continue; - } - else - p = _asn1_find_up (p); - move = UP; - } - if (move == UP) - { - len2 = p->tmp_ival; - p->tmp_ival = 0; - if ((type_field (p->type) == ASN1_ETYPE_SET_OF) - && (counter - len2 > 0) && (max_len >= 0)) - { - err = _asn1_ordering_set_of (der + len2, counter - len2, p); - if (err != ASN1_SUCCESS) - goto error; - } - asn1_length_der (counter - len2, temp, &len3); - max_len -= len3; - if (max_len >= 0) - { - memmove (der + len2 + len3, der + len2, counter - len2); - memcpy (der + len2, temp, len3); - } - counter += len3; - move = RIGHT; - } - break; - case ASN1_ETYPE_ANY: - if (p->value == NULL) - { - _asn1_error_description_value_not_found (p, ErrorDescription); - err = ASN1_VALUE_NOT_FOUND; - goto error; - } - len2 = asn1_get_length_der (p->value, p->value_len, &len3); - if (len2 < 0) - { - err = ASN1_DER_ERROR; - goto error; - } - max_len -= len2; - if (max_len >= 0) - memcpy (der + counter, p->value + len3, len2); - counter += len2; - move = RIGHT; - break; - default: - move = (move == UP) ? RIGHT : DOWN; - break; - } - - if ((move != DOWN) && (counter != counter_old)) - { - p->end = counter - 1; - err = _asn1_complete_explicit_tag (p, der, &counter, &max_len); - if (err != ASN1_SUCCESS && err != ASN1_MEM_ERROR) - goto error; - } - - if (p == node && move != DOWN) - break; - - if (move == DOWN) - { - if (p->down) - p = p->down; - else - move = RIGHT; - } - if (move == RIGHT) - { - if (p->right) - p = p->right; - else - move = UP; - } - if (move == UP) - p = _asn1_find_up (p); - } - - *len = counter; - - if (max_len < 0) - { - err = ASN1_MEM_ERROR; - goto error; - } - - err = ASN1_SUCCESS; - -error: - asn1_delete_structure (&node); - return err; -} diff --git a/lib/decoding.c b/lib/decoding.c deleted file mode 100644 index 05dc236..0000000 --- a/lib/decoding.c +++ /dev/null @@ -1,2376 +0,0 @@ -/* - * Copyright (C) 2002-2016 Free Software Foundation, Inc. - * - * This file is part of LIBTASN1. - * - * The LIBTASN1 library is free software; you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA - */ - - -/*****************************************************/ -/* File: decoding.c */ -/* Description: Functions to manage DER decoding */ -/*****************************************************/ - -#include -#include -#include -#include -#include -#include -#include - -#ifdef DEBUG -# define warn() fprintf(stderr, "%s: %d\n", __func__, __LINE__) -#else -# define warn() -#endif - -#define IS_ERR(len, flags) (len < -1 || ((flags & ASN1_DECODE_FLAG_STRICT_DER) && len < 0)) - -#define HAVE_TWO(x) (x>=2?1:0) - -/* Decoding flags (dflags) used in several decoding functions. - * DECODE_FLAG_HAVE_TAG: The provided buffer includes a tag - * DECODE_FLAG_INDEFINITE: The provided buffer is of indefinite encoding (useful - * when no tags are present). - * DECODE_FLAG_LEVEL1: Internal flag to indicate a level of recursion for BER strings. - * DECODE_FLAG_LEVEL2: Internal flag to indicate two levels of recursion for BER strings. - * DECODE_FLAG_LEVEL3: Internal flag to indicate three levels of recursion for BER strings. - * This is the maximum levels of recursion possible to prevent stack - * exhaustion. - */ - -#define DECODE_FLAG_HAVE_TAG 1 -#define DECODE_FLAG_INDEFINITE (1<<1) -#define DECODE_FLAG_LEVEL1 (1<<2) -#define DECODE_FLAG_LEVEL2 (1<<3) -#define DECODE_FLAG_LEVEL3 (1<<4) - -#define DECR_LEN(l, s) do { \ - l -= s; \ - if (l < 0) { \ - warn(); \ - result = ASN1_DER_ERROR; \ - goto cleanup; \ - } \ - } while (0) - -static int -_asn1_get_indefinite_length_string (const unsigned char *der, int der_len, int *len); - -static int -_asn1_decode_simple_ber (unsigned int etype, const unsigned char *der, - unsigned int _der_len, unsigned char **str, - unsigned int *str_len, unsigned int *ber_len, - unsigned dflags); - -static int -_asn1_decode_simple_der (unsigned int etype, const unsigned char *der, - unsigned int _der_len, const unsigned char **str, - unsigned int *str_len, unsigned dflags); - -static void -_asn1_error_description_tag_error (asn1_node node, char *ErrorDescription) -{ - - Estrcpy (ErrorDescription, ":: tag error near element '"); - _asn1_hierarchical_name (node, ErrorDescription + strlen (ErrorDescription), - ASN1_MAX_ERROR_DESCRIPTION_SIZE - 40); - Estrcat (ErrorDescription, "'"); - -} - -/** - * asn1_get_length_der: - * @der: DER data to decode. - * @der_len: Length of DER data to decode. - * @len: Output variable containing the length of the DER length field. - * - * Extract a length field from DER data. - * - * Returns: Return the decoded length value, or -1 on indefinite - * length, or -2 when the value was too big to fit in a int, or -4 - * when the decoded length value plus @len would exceed @der_len. - **/ -long -asn1_get_length_der (const unsigned char *der, int der_len, int *len) -{ - unsigned int ans; - int k, punt, sum; - - *len = 0; - if (der_len <= 0) - return 0; - - if (!(der[0] & 128)) - { - /* short form */ - *len = 1; - ans = der[0]; - } - else - { - /* Long form */ - k = der[0] & 0x7F; - punt = 1; - if (k) - { /* definite length method */ - ans = 0; - while (punt <= k && punt < der_len) - { - if (INT_MULTIPLY_OVERFLOW (ans, 256)) - return -2; - ans *= 256; - - if (INT_ADD_OVERFLOW (ans, ((unsigned) der[punt]))) - return -2; - ans += der[punt]; - punt++; - } - } - else - { /* indefinite length method */ - *len = punt; - return -1; - } - - *len = punt; - } - - sum = ans; - if (ans >= INT_MAX || INT_ADD_OVERFLOW (sum, (*len))) - return -2; - sum += *len; - - if (sum > der_len) - return -4; - - return ans; -} - -/** - * asn1_get_tag_der: - * @der: DER data to decode. - * @der_len: Length of DER data to decode. - * @cls: Output variable containing decoded class. - * @len: Output variable containing the length of the DER TAG data. - * @tag: Output variable containing the decoded tag (may be %NULL). - * - * Decode the class and TAG from DER code. - * - * Returns: Returns %ASN1_SUCCESS on success, or an error. - **/ -int -asn1_get_tag_der (const unsigned char *der, int der_len, - unsigned char *cls, int *len, unsigned long *tag) -{ - unsigned int ris; - int punt; - - if (der == NULL || der_len < 2 || len == NULL) - return ASN1_DER_ERROR; - - *cls = der[0] & 0xE0; - if ((der[0] & 0x1F) != 0x1F) - { - /* short form */ - *len = 1; - ris = der[0] & 0x1F; - } - else - { - /* Long form */ - punt = 1; - ris = 0; - while (punt < der_len && der[punt] & 128) - { - - if (INT_MULTIPLY_OVERFLOW (ris, 128)) - return ASN1_DER_ERROR; - ris *= 128; - - if (INT_ADD_OVERFLOW (ris, ((unsigned) (der[punt] & 0x7F)))) - return ASN1_DER_ERROR; - ris += (der[punt] & 0x7F); - punt++; - } - - if (punt >= der_len) - return ASN1_DER_ERROR; - - if (INT_MULTIPLY_OVERFLOW (ris, 128)) - return ASN1_DER_ERROR; - ris *= 128; - - if (INT_ADD_OVERFLOW (ris, ((unsigned) (der[punt] & 0x7F)))) - return ASN1_DER_ERROR; - ris += (der[punt] & 0x7F); - punt++; - - *len = punt; - } - - if (tag) - *tag = ris; - return ASN1_SUCCESS; -} - -/** - * asn1_get_length_ber: - * @ber: BER data to decode. - * @ber_len: Length of BER data to decode. - * @len: Output variable containing the length of the BER length field. - * - * Extract a length field from BER data. The difference to - * asn1_get_length_der() is that this function will return a length - * even if the value has indefinite encoding. - * - * Returns: Return the decoded length value, or negative value when - * the value was too big. - * - * Since: 2.0 - **/ -long -asn1_get_length_ber (const unsigned char *ber, int ber_len, int *len) -{ - int ret; - long err; - - ret = asn1_get_length_der (ber, ber_len, len); - if (ret == -1 && ber_len > 1) - { /* indefinite length method */ - err = _asn1_get_indefinite_length_string (ber + 1, ber_len-1, &ret); - if (err != ASN1_SUCCESS) - return -3; - } - - return ret; -} - -/** - * asn1_get_octet_der: - * @der: DER data to decode containing the OCTET SEQUENCE. - * @der_len: The length of the @der data to decode. - * @ret_len: Output variable containing the encoded length of the DER data. - * @str: Pre-allocated output buffer to put decoded OCTET SEQUENCE in. - * @str_size: Length of pre-allocated output buffer. - * @str_len: Output variable containing the length of the contents of the OCTET SEQUENCE. - * - * Extract an OCTET SEQUENCE from DER data. Note that this function - * expects the DER data past the tag field, i.e., the length and - * content octets. - * - * Returns: Returns %ASN1_SUCCESS on success, or an error. - **/ -int -asn1_get_octet_der (const unsigned char *der, int der_len, - int *ret_len, unsigned char *str, int str_size, - int *str_len) -{ - int len_len = 0; - - if (der_len <= 0) - return ASN1_GENERIC_ERROR; - - *str_len = asn1_get_length_der (der, der_len, &len_len); - - if (*str_len < 0) - return ASN1_DER_ERROR; - - *ret_len = *str_len + len_len; - if (str_size >= *str_len) - { - if (*str_len > 0 && str != NULL) - memcpy (str, der + len_len, *str_len); - } - else - { - return ASN1_MEM_ERROR; - } - - return ASN1_SUCCESS; -} - - -/*- - * _asn1_get_time_der: - * @type: %ASN1_ETYPE_GENERALIZED_TIME or %ASN1_ETYPE_UTC_TIME - * @der: DER data to decode containing the time - * @der_len: Length of DER data to decode. - * @ret_len: Output variable containing the length of the DER data. - * @str: Pre-allocated output buffer to put the textual time in. - * @str_size: Length of pre-allocated output buffer. - * @flags: Zero or %ASN1_DECODE_FLAG_STRICT_DER - * - * Performs basic checks in the DER encoded time object and returns its textual form. - * The textual form will be in the YYYYMMDD000000Z format for GeneralizedTime - * and YYMMDD000000Z for UTCTime. - * - * Returns: %ASN1_SUCCESS on success, or an error. - -*/ -static int -_asn1_get_time_der (unsigned type, const unsigned char *der, int der_len, int *ret_len, - char *str, int str_size, unsigned flags) -{ - int len_len, str_len; - unsigned i; - unsigned sign_count = 0; - unsigned dot_count = 0; - const unsigned char *p; - - if (der_len <= 0 || str == NULL) - return ASN1_DER_ERROR; - - str_len = asn1_get_length_der (der, der_len, &len_len); - if (str_len <= 0 || str_size < str_len) - return ASN1_DER_ERROR; - - /* perform some sanity checks on the data */ - if (str_len < 8) - { - warn(); - return ASN1_TIME_ENCODING_ERROR; - } - - if ((flags & ASN1_DECODE_FLAG_STRICT_DER) && !(flags & ASN1_DECODE_FLAG_ALLOW_INCORRECT_TIME)) - { - p = &der[len_len]; - for (i=0;i<(unsigned)(str_len-1);i++) - { - if (isdigit(p[i]) == 0) - { - if (type == ASN1_ETYPE_GENERALIZED_TIME) - { - /* tolerate lax encodings */ - if (p[i] == '.' && dot_count == 0) - { - dot_count++; - continue; - } - - /* This is not really valid DER, but there are - * structures using that */ - if (!(flags & ASN1_DECODE_FLAG_STRICT_DER) && - (p[i] == '+' || p[i] == '-') && sign_count == 0) - { - sign_count++; - continue; - } - } - - warn(); - return ASN1_TIME_ENCODING_ERROR; - } - } - - if (sign_count == 0 && p[str_len-1] != 'Z') - { - warn(); - return ASN1_TIME_ENCODING_ERROR; - } - } - memcpy (str, der + len_len, str_len); - str[str_len] = 0; - *ret_len = str_len + len_len; - - return ASN1_SUCCESS; -} - -/** - * asn1_get_objectid_der: - * @der: DER data to decode containing the OBJECT IDENTIFIER - * @der_len: Length of DER data to decode. - * @ret_len: Output variable containing the length of the DER data. - * @str: Pre-allocated output buffer to put the textual object id in. - * @str_size: Length of pre-allocated output buffer. - * - * Converts a DER encoded object identifier to its textual form. This - * function expects the DER object identifier without the tag. - * - * Returns: %ASN1_SUCCESS on success, or an error. - **/ -int -asn1_get_object_id_der (const unsigned char *der, int der_len, int *ret_len, - char *str, int str_size) -{ - int len_len, len, k; - int leading; - char temp[LTOSTR_MAX_SIZE]; - uint64_t val, val1; - - *ret_len = 0; - if (str && str_size > 0) - str[0] = 0; /* no oid */ - - if (str == NULL || der_len <= 0) - return ASN1_GENERIC_ERROR; - - len = asn1_get_length_der (der, der_len, &len_len); - - if (len <= 0 || len + len_len > der_len) - return ASN1_DER_ERROR; - - val1 = der[len_len] / 40; - val = der[len_len] - val1 * 40; - - _asn1_str_cpy (str, str_size, _asn1_ltostr (val1, temp)); - _asn1_str_cat (str, str_size, "."); - _asn1_str_cat (str, str_size, _asn1_ltostr (val, temp)); - - val = 0; - leading = 1; - for (k = 1; k < len; k++) - { - /* X.690 mandates that the leading byte must never be 0x80 - */ - if (leading != 0 && der[len_len + k] == 0x80) - return ASN1_DER_ERROR; - leading = 0; - - /* check for wrap around */ - if (INT_LEFT_SHIFT_OVERFLOW (val, 7)) - return ASN1_DER_ERROR; - - val = val << 7; - val |= der[len_len + k] & 0x7F; - - if (!(der[len_len + k] & 0x80)) - { - _asn1_str_cat (str, str_size, "."); - _asn1_str_cat (str, str_size, _asn1_ltostr (val, temp)); - val = 0; - leading = 1; - } - } - - if (INT_ADD_OVERFLOW (len, len_len)) - return ASN1_DER_ERROR; - - *ret_len = len + len_len; - - return ASN1_SUCCESS; -} - -/** - * asn1_get_bit_der: - * @der: DER data to decode containing the BIT SEQUENCE. - * @der_len: Length of DER data to decode. - * @ret_len: Output variable containing the length of the DER data. - * @str: Pre-allocated output buffer to put decoded BIT SEQUENCE in. - * @str_size: Length of pre-allocated output buffer. - * @bit_len: Output variable containing the size of the BIT SEQUENCE. - * - * Extract a BIT SEQUENCE from DER data. - * - * Returns: %ASN1_SUCCESS on success, or an error. - **/ -int -asn1_get_bit_der (const unsigned char *der, int der_len, - int *ret_len, unsigned char *str, int str_size, - int *bit_len) -{ - int len_len = 0, len_byte; - - if (der_len <= 0) - return ASN1_GENERIC_ERROR; - - len_byte = asn1_get_length_der (der, der_len, &len_len) - 1; - if (len_byte < 0) - return ASN1_DER_ERROR; - - *ret_len = len_byte + len_len + 1; - *bit_len = len_byte * 8 - der[len_len]; - - if (*bit_len < 0) - return ASN1_DER_ERROR; - - if (str_size >= len_byte) - { - if (len_byte > 0 && str) - memcpy (str, der + len_len + 1, len_byte); - } - else - { - return ASN1_MEM_ERROR; - } - - return ASN1_SUCCESS; -} - -/* tag_len: the total tag length (explicit+inner) - * inner_tag_len: the inner_tag length - */ -static int -_asn1_extract_tag_der (asn1_node node, const unsigned char *der, int der_len, - int *tag_len, int *inner_tag_len, unsigned flags) -{ - asn1_node p; - int counter, len2, len3, is_tag_implicit; - int result; - unsigned long tag, tag_implicit = 0; - unsigned char class, class2, class_implicit = 0; - - if (der_len <= 0) - return ASN1_GENERIC_ERROR; - - counter = is_tag_implicit = 0; - - if (node->type & CONST_TAG) - { - p = node->down; - while (p) - { - if (type_field (p->type) == ASN1_ETYPE_TAG) - { - if (p->type & CONST_APPLICATION) - class2 = ASN1_CLASS_APPLICATION; - else if (p->type & CONST_UNIVERSAL) - class2 = ASN1_CLASS_UNIVERSAL; - else if (p->type & CONST_PRIVATE) - class2 = ASN1_CLASS_PRIVATE; - else - class2 = ASN1_CLASS_CONTEXT_SPECIFIC; - - if (p->type & CONST_EXPLICIT) - { - if (asn1_get_tag_der - (der + counter, der_len, &class, &len2, - &tag) != ASN1_SUCCESS) - return ASN1_DER_ERROR; - - DECR_LEN(der_len, len2); - counter += len2; - - if (flags & ASN1_DECODE_FLAG_STRICT_DER) - len3 = - asn1_get_length_der (der + counter, der_len, - &len2); - else - len3 = - asn1_get_length_ber (der + counter, der_len, - &len2); - if (len3 < 0) - return ASN1_DER_ERROR; - - DECR_LEN(der_len, len2); - counter += len2; - - if (!is_tag_implicit) - { - if ((class != (class2 | ASN1_CLASS_STRUCTURED)) || - (tag != strtoul ((char *) p->value, NULL, 10))) - return ASN1_TAG_ERROR; - } - else - { /* ASN1_TAG_IMPLICIT */ - if ((class != class_implicit) || (tag != tag_implicit)) - return ASN1_TAG_ERROR; - } - is_tag_implicit = 0; - } - else - { /* ASN1_TAG_IMPLICIT */ - if (!is_tag_implicit) - { - if ((type_field (node->type) == ASN1_ETYPE_SEQUENCE) || - (type_field (node->type) == ASN1_ETYPE_SEQUENCE_OF) - || (type_field (node->type) == ASN1_ETYPE_SET) - || (type_field (node->type) == ASN1_ETYPE_SET_OF)) - class2 |= ASN1_CLASS_STRUCTURED; - class_implicit = class2; - tag_implicit = strtoul ((char *) p->value, NULL, 10); - is_tag_implicit = 1; - } - } - } - p = p->right; - } - } - - if (is_tag_implicit) - { - if (asn1_get_tag_der - (der + counter, der_len, &class, &len2, - &tag) != ASN1_SUCCESS) - return ASN1_DER_ERROR; - - DECR_LEN(der_len, len2); - - if ((class != class_implicit) || (tag != tag_implicit)) - { - if (type_field (node->type) == ASN1_ETYPE_OCTET_STRING) - { - class_implicit |= ASN1_CLASS_STRUCTURED; - if ((class != class_implicit) || (tag != tag_implicit)) - return ASN1_TAG_ERROR; - } - else - return ASN1_TAG_ERROR; - } - } - else - { - unsigned type = type_field (node->type); - if (type == ASN1_ETYPE_TAG) - { - *tag_len = 0; - if (inner_tag_len) - *inner_tag_len = 0; - return ASN1_SUCCESS; - } - - if (asn1_get_tag_der - (der + counter, der_len, &class, &len2, - &tag) != ASN1_SUCCESS) - return ASN1_DER_ERROR; - - DECR_LEN(der_len, len2); - - switch (type) - { - case ASN1_ETYPE_NULL: - case ASN1_ETYPE_BOOLEAN: - case ASN1_ETYPE_INTEGER: - case ASN1_ETYPE_ENUMERATED: - case ASN1_ETYPE_OBJECT_ID: - case ASN1_ETYPE_GENERALSTRING: - case ASN1_ETYPE_NUMERIC_STRING: - case ASN1_ETYPE_IA5_STRING: - case ASN1_ETYPE_TELETEX_STRING: - case ASN1_ETYPE_PRINTABLE_STRING: - case ASN1_ETYPE_UNIVERSAL_STRING: - case ASN1_ETYPE_BMP_STRING: - case ASN1_ETYPE_UTF8_STRING: - case ASN1_ETYPE_VISIBLE_STRING: - case ASN1_ETYPE_BIT_STRING: - case ASN1_ETYPE_SEQUENCE: - case ASN1_ETYPE_SEQUENCE_OF: - case ASN1_ETYPE_SET: - case ASN1_ETYPE_SET_OF: - case ASN1_ETYPE_GENERALIZED_TIME: - case ASN1_ETYPE_UTC_TIME: - if ((class != _asn1_tags[type].class) - || (tag != _asn1_tags[type].tag)) - return ASN1_DER_ERROR; - break; - - case ASN1_ETYPE_OCTET_STRING: - /* OCTET STRING is handled differently to allow - * BER encodings (structured class). */ - if (((class != ASN1_CLASS_UNIVERSAL) - && (class != (ASN1_CLASS_UNIVERSAL | ASN1_CLASS_STRUCTURED))) - || (tag != ASN1_TAG_OCTET_STRING)) - return ASN1_DER_ERROR; - break; - case ASN1_ETYPE_ANY: - counter -= len2; - break; - case ASN1_ETYPE_CHOICE: - counter -= len2; - break; - default: - return ASN1_DER_ERROR; - break; - } - } - - counter += len2; - *tag_len = counter; - if (inner_tag_len) - *inner_tag_len = len2; - return ASN1_SUCCESS; - -cleanup: - return result; -} - -static int -extract_tag_der_recursive(asn1_node node, const unsigned char *der, int der_len, - int *ret_len, int *inner_len, unsigned flags) -{ -asn1_node p; -int ris = ASN1_DER_ERROR; - - if (type_field (node->type) == ASN1_ETYPE_CHOICE) - { - p = node->down; - while (p) - { - ris = _asn1_extract_tag_der (p, der, der_len, ret_len, inner_len, flags); - if (ris == ASN1_SUCCESS) - break; - p = p->right; - } - - *ret_len = 0; - return ris; - } - else - return _asn1_extract_tag_der (node, der, der_len, ret_len, inner_len, flags); -} - -static int -_asn1_delete_not_used (asn1_node node) -{ - asn1_node p, p2; - - if (node == NULL) - return ASN1_ELEMENT_NOT_FOUND; - - p = node; - while (p) - { - if (p->type & CONST_NOT_USED) - { - p2 = NULL; - if (p != node) - { - p2 = _asn1_find_left (p); - if (!p2) - p2 = _asn1_find_up (p); - } - asn1_delete_structure (&p); - p = p2; - } - - if (!p) - break; /* reach node */ - - if (p->down) - { - p = p->down; - } - else - { - if (p == node) - p = NULL; - else if (p->right) - p = p->right; - else - { - while (1) - { - p = _asn1_find_up (p); - if (p == node) - { - p = NULL; - break; - } - if (p->right) - { - p = p->right; - break; - } - } - } - } - } - return ASN1_SUCCESS; -} - -static int -_asn1_get_indefinite_length_string (const unsigned char *der, - int der_len, int *len) -{ - int len2, len3, counter, indefinite; - int result; - unsigned long tag; - unsigned char class; - - counter = indefinite = 0; - - while (1) - { - if (HAVE_TWO(der_len) && (der[counter] == 0) && (der[counter + 1] == 0)) - { - counter += 2; - DECR_LEN(der_len, 2); - - indefinite--; - if (indefinite <= 0) - break; - else - continue; - } - - if (asn1_get_tag_der - (der + counter, der_len, &class, &len2, - &tag) != ASN1_SUCCESS) - return ASN1_DER_ERROR; - - DECR_LEN(der_len, len2); - counter += len2; - - len2 = asn1_get_length_der (der + counter, der_len, &len3); - if (len2 < -1) - return ASN1_DER_ERROR; - - if (len2 == -1) - { - indefinite++; - counter += 1; - DECR_LEN(der_len, 1); - } - else - { - counter += len2 + len3; - DECR_LEN(der_len, len2+len3); - } - } - - *len = counter; - return ASN1_SUCCESS; - -cleanup: - return result; -} - -static void delete_unneeded_choice_fields(asn1_node p) -{ - asn1_node p2; - - while (p->right) - { - p2 = p->right; - asn1_delete_structure (&p2); - } -} - - -/** - * asn1_der_decoding2 - * @element: pointer to an ASN1 structure. - * @ider: vector that contains the DER encoding. - * @max_ider_len: pointer to an integer giving the information about the - * maximal number of bytes occupied by *@ider. The real size of the DER - * encoding is returned through this pointer. - * @flags: flags controlling the behaviour of the function. - * @errorDescription: null-terminated string contains details when an - * error occurred. - * - * Fill the structure *@element with values of a DER encoding string. The - * structure must just be created with function asn1_create_element(). - * - * If %ASN1_DECODE_FLAG_ALLOW_PADDING flag is set then the function will ignore - * padding after the decoded DER data. Upon a successful return the value of - * *@max_ider_len will be set to the number of bytes decoded. - * - * If %ASN1_DECODE_FLAG_STRICT_DER flag is set then the function will - * not decode any BER-encoded elements. - * - * Returns: %ASN1_SUCCESS if DER encoding OK, %ASN1_ELEMENT_NOT_FOUND - * if @ELEMENT is %NULL, and %ASN1_TAG_ERROR or - * %ASN1_DER_ERROR if the der encoding doesn't match the structure - * name (*@ELEMENT deleted). - **/ -int -asn1_der_decoding2 (asn1_node *element, const void *ider, int *max_ider_len, - unsigned int flags, char *errorDescription) -{ - asn1_node node, p, p2, p3; - char temp[128]; - int counter, len2, len3, len4, move, ris, tlen; - struct node_tail_cache_st tcache = {NULL, NULL}; - unsigned char class; - unsigned long tag; - int tag_len; - int indefinite, result, total_len = *max_ider_len, ider_len = *max_ider_len; - int inner_tag_len; - unsigned char *ptmp; - const unsigned char *ptag; - const unsigned char *der = ider; - - node = *element; - - if (errorDescription != NULL) - errorDescription[0] = 0; - - if (node == NULL) - return ASN1_ELEMENT_NOT_FOUND; - - if (node->type & CONST_OPTION) - { - result = ASN1_GENERIC_ERROR; - warn(); - goto cleanup; - } - - counter = 0; - move = DOWN; - p = node; - while (1) - { - tag_len = 0; - inner_tag_len = 0; - ris = ASN1_SUCCESS; - if (move != UP) - { - if (p->type & CONST_SET) - { - p2 = _asn1_find_up (p); - len2 = p2->tmp_ival; - if (len2 == -1) - { - if (HAVE_TWO(ider_len) && !der[counter] && !der[counter + 1]) - { - p = p2; - move = UP; - counter += 2; - DECR_LEN(ider_len, 2); - continue; - } - } - else if (counter == len2) - { - p = p2; - move = UP; - continue; - } - else if (counter > len2) - { - result = ASN1_DER_ERROR; - warn(); - goto cleanup; - } - p2 = p2->down; - while (p2) - { - if ((p2->type & CONST_SET) && (p2->type & CONST_NOT_USED)) - { - ris = - extract_tag_der_recursive (p2, der + counter, - ider_len, &len2, NULL, flags); - if (ris == ASN1_SUCCESS) - { - p2->type &= ~CONST_NOT_USED; - p = p2; - break; - } - } - p2 = p2->right; - } - if (p2 == NULL) - { - result = ASN1_DER_ERROR; - warn(); - goto cleanup; - } - } - - /* the position in the DER structure this starts */ - p->start = counter; - p->end = total_len - 1; - - if ((p->type & CONST_OPTION) || (p->type & CONST_DEFAULT)) - { - p2 = _asn1_find_up (p); - len2 = p2->tmp_ival; - if (counter == len2) - { - if (p->right) - { - p2 = p->right; - move = RIGHT; - } - else - move = UP; - - if (p->type & CONST_OPTION) - asn1_delete_structure (&p); - - p = p2; - continue; - } - } - - if (type_field (p->type) == ASN1_ETYPE_CHOICE) - { - while (p->down) - { - ris = - extract_tag_der_recursive (p->down, der + counter, - ider_len, &len2, NULL, flags); - - if (ris == ASN1_SUCCESS) - { - delete_unneeded_choice_fields(p->down); - break; - } - else if (ris == ASN1_ERROR_TYPE_ANY) - { - result = ASN1_ERROR_TYPE_ANY; - warn(); - goto cleanup; - } - else - { - p2 = p->down; - asn1_delete_structure (&p2); - } - } - - if (p->down == NULL) - { - if (!(p->type & CONST_OPTION)) - { - result = ASN1_DER_ERROR; - warn(); - goto cleanup; - } - } - else if (type_field (p->type) != ASN1_ETYPE_CHOICE) - p = p->down; - - p->start = counter; - } - - if ((p->type & CONST_OPTION) || (p->type & CONST_DEFAULT)) - { - p2 = _asn1_find_up (p); - len2 = p2->tmp_ival; - - if ((len2 != -1) && (counter > len2)) - ris = ASN1_TAG_ERROR; - } - - if (ris == ASN1_SUCCESS) - ris = - extract_tag_der_recursive (p, der + counter, ider_len, - &tag_len, &inner_tag_len, flags); - - if (ris != ASN1_SUCCESS) - { - if (p->type & CONST_OPTION) - { - p->type |= CONST_NOT_USED; - move = RIGHT; - } - else if (p->type & CONST_DEFAULT) - { - _asn1_set_value (p, NULL, 0); - move = RIGHT; - } - else - { - if (errorDescription != NULL) - _asn1_error_description_tag_error (p, errorDescription); - - result = ASN1_TAG_ERROR; - warn(); - goto cleanup; - } - } - else - { - DECR_LEN(ider_len, tag_len); - counter += tag_len; - } - } - - if (ris == ASN1_SUCCESS) - { - switch (type_field (p->type)) - { - case ASN1_ETYPE_NULL: - DECR_LEN(ider_len, 1); - if (der[counter]) - { - result = ASN1_DER_ERROR; - warn(); - goto cleanup; - } - counter++; - move = RIGHT; - break; - case ASN1_ETYPE_BOOLEAN: - DECR_LEN(ider_len, 2); - - if (der[counter++] != 1) - { - result = ASN1_DER_ERROR; - warn(); - goto cleanup; - } - if (der[counter++] == 0) - _asn1_set_value (p, "F", 1); - else - _asn1_set_value (p, "T", 1); - move = RIGHT; - break; - case ASN1_ETYPE_INTEGER: - case ASN1_ETYPE_ENUMERATED: - len2 = - asn1_get_length_der (der + counter, ider_len, &len3); - if (len2 < 0) - { - result = ASN1_DER_ERROR; - warn(); - goto cleanup; - } - - DECR_LEN(ider_len, len3+len2); - - _asn1_set_value (p, der + counter, len3 + len2); - counter += len3 + len2; - move = RIGHT; - break; - case ASN1_ETYPE_OBJECT_ID: - result = - asn1_get_object_id_der (der + counter, ider_len, &len2, - temp, sizeof (temp)); - if (result != ASN1_SUCCESS) - { - warn(); - goto cleanup; - } - - DECR_LEN(ider_len, len2); - - tlen = strlen (temp); - if (tlen > 0) - _asn1_set_value (p, temp, tlen + 1); - - counter += len2; - move = RIGHT; - break; - case ASN1_ETYPE_GENERALIZED_TIME: - case ASN1_ETYPE_UTC_TIME: - result = - _asn1_get_time_der (type_field (p->type), der + counter, ider_len, &len2, temp, - sizeof (temp) - 1, flags); - if (result != ASN1_SUCCESS) - { - warn(); - goto cleanup; - } - - DECR_LEN(ider_len, len2); - - tlen = strlen (temp); - if (tlen > 0) - _asn1_set_value (p, temp, tlen); - - counter += len2; - move = RIGHT; - break; - case ASN1_ETYPE_OCTET_STRING: - if (counter < inner_tag_len) - { - result = ASN1_DER_ERROR; - warn(); - goto cleanup; - } - - ptag = der + counter - inner_tag_len; - if (flags & ASN1_DECODE_FLAG_STRICT_DER || !(ptag[0] & ASN1_CLASS_STRUCTURED)) - { - len2 = - asn1_get_length_der (der + counter, ider_len, &len3); - if (len2 < 0) - { - result = ASN1_DER_ERROR; - warn(); - goto cleanup; - } - - DECR_LEN(ider_len, len3+len2); - - _asn1_set_value (p, der + counter, len3 + len2); - counter += len3 + len2; - } - else - { - unsigned dflags = 0, vlen, ber_len; - - if (ptag[0] & ASN1_CLASS_STRUCTURED) - dflags |= DECODE_FLAG_INDEFINITE; - - result = _asn1_decode_simple_ber(type_field (p->type), der+counter, ider_len, &ptmp, &vlen, &ber_len, dflags); - if (result != ASN1_SUCCESS) - { - warn(); - goto cleanup; - } - - DECR_LEN(ider_len, ber_len); - - _asn1_set_value_lv (p, ptmp, vlen); - - counter += ber_len; - free(ptmp); - } - move = RIGHT; - break; - case ASN1_ETYPE_GENERALSTRING: - case ASN1_ETYPE_NUMERIC_STRING: - case ASN1_ETYPE_IA5_STRING: - case ASN1_ETYPE_TELETEX_STRING: - case ASN1_ETYPE_PRINTABLE_STRING: - case ASN1_ETYPE_UNIVERSAL_STRING: - case ASN1_ETYPE_BMP_STRING: - case ASN1_ETYPE_UTF8_STRING: - case ASN1_ETYPE_VISIBLE_STRING: - case ASN1_ETYPE_BIT_STRING: - len2 = - asn1_get_length_der (der + counter, ider_len, &len3); - if (len2 < 0) - { - result = ASN1_DER_ERROR; - warn(); - goto cleanup; - } - - DECR_LEN(ider_len, len3+len2); - - _asn1_set_value (p, der + counter, len3 + len2); - counter += len3 + len2; - move = RIGHT; - break; - case ASN1_ETYPE_SEQUENCE: - case ASN1_ETYPE_SET: - if (move == UP) - { - len2 = p->tmp_ival; - p->tmp_ival = 0; - if (len2 == -1) - { /* indefinite length method */ - DECR_LEN(ider_len, 2); - if ((der[counter]) || der[counter + 1]) - { - result = ASN1_DER_ERROR; - warn(); - goto cleanup; - } - counter += 2; - } - else - { /* definite length method */ - if (len2 != counter) - { - result = ASN1_DER_ERROR; - warn(); - goto cleanup; - } - } - move = RIGHT; - } - else - { /* move==DOWN || move==RIGHT */ - len3 = - asn1_get_length_der (der + counter, ider_len, &len2); - if (IS_ERR(len3, flags)) - { - result = ASN1_DER_ERROR; - warn(); - goto cleanup; - } - - DECR_LEN(ider_len, len2); - counter += len2; - - if (len3 > 0) - { - p->tmp_ival = counter + len3; - move = DOWN; - } - else if (len3 == 0) - { - p2 = p->down; - while (p2) - { - if (type_field (p2->type) != ASN1_ETYPE_TAG) - { - p3 = p2->right; - asn1_delete_structure (&p2); - p2 = p3; - } - else - p2 = p2->right; - } - move = RIGHT; - } - else - { /* indefinite length method */ - p->tmp_ival = -1; - move = DOWN; - } - } - break; - case ASN1_ETYPE_SEQUENCE_OF: - case ASN1_ETYPE_SET_OF: - if (move == UP) - { - len2 = p->tmp_ival; - if (len2 == -1) - { /* indefinite length method */ - if (!HAVE_TWO(ider_len) || ((der[counter]) || der[counter + 1])) - { - result = _asn1_append_sequence_set (p, &tcache); - if (result != 0) - { - warn(); - goto cleanup; - } - p = tcache.tail; - move = RIGHT; - continue; - } - - p->tmp_ival = 0; - tcache.tail = NULL; /* finished decoding this structure */ - tcache.head = NULL; - DECR_LEN(ider_len, 2); - counter += 2; - } - else - { /* definite length method */ - if (len2 > counter) - { - result = _asn1_append_sequence_set (p, &tcache); - if (result != 0) - { - warn(); - goto cleanup; - } - p = tcache.tail; - move = RIGHT; - continue; - } - - p->tmp_ival = 0; - tcache.tail = NULL; /* finished decoding this structure */ - tcache.head = NULL; - - if (len2 != counter) - { - result = ASN1_DER_ERROR; - warn(); - goto cleanup; - } - } - } - else - { /* move==DOWN || move==RIGHT */ - len3 = - asn1_get_length_der (der + counter, ider_len, &len2); - if (IS_ERR(len3, flags)) - { - result = ASN1_DER_ERROR; - warn(); - goto cleanup; - } - - DECR_LEN(ider_len, len2); - counter += len2; - if (len3) - { - if (len3 > 0) - { /* definite length method */ - p->tmp_ival = counter + len3; - } - else - { /* indefinite length method */ - p->tmp_ival = -1; - } - - p2 = p->down; - if (p2 == NULL) - { - result = ASN1_DER_ERROR; - warn(); - goto cleanup; - } - - while ((type_field (p2->type) == ASN1_ETYPE_TAG) - || (type_field (p2->type) == ASN1_ETYPE_SIZE)) - p2 = p2->right; - if (p2->right == NULL) - { - result = _asn1_append_sequence_set (p, &tcache); - if (result != 0) - { - warn(); - goto cleanup; - } - } - p = p2; - } - } - move = RIGHT; - break; - case ASN1_ETYPE_ANY: - /* Check indefinite lenth method in an EXPLICIT TAG */ - - if (!(flags & ASN1_DECODE_FLAG_STRICT_DER) && (p->type & CONST_TAG) && - tag_len == 2 && (der[counter - 1] == 0x80)) - indefinite = 1; - else - indefinite = 0; - - if (asn1_get_tag_der - (der + counter, ider_len, &class, &len2, - &tag) != ASN1_SUCCESS) - { - result = ASN1_DER_ERROR; - warn(); - goto cleanup; - } - - DECR_LEN(ider_len, len2); - - len4 = - asn1_get_length_der (der + counter + len2, - ider_len, &len3); - if (IS_ERR(len4, flags)) - { - result = ASN1_DER_ERROR; - warn(); - goto cleanup; - } - if (len4 != -1) /* definite */ - { - len2 += len4; - - DECR_LEN(ider_len, len4+len3); - _asn1_set_value_lv (p, der + counter, len2 + len3); - counter += len2 + len3; - } - else /* == -1 */ - { /* indefinite length */ - ider_len += len2; /* undo DECR_LEN */ - - if (counter == 0) - { - result = ASN1_DER_ERROR; - warn(); - goto cleanup; - } - - result = - _asn1_get_indefinite_length_string (der + counter, ider_len, &len2); - if (result != ASN1_SUCCESS) - { - warn(); - goto cleanup; - } - - DECR_LEN(ider_len, len2); - _asn1_set_value_lv (p, der + counter, len2); - counter += len2; - - } - - /* Check if a couple of 0x00 are present due to an EXPLICIT TAG with - an indefinite length method. */ - if (indefinite) - { - DECR_LEN(ider_len, 2); - if (!der[counter] && !der[counter + 1]) - { - counter += 2; - } - else - { - result = ASN1_DER_ERROR; - warn(); - goto cleanup; - } - } - - move = RIGHT; - break; - default: - move = (move == UP) ? RIGHT : DOWN; - break; - } - } - - if (p) - { - p->end = counter - 1; - } - - if (p == node && move != DOWN) - break; - - if (move == DOWN) - { - if (p->down) - p = p->down; - else - move = RIGHT; - } - if ((move == RIGHT) && !(p->type & CONST_SET)) - { - if (p->right) - p = p->right; - else - move = UP; - } - if (move == UP) - p = _asn1_find_up (p); - } - - _asn1_delete_not_used (*element); - - if ((ider_len < 0) || - (!(flags & ASN1_DECODE_FLAG_ALLOW_PADDING) && (ider_len != 0))) - { - warn(); - result = ASN1_DER_ERROR; - goto cleanup; - } - - *max_ider_len = total_len - ider_len; - - return ASN1_SUCCESS; - -cleanup: - asn1_delete_structure (element); - return result; -} - - -/** - * asn1_der_decoding: - * @element: pointer to an ASN1 structure. - * @ider: vector that contains the DER encoding. - * @ider_len: number of bytes of *@ider: @ider[0]..@ider[len-1]. - * @errorDescription: null-terminated string contains details when an - * error occurred. - * - * Fill the structure *@element with values of a DER encoding - * string. The structure must just be created with function - * asn1_create_element(). - * - * Note that the *@element variable is provided as a pointer for - * historical reasons. - * - * Returns: %ASN1_SUCCESS if DER encoding OK, %ASN1_ELEMENT_NOT_FOUND - * if @ELEMENT is %NULL, and %ASN1_TAG_ERROR or - * %ASN1_DER_ERROR if the der encoding doesn't match the structure - * name (*@ELEMENT deleted). - **/ -int -asn1_der_decoding (asn1_node * element, const void *ider, int ider_len, - char *errorDescription) -{ - return asn1_der_decoding2 (element, ider, &ider_len, 0, errorDescription); -} - -/** - * asn1_der_decoding_element: - * @structure: pointer to an ASN1 structure - * @elementName: name of the element to fill - * @ider: vector that contains the DER encoding of the whole structure. - * @len: number of bytes of *der: der[0]..der[len-1] - * @errorDescription: null-terminated string contains details when an - * error occurred. - * - * Fill the element named @ELEMENTNAME with values of a DER encoding - * string. The structure must just be created with function - * asn1_create_element(). The DER vector must contain the encoding - * string of the whole @STRUCTURE. If an error occurs during the - * decoding procedure, the *@STRUCTURE is deleted and set equal to - * %NULL. - * - * This function is deprecated and may just be an alias to asn1_der_decoding - * in future versions. Use asn1_der_decoding() instead. - * - * Returns: %ASN1_SUCCESS if DER encoding OK, %ASN1_ELEMENT_NOT_FOUND - * if ELEMENT is %NULL or @elementName == NULL, and - * %ASN1_TAG_ERROR or %ASN1_DER_ERROR if the der encoding doesn't - * match the structure @structure (*ELEMENT deleted). - **/ -int -asn1_der_decoding_element (asn1_node * structure, const char *elementName, - const void *ider, int len, char *errorDescription) -{ - return asn1_der_decoding(structure, ider, len, errorDescription); -} - -/** - * asn1_der_decoding_startEnd: - * @element: pointer to an ASN1 element - * @ider: vector that contains the DER encoding. - * @ider_len: number of bytes of *@ider: @ider[0]..@ider[len-1] - * @name_element: an element of NAME structure. - * @start: the position of the first byte of NAME_ELEMENT decoding - * (@ider[*start]) - * @end: the position of the last byte of NAME_ELEMENT decoding - * (@ider[*end]) - * - * Find the start and end point of an element in a DER encoding - * string. I mean that if you have a der encoding and you have already - * used the function asn1_der_decoding() to fill a structure, it may - * happen that you want to find the piece of string concerning an - * element of the structure. - * - * One example is the sequence "tbsCertificate" inside an X509 - * certificate. - * - * Note that since libtasn1 3.7 the @ider and @ider_len parameters - * can be omitted, if the element is already decoded using asn1_der_decoding(). - * - * Returns: %ASN1_SUCCESS if DER encoding OK, %ASN1_ELEMENT_NOT_FOUND - * if ELEMENT is %asn1_node EMPTY or @name_element is not a valid - * element, %ASN1_TAG_ERROR or %ASN1_DER_ERROR if the der encoding - * doesn't match the structure ELEMENT. - **/ -int -asn1_der_decoding_startEnd (asn1_node element, const void *ider, int ider_len, - const char *name_element, int *start, int *end) -{ - asn1_node node, node_to_find; - int result = ASN1_DER_ERROR; - - node = element; - - if (node == NULL) - return ASN1_ELEMENT_NOT_FOUND; - - node_to_find = asn1_find_node (node, name_element); - - if (node_to_find == NULL) - return ASN1_ELEMENT_NOT_FOUND; - - *start = node_to_find->start; - *end = node_to_find->end; - - if (*start == 0 && *end == 0) - { - if (ider == NULL || ider_len == 0) - return ASN1_GENERIC_ERROR; - - /* it seems asn1_der_decoding() wasn't called before. Do it now */ - result = asn1_der_decoding (&node, ider, ider_len, NULL); - if (result != ASN1_SUCCESS) - { - warn(); - return result; - } - - node_to_find = asn1_find_node (node, name_element); - if (node_to_find == NULL) - return ASN1_ELEMENT_NOT_FOUND; - - *start = node_to_find->start; - *end = node_to_find->end; - } - - if (*end < *start) - return ASN1_GENERIC_ERROR; - - return ASN1_SUCCESS; -} - -/** - * asn1_expand_any_defined_by: - * @definitions: ASN1 definitions - * @element: pointer to an ASN1 structure - * - * Expands every "ANY DEFINED BY" element of a structure created from - * a DER decoding process (asn1_der_decoding function). The element - * ANY must be defined by an OBJECT IDENTIFIER. The type used to - * expand the element ANY is the first one following the definition of - * the actual value of the OBJECT IDENTIFIER. - * - * Returns: %ASN1_SUCCESS if Substitution OK, %ASN1_ERROR_TYPE_ANY if - * some "ANY DEFINED BY" element couldn't be expanded due to a - * problem in OBJECT_ID -> TYPE association, or other error codes - * depending on DER decoding. - **/ -int -asn1_expand_any_defined_by (asn1_node definitions, asn1_node * element) -{ - char name[2 * ASN1_MAX_NAME_SIZE + 1], - value[ASN1_MAX_NAME_SIZE]; - int retCode = ASN1_SUCCESS, result; - int len, len2, len3; - asn1_node p, p2, p3, aux = NULL; - char errorDescription[ASN1_MAX_ERROR_DESCRIPTION_SIZE]; - const char *definitionsName; - - if ((definitions == NULL) || (*element == NULL)) - return ASN1_ELEMENT_NOT_FOUND; - - definitionsName = definitions->name; - - p = *element; - while (p) - { - - switch (type_field (p->type)) - { - case ASN1_ETYPE_ANY: - if ((p->type & CONST_DEFINED_BY) && (p->value)) - { - /* search the "DEF_BY" element */ - p2 = p->down; - while ((p2) && (type_field (p2->type) != ASN1_ETYPE_CONSTANT)) - p2 = p2->right; - - if (!p2) - { - retCode = ASN1_ERROR_TYPE_ANY; - break; - } - - p3 = _asn1_find_up (p); - - if (!p3) - { - retCode = ASN1_ERROR_TYPE_ANY; - break; - } - - p3 = p3->down; - while (p3) - { - if (!(strcmp (p3->name, p2->name))) - break; - p3 = p3->right; - } - - if ((!p3) || (type_field (p3->type) != ASN1_ETYPE_OBJECT_ID) || - (p3->value == NULL)) - { - - p3 = _asn1_find_up (p); - p3 = _asn1_find_up (p3); - - if (!p3) - { - retCode = ASN1_ERROR_TYPE_ANY; - break; - } - - p3 = p3->down; - - while (p3) - { - if (!(strcmp (p3->name, p2->name))) - break; - p3 = p3->right; - } - - if ((!p3) || (type_field (p3->type) != ASN1_ETYPE_OBJECT_ID) - || (p3->value == NULL)) - { - retCode = ASN1_ERROR_TYPE_ANY; - break; - } - } - - /* search the OBJECT_ID into definitions */ - p2 = definitions->down; - while (p2) - { - if ((type_field (p2->type) == ASN1_ETYPE_OBJECT_ID) && - (p2->type & CONST_ASSIGN)) - { - snprintf(name, sizeof(name), "%s.%s", definitionsName, p2->name); - - len = ASN1_MAX_NAME_SIZE; - result = - asn1_read_value (definitions, name, value, &len); - - if ((result == ASN1_SUCCESS) - && (!_asn1_strcmp (p3->value, value))) - { - p2 = p2->right; /* pointer to the structure to - use for expansion */ - while ((p2) && (p2->type & CONST_ASSIGN)) - p2 = p2->right; - - if (p2) - { - snprintf(name, sizeof(name), "%s.%s", definitionsName, p2->name); - - result = - asn1_create_element (definitions, name, &aux); - if (result == ASN1_SUCCESS) - { - _asn1_cpy_name (aux, p); - len2 = - asn1_get_length_der (p->value, - p->value_len, &len3); - if (len2 < 0) - return ASN1_DER_ERROR; - - result = - asn1_der_decoding (&aux, p->value + len3, - len2, - errorDescription); - if (result == ASN1_SUCCESS) - { - - _asn1_set_right (aux, p->right); - _asn1_set_right (p, aux); - - result = asn1_delete_structure (&p); - if (result == ASN1_SUCCESS) - { - p = aux; - aux = NULL; - break; - } - else - { /* error with asn1_delete_structure */ - asn1_delete_structure (&aux); - retCode = result; - break; - } - } - else - { /* error with asn1_der_decoding */ - retCode = result; - break; - } - } - else - { /* error with asn1_create_element */ - retCode = result; - break; - } - } - else - { /* error with the pointer to the structure to exapand */ - retCode = ASN1_ERROR_TYPE_ANY; - break; - } - } - } - p2 = p2->right; - } /* end while */ - - if (!p2) - { - retCode = ASN1_ERROR_TYPE_ANY; - break; - } - - } - break; - default: - break; - } - - - if (p->down) - { - p = p->down; - } - else if (p == *element) - { - p = NULL; - break; - } - else if (p->right) - p = p->right; - else - { - while (1) - { - p = _asn1_find_up (p); - if (p == *element) - { - p = NULL; - break; - } - if (p->right) - { - p = p->right; - break; - } - } - } - } - - return retCode; -} - -/** - * asn1_expand_octet_string: - * @definitions: ASN1 definitions - * @element: pointer to an ASN1 structure - * @octetName: name of the OCTECT STRING field to expand. - * @objectName: name of the OBJECT IDENTIFIER field to use to define - * the type for expansion. - * - * Expands an "OCTET STRING" element of a structure created from a DER - * decoding process (the asn1_der_decoding() function). The type used - * for expansion is the first one following the definition of the - * actual value of the OBJECT IDENTIFIER indicated by OBJECTNAME. - * - * Returns: %ASN1_SUCCESS if substitution OK, %ASN1_ELEMENT_NOT_FOUND - * if @objectName or @octetName are not correct, - * %ASN1_VALUE_NOT_VALID if it wasn't possible to find the type to - * use for expansion, or other errors depending on DER decoding. - **/ -int -asn1_expand_octet_string (asn1_node definitions, asn1_node * element, - const char *octetName, const char *objectName) -{ - char name[2 * ASN1_MAX_NAME_SIZE + 1], value[ASN1_MAX_NAME_SIZE]; - int retCode = ASN1_SUCCESS, result; - int len, len2, len3; - asn1_node p2, aux = NULL; - asn1_node octetNode = NULL, objectNode = NULL; - char errorDescription[ASN1_MAX_ERROR_DESCRIPTION_SIZE]; - - if ((definitions == NULL) || (*element == NULL)) - return ASN1_ELEMENT_NOT_FOUND; - - octetNode = asn1_find_node (*element, octetName); - if (octetNode == NULL) - return ASN1_ELEMENT_NOT_FOUND; - if (type_field (octetNode->type) != ASN1_ETYPE_OCTET_STRING) - return ASN1_ELEMENT_NOT_FOUND; - if (octetNode->value == NULL) - return ASN1_VALUE_NOT_FOUND; - - objectNode = asn1_find_node (*element, objectName); - if (objectNode == NULL) - return ASN1_ELEMENT_NOT_FOUND; - - if (type_field (objectNode->type) != ASN1_ETYPE_OBJECT_ID) - return ASN1_ELEMENT_NOT_FOUND; - - if (objectNode->value == NULL) - return ASN1_VALUE_NOT_FOUND; - - - /* search the OBJECT_ID into definitions */ - p2 = definitions->down; - while (p2) - { - if ((type_field (p2->type) == ASN1_ETYPE_OBJECT_ID) && - (p2->type & CONST_ASSIGN)) - { - strcpy (name, definitions->name); - strcat (name, "."); - strcat (name, p2->name); - - len = sizeof (value); - result = asn1_read_value (definitions, name, value, &len); - - if ((result == ASN1_SUCCESS) - && (!_asn1_strcmp (objectNode->value, value))) - { - - p2 = p2->right; /* pointer to the structure to - use for expansion */ - while ((p2) && (p2->type & CONST_ASSIGN)) - p2 = p2->right; - - if (p2) - { - strcpy (name, definitions->name); - strcat (name, "."); - strcat (name, p2->name); - - result = asn1_create_element (definitions, name, &aux); - if (result == ASN1_SUCCESS) - { - _asn1_cpy_name (aux, octetNode); - len2 = - asn1_get_length_der (octetNode->value, - octetNode->value_len, &len3); - if (len2 < 0) - return ASN1_DER_ERROR; - - result = - asn1_der_decoding (&aux, octetNode->value + len3, - len2, errorDescription); - if (result == ASN1_SUCCESS) - { - - _asn1_set_right (aux, octetNode->right); - _asn1_set_right (octetNode, aux); - - result = asn1_delete_structure (&octetNode); - if (result == ASN1_SUCCESS) - { - aux = NULL; - break; - } - else - { /* error with asn1_delete_structure */ - asn1_delete_structure (&aux); - retCode = result; - break; - } - } - else - { /* error with asn1_der_decoding */ - retCode = result; - break; - } - } - else - { /* error with asn1_create_element */ - retCode = result; - break; - } - } - else - { /* error with the pointer to the structure to exapand */ - retCode = ASN1_VALUE_NOT_VALID; - break; - } - } - } - - p2 = p2->right; - - } - - if (!p2) - retCode = ASN1_VALUE_NOT_VALID; - - return retCode; -} - -/*- - * _asn1_decode_simple_der: - * @etype: The type of the string to be encoded (ASN1_ETYPE_) - * @der: the encoded string - * @_der_len: the bytes of the encoded string - * @str: a pointer to the data - * @str_len: the length of the data - * @dflags: DECODE_FLAG_* - * - * Decodes a simple DER encoded type (e.g. a string, which is not constructed). - * The output is a pointer inside the @der. - * - * Returns: %ASN1_SUCCESS if successful or an error value. - -*/ -static int -_asn1_decode_simple_der (unsigned int etype, const unsigned char *der, - unsigned int _der_len, const unsigned char **str, - unsigned int *str_len, unsigned dflags) -{ - int tag_len, len_len; - const unsigned char *p; - int der_len = _der_len; - unsigned char class; - unsigned long tag; - long ret; - - if (der == NULL || der_len == 0) - return ASN1_VALUE_NOT_VALID; - - if (ETYPE_OK (etype) == 0 || ETYPE_IS_STRING(etype) == 0) - return ASN1_VALUE_NOT_VALID; - - /* doesn't handle constructed classes */ - class = ETYPE_CLASS(etype); - if (class != ASN1_CLASS_UNIVERSAL) - return ASN1_VALUE_NOT_VALID; - - p = der; - - if (dflags & DECODE_FLAG_HAVE_TAG) - { - ret = asn1_get_tag_der (p, der_len, &class, &tag_len, &tag); - if (ret != ASN1_SUCCESS) - return ret; - - if (class != ETYPE_CLASS (etype) || tag != ETYPE_TAG (etype)) - { - warn(); - return ASN1_DER_ERROR; - } - - p += tag_len; - der_len -= tag_len; - if (der_len <= 0) - return ASN1_DER_ERROR; - } - - ret = asn1_get_length_der (p, der_len, &len_len); - if (ret < 0) - return ASN1_DER_ERROR; - - p += len_len; - der_len -= len_len; - if (der_len <= 0) - return ASN1_DER_ERROR; - - *str_len = ret; - *str = p; - - return ASN1_SUCCESS; -} - -/** - * asn1_decode_simple_der: - * @etype: The type of the string to be encoded (ASN1_ETYPE_) - * @der: the encoded string - * @_der_len: the bytes of the encoded string - * @str: a pointer to the data - * @str_len: the length of the data - * - * Decodes a simple DER encoded type (e.g. a string, which is not constructed). - * The output is a pointer inside the @der. - * - * Returns: %ASN1_SUCCESS if successful or an error value. - **/ -int -asn1_decode_simple_der (unsigned int etype, const unsigned char *der, - unsigned int _der_len, const unsigned char **str, - unsigned int *str_len) -{ - return _asn1_decode_simple_der(etype, der, _der_len, str, str_len, DECODE_FLAG_HAVE_TAG); -} - -static int append(uint8_t **dst, unsigned *dst_size, const unsigned char *src, unsigned src_size) -{ - *dst = _asn1_realloc(*dst, *dst_size+src_size); - if (*dst == NULL) - return ASN1_MEM_ERROR; - memcpy(*dst + *dst_size, src, src_size); - *dst_size += src_size; - return ASN1_SUCCESS; -} - -/*- - * _asn1_decode_simple_ber: - * @etype: The type of the string to be encoded (ASN1_ETYPE_) - * @der: the encoded string - * @_der_len: the bytes of the encoded string - * @str: a pointer to the data - * @str_len: the length of the data - * @ber_len: the total length occupied by BER (may be %NULL) - * @have_tag: whether a DER tag is included - * - * Decodes a BER encoded type. The output is an allocated value - * of the data. This decodes BER STRINGS only. Other types are - * decoded as DER. - * - * Returns: %ASN1_SUCCESS if successful or an error value. - -*/ -static int -_asn1_decode_simple_ber (unsigned int etype, const unsigned char *der, - unsigned int _der_len, unsigned char **str, - unsigned int *str_len, unsigned int *ber_len, - unsigned dflags) -{ - int tag_len, len_len; - const unsigned char *p; - int der_len = _der_len; - uint8_t *total = NULL; - unsigned total_size = 0; - unsigned char class; - unsigned long tag; - unsigned char *out = NULL; - const unsigned char *cout = NULL; - unsigned out_len; - long result; - - if (ber_len) *ber_len = 0; - - if (der == NULL || der_len == 0) - { - warn(); - return ASN1_VALUE_NOT_VALID; - } - - if (ETYPE_OK (etype) == 0) - { - warn(); - return ASN1_VALUE_NOT_VALID; - } - - /* doesn't handle constructed + definite classes */ - class = ETYPE_CLASS (etype); - if (class != ASN1_CLASS_UNIVERSAL) - { - warn(); - return ASN1_VALUE_NOT_VALID; - } - - p = der; - - if (dflags & DECODE_FLAG_HAVE_TAG) - { - result = asn1_get_tag_der (p, der_len, &class, &tag_len, &tag); - if (result != ASN1_SUCCESS) - { - warn(); - return result; - } - - if (tag != ETYPE_TAG (etype)) - { - warn(); - return ASN1_DER_ERROR; - } - - p += tag_len; - - DECR_LEN(der_len, tag_len); - - if (ber_len) *ber_len += tag_len; - } - - /* indefinite constructed */ - if ((((dflags & DECODE_FLAG_INDEFINITE) || class == ASN1_CLASS_STRUCTURED) && ETYPE_IS_STRING(etype)) && - !(dflags & DECODE_FLAG_LEVEL3)) - { - len_len = 1; - - DECR_LEN(der_len, len_len); - if (p[0] != 0x80) - { - warn(); - result = ASN1_DER_ERROR; - goto cleanup; - } - - p += len_len; - - if (ber_len) *ber_len += len_len; - - /* decode the available octet strings */ - do - { - unsigned tmp_len; - unsigned flags = DECODE_FLAG_HAVE_TAG; - - if (dflags & DECODE_FLAG_LEVEL1) - flags |= DECODE_FLAG_LEVEL2; - else if (dflags & DECODE_FLAG_LEVEL2) - flags |= DECODE_FLAG_LEVEL3; - else - flags |= DECODE_FLAG_LEVEL1; - - result = _asn1_decode_simple_ber(etype, p, der_len, &out, &out_len, &tmp_len, - flags); - if (result != ASN1_SUCCESS) - { - warn(); - goto cleanup; - } - - p += tmp_len; - DECR_LEN(der_len, tmp_len); - - if (ber_len) *ber_len += tmp_len; - - DECR_LEN(der_len, 2); /* we need the EOC */ - - if (out_len > 0) - { - result = append(&total, &total_size, out, out_len); - if (result != ASN1_SUCCESS) - { - warn(); - goto cleanup; - } - } - - free(out); - out = NULL; - - if (p[0] == 0 && p[1] == 0) /* EOC */ - { - if (ber_len) *ber_len += 2; - break; - } - - /* no EOC */ - der_len += 2; - - if (der_len == 2) - { - warn(); - result = ASN1_DER_ERROR; - goto cleanup; - } - } - while(1); - } - else if (class == ETYPE_CLASS(etype)) - { - if (ber_len) - { - result = asn1_get_length_der (p, der_len, &len_len); - if (result < 0) - { - warn(); - result = ASN1_DER_ERROR; - goto cleanup; - } - *ber_len += result + len_len; - } - - /* non-string values are decoded as DER */ - result = _asn1_decode_simple_der(etype, der, _der_len, &cout, &out_len, dflags); - if (result != ASN1_SUCCESS) - { - warn(); - goto cleanup; - } - - result = append(&total, &total_size, cout, out_len); - if (result != ASN1_SUCCESS) - { - warn(); - goto cleanup; - } - } - else - { - warn(); - result = ASN1_DER_ERROR; - goto cleanup; - } - - *str = total; - *str_len = total_size; - - return ASN1_SUCCESS; -cleanup: - free(out); - free(total); - return result; -} - -/** - * asn1_decode_simple_ber: - * @etype: The type of the string to be encoded (ASN1_ETYPE_) - * @der: the encoded string - * @_der_len: the bytes of the encoded string - * @str: a pointer to the data - * @str_len: the length of the data - * @ber_len: the total length occupied by BER (may be %NULL) - * - * Decodes a BER encoded type. The output is an allocated value - * of the data. This decodes BER STRINGS only. Other types are - * decoded as DER. - * - * Returns: %ASN1_SUCCESS if successful or an error value. - **/ -int -asn1_decode_simple_ber (unsigned int etype, const unsigned char *der, - unsigned int _der_len, unsigned char **str, - unsigned int *str_len, unsigned int *ber_len) -{ - return _asn1_decode_simple_ber(etype, der, _der_len, str, str_len, ber_len, DECODE_FLAG_HAVE_TAG); -} diff --git a/lib/element.c b/lib/element.c deleted file mode 100644 index b09f826..0000000 --- a/lib/element.c +++ /dev/null @@ -1,1111 +0,0 @@ -/* - * Copyright (C) 2000-2014 Free Software Foundation, Inc. - * - * This file is part of LIBTASN1. - * - * The LIBTASN1 library is free software; you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA - */ - -/*****************************************************/ -/* File: element.c */ -/* Description: Functions with the read and write */ -/* functions. */ -/*****************************************************/ - - -#include -#include "parser_aux.h" -#include -#include "structure.h" - -#include "element.h" - -void -_asn1_hierarchical_name (asn1_node node, char *name, int name_size) -{ - asn1_node p; - char tmp_name[64]; - - p = node; - - name[0] = 0; - - while (p != NULL) - { - if (p->name[0] != 0) - { - _asn1_str_cpy (tmp_name, sizeof (tmp_name), name), - _asn1_str_cpy (name, name_size, p->name); - _asn1_str_cat (name, name_size, "."); - _asn1_str_cat (name, name_size, tmp_name); - } - p = _asn1_find_up (p); - } - - if (name[0] == 0) - _asn1_str_cpy (name, name_size, "ROOT"); -} - - -/******************************************************************/ -/* Function : _asn1_convert_integer */ -/* Description: converts an integer from a null terminated string */ -/* to der decoding. The convertion from a null */ -/* terminated string to an integer is made with */ -/* the 'strtol' function. */ -/* Parameters: */ -/* value: null terminated string to convert. */ -/* value_out: convertion result (memory must be already */ -/* allocated). */ -/* value_out_size: number of bytes of value_out. */ -/* len: number of significant byte of value_out. */ -/* Return: ASN1_MEM_ERROR or ASN1_SUCCESS */ -/******************************************************************/ -int -_asn1_convert_integer (const unsigned char *value, unsigned char *value_out, - int value_out_size, int *len) -{ - char negative; - unsigned char val[SIZEOF_UNSIGNED_LONG_INT]; - long valtmp; - int k, k2; - - valtmp = _asn1_strtol (value, NULL, 10); - - for (k = 0; k < SIZEOF_UNSIGNED_LONG_INT; k++) - { - val[SIZEOF_UNSIGNED_LONG_INT - k - 1] = (valtmp >> (8 * k)) & 0xFF; - } - - if (val[0] & 0x80) - negative = 1; - else - negative = 0; - - for (k = 0; k < SIZEOF_UNSIGNED_LONG_INT - 1; k++) - { - if (negative && (val[k] != 0xFF)) - break; - else if (!negative && val[k]) - break; - } - - if ((negative && !(val[k] & 0x80)) || (!negative && (val[k] & 0x80))) - k--; - - *len = SIZEOF_UNSIGNED_LONG_INT - k; - - if (SIZEOF_UNSIGNED_LONG_INT - k > value_out_size) - /* VALUE_OUT is too short to contain the value conversion */ - return ASN1_MEM_ERROR; - - if (value_out != NULL) - { - for (k2 = k; k2 < SIZEOF_UNSIGNED_LONG_INT; k2++) - value_out[k2 - k] = val[k2]; - } - -#if 0 - printf ("_asn1_convert_integer: valueIn=%s, lenOut=%d", value, *len); - for (k = 0; k < SIZEOF_UNSIGNED_LONG_INT; k++) - printf (", vOut[%d]=%d", k, value_out[k]); - printf ("\n"); -#endif - - return ASN1_SUCCESS; -} - -/* Appends a new element into the sequence (or set) defined by this - * node. The new element will have a name of '?number', where number - * is a monotonically increased serial number. - * - * The last element in the list may be provided in @pcache, to avoid - * traversing the list, an expensive operation in long lists. - * - * On success it returns in @pcache the added element (which is the - * tail in the list of added elements). - */ -int -_asn1_append_sequence_set (asn1_node node, struct node_tail_cache_st *pcache) -{ - asn1_node p, p2; - char temp[LTOSTR_MAX_SIZE]; - long n; - - if (!node || !(node->down)) - return ASN1_GENERIC_ERROR; - - p = node->down; - while ((type_field (p->type) == ASN1_ETYPE_TAG) - || (type_field (p->type) == ASN1_ETYPE_SIZE)) - p = p->right; - - p2 = _asn1_copy_structure3 (p); - if (p2 == NULL) - return ASN1_GENERIC_ERROR; - - if (pcache == NULL || pcache->tail == NULL || pcache->head != node) - { - while (p->right) - { - p = p->right; - } - } - else - { - p = pcache->tail; - } - - _asn1_set_right (p, p2); - if (pcache) - { - pcache->head = node; - pcache->tail = p2; - } - - if (p->name[0] == 0) - _asn1_str_cpy (temp, sizeof (temp), "?1"); - else - { - n = strtol (p->name + 1, NULL, 0); - n++; - temp[0] = '?'; - _asn1_ltostr (n, temp + 1); - } - _asn1_set_name (p2, temp); - /* p2->type |= CONST_OPTION; */ - - return ASN1_SUCCESS; -} - - -/** - * asn1_write_value: - * @node_root: pointer to a structure - * @name: the name of the element inside the structure that you want to set. - * @ivalue: vector used to specify the value to set. If len is >0, - * VALUE must be a two's complement form integer. if len=0 *VALUE - * must be a null terminated string with an integer value. - * @len: number of bytes of *value to use to set the value: - * value[0]..value[len-1] or 0 if value is a null terminated string - * - * Set the value of one element inside a structure. - * - * If an element is OPTIONAL and you want to delete it, you must use - * the value=NULL and len=0. Using "pkix.asn": - * - * result=asn1_write_value(cert, "tbsCertificate.issuerUniqueID", - * NULL, 0); - * - * Description for each type: - * - * INTEGER: VALUE must contain a two's complement form integer. - * - * value[0]=0xFF , len=1 -> integer=-1. - * value[0]=0xFF value[1]=0xFF , len=2 -> integer=-1. - * value[0]=0x01 , len=1 -> integer= 1. - * value[0]=0x00 value[1]=0x01 , len=2 -> integer= 1. - * value="123" , len=0 -> integer= 123. - * - * ENUMERATED: As INTEGER (but only with not negative numbers). - * - * BOOLEAN: VALUE must be the null terminated string "TRUE" or - * "FALSE" and LEN != 0. - * - * value="TRUE" , len=1 -> boolean=TRUE. - * value="FALSE" , len=1 -> boolean=FALSE. - * - * OBJECT IDENTIFIER: VALUE must be a null terminated string with - * each number separated by a dot (e.g. "1.2.3.543.1"). LEN != 0. - * - * value="1 2 840 10040 4 3" , len=1 -> OID=dsa-with-sha. - * - * UTCTime: VALUE must be a null terminated string in one of these - * formats: "YYMMDDhhmmssZ", "YYMMDDhhmmssZ", - * "YYMMDDhhmmss+hh'mm'", "YYMMDDhhmmss-hh'mm'", - * "YYMMDDhhmm+hh'mm'", or "YYMMDDhhmm-hh'mm'". LEN != 0. - * - * value="9801011200Z" , len=1 -> time=Jannuary 1st, 1998 - * at 12h 00m Greenwich Mean Time - * - * GeneralizedTime: VALUE must be in one of this format: - * "YYYYMMDDhhmmss.sZ", "YYYYMMDDhhmmss.sZ", - * "YYYYMMDDhhmmss.s+hh'mm'", "YYYYMMDDhhmmss.s-hh'mm'", - * "YYYYMMDDhhmm+hh'mm'", or "YYYYMMDDhhmm-hh'mm'" where ss.s - * indicates the seconds with any precision like "10.1" or "01.02". - * LEN != 0 - * - * value="2001010112001.12-0700" , len=1 -> time=Jannuary - * 1st, 2001 at 12h 00m 01.12s Pacific Daylight Time - * - * OCTET STRING: VALUE contains the octet string and LEN is the - * number of octets. - * - * value="$\backslash$x01$\backslash$x02$\backslash$x03" , - * len=3 -> three bytes octet string - * - * GeneralString: VALUE contains the generalstring and LEN is the - * number of octets. - * - * value="$\backslash$x01$\backslash$x02$\backslash$x03" , - * len=3 -> three bytes generalstring - * - * BIT STRING: VALUE contains the bit string organized by bytes and - * LEN is the number of bits. - * - * value="$\backslash$xCF" , len=6 -> bit string="110011" (six - * bits) - * - * CHOICE: if NAME indicates a choice type, VALUE must specify one of - * the alternatives with a null terminated string. LEN != 0. Using - * "pkix.asn"\: - * - * result=asn1_write_value(cert, - * "certificate1.tbsCertificate.subject", "rdnSequence", - * 1); - * - * ANY: VALUE indicates the der encoding of a structure. LEN != 0. - * - * SEQUENCE OF: VALUE must be the null terminated string "NEW" and - * LEN != 0. With this instruction another element is appended in - * the sequence. The name of this element will be "?1" if it's the - * first one, "?2" for the second and so on. - * - * Using "pkix.asn"\: - * - * result=asn1_write_value(cert, - * "certificate1.tbsCertificate.subject.rdnSequence", "NEW", 1); - * - * SET OF: the same as SEQUENCE OF. Using "pkix.asn": - * - * result=asn1_write_value(cert, - * "tbsCertificate.subject.rdnSequence.?LAST", "NEW", 1); - * - * Returns: %ASN1_SUCCESS if the value was set, - * %ASN1_ELEMENT_NOT_FOUND if @name is not a valid element, and - * %ASN1_VALUE_NOT_VALID if @ivalue has a wrong format. - **/ -int -asn1_write_value (asn1_node node_root, const char *name, - const void *ivalue, int len) -{ - asn1_node node, p, p2; - unsigned char *temp, *value_temp = NULL, *default_temp = NULL; - int len2, k, k2, negative; - size_t i; - const unsigned char *value = ivalue; - unsigned int type; - - node = asn1_find_node (node_root, name); - if (node == NULL) - return ASN1_ELEMENT_NOT_FOUND; - - if ((node->type & CONST_OPTION) && (value == NULL) && (len == 0)) - { - asn1_delete_structure (&node); - return ASN1_SUCCESS; - } - - type = type_field (node->type); - - if ((type == ASN1_ETYPE_SEQUENCE_OF || type == ASN1_ETYPE_SET_OF) && (value == NULL) && (len == 0)) - { - p = node->down; - while ((type_field (p->type) == ASN1_ETYPE_TAG) - || (type_field (p->type) == ASN1_ETYPE_SIZE)) - p = p->right; - - while (p->right) - asn1_delete_structure (&p->right); - - return ASN1_SUCCESS; - } - - /* Don't allow element deletion for other types */ - if (value == NULL) - { - return ASN1_VALUE_NOT_VALID; - } - - switch (type) - { - case ASN1_ETYPE_BOOLEAN: - if (!_asn1_strcmp (value, "TRUE")) - { - if (node->type & CONST_DEFAULT) - { - p = node->down; - while (type_field (p->type) != ASN1_ETYPE_DEFAULT) - p = p->right; - if (p->type & CONST_TRUE) - _asn1_set_value (node, NULL, 0); - else - _asn1_set_value (node, "T", 1); - } - else - _asn1_set_value (node, "T", 1); - } - else if (!_asn1_strcmp (value, "FALSE")) - { - if (node->type & CONST_DEFAULT) - { - p = node->down; - while (type_field (p->type) != ASN1_ETYPE_DEFAULT) - p = p->right; - if (p->type & CONST_FALSE) - _asn1_set_value (node, NULL, 0); - else - _asn1_set_value (node, "F", 1); - } - else - _asn1_set_value (node, "F", 1); - } - else - return ASN1_VALUE_NOT_VALID; - break; - case ASN1_ETYPE_INTEGER: - case ASN1_ETYPE_ENUMERATED: - if (len == 0) - { - if ((isdigit (value[0])) || (value[0] == '-')) - { - value_temp = malloc (SIZEOF_UNSIGNED_LONG_INT); - if (value_temp == NULL) - return ASN1_MEM_ALLOC_ERROR; - - _asn1_convert_integer (value, value_temp, - SIZEOF_UNSIGNED_LONG_INT, &len); - } - else - { /* is an identifier like v1 */ - if (!(node->type & CONST_LIST)) - return ASN1_VALUE_NOT_VALID; - p = node->down; - while (p) - { - if (type_field (p->type) == ASN1_ETYPE_CONSTANT) - { - if (!_asn1_strcmp (p->name, value)) - { - value_temp = malloc (SIZEOF_UNSIGNED_LONG_INT); - if (value_temp == NULL) - return ASN1_MEM_ALLOC_ERROR; - - _asn1_convert_integer (p->value, - value_temp, - SIZEOF_UNSIGNED_LONG_INT, - &len); - break; - } - } - p = p->right; - } - if (p == NULL) - return ASN1_VALUE_NOT_VALID; - } - } - else - { /* len != 0 */ - value_temp = malloc (len); - if (value_temp == NULL) - return ASN1_MEM_ALLOC_ERROR; - memcpy (value_temp, value, len); - } - - if (value_temp[0] & 0x80) - negative = 1; - else - negative = 0; - - if (negative && (type_field (node->type) == ASN1_ETYPE_ENUMERATED)) - { - free (value_temp); - return ASN1_VALUE_NOT_VALID; - } - - for (k = 0; k < len - 1; k++) - if (negative && (value_temp[k] != 0xFF)) - break; - else if (!negative && value_temp[k]) - break; - - if ((negative && !(value_temp[k] & 0x80)) || - (!negative && (value_temp[k] & 0x80))) - k--; - - _asn1_set_value_lv (node, value_temp + k, len - k); - - if (node->type & CONST_DEFAULT) - { - p = node->down; - while (type_field (p->type) != ASN1_ETYPE_DEFAULT) - p = p->right; - if ((isdigit (p->value[0])) || (p->value[0] == '-')) - { - default_temp = malloc (SIZEOF_UNSIGNED_LONG_INT); - if (default_temp == NULL) - { - free (value_temp); - return ASN1_MEM_ALLOC_ERROR; - } - - _asn1_convert_integer (p->value, default_temp, - SIZEOF_UNSIGNED_LONG_INT, &len2); - } - else - { /* is an identifier like v1 */ - if (!(node->type & CONST_LIST)) - { - free (value_temp); - return ASN1_VALUE_NOT_VALID; - } - p2 = node->down; - while (p2) - { - if (type_field (p2->type) == ASN1_ETYPE_CONSTANT) - { - if (!_asn1_strcmp (p2->name, p->value)) - { - default_temp = malloc (SIZEOF_UNSIGNED_LONG_INT); - if (default_temp == NULL) - { - free (value_temp); - return ASN1_MEM_ALLOC_ERROR; - } - - _asn1_convert_integer (p2->value, - default_temp, - SIZEOF_UNSIGNED_LONG_INT, - &len2); - break; - } - } - p2 = p2->right; - } - if (p2 == NULL) - { - free (value_temp); - return ASN1_VALUE_NOT_VALID; - } - } - - - if ((len - k) == len2) - { - for (k2 = 0; k2 < len2; k2++) - if (value_temp[k + k2] != default_temp[k2]) - { - break; - } - if (k2 == len2) - _asn1_set_value (node, NULL, 0); - } - free (default_temp); - } - free (value_temp); - break; - case ASN1_ETYPE_OBJECT_ID: - for (i = 0; i < _asn1_strlen (value); i++) - if ((!isdigit (value[i])) && (value[i] != '.') && (value[i] != '+')) - return ASN1_VALUE_NOT_VALID; - if (node->type & CONST_DEFAULT) - { - p = node->down; - while (type_field (p->type) != ASN1_ETYPE_DEFAULT) - p = p->right; - if (!_asn1_strcmp (value, p->value)) - { - _asn1_set_value (node, NULL, 0); - break; - } - } - _asn1_set_value (node, value, _asn1_strlen (value) + 1); - break; - case ASN1_ETYPE_UTC_TIME: - { - len = _asn1_strlen (value); - if (len < 11) - return ASN1_VALUE_NOT_VALID; - for (k = 0; k < 10; k++) - if (!isdigit (value[k])) - return ASN1_VALUE_NOT_VALID; - switch (len) - { - case 11: - if (value[10] != 'Z') - return ASN1_VALUE_NOT_VALID; - break; - case 13: - if ((!isdigit (value[10])) || (!isdigit (value[11])) || - (value[12] != 'Z')) - return ASN1_VALUE_NOT_VALID; - break; - case 15: - if ((value[10] != '+') && (value[10] != '-')) - return ASN1_VALUE_NOT_VALID; - for (k = 11; k < 15; k++) - if (!isdigit (value[k])) - return ASN1_VALUE_NOT_VALID; - break; - case 17: - if ((!isdigit (value[10])) || (!isdigit (value[11]))) - return ASN1_VALUE_NOT_VALID; - if ((value[12] != '+') && (value[12] != '-')) - return ASN1_VALUE_NOT_VALID; - for (k = 13; k < 17; k++) - if (!isdigit (value[k])) - return ASN1_VALUE_NOT_VALID; - break; - default: - return ASN1_VALUE_NOT_FOUND; - } - _asn1_set_value (node, value, len); - } - break; - case ASN1_ETYPE_GENERALIZED_TIME: - len = _asn1_strlen (value); - _asn1_set_value (node, value, len); - break; - case ASN1_ETYPE_OCTET_STRING: - case ASN1_ETYPE_GENERALSTRING: - case ASN1_ETYPE_NUMERIC_STRING: - case ASN1_ETYPE_IA5_STRING: - case ASN1_ETYPE_TELETEX_STRING: - case ASN1_ETYPE_PRINTABLE_STRING: - case ASN1_ETYPE_UNIVERSAL_STRING: - case ASN1_ETYPE_BMP_STRING: - case ASN1_ETYPE_UTF8_STRING: - case ASN1_ETYPE_VISIBLE_STRING: - if (len == 0) - len = _asn1_strlen (value); - _asn1_set_value_lv (node, value, len); - break; - case ASN1_ETYPE_BIT_STRING: - if (len == 0) - len = _asn1_strlen (value); - asn1_length_der ((len >> 3) + 2, NULL, &len2); - temp = malloc ((len >> 3) + 2 + len2); - if (temp == NULL) - return ASN1_MEM_ALLOC_ERROR; - - asn1_bit_der (value, len, temp, &len2); - _asn1_set_value_m (node, temp, len2); - temp = NULL; - break; - case ASN1_ETYPE_CHOICE: - p = node->down; - while (p) - { - if (!_asn1_strcmp (p->name, value)) - { - p2 = node->down; - while (p2) - { - if (p2 != p) - { - asn1_delete_structure (&p2); - p2 = node->down; - } - else - p2 = p2->right; - } - break; - } - p = p->right; - } - if (!p) - return ASN1_ELEMENT_NOT_FOUND; - break; - case ASN1_ETYPE_ANY: - _asn1_set_value_lv (node, value, len); - break; - case ASN1_ETYPE_SEQUENCE_OF: - case ASN1_ETYPE_SET_OF: - if (_asn1_strcmp (value, "NEW")) - return ASN1_VALUE_NOT_VALID; - _asn1_append_sequence_set (node, NULL); - break; - default: - return ASN1_ELEMENT_NOT_FOUND; - break; - } - - return ASN1_SUCCESS; -} - - -#define PUT_VALUE( ptr, ptr_size, data, data_size) \ - *len = data_size; \ - if (ptr_size < data_size) { \ - return ASN1_MEM_ERROR; \ - } else { \ - if (ptr && data_size > 0) \ - memcpy (ptr, data, data_size); \ - } - -#define PUT_STR_VALUE( ptr, ptr_size, data) \ - *len = _asn1_strlen (data) + 1; \ - if (ptr_size < *len) { \ - return ASN1_MEM_ERROR; \ - } else { \ - /* this strcpy is checked */ \ - if (ptr) { \ - _asn1_strcpy (ptr, data); \ - } \ - } - -#define PUT_AS_STR_VALUE( ptr, ptr_size, data, data_size) \ - *len = data_size + 1; \ - if (ptr_size < *len) { \ - return ASN1_MEM_ERROR; \ - } else { \ - /* this strcpy is checked */ \ - if (ptr) { \ - if (data_size > 0) \ - memcpy (ptr, data, data_size); \ - ptr[data_size] = 0; \ - } \ - } - -#define ADD_STR_VALUE( ptr, ptr_size, data) \ - *len += _asn1_strlen(data); \ - if (ptr_size < (int) *len) { \ - (*len)++; \ - return ASN1_MEM_ERROR; \ - } else { \ - /* this strcat is checked */ \ - if (ptr) _asn1_strcat (ptr, data); \ - } - -/** - * asn1_read_value: - * @root: pointer to a structure. - * @name: the name of the element inside a structure that you want to read. - * @ivalue: vector that will contain the element's content, must be a - * pointer to memory cells already allocated (may be %NULL). - * @len: number of bytes of *value: value[0]..value[len-1]. Initialy - * holds the sizeof value. - * - * Returns the value of one element inside a structure. - * If an element is OPTIONAL and this returns - * %ASN1_ELEMENT_NOT_FOUND, it means that this element wasn't present - * in the der encoding that created the structure. The first element - * of a SEQUENCE_OF or SET_OF is named "?1". The second one "?2" and - * so on. If the @root provided is a node to specific sequence element, - * then the keyword "?CURRENT" is also acceptable and indicates the - * current sequence element of this node. - * - * Note that there can be valid values with length zero. In these case - * this function will succeed and @len will be zero. - * - * INTEGER: VALUE will contain a two's complement form integer. - * - * integer=-1 -> value[0]=0xFF , len=1. - * integer=1 -> value[0]=0x01 , len=1. - * - * ENUMERATED: As INTEGER (but only with not negative numbers). - * - * BOOLEAN: VALUE will be the null terminated string "TRUE" or - * "FALSE" and LEN=5 or LEN=6. - * - * OBJECT IDENTIFIER: VALUE will be a null terminated string with - * each number separated by a dot (i.e. "1.2.3.543.1"). - * - * LEN = strlen(VALUE)+1 - * - * UTCTime: VALUE will be a null terminated string in one of these - * formats: "YYMMDDhhmmss+hh'mm'" or "YYMMDDhhmmss-hh'mm'". - * LEN=strlen(VALUE)+1. - * - * GeneralizedTime: VALUE will be a null terminated string in the - * same format used to set the value. - * - * OCTET STRING: VALUE will contain the octet string and LEN will be - * the number of octets. - * - * GeneralString: VALUE will contain the generalstring and LEN will - * be the number of octets. - * - * BIT STRING: VALUE will contain the bit string organized by bytes - * and LEN will be the number of bits. - * - * CHOICE: If NAME indicates a choice type, VALUE will specify the - * alternative selected. - * - * ANY: If NAME indicates an any type, VALUE will indicate the DER - * encoding of the structure actually used. - * - * Returns: %ASN1_SUCCESS if value is returned, - * %ASN1_ELEMENT_NOT_FOUND if @name is not a valid element, - * %ASN1_VALUE_NOT_FOUND if there isn't any value for the element - * selected, and %ASN1_MEM_ERROR if The value vector isn't big enough - * to store the result, and in this case @len will contain the number of - * bytes needed. On the occasion that the stored data are of zero-length - * this function may return %ASN1_SUCCESS even if the provided @len is zero. - **/ -int -asn1_read_value (asn1_node root, const char *name, void *ivalue, int *len) -{ - return asn1_read_value_type (root, name, ivalue, len, NULL); -} - -/** - * asn1_read_value_type: - * @root: pointer to a structure. - * @name: the name of the element inside a structure that you want to read. - * @ivalue: vector that will contain the element's content, must be a - * pointer to memory cells already allocated (may be %NULL). - * @len: number of bytes of *value: value[0]..value[len-1]. Initialy - * holds the sizeof value. - * @etype: The type of the value read (ASN1_ETYPE) - * - * Returns the type and value of one element inside a structure. - * If an element is OPTIONAL and this returns - * %ASN1_ELEMENT_NOT_FOUND, it means that this element wasn't present - * in the der encoding that created the structure. The first element - * of a SEQUENCE_OF or SET_OF is named "?1". The second one "?2" and - * so on. If the @root provided is a node to specific sequence element, - * then the keyword "?CURRENT" is also acceptable and indicates the - * current sequence element of this node. - * - * Note that there can be valid values with length zero. In these case - * this function will succeed and @len will be zero. - * - * - * INTEGER: VALUE will contain a two's complement form integer. - * - * integer=-1 -> value[0]=0xFF , len=1. - * integer=1 -> value[0]=0x01 , len=1. - * - * ENUMERATED: As INTEGER (but only with not negative numbers). - * - * BOOLEAN: VALUE will be the null terminated string "TRUE" or - * "FALSE" and LEN=5 or LEN=6. - * - * OBJECT IDENTIFIER: VALUE will be a null terminated string with - * each number separated by a dot (i.e. "1.2.3.543.1"). - * - * LEN = strlen(VALUE)+1 - * - * UTCTime: VALUE will be a null terminated string in one of these - * formats: "YYMMDDhhmmss+hh'mm'" or "YYMMDDhhmmss-hh'mm'". - * LEN=strlen(VALUE)+1. - * - * GeneralizedTime: VALUE will be a null terminated string in the - * same format used to set the value. - * - * OCTET STRING: VALUE will contain the octet string and LEN will be - * the number of octets. - * - * GeneralString: VALUE will contain the generalstring and LEN will - * be the number of octets. - * - * BIT STRING: VALUE will contain the bit string organized by bytes - * and LEN will be the number of bits. - * - * CHOICE: If NAME indicates a choice type, VALUE will specify the - * alternative selected. - * - * ANY: If NAME indicates an any type, VALUE will indicate the DER - * encoding of the structure actually used. - * - * Returns: %ASN1_SUCCESS if value is returned, - * %ASN1_ELEMENT_NOT_FOUND if @name is not a valid element, - * %ASN1_VALUE_NOT_FOUND if there isn't any value for the element - * selected, and %ASN1_MEM_ERROR if The value vector isn't big enough - * to store the result, and in this case @len will contain the number of - * bytes needed. On the occasion that the stored data are of zero-length - * this function may return %ASN1_SUCCESS even if the provided @len is zero. - **/ -int -asn1_read_value_type (asn1_node root, const char *name, void *ivalue, - int *len, unsigned int *etype) -{ - asn1_node node, p, p2; - int len2, len3, result; - int value_size = *len; - unsigned char *value = ivalue; - unsigned type; - - node = asn1_find_node (root, name); - if (node == NULL) - return ASN1_ELEMENT_NOT_FOUND; - - type = type_field (node->type); - - if ((type != ASN1_ETYPE_NULL) && - (type != ASN1_ETYPE_CHOICE) && - !(node->type & CONST_DEFAULT) && !(node->type & CONST_ASSIGN) && - (node->value == NULL)) - return ASN1_VALUE_NOT_FOUND; - - if (etype) - *etype = type; - switch (type) - { - case ASN1_ETYPE_NULL: - PUT_STR_VALUE (value, value_size, "NULL"); - break; - case ASN1_ETYPE_BOOLEAN: - if ((node->type & CONST_DEFAULT) && (node->value == NULL)) - { - p = node->down; - while (type_field (p->type) != ASN1_ETYPE_DEFAULT) - p = p->right; - if (p->type & CONST_TRUE) - { - PUT_STR_VALUE (value, value_size, "TRUE"); - } - else - { - PUT_STR_VALUE (value, value_size, "FALSE"); - } - } - else if (node->value[0] == 'T') - { - PUT_STR_VALUE (value, value_size, "TRUE"); - } - else - { - PUT_STR_VALUE (value, value_size, "FALSE"); - } - break; - case ASN1_ETYPE_INTEGER: - case ASN1_ETYPE_ENUMERATED: - if ((node->type & CONST_DEFAULT) && (node->value == NULL)) - { - p = node->down; - while (type_field (p->type) != ASN1_ETYPE_DEFAULT) - p = p->right; - if ((isdigit (p->value[0])) || (p->value[0] == '-') - || (p->value[0] == '+')) - { - result = _asn1_convert_integer - (p->value, value, value_size, len); - if (result != ASN1_SUCCESS) - return result; - } - else - { /* is an identifier like v1 */ - p2 = node->down; - while (p2) - { - if (type_field (p2->type) == ASN1_ETYPE_CONSTANT) - { - if (!_asn1_strcmp (p2->name, p->value)) - { - result = _asn1_convert_integer - (p2->value, value, value_size, - len); - if (result != ASN1_SUCCESS) - return result; - break; - } - } - p2 = p2->right; - } - } - } - else - { - len2 = -1; - result = asn1_get_octet_der - (node->value, node->value_len, &len2, value, value_size, - len); - if (result != ASN1_SUCCESS) - return result; - } - break; - case ASN1_ETYPE_OBJECT_ID: - if (node->type & CONST_ASSIGN) - { - *len = 0; - if (value) - value[0] = 0; - p = node->down; - while (p) - { - if (type_field (p->type) == ASN1_ETYPE_CONSTANT) - { - ADD_STR_VALUE (value, value_size, p->value); - if (p->right) - { - ADD_STR_VALUE (value, value_size, "."); - } - } - p = p->right; - } - (*len)++; - } - else if ((node->type & CONST_DEFAULT) && (node->value == NULL)) - { - p = node->down; - while (type_field (p->type) != ASN1_ETYPE_DEFAULT) - p = p->right; - PUT_STR_VALUE (value, value_size, p->value); - } - else - { - PUT_STR_VALUE (value, value_size, node->value); - } - break; - case ASN1_ETYPE_GENERALIZED_TIME: - case ASN1_ETYPE_UTC_TIME: - PUT_AS_STR_VALUE (value, value_size, node->value, node->value_len); - break; - case ASN1_ETYPE_OCTET_STRING: - case ASN1_ETYPE_GENERALSTRING: - case ASN1_ETYPE_NUMERIC_STRING: - case ASN1_ETYPE_IA5_STRING: - case ASN1_ETYPE_TELETEX_STRING: - case ASN1_ETYPE_PRINTABLE_STRING: - case ASN1_ETYPE_UNIVERSAL_STRING: - case ASN1_ETYPE_BMP_STRING: - case ASN1_ETYPE_UTF8_STRING: - case ASN1_ETYPE_VISIBLE_STRING: - len2 = -1; - result = asn1_get_octet_der - (node->value, node->value_len, &len2, value, value_size, - len); - if (result != ASN1_SUCCESS) - return result; - break; - case ASN1_ETYPE_BIT_STRING: - len2 = -1; - result = asn1_get_bit_der - (node->value, node->value_len, &len2, value, value_size, - len); - if (result != ASN1_SUCCESS) - return result; - break; - case ASN1_ETYPE_CHOICE: - PUT_STR_VALUE (value, value_size, node->down->name); - break; - case ASN1_ETYPE_ANY: - len3 = -1; - len2 = asn1_get_length_der (node->value, node->value_len, &len3); - if (len2 < 0) - return ASN1_DER_ERROR; - PUT_VALUE (value, value_size, node->value + len3, len2); - break; - default: - return ASN1_ELEMENT_NOT_FOUND; - break; - } - return ASN1_SUCCESS; -} - - -/** - * asn1_read_tag: - * @root: pointer to a structure - * @name: the name of the element inside a structure. - * @tagValue: variable that will contain the TAG value. - * @classValue: variable that will specify the TAG type. - * - * Returns the TAG and the CLASS of one element inside a structure. - * CLASS can have one of these constants: %ASN1_CLASS_APPLICATION, - * %ASN1_CLASS_UNIVERSAL, %ASN1_CLASS_PRIVATE or - * %ASN1_CLASS_CONTEXT_SPECIFIC. - * - * Returns: %ASN1_SUCCESS if successful, %ASN1_ELEMENT_NOT_FOUND if - * @name is not a valid element. - **/ -int -asn1_read_tag (asn1_node root, const char *name, int *tagValue, - int *classValue) -{ - asn1_node node, p, pTag; - - node = asn1_find_node (root, name); - if (node == NULL) - return ASN1_ELEMENT_NOT_FOUND; - - p = node->down; - - /* pTag will points to the IMPLICIT TAG */ - pTag = NULL; - if (node->type & CONST_TAG) - { - while (p) - { - if (type_field (p->type) == ASN1_ETYPE_TAG) - { - if ((p->type & CONST_IMPLICIT) && (pTag == NULL)) - pTag = p; - else if (p->type & CONST_EXPLICIT) - pTag = NULL; - } - p = p->right; - } - } - - if (pTag) - { - *tagValue = _asn1_strtoul (pTag->value, NULL, 10); - - if (pTag->type & CONST_APPLICATION) - *classValue = ASN1_CLASS_APPLICATION; - else if (pTag->type & CONST_UNIVERSAL) - *classValue = ASN1_CLASS_UNIVERSAL; - else if (pTag->type & CONST_PRIVATE) - *classValue = ASN1_CLASS_PRIVATE; - else - *classValue = ASN1_CLASS_CONTEXT_SPECIFIC; - } - else - { - unsigned type = type_field (node->type); - *classValue = ASN1_CLASS_UNIVERSAL; - - switch (type) - { - CASE_HANDLED_ETYPES: - *tagValue = _asn1_tags[type].tag; - break; - case ASN1_ETYPE_TAG: - case ASN1_ETYPE_CHOICE: - case ASN1_ETYPE_ANY: - *tagValue = -1; - break; - default: - break; - } - } - - return ASN1_SUCCESS; -} - -/** - * asn1_read_node_value: - * @node: pointer to a node. - * @data: a point to a asn1_data_node_st - * - * Returns the value a data node inside a asn1_node structure. - * The data returned should be handled as constant values. - * - * Returns: %ASN1_SUCCESS if the node exists. - **/ -int -asn1_read_node_value (asn1_node node, asn1_data_node_st * data) -{ - data->name = node->name; - data->value = node->value; - data->value_len = node->value_len; - data->type = type_field (node->type); - - return ASN1_SUCCESS; -} diff --git a/lib/element.h b/lib/element.h deleted file mode 100644 index 4e45367..0000000 --- a/lib/element.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (C) 2000-2014 Free Software Foundation, Inc. - * - * This file is part of LIBTASN1. - * - * The LIBTASN1 library is free software; you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA - */ - -#ifndef _ELEMENT_H -#define _ELEMENT_H - - -struct node_tail_cache_st -{ - asn1_node head; /* the first element of the sequence */ - asn1_node tail; -}; - -int _asn1_append_sequence_set (asn1_node node, struct node_tail_cache_st *pcached); - -int _asn1_convert_integer (const unsigned char *value, - unsigned char *value_out, - int value_out_size, int *len); - -void _asn1_hierarchical_name (asn1_node node, char *name, int name_size); - -#endif diff --git a/lib/errors.c b/lib/errors.c deleted file mode 100644 index fef45ae..0000000 --- a/lib/errors.c +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Copyright (C) 2002-2014 Free Software Foundation, Inc. - * - * This file is part of LIBTASN1. - * - * The LIBTASN1 library is free software; you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA - */ - -#include -#ifdef STDC_HEADERS -#include -#endif - -#define LIBTASN1_ERROR_ENTRY(name) { #name, name } - -struct libtasn1_error_entry -{ - const char *name; - int number; -}; -typedef struct libtasn1_error_entry libtasn1_error_entry; - -static const libtasn1_error_entry error_algorithms[] = { - LIBTASN1_ERROR_ENTRY (ASN1_SUCCESS), - LIBTASN1_ERROR_ENTRY (ASN1_FILE_NOT_FOUND), - LIBTASN1_ERROR_ENTRY (ASN1_ELEMENT_NOT_FOUND), - LIBTASN1_ERROR_ENTRY (ASN1_IDENTIFIER_NOT_FOUND), - LIBTASN1_ERROR_ENTRY (ASN1_DER_ERROR), - LIBTASN1_ERROR_ENTRY (ASN1_VALUE_NOT_FOUND), - LIBTASN1_ERROR_ENTRY (ASN1_GENERIC_ERROR), - LIBTASN1_ERROR_ENTRY (ASN1_VALUE_NOT_VALID), - LIBTASN1_ERROR_ENTRY (ASN1_TAG_ERROR), - LIBTASN1_ERROR_ENTRY (ASN1_TAG_IMPLICIT), - LIBTASN1_ERROR_ENTRY (ASN1_ERROR_TYPE_ANY), - LIBTASN1_ERROR_ENTRY (ASN1_SYNTAX_ERROR), - LIBTASN1_ERROR_ENTRY (ASN1_MEM_ERROR), - LIBTASN1_ERROR_ENTRY (ASN1_MEM_ALLOC_ERROR), - LIBTASN1_ERROR_ENTRY (ASN1_DER_OVERFLOW), - LIBTASN1_ERROR_ENTRY (ASN1_NAME_TOO_LONG), - LIBTASN1_ERROR_ENTRY (ASN1_ARRAY_ERROR), - LIBTASN1_ERROR_ENTRY (ASN1_ELEMENT_NOT_EMPTY), - LIBTASN1_ERROR_ENTRY (ASN1_TIME_ENCODING_ERROR), - {0, 0} -}; - -/** - * asn1_perror: - * @error: is an error returned by a libtasn1 function. - * - * Prints a string to stderr with a description of an error. This - * function is like perror(). The only difference is that it accepts - * an error returned by a libtasn1 function. - * - * Since: 1.6 - **/ -void -asn1_perror (int error) -{ - const char *str = asn1_strerror (error); - fprintf (stderr, "LIBTASN1 ERROR: %s\n", str ? str : "(null)"); -} - -/** - * asn1_strerror: - * @error: is an error returned by a libtasn1 function. - * - * Returns a string with a description of an error. This function is - * similar to strerror. The only difference is that it accepts an - * error (number) returned by a libtasn1 function. - * - * Returns: Pointer to static zero-terminated string describing error - * code. - * - * Since: 1.6 - **/ -const char * -asn1_strerror (int error) -{ - const libtasn1_error_entry *p; - - for (p = error_algorithms; p->name != NULL; p++) - if (p->number == error) - return p->name + sizeof ("ASN1_") - 1; - - return NULL; -} diff --git a/lib/gllib/Makefile.am b/lib/gllib/Makefile.am deleted file mode 100644 index d395304..0000000 --- a/lib/gllib/Makefile.am +++ /dev/null @@ -1,419 +0,0 @@ -## DO NOT EDIT! GENERATED AUTOMATICALLY! -## Process this file with automake to produce Makefile.in. -# Copyright (C) 2002-2017 Free Software Foundation, Inc. -# -# This file is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or -# (at your option) any later version. -# -# This file is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this file. If not, see . -# -# As a special exception to the GNU General Public License, -# this file may be distributed as part of a program that -# contains a configuration script generated by Autoconf, under -# the same distribution terms as the rest of that program. -# -# Generated by gnulib-tool. -# Reproduce by: gnulib-tool --import --lib=libgnu --source-base=lib/gllib --m4-base=lib/glm4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --lgpl=2 --no-conditional-dependencies --libtool --macro-prefix=lgl --no-vc-files hash-pjw-bare intprops lib-symbol-versions lib-symbol-visibility minmax stdint strverscmp - -AUTOMAKE_OPTIONS = 1.9.6 gnits - -SUBDIRS = -noinst_HEADERS = -noinst_LIBRARIES = -noinst_LTLIBRARIES = -EXTRA_DIST = -BUILT_SOURCES = -SUFFIXES = -MOSTLYCLEANFILES = core *.stackdump -MOSTLYCLEANDIRS = -CLEANFILES = -DISTCLEANFILES = -MAINTAINERCLEANFILES = - -AM_CPPFLAGS = -AM_CFLAGS = - -noinst_LTLIBRARIES += libgnu.la - -libgnu_la_SOURCES = -libgnu_la_LIBADD = $(lgl_LTLIBOBJS) -libgnu_la_DEPENDENCIES = $(lgl_LTLIBOBJS) -EXTRA_libgnu_la_SOURCES = -libgnu_la_LDFLAGS = $(AM_LDFLAGS) -libgnu_la_LDFLAGS += -no-undefined - -## begin gnulib module absolute-header - -# Use this preprocessor expression to decide whether #include_next works. -# Do not rely on a 'configure'-time test for this, since the expression -# might appear in an installed header, which is used by some other compiler. -HAVE_INCLUDE_NEXT = (__GNUC__ || 60000000 <= __DECC_VER) - -## end gnulib module absolute-header - -## begin gnulib module hash-pjw-bare - -libgnu_la_SOURCES += hash-pjw-bare.h hash-pjw-bare.c - -## end gnulib module hash-pjw-bare - -## begin gnulib module intprops - - -EXTRA_DIST += intprops.h - -## end gnulib module intprops - -## begin gnulib module lib-symbol-visibility - -# The value of $(CFLAG_VISIBILITY) needs to be added to the CFLAGS for the -# compilation of all sources that make up the library. This line here does it -# only for the gnulib part of it. The developer is responsible for adding -# $(CFLAG_VISIBILITY) to the Makefile.ams of the other portions of the library. -AM_CFLAGS += $(CFLAG_VISIBILITY) - -## end gnulib module lib-symbol-visibility - -## begin gnulib module limits-h - -BUILT_SOURCES += $(LIMITS_H) - -# We need the following in order to create when the system -# doesn't have one that is compatible with GNU. -if GL_GENERATE_LIMITS_H -limits.h: limits.in.h $(top_builddir)/config.status - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''GUARD_PREFIX''@|GL_LGL|g' \ - -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_LIMITS_H''@|$(NEXT_LIMITS_H)|g' \ - < $(srcdir)/limits.in.h; \ - } > $@-t && \ - mv $@-t $@ -else -limits.h: $(top_builddir)/config.status - rm -f $@ -endif -MOSTLYCLEANFILES += limits.h limits.h-t - -EXTRA_DIST += limits.in.h - -## end gnulib module limits-h - -## begin gnulib module minmax - -libgnu_la_SOURCES += minmax.h - -## end gnulib module minmax - -## begin gnulib module snippet/arg-nonnull - -# The BUILT_SOURCES created by this Makefile snippet are not used via #include -# statements but through direct file reference. Therefore this snippet must be -# present in all Makefile.am that need it. This is ensured by the applicability -# 'all' defined above. - -BUILT_SOURCES += arg-nonnull.h -# The arg-nonnull.h that gets inserted into generated .h files is the same as -# build-aux/snippet/arg-nonnull.h, except that it has the copyright header cut -# off. -arg-nonnull.h: $(top_srcdir)/build-aux/snippet/arg-nonnull.h - $(AM_V_GEN)rm -f $@-t $@ && \ - sed -n -e '/GL_ARG_NONNULL/,$$p' \ - < $(top_srcdir)/build-aux/snippet/arg-nonnull.h \ - > $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += arg-nonnull.h arg-nonnull.h-t - -ARG_NONNULL_H=arg-nonnull.h - -EXTRA_DIST += $(top_srcdir)/build-aux/snippet/arg-nonnull.h - -## end gnulib module snippet/arg-nonnull - -## begin gnulib module snippet/c++defs - -# The BUILT_SOURCES created by this Makefile snippet are not used via #include -# statements but through direct file reference. Therefore this snippet must be -# present in all Makefile.am that need it. This is ensured by the applicability -# 'all' defined above. - -BUILT_SOURCES += c++defs.h -# The c++defs.h that gets inserted into generated .h files is the same as -# build-aux/snippet/c++defs.h, except that it has the copyright header cut off. -c++defs.h: $(top_srcdir)/build-aux/snippet/c++defs.h - $(AM_V_GEN)rm -f $@-t $@ && \ - sed -n -e '/_GL_CXXDEFS/,$$p' \ - < $(top_srcdir)/build-aux/snippet/c++defs.h \ - > $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += c++defs.h c++defs.h-t - -CXXDEFS_H=c++defs.h - -EXTRA_DIST += $(top_srcdir)/build-aux/snippet/c++defs.h - -## end gnulib module snippet/c++defs - -## begin gnulib module snippet/warn-on-use - -BUILT_SOURCES += warn-on-use.h -# The warn-on-use.h that gets inserted into generated .h files is the same as -# build-aux/snippet/warn-on-use.h, except that it has the copyright header cut -# off. -warn-on-use.h: $(top_srcdir)/build-aux/snippet/warn-on-use.h - $(AM_V_GEN)rm -f $@-t $@ && \ - sed -n -e '/^.ifndef/,$$p' \ - < $(top_srcdir)/build-aux/snippet/warn-on-use.h \ - > $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += warn-on-use.h warn-on-use.h-t - -WARN_ON_USE_H=warn-on-use.h - -EXTRA_DIST += $(top_srcdir)/build-aux/snippet/warn-on-use.h - -## end gnulib module snippet/warn-on-use - -## begin gnulib module stddef - -BUILT_SOURCES += $(STDDEF_H) - -# We need the following in order to create when the system -# doesn't have one that works with the given compiler. -if GL_GENERATE_STDDEF_H -stddef.h: stddef.in.h $(top_builddir)/config.status - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''GUARD_PREFIX''@|GL_LGL|g' \ - -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_STDDEF_H''@|$(NEXT_STDDEF_H)|g' \ - -e 's|@''HAVE_MAX_ALIGN_T''@|$(HAVE_MAX_ALIGN_T)|g' \ - -e 's|@''HAVE_WCHAR_T''@|$(HAVE_WCHAR_T)|g' \ - -e 's|@''REPLACE_NULL''@|$(REPLACE_NULL)|g' \ - < $(srcdir)/stddef.in.h; \ - } > $@-t && \ - mv $@-t $@ -else -stddef.h: $(top_builddir)/config.status - rm -f $@ -endif -MOSTLYCLEANFILES += stddef.h stddef.h-t - -EXTRA_DIST += stddef.in.h - -## end gnulib module stddef - -## begin gnulib module stdint - -BUILT_SOURCES += $(STDINT_H) - -# We need the following in order to create when the system -# doesn't have one that works with the given compiler. -if GL_GENERATE_STDINT_H -stdint.h: stdint.in.h $(top_builddir)/config.status - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|GL_LGL|g' \ - -e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \ - -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_STDINT_H''@|$(NEXT_STDINT_H)|g' \ - -e 's/@''HAVE_C99_STDINT_H''@/$(HAVE_C99_STDINT_H)/g' \ - -e 's/@''HAVE_SYS_TYPES_H''@/$(HAVE_SYS_TYPES_H)/g' \ - -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \ - -e 's/@''HAVE_SYS_INTTYPES_H''@/$(HAVE_SYS_INTTYPES_H)/g' \ - -e 's/@''HAVE_SYS_BITYPES_H''@/$(HAVE_SYS_BITYPES_H)/g' \ - -e 's/@''HAVE_WCHAR_H''@/$(HAVE_WCHAR_H)/g' \ - -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \ - -e 's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \ - -e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \ - -e 's/@''BITSIZEOF_PTRDIFF_T''@/$(BITSIZEOF_PTRDIFF_T)/g' \ - -e 's/@''PTRDIFF_T_SUFFIX''@/$(PTRDIFF_T_SUFFIX)/g' \ - -e 's/@''BITSIZEOF_SIG_ATOMIC_T''@/$(BITSIZEOF_SIG_ATOMIC_T)/g' \ - -e 's/@''HAVE_SIGNED_SIG_ATOMIC_T''@/$(HAVE_SIGNED_SIG_ATOMIC_T)/g' \ - -e 's/@''SIG_ATOMIC_T_SUFFIX''@/$(SIG_ATOMIC_T_SUFFIX)/g' \ - -e 's/@''BITSIZEOF_SIZE_T''@/$(BITSIZEOF_SIZE_T)/g' \ - -e 's/@''SIZE_T_SUFFIX''@/$(SIZE_T_SUFFIX)/g' \ - -e 's/@''BITSIZEOF_WCHAR_T''@/$(BITSIZEOF_WCHAR_T)/g' \ - -e 's/@''HAVE_SIGNED_WCHAR_T''@/$(HAVE_SIGNED_WCHAR_T)/g' \ - -e 's/@''WCHAR_T_SUFFIX''@/$(WCHAR_T_SUFFIX)/g' \ - -e 's/@''BITSIZEOF_WINT_T''@/$(BITSIZEOF_WINT_T)/g' \ - -e 's/@''HAVE_SIGNED_WINT_T''@/$(HAVE_SIGNED_WINT_T)/g' \ - -e 's/@''WINT_T_SUFFIX''@/$(WINT_T_SUFFIX)/g' \ - -e 's/@''GNULIB_OVERRIDES_WINT_T''@/$(GNULIB_OVERRIDES_WINT_T)/g' \ - < $(srcdir)/stdint.in.h; \ - } > $@-t && \ - mv $@-t $@ -else -stdint.h: $(top_builddir)/config.status - rm -f $@ -endif -MOSTLYCLEANFILES += stdint.h stdint.h-t - -EXTRA_DIST += stdint.in.h - -## end gnulib module stdint - -## begin gnulib module string - -BUILT_SOURCES += string.h - -# We need the following in order to create when the system -# doesn't have one that works with the given compiler. -string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''GUARD_PREFIX''@|GL_LGL|g' \ - -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_STRING_H''@|$(NEXT_STRING_H)|g' \ - -e 's/@''GNULIB_FFSL''@/$(GNULIB_FFSL)/g' \ - -e 's/@''GNULIB_FFSLL''@/$(GNULIB_FFSLL)/g' \ - -e 's/@''GNULIB_MBSLEN''@/$(GNULIB_MBSLEN)/g' \ - -e 's/@''GNULIB_MBSNLEN''@/$(GNULIB_MBSNLEN)/g' \ - -e 's/@''GNULIB_MBSCHR''@/$(GNULIB_MBSCHR)/g' \ - -e 's/@''GNULIB_MBSRCHR''@/$(GNULIB_MBSRCHR)/g' \ - -e 's/@''GNULIB_MBSSTR''@/$(GNULIB_MBSSTR)/g' \ - -e 's/@''GNULIB_MBSCASECMP''@/$(GNULIB_MBSCASECMP)/g' \ - -e 's/@''GNULIB_MBSNCASECMP''@/$(GNULIB_MBSNCASECMP)/g' \ - -e 's/@''GNULIB_MBSPCASECMP''@/$(GNULIB_MBSPCASECMP)/g' \ - -e 's/@''GNULIB_MBSCASESTR''@/$(GNULIB_MBSCASESTR)/g' \ - -e 's/@''GNULIB_MBSCSPN''@/$(GNULIB_MBSCSPN)/g' \ - -e 's/@''GNULIB_MBSPBRK''@/$(GNULIB_MBSPBRK)/g' \ - -e 's/@''GNULIB_MBSSPN''@/$(GNULIB_MBSSPN)/g' \ - -e 's/@''GNULIB_MBSSEP''@/$(GNULIB_MBSSEP)/g' \ - -e 's/@''GNULIB_MBSTOK_R''@/$(GNULIB_MBSTOK_R)/g' \ - -e 's/@''GNULIB_MEMCHR''@/$(GNULIB_MEMCHR)/g' \ - -e 's/@''GNULIB_MEMMEM''@/$(GNULIB_MEMMEM)/g' \ - -e 's/@''GNULIB_MEMPCPY''@/$(GNULIB_MEMPCPY)/g' \ - -e 's/@''GNULIB_MEMRCHR''@/$(GNULIB_MEMRCHR)/g' \ - -e 's/@''GNULIB_RAWMEMCHR''@/$(GNULIB_RAWMEMCHR)/g' \ - -e 's/@''GNULIB_STPCPY''@/$(GNULIB_STPCPY)/g' \ - -e 's/@''GNULIB_STPNCPY''@/$(GNULIB_STPNCPY)/g' \ - -e 's/@''GNULIB_STRCHRNUL''@/$(GNULIB_STRCHRNUL)/g' \ - -e 's/@''GNULIB_STRDUP''@/$(GNULIB_STRDUP)/g' \ - -e 's/@''GNULIB_STRNCAT''@/$(GNULIB_STRNCAT)/g' \ - -e 's/@''GNULIB_STRNDUP''@/$(GNULIB_STRNDUP)/g' \ - -e 's/@''GNULIB_STRNLEN''@/$(GNULIB_STRNLEN)/g' \ - -e 's/@''GNULIB_STRPBRK''@/$(GNULIB_STRPBRK)/g' \ - -e 's/@''GNULIB_STRSEP''@/$(GNULIB_STRSEP)/g' \ - -e 's/@''GNULIB_STRSTR''@/$(GNULIB_STRSTR)/g' \ - -e 's/@''GNULIB_STRCASESTR''@/$(GNULIB_STRCASESTR)/g' \ - -e 's/@''GNULIB_STRTOK_R''@/$(GNULIB_STRTOK_R)/g' \ - -e 's/@''GNULIB_STRERROR''@/$(GNULIB_STRERROR)/g' \ - -e 's/@''GNULIB_STRERROR_R''@/$(GNULIB_STRERROR_R)/g' \ - -e 's/@''GNULIB_STRSIGNAL''@/$(GNULIB_STRSIGNAL)/g' \ - -e 's/@''GNULIB_STRVERSCMP''@/$(GNULIB_STRVERSCMP)/g' \ - < $(srcdir)/string.in.h | \ - sed -e 's|@''HAVE_FFSL''@|$(HAVE_FFSL)|g' \ - -e 's|@''HAVE_FFSLL''@|$(HAVE_FFSLL)|g' \ - -e 's|@''HAVE_MBSLEN''@|$(HAVE_MBSLEN)|g' \ - -e 's|@''HAVE_MEMCHR''@|$(HAVE_MEMCHR)|g' \ - -e 's|@''HAVE_DECL_MEMMEM''@|$(HAVE_DECL_MEMMEM)|g' \ - -e 's|@''HAVE_MEMPCPY''@|$(HAVE_MEMPCPY)|g' \ - -e 's|@''HAVE_DECL_MEMRCHR''@|$(HAVE_DECL_MEMRCHR)|g' \ - -e 's|@''HAVE_RAWMEMCHR''@|$(HAVE_RAWMEMCHR)|g' \ - -e 's|@''HAVE_STPCPY''@|$(HAVE_STPCPY)|g' \ - -e 's|@''HAVE_STPNCPY''@|$(HAVE_STPNCPY)|g' \ - -e 's|@''HAVE_STRCHRNUL''@|$(HAVE_STRCHRNUL)|g' \ - -e 's|@''HAVE_DECL_STRDUP''@|$(HAVE_DECL_STRDUP)|g' \ - -e 's|@''HAVE_DECL_STRNDUP''@|$(HAVE_DECL_STRNDUP)|g' \ - -e 's|@''HAVE_DECL_STRNLEN''@|$(HAVE_DECL_STRNLEN)|g' \ - -e 's|@''HAVE_STRPBRK''@|$(HAVE_STRPBRK)|g' \ - -e 's|@''HAVE_STRSEP''@|$(HAVE_STRSEP)|g' \ - -e 's|@''HAVE_STRCASESTR''@|$(HAVE_STRCASESTR)|g' \ - -e 's|@''HAVE_DECL_STRTOK_R''@|$(HAVE_DECL_STRTOK_R)|g' \ - -e 's|@''HAVE_DECL_STRERROR_R''@|$(HAVE_DECL_STRERROR_R)|g' \ - -e 's|@''HAVE_DECL_STRSIGNAL''@|$(HAVE_DECL_STRSIGNAL)|g' \ - -e 's|@''HAVE_STRVERSCMP''@|$(HAVE_STRVERSCMP)|g' \ - -e 's|@''REPLACE_STPNCPY''@|$(REPLACE_STPNCPY)|g' \ - -e 's|@''REPLACE_MEMCHR''@|$(REPLACE_MEMCHR)|g' \ - -e 's|@''REPLACE_MEMMEM''@|$(REPLACE_MEMMEM)|g' \ - -e 's|@''REPLACE_STRCASESTR''@|$(REPLACE_STRCASESTR)|g' \ - -e 's|@''REPLACE_STRCHRNUL''@|$(REPLACE_STRCHRNUL)|g' \ - -e 's|@''REPLACE_STRDUP''@|$(REPLACE_STRDUP)|g' \ - -e 's|@''REPLACE_STRSTR''@|$(REPLACE_STRSTR)|g' \ - -e 's|@''REPLACE_STRERROR''@|$(REPLACE_STRERROR)|g' \ - -e 's|@''REPLACE_STRERROR_R''@|$(REPLACE_STRERROR_R)|g' \ - -e 's|@''REPLACE_STRNCAT''@|$(REPLACE_STRNCAT)|g' \ - -e 's|@''REPLACE_STRNDUP''@|$(REPLACE_STRNDUP)|g' \ - -e 's|@''REPLACE_STRNLEN''@|$(REPLACE_STRNLEN)|g' \ - -e 's|@''REPLACE_STRSIGNAL''@|$(REPLACE_STRSIGNAL)|g' \ - -e 's|@''REPLACE_STRTOK_R''@|$(REPLACE_STRTOK_R)|g' \ - -e 's|@''UNDEFINE_STRTOK_R''@|$(UNDEFINE_STRTOK_R)|g' \ - -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ - -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ - < $(srcdir)/string.in.h; \ - } > $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += string.h string.h-t - -EXTRA_DIST += string.in.h - -## end gnulib module string - -## begin gnulib module strverscmp - - -EXTRA_DIST += strverscmp.c - -EXTRA_libgnu_la_SOURCES += strverscmp.c - -## end gnulib module strverscmp - -## begin gnulib module sys_types - -BUILT_SOURCES += sys/types.h - -# We need the following in order to create when the system -# doesn't have one that works with the given compiler. -sys/types.h: sys_types.in.h $(top_builddir)/config.status - $(AM_V_at)$(MKDIR_P) sys - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|GL_LGL|g' \ - -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_SYS_TYPES_H''@|$(NEXT_SYS_TYPES_H)|g' \ - -e 's|@''WINDOWS_64_BIT_OFF_T''@|$(WINDOWS_64_BIT_OFF_T)|g' \ - < $(srcdir)/sys_types.in.h; \ - } > $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += sys/types.h sys/types.h-t - -EXTRA_DIST += sys_types.in.h - -## end gnulib module sys_types - -## begin gnulib module verify - - -EXTRA_DIST += verify.h - -## end gnulib module verify - - -mostlyclean-local: mostlyclean-generic - @for dir in '' $(MOSTLYCLEANDIRS); do \ - if test -n "$$dir" && test -d $$dir; then \ - echo "rmdir $$dir"; rmdir $$dir; \ - fi; \ - done; \ - : diff --git a/lib/gllib/hash-pjw-bare.c b/lib/gllib/hash-pjw-bare.c deleted file mode 100644 index df98147..0000000 --- a/lib/gllib/hash-pjw-bare.c +++ /dev/null @@ -1,42 +0,0 @@ -/* hash-pjw-bare.c -- compute a hash value from a provided buffer. - - Copyright (C) 2012-2017 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU Lesser General Public License as published - by the Free Software Foundation; either version 2.1 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . */ - -#include - -#include "hash-pjw-bare.h" - -#include - -#define SIZE_BITS (sizeof (size_t) * CHAR_BIT) - -/* Return a hash of the N bytes of X using the method described by - Bruno Haible in http://www.haible.de/bruno/hashfunc.html. - Note that while many hash functions reduce their result via modulo - to a 0..table_size-1 range, this function does not do that. */ - -size_t -hash_pjw_bare (const void *x, size_t n) -{ - const unsigned char *s = x; - size_t h = 0; - unsigned i; - - for (i = 0; i < n; i++) - h = s[i] + ((h << 9) | (h >> (SIZE_BITS - 9))); - - return h; -} diff --git a/lib/gllib/hash-pjw-bare.h b/lib/gllib/hash-pjw-bare.h deleted file mode 100644 index 7b6d92e..0000000 --- a/lib/gllib/hash-pjw-bare.h +++ /dev/null @@ -1,24 +0,0 @@ -/* hash-pjw-bare.h -- declaration for a simple hash function - Copyright (C) 2012-2017 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU Lesser General Public License as published - by the Free Software Foundation; either version 2.1 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . */ - -#include - -/* Compute a hash code for a buffer starting at X and of size N, - and return the hash code. Note that unlike hash_pjw(), it does not - return it modulo a table size. - The result is platform dependent: it depends on the size of the 'size_t' - type. */ -extern size_t hash_pjw_bare (const void *x, size_t n) _GL_ATTRIBUTE_PURE; diff --git a/lib/gllib/intprops.h b/lib/gllib/intprops.h deleted file mode 100644 index eb06b69..0000000 --- a/lib/gllib/intprops.h +++ /dev/null @@ -1,458 +0,0 @@ -/* intprops.h -- properties of integer types - - Copyright (C) 2001-2017 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU Lesser General Public License as published - by the Free Software Foundation; either version 2.1 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . */ - -/* Written by Paul Eggert. */ - -#ifndef _GL_INTPROPS_H -#define _GL_INTPROPS_H - -#include -#include - -/* Return a value with the common real type of E and V and the value of V. */ -#define _GL_INT_CONVERT(e, v) (0 * (e) + (v)) - -/* Act like _GL_INT_CONVERT (E, -V) but work around a bug in IRIX 6.5 cc; see - . */ -#define _GL_INT_NEGATE_CONVERT(e, v) (0 * (e) - (v)) - -/* The extra casts in the following macros work around compiler bugs, - e.g., in Cray C 5.0.3.0. */ - -/* True if the arithmetic type T is an integer type. bool counts as - an integer. */ -#define TYPE_IS_INTEGER(t) ((t) 1.5 == 1) - -/* True if the real type T is signed. */ -#define TYPE_SIGNED(t) (! ((t) 0 < (t) -1)) - -/* Return 1 if the real expression E, after promotion, has a - signed or floating type. */ -#define EXPR_SIGNED(e) (_GL_INT_NEGATE_CONVERT (e, 1) < 0) - - -/* Minimum and maximum values for integer types and expressions. */ - -/* The width in bits of the integer type or expression T. - Padding bits are not supported; this is checked at compile-time below. */ -#define TYPE_WIDTH(t) (sizeof (t) * CHAR_BIT) - -/* The maximum and minimum values for the integer type T. */ -#define TYPE_MINIMUM(t) ((t) ~ TYPE_MAXIMUM (t)) -#define TYPE_MAXIMUM(t) \ - ((t) (! TYPE_SIGNED (t) \ - ? (t) -1 \ - : ((((t) 1 << (TYPE_WIDTH (t) - 2)) - 1) * 2 + 1))) - -/* The maximum and minimum values for the type of the expression E, - after integer promotion. E should not have side effects. */ -#define _GL_INT_MINIMUM(e) \ - (EXPR_SIGNED (e) \ - ? ~ _GL_SIGNED_INT_MAXIMUM (e) \ - : _GL_INT_CONVERT (e, 0)) -#define _GL_INT_MAXIMUM(e) \ - (EXPR_SIGNED (e) \ - ? _GL_SIGNED_INT_MAXIMUM (e) \ - : _GL_INT_NEGATE_CONVERT (e, 1)) -#define _GL_SIGNED_INT_MAXIMUM(e) \ - (((_GL_INT_CONVERT (e, 1) << (TYPE_WIDTH ((e) + 0) - 2)) - 1) * 2 + 1) - -/* Work around OpenVMS incompatibility with C99. */ -#if !defined LLONG_MAX && defined __INT64_MAX -# define LLONG_MAX __INT64_MAX -# define LLONG_MIN __INT64_MIN -#endif - -/* This include file assumes that signed types are two's complement without - padding bits; the above macros have undefined behavior otherwise. - If this is a problem for you, please let us know how to fix it for your host. - As a sanity check, test the assumption for some signed types that - bounds. */ -verify (TYPE_MINIMUM (signed char) == SCHAR_MIN); -verify (TYPE_MAXIMUM (signed char) == SCHAR_MAX); -verify (TYPE_MINIMUM (short int) == SHRT_MIN); -verify (TYPE_MAXIMUM (short int) == SHRT_MAX); -verify (TYPE_MINIMUM (int) == INT_MIN); -verify (TYPE_MAXIMUM (int) == INT_MAX); -verify (TYPE_MINIMUM (long int) == LONG_MIN); -verify (TYPE_MAXIMUM (long int) == LONG_MAX); -#ifdef LLONG_MAX -verify (TYPE_MINIMUM (long long int) == LLONG_MIN); -verify (TYPE_MAXIMUM (long long int) == LLONG_MAX); -#endif -/* Similarly, sanity-check one ISO/IEC TS 18661-1:2014 macro if defined. */ -#ifdef UINT_WIDTH -verify (TYPE_WIDTH (unsigned int) == UINT_WIDTH); -#endif - -/* Does the __typeof__ keyword work? This could be done by - 'configure', but for now it's easier to do it by hand. */ -#if (2 <= __GNUC__ \ - || (1210 <= __IBMC__ && defined __IBM__TYPEOF__) \ - || (0x5110 <= __SUNPRO_C && !__STDC__)) -# define _GL_HAVE___TYPEOF__ 1 -#else -# define _GL_HAVE___TYPEOF__ 0 -#endif - -/* Return 1 if the integer type or expression T might be signed. Return 0 - if it is definitely unsigned. This macro does not evaluate its argument, - and expands to an integer constant expression. */ -#if _GL_HAVE___TYPEOF__ -# define _GL_SIGNED_TYPE_OR_EXPR(t) TYPE_SIGNED (__typeof__ (t)) -#else -# define _GL_SIGNED_TYPE_OR_EXPR(t) 1 -#endif - -/* Bound on length of the string representing an unsigned integer - value representable in B bits. log10 (2.0) < 146/485. The - smallest value of B where this bound is not tight is 2621. */ -#define INT_BITS_STRLEN_BOUND(b) (((b) * 146 + 484) / 485) - -/* Bound on length of the string representing an integer type or expression T. - Subtract 1 for the sign bit if T is signed, and then add 1 more for - a minus sign if needed. - - Because _GL_SIGNED_TYPE_OR_EXPR sometimes returns 0 when its argument is - signed, this macro may overestimate the true bound by one byte when - applied to unsigned types of size 2, 4, 16, ... bytes. */ -#define INT_STRLEN_BOUND(t) \ - (INT_BITS_STRLEN_BOUND (TYPE_WIDTH (t) - _GL_SIGNED_TYPE_OR_EXPR (t)) \ - + _GL_SIGNED_TYPE_OR_EXPR (t)) - -/* Bound on buffer size needed to represent an integer type or expression T, - including the terminating null. */ -#define INT_BUFSIZE_BOUND(t) (INT_STRLEN_BOUND (t) + 1) - - -/* Range overflow checks. - - The INT__RANGE_OVERFLOW macros return 1 if the corresponding C - operators might not yield numerically correct answers due to - arithmetic overflow. They do not rely on undefined or - implementation-defined behavior. Their implementations are simple - and straightforward, but they are a bit harder to use than the - INT__OVERFLOW macros described below. - - Example usage: - - long int i = ...; - long int j = ...; - if (INT_MULTIPLY_RANGE_OVERFLOW (i, j, LONG_MIN, LONG_MAX)) - printf ("multiply would overflow"); - else - printf ("product is %ld", i * j); - - Restrictions on *_RANGE_OVERFLOW macros: - - These macros do not check for all possible numerical problems or - undefined or unspecified behavior: they do not check for division - by zero, for bad shift counts, or for shifting negative numbers. - - These macros may evaluate their arguments zero or multiple times, - so the arguments should not have side effects. The arithmetic - arguments (including the MIN and MAX arguments) must be of the same - integer type after the usual arithmetic conversions, and the type - must have minimum value MIN and maximum MAX. Unsigned types should - use a zero MIN of the proper type. - - These macros are tuned for constant MIN and MAX. For commutative - operations such as A + B, they are also tuned for constant B. */ - -/* Return 1 if A + B would overflow in [MIN,MAX] arithmetic. - See above for restrictions. */ -#define INT_ADD_RANGE_OVERFLOW(a, b, min, max) \ - ((b) < 0 \ - ? (a) < (min) - (b) \ - : (max) - (b) < (a)) - -/* Return 1 if A - B would overflow in [MIN,MAX] arithmetic. - See above for restrictions. */ -#define INT_SUBTRACT_RANGE_OVERFLOW(a, b, min, max) \ - ((b) < 0 \ - ? (max) + (b) < (a) \ - : (a) < (min) + (b)) - -/* Return 1 if - A would overflow in [MIN,MAX] arithmetic. - See above for restrictions. */ -#define INT_NEGATE_RANGE_OVERFLOW(a, min, max) \ - ((min) < 0 \ - ? (a) < - (max) \ - : 0 < (a)) - -/* Return 1 if A * B would overflow in [MIN,MAX] arithmetic. - See above for restrictions. Avoid && and || as they tickle - bugs in Sun C 5.11 2010/08/13 and other compilers; see - . */ -#define INT_MULTIPLY_RANGE_OVERFLOW(a, b, min, max) \ - ((b) < 0 \ - ? ((a) < 0 \ - ? (a) < (max) / (b) \ - : (b) == -1 \ - ? 0 \ - : (min) / (b) < (a)) \ - : (b) == 0 \ - ? 0 \ - : ((a) < 0 \ - ? (a) < (min) / (b) \ - : (max) / (b) < (a))) - -/* Return 1 if A / B would overflow in [MIN,MAX] arithmetic. - See above for restrictions. Do not check for division by zero. */ -#define INT_DIVIDE_RANGE_OVERFLOW(a, b, min, max) \ - ((min) < 0 && (b) == -1 && (a) < - (max)) - -/* Return 1 if A % B would overflow in [MIN,MAX] arithmetic. - See above for restrictions. Do not check for division by zero. - Mathematically, % should never overflow, but on x86-like hosts - INT_MIN % -1 traps, and the C standard permits this, so treat this - as an overflow too. */ -#define INT_REMAINDER_RANGE_OVERFLOW(a, b, min, max) \ - INT_DIVIDE_RANGE_OVERFLOW (a, b, min, max) - -/* Return 1 if A << B would overflow in [MIN,MAX] arithmetic. - See above for restrictions. Here, MIN and MAX are for A only, and B need - not be of the same type as the other arguments. The C standard says that - behavior is undefined for shifts unless 0 <= B < wordwidth, and that when - A is negative then A << B has undefined behavior and A >> B has - implementation-defined behavior, but do not check these other - restrictions. */ -#define INT_LEFT_SHIFT_RANGE_OVERFLOW(a, b, min, max) \ - ((a) < 0 \ - ? (a) < (min) >> (b) \ - : (max) >> (b) < (a)) - -/* True if __builtin_add_overflow (A, B, P) works when P is non-null. */ -#define _GL_HAS_BUILTIN_OVERFLOW (5 <= __GNUC__) - -/* True if __builtin_add_overflow_p (A, B, C) works. */ -#define _GL_HAS_BUILTIN_OVERFLOW_P (7 <= __GNUC__) - -/* The _GL*_OVERFLOW macros have the same restrictions as the - *_RANGE_OVERFLOW macros, except that they do not assume that operands - (e.g., A and B) have the same type as MIN and MAX. Instead, they assume - that the result (e.g., A + B) has that type. */ -#if _GL_HAS_BUILTIN_OVERFLOW_P -# define _GL_ADD_OVERFLOW(a, b, min, max) \ - __builtin_add_overflow_p (a, b, (__typeof__ ((a) + (b))) 0) -# define _GL_SUBTRACT_OVERFLOW(a, b, min, max) \ - __builtin_sub_overflow_p (a, b, (__typeof__ ((a) - (b))) 0) -# define _GL_MULTIPLY_OVERFLOW(a, b, min, max) \ - __builtin_mul_overflow_p (a, b, (__typeof__ ((a) * (b))) 0) -#else -# define _GL_ADD_OVERFLOW(a, b, min, max) \ - ((min) < 0 ? INT_ADD_RANGE_OVERFLOW (a, b, min, max) \ - : (a) < 0 ? (b) <= (a) + (b) \ - : (b) < 0 ? (a) <= (a) + (b) \ - : (a) + (b) < (b)) -# define _GL_SUBTRACT_OVERFLOW(a, b, min, max) \ - ((min) < 0 ? INT_SUBTRACT_RANGE_OVERFLOW (a, b, min, max) \ - : (a) < 0 ? 1 \ - : (b) < 0 ? (a) - (b) <= (a) \ - : (a) < (b)) -# define _GL_MULTIPLY_OVERFLOW(a, b, min, max) \ - (((min) == 0 && (((a) < 0 && 0 < (b)) || ((b) < 0 && 0 < (a)))) \ - || INT_MULTIPLY_RANGE_OVERFLOW (a, b, min, max)) -#endif -#define _GL_DIVIDE_OVERFLOW(a, b, min, max) \ - ((min) < 0 ? (b) == _GL_INT_NEGATE_CONVERT (min, 1) && (a) < - (max) \ - : (a) < 0 ? (b) <= (a) + (b) - 1 \ - : (b) < 0 && (a) + (b) <= (a)) -#define _GL_REMAINDER_OVERFLOW(a, b, min, max) \ - ((min) < 0 ? (b) == _GL_INT_NEGATE_CONVERT (min, 1) && (a) < - (max) \ - : (a) < 0 ? (a) % (b) != ((max) - (b) + 1) % (b) \ - : (b) < 0 && ! _GL_UNSIGNED_NEG_MULTIPLE (a, b, max)) - -/* Return a nonzero value if A is a mathematical multiple of B, where - A is unsigned, B is negative, and MAX is the maximum value of A's - type. A's type must be the same as (A % B)'s type. Normally (A % - -B == 0) suffices, but things get tricky if -B would overflow. */ -#define _GL_UNSIGNED_NEG_MULTIPLE(a, b, max) \ - (((b) < -_GL_SIGNED_INT_MAXIMUM (b) \ - ? (_GL_SIGNED_INT_MAXIMUM (b) == (max) \ - ? (a) \ - : (a) % (_GL_INT_CONVERT (a, _GL_SIGNED_INT_MAXIMUM (b)) + 1)) \ - : (a) % - (b)) \ - == 0) - -/* Check for integer overflow, and report low order bits of answer. - - The INT__OVERFLOW macros return 1 if the corresponding C operators - might not yield numerically correct answers due to arithmetic overflow. - The INT__WRAPV macros also store the low-order bits of the answer. - These macros work correctly on all known practical hosts, and do not rely - on undefined behavior due to signed arithmetic overflow. - - Example usage, assuming A and B are long int: - - if (INT_MULTIPLY_OVERFLOW (a, b)) - printf ("result would overflow\n"); - else - printf ("result is %ld (no overflow)\n", a * b); - - Example usage with WRAPV flavor: - - long int result; - bool overflow = INT_MULTIPLY_WRAPV (a, b, &result); - printf ("result is %ld (%s)\n", result, - overflow ? "after overflow" : "no overflow"); - - Restrictions on these macros: - - These macros do not check for all possible numerical problems or - undefined or unspecified behavior: they do not check for division - by zero, for bad shift counts, or for shifting negative numbers. - - These macros may evaluate their arguments zero or multiple times, so the - arguments should not have side effects. - - The WRAPV macros are not constant expressions. They support only - +, binary -, and *. The result type must be signed. - - These macros are tuned for their last argument being a constant. - - Return 1 if the integer expressions A * B, A - B, -A, A * B, A / B, - A % B, and A << B would overflow, respectively. */ - -#define INT_ADD_OVERFLOW(a, b) \ - _GL_BINARY_OP_OVERFLOW (a, b, _GL_ADD_OVERFLOW) -#define INT_SUBTRACT_OVERFLOW(a, b) \ - _GL_BINARY_OP_OVERFLOW (a, b, _GL_SUBTRACT_OVERFLOW) -#if _GL_HAS_BUILTIN_OVERFLOW_P -# define INT_NEGATE_OVERFLOW(a) INT_SUBTRACT_OVERFLOW (0, a) -#else -# define INT_NEGATE_OVERFLOW(a) \ - INT_NEGATE_RANGE_OVERFLOW (a, _GL_INT_MINIMUM (a), _GL_INT_MAXIMUM (a)) -#endif -#define INT_MULTIPLY_OVERFLOW(a, b) \ - _GL_BINARY_OP_OVERFLOW (a, b, _GL_MULTIPLY_OVERFLOW) -#define INT_DIVIDE_OVERFLOW(a, b) \ - _GL_BINARY_OP_OVERFLOW (a, b, _GL_DIVIDE_OVERFLOW) -#define INT_REMAINDER_OVERFLOW(a, b) \ - _GL_BINARY_OP_OVERFLOW (a, b, _GL_REMAINDER_OVERFLOW) -#define INT_LEFT_SHIFT_OVERFLOW(a, b) \ - INT_LEFT_SHIFT_RANGE_OVERFLOW (a, b, \ - _GL_INT_MINIMUM (a), _GL_INT_MAXIMUM (a)) - -/* Return 1 if the expression A B would overflow, - where OP_RESULT_OVERFLOW (A, B, MIN, MAX) does the actual test, - assuming MIN and MAX are the minimum and maximum for the result type. - Arguments should be free of side effects. */ -#define _GL_BINARY_OP_OVERFLOW(a, b, op_result_overflow) \ - op_result_overflow (a, b, \ - _GL_INT_MINIMUM (0 * (b) + (a)), \ - _GL_INT_MAXIMUM (0 * (b) + (a))) - -/* Store the low-order bits of A + B, A - B, A * B, respectively, into *R. - Return 1 if the result overflows. See above for restrictions. */ -#define INT_ADD_WRAPV(a, b, r) \ - _GL_INT_OP_WRAPV (a, b, r, +, __builtin_add_overflow, INT_ADD_OVERFLOW) -#define INT_SUBTRACT_WRAPV(a, b, r) \ - _GL_INT_OP_WRAPV (a, b, r, -, __builtin_sub_overflow, INT_SUBTRACT_OVERFLOW) -#define INT_MULTIPLY_WRAPV(a, b, r) \ - _GL_INT_OP_WRAPV (a, b, r, *, __builtin_mul_overflow, INT_MULTIPLY_OVERFLOW) - -/* Nonzero if this compiler has GCC bug 68193 or Clang bug 25390. See: - https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68193 - https://llvm.org/bugs/show_bug.cgi?id=25390 - For now, assume all versions of GCC-like compilers generate bogus - warnings for _Generic. This matters only for older compilers that - lack __builtin_add_overflow. */ -#if __GNUC__ -# define _GL__GENERIC_BOGUS 1 -#else -# define _GL__GENERIC_BOGUS 0 -#endif - -/* Store the low-order bits of A B into *R, where OP specifies - the operation. BUILTIN is the builtin operation, and OVERFLOW the - overflow predicate. Return 1 if the result overflows. See above - for restrictions. */ -#if _GL_HAS_BUILTIN_OVERFLOW -# define _GL_INT_OP_WRAPV(a, b, r, op, builtin, overflow) builtin (a, b, r) -#elif 201112 <= __STDC_VERSION__ && !_GL__GENERIC_BOGUS -# define _GL_INT_OP_WRAPV(a, b, r, op, builtin, overflow) \ - (_Generic \ - (*(r), \ - signed char: \ - _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned char, \ - signed char, SCHAR_MIN, SCHAR_MAX), \ - short int: \ - _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned short int, \ - short int, SHRT_MIN, SHRT_MAX), \ - int: \ - _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \ - int, INT_MIN, INT_MAX), \ - long int: \ - _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \ - long int, LONG_MIN, LONG_MAX), \ - long long int: \ - _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long long int, \ - long long int, LLONG_MIN, LLONG_MAX))) -#else -# define _GL_INT_OP_WRAPV(a, b, r, op, builtin, overflow) \ - (sizeof *(r) == sizeof (signed char) \ - ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned char, \ - signed char, SCHAR_MIN, SCHAR_MAX) \ - : sizeof *(r) == sizeof (short int) \ - ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned short int, \ - short int, SHRT_MIN, SHRT_MAX) \ - : sizeof *(r) == sizeof (int) \ - ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \ - int, INT_MIN, INT_MAX) \ - : _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow)) -# ifdef LLONG_MAX -# define _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow) \ - (sizeof *(r) == sizeof (long int) \ - ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \ - long int, LONG_MIN, LONG_MAX) \ - : _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long long int, \ - long long int, LLONG_MIN, LLONG_MAX)) -# else -# define _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow) \ - _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \ - long int, LONG_MIN, LONG_MAX) -# endif -#endif - -/* Store the low-order bits of A B into *R, where the operation - is given by OP. Use the unsigned type UT for calculation to avoid - overflow problems. *R's type is T, with extremal values TMIN and - TMAX. T must be a signed integer type. Return 1 if the result - overflows. */ -#define _GL_INT_OP_CALC(a, b, r, op, overflow, ut, t, tmin, tmax) \ - (sizeof ((a) op (b)) < sizeof (t) \ - ? _GL_INT_OP_CALC1 ((t) (a), (t) (b), r, op, overflow, ut, t, tmin, tmax) \ - : _GL_INT_OP_CALC1 (a, b, r, op, overflow, ut, t, tmin, tmax)) -#define _GL_INT_OP_CALC1(a, b, r, op, overflow, ut, t, tmin, tmax) \ - ((overflow (a, b) \ - || (EXPR_SIGNED ((a) op (b)) && ((a) op (b)) < (tmin)) \ - || (tmax) < ((a) op (b))) \ - ? (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a, b, op, ut, t, tmin, tmax), 1) \ - : (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a, b, op, ut, t, tmin, tmax), 0)) - -/* Return A B, where the operation is given by OP. Use the - unsigned type UT for calculation to avoid overflow problems. - Convert the result to type T without overflow by subtracting TMIN - from large values before converting, and adding it afterwards. - Compilers can optimize all the operations except OP. */ -#define _GL_INT_OP_WRAPV_VIA_UNSIGNED(a, b, op, ut, t, tmin, tmax) \ - (((ut) (a) op (ut) (b)) <= (tmax) \ - ? (t) ((ut) (a) op (ut) (b)) \ - : ((t) (((ut) (a) op (ut) (b)) - (tmin)) + (tmin))) - -#endif /* _GL_INTPROPS_H */ diff --git a/lib/gllib/limits.in.h b/lib/gllib/limits.in.h deleted file mode 100644 index 02faeb6..0000000 --- a/lib/gllib/limits.in.h +++ /dev/null @@ -1,63 +0,0 @@ -/* A GNU-like . - - Copyright 2016-2017 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License - as published by the Free Software Foundation; either version 2.1, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this program; if not, see . */ - -#ifndef _@GUARD_PREFIX@_LIMITS_H - -#if __GNUC__ >= 3 -@PRAGMA_SYSTEM_HEADER@ -#endif -@PRAGMA_COLUMNS@ - -/* The include_next requires a split double-inclusion guard. */ -#@INCLUDE_NEXT@ @NEXT_LIMITS_H@ - -#ifndef _@GUARD_PREFIX@_LIMITS_H -#define _@GUARD_PREFIX@_LIMITS_H - -/* The number of usable bits in an unsigned or signed integer type - with minimum value MIN and maximum value MAX, as an int expression - suitable in #if. Cover all known practical hosts. This - implementation exploits the fact that MAX is 1 less than a power of - 2, and merely counts the number of 1 bits in MAX; "COBn" means - "count the number of 1 bits in the low-order n bits"). */ -#define _GL_INTEGER_WIDTH(min, max) (((min) < 0) + _GL_COB128 (max)) -#define _GL_COB128(n) (_GL_COB64 ((n) >> 31 >> 31 >> 2) + _GL_COB64 (n)) -#define _GL_COB64(n) (_GL_COB32 ((n) >> 31 >> 1) + _GL_COB32 (n)) -#define _GL_COB32(n) (_GL_COB16 ((n) >> 16) + _GL_COB16 (n)) -#define _GL_COB16(n) (_GL_COB8 ((n) >> 8) + _GL_COB8 (n)) -#define _GL_COB8(n) (_GL_COB4 ((n) >> 4) + _GL_COB4 (n)) -#define _GL_COB4(n) (!!((n) & 8) + !!((n) & 4) + !!((n) & 2) + !!((n) & 1)) - -/* Macros specified by ISO/IEC TS 18661-1:2014. */ - -#if (! defined ULLONG_WIDTH \ - && (defined _GNU_SOURCE || defined __STDC_WANT_IEC_60559_BFP_EXT__)) -# define CHAR_WIDTH _GL_INTEGER_WIDTH (CHAR_MIN, CHAR_MAX) -# define SCHAR_WIDTH _GL_INTEGER_WIDTH (SCHAR_MIN, SCHAR_MAX) -# define UCHAR_WIDTH _GL_INTEGER_WIDTH (0, UCHAR_MAX) -# define SHRT_WIDTH _GL_INTEGER_WIDTH (SHRT_MIN, SHRT_MAX) -# define USHRT_WIDTH _GL_INTEGER_WIDTH (0, USHRT_MAX) -# define INT_WIDTH _GL_INTEGER_WIDTH (INT_MIN, INT_MAX) -# define UINT_WIDTH _GL_INTEGER_WIDTH (0, UINT_MAX) -# define LONG_WIDTH _GL_INTEGER_WIDTH (LONG_MIN, LONG_MAX) -# define ULONG_WIDTH _GL_INTEGER_WIDTH (0, ULONG_MAX) -# define LLONG_WIDTH _GL_INTEGER_WIDTH (LLONG_MIN, LLONG_MAX) -# define ULLONG_WIDTH _GL_INTEGER_WIDTH (0, ULLONG_MAX) -#endif /* !ULLONG_WIDTH && (_GNU_SOURCE || __STDC_WANT_IEC_60559_BFP_EXT__) */ - -#endif /* _@GUARD_PREFIX@_LIMITS_H */ -#endif /* _@GUARD_PREFIX@_LIMITS_H */ diff --git a/lib/gllib/minmax.h b/lib/gllib/minmax.h deleted file mode 100644 index c5344c4..0000000 --- a/lib/gllib/minmax.h +++ /dev/null @@ -1,60 +0,0 @@ -/* MIN, MAX macros. - Copyright (C) 1995, 1998, 2001, 2003, 2005, 2009-2017 Free Software - Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this program; if not, see . */ - -#ifndef _MINMAX_H -#define _MINMAX_H - -/* Note: MIN, MAX are also defined in on some systems - (glibc, IRIX, HP-UX, OSF/1). Therefore you might get warnings about - MIN, MAX macro redefinitions on some systems; the workaround is to - #include this file as the last one among the #include list. */ - -/* Before we define the following symbols we get the file - since otherwise we get redefinitions on some systems if is - included after this file. Likewise for . - If more than one of these system headers define MIN and MAX, pick just - one of the headers (because the definitions most likely are the same). */ -#if HAVE_MINMAX_IN_LIMITS_H -# include -#elif HAVE_MINMAX_IN_SYS_PARAM_H -# include -#endif - -/* Note: MIN and MAX should be used with two arguments of the - same type. They might not return the minimum and maximum of their two - arguments, if the arguments have different types or have unusual - floating-point values. For example, on a typical host with 32-bit 'int', - 64-bit 'long long', and 64-bit IEEE 754 'double' types: - - MAX (-1, 2147483648) returns 4294967295. - MAX (9007199254740992.0, 9007199254740993) returns 9007199254740992.0. - MAX (NaN, 0.0) returns 0.0. - MAX (+0.0, -0.0) returns -0.0. - - and in each case the answer is in some sense bogus. */ - -/* MAX(a,b) returns the maximum of A and B. */ -#ifndef MAX -# define MAX(a,b) ((a) > (b) ? (a) : (b)) -#endif - -/* MIN(a,b) returns the minimum of A and B. */ -#ifndef MIN -# define MIN(a,b) ((a) < (b) ? (a) : (b)) -#endif - -#endif /* _MINMAX_H */ diff --git a/lib/gllib/stddef.in.h b/lib/gllib/stddef.in.h deleted file mode 100644 index c828192..0000000 --- a/lib/gllib/stddef.in.h +++ /dev/null @@ -1,110 +0,0 @@ -/* A substitute for POSIX 2008 , for platforms that have issues. - - Copyright (C) 2009-2017 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this program; if not, see . */ - -/* Written by Eric Blake. */ - -/* - * POSIX 2008 for platforms that have issues. - * - */ - -#if __GNUC__ >= 3 -@PRAGMA_SYSTEM_HEADER@ -#endif -@PRAGMA_COLUMNS@ - -#if defined __need_wchar_t || defined __need_size_t \ - || defined __need_ptrdiff_t || defined __need_NULL \ - || defined __need_wint_t -/* Special invocation convention inside gcc header files. In - particular, gcc provides a version of that blindly - redefines NULL even when __need_wint_t was defined, even though - wint_t is not normally provided by . Hence, we must - remember if special invocation has ever been used to obtain wint_t, - in which case we need to clean up NULL yet again. */ - -# if !(defined _@GUARD_PREFIX@_STDDEF_H && defined _GL_STDDEF_WINT_T) -# ifdef __need_wint_t -# define _GL_STDDEF_WINT_T -# endif -# @INCLUDE_NEXT@ @NEXT_STDDEF_H@ -# endif - -#else -/* Normal invocation convention. */ - -# ifndef _@GUARD_PREFIX@_STDDEF_H - -/* The include_next requires a split double-inclusion guard. */ - -# @INCLUDE_NEXT@ @NEXT_STDDEF_H@ - -/* On NetBSD 5.0, the definition of NULL lacks proper parentheses. */ -# if (@REPLACE_NULL@ \ - && (!defined _@GUARD_PREFIX@_STDDEF_H || defined _GL_STDDEF_WINT_T)) -# undef NULL -# ifdef __cplusplus - /* ISO C++ says that the macro NULL must expand to an integer constant - expression, hence '((void *) 0)' is not allowed in C++. */ -# if __GNUG__ >= 3 - /* GNU C++ has a __null macro that behaves like an integer ('int' or - 'long') but has the same size as a pointer. Use that, to avoid - warnings. */ -# define NULL __null -# else -# define NULL 0L -# endif -# else -# define NULL ((void *) 0) -# endif -# endif - -# ifndef _@GUARD_PREFIX@_STDDEF_H -# define _@GUARD_PREFIX@_STDDEF_H - -/* Some platforms lack wchar_t. */ -#if !@HAVE_WCHAR_T@ -# define wchar_t int -#endif - -/* Some platforms lack max_align_t. The check for _GCC_MAX_ALIGN_T is - a hack in case the configure-time test was done with g++ even though - we are currently compiling with gcc. */ -#if ! (@HAVE_MAX_ALIGN_T@ || defined _GCC_MAX_ALIGN_T) -/* On the x86, the maximum storage alignment of double, long, etc. is 4, - but GCC's C11 ABI for x86 says that max_align_t has an alignment of 8, - and the C11 standard allows this. Work around this problem by - using __alignof__ (which returns 8 for double) rather than _Alignof - (which returns 4), and align each union member accordingly. */ -# ifdef __GNUC__ -# define _GL_STDDEF_ALIGNAS(type) \ - __attribute__ ((__aligned__ (__alignof__ (type)))) -# else -# define _GL_STDDEF_ALIGNAS(type) /* */ -# endif -typedef union -{ - char *__p _GL_STDDEF_ALIGNAS (char *); - double __d _GL_STDDEF_ALIGNAS (double); - long double __ld _GL_STDDEF_ALIGNAS (long double); - long int __i _GL_STDDEF_ALIGNAS (long int); -} max_align_t; -#endif - -# endif /* _@GUARD_PREFIX@_STDDEF_H */ -# endif /* _@GUARD_PREFIX@_STDDEF_H */ -#endif /* __need_XXX */ diff --git a/lib/gllib/stdint.in.h b/lib/gllib/stdint.in.h deleted file mode 100644 index 1251a92..0000000 --- a/lib/gllib/stdint.in.h +++ /dev/null @@ -1,707 +0,0 @@ -/* Copyright (C) 2001-2002, 2004-2017 Free Software Foundation, Inc. - Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood. - This file is part of gnulib. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this program; if not, see . */ - -/* - * ISO C 99 for platforms that lack it. - * - */ - -#ifndef _@GUARD_PREFIX@_STDINT_H - -#if __GNUC__ >= 3 -@PRAGMA_SYSTEM_HEADER@ -#endif -@PRAGMA_COLUMNS@ - -/* When including a system file that in turn includes , - use the system , not our substitute. This avoids - problems with (for example) VMS, whose includes - . */ -#define _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H - -/* On Android (Bionic libc), includes this file before - having defined 'time_t'. Therefore in this case avoid including - other system header files; just include the system's . - Ideally we should test __BIONIC__ here, but it is only defined after - has been included; hence test __ANDROID__ instead. */ -#if defined __ANDROID__ && defined _GL_INCLUDING_SYS_TYPES_H -# @INCLUDE_NEXT@ @NEXT_STDINT_H@ -#else - -/* Get those types that are already defined in other system include - files, so that we can "#define int8_t signed char" below without - worrying about a later system include file containing a "typedef - signed char int8_t;" that will get messed up by our macro. Our - macros should all be consistent with the system versions, except - for the "fast" types and macros, which we recommend against using - in public interfaces due to compiler differences. */ - -#if @HAVE_STDINT_H@ -# if defined __sgi && ! defined __c99 - /* Bypass IRIX's if in C89 mode, since it merely annoys users - with "This header file is to be used only for c99 mode compilations" - diagnostics. */ -# define __STDINT_H__ -# endif - - /* Some pre-C++11 implementations need this. */ -# ifdef __cplusplus -# ifndef __STDC_CONSTANT_MACROS -# define __STDC_CONSTANT_MACROS 1 -# endif -# ifndef __STDC_LIMIT_MACROS -# define __STDC_LIMIT_MACROS 1 -# endif -# endif - - /* Other systems may have an incomplete or buggy . - Include it before , since any "#include " - in would reinclude us, skipping our contents because - _@GUARD_PREFIX@_STDINT_H is defined. - The include_next requires a split double-inclusion guard. */ -# @INCLUDE_NEXT@ @NEXT_STDINT_H@ -#endif - -#if ! defined _@GUARD_PREFIX@_STDINT_H && ! defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H -#define _@GUARD_PREFIX@_STDINT_H - -/* Get SCHAR_MIN, SCHAR_MAX, UCHAR_MAX, INT_MIN, INT_MAX, - LONG_MIN, LONG_MAX, ULONG_MAX, _GL_INTEGER_WIDTH. */ -#include - -/* Override WINT_MIN and WINT_MAX if gnulib's or overrides - wint_t. */ -#if @GNULIB_OVERRIDES_WINT_T@ -# undef WINT_MIN -# undef WINT_MAX -# define WINT_MIN 0x0U -# define WINT_MAX 0xffffffffU -#endif - -#if ! @HAVE_C99_STDINT_H@ - -/* defines some of the stdint.h types as well, on glibc, - IRIX 6.5, and OpenBSD 3.8 (via ). - AIX 5.2 isn't needed and causes troubles. - Mac OS X 10.4.6 includes (which is us), but - relies on the system definitions, so include - after @NEXT_STDINT_H@. */ -# if @HAVE_SYS_TYPES_H@ && ! defined _AIX -# include -# endif - -# if @HAVE_INTTYPES_H@ - /* In OpenBSD 3.8, includes , which defines - int{8,16,32,64}_t, uint{8,16,32,64}_t and __BIT_TYPES_DEFINED__. - also defines intptr_t and uintptr_t. */ -# include -# elif @HAVE_SYS_INTTYPES_H@ - /* Solaris 7 has the types except the *_fast*_t types, and - the macros except for *_FAST*_*, INTPTR_MIN, PTRDIFF_MIN, PTRDIFF_MAX. */ -# include -# endif - -# if @HAVE_SYS_BITYPES_H@ && ! defined __BIT_TYPES_DEFINED__ - /* Linux libc4 >= 4.6.7 and libc5 have a that defines - int{8,16,32,64}_t and __BIT_TYPES_DEFINED__. In libc5 >= 5.2.2 it is - included by . */ -# include -# endif - -# undef _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H - -/* Minimum and maximum values for an integer type under the usual assumption. - Return an unspecified value if BITS == 0, adding a check to pacify - picky compilers. */ - -# define _STDINT_MIN(signed, bits, zero) \ - ((signed) ? ~ _STDINT_MAX (signed, bits, zero) : (zero)) - -# define _STDINT_MAX(signed, bits, zero) \ - (((((zero) + 1) << ((bits) ? (bits) - 1 - (signed) : 0)) - 1) * 2 + 1) - -#if !GNULIB_defined_stdint_types - -/* 7.18.1.1. Exact-width integer types */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits. */ - -# undef int8_t -# undef uint8_t -typedef signed char gl_int8_t; -typedef unsigned char gl_uint8_t; -# define int8_t gl_int8_t -# define uint8_t gl_uint8_t - -# undef int16_t -# undef uint16_t -typedef short int gl_int16_t; -typedef unsigned short int gl_uint16_t; -# define int16_t gl_int16_t -# define uint16_t gl_uint16_t - -# undef int32_t -# undef uint32_t -typedef int gl_int32_t; -typedef unsigned int gl_uint32_t; -# define int32_t gl_int32_t -# define uint32_t gl_uint32_t - -/* If the system defines INT64_MAX, assume int64_t works. That way, - if the underlying platform defines int64_t to be a 64-bit long long - int, the code below won't mistakenly define it to be a 64-bit long - int, which would mess up C++ name mangling. We must use #ifdef - rather than #if, to avoid an error with HP-UX 10.20 cc. */ - -# ifdef INT64_MAX -# define GL_INT64_T -# else -/* Do not undefine int64_t if gnulib is not being used with 64-bit - types, since otherwise it breaks platforms like Tandem/NSK. */ -# if LONG_MAX >> 31 >> 31 == 1 -# undef int64_t -typedef long int gl_int64_t; -# define int64_t gl_int64_t -# define GL_INT64_T -# elif defined _MSC_VER -# undef int64_t -typedef __int64 gl_int64_t; -# define int64_t gl_int64_t -# define GL_INT64_T -# elif @HAVE_LONG_LONG_INT@ -# undef int64_t -typedef long long int gl_int64_t; -# define int64_t gl_int64_t -# define GL_INT64_T -# endif -# endif - -# ifdef UINT64_MAX -# define GL_UINT64_T -# else -# if ULONG_MAX >> 31 >> 31 >> 1 == 1 -# undef uint64_t -typedef unsigned long int gl_uint64_t; -# define uint64_t gl_uint64_t -# define GL_UINT64_T -# elif defined _MSC_VER -# undef uint64_t -typedef unsigned __int64 gl_uint64_t; -# define uint64_t gl_uint64_t -# define GL_UINT64_T -# elif @HAVE_UNSIGNED_LONG_LONG_INT@ -# undef uint64_t -typedef unsigned long long int gl_uint64_t; -# define uint64_t gl_uint64_t -# define GL_UINT64_T -# endif -# endif - -/* Avoid collision with Solaris 2.5.1 etc. */ -# define _UINT8_T -# define _UINT32_T -# define _UINT64_T - - -/* 7.18.1.2. Minimum-width integer types */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits. Therefore the leastN_t types - are the same as the corresponding N_t types. */ - -# undef int_least8_t -# undef uint_least8_t -# undef int_least16_t -# undef uint_least16_t -# undef int_least32_t -# undef uint_least32_t -# undef int_least64_t -# undef uint_least64_t -# define int_least8_t int8_t -# define uint_least8_t uint8_t -# define int_least16_t int16_t -# define uint_least16_t uint16_t -# define int_least32_t int32_t -# define uint_least32_t uint32_t -# ifdef GL_INT64_T -# define int_least64_t int64_t -# endif -# ifdef GL_UINT64_T -# define uint_least64_t uint64_t -# endif - -/* 7.18.1.3. Fastest minimum-width integer types */ - -/* Note: Other substitutes may define these types differently. - It is not recommended to use these types in public header files. */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits. Therefore the fastN_t types - are taken from the same list of types. The following code normally - uses types consistent with glibc, as that lessens the chance of - incompatibility with older GNU hosts. */ - -# undef int_fast8_t -# undef uint_fast8_t -# undef int_fast16_t -# undef uint_fast16_t -# undef int_fast32_t -# undef uint_fast32_t -# undef int_fast64_t -# undef uint_fast64_t -typedef signed char gl_int_fast8_t; -typedef unsigned char gl_uint_fast8_t; - -# ifdef __sun -/* Define types compatible with SunOS 5.10, so that code compiled under - earlier SunOS versions works with code compiled under SunOS 5.10. */ -typedef int gl_int_fast32_t; -typedef unsigned int gl_uint_fast32_t; -# else -typedef long int gl_int_fast32_t; -typedef unsigned long int gl_uint_fast32_t; -# endif -typedef gl_int_fast32_t gl_int_fast16_t; -typedef gl_uint_fast32_t gl_uint_fast16_t; - -# define int_fast8_t gl_int_fast8_t -# define uint_fast8_t gl_uint_fast8_t -# define int_fast16_t gl_int_fast16_t -# define uint_fast16_t gl_uint_fast16_t -# define int_fast32_t gl_int_fast32_t -# define uint_fast32_t gl_uint_fast32_t -# ifdef GL_INT64_T -# define int_fast64_t int64_t -# endif -# ifdef GL_UINT64_T -# define uint_fast64_t uint64_t -# endif - -/* 7.18.1.4. Integer types capable of holding object pointers */ - -/* kLIBC's stdint.h defines _INTPTR_T_DECLARED and needs its own - definitions of intptr_t and uintptr_t (which use int and unsigned) - to avoid clashes with declarations of system functions like sbrk. */ -# ifndef _INTPTR_T_DECLARED -# undef intptr_t -# undef uintptr_t -typedef long int gl_intptr_t; -typedef unsigned long int gl_uintptr_t; -# define intptr_t gl_intptr_t -# define uintptr_t gl_uintptr_t -# endif - -/* 7.18.1.5. Greatest-width integer types */ - -/* Note: These types are compiler dependent. It may be unwise to use them in - public header files. */ - -/* If the system defines INTMAX_MAX, assume that intmax_t works, and - similarly for UINTMAX_MAX and uintmax_t. This avoids problems with - assuming one type where another is used by the system. */ - -# ifndef INTMAX_MAX -# undef INTMAX_C -# undef intmax_t -# if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1 -typedef long long int gl_intmax_t; -# define intmax_t gl_intmax_t -# elif defined GL_INT64_T -# define intmax_t int64_t -# else -typedef long int gl_intmax_t; -# define intmax_t gl_intmax_t -# endif -# endif - -# ifndef UINTMAX_MAX -# undef UINTMAX_C -# undef uintmax_t -# if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1 -typedef unsigned long long int gl_uintmax_t; -# define uintmax_t gl_uintmax_t -# elif defined GL_UINT64_T -# define uintmax_t uint64_t -# else -typedef unsigned long int gl_uintmax_t; -# define uintmax_t gl_uintmax_t -# endif -# endif - -/* Verify that intmax_t and uintmax_t have the same size. Too much code - breaks if this is not the case. If this check fails, the reason is likely - to be found in the autoconf macros. */ -typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t) - ? 1 : -1]; - -# define GNULIB_defined_stdint_types 1 -# endif /* !GNULIB_defined_stdint_types */ - -/* 7.18.2. Limits of specified-width integer types */ - -/* 7.18.2.1. Limits of exact-width integer types */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits. */ - -# undef INT8_MIN -# undef INT8_MAX -# undef UINT8_MAX -# define INT8_MIN (~ INT8_MAX) -# define INT8_MAX 127 -# define UINT8_MAX 255 - -# undef INT16_MIN -# undef INT16_MAX -# undef UINT16_MAX -# define INT16_MIN (~ INT16_MAX) -# define INT16_MAX 32767 -# define UINT16_MAX 65535 - -# undef INT32_MIN -# undef INT32_MAX -# undef UINT32_MAX -# define INT32_MIN (~ INT32_MAX) -# define INT32_MAX 2147483647 -# define UINT32_MAX 4294967295U - -# if defined GL_INT64_T && ! defined INT64_MAX -/* Prefer (- INTMAX_C (1) << 63) over (~ INT64_MAX) because SunPRO C 5.0 - evaluates the latter incorrectly in preprocessor expressions. */ -# define INT64_MIN (- INTMAX_C (1) << 63) -# define INT64_MAX INTMAX_C (9223372036854775807) -# endif - -# if defined GL_UINT64_T && ! defined UINT64_MAX -# define UINT64_MAX UINTMAX_C (18446744073709551615) -# endif - -/* 7.18.2.2. Limits of minimum-width integer types */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits. Therefore the leastN_t types - are the same as the corresponding N_t types. */ - -# undef INT_LEAST8_MIN -# undef INT_LEAST8_MAX -# undef UINT_LEAST8_MAX -# define INT_LEAST8_MIN INT8_MIN -# define INT_LEAST8_MAX INT8_MAX -# define UINT_LEAST8_MAX UINT8_MAX - -# undef INT_LEAST16_MIN -# undef INT_LEAST16_MAX -# undef UINT_LEAST16_MAX -# define INT_LEAST16_MIN INT16_MIN -# define INT_LEAST16_MAX INT16_MAX -# define UINT_LEAST16_MAX UINT16_MAX - -# undef INT_LEAST32_MIN -# undef INT_LEAST32_MAX -# undef UINT_LEAST32_MAX -# define INT_LEAST32_MIN INT32_MIN -# define INT_LEAST32_MAX INT32_MAX -# define UINT_LEAST32_MAX UINT32_MAX - -# undef INT_LEAST64_MIN -# undef INT_LEAST64_MAX -# ifdef GL_INT64_T -# define INT_LEAST64_MIN INT64_MIN -# define INT_LEAST64_MAX INT64_MAX -# endif - -# undef UINT_LEAST64_MAX -# ifdef GL_UINT64_T -# define UINT_LEAST64_MAX UINT64_MAX -# endif - -/* 7.18.2.3. Limits of fastest minimum-width integer types */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits. Therefore the fastN_t types - are taken from the same list of types. */ - -# undef INT_FAST8_MIN -# undef INT_FAST8_MAX -# undef UINT_FAST8_MAX -# define INT_FAST8_MIN SCHAR_MIN -# define INT_FAST8_MAX SCHAR_MAX -# define UINT_FAST8_MAX UCHAR_MAX - -# undef INT_FAST16_MIN -# undef INT_FAST16_MAX -# undef UINT_FAST16_MAX -# define INT_FAST16_MIN INT_FAST32_MIN -# define INT_FAST16_MAX INT_FAST32_MAX -# define UINT_FAST16_MAX UINT_FAST32_MAX - -# undef INT_FAST32_MIN -# undef INT_FAST32_MAX -# undef UINT_FAST32_MAX -# ifdef __sun -# define INT_FAST32_MIN INT_MIN -# define INT_FAST32_MAX INT_MAX -# define UINT_FAST32_MAX UINT_MAX -# else -# define INT_FAST32_MIN LONG_MIN -# define INT_FAST32_MAX LONG_MAX -# define UINT_FAST32_MAX ULONG_MAX -# endif - -# undef INT_FAST64_MIN -# undef INT_FAST64_MAX -# ifdef GL_INT64_T -# define INT_FAST64_MIN INT64_MIN -# define INT_FAST64_MAX INT64_MAX -# endif - -# undef UINT_FAST64_MAX -# ifdef GL_UINT64_T -# define UINT_FAST64_MAX UINT64_MAX -# endif - -/* 7.18.2.4. Limits of integer types capable of holding object pointers */ - -# undef INTPTR_MIN -# undef INTPTR_MAX -# undef UINTPTR_MAX -# define INTPTR_MIN LONG_MIN -# define INTPTR_MAX LONG_MAX -# define UINTPTR_MAX ULONG_MAX - -/* 7.18.2.5. Limits of greatest-width integer types */ - -# ifndef INTMAX_MAX -# undef INTMAX_MIN -# ifdef INT64_MAX -# define INTMAX_MIN INT64_MIN -# define INTMAX_MAX INT64_MAX -# else -# define INTMAX_MIN INT32_MIN -# define INTMAX_MAX INT32_MAX -# endif -# endif - -# ifndef UINTMAX_MAX -# ifdef UINT64_MAX -# define UINTMAX_MAX UINT64_MAX -# else -# define UINTMAX_MAX UINT32_MAX -# endif -# endif - -/* 7.18.3. Limits of other integer types */ - -/* ptrdiff_t limits */ -# undef PTRDIFF_MIN -# undef PTRDIFF_MAX -# if @APPLE_UNIVERSAL_BUILD@ -# ifdef _LP64 -# define PTRDIFF_MIN _STDINT_MIN (1, 64, 0l) -# define PTRDIFF_MAX _STDINT_MAX (1, 64, 0l) -# else -# define PTRDIFF_MIN _STDINT_MIN (1, 32, 0) -# define PTRDIFF_MAX _STDINT_MAX (1, 32, 0) -# endif -# else -# define PTRDIFF_MIN \ - _STDINT_MIN (1, @BITSIZEOF_PTRDIFF_T@, 0@PTRDIFF_T_SUFFIX@) -# define PTRDIFF_MAX \ - _STDINT_MAX (1, @BITSIZEOF_PTRDIFF_T@, 0@PTRDIFF_T_SUFFIX@) -# endif - -/* sig_atomic_t limits */ -# undef SIG_ATOMIC_MIN -# undef SIG_ATOMIC_MAX -# define SIG_ATOMIC_MIN \ - _STDINT_MIN (@HAVE_SIGNED_SIG_ATOMIC_T@, @BITSIZEOF_SIG_ATOMIC_T@, \ - 0@SIG_ATOMIC_T_SUFFIX@) -# define SIG_ATOMIC_MAX \ - _STDINT_MAX (@HAVE_SIGNED_SIG_ATOMIC_T@, @BITSIZEOF_SIG_ATOMIC_T@, \ - 0@SIG_ATOMIC_T_SUFFIX@) - - -/* size_t limit */ -# undef SIZE_MAX -# if @APPLE_UNIVERSAL_BUILD@ -# ifdef _LP64 -# define SIZE_MAX _STDINT_MAX (0, 64, 0ul) -# else -# define SIZE_MAX _STDINT_MAX (0, 32, 0ul) -# endif -# else -# define SIZE_MAX _STDINT_MAX (0, @BITSIZEOF_SIZE_T@, 0@SIZE_T_SUFFIX@) -# endif - -/* wchar_t limits */ -/* Get WCHAR_MIN, WCHAR_MAX. - This include is not on the top, above, because on OSF/1 4.0 we have a - sequence of nested includes - -> -> -> , and the latter includes - and assumes its types are already defined. */ -# if @HAVE_WCHAR_H@ && ! (defined WCHAR_MIN && defined WCHAR_MAX) - /* BSD/OS 4.0.1 has a bug: , and must be - included before . */ -# include -# include -# include -# define _GL_JUST_INCLUDE_SYSTEM_WCHAR_H -# include -# undef _GL_JUST_INCLUDE_SYSTEM_WCHAR_H -# endif -# undef WCHAR_MIN -# undef WCHAR_MAX -# define WCHAR_MIN \ - _STDINT_MIN (@HAVE_SIGNED_WCHAR_T@, @BITSIZEOF_WCHAR_T@, 0@WCHAR_T_SUFFIX@) -# define WCHAR_MAX \ - _STDINT_MAX (@HAVE_SIGNED_WCHAR_T@, @BITSIZEOF_WCHAR_T@, 0@WCHAR_T_SUFFIX@) - -/* wint_t limits */ -# undef WINT_MIN -# undef WINT_MAX -# define WINT_MIN \ - _STDINT_MIN (@HAVE_SIGNED_WINT_T@, @BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@) -# define WINT_MAX \ - _STDINT_MAX (@HAVE_SIGNED_WINT_T@, @BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@) - -/* 7.18.4. Macros for integer constants */ - -/* 7.18.4.1. Macros for minimum-width integer constants */ -/* According to ISO C 99 Technical Corrigendum 1 */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits, and int is 32 bits. */ - -# undef INT8_C -# undef UINT8_C -# define INT8_C(x) x -# define UINT8_C(x) x - -# undef INT16_C -# undef UINT16_C -# define INT16_C(x) x -# define UINT16_C(x) x - -# undef INT32_C -# undef UINT32_C -# define INT32_C(x) x -# define UINT32_C(x) x ## U - -# undef INT64_C -# undef UINT64_C -# if LONG_MAX >> 31 >> 31 == 1 -# define INT64_C(x) x##L -# elif defined _MSC_VER -# define INT64_C(x) x##i64 -# elif @HAVE_LONG_LONG_INT@ -# define INT64_C(x) x##LL -# endif -# if ULONG_MAX >> 31 >> 31 >> 1 == 1 -# define UINT64_C(x) x##UL -# elif defined _MSC_VER -# define UINT64_C(x) x##ui64 -# elif @HAVE_UNSIGNED_LONG_LONG_INT@ -# define UINT64_C(x) x##ULL -# endif - -/* 7.18.4.2. Macros for greatest-width integer constants */ - -# ifndef INTMAX_C -# if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1 -# define INTMAX_C(x) x##LL -# elif defined GL_INT64_T -# define INTMAX_C(x) INT64_C(x) -# else -# define INTMAX_C(x) x##L -# endif -# endif - -# ifndef UINTMAX_C -# if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1 -# define UINTMAX_C(x) x##ULL -# elif defined GL_UINT64_T -# define UINTMAX_C(x) UINT64_C(x) -# else -# define UINTMAX_C(x) x##UL -# endif -# endif - -#endif /* !@HAVE_C99_STDINT_H@ */ - -/* Macros specified by ISO/IEC TS 18661-1:2014. */ - -#if (!defined UINTMAX_WIDTH \ - && (defined _GNU_SOURCE || defined __STDC_WANT_IEC_60559_BFP_EXT__)) -# ifdef INT8_MAX -# define INT8_WIDTH _GL_INTEGER_WIDTH (INT8_MIN, INT8_MAX) -# endif -# ifdef UINT8_MAX -# define UINT8_WIDTH _GL_INTEGER_WIDTH (0, UINT8_MAX) -# endif -# ifdef INT16_MAX -# define INT16_WIDTH _GL_INTEGER_WIDTH (INT16_MIN, INT16_MAX) -# endif -# ifdef UINT16_MAX -# define UINT16_WIDTH _GL_INTEGER_WIDTH (0, UINT16_MAX) -# endif -# ifdef INT32_MAX -# define INT32_WIDTH _GL_INTEGER_WIDTH (INT32_MIN, INT32_MAX) -# endif -# ifdef UINT32_MAX -# define UINT32_WIDTH _GL_INTEGER_WIDTH (0, UINT32_MAX) -# endif -# ifdef INT64_MAX -# define INT64_WIDTH _GL_INTEGER_WIDTH (INT64_MIN, INT64_MAX) -# endif -# ifdef UINT64_MAX -# define UINT64_WIDTH _GL_INTEGER_WIDTH (0, UINT64_MAX) -# endif -# define INT_LEAST8_WIDTH _GL_INTEGER_WIDTH (INT_LEAST8_MIN, INT_LEAST8_MAX) -# define UINT_LEAST8_WIDTH _GL_INTEGER_WIDTH (0, UINT_LEAST8_MAX) -# define INT_LEAST16_WIDTH _GL_INTEGER_WIDTH (INT_LEAST16_MIN, INT_LEAST16_MAX) -# define UINT_LEAST16_WIDTH _GL_INTEGER_WIDTH (0, UINT_LEAST16_MAX) -# define INT_LEAST32_WIDTH _GL_INTEGER_WIDTH (INT_LEAST32_MIN, INT_LEAST32_MAX) -# define UINT_LEAST32_WIDTH _GL_INTEGER_WIDTH (0, UINT_LEAST32_MAX) -# define INT_LEAST64_WIDTH _GL_INTEGER_WIDTH (INT_LEAST64_MIN, INT_LEAST64_MAX) -# define UINT_LEAST64_WIDTH _GL_INTEGER_WIDTH (0, UINT_LEAST64_MAX) -# define INT_FAST8_WIDTH _GL_INTEGER_WIDTH (INT_FAST8_MIN, INT_FAST8_MAX) -# define UINT_FAST8_WIDTH _GL_INTEGER_WIDTH (0, UINT_FAST8_MAX) -# define INT_FAST16_WIDTH _GL_INTEGER_WIDTH (INT_FAST16_MIN, INT_FAST16_MAX) -# define UINT_FAST16_WIDTH _GL_INTEGER_WIDTH (0, UINT_FAST16_MAX) -# define INT_FAST32_WIDTH _GL_INTEGER_WIDTH (INT_FAST32_MIN, INT_FAST32_MAX) -# define UINT_FAST32_WIDTH _GL_INTEGER_WIDTH (0, UINT_FAST32_MAX) -# define INT_FAST64_WIDTH _GL_INTEGER_WIDTH (INT_FAST64_MIN, INT_FAST64_MAX) -# define UINT_FAST64_WIDTH _GL_INTEGER_WIDTH (0, UINT_FAST64_MAX) -# define INTPTR_WIDTH _GL_INTEGER_WIDTH (INTPTR_MIN, INTPTR_MAX) -# define UINTPTR_WIDTH _GL_INTEGER_WIDTH (0, UINTPTR_MAX) -# define INTMAX_WIDTH _GL_INTEGER_WIDTH (INTMAX_MIN, INTMAX_MAX) -# define UINTMAX_WIDTH _GL_INTEGER_WIDTH (0, UINTMAX_MAX) -# define PTRDIFF_WIDTH _GL_INTEGER_WIDTH (PTRDIFF_MIN, PTRDIFF_MAX) -# define SIZE_WIDTH _GL_INTEGER_WIDTH (0, SIZE_MAX) -# define WCHAR_WIDTH _GL_INTEGER_WIDTH (WCHAR_MIN, WCHAR_MAX) -# ifdef WINT_MAX -# define WINT_WIDTH _GL_INTEGER_WIDTH (WINT_MIN, WINT_MAX) -# endif -# ifdef SIG_ATOMIC_MAX -# define SIG_ATOMIC_WIDTH _GL_INTEGER_WIDTH (SIG_ATOMIC_MIN, SIG_ATOMIC_MAX) -# endif -#endif /* !WINT_WIDTH && (_GNU_SOURCE || __STDC_WANT_IEC_60559_BFP_EXT__) */ - -#endif /* _@GUARD_PREFIX@_STDINT_H */ -#endif /* !(defined __ANDROID__ && ...) */ -#endif /* !defined _@GUARD_PREFIX@_STDINT_H && !defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H */ diff --git a/lib/gllib/string.in.h b/lib/gllib/string.in.h deleted file mode 100644 index 259ccdf..0000000 --- a/lib/gllib/string.in.h +++ /dev/null @@ -1,1046 +0,0 @@ -/* A GNU-like . - - Copyright (C) 1995-1996, 2001-2017 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this program; if not, see . */ - -#if __GNUC__ >= 3 -@PRAGMA_SYSTEM_HEADER@ -#endif -@PRAGMA_COLUMNS@ - -#if defined _GL_ALREADY_INCLUDING_STRING_H -/* Special invocation convention: - - On OS X/NetBSD we have a sequence of nested includes - -> -> "string.h" - In this situation system _chk variants due to -D_FORTIFY_SOURCE - might be used after any replacements defined here. */ - -#@INCLUDE_NEXT@ @NEXT_STRING_H@ - -#else -/* Normal invocation convention. */ - -#ifndef _@GUARD_PREFIX@_STRING_H - -#define _GL_ALREADY_INCLUDING_STRING_H - -/* The include_next requires a split double-inclusion guard. */ -#@INCLUDE_NEXT@ @NEXT_STRING_H@ - -#undef _GL_ALREADY_INCLUDING_STRING_H - -#ifndef _@GUARD_PREFIX@_STRING_H -#define _@GUARD_PREFIX@_STRING_H - -/* NetBSD 5.0 mis-defines NULL. */ -#include - -/* MirBSD defines mbslen as a macro. */ -#if @GNULIB_MBSLEN@ && defined __MirBSD__ -# include -#endif - -/* The __attribute__ feature is available in gcc versions 2.5 and later. - The attribute __pure__ was added in gcc 2.96. */ -#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) -# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) -#else -# define _GL_ATTRIBUTE_PURE /* empty */ -#endif - -/* NetBSD 5.0 declares strsignal in , not in . */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (@GNULIB_STRSIGNAL@ || defined GNULIB_POSIXCHECK) && defined __NetBSD__ \ - && ! defined __GLIBC__ -# include -#endif - -/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ - -/* The definition of _GL_ARG_NONNULL is copied here. */ - -/* The definition of _GL_WARN_ON_USE is copied here. */ - - -/* Find the index of the least-significant set bit. */ -#if @GNULIB_FFSL@ -# if !@HAVE_FFSL@ -_GL_FUNCDECL_SYS (ffsl, int, (long int i)); -# endif -_GL_CXXALIAS_SYS (ffsl, int, (long int i)); -_GL_CXXALIASWARN (ffsl); -#elif defined GNULIB_POSIXCHECK -# undef ffsl -# if HAVE_RAW_DECL_FFSL -_GL_WARN_ON_USE (ffsl, "ffsl is not portable - use the ffsl module"); -# endif -#endif - - -/* Find the index of the least-significant set bit. */ -#if @GNULIB_FFSLL@ -# if !@HAVE_FFSLL@ -_GL_FUNCDECL_SYS (ffsll, int, (long long int i)); -# endif -_GL_CXXALIAS_SYS (ffsll, int, (long long int i)); -_GL_CXXALIASWARN (ffsll); -#elif defined GNULIB_POSIXCHECK -# undef ffsll -# if HAVE_RAW_DECL_FFSLL -_GL_WARN_ON_USE (ffsll, "ffsll is not portable - use the ffsll module"); -# endif -#endif - - -/* Return the first instance of C within N bytes of S, or NULL. */ -#if @GNULIB_MEMCHR@ -# if @REPLACE_MEMCHR@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define memchr rpl_memchr -# endif -_GL_FUNCDECL_RPL (memchr, void *, (void const *__s, int __c, size_t __n) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (memchr, void *, (void const *__s, int __c, size_t __n)); -# else -# if ! @HAVE_MEMCHR@ -_GL_FUNCDECL_SYS (memchr, void *, (void const *__s, int __c, size_t __n) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1))); -# endif - /* On some systems, this function is defined as an overloaded function: - extern "C" { const void * std::memchr (const void *, int, size_t); } - extern "C++" { void * std::memchr (void *, int, size_t); } */ -_GL_CXXALIAS_SYS_CAST2 (memchr, - void *, (void const *__s, int __c, size_t __n), - void const *, (void const *__s, int __c, size_t __n)); -# endif -# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ - && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) -_GL_CXXALIASWARN1 (memchr, void *, (void *__s, int __c, size_t __n)); -_GL_CXXALIASWARN1 (memchr, void const *, - (void const *__s, int __c, size_t __n)); -# else -_GL_CXXALIASWARN (memchr); -# endif -#elif defined GNULIB_POSIXCHECK -# undef memchr -/* Assume memchr is always declared. */ -_GL_WARN_ON_USE (memchr, "memchr has platform-specific bugs - " - "use gnulib module memchr for portability" ); -#endif - -/* Return the first occurrence of NEEDLE in HAYSTACK. */ -#if @GNULIB_MEMMEM@ -# if @REPLACE_MEMMEM@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define memmem rpl_memmem -# endif -_GL_FUNCDECL_RPL (memmem, void *, - (void const *__haystack, size_t __haystack_len, - void const *__needle, size_t __needle_len) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1, 3))); -_GL_CXXALIAS_RPL (memmem, void *, - (void const *__haystack, size_t __haystack_len, - void const *__needle, size_t __needle_len)); -# else -# if ! @HAVE_DECL_MEMMEM@ -_GL_FUNCDECL_SYS (memmem, void *, - (void const *__haystack, size_t __haystack_len, - void const *__needle, size_t __needle_len) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1, 3))); -# endif -_GL_CXXALIAS_SYS (memmem, void *, - (void const *__haystack, size_t __haystack_len, - void const *__needle, size_t __needle_len)); -# endif -_GL_CXXALIASWARN (memmem); -#elif defined GNULIB_POSIXCHECK -# undef memmem -# if HAVE_RAW_DECL_MEMMEM -_GL_WARN_ON_USE (memmem, "memmem is unportable and often quadratic - " - "use gnulib module memmem-simple for portability, " - "and module memmem for speed" ); -# endif -#endif - -/* Copy N bytes of SRC to DEST, return pointer to bytes after the - last written byte. */ -#if @GNULIB_MEMPCPY@ -# if ! @HAVE_MEMPCPY@ -_GL_FUNCDECL_SYS (mempcpy, void *, - (void *restrict __dest, void const *restrict __src, - size_t __n) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (mempcpy, void *, - (void *restrict __dest, void const *restrict __src, - size_t __n)); -_GL_CXXALIASWARN (mempcpy); -#elif defined GNULIB_POSIXCHECK -# undef mempcpy -# if HAVE_RAW_DECL_MEMPCPY -_GL_WARN_ON_USE (mempcpy, "mempcpy is unportable - " - "use gnulib module mempcpy for portability"); -# endif -#endif - -/* Search backwards through a block for a byte (specified as an int). */ -#if @GNULIB_MEMRCHR@ -# if ! @HAVE_DECL_MEMRCHR@ -_GL_FUNCDECL_SYS (memrchr, void *, (void const *, int, size_t) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1))); -# endif - /* On some systems, this function is defined as an overloaded function: - extern "C++" { const void * std::memrchr (const void *, int, size_t); } - extern "C++" { void * std::memrchr (void *, int, size_t); } */ -_GL_CXXALIAS_SYS_CAST2 (memrchr, - void *, (void const *, int, size_t), - void const *, (void const *, int, size_t)); -# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ - && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) -_GL_CXXALIASWARN1 (memrchr, void *, (void *, int, size_t)); -_GL_CXXALIASWARN1 (memrchr, void const *, (void const *, int, size_t)); -# else -_GL_CXXALIASWARN (memrchr); -# endif -#elif defined GNULIB_POSIXCHECK -# undef memrchr -# if HAVE_RAW_DECL_MEMRCHR -_GL_WARN_ON_USE (memrchr, "memrchr is unportable - " - "use gnulib module memrchr for portability"); -# endif -#endif - -/* Find the first occurrence of C in S. More efficient than - memchr(S,C,N), at the expense of undefined behavior if C does not - occur within N bytes. */ -#if @GNULIB_RAWMEMCHR@ -# if ! @HAVE_RAWMEMCHR@ -_GL_FUNCDECL_SYS (rawmemchr, void *, (void const *__s, int __c_in) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1))); -# endif - /* On some systems, this function is defined as an overloaded function: - extern "C++" { const void * std::rawmemchr (const void *, int); } - extern "C++" { void * std::rawmemchr (void *, int); } */ -_GL_CXXALIAS_SYS_CAST2 (rawmemchr, - void *, (void const *__s, int __c_in), - void const *, (void const *__s, int __c_in)); -# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ - && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) -_GL_CXXALIASWARN1 (rawmemchr, void *, (void *__s, int __c_in)); -_GL_CXXALIASWARN1 (rawmemchr, void const *, (void const *__s, int __c_in)); -# else -_GL_CXXALIASWARN (rawmemchr); -# endif -#elif defined GNULIB_POSIXCHECK -# undef rawmemchr -# if HAVE_RAW_DECL_RAWMEMCHR -_GL_WARN_ON_USE (rawmemchr, "rawmemchr is unportable - " - "use gnulib module rawmemchr for portability"); -# endif -#endif - -/* Copy SRC to DST, returning the address of the terminating '\0' in DST. */ -#if @GNULIB_STPCPY@ -# if ! @HAVE_STPCPY@ -_GL_FUNCDECL_SYS (stpcpy, char *, - (char *restrict __dst, char const *restrict __src) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (stpcpy, char *, - (char *restrict __dst, char const *restrict __src)); -_GL_CXXALIASWARN (stpcpy); -#elif defined GNULIB_POSIXCHECK -# undef stpcpy -# if HAVE_RAW_DECL_STPCPY -_GL_WARN_ON_USE (stpcpy, "stpcpy is unportable - " - "use gnulib module stpcpy for portability"); -# endif -#endif - -/* Copy no more than N bytes of SRC to DST, returning a pointer past the - last non-NUL byte written into DST. */ -#if @GNULIB_STPNCPY@ -# if @REPLACE_STPNCPY@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef stpncpy -# define stpncpy rpl_stpncpy -# endif -_GL_FUNCDECL_RPL (stpncpy, char *, - (char *restrict __dst, char const *restrict __src, - size_t __n) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (stpncpy, char *, - (char *restrict __dst, char const *restrict __src, - size_t __n)); -# else -# if ! @HAVE_STPNCPY@ -_GL_FUNCDECL_SYS (stpncpy, char *, - (char *restrict __dst, char const *restrict __src, - size_t __n) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (stpncpy, char *, - (char *restrict __dst, char const *restrict __src, - size_t __n)); -# endif -_GL_CXXALIASWARN (stpncpy); -#elif defined GNULIB_POSIXCHECK -# undef stpncpy -# if HAVE_RAW_DECL_STPNCPY -_GL_WARN_ON_USE (stpncpy, "stpncpy is unportable - " - "use gnulib module stpncpy for portability"); -# endif -#endif - -#if defined GNULIB_POSIXCHECK -/* strchr() does not work with multibyte strings if the locale encoding is - GB18030 and the character to be searched is a digit. */ -# undef strchr -/* Assume strchr is always declared. */ -_GL_WARN_ON_USE (strchr, "strchr cannot work correctly on character strings " - "in some multibyte locales - " - "use mbschr if you care about internationalization"); -#endif - -/* Find the first occurrence of C in S or the final NUL byte. */ -#if @GNULIB_STRCHRNUL@ -# if @REPLACE_STRCHRNUL@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define strchrnul rpl_strchrnul -# endif -_GL_FUNCDECL_RPL (strchrnul, char *, (const char *__s, int __c_in) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (strchrnul, char *, - (const char *str, int ch)); -# else -# if ! @HAVE_STRCHRNUL@ -_GL_FUNCDECL_SYS (strchrnul, char *, (char const *__s, int __c_in) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1))); -# endif - /* On some systems, this function is defined as an overloaded function: - extern "C++" { const char * std::strchrnul (const char *, int); } - extern "C++" { char * std::strchrnul (char *, int); } */ -_GL_CXXALIAS_SYS_CAST2 (strchrnul, - char *, (char const *__s, int __c_in), - char const *, (char const *__s, int __c_in)); -# endif -# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ - && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) -_GL_CXXALIASWARN1 (strchrnul, char *, (char *__s, int __c_in)); -_GL_CXXALIASWARN1 (strchrnul, char const *, (char const *__s, int __c_in)); -# else -_GL_CXXALIASWARN (strchrnul); -# endif -#elif defined GNULIB_POSIXCHECK -# undef strchrnul -# if HAVE_RAW_DECL_STRCHRNUL -_GL_WARN_ON_USE (strchrnul, "strchrnul is unportable - " - "use gnulib module strchrnul for portability"); -# endif -#endif - -/* Duplicate S, returning an identical malloc'd string. */ -#if @GNULIB_STRDUP@ -# if @REPLACE_STRDUP@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef strdup -# define strdup rpl_strdup -# endif -_GL_FUNCDECL_RPL (strdup, char *, (char const *__s) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (strdup, char *, (char const *__s)); -# else -# if defined __cplusplus && defined GNULIB_NAMESPACE && defined strdup - /* strdup exists as a function and as a macro. Get rid of the macro. */ -# undef strdup -# endif -# if !(@HAVE_DECL_STRDUP@ || defined strdup) -_GL_FUNCDECL_SYS (strdup, char *, (char const *__s) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (strdup, char *, (char const *__s)); -# endif -_GL_CXXALIASWARN (strdup); -#elif defined GNULIB_POSIXCHECK -# undef strdup -# if HAVE_RAW_DECL_STRDUP -_GL_WARN_ON_USE (strdup, "strdup is unportable - " - "use gnulib module strdup for portability"); -# endif -#endif - -/* Append no more than N characters from SRC onto DEST. */ -#if @GNULIB_STRNCAT@ -# if @REPLACE_STRNCAT@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef strncat -# define strncat rpl_strncat -# endif -_GL_FUNCDECL_RPL (strncat, char *, (char *dest, const char *src, size_t n) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (strncat, char *, (char *dest, const char *src, size_t n)); -# else -_GL_CXXALIAS_SYS (strncat, char *, (char *dest, const char *src, size_t n)); -# endif -_GL_CXXALIASWARN (strncat); -#elif defined GNULIB_POSIXCHECK -# undef strncat -# if HAVE_RAW_DECL_STRNCAT -_GL_WARN_ON_USE (strncat, "strncat is unportable - " - "use gnulib module strncat for portability"); -# endif -#endif - -/* Return a newly allocated copy of at most N bytes of STRING. */ -#if @GNULIB_STRNDUP@ -# if @REPLACE_STRNDUP@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef strndup -# define strndup rpl_strndup -# endif -_GL_FUNCDECL_RPL (strndup, char *, (char const *__s, size_t __n) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (strndup, char *, (char const *__s, size_t __n)); -# else -# if ! @HAVE_DECL_STRNDUP@ -_GL_FUNCDECL_SYS (strndup, char *, (char const *__s, size_t __n) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (strndup, char *, (char const *__s, size_t __n)); -# endif -_GL_CXXALIASWARN (strndup); -#elif defined GNULIB_POSIXCHECK -# undef strndup -# if HAVE_RAW_DECL_STRNDUP -_GL_WARN_ON_USE (strndup, "strndup is unportable - " - "use gnulib module strndup for portability"); -# endif -#endif - -/* Find the length (number of bytes) of STRING, but scan at most - MAXLEN bytes. If no '\0' terminator is found in that many bytes, - return MAXLEN. */ -#if @GNULIB_STRNLEN@ -# if @REPLACE_STRNLEN@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef strnlen -# define strnlen rpl_strnlen -# endif -_GL_FUNCDECL_RPL (strnlen, size_t, (char const *__s, size_t __maxlen) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (strnlen, size_t, (char const *__s, size_t __maxlen)); -# else -# if ! @HAVE_DECL_STRNLEN@ -_GL_FUNCDECL_SYS (strnlen, size_t, (char const *__s, size_t __maxlen) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (strnlen, size_t, (char const *__s, size_t __maxlen)); -# endif -_GL_CXXALIASWARN (strnlen); -#elif defined GNULIB_POSIXCHECK -# undef strnlen -# if HAVE_RAW_DECL_STRNLEN -_GL_WARN_ON_USE (strnlen, "strnlen is unportable - " - "use gnulib module strnlen for portability"); -# endif -#endif - -#if defined GNULIB_POSIXCHECK -/* strcspn() assumes the second argument is a list of single-byte characters. - Even in this simple case, it does not work with multibyte strings if the - locale encoding is GB18030 and one of the characters to be searched is a - digit. */ -# undef strcspn -/* Assume strcspn is always declared. */ -_GL_WARN_ON_USE (strcspn, "strcspn cannot work correctly on character strings " - "in multibyte locales - " - "use mbscspn if you care about internationalization"); -#endif - -/* Find the first occurrence in S of any character in ACCEPT. */ -#if @GNULIB_STRPBRK@ -# if ! @HAVE_STRPBRK@ -_GL_FUNCDECL_SYS (strpbrk, char *, (char const *__s, char const *__accept) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1, 2))); -# endif - /* On some systems, this function is defined as an overloaded function: - extern "C" { const char * strpbrk (const char *, const char *); } - extern "C++" { char * strpbrk (char *, const char *); } */ -_GL_CXXALIAS_SYS_CAST2 (strpbrk, - char *, (char const *__s, char const *__accept), - const char *, (char const *__s, char const *__accept)); -# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ - && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) -_GL_CXXALIASWARN1 (strpbrk, char *, (char *__s, char const *__accept)); -_GL_CXXALIASWARN1 (strpbrk, char const *, - (char const *__s, char const *__accept)); -# else -_GL_CXXALIASWARN (strpbrk); -# endif -# if defined GNULIB_POSIXCHECK -/* strpbrk() assumes the second argument is a list of single-byte characters. - Even in this simple case, it does not work with multibyte strings if the - locale encoding is GB18030 and one of the characters to be searched is a - digit. */ -# undef strpbrk -_GL_WARN_ON_USE (strpbrk, "strpbrk cannot work correctly on character strings " - "in multibyte locales - " - "use mbspbrk if you care about internationalization"); -# endif -#elif defined GNULIB_POSIXCHECK -# undef strpbrk -# if HAVE_RAW_DECL_STRPBRK -_GL_WARN_ON_USE (strpbrk, "strpbrk is unportable - " - "use gnulib module strpbrk for portability"); -# endif -#endif - -#if defined GNULIB_POSIXCHECK -/* strspn() assumes the second argument is a list of single-byte characters. - Even in this simple case, it cannot work with multibyte strings. */ -# undef strspn -/* Assume strspn is always declared. */ -_GL_WARN_ON_USE (strspn, "strspn cannot work correctly on character strings " - "in multibyte locales - " - "use mbsspn if you care about internationalization"); -#endif - -#if defined GNULIB_POSIXCHECK -/* strrchr() does not work with multibyte strings if the locale encoding is - GB18030 and the character to be searched is a digit. */ -# undef strrchr -/* Assume strrchr is always declared. */ -_GL_WARN_ON_USE (strrchr, "strrchr cannot work correctly on character strings " - "in some multibyte locales - " - "use mbsrchr if you care about internationalization"); -#endif - -/* Search the next delimiter (char listed in DELIM) starting at *STRINGP. - If one is found, overwrite it with a NUL, and advance *STRINGP - to point to the next char after it. Otherwise, set *STRINGP to NULL. - If *STRINGP was already NULL, nothing happens. - Return the old value of *STRINGP. - - This is a variant of strtok() that is multithread-safe and supports - empty fields. - - Caveat: It modifies the original string. - Caveat: These functions cannot be used on constant strings. - Caveat: The identity of the delimiting character is lost. - Caveat: It doesn't work with multibyte strings unless all of the delimiter - characters are ASCII characters < 0x30. - - See also strtok_r(). */ -#if @GNULIB_STRSEP@ -# if ! @HAVE_STRSEP@ -_GL_FUNCDECL_SYS (strsep, char *, - (char **restrict __stringp, char const *restrict __delim) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (strsep, char *, - (char **restrict __stringp, char const *restrict __delim)); -_GL_CXXALIASWARN (strsep); -# if defined GNULIB_POSIXCHECK -# undef strsep -_GL_WARN_ON_USE (strsep, "strsep cannot work correctly on character strings " - "in multibyte locales - " - "use mbssep if you care about internationalization"); -# endif -#elif defined GNULIB_POSIXCHECK -# undef strsep -# if HAVE_RAW_DECL_STRSEP -_GL_WARN_ON_USE (strsep, "strsep is unportable - " - "use gnulib module strsep for portability"); -# endif -#endif - -#if @GNULIB_STRSTR@ -# if @REPLACE_STRSTR@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define strstr rpl_strstr -# endif -_GL_FUNCDECL_RPL (strstr, char *, (const char *haystack, const char *needle) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (strstr, char *, (const char *haystack, const char *needle)); -# else - /* On some systems, this function is defined as an overloaded function: - extern "C++" { const char * strstr (const char *, const char *); } - extern "C++" { char * strstr (char *, const char *); } */ -_GL_CXXALIAS_SYS_CAST2 (strstr, - char *, (const char *haystack, const char *needle), - const char *, (const char *haystack, const char *needle)); -# endif -# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ - && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) -_GL_CXXALIASWARN1 (strstr, char *, (char *haystack, const char *needle)); -_GL_CXXALIASWARN1 (strstr, const char *, - (const char *haystack, const char *needle)); -# else -_GL_CXXALIASWARN (strstr); -# endif -#elif defined GNULIB_POSIXCHECK -/* strstr() does not work with multibyte strings if the locale encoding is - different from UTF-8: - POSIX says that it operates on "strings", and "string" in POSIX is defined - as a sequence of bytes, not of characters. */ -# undef strstr -/* Assume strstr is always declared. */ -_GL_WARN_ON_USE (strstr, "strstr is quadratic on many systems, and cannot " - "work correctly on character strings in most " - "multibyte locales - " - "use mbsstr if you care about internationalization, " - "or use strstr if you care about speed"); -#endif - -/* Find the first occurrence of NEEDLE in HAYSTACK, using case-insensitive - comparison. */ -#if @GNULIB_STRCASESTR@ -# if @REPLACE_STRCASESTR@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define strcasestr rpl_strcasestr -# endif -_GL_FUNCDECL_RPL (strcasestr, char *, - (const char *haystack, const char *needle) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (strcasestr, char *, - (const char *haystack, const char *needle)); -# else -# if ! @HAVE_STRCASESTR@ -_GL_FUNCDECL_SYS (strcasestr, char *, - (const char *haystack, const char *needle) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1, 2))); -# endif - /* On some systems, this function is defined as an overloaded function: - extern "C++" { const char * strcasestr (const char *, const char *); } - extern "C++" { char * strcasestr (char *, const char *); } */ -_GL_CXXALIAS_SYS_CAST2 (strcasestr, - char *, (const char *haystack, const char *needle), - const char *, (const char *haystack, const char *needle)); -# endif -# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ - && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) -_GL_CXXALIASWARN1 (strcasestr, char *, (char *haystack, const char *needle)); -_GL_CXXALIASWARN1 (strcasestr, const char *, - (const char *haystack, const char *needle)); -# else -_GL_CXXALIASWARN (strcasestr); -# endif -#elif defined GNULIB_POSIXCHECK -/* strcasestr() does not work with multibyte strings: - It is a glibc extension, and glibc implements it only for unibyte - locales. */ -# undef strcasestr -# if HAVE_RAW_DECL_STRCASESTR -_GL_WARN_ON_USE (strcasestr, "strcasestr does work correctly on character " - "strings in multibyte locales - " - "use mbscasestr if you care about " - "internationalization, or use c-strcasestr if you want " - "a locale independent function"); -# endif -#endif - -/* Parse S into tokens separated by characters in DELIM. - If S is NULL, the saved pointer in SAVE_PTR is used as - the next starting point. For example: - char s[] = "-abc-=-def"; - char *sp; - x = strtok_r(s, "-", &sp); // x = "abc", sp = "=-def" - x = strtok_r(NULL, "-=", &sp); // x = "def", sp = NULL - x = strtok_r(NULL, "=", &sp); // x = NULL - // s = "abc\0-def\0" - - This is a variant of strtok() that is multithread-safe. - - For the POSIX documentation for this function, see: - http://www.opengroup.org/susv3xsh/strtok.html - - Caveat: It modifies the original string. - Caveat: These functions cannot be used on constant strings. - Caveat: The identity of the delimiting character is lost. - Caveat: It doesn't work with multibyte strings unless all of the delimiter - characters are ASCII characters < 0x30. - - See also strsep(). */ -#if @GNULIB_STRTOK_R@ -# if @REPLACE_STRTOK_R@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef strtok_r -# define strtok_r rpl_strtok_r -# endif -_GL_FUNCDECL_RPL (strtok_r, char *, - (char *restrict s, char const *restrict delim, - char **restrict save_ptr) - _GL_ARG_NONNULL ((2, 3))); -_GL_CXXALIAS_RPL (strtok_r, char *, - (char *restrict s, char const *restrict delim, - char **restrict save_ptr)); -# else -# if @UNDEFINE_STRTOK_R@ || defined GNULIB_POSIXCHECK -# undef strtok_r -# endif -# if ! @HAVE_DECL_STRTOK_R@ -_GL_FUNCDECL_SYS (strtok_r, char *, - (char *restrict s, char const *restrict delim, - char **restrict save_ptr) - _GL_ARG_NONNULL ((2, 3))); -# endif -_GL_CXXALIAS_SYS (strtok_r, char *, - (char *restrict s, char const *restrict delim, - char **restrict save_ptr)); -# endif -_GL_CXXALIASWARN (strtok_r); -# if defined GNULIB_POSIXCHECK -_GL_WARN_ON_USE (strtok_r, "strtok_r cannot work correctly on character " - "strings in multibyte locales - " - "use mbstok_r if you care about internationalization"); -# endif -#elif defined GNULIB_POSIXCHECK -# undef strtok_r -# if HAVE_RAW_DECL_STRTOK_R -_GL_WARN_ON_USE (strtok_r, "strtok_r is unportable - " - "use gnulib module strtok_r for portability"); -# endif -#endif - - -/* The following functions are not specified by POSIX. They are gnulib - extensions. */ - -#if @GNULIB_MBSLEN@ -/* Return the number of multibyte characters in the character string STRING. - This considers multibyte characters, unlike strlen, which counts bytes. */ -# ifdef __MirBSD__ /* MirBSD defines mbslen as a macro. Override it. */ -# undef mbslen -# endif -# if @HAVE_MBSLEN@ /* AIX, OSF/1, MirBSD define mbslen already in libc. */ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define mbslen rpl_mbslen -# endif -_GL_FUNCDECL_RPL (mbslen, size_t, (const char *string) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (mbslen, size_t, (const char *string)); -# else -_GL_FUNCDECL_SYS (mbslen, size_t, (const char *string) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_SYS (mbslen, size_t, (const char *string)); -# endif -_GL_CXXALIASWARN (mbslen); -#endif - -#if @GNULIB_MBSNLEN@ -/* Return the number of multibyte characters in the character string starting - at STRING and ending at STRING + LEN. */ -_GL_EXTERN_C size_t mbsnlen (const char *string, size_t len) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1)); -#endif - -#if @GNULIB_MBSCHR@ -/* Locate the first single-byte character C in the character string STRING, - and return a pointer to it. Return NULL if C is not found in STRING. - Unlike strchr(), this function works correctly in multibyte locales with - encodings such as GB18030. */ -# if defined __hpux -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define mbschr rpl_mbschr /* avoid collision with HP-UX function */ -# endif -_GL_FUNCDECL_RPL (mbschr, char *, (const char *string, int c) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (mbschr, char *, (const char *string, int c)); -# else -_GL_FUNCDECL_SYS (mbschr, char *, (const char *string, int c) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_SYS (mbschr, char *, (const char *string, int c)); -# endif -_GL_CXXALIASWARN (mbschr); -#endif - -#if @GNULIB_MBSRCHR@ -/* Locate the last single-byte character C in the character string STRING, - and return a pointer to it. Return NULL if C is not found in STRING. - Unlike strrchr(), this function works correctly in multibyte locales with - encodings such as GB18030. */ -# if defined __hpux || defined __INTERIX -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define mbsrchr rpl_mbsrchr /* avoid collision with system function */ -# endif -_GL_FUNCDECL_RPL (mbsrchr, char *, (const char *string, int c) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (mbsrchr, char *, (const char *string, int c)); -# else -_GL_FUNCDECL_SYS (mbsrchr, char *, (const char *string, int c) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_SYS (mbsrchr, char *, (const char *string, int c)); -# endif -_GL_CXXALIASWARN (mbsrchr); -#endif - -#if @GNULIB_MBSSTR@ -/* Find the first occurrence of the character string NEEDLE in the character - string HAYSTACK. Return NULL if NEEDLE is not found in HAYSTACK. - Unlike strstr(), this function works correctly in multibyte locales with - encodings different from UTF-8. */ -_GL_EXTERN_C char * mbsstr (const char *haystack, const char *needle) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1, 2)); -#endif - -#if @GNULIB_MBSCASECMP@ -/* Compare the character strings S1 and S2, ignoring case, returning less than, - equal to or greater than zero if S1 is lexicographically less than, equal to - or greater than S2. - Note: This function may, in multibyte locales, return 0 for strings of - different lengths! - Unlike strcasecmp(), this function works correctly in multibyte locales. */ -_GL_EXTERN_C int mbscasecmp (const char *s1, const char *s2) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1, 2)); -#endif - -#if @GNULIB_MBSNCASECMP@ -/* Compare the initial segment of the character string S1 consisting of at most - N characters with the initial segment of the character string S2 consisting - of at most N characters, ignoring case, returning less than, equal to or - greater than zero if the initial segment of S1 is lexicographically less - than, equal to or greater than the initial segment of S2. - Note: This function may, in multibyte locales, return 0 for initial segments - of different lengths! - Unlike strncasecmp(), this function works correctly in multibyte locales. - But beware that N is not a byte count but a character count! */ -_GL_EXTERN_C int mbsncasecmp (const char *s1, const char *s2, size_t n) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1, 2)); -#endif - -#if @GNULIB_MBSPCASECMP@ -/* Compare the initial segment of the character string STRING consisting of - at most mbslen (PREFIX) characters with the character string PREFIX, - ignoring case. If the two match, return a pointer to the first byte - after this prefix in STRING. Otherwise, return NULL. - Note: This function may, in multibyte locales, return non-NULL if STRING - is of smaller length than PREFIX! - Unlike strncasecmp(), this function works correctly in multibyte - locales. */ -_GL_EXTERN_C char * mbspcasecmp (const char *string, const char *prefix) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1, 2)); -#endif - -#if @GNULIB_MBSCASESTR@ -/* Find the first occurrence of the character string NEEDLE in the character - string HAYSTACK, using case-insensitive comparison. - Note: This function may, in multibyte locales, return success even if - strlen (haystack) < strlen (needle) ! - Unlike strcasestr(), this function works correctly in multibyte locales. */ -_GL_EXTERN_C char * mbscasestr (const char *haystack, const char *needle) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1, 2)); -#endif - -#if @GNULIB_MBSCSPN@ -/* Find the first occurrence in the character string STRING of any character - in the character string ACCEPT. Return the number of bytes from the - beginning of the string to this occurrence, or to the end of the string - if none exists. - Unlike strcspn(), this function works correctly in multibyte locales. */ -_GL_EXTERN_C size_t mbscspn (const char *string, const char *accept) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1, 2)); -#endif - -#if @GNULIB_MBSPBRK@ -/* Find the first occurrence in the character string STRING of any character - in the character string ACCEPT. Return the pointer to it, or NULL if none - exists. - Unlike strpbrk(), this function works correctly in multibyte locales. */ -# if defined __hpux -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define mbspbrk rpl_mbspbrk /* avoid collision with HP-UX function */ -# endif -_GL_FUNCDECL_RPL (mbspbrk, char *, (const char *string, const char *accept) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (mbspbrk, char *, (const char *string, const char *accept)); -# else -_GL_FUNCDECL_SYS (mbspbrk, char *, (const char *string, const char *accept) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_SYS (mbspbrk, char *, (const char *string, const char *accept)); -# endif -_GL_CXXALIASWARN (mbspbrk); -#endif - -#if @GNULIB_MBSSPN@ -/* Find the first occurrence in the character string STRING of any character - not in the character string REJECT. Return the number of bytes from the - beginning of the string to this occurrence, or to the end of the string - if none exists. - Unlike strspn(), this function works correctly in multibyte locales. */ -_GL_EXTERN_C size_t mbsspn (const char *string, const char *reject) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1, 2)); -#endif - -#if @GNULIB_MBSSEP@ -/* Search the next delimiter (multibyte character listed in the character - string DELIM) starting at the character string *STRINGP. - If one is found, overwrite it with a NUL, and advance *STRINGP to point - to the next multibyte character after it. Otherwise, set *STRINGP to NULL. - If *STRINGP was already NULL, nothing happens. - Return the old value of *STRINGP. - - This is a variant of mbstok_r() that supports empty fields. - - Caveat: It modifies the original string. - Caveat: These functions cannot be used on constant strings. - Caveat: The identity of the delimiting character is lost. - - See also mbstok_r(). */ -_GL_EXTERN_C char * mbssep (char **stringp, const char *delim) - _GL_ARG_NONNULL ((1, 2)); -#endif - -#if @GNULIB_MBSTOK_R@ -/* Parse the character string STRING into tokens separated by characters in - the character string DELIM. - If STRING is NULL, the saved pointer in SAVE_PTR is used as - the next starting point. For example: - char s[] = "-abc-=-def"; - char *sp; - x = mbstok_r(s, "-", &sp); // x = "abc", sp = "=-def" - x = mbstok_r(NULL, "-=", &sp); // x = "def", sp = NULL - x = mbstok_r(NULL, "=", &sp); // x = NULL - // s = "abc\0-def\0" - - Caveat: It modifies the original string. - Caveat: These functions cannot be used on constant strings. - Caveat: The identity of the delimiting character is lost. - - See also mbssep(). */ -_GL_EXTERN_C char * mbstok_r (char *string, const char *delim, char **save_ptr) - _GL_ARG_NONNULL ((2, 3)); -#endif - -/* Map any int, typically from errno, into an error message. */ -#if @GNULIB_STRERROR@ -# if @REPLACE_STRERROR@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef strerror -# define strerror rpl_strerror -# endif -_GL_FUNCDECL_RPL (strerror, char *, (int)); -_GL_CXXALIAS_RPL (strerror, char *, (int)); -# else -_GL_CXXALIAS_SYS (strerror, char *, (int)); -# endif -_GL_CXXALIASWARN (strerror); -#elif defined GNULIB_POSIXCHECK -# undef strerror -/* Assume strerror is always declared. */ -_GL_WARN_ON_USE (strerror, "strerror is unportable - " - "use gnulib module strerror to guarantee non-NULL result"); -#endif - -/* Map any int, typically from errno, into an error message. Multithread-safe. - Uses the POSIX declaration, not the glibc declaration. */ -#if @GNULIB_STRERROR_R@ -# if @REPLACE_STRERROR_R@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef strerror_r -# define strerror_r rpl_strerror_r -# endif -_GL_FUNCDECL_RPL (strerror_r, int, (int errnum, char *buf, size_t buflen) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (strerror_r, int, (int errnum, char *buf, size_t buflen)); -# else -# if !@HAVE_DECL_STRERROR_R@ -_GL_FUNCDECL_SYS (strerror_r, int, (int errnum, char *buf, size_t buflen) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (strerror_r, int, (int errnum, char *buf, size_t buflen)); -# endif -# if @HAVE_DECL_STRERROR_R@ -_GL_CXXALIASWARN (strerror_r); -# endif -#elif defined GNULIB_POSIXCHECK -# undef strerror_r -# if HAVE_RAW_DECL_STRERROR_R -_GL_WARN_ON_USE (strerror_r, "strerror_r is unportable - " - "use gnulib module strerror_r-posix for portability"); -# endif -#endif - -#if @GNULIB_STRSIGNAL@ -# if @REPLACE_STRSIGNAL@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define strsignal rpl_strsignal -# endif -_GL_FUNCDECL_RPL (strsignal, char *, (int __sig)); -_GL_CXXALIAS_RPL (strsignal, char *, (int __sig)); -# else -# if ! @HAVE_DECL_STRSIGNAL@ -_GL_FUNCDECL_SYS (strsignal, char *, (int __sig)); -# endif -/* Need to cast, because on Cygwin 1.5.x systems, the return type is - 'const char *'. */ -_GL_CXXALIAS_SYS_CAST (strsignal, char *, (int __sig)); -# endif -_GL_CXXALIASWARN (strsignal); -#elif defined GNULIB_POSIXCHECK -# undef strsignal -# if HAVE_RAW_DECL_STRSIGNAL -_GL_WARN_ON_USE (strsignal, "strsignal is unportable - " - "use gnulib module strsignal for portability"); -# endif -#endif - -#if @GNULIB_STRVERSCMP@ -# if !@HAVE_STRVERSCMP@ -_GL_FUNCDECL_SYS (strverscmp, int, (const char *, const char *) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (strverscmp, int, (const char *, const char *)); -_GL_CXXALIASWARN (strverscmp); -#elif defined GNULIB_POSIXCHECK -# undef strverscmp -# if HAVE_RAW_DECL_STRVERSCMP -_GL_WARN_ON_USE (strverscmp, "strverscmp is unportable - " - "use gnulib module strverscmp for portability"); -# endif -#endif - - -#endif /* _@GUARD_PREFIX@_STRING_H */ -#endif /* _@GUARD_PREFIX@_STRING_H */ -#endif diff --git a/lib/gllib/strverscmp.c b/lib/gllib/strverscmp.c deleted file mode 100644 index 0d8ac1c..0000000 --- a/lib/gllib/strverscmp.c +++ /dev/null @@ -1,117 +0,0 @@ -/* Compare strings while treating digits characters numerically. - Copyright (C) 1997-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Jean-François Bignolles , 1997. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#if !_LIBC -# include -#endif - -#include -#include - -/* states: S_N: normal, S_I: comparing integral part, S_F: comparing - fractional parts, S_Z: idem but with leading Zeroes only */ -#define S_N 0x0 -#define S_I 0x3 -#define S_F 0x6 -#define S_Z 0x9 - -/* result_type: CMP: return diff; LEN: compare using len_diff/diff */ -#define CMP 2 -#define LEN 3 - -#ifndef weak_alias -# define __strverscmp strverscmp -#endif - -/* Compare S1 and S2 as strings holding indices/version numbers, - returning less than, equal to or greater than zero if S1 is less than, - equal to or greater than S2 (for more info, see the texinfo doc). -*/ - -int -__strverscmp (const char *s1, const char *s2) -{ - const unsigned char *p1 = (const unsigned char *) s1; - const unsigned char *p2 = (const unsigned char *) s2; - unsigned char c1, c2; - int state; - int diff; - - /* Symbol(s) 0 [1-9] others - Transition (10) 0 (01) d (00) x */ - static const unsigned char next_state[] = - { - /* state x d 0 */ - /* S_N */ S_N, S_I, S_Z, - /* S_I */ S_N, S_I, S_I, - /* S_F */ S_N, S_F, S_F, - /* S_Z */ S_N, S_F, S_Z - }; - - static const signed char result_type[] = - { - /* state x/x x/d x/0 d/x d/d d/0 0/x 0/d 0/0 */ - - /* S_N */ CMP, CMP, CMP, CMP, LEN, CMP, CMP, CMP, CMP, - /* S_I */ CMP, -1, -1, +1, LEN, LEN, +1, LEN, LEN, - /* S_F */ CMP, CMP, CMP, CMP, CMP, CMP, CMP, CMP, CMP, - /* S_Z */ CMP, +1, +1, -1, CMP, CMP, -1, CMP, CMP - }; - - if (p1 == p2) - return 0; - - c1 = *p1++; - c2 = *p2++; - /* Hint: '0' is a digit too. */ - state = S_N + ((c1 == '0') + (isdigit (c1) != 0)); - - while ((diff = c1 - c2) == 0) - { - if (c1 == '\0') - return diff; - - state = next_state[state]; - c1 = *p1++; - c2 = *p2++; - state += (c1 == '0') + (isdigit (c1) != 0); - } - - state = result_type[state * 3 + (((c2 == '0') + (isdigit (c2) != 0)))]; - - switch (state) - { - case CMP: - return diff; - - case LEN: - while (isdigit (*p1++)) - if (!isdigit (*p2++)) - return 1; - - return isdigit (*p2) ? -1 : diff; - - default: - return state; - } -} -#ifdef weak_alias -libc_hidden_def (__strverscmp) -weak_alias (__strverscmp, strverscmp) -#endif diff --git a/lib/gllib/sys_types.in.h b/lib/gllib/sys_types.in.h deleted file mode 100644 index abdd7f0..0000000 --- a/lib/gllib/sys_types.in.h +++ /dev/null @@ -1,53 +0,0 @@ -/* Provide a more complete sys/types.h. - - Copyright (C) 2011-2017 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this program; if not, see . */ - -#if __GNUC__ >= 3 -@PRAGMA_SYSTEM_HEADER@ -#endif -@PRAGMA_COLUMNS@ - -#ifndef _@GUARD_PREFIX@_SYS_TYPES_H - -/* The include_next requires a split double-inclusion guard. */ -# define _GL_INCLUDING_SYS_TYPES_H -#@INCLUDE_NEXT@ @NEXT_SYS_TYPES_H@ -# undef _GL_INCLUDING_SYS_TYPES_H - -#ifndef _@GUARD_PREFIX@_SYS_TYPES_H -#define _@GUARD_PREFIX@_SYS_TYPES_H - -/* Override off_t if Large File Support is requested on native Windows. */ -#if @WINDOWS_64_BIT_OFF_T@ -/* Same as int64_t in . */ -# if defined _MSC_VER -# define off_t __int64 -# else -# define off_t long long int -# endif -/* Indicator, for gnulib internal purposes. */ -# define _GL_WINDOWS_64_BIT_OFF_T 1 -#endif - -/* MSVC 9 defines size_t in , not in . */ -/* But avoid namespace pollution on glibc systems. */ -#if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) \ - && ! defined __GLIBC__ -# include -#endif - -#endif /* _@GUARD_PREFIX@_SYS_TYPES_H */ -#endif /* _@GUARD_PREFIX@_SYS_TYPES_H */ diff --git a/lib/gllib/verify.h b/lib/gllib/verify.h deleted file mode 100644 index a9ef798..0000000 --- a/lib/gllib/verify.h +++ /dev/null @@ -1,279 +0,0 @@ -/* Compile-time assert-like macros. - - Copyright (C) 2005-2006, 2009-2017 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . */ - -/* Written by Paul Eggert, Bruno Haible, and Jim Meyering. */ - -#ifndef _GL_VERIFY_H -#define _GL_VERIFY_H - - -/* Define _GL_HAVE__STATIC_ASSERT to 1 if _Static_assert works as per C11. - This is supported by GCC 4.6.0 and later, in C mode, and its use - here generates easier-to-read diagnostics when verify (R) fails. - - Define _GL_HAVE_STATIC_ASSERT to 1 if static_assert works as per C++11. - This will likely be supported by future GCC versions, in C++ mode. - - Use this only with GCC. If we were willing to slow 'configure' - down we could also use it with other compilers, but since this - affects only the quality of diagnostics, why bother? */ -#if (4 < __GNUC__ + (6 <= __GNUC_MINOR__) \ - && (201112L <= __STDC_VERSION__ || !defined __STRICT_ANSI__) \ - && !defined __cplusplus) -# define _GL_HAVE__STATIC_ASSERT 1 -#endif -/* The condition (99 < __GNUC__) is temporary, until we know about the - first G++ release that supports static_assert. */ -#if (99 < __GNUC__) && defined __cplusplus -# define _GL_HAVE_STATIC_ASSERT 1 -#endif - -/* FreeBSD 9.1 , included by and lots of other - system headers, defines a conflicting _Static_assert that is no - better than ours; override it. */ -#ifndef _GL_HAVE_STATIC_ASSERT -# include -# undef _Static_assert -#endif - -/* Each of these macros verifies that its argument R is nonzero. To - be portable, R should be an integer constant expression. Unlike - assert (R), there is no run-time overhead. - - If _Static_assert works, verify (R) uses it directly. Similarly, - _GL_VERIFY_TRUE works by packaging a _Static_assert inside a struct - that is an operand of sizeof. - - The code below uses several ideas for C++ compilers, and for C - compilers that do not support _Static_assert: - - * The first step is ((R) ? 1 : -1). Given an expression R, of - integral or boolean or floating-point type, this yields an - expression of integral type, whose value is later verified to be - constant and nonnegative. - - * Next this expression W is wrapped in a type - struct _gl_verify_type { - unsigned int _gl_verify_error_if_negative: W; - }. - If W is negative, this yields a compile-time error. No compiler can - deal with a bit-field of negative size. - - One might think that an array size check would have the same - effect, that is, that the type struct { unsigned int dummy[W]; } - would work as well. However, inside a function, some compilers - (such as C++ compilers and GNU C) allow local parameters and - variables inside array size expressions. With these compilers, - an array size check would not properly diagnose this misuse of - the verify macro: - - void function (int n) { verify (n < 0); } - - * For the verify macro, the struct _gl_verify_type will need to - somehow be embedded into a declaration. To be portable, this - declaration must declare an object, a constant, a function, or a - typedef name. If the declared entity uses the type directly, - such as in - - struct dummy {...}; - typedef struct {...} dummy; - extern struct {...} *dummy; - extern void dummy (struct {...} *); - extern struct {...} *dummy (void); - - two uses of the verify macro would yield colliding declarations - if the entity names are not disambiguated. A workaround is to - attach the current line number to the entity name: - - #define _GL_CONCAT0(x, y) x##y - #define _GL_CONCAT(x, y) _GL_CONCAT0 (x, y) - extern struct {...} * _GL_CONCAT (dummy, __LINE__); - - But this has the problem that two invocations of verify from - within the same macro would collide, since the __LINE__ value - would be the same for both invocations. (The GCC __COUNTER__ - macro solves this problem, but is not portable.) - - A solution is to use the sizeof operator. It yields a number, - getting rid of the identity of the type. Declarations like - - extern int dummy [sizeof (struct {...})]; - extern void dummy (int [sizeof (struct {...})]); - extern int (*dummy (void)) [sizeof (struct {...})]; - - can be repeated. - - * Should the implementation use a named struct or an unnamed struct? - Which of the following alternatives can be used? - - extern int dummy [sizeof (struct {...})]; - extern int dummy [sizeof (struct _gl_verify_type {...})]; - extern void dummy (int [sizeof (struct {...})]); - extern void dummy (int [sizeof (struct _gl_verify_type {...})]); - extern int (*dummy (void)) [sizeof (struct {...})]; - extern int (*dummy (void)) [sizeof (struct _gl_verify_type {...})]; - - In the second and sixth case, the struct type is exported to the - outer scope; two such declarations therefore collide. GCC warns - about the first, third, and fourth cases. So the only remaining - possibility is the fifth case: - - extern int (*dummy (void)) [sizeof (struct {...})]; - - * GCC warns about duplicate declarations of the dummy function if - -Wredundant-decls is used. GCC 4.3 and later have a builtin - __COUNTER__ macro that can let us generate unique identifiers for - each dummy function, to suppress this warning. - - * This implementation exploits the fact that older versions of GCC, - which do not support _Static_assert, also do not warn about the - last declaration mentioned above. - - * GCC warns if -Wnested-externs is enabled and verify() is used - within a function body; but inside a function, you can always - arrange to use verify_expr() instead. - - * In C++, any struct definition inside sizeof is invalid. - Use a template type to work around the problem. */ - -/* Concatenate two preprocessor tokens. */ -#define _GL_CONCAT(x, y) _GL_CONCAT0 (x, y) -#define _GL_CONCAT0(x, y) x##y - -/* _GL_COUNTER is an integer, preferably one that changes each time we - use it. Use __COUNTER__ if it works, falling back on __LINE__ - otherwise. __LINE__ isn't perfect, but it's better than a - constant. */ -#if defined __COUNTER__ && __COUNTER__ != __COUNTER__ -# define _GL_COUNTER __COUNTER__ -#else -# define _GL_COUNTER __LINE__ -#endif - -/* Generate a symbol with the given prefix, making it unique if - possible. */ -#define _GL_GENSYM(prefix) _GL_CONCAT (prefix, _GL_COUNTER) - -/* Verify requirement R at compile-time, as an integer constant expression - that returns 1. If R is false, fail at compile-time, preferably - with a diagnostic that includes the string-literal DIAGNOSTIC. */ - -#define _GL_VERIFY_TRUE(R, DIAGNOSTIC) \ - (!!sizeof (_GL_VERIFY_TYPE (R, DIAGNOSTIC))) - -#ifdef __cplusplus -# if !GNULIB_defined_struct__gl_verify_type -template - struct _gl_verify_type { - unsigned int _gl_verify_error_if_negative: w; - }; -# define GNULIB_defined_struct__gl_verify_type 1 -# endif -# define _GL_VERIFY_TYPE(R, DIAGNOSTIC) \ - _gl_verify_type<(R) ? 1 : -1> -#elif defined _GL_HAVE__STATIC_ASSERT -# define _GL_VERIFY_TYPE(R, DIAGNOSTIC) \ - struct { \ - _Static_assert (R, DIAGNOSTIC); \ - int _gl_dummy; \ - } -#else -# define _GL_VERIFY_TYPE(R, DIAGNOSTIC) \ - struct { unsigned int _gl_verify_error_if_negative: (R) ? 1 : -1; } -#endif - -/* Verify requirement R at compile-time, as a declaration without a - trailing ';'. If R is false, fail at compile-time, preferably - with a diagnostic that includes the string-literal DIAGNOSTIC. - - Unfortunately, unlike C11, this implementation must appear as an - ordinary declaration, and cannot appear inside struct { ... }. */ - -#ifdef _GL_HAVE__STATIC_ASSERT -# define _GL_VERIFY _Static_assert -#else -# define _GL_VERIFY(R, DIAGNOSTIC) \ - extern int (*_GL_GENSYM (_gl_verify_function) (void)) \ - [_GL_VERIFY_TRUE (R, DIAGNOSTIC)] -#endif - -/* _GL_STATIC_ASSERT_H is defined if this code is copied into assert.h. */ -#ifdef _GL_STATIC_ASSERT_H -# if !defined _GL_HAVE__STATIC_ASSERT && !defined _Static_assert -# define _Static_assert(R, DIAGNOSTIC) _GL_VERIFY (R, DIAGNOSTIC) -# endif -# if !defined _GL_HAVE_STATIC_ASSERT && !defined static_assert -# define static_assert _Static_assert /* C11 requires this #define. */ -# endif -#endif - -/* @assert.h omit start@ */ - -/* Each of these macros verifies that its argument R is nonzero. To - be portable, R should be an integer constant expression. Unlike - assert (R), there is no run-time overhead. - - There are two macros, since no single macro can be used in all - contexts in C. verify_true (R) is for scalar contexts, including - integer constant expression contexts. verify (R) is for declaration - contexts, e.g., the top level. */ - -/* Verify requirement R at compile-time, as an integer constant expression. - Return 1. This is equivalent to verify_expr (R, 1). - - verify_true is obsolescent; please use verify_expr instead. */ - -#define verify_true(R) _GL_VERIFY_TRUE (R, "verify_true (" #R ")") - -/* Verify requirement R at compile-time. Return the value of the - expression E. */ - -#define verify_expr(R, E) \ - (_GL_VERIFY_TRUE (R, "verify_expr (" #R ", " #E ")") ? (E) : (E)) - -/* Verify requirement R at compile-time, as a declaration without a - trailing ';'. */ - -#define verify(R) _GL_VERIFY (R, "verify (" #R ")") - -#ifndef __has_builtin -# define __has_builtin(x) 0 -#endif - -/* Assume that R always holds. This lets the compiler optimize - accordingly. R should not have side-effects; it may or may not be - evaluated. Behavior is undefined if R is false. */ - -#if (__has_builtin (__builtin_unreachable) \ - || 4 < __GNUC__ + (5 <= __GNUC_MINOR__)) -# define assume(R) ((R) ? (void) 0 : __builtin_unreachable ()) -#elif 1200 <= _MSC_VER -# define assume(R) __assume (R) -#elif ((defined GCC_LINT || defined lint) \ - && (__has_builtin (__builtin_trap) \ - || 3 < __GNUC__ + (3 < __GNUC_MINOR__ + (4 <= __GNUC_PATCHLEVEL__)))) - /* Doing it this way helps various packages when configured with - --enable-gcc-warnings, which compiles with -Dlint. It's nicer - when 'assume' silences warnings even with older GCCs. */ -# define assume(R) ((R) ? (void) 0 : __builtin_trap ()) -#else -# define assume(R) ((void) (0 && (R))) -#endif - -/* @assert.h omit end@ */ - -#endif diff --git a/lib/glm4/00gnulib.m4 b/lib/glm4/00gnulib.m4 deleted file mode 100644 index bb3512f..0000000 --- a/lib/glm4/00gnulib.m4 +++ /dev/null @@ -1,46 +0,0 @@ -# 00gnulib.m4 serial 3 -dnl Copyright (C) 2009-2017 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl This file must be named something that sorts before all other -dnl gnulib-provided .m4 files. It is needed until such time as we can -dnl assume Autoconf 2.64, with its improved AC_DEFUN_ONCE and -dnl m4_divert semantics. - -# Until autoconf 2.63, handling of the diversion stack required m4_init -# to be called first; but this does not happen with aclocal. Wrapping -# the entire execution in another layer of the diversion stack fixes this. -# Worse, prior to autoconf 2.62, m4_wrap depended on the underlying m4 -# for whether it was FIFO or LIFO; in order to properly balance with -# m4_init, we need to undo our push just before anything wrapped within -# the m4_init body. The way to ensure this is to wrap both sides of -# m4_init with a one-shot macro that does the pop at the right time. -m4_ifndef([_m4_divert_diversion], -[m4_divert_push([KILL]) -m4_define([gl_divert_fixup], [m4_divert_pop()m4_define([$0])]) -m4_define([m4_init], - [gl_divert_fixup()]m4_defn([m4_init])[gl_divert_fixup()])]) - - -# AC_DEFUN_ONCE([NAME], VALUE) -# ---------------------------- -# Define NAME to expand to VALUE on the first use (whether by direct -# expansion, or by AC_REQUIRE), and to nothing on all subsequent uses. -# Avoid bugs in AC_REQUIRE in Autoconf 2.63 and earlier. This -# definition is slower than the version in Autoconf 2.64, because it -# can only use interfaces that existed since 2.59; but it achieves the -# same effect. Quoting is necessary to avoid confusing Automake. -m4_version_prereq([2.63.263], [], -[m4_define([AC][_DEFUN_ONCE], - [AC][_DEFUN([$1], - [AC_REQUIRE([_gl_DEFUN_ONCE([$1])], - [m4_indir([_gl_DEFUN_ONCE([$1])])])])]dnl -[AC][_DEFUN([_gl_DEFUN_ONCE([$1])], [$2])])]) - -# gl_00GNULIB -# ----------- -# Witness macro that this file has been included. Needed to force -# Automake to include this file prior to all other gnulib .m4 files. -AC_DEFUN([gl_00GNULIB]) diff --git a/lib/glm4/absolute-header.m4 b/lib/glm4/absolute-header.m4 deleted file mode 100644 index c73adc8..0000000 --- a/lib/glm4/absolute-header.m4 +++ /dev/null @@ -1,102 +0,0 @@ -# absolute-header.m4 serial 16 -dnl Copyright (C) 2006-2017 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Derek Price. - -# gl_ABSOLUTE_HEADER(HEADER1 HEADER2 ...) -# --------------------------------------- -# Find the absolute name of a header file, testing first if the header exists. -# If the header were sys/inttypes.h, this macro would define -# ABSOLUTE_SYS_INTTYPES_H to the '""' quoted absolute name of sys/inttypes.h -# in config.h -# (e.g. '#define ABSOLUTE_SYS_INTTYPES_H "///usr/include/sys/inttypes.h"'). -# The three "///" are to pacify Sun C 5.8, which otherwise would say -# "warning: #include of /usr/include/... may be non-portable". -# Use '""', not '<>', so that the /// cannot be confused with a C99 comment. -# Note: This macro assumes that the header file is not empty after -# preprocessing, i.e. it does not only define preprocessor macros but also -# provides some type/enum definitions or function/variable declarations. -AC_DEFUN([gl_ABSOLUTE_HEADER], -[AC_REQUIRE([AC_CANONICAL_HOST]) -AC_LANG_PREPROC_REQUIRE()dnl -dnl FIXME: gl_absolute_header and ac_header_exists must be used unquoted -dnl until we can assume autoconf 2.64 or newer. -m4_foreach_w([gl_HEADER_NAME], [$1], - [AS_VAR_PUSHDEF([gl_absolute_header], - [gl_cv_absolute_]m4_defn([gl_HEADER_NAME]))dnl - AC_CACHE_CHECK([absolute name of <]m4_defn([gl_HEADER_NAME])[>], - m4_defn([gl_absolute_header]), - [AS_VAR_PUSHDEF([ac_header_exists], - [ac_cv_header_]m4_defn([gl_HEADER_NAME]))dnl - AC_CHECK_HEADERS_ONCE(m4_defn([gl_HEADER_NAME]))dnl - if test AS_VAR_GET(ac_header_exists) = yes; then - gl_ABSOLUTE_HEADER_ONE(m4_defn([gl_HEADER_NAME])) - fi - AS_VAR_POPDEF([ac_header_exists])dnl - ])dnl - AC_DEFINE_UNQUOTED(AS_TR_CPP([ABSOLUTE_]m4_defn([gl_HEADER_NAME])), - ["AS_VAR_GET(gl_absolute_header)"], - [Define this to an absolute name of <]m4_defn([gl_HEADER_NAME])[>.]) - AS_VAR_POPDEF([gl_absolute_header])dnl -])dnl -])# gl_ABSOLUTE_HEADER - -# gl_ABSOLUTE_HEADER_ONE(HEADER) -# ------------------------------ -# Like gl_ABSOLUTE_HEADER, except that: -# - it assumes that the header exists, -# - it uses the current CPPFLAGS, -# - it does not cache the result, -# - it is silent. -AC_DEFUN([gl_ABSOLUTE_HEADER_ONE], -[ - AC_REQUIRE([AC_CANONICAL_HOST]) - AC_LANG_CONFTEST([AC_LANG_SOURCE([[#include <]]m4_dquote([$1])[[>]])]) - dnl AIX "xlc -E" and "cc -E" omit #line directives for header files - dnl that contain only a #include of other header files and no - dnl non-comment tokens of their own. This leads to a failure to - dnl detect the absolute name of , , - dnl and others. The workaround is to force preservation of comments - dnl through option -C. This ensures all necessary #line directives - dnl are present. GCC supports option -C as well. - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac -changequote(,) - case "$host_os" in - mingw*) - dnl For the sake of native Windows compilers (excluding gcc), - dnl treat backslash as a directory separator, like /. - dnl Actually, these compilers use a double-backslash as - dnl directory separator, inside the - dnl # line "filename" - dnl directives. - gl_dirsep_regex='[/\\]' - ;; - *) - gl_dirsep_regex='\/' - ;; - esac - dnl A sed expression that turns a string into a basic regular - dnl expression, for use within "/.../". - gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' - gl_header_literal_regex=`echo '$1' \ - | sed -e "$gl_make_literal_regex_sed"` - gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ - s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ - s|^/[^/]|//&| - p - q - }' -changequote([,]) - dnl eval is necessary to expand gl_absname_cpp. - dnl Ultrix and Pyramid sh refuse to redirect output of eval, - dnl so use subshell. - AS_VAR_SET([gl_cv_absolute_]AS_TR_SH([[$1]]), -[`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD | - sed -n "$gl_absolute_header_sed"`]) -]) diff --git a/lib/glm4/extensions.m4 b/lib/glm4/extensions.m4 deleted file mode 100644 index c60f537..0000000 --- a/lib/glm4/extensions.m4 +++ /dev/null @@ -1,173 +0,0 @@ -# serial 15 -*- Autoconf -*- -# Enable extensions on systems that normally disable them. - -# Copyright (C) 2003, 2006-2017 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This definition of AC_USE_SYSTEM_EXTENSIONS is stolen from git -# Autoconf. Perhaps we can remove this once we can assume Autoconf -# 2.70 or later everywhere, but since Autoconf mutates rapidly -# enough in this area it's likely we'll need to redefine -# AC_USE_SYSTEM_EXTENSIONS for quite some time. - -# If autoconf reports a warning -# warning: AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS -# or warning: AC_RUN_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS -# the fix is -# 1) to ensure that AC_USE_SYSTEM_EXTENSIONS is never directly invoked -# but always AC_REQUIREd, -# 2) to ensure that for each occurrence of -# AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) -# or -# AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) -# the corresponding gnulib module description has 'extensions' among -# its dependencies. This will ensure that the gl_USE_SYSTEM_EXTENSIONS -# invocation occurs in gl_EARLY, not in gl_INIT. - -# AC_USE_SYSTEM_EXTENSIONS -# ------------------------ -# Enable extensions on systems that normally disable them, -# typically due to standards-conformance issues. -# -# Remember that #undef in AH_VERBATIM gets replaced with #define by -# AC_DEFINE. The goal here is to define all known feature-enabling -# macros, then, if reports of conflicts are made, disable macros that -# cause problems on some platforms (such as __EXTENSIONS__). -AC_DEFUN_ONCE([AC_USE_SYSTEM_EXTENSIONS], -[AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl -AC_BEFORE([$0], [AC_RUN_IFELSE])dnl - - AC_CHECK_HEADER([minix/config.h], [MINIX=yes], [MINIX=]) - if test "$MINIX" = yes; then - AC_DEFINE([_POSIX_SOURCE], [1], - [Define to 1 if you need to in order for 'stat' and other - things to work.]) - AC_DEFINE([_POSIX_1_SOURCE], [2], - [Define to 2 if the system does not provide POSIX.1 features - except with this defined.]) - AC_DEFINE([_MINIX], [1], - [Define to 1 if on MINIX.]) - AC_DEFINE([_NETBSD_SOURCE], [1], - [Define to 1 to make NetBSD features available. MINIX 3 needs this.]) - fi - -dnl Use a different key than __EXTENSIONS__, as that name broke existing -dnl configure.ac when using autoheader 2.62. - AH_VERBATIM([USE_SYSTEM_EXTENSIONS], -[/* Enable extensions on AIX 3, Interix. */ -#ifndef _ALL_SOURCE -# undef _ALL_SOURCE -#endif -/* Enable general extensions on macOS. */ -#ifndef _DARWIN_C_SOURCE -# undef _DARWIN_C_SOURCE -#endif -/* Enable GNU extensions on systems that have them. */ -#ifndef _GNU_SOURCE -# undef _GNU_SOURCE -#endif -/* Enable threading extensions on Solaris. */ -#ifndef _POSIX_PTHREAD_SEMANTICS -# undef _POSIX_PTHREAD_SEMANTICS -#endif -/* Enable extensions specified by ISO/IEC TS 18661-5:2014. */ -#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__ -# undef __STDC_WANT_IEC_60559_ATTRIBS_EXT__ -#endif -/* Enable extensions specified by ISO/IEC TS 18661-1:2014. */ -#ifndef __STDC_WANT_IEC_60559_BFP_EXT__ -# undef __STDC_WANT_IEC_60559_BFP_EXT__ -#endif -/* Enable extensions specified by ISO/IEC TS 18661-2:2015. */ -#ifndef __STDC_WANT_IEC_60559_DFP_EXT__ -# undef __STDC_WANT_IEC_60559_DFP_EXT__ -#endif -/* Enable extensions specified by ISO/IEC TS 18661-4:2015. */ -#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__ -# undef __STDC_WANT_IEC_60559_FUNCS_EXT__ -#endif -/* Enable extensions specified by ISO/IEC TS 18661-3:2015. */ -#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__ -# undef __STDC_WANT_IEC_60559_TYPES_EXT__ -#endif -/* Enable extensions specified by ISO/IEC TR 24731-2:2010. */ -#ifndef __STDC_WANT_LIB_EXT2__ -# undef __STDC_WANT_LIB_EXT2__ -#endif -/* Enable extensions specified by ISO/IEC 24747:2009. */ -#ifndef __STDC_WANT_MATH_SPEC_FUNCS__ -# undef __STDC_WANT_MATH_SPEC_FUNCS__ -#endif -/* Enable extensions on HP NonStop. */ -#ifndef _TANDEM_SOURCE -# undef _TANDEM_SOURCE -#endif -/* Enable X/Open extensions if necessary. HP-UX 11.11 defines - mbstate_t only if _XOPEN_SOURCE is defined to 500, regardless of - whether compiling with -Ae or -D_HPUX_SOURCE=1. */ -#ifndef _XOPEN_SOURCE -# undef _XOPEN_SOURCE -#endif -/* Enable general extensions on Solaris. */ -#ifndef __EXTENSIONS__ -# undef __EXTENSIONS__ -#endif -]) - AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__], - [ac_cv_safe_to_define___extensions__], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([[ -# define __EXTENSIONS__ 1 - ]AC_INCLUDES_DEFAULT])], - [ac_cv_safe_to_define___extensions__=yes], - [ac_cv_safe_to_define___extensions__=no])]) - test $ac_cv_safe_to_define___extensions__ = yes && - AC_DEFINE([__EXTENSIONS__]) - AC_DEFINE([_ALL_SOURCE]) - AC_DEFINE([_DARWIN_C_SOURCE]) - AC_DEFINE([_GNU_SOURCE]) - AC_DEFINE([_POSIX_PTHREAD_SEMANTICS]) - AC_DEFINE([__STDC_WANT_IEC_60559_ATTRIBS_EXT__]) - AC_DEFINE([__STDC_WANT_IEC_60559_BFP_EXT__]) - AC_DEFINE([__STDC_WANT_IEC_60559_DFP_EXT__]) - AC_DEFINE([__STDC_WANT_IEC_60559_FUNCS_EXT__]) - AC_DEFINE([__STDC_WANT_IEC_60559_TYPES_EXT__]) - AC_DEFINE([__STDC_WANT_LIB_EXT2__]) - AC_DEFINE([__STDC_WANT_MATH_SPEC_FUNCS__]) - AC_DEFINE([_TANDEM_SOURCE]) - AC_CACHE_CHECK([whether _XOPEN_SOURCE should be defined], - [ac_cv_should_define__xopen_source], - [ac_cv_should_define__xopen_source=no - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([[ - #include - mbstate_t x;]])], - [], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([[ - #define _XOPEN_SOURCE 500 - #include - mbstate_t x;]])], - [ac_cv_should_define__xopen_source=yes])])]) - test $ac_cv_should_define__xopen_source = yes && - AC_DEFINE([_XOPEN_SOURCE], [500]) -])# AC_USE_SYSTEM_EXTENSIONS - -# gl_USE_SYSTEM_EXTENSIONS -# ------------------------ -# Enable extensions on systems that normally disable them, -# typically due to standards-conformance issues. -AC_DEFUN_ONCE([gl_USE_SYSTEM_EXTENSIONS], -[ - dnl Require this macro before AC_USE_SYSTEM_EXTENSIONS. - dnl gnulib does not need it. But if it gets required by third-party macros - dnl after AC_USE_SYSTEM_EXTENSIONS is required, autoconf 2.62..2.63 emit a - dnl warning: "AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS". - dnl Note: We can do this only for one of the macros AC_AIX, AC_GNU_SOURCE, - dnl AC_MINIX. If people still use AC_AIX or AC_MINIX, they are out of luck. - AC_REQUIRE([AC_GNU_SOURCE]) - - AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) -]) diff --git a/lib/glm4/extern-inline.m4 b/lib/glm4/extern-inline.m4 deleted file mode 100644 index 00f9609..0000000 --- a/lib/glm4/extern-inline.m4 +++ /dev/null @@ -1,102 +0,0 @@ -dnl 'extern inline' a la ISO C99. - -dnl Copyright 2012-2017 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_EXTERN_INLINE], -[ - AH_VERBATIM([extern_inline], -[/* Please see the Gnulib manual for how to use these macros. - - Suppress extern inline with HP-UX cc, as it appears to be broken; see - . - - Suppress extern inline with Sun C in standards-conformance mode, as it - mishandles inline functions that call each other. E.g., for 'inline void f - (void) { } inline void g (void) { f (); }', c99 incorrectly complains - 'reference to static identifier "f" in extern inline function'. - This bug was observed with Sun C 5.12 SunOS_i386 2011/11/16. - - Suppress extern inline (with or without __attribute__ ((__gnu_inline__))) - on configurations that mistakenly use 'static inline' to implement - functions or macros in standard C headers like . For example, - if isdigit is mistakenly implemented via a static inline function, - a program containing an extern inline function that calls isdigit - may not work since the C standard prohibits extern inline functions - from calling static functions. This bug is known to occur on: - - OS X 10.8 and earlier; see: - http://lists.gnu.org/archive/html/bug-gnulib/2012-12/msg00023.html - - DragonFly; see - http://muscles.dragonflybsd.org/bulk/bleeding-edge-potential/latest-per-pkg/ah-tty-0.3.12.log - - FreeBSD; see: - http://lists.gnu.org/archive/html/bug-gnulib/2014-07/msg00104.html - - OS X 10.9 has a macro __header_inline indicating the bug is fixed for C and - for clang but remains for g++; see . - Assume DragonFly and FreeBSD will be similar. */ -#if (((defined __APPLE__ && defined __MACH__) \ - || defined __DragonFly__ || defined __FreeBSD__) \ - && (defined __header_inline \ - ? (defined __cplusplus && defined __GNUC_STDC_INLINE__ \ - && ! defined __clang__) \ - : ((! defined _DONT_USE_CTYPE_INLINE_ \ - && (defined __GNUC__ || defined __cplusplus)) \ - || (defined _FORTIFY_SOURCE && 0 < _FORTIFY_SOURCE \ - && defined __GNUC__ && ! defined __cplusplus)))) -# define _GL_EXTERN_INLINE_STDHEADER_BUG -#endif -#if ((__GNUC__ \ - ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \ - : (199901L <= __STDC_VERSION__ \ - && !defined __HP_cc \ - && !defined __PGI \ - && !(defined __SUNPRO_C && __STDC__))) \ - && !defined _GL_EXTERN_INLINE_STDHEADER_BUG) -# define _GL_INLINE inline -# define _GL_EXTERN_INLINE extern inline -# define _GL_EXTERN_INLINE_IN_USE -#elif (2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __STRICT_ANSI__ \ - && !defined _GL_EXTERN_INLINE_STDHEADER_BUG) -# if defined __GNUC_GNU_INLINE__ && __GNUC_GNU_INLINE__ - /* __gnu_inline__ suppresses a GCC 4.2 diagnostic. */ -# define _GL_INLINE extern inline __attribute__ ((__gnu_inline__)) -# else -# define _GL_INLINE extern inline -# endif -# define _GL_EXTERN_INLINE extern -# define _GL_EXTERN_INLINE_IN_USE -#else -# define _GL_INLINE static _GL_UNUSED -# define _GL_EXTERN_INLINE static _GL_UNUSED -#endif - -/* In GCC 4.6 (inclusive) to 5.1 (exclusive), - suppress bogus "no previous prototype for 'FOO'" - and "no previous declaration for 'FOO'" diagnostics, - when FOO is an inline function in the header; see - and - . */ -#if __GNUC__ == 4 && 6 <= __GNUC_MINOR__ -# if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ -# define _GL_INLINE_HEADER_CONST_PRAGMA -# else -# define _GL_INLINE_HEADER_CONST_PRAGMA \ - _Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute=const\"") -# endif -# define _GL_INLINE_HEADER_BEGIN \ - _Pragma ("GCC diagnostic push") \ - _Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") \ - _Pragma ("GCC diagnostic ignored \"-Wmissing-declarations\"") \ - _GL_INLINE_HEADER_CONST_PRAGMA -# define _GL_INLINE_HEADER_END \ - _Pragma ("GCC diagnostic pop") -#else -# define _GL_INLINE_HEADER_BEGIN -# define _GL_INLINE_HEADER_END -#endif]) -]) diff --git a/lib/glm4/gnulib-cache.m4 b/lib/glm4/gnulib-cache.m4 deleted file mode 100644 index 4c39644..0000000 --- a/lib/glm4/gnulib-cache.m4 +++ /dev/null @@ -1,56 +0,0 @@ -# Copyright (C) 2002-2017 Free Software Foundation, Inc. -# -# This file is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or -# (at your option) any later version. -# -# This file is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this file. If not, see . -# -# As a special exception to the GNU General Public License, -# this file may be distributed as part of a program that -# contains a configuration script generated by Autoconf, under -# the same distribution terms as the rest of that program. -# -# Generated by gnulib-tool. -# -# This file represents the specification of how gnulib-tool is used. -# It acts as a cache: It is written and read by gnulib-tool. -# In projects that use version control, this file is meant to be put under -# version control, like the configure.ac and various Makefile.am files. - - -# Specification in the form of a command-line invocation: -# gnulib-tool --import --lib=libgnu --source-base=lib/gllib --m4-base=lib/glm4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --lgpl=2 --no-conditional-dependencies --libtool --macro-prefix=lgl --no-vc-files hash-pjw-bare intprops lib-symbol-versions lib-symbol-visibility minmax stdint strverscmp - -# Specification in the form of a few gnulib-tool.m4 macro invocations: -gl_LOCAL_DIR([]) -gl_MODULES([ - hash-pjw-bare - intprops - lib-symbol-versions - lib-symbol-visibility - minmax - stdint - strverscmp -]) -gl_AVOID([]) -gl_SOURCE_BASE([lib/gllib]) -gl_M4_BASE([lib/glm4]) -gl_PO_BASE([]) -gl_DOC_BASE([doc]) -gl_TESTS_BASE([tests]) -gl_LIB([libgnu]) -gl_LGPL([2]) -gl_MAKEFILE_NAME([]) -gl_LIBTOOL -gl_MACRO_PREFIX([lgl]) -gl_PO_DOMAIN([]) -gl_WITNESS_C_MACRO([]) -gl_VC_FILES([false]) diff --git a/lib/glm4/gnulib-common.m4 b/lib/glm4/gnulib-common.m4 deleted file mode 100644 index 7d9b40b..0000000 --- a/lib/glm4/gnulib-common.m4 +++ /dev/null @@ -1,462 +0,0 @@ -# gnulib-common.m4 serial 36 -dnl Copyright (C) 2007-2017 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -# gl_COMMON -# is expanded unconditionally through gnulib-tool magic. -AC_DEFUN([gl_COMMON], [ - dnl Use AC_REQUIRE here, so that the code is expanded once only. - AC_REQUIRE([gl_00GNULIB]) - AC_REQUIRE([gl_COMMON_BODY]) -]) -AC_DEFUN([gl_COMMON_BODY], [ - AH_VERBATIM([_Noreturn], -[/* The _Noreturn keyword of C11. */ -#if ! (defined _Noreturn \ - || (defined __STDC_VERSION__ && 201112 <= __STDC_VERSION__)) -# if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \ - || 0x5110 <= __SUNPRO_C) -# define _Noreturn __attribute__ ((__noreturn__)) -# elif defined _MSC_VER && 1200 <= _MSC_VER -# define _Noreturn __declspec (noreturn) -# else -# define _Noreturn -# endif -#endif -]) - AH_VERBATIM([isoc99_inline], -[/* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports - the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of - earlier versions), but does not display it by setting __GNUC_STDC_INLINE__. - __APPLE__ && __MACH__ test for Mac OS X. - __APPLE_CC__ tests for the Apple compiler and its version. - __STDC_VERSION__ tests for the C99 mode. */ -#if defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && !defined __cplusplus && __STDC_VERSION__ >= 199901L && !defined __GNUC_STDC_INLINE__ -# define __GNUC_STDC_INLINE__ 1 -#endif]) - AH_VERBATIM([unused_parameter], -[/* Define as a marker that can be attached to declarations that might not - be used. This helps to reduce warnings, such as from - GCC -Wunused-parameter. */ -#if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) -# define _GL_UNUSED __attribute__ ((__unused__)) -#else -# define _GL_UNUSED -#endif -/* The name _UNUSED_PARAMETER_ is an earlier spelling, although the name - is a misnomer outside of parameter lists. */ -#define _UNUSED_PARAMETER_ _GL_UNUSED - -/* gcc supports the "unused" attribute on possibly unused labels, and - g++ has since version 4.5. Note to support C++ as well as C, - _GL_UNUSED_LABEL should be used with a trailing ; */ -#if !defined __cplusplus || __GNUC__ > 4 \ - || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5) -# define _GL_UNUSED_LABEL _GL_UNUSED -#else -# define _GL_UNUSED_LABEL -#endif - -/* The __pure__ attribute was added in gcc 2.96. */ -#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) -# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) -#else -# define _GL_ATTRIBUTE_PURE /* empty */ -#endif - -/* The __const__ attribute was added in gcc 2.95. */ -#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) -# define _GL_ATTRIBUTE_CONST __attribute__ ((__const__)) -#else -# define _GL_ATTRIBUTE_CONST /* empty */ -#endif -]) - dnl Preparation for running test programs: - dnl Tell glibc to write diagnostics from -D_FORTIFY_SOURCE=2 to stderr, not - dnl to /dev/tty, so they can be redirected to log files. Such diagnostics - dnl arise e.g., in the macros gl_PRINTF_DIRECTIVE_N, gl_SNPRINTF_DIRECTIVE_N. - LIBC_FATAL_STDERR_=1 - export LIBC_FATAL_STDERR_ -]) - -# gl_MODULE_INDICATOR_CONDITION -# expands to a C preprocessor expression that evaluates to 1 or 0, depending -# whether a gnulib module that has been requested shall be considered present -# or not. -m4_define([gl_MODULE_INDICATOR_CONDITION], [1]) - -# gl_MODULE_INDICATOR_SET_VARIABLE([modulename]) -# sets the shell variable that indicates the presence of the given module to -# a C preprocessor expression that will evaluate to 1. -AC_DEFUN([gl_MODULE_INDICATOR_SET_VARIABLE], -[ - gl_MODULE_INDICATOR_SET_VARIABLE_AUX( - [GNULIB_[]m4_translit([[$1]], - [abcdefghijklmnopqrstuvwxyz./-], - [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])], - [gl_MODULE_INDICATOR_CONDITION]) -]) - -# gl_MODULE_INDICATOR_SET_VARIABLE_AUX([variable]) -# modifies the shell variable to include the gl_MODULE_INDICATOR_CONDITION. -# The shell variable's value is a C preprocessor expression that evaluates -# to 0 or 1. -AC_DEFUN([gl_MODULE_INDICATOR_SET_VARIABLE_AUX], -[ - m4_if(m4_defn([gl_MODULE_INDICATOR_CONDITION]), [1], - [ - dnl Simplify the expression VALUE || 1 to 1. - $1=1 - ], - [gl_MODULE_INDICATOR_SET_VARIABLE_AUX_OR([$1], - [gl_MODULE_INDICATOR_CONDITION])]) -]) - -# gl_MODULE_INDICATOR_SET_VARIABLE_AUX_OR([variable], [condition]) -# modifies the shell variable to include the given condition. The shell -# variable's value is a C preprocessor expression that evaluates to 0 or 1. -AC_DEFUN([gl_MODULE_INDICATOR_SET_VARIABLE_AUX_OR], -[ - dnl Simplify the expression 1 || CONDITION to 1. - if test "$[]$1" != 1; then - dnl Simplify the expression 0 || CONDITION to CONDITION. - if test "$[]$1" = 0; then - $1=$2 - else - $1="($[]$1 || $2)" - fi - fi -]) - -# gl_MODULE_INDICATOR([modulename]) -# defines a C macro indicating the presence of the given module -# in a location where it can be used. -# | Value | Value | -# | in lib/ | in tests/ | -# --------------------------------------------+---------+-----------+ -# Module present among main modules: | 1 | 1 | -# --------------------------------------------+---------+-----------+ -# Module present among tests-related modules: | 0 | 1 | -# --------------------------------------------+---------+-----------+ -# Module not present at all: | 0 | 0 | -# --------------------------------------------+---------+-----------+ -AC_DEFUN([gl_MODULE_INDICATOR], -[ - AC_DEFINE_UNQUOTED([GNULIB_]m4_translit([[$1]], - [abcdefghijklmnopqrstuvwxyz./-], - [ABCDEFGHIJKLMNOPQRSTUVWXYZ___]), - [gl_MODULE_INDICATOR_CONDITION], - [Define to a C preprocessor expression that evaluates to 1 or 0, - depending whether the gnulib module $1 shall be considered present.]) -]) - -# gl_MODULE_INDICATOR_FOR_TESTS([modulename]) -# defines a C macro indicating the presence of the given module -# in lib or tests. This is useful to determine whether the module -# should be tested. -# | Value | Value | -# | in lib/ | in tests/ | -# --------------------------------------------+---------+-----------+ -# Module present among main modules: | 1 | 1 | -# --------------------------------------------+---------+-----------+ -# Module present among tests-related modules: | 1 | 1 | -# --------------------------------------------+---------+-----------+ -# Module not present at all: | 0 | 0 | -# --------------------------------------------+---------+-----------+ -AC_DEFUN([gl_MODULE_INDICATOR_FOR_TESTS], -[ - AC_DEFINE([GNULIB_TEST_]m4_translit([[$1]], - [abcdefghijklmnopqrstuvwxyz./-], - [ABCDEFGHIJKLMNOPQRSTUVWXYZ___]), [1], - [Define to 1 when the gnulib module $1 should be tested.]) -]) - -# gl_ASSERT_NO_GNULIB_POSIXCHECK -# asserts that there will never be a need to #define GNULIB_POSIXCHECK. -# and thereby enables an optimization of configure and config.h. -# Used by Emacs. -AC_DEFUN([gl_ASSERT_NO_GNULIB_POSIXCHECK], -[ - dnl Override gl_WARN_ON_USE_PREPARE. - dnl But hide this definition from 'aclocal'. - AC_DEFUN([gl_W][ARN_ON_USE_PREPARE], []) -]) - -# gl_ASSERT_NO_GNULIB_TESTS -# asserts that there will be no gnulib tests in the scope of the configure.ac -# and thereby enables an optimization of config.h. -# Used by Emacs. -AC_DEFUN([gl_ASSERT_NO_GNULIB_TESTS], -[ - dnl Override gl_MODULE_INDICATOR_FOR_TESTS. - AC_DEFUN([gl_MODULE_INDICATOR_FOR_TESTS], []) -]) - -# Test whether exists. -# Set HAVE_FEATURES_H. -AC_DEFUN([gl_FEATURES_H], -[ - AC_CHECK_HEADERS_ONCE([features.h]) - if test $ac_cv_header_features_h = yes; then - HAVE_FEATURES_H=1 - else - HAVE_FEATURES_H=0 - fi - AC_SUBST([HAVE_FEATURES_H]) -]) - -# m4_foreach_w -# is a backport of autoconf-2.59c's m4_foreach_w. -# Remove this macro when we can assume autoconf >= 2.60. -m4_ifndef([m4_foreach_w], - [m4_define([m4_foreach_w], - [m4_foreach([$1], m4_split(m4_normalize([$2]), [ ]), [$3])])]) - -# AS_VAR_IF(VAR, VALUE, [IF-MATCH], [IF-NOT-MATCH]) -# ---------------------------------------------------- -# Backport of autoconf-2.63b's macro. -# Remove this macro when we can assume autoconf >= 2.64. -m4_ifndef([AS_VAR_IF], -[m4_define([AS_VAR_IF], -[AS_IF([test x"AS_VAR_GET([$1])" = x""$2], [$3], [$4])])]) - -# gl_PROG_CC_C99 -# Modifies the value of the shell variable CC in an attempt to make $CC -# understand ISO C99 source code. -# This is like AC_PROG_CC_C99, except that -# - AC_PROG_CC_C99 did not exist in Autoconf versions < 2.60, -# - AC_PROG_CC_C99 does not mix well with AC_PROG_CC_STDC -# , -# but many more packages use AC_PROG_CC_STDC than AC_PROG_CC_C99 -# . -# Remaining problems: -# - When AC_PROG_CC_STDC is invoked twice, it adds the C99 enabling options -# to CC twice -# . -# - AC_PROG_CC_STDC is likely to change now that C11 is an ISO standard. -AC_DEFUN([gl_PROG_CC_C99], -[ - dnl Change that version number to the minimum Autoconf version that supports - dnl mixing AC_PROG_CC_C99 calls with AC_PROG_CC_STDC calls. - m4_version_prereq([9.0], - [AC_REQUIRE([AC_PROG_CC_C99])], - [AC_REQUIRE([AC_PROG_CC_STDC])]) -]) - -# gl_PROG_AR_RANLIB -# Determines the values for AR, ARFLAGS, RANLIB that fit with the compiler. -# The user can set the variables AR, ARFLAGS, RANLIB if he wants to override -# the values. -AC_DEFUN([gl_PROG_AR_RANLIB], -[ - dnl Minix 3 comes with two toolchains: The Amsterdam Compiler Kit compiler - dnl as "cc", and GCC as "gcc". They have different object file formats and - dnl library formats. In particular, the GNU binutils programs ar and ranlib - dnl produce libraries that work only with gcc, not with cc. - AC_REQUIRE([AC_PROG_CC]) - AC_BEFORE([$0], [AM_PROG_AR]) - AC_CACHE_CHECK([for Minix Amsterdam compiler], [gl_cv_c_amsterdam_compiler], - [ - AC_EGREP_CPP([Amsterdam], - [ -#ifdef __ACK__ -Amsterdam -#endif - ], - [gl_cv_c_amsterdam_compiler=yes], - [gl_cv_c_amsterdam_compiler=no]) - ]) - - dnl Don't compete with AM_PROG_AR's decision about AR/ARFLAGS if we are not - dnl building with __ACK__. - if test $gl_cv_c_amsterdam_compiler = yes; then - if test -z "$AR"; then - AR='cc -c.a' - fi - if test -z "$ARFLAGS"; then - ARFLAGS='-o' - fi - else - dnl AM_PROG_AR was added in automake v1.11.2. AM_PROG_AR does not AC_SUBST - dnl ARFLAGS variable (it is filed into Makefile.in directly by automake - dnl script on-demand, if not specified by ./configure of course). - dnl Don't AC_REQUIRE the AM_PROG_AR otherwise the code for __ACK__ above - dnl will be ignored. Also, pay attention to call AM_PROG_AR in else block - dnl because AM_PROG_AR is written so it could re-set AR variable even for - dnl __ACK__. It may seem like its easier to avoid calling the macro here, - dnl but we need to AC_SUBST both AR/ARFLAGS (thus those must have some good - dnl default value and automake should usually know them). - m4_ifdef([AM_PROG_AR], [AM_PROG_AR], [:]) - fi - - dnl In case the code above has not helped with setting AR/ARFLAGS, use - dnl Automake-documented default values for AR and ARFLAGS, but prefer - dnl ${host}-ar over ar (useful for cross-compiling). - AC_CHECK_TOOL([AR], [ar], [ar]) - if test -z "$ARFLAGS"; then - ARFLAGS='cr' - fi - - AC_SUBST([AR]) - AC_SUBST([ARFLAGS]) - if test -z "$RANLIB"; then - if test $gl_cv_c_amsterdam_compiler = yes; then - RANLIB=':' - else - dnl Use the ranlib program if it is available. - AC_PROG_RANLIB - fi - fi - AC_SUBST([RANLIB]) -]) - -# AC_PROG_MKDIR_P -# is a backport of autoconf-2.60's AC_PROG_MKDIR_P, with a fix -# for interoperability with automake-1.9.6 from autoconf-2.62. -# Remove this macro when we can assume autoconf >= 2.62 or -# autoconf >= 2.60 && automake >= 1.10. -# AC_AUTOCONF_VERSION was introduced in 2.62, so use that as the witness. -m4_ifndef([AC_AUTOCONF_VERSION],[ -m4_ifdef([AC_PROG_MKDIR_P], [ - dnl For automake-1.9.6 && autoconf < 2.62: Ensure MKDIR_P is AC_SUBSTed. - m4_define([AC_PROG_MKDIR_P], - m4_defn([AC_PROG_MKDIR_P])[ - AC_SUBST([MKDIR_P])])], [ - dnl For autoconf < 2.60: Backport of AC_PROG_MKDIR_P. - AC_DEFUN_ONCE([AC_PROG_MKDIR_P], - [AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake - MKDIR_P='$(mkdir_p)' - AC_SUBST([MKDIR_P])])]) -]) - -# AC_C_RESTRICT -# This definition is copied from post-2.69 Autoconf and overrides the -# AC_C_RESTRICT macro from autoconf 2.60..2.69. It can be removed -# once autoconf >= 2.70 can be assumed. It's painful to check version -# numbers, and in practice this macro is more up-to-date than Autoconf -# is, so override Autoconf unconditionally. -AC_DEFUN([AC_C_RESTRICT], -[AC_CACHE_CHECK([for C/C++ restrict keyword], [ac_cv_c_restrict], - [ac_cv_c_restrict=no - # The order here caters to the fact that C++ does not require restrict. - for ac_kw in __restrict __restrict__ _Restrict restrict; do - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[typedef int *int_ptr; - int foo (int_ptr $ac_kw ip) { return ip[0]; } - int bar (int [$ac_kw]); /* Catch GCC bug 14050. */ - int bar (int ip[$ac_kw]) { return ip[0]; } - ]], - [[int s[1]; - int *$ac_kw t = s; - t[0] = 0; - return foo (t) + bar (t); - ]])], - [ac_cv_c_restrict=$ac_kw]) - test "$ac_cv_c_restrict" != no && break - done - ]) - AH_VERBATIM([restrict], -[/* Define to the equivalent of the C99 'restrict' keyword, or to - nothing if this is not supported. Do not define if restrict is - supported directly. */ -#undef restrict -/* Work around a bug in Sun C++: it does not support _Restrict or - __restrict__, even though the corresponding Sun C compiler ends up with - "#define restrict _Restrict" or "#define restrict __restrict__" in the - previous line. Perhaps some future version of Sun C++ will work with - restrict; if so, hopefully it defines __RESTRICT like Sun C does. */ -#if defined __SUNPRO_CC && !defined __RESTRICT -# define _Restrict -# define __restrict__ -#endif]) - case $ac_cv_c_restrict in - restrict) ;; - no) AC_DEFINE([restrict], []) ;; - *) AC_DEFINE_UNQUOTED([restrict], [$ac_cv_c_restrict]) ;; - esac -])# AC_C_RESTRICT - -# gl_BIGENDIAN -# is like AC_C_BIGENDIAN, except that it can be AC_REQUIREd. -# Note that AC_REQUIRE([AC_C_BIGENDIAN]) does not work reliably because some -# macros invoke AC_C_BIGENDIAN with arguments. -AC_DEFUN([gl_BIGENDIAN], -[ - AC_C_BIGENDIAN -]) - -# gl_CACHE_VAL_SILENT(cache-id, command-to-set-it) -# is like AC_CACHE_VAL(cache-id, command-to-set-it), except that it does not -# output a spurious "(cached)" mark in the midst of other configure output. -# This macro should be used instead of AC_CACHE_VAL when it is not surrounded -# by an AC_MSG_CHECKING/AC_MSG_RESULT pair. -AC_DEFUN([gl_CACHE_VAL_SILENT], -[ - saved_as_echo_n="$as_echo_n" - as_echo_n=':' - AC_CACHE_VAL([$1], [$2]) - as_echo_n="$saved_as_echo_n" -]) - -# AS_VAR_COPY was added in autoconf 2.63b -m4_define_default([AS_VAR_COPY], -[AS_LITERAL_IF([$1[]$2], [$1=$$2], [eval $1=\$$2])]) - -# AC_PROG_SED was added in autoconf 2.59b -m4_ifndef([AC_PROG_SED], -[AC_DEFUN([AC_PROG_SED], -[AC_CACHE_CHECK([for a sed that does not truncate output], ac_cv_path_SED, - [dnl ac_script should not contain more than 99 commands (for HP-UX sed), - dnl but more than about 7000 bytes, to catch a limit in Solaris 8 /usr/ucb/sed. - ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ - for ac_i in 1 2 3 4 5 6 7; do - ac_script="$ac_script$as_nl$ac_script" - done - echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed - AS_UNSET([ac_script]) - if test -z "$SED"; then - ac_path_SED_found=false - _AS_PATH_WALK([], [ - 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_EXECUTABLE_P(["$ac_path_SED"]) || continue - case `"$ac_path_SED" --version 2>&1` in - *GNU*) ac_cv_path_SED=$ac_path_SED ac_path_SED_found=:;; - *) - ac_count=0 - _AS_ECHO_N([0123456789]) >conftest.in - while : - do - cat conftest.in conftest.in >conftest.tmp - mv conftest.tmp conftest.in - cp conftest.in conftest.nl - echo >> conftest.nl - "$ac_path_SED" -f conftest.sed conftest.out 2>/dev/null || break - diff conftest.out conftest.nl >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` - if test $ac_count -gt ${ac_path_SED_max-0}; then - # Best so far, but keep looking for better - ac_cv_path_SED=$ac_path_SED - ac_path_SED_max=$ac_count - fi - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; - esac - $ac_path_SED_found && break 3 - done - done]) - if test -z "$ac_cv_path_SED"; then - AC_ERROR([no acceptable sed could be found in \$PATH]) - fi - else - ac_cv_path_SED=$SED - fi - SED="$ac_cv_path_SED" - AC_SUBST([SED])dnl - rm -f conftest.sed -])])]) diff --git a/lib/glm4/gnulib-comp.m4 b/lib/glm4/gnulib-comp.m4 deleted file mode 100644 index 38f4c34..0000000 --- a/lib/glm4/gnulib-comp.m4 +++ /dev/null @@ -1,272 +0,0 @@ -# DO NOT EDIT! GENERATED AUTOMATICALLY! -# Copyright (C) 2002-2017 Free Software Foundation, Inc. -# -# This file is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or -# (at your option) any later version. -# -# This file is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this file. If not, see . -# -# As a special exception to the GNU General Public License, -# this file may be distributed as part of a program that -# contains a configuration script generated by Autoconf, under -# the same distribution terms as the rest of that program. -# -# Generated by gnulib-tool. -# -# This file represents the compiled summary of the specification in -# gnulib-cache.m4. It lists the computed macro invocations that need -# to be invoked from configure.ac. -# In projects that use version control, this file can be treated like -# other built files. - - -# This macro should be invoked from ./configure.ac, in the section -# "Checks for programs", right after AC_PROG_CC, and certainly before -# any checks for libraries, header files, types and library functions. -AC_DEFUN([lgl_EARLY], -[ - m4_pattern_forbid([^gl_[A-Z]])dnl the gnulib macro namespace - m4_pattern_allow([^gl_ES$])dnl a valid locale name - m4_pattern_allow([^gl_LIBOBJS$])dnl a variable - m4_pattern_allow([^gl_LTLIBOBJS$])dnl a variable - - # Pre-early section. - AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) - AC_REQUIRE([gl_PROG_AR_RANLIB]) - - # Code from module absolute-header: - # Code from module extensions: - # Code from module extern-inline: - # Code from module hash-pjw-bare: - # Code from module include_next: - # Code from module intprops: - # Code from module lib-symbol-versions: - # Code from module lib-symbol-visibility: - # Code from module limits-h: - # Code from module minmax: - # Code from module multiarch: - # Code from module snippet/arg-nonnull: - # Code from module snippet/c++defs: - # Code from module snippet/warn-on-use: - # Code from module ssize_t: - # Code from module stddef: - # Code from module stdint: - # Code from module string: - # Code from module strverscmp: - # Code from module sys_types: - # Code from module verify: -]) - -# This macro should be invoked from ./configure.ac, in the section -# "Check for header files, types and library functions". -AC_DEFUN([lgl_INIT], -[ - AM_CONDITIONAL([GL_COND_LIBTOOL], [true]) - gl_cond_libtool=true - gl_m4_base='lib/glm4' - m4_pushdef([AC_LIBOBJ], m4_defn([lgl_LIBOBJ])) - m4_pushdef([AC_REPLACE_FUNCS], m4_defn([lgl_REPLACE_FUNCS])) - m4_pushdef([AC_LIBSOURCES], m4_defn([lgl_LIBSOURCES])) - m4_pushdef([lgl_LIBSOURCES_LIST], []) - m4_pushdef([lgl_LIBSOURCES_DIR], []) - gl_COMMON - gl_source_base='lib/gllib' - AC_REQUIRE([gl_EXTERN_INLINE]) - gl_LD_VERSION_SCRIPT - gl_VISIBILITY - gl_LIMITS_H - gl_MINMAX - gl_MULTIARCH - gt_TYPE_SSIZE_T - gl_STDDEF_H - gl_STDINT_H - gl_HEADER_STRING_H - gl_FUNC_STRVERSCMP - if test $HAVE_STRVERSCMP = 0; then - AC_LIBOBJ([strverscmp]) - gl_PREREQ_STRVERSCMP - fi - gl_STRING_MODULE_INDICATOR([strverscmp]) - gl_SYS_TYPES_H - AC_PROG_MKDIR_P - # End of code from modules - m4_ifval(lgl_LIBSOURCES_LIST, [ - m4_syscmd([test ! -d ]m4_defn([lgl_LIBSOURCES_DIR])[ || - for gl_file in ]lgl_LIBSOURCES_LIST[ ; do - if test ! -r ]m4_defn([lgl_LIBSOURCES_DIR])[/$gl_file ; then - echo "missing file ]m4_defn([lgl_LIBSOURCES_DIR])[/$gl_file" >&2 - exit 1 - fi - done])dnl - m4_if(m4_sysval, [0], [], - [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])]) - ]) - m4_popdef([lgl_LIBSOURCES_DIR]) - m4_popdef([lgl_LIBSOURCES_LIST]) - m4_popdef([AC_LIBSOURCES]) - m4_popdef([AC_REPLACE_FUNCS]) - m4_popdef([AC_LIBOBJ]) - AC_CONFIG_COMMANDS_PRE([ - lgl_libobjs= - lgl_ltlibobjs= - if test -n "$lgl_LIBOBJS"; then - # Remove the extension. - sed_drop_objext='s/\.o$//;s/\.obj$//' - for i in `for i in $lgl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do - lgl_libobjs="$lgl_libobjs $i.$ac_objext" - lgl_ltlibobjs="$lgl_ltlibobjs $i.lo" - done - fi - AC_SUBST([lgl_LIBOBJS], [$lgl_libobjs]) - AC_SUBST([lgl_LTLIBOBJS], [$lgl_ltlibobjs]) - ]) - gltests_libdeps= - gltests_ltlibdeps= - m4_pushdef([AC_LIBOBJ], m4_defn([lgltests_LIBOBJ])) - m4_pushdef([AC_REPLACE_FUNCS], m4_defn([lgltests_REPLACE_FUNCS])) - m4_pushdef([AC_LIBSOURCES], m4_defn([lgltests_LIBSOURCES])) - m4_pushdef([lgltests_LIBSOURCES_LIST], []) - m4_pushdef([lgltests_LIBSOURCES_DIR], []) - gl_COMMON - gl_source_base='tests' -changequote(,)dnl - lgltests_WITNESS=IN_`echo "${PACKAGE-$PACKAGE_TARNAME}" | LC_ALL=C tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ | LC_ALL=C sed -e 's/[^A-Z0-9_]/_/g'`_GNULIB_TESTS -changequote([, ])dnl - AC_SUBST([lgltests_WITNESS]) - gl_module_indicator_condition=$lgltests_WITNESS - m4_pushdef([gl_MODULE_INDICATOR_CONDITION], [$gl_module_indicator_condition]) - m4_popdef([gl_MODULE_INDICATOR_CONDITION]) - m4_ifval(lgltests_LIBSOURCES_LIST, [ - m4_syscmd([test ! -d ]m4_defn([lgltests_LIBSOURCES_DIR])[ || - for gl_file in ]lgltests_LIBSOURCES_LIST[ ; do - if test ! -r ]m4_defn([lgltests_LIBSOURCES_DIR])[/$gl_file ; then - echo "missing file ]m4_defn([lgltests_LIBSOURCES_DIR])[/$gl_file" >&2 - exit 1 - fi - done])dnl - m4_if(m4_sysval, [0], [], - [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])]) - ]) - m4_popdef([lgltests_LIBSOURCES_DIR]) - m4_popdef([lgltests_LIBSOURCES_LIST]) - m4_popdef([AC_LIBSOURCES]) - m4_popdef([AC_REPLACE_FUNCS]) - m4_popdef([AC_LIBOBJ]) - AC_CONFIG_COMMANDS_PRE([ - lgltests_libobjs= - lgltests_ltlibobjs= - if test -n "$lgltests_LIBOBJS"; then - # Remove the extension. - sed_drop_objext='s/\.o$//;s/\.obj$//' - for i in `for i in $lgltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do - lgltests_libobjs="$lgltests_libobjs $i.$ac_objext" - lgltests_ltlibobjs="$lgltests_ltlibobjs $i.lo" - done - fi - AC_SUBST([lgltests_LIBOBJS], [$lgltests_libobjs]) - AC_SUBST([lgltests_LTLIBOBJS], [$lgltests_ltlibobjs]) - ]) -]) - -# Like AC_LIBOBJ, except that the module name goes -# into lgl_LIBOBJS instead of into LIBOBJS. -AC_DEFUN([lgl_LIBOBJ], [ - AS_LITERAL_IF([$1], [lgl_LIBSOURCES([$1.c])])dnl - lgl_LIBOBJS="$lgl_LIBOBJS $1.$ac_objext" -]) - -# Like AC_REPLACE_FUNCS, except that the module name goes -# into lgl_LIBOBJS instead of into LIBOBJS. -AC_DEFUN([lgl_REPLACE_FUNCS], [ - m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl - AC_CHECK_FUNCS([$1], , [lgl_LIBOBJ($ac_func)]) -]) - -# Like AC_LIBSOURCES, except the directory where the source file is -# expected is derived from the gnulib-tool parameterization, -# and alloca is special cased (for the alloca-opt module). -# We could also entirely rely on EXTRA_lib..._SOURCES. -AC_DEFUN([lgl_LIBSOURCES], [ - m4_foreach([_gl_NAME], [$1], [ - m4_if(_gl_NAME, [alloca.c], [], [ - m4_define([lgl_LIBSOURCES_DIR], [lib/gllib]) - m4_append([lgl_LIBSOURCES_LIST], _gl_NAME, [ ]) - ]) - ]) -]) - -# Like AC_LIBOBJ, except that the module name goes -# into lgltests_LIBOBJS instead of into LIBOBJS. -AC_DEFUN([lgltests_LIBOBJ], [ - AS_LITERAL_IF([$1], [lgltests_LIBSOURCES([$1.c])])dnl - lgltests_LIBOBJS="$lgltests_LIBOBJS $1.$ac_objext" -]) - -# Like AC_REPLACE_FUNCS, except that the module name goes -# into lgltests_LIBOBJS instead of into LIBOBJS. -AC_DEFUN([lgltests_REPLACE_FUNCS], [ - m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl - AC_CHECK_FUNCS([$1], , [lgltests_LIBOBJ($ac_func)]) -]) - -# Like AC_LIBSOURCES, except the directory where the source file is -# expected is derived from the gnulib-tool parameterization, -# and alloca is special cased (for the alloca-opt module). -# We could also entirely rely on EXTRA_lib..._SOURCES. -AC_DEFUN([lgltests_LIBSOURCES], [ - m4_foreach([_gl_NAME], [$1], [ - m4_if(_gl_NAME, [alloca.c], [], [ - m4_define([lgltests_LIBSOURCES_DIR], [tests]) - m4_append([lgltests_LIBSOURCES_LIST], _gl_NAME, [ ]) - ]) - ]) -]) - -# This macro records the list of files which have been installed by -# gnulib-tool and may be removed by future gnulib-tool invocations. -AC_DEFUN([lgl_FILE_LIST], [ - build-aux/snippet/arg-nonnull.h - build-aux/snippet/c++defs.h - build-aux/snippet/warn-on-use.h - lib/hash-pjw-bare.c - lib/hash-pjw-bare.h - lib/intprops.h - lib/limits.in.h - lib/minmax.h - lib/stddef.in.h - lib/stdint.in.h - lib/string.in.h - lib/strverscmp.c - lib/sys_types.in.h - lib/verify.h - m4/00gnulib.m4 - m4/absolute-header.m4 - m4/extensions.m4 - m4/extern-inline.m4 - m4/gnulib-common.m4 - m4/include_next.m4 - m4/ld-version-script.m4 - m4/limits-h.m4 - m4/longlong.m4 - m4/minmax.m4 - m4/multiarch.m4 - m4/off_t.m4 - m4/ssize_t.m4 - m4/stddef_h.m4 - m4/stdint.m4 - m4/string_h.m4 - m4/strverscmp.m4 - m4/sys_types_h.m4 - m4/visibility.m4 - m4/warn-on-use.m4 - m4/wchar_t.m4 - m4/wint_t.m4 -]) diff --git a/lib/glm4/gnulib-tool.m4 b/lib/glm4/gnulib-tool.m4 deleted file mode 100644 index 2e2d8f6..0000000 --- a/lib/glm4/gnulib-tool.m4 +++ /dev/null @@ -1,57 +0,0 @@ -# gnulib-tool.m4 serial 2 -dnl Copyright (C) 2004-2005, 2009-2017 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl The following macros need not be invoked explicitly. -dnl Invoking them does nothing except to declare default arguments -dnl for "gnulib-tool --import". - -dnl Usage: gl_LOCAL_DIR([DIR]) -AC_DEFUN([gl_LOCAL_DIR], []) - -dnl Usage: gl_MODULES([module1 module2 ...]) -AC_DEFUN([gl_MODULES], []) - -dnl Usage: gl_AVOID([module1 module2 ...]) -AC_DEFUN([gl_AVOID], []) - -dnl Usage: gl_SOURCE_BASE([DIR]) -AC_DEFUN([gl_SOURCE_BASE], []) - -dnl Usage: gl_M4_BASE([DIR]) -AC_DEFUN([gl_M4_BASE], []) - -dnl Usage: gl_PO_BASE([DIR]) -AC_DEFUN([gl_PO_BASE], []) - -dnl Usage: gl_DOC_BASE([DIR]) -AC_DEFUN([gl_DOC_BASE], []) - -dnl Usage: gl_TESTS_BASE([DIR]) -AC_DEFUN([gl_TESTS_BASE], []) - -dnl Usage: gl_WITH_TESTS -AC_DEFUN([gl_WITH_TESTS], []) - -dnl Usage: gl_LIB([LIBNAME]) -AC_DEFUN([gl_LIB], []) - -dnl Usage: gl_LGPL or gl_LGPL([VERSION]) -AC_DEFUN([gl_LGPL], []) - -dnl Usage: gl_MAKEFILE_NAME([FILENAME]) -AC_DEFUN([gl_MAKEFILE_NAME], []) - -dnl Usage: gl_LIBTOOL -AC_DEFUN([gl_LIBTOOL], []) - -dnl Usage: gl_MACRO_PREFIX([PREFIX]) -AC_DEFUN([gl_MACRO_PREFIX], []) - -dnl Usage: gl_PO_DOMAIN([DOMAIN]) -AC_DEFUN([gl_PO_DOMAIN], []) - -dnl Usage: gl_VC_FILES([BOOLEAN]) -AC_DEFUN([gl_VC_FILES], []) diff --git a/lib/glm4/include_next.m4 b/lib/glm4/include_next.m4 deleted file mode 100644 index e687e23..0000000 --- a/lib/glm4/include_next.m4 +++ /dev/null @@ -1,223 +0,0 @@ -# include_next.m4 serial 23 -dnl Copyright (C) 2006-2017 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Paul Eggert and Derek Price. - -dnl Sets INCLUDE_NEXT and PRAGMA_SYSTEM_HEADER. -dnl -dnl INCLUDE_NEXT expands to 'include_next' if the compiler supports it, or to -dnl 'include' otherwise. -dnl -dnl INCLUDE_NEXT_AS_FIRST_DIRECTIVE expands to 'include_next' if the compiler -dnl supports it in the special case that it is the first include directive in -dnl the given file, or to 'include' otherwise. -dnl -dnl PRAGMA_SYSTEM_HEADER can be used in files that contain #include_next, -dnl so as to avoid GCC warnings when the gcc option -pedantic is used. -dnl '#pragma GCC system_header' has the same effect as if the file was found -dnl through the include search path specified with '-isystem' options (as -dnl opposed to the search path specified with '-I' options). Namely, gcc -dnl does not warn about some things, and on some systems (Solaris and Interix) -dnl __STDC__ evaluates to 0 instead of to 1. The latter is an undesired side -dnl effect; we are therefore careful to use 'defined __STDC__' or '1' instead -dnl of plain '__STDC__'. -dnl -dnl PRAGMA_COLUMNS can be used in files that override system header files, so -dnl as to avoid compilation errors on HP NonStop systems when the gnulib file -dnl is included by a system header file that does a "#pragma COLUMNS 80" (which -dnl has the effect of truncating the lines of that file and all files that it -dnl includes to 80 columns) and the gnulib file has lines longer than 80 -dnl columns. - -AC_DEFUN([gl_INCLUDE_NEXT], -[ - AC_LANG_PREPROC_REQUIRE() - AC_CACHE_CHECK([whether the preprocessor supports include_next], - [gl_cv_have_include_next], - [rm -rf conftestd1a conftestd1b conftestd2 - mkdir conftestd1a conftestd1b conftestd2 - dnl IBM C 9.0, 10.1 (original versions, prior to the 2009-01 updates) on - dnl AIX 6.1 support include_next when used as first preprocessor directive - dnl in a file, but not when preceded by another include directive. Check - dnl for this bug by including . - dnl Additionally, with this same compiler, include_next is a no-op when - dnl used in a header file that was included by specifying its absolute - dnl file name. Despite these two bugs, include_next is used in the - dnl compiler's . By virtue of the second bug, we need to use - dnl include_next as well in this case. - cat < conftestd1a/conftest.h -#define DEFINED_IN_CONFTESTD1 -#include_next -#ifdef DEFINED_IN_CONFTESTD2 -int foo; -#else -#error "include_next doesn't work" -#endif -EOF - cat < conftestd1b/conftest.h -#define DEFINED_IN_CONFTESTD1 -#include -#include_next -#ifdef DEFINED_IN_CONFTESTD2 -int foo; -#else -#error "include_next doesn't work" -#endif -EOF - cat < conftestd2/conftest.h -#ifndef DEFINED_IN_CONFTESTD1 -#error "include_next test doesn't work" -#endif -#define DEFINED_IN_CONFTESTD2 -EOF - gl_save_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2" -dnl We intentionally avoid using AC_LANG_SOURCE here. - AC_COMPILE_IFELSE([AC_LANG_DEFINES_PROVIDED[#include ]], - [gl_cv_have_include_next=yes], - [CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2" - AC_COMPILE_IFELSE([AC_LANG_DEFINES_PROVIDED[#include ]], - [gl_cv_have_include_next=buggy], - [gl_cv_have_include_next=no]) - ]) - CPPFLAGS="$gl_save_CPPFLAGS" - rm -rf conftestd1a conftestd1b conftestd2 - ]) - PRAGMA_SYSTEM_HEADER= - if test $gl_cv_have_include_next = yes; then - INCLUDE_NEXT=include_next - INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next - if test -n "$GCC"; then - PRAGMA_SYSTEM_HEADER='#pragma GCC system_header' - fi - else - if test $gl_cv_have_include_next = buggy; then - INCLUDE_NEXT=include - INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next - else - INCLUDE_NEXT=include - INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include - fi - fi - AC_SUBST([INCLUDE_NEXT]) - AC_SUBST([INCLUDE_NEXT_AS_FIRST_DIRECTIVE]) - AC_SUBST([PRAGMA_SYSTEM_HEADER]) - AC_CACHE_CHECK([whether system header files limit the line length], - [gl_cv_pragma_columns], - [dnl HP NonStop systems, which define __TANDEM, have this misfeature. - AC_EGREP_CPP([choke me], - [ -#ifdef __TANDEM -choke me -#endif - ], - [gl_cv_pragma_columns=yes], - [gl_cv_pragma_columns=no]) - ]) - if test $gl_cv_pragma_columns = yes; then - PRAGMA_COLUMNS="#pragma COLUMNS 10000" - else - PRAGMA_COLUMNS= - fi - AC_SUBST([PRAGMA_COLUMNS]) -]) - -# gl_CHECK_NEXT_HEADERS(HEADER1 HEADER2 ...) -# ------------------------------------------ -# For each arg foo.h, if #include_next works, define NEXT_FOO_H to be -# ''; otherwise define it to be -# '"///usr/include/foo.h"', or whatever other absolute file name is suitable. -# Also, if #include_next works as first preprocessing directive in a file, -# define NEXT_AS_FIRST_DIRECTIVE_FOO_H to be ''; otherwise define it to -# be -# '"///usr/include/foo.h"', or whatever other absolute file name is suitable. -# That way, a header file with the following line: -# #@INCLUDE_NEXT@ @NEXT_FOO_H@ -# or -# #@INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ @NEXT_AS_FIRST_DIRECTIVE_FOO_H@ -# behaves (after sed substitution) as if it contained -# #include_next -# even if the compiler does not support include_next. -# The three "///" are to pacify Sun C 5.8, which otherwise would say -# "warning: #include of /usr/include/... may be non-portable". -# Use '""', not '<>', so that the /// cannot be confused with a C99 comment. -# Note: This macro assumes that the header file is not empty after -# preprocessing, i.e. it does not only define preprocessor macros but also -# provides some type/enum definitions or function/variable declarations. -# -# This macro also checks whether each header exists, by invoking -# AC_CHECK_HEADERS_ONCE or AC_CHECK_HEADERS on each argument. -AC_DEFUN([gl_CHECK_NEXT_HEADERS], -[ - gl_NEXT_HEADERS_INTERNAL([$1], [check]) -]) - -# gl_NEXT_HEADERS(HEADER1 HEADER2 ...) -# ------------------------------------ -# Like gl_CHECK_NEXT_HEADERS, except do not check whether the headers exist. -# This is suitable for headers like that are standardized by C89 -# and therefore can be assumed to exist. -AC_DEFUN([gl_NEXT_HEADERS], -[ - gl_NEXT_HEADERS_INTERNAL([$1], [assume]) -]) - -# The guts of gl_CHECK_NEXT_HEADERS and gl_NEXT_HEADERS. -AC_DEFUN([gl_NEXT_HEADERS_INTERNAL], -[ - AC_REQUIRE([gl_INCLUDE_NEXT]) - AC_REQUIRE([AC_CANONICAL_HOST]) - - m4_if([$2], [check], - [AC_CHECK_HEADERS_ONCE([$1]) - ]) - -dnl FIXME: gl_next_header and gl_header_exists must be used unquoted -dnl until we can assume autoconf 2.64 or newer. - m4_foreach_w([gl_HEADER_NAME], [$1], - [AS_VAR_PUSHDEF([gl_next_header], - [gl_cv_next_]m4_defn([gl_HEADER_NAME])) - if test $gl_cv_have_include_next = yes; then - AS_VAR_SET(gl_next_header, ['<'gl_HEADER_NAME'>']) - else - AC_CACHE_CHECK( - [absolute name of <]m4_defn([gl_HEADER_NAME])[>], - m4_defn([gl_next_header]), - [m4_if([$2], [check], - [AS_VAR_PUSHDEF([gl_header_exists], - [ac_cv_header_]m4_defn([gl_HEADER_NAME])) - if test AS_VAR_GET(gl_header_exists) = yes; then - AS_VAR_POPDEF([gl_header_exists]) - ]) - gl_ABSOLUTE_HEADER_ONE(gl_HEADER_NAME) - AS_VAR_COPY([gl_header], [gl_cv_absolute_]AS_TR_SH(gl_HEADER_NAME)) - AS_VAR_SET(gl_next_header, ['"'$gl_header'"']) - m4_if([$2], [check], - [else - AS_VAR_SET(gl_next_header, ['<'gl_HEADER_NAME'>']) - fi - ]) - ]) - fi - AC_SUBST( - AS_TR_CPP([NEXT_]m4_defn([gl_HEADER_NAME])), - [AS_VAR_GET(gl_next_header)]) - if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' - gl_next_as_first_directive='<'gl_HEADER_NAME'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=AS_VAR_GET(gl_next_header) - fi - AC_SUBST( - AS_TR_CPP([NEXT_AS_FIRST_DIRECTIVE_]m4_defn([gl_HEADER_NAME])), - [$gl_next_as_first_directive]) - AS_VAR_POPDEF([gl_next_header])]) -]) - -# Autoconf 2.68 added warnings for our use of AC_COMPILE_IFELSE; -# this fallback is safe for all earlier autoconf versions. -m4_define_default([AC_LANG_DEFINES_PROVIDED]) diff --git a/lib/glm4/ld-version-script.m4 b/lib/glm4/ld-version-script.m4 deleted file mode 100644 index caccec1..0000000 --- a/lib/glm4/ld-version-script.m4 +++ /dev/null @@ -1,48 +0,0 @@ -# ld-version-script.m4 serial 4 -dnl Copyright (C) 2008-2017 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Simon Josefsson - -# FIXME: The test below returns a false positive for mingw -# cross-compiles, 'local:' statements does not reduce number of -# exported symbols in a DLL. Use --disable-ld-version-script to work -# around the problem. - -# gl_LD_VERSION_SCRIPT -# -------------------- -# Check if LD supports linker scripts, and define automake conditional -# HAVE_LD_VERSION_SCRIPT if so. -AC_DEFUN([gl_LD_VERSION_SCRIPT], -[ - AC_ARG_ENABLE([ld-version-script], - [AS_HELP_STRING([--enable-ld-version-script], - [enable linker version script (default is enabled when possible)])], - [have_ld_version_script=$enableval], - [AC_CACHE_CHECK([if LD -Wl,--version-script works], - [gl_cv_sys_ld_version_script], - [gl_cv_sys_ld_version_script=no - save_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS -Wl,--version-script=conftest.map" - echo foo >conftest.map - AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], - [], - [cat > conftest.map < - int ullw = ULLONG_WIDTH;]])], - [gl_cv_header_limits_width=yes], - [gl_cv_header_limits_width=no])]) - if test "$gl_cv_header_limits_width" = yes; then - LIMITS_H= - else - LIMITS_H=limits.h - fi - AC_SUBST([LIMITS_H]) - AM_CONDITIONAL([GL_GENERATE_LIMITS_H], [test -n "$LIMITS_H"]) -]) diff --git a/lib/glm4/longlong.m4 b/lib/glm4/longlong.m4 deleted file mode 100644 index 9a3294b..0000000 --- a/lib/glm4/longlong.m4 +++ /dev/null @@ -1,113 +0,0 @@ -# longlong.m4 serial 17 -dnl Copyright (C) 1999-2007, 2009-2017 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Paul Eggert. - -# Define HAVE_LONG_LONG_INT if 'long long int' works. -# This fixes a bug in Autoconf 2.61, and can be faster -# than what's in Autoconf 2.62 through 2.68. - -# Note: If the type 'long long int' exists but is only 32 bits large -# (as on some very old compilers), HAVE_LONG_LONG_INT will not be -# defined. In this case you can treat 'long long int' like 'long int'. - -AC_DEFUN([AC_TYPE_LONG_LONG_INT], -[ - AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT]) - AC_CACHE_CHECK([for long long int], [ac_cv_type_long_long_int], - [ac_cv_type_long_long_int=yes - if test "x${ac_cv_prog_cc_c99-no}" = xno; then - ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int - if test $ac_cv_type_long_long_int = yes; then - dnl Catch a bug in Tandem NonStop Kernel (OSS) cc -O circa 2004. - dnl If cross compiling, assume the bug is not important, since - dnl nobody cross compiles for this platform as far as we know. - AC_RUN_IFELSE( - [AC_LANG_PROGRAM( - [[@%:@include - @%:@ifndef LLONG_MAX - @%:@ define HALF \ - (1LL << (sizeof (long long int) * CHAR_BIT - 2)) - @%:@ define LLONG_MAX (HALF - 1 + HALF) - @%:@endif]], - [[long long int n = 1; - int i; - for (i = 0; ; i++) - { - long long int m = n << i; - if (m >> i != n) - return 1; - if (LLONG_MAX / 2 < m) - break; - } - return 0;]])], - [], - [ac_cv_type_long_long_int=no], - [:]) - fi - fi]) - if test $ac_cv_type_long_long_int = yes; then - AC_DEFINE([HAVE_LONG_LONG_INT], [1], - [Define to 1 if the system has the type 'long long int'.]) - fi -]) - -# Define HAVE_UNSIGNED_LONG_LONG_INT if 'unsigned long long int' works. -# This fixes a bug in Autoconf 2.61, and can be faster -# than what's in Autoconf 2.62 through 2.68. - -# Note: If the type 'unsigned long long int' exists but is only 32 bits -# large (as on some very old compilers), AC_TYPE_UNSIGNED_LONG_LONG_INT -# will not be defined. In this case you can treat 'unsigned long long int' -# like 'unsigned long int'. - -AC_DEFUN([AC_TYPE_UNSIGNED_LONG_LONG_INT], -[ - AC_CACHE_CHECK([for unsigned long long int], - [ac_cv_type_unsigned_long_long_int], - [ac_cv_type_unsigned_long_long_int=yes - if test "x${ac_cv_prog_cc_c99-no}" = xno; then - AC_LINK_IFELSE( - [_AC_TYPE_LONG_LONG_SNIPPET], - [], - [ac_cv_type_unsigned_long_long_int=no]) - fi]) - if test $ac_cv_type_unsigned_long_long_int = yes; then - AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], [1], - [Define to 1 if the system has the type 'unsigned long long int'.]) - fi -]) - -# Expands to a C program that can be used to test for simultaneous support -# of 'long long' and 'unsigned long long'. We don't want to say that -# 'long long' is available if 'unsigned long long' is not, or vice versa, -# because too many programs rely on the symmetry between signed and unsigned -# integer types (excluding 'bool'). -AC_DEFUN([_AC_TYPE_LONG_LONG_SNIPPET], -[ - AC_LANG_PROGRAM( - [[/* For now, do not test the preprocessor; as of 2007 there are too many - implementations with broken preprocessors. Perhaps this can - be revisited in 2012. In the meantime, code should not expect - #if to work with literals wider than 32 bits. */ - /* Test literals. */ - long long int ll = 9223372036854775807ll; - long long int nll = -9223372036854775807LL; - unsigned long long int ull = 18446744073709551615ULL; - /* Test constant expressions. */ - typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) - ? 1 : -1)]; - typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 - ? 1 : -1)]; - int i = 63;]], - [[/* Test availability of runtime routines for shift and division. */ - long long int llmax = 9223372036854775807ll; - unsigned long long int ullmax = 18446744073709551615ull; - return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) - | (llmax / ll) | (llmax % ll) - | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) - | (ullmax / ull) | (ullmax % ull));]]) -]) diff --git a/lib/glm4/minmax.m4 b/lib/glm4/minmax.m4 deleted file mode 100644 index 6845fce..0000000 --- a/lib/glm4/minmax.m4 +++ /dev/null @@ -1,44 +0,0 @@ -# minmax.m4 serial 4 -dnl Copyright (C) 2005, 2009-2017 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_PREREQ([2.53]) - -AC_DEFUN([gl_MINMAX], -[ - AC_REQUIRE([gl_PREREQ_MINMAX]) -]) - -# Prerequisites of lib/minmax.h. -AC_DEFUN([gl_PREREQ_MINMAX], -[ - gl_MINMAX_IN_HEADER([limits.h]) - gl_MINMAX_IN_HEADER([sys/param.h]) -]) - -dnl gl_MINMAX_IN_HEADER(HEADER) -dnl The parameter has to be a literal header name; it cannot be macro, -dnl nor a shell variable. (Because autoheader collects only AC_DEFINE -dnl invocations with a literal macro name.) -AC_DEFUN([gl_MINMAX_IN_HEADER], -[ - m4_pushdef([header], AS_TR_SH([$1])) - m4_pushdef([HEADER], AS_TR_CPP([$1])) - AC_CACHE_CHECK([whether <$1> defines MIN and MAX], - [gl_cv_minmax_in_]header, - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[#include <$1> - int x = MIN (42, 17);]], - [[]])], - [gl_cv_minmax_in_]header[=yes], - [gl_cv_minmax_in_]header[=no])]) - if test $gl_cv_minmax_in_[]header = yes; then - AC_DEFINE([HAVE_MINMAX_IN_]HEADER, 1, - [Define to 1 if <$1> defines the MIN and MAX macros.]) - fi - m4_popdef([HEADER]) - m4_popdef([header]) -]) diff --git a/lib/glm4/multiarch.m4 b/lib/glm4/multiarch.m4 deleted file mode 100644 index 30006cb..0000000 --- a/lib/glm4/multiarch.m4 +++ /dev/null @@ -1,62 +0,0 @@ -# multiarch.m4 serial 7 -dnl Copyright (C) 2008-2017 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -# Determine whether the compiler is or may be producing universal binaries. -# -# On Mac OS X 10.5 and later systems, the user can create libraries and -# executables that work on multiple system types--known as "fat" or -# "universal" binaries--by specifying multiple '-arch' options to the -# compiler but only a single '-arch' option to the preprocessor. Like -# this: -# -# ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ -# CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ -# CPP="gcc -E" CXXCPP="g++ -E" -# -# Detect this situation and set APPLE_UNIVERSAL_BUILD accordingly. - -AC_DEFUN_ONCE([gl_MULTIARCH], -[ - dnl Code similar to autoconf-2.63 AC_C_BIGENDIAN. - gl_cv_c_multiarch=no - AC_COMPILE_IFELSE( - [AC_LANG_SOURCE( - [[#ifndef __APPLE_CC__ - not a universal capable compiler - #endif - typedef int dummy; - ]])], - [ - dnl Check for potential -arch flags. It is not universal unless - dnl there are at least two -arch flags with different values. - arch= - prev= - for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do - if test -n "$prev"; then - case $word in - i?86 | x86_64 | ppc | ppc64) - if test -z "$arch" || test "$arch" = "$word"; then - arch="$word" - else - gl_cv_c_multiarch=yes - fi - ;; - esac - prev= - else - if test "x$word" = "x-arch"; then - prev=arch - fi - fi - done - ]) - if test $gl_cv_c_multiarch = yes; then - APPLE_UNIVERSAL_BUILD=1 - else - APPLE_UNIVERSAL_BUILD=0 - fi - AC_SUBST([APPLE_UNIVERSAL_BUILD]) -]) diff --git a/lib/glm4/off_t.m4 b/lib/glm4/off_t.m4 deleted file mode 100644 index 92c45ef..0000000 --- a/lib/glm4/off_t.m4 +++ /dev/null @@ -1,18 +0,0 @@ -# off_t.m4 serial 1 -dnl Copyright (C) 2012-2017 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl Check whether to override the 'off_t' type. -dnl Set WINDOWS_64_BIT_OFF_T. - -AC_DEFUN([gl_TYPE_OFF_T], -[ - m4_ifdef([gl_LARGEFILE], [ - AC_REQUIRE([gl_LARGEFILE]) - ], [ - WINDOWS_64_BIT_OFF_T=0 - ]) - AC_SUBST([WINDOWS_64_BIT_OFF_T]) -]) diff --git a/lib/glm4/ssize_t.m4 b/lib/glm4/ssize_t.m4 deleted file mode 100644 index 66ba9d4..0000000 --- a/lib/glm4/ssize_t.m4 +++ /dev/null @@ -1,23 +0,0 @@ -# ssize_t.m4 serial 5 (gettext-0.18.2) -dnl Copyright (C) 2001-2003, 2006, 2010-2017 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Bruno Haible. -dnl Test whether ssize_t is defined. - -AC_DEFUN([gt_TYPE_SSIZE_T], -[ - AC_CACHE_CHECK([for ssize_t], [gt_cv_ssize_t], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[#include ]], - [[int x = sizeof (ssize_t *) + sizeof (ssize_t); - return !x;]])], - [gt_cv_ssize_t=yes], [gt_cv_ssize_t=no])]) - if test $gt_cv_ssize_t = no; then - AC_DEFINE([ssize_t], [int], - [Define as a signed type of the same size as size_t.]) - fi -]) diff --git a/lib/glm4/stddef_h.m4 b/lib/glm4/stddef_h.m4 deleted file mode 100644 index f45def1..0000000 --- a/lib/glm4/stddef_h.m4 +++ /dev/null @@ -1,51 +0,0 @@ -dnl A placeholder for , for platforms that have issues. -# stddef_h.m4 serial 5 -dnl Copyright (C) 2009-2017 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_STDDEF_H], -[ - AC_REQUIRE([gl_STDDEF_H_DEFAULTS]) - AC_REQUIRE([gt_TYPE_WCHAR_T]) - STDDEF_H= - AC_CHECK_TYPE([max_align_t], [], [HAVE_MAX_ALIGN_T=0; STDDEF_H=stddef.h], - [[#include - ]]) - if test $gt_cv_c_wchar_t = no; then - HAVE_WCHAR_T=0 - STDDEF_H=stddef.h - fi - AC_CACHE_CHECK([whether NULL can be used in arbitrary expressions], - [gl_cv_decl_null_works], - [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include - int test[2 * (sizeof NULL == sizeof (void *)) -1]; -]])], - [gl_cv_decl_null_works=yes], - [gl_cv_decl_null_works=no])]) - if test $gl_cv_decl_null_works = no; then - REPLACE_NULL=1 - STDDEF_H=stddef.h - fi - AC_SUBST([STDDEF_H]) - AM_CONDITIONAL([GL_GENERATE_STDDEF_H], [test -n "$STDDEF_H"]) - if test -n "$STDDEF_H"; then - gl_NEXT_HEADERS([stddef.h]) - fi -]) - -AC_DEFUN([gl_STDDEF_MODULE_INDICATOR], -[ - dnl Use AC_REQUIRE here, so that the default settings are expanded once only. - AC_REQUIRE([gl_STDDEF_H_DEFAULTS]) - gl_MODULE_INDICATOR_SET_VARIABLE([$1]) -]) - -AC_DEFUN([gl_STDDEF_H_DEFAULTS], -[ - dnl Assume proper GNU behavior unless another module says otherwise. - REPLACE_NULL=0; AC_SUBST([REPLACE_NULL]) - HAVE_MAX_ALIGN_T=1; AC_SUBST([HAVE_MAX_ALIGN_T]) - HAVE_WCHAR_T=1; AC_SUBST([HAVE_WCHAR_T]) -]) diff --git a/lib/glm4/stdint.m4 b/lib/glm4/stdint.m4 deleted file mode 100644 index 4ac854d..0000000 --- a/lib/glm4/stdint.m4 +++ /dev/null @@ -1,541 +0,0 @@ -# stdint.m4 serial 50 -dnl Copyright (C) 2001-2017 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Paul Eggert and Bruno Haible. -dnl Test whether is supported or must be substituted. - -AC_DEFUN_ONCE([gl_STDINT_H], -[ - AC_PREREQ([2.59])dnl - - AC_REQUIRE([gl_LIMITS_H]) - AC_REQUIRE([gt_TYPE_WINT_T]) - - dnl Check for long long int and unsigned long long int. - AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) - if test $ac_cv_type_long_long_int = yes; then - HAVE_LONG_LONG_INT=1 - else - HAVE_LONG_LONG_INT=0 - fi - AC_SUBST([HAVE_LONG_LONG_INT]) - AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT]) - if test $ac_cv_type_unsigned_long_long_int = yes; then - HAVE_UNSIGNED_LONG_LONG_INT=1 - else - HAVE_UNSIGNED_LONG_LONG_INT=0 - fi - AC_SUBST([HAVE_UNSIGNED_LONG_LONG_INT]) - - dnl Check for , in the same way as gl_WCHAR_H does. - AC_CHECK_HEADERS_ONCE([wchar.h]) - if test $ac_cv_header_wchar_h = yes; then - HAVE_WCHAR_H=1 - else - HAVE_WCHAR_H=0 - fi - AC_SUBST([HAVE_WCHAR_H]) - - dnl Check for . - dnl AC_INCLUDES_DEFAULT defines $ac_cv_header_inttypes_h. - if test $ac_cv_header_inttypes_h = yes; then - HAVE_INTTYPES_H=1 - else - HAVE_INTTYPES_H=0 - fi - AC_SUBST([HAVE_INTTYPES_H]) - - dnl Check for . - dnl AC_INCLUDES_DEFAULT defines $ac_cv_header_sys_types_h. - if test $ac_cv_header_sys_types_h = yes; then - HAVE_SYS_TYPES_H=1 - else - HAVE_SYS_TYPES_H=0 - fi - AC_SUBST([HAVE_SYS_TYPES_H]) - - gl_CHECK_NEXT_HEADERS([stdint.h]) - if test $ac_cv_header_stdint_h = yes; then - HAVE_STDINT_H=1 - else - HAVE_STDINT_H=0 - fi - AC_SUBST([HAVE_STDINT_H]) - - dnl Now see whether we need a substitute . - if test $ac_cv_header_stdint_h = yes; then - AC_CACHE_CHECK([whether stdint.h conforms to C99], - [gl_cv_header_working_stdint_h], - [gl_cv_header_working_stdint_h=no - AC_COMPILE_IFELSE([ - AC_LANG_PROGRAM([[ -#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ -#define __STDC_CONSTANT_MACROS 1 -#define __STDC_LIMIT_MACROS 1 -#include -/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in . */ -#if !(defined WCHAR_MIN && defined WCHAR_MAX) -#error "WCHAR_MIN, WCHAR_MAX not defined in " -#endif -] -gl_STDINT_INCLUDES -[ -#ifdef INT8_MAX -int8_t a1 = INT8_MAX; -int8_t a1min = INT8_MIN; -#endif -#ifdef INT16_MAX -int16_t a2 = INT16_MAX; -int16_t a2min = INT16_MIN; -#endif -#ifdef INT32_MAX -int32_t a3 = INT32_MAX; -int32_t a3min = INT32_MIN; -#endif -#ifdef INT64_MAX -int64_t a4 = INT64_MAX; -int64_t a4min = INT64_MIN; -#endif -#ifdef UINT8_MAX -uint8_t b1 = UINT8_MAX; -#else -typedef int b1[(unsigned char) -1 != 255 ? 1 : -1]; -#endif -#ifdef UINT16_MAX -uint16_t b2 = UINT16_MAX; -#endif -#ifdef UINT32_MAX -uint32_t b3 = UINT32_MAX; -#endif -#ifdef UINT64_MAX -uint64_t b4 = UINT64_MAX; -#endif -int_least8_t c1 = INT8_C (0x7f); -int_least8_t c1max = INT_LEAST8_MAX; -int_least8_t c1min = INT_LEAST8_MIN; -int_least16_t c2 = INT16_C (0x7fff); -int_least16_t c2max = INT_LEAST16_MAX; -int_least16_t c2min = INT_LEAST16_MIN; -int_least32_t c3 = INT32_C (0x7fffffff); -int_least32_t c3max = INT_LEAST32_MAX; -int_least32_t c3min = INT_LEAST32_MIN; -int_least64_t c4 = INT64_C (0x7fffffffffffffff); -int_least64_t c4max = INT_LEAST64_MAX; -int_least64_t c4min = INT_LEAST64_MIN; -uint_least8_t d1 = UINT8_C (0xff); -uint_least8_t d1max = UINT_LEAST8_MAX; -uint_least16_t d2 = UINT16_C (0xffff); -uint_least16_t d2max = UINT_LEAST16_MAX; -uint_least32_t d3 = UINT32_C (0xffffffff); -uint_least32_t d3max = UINT_LEAST32_MAX; -uint_least64_t d4 = UINT64_C (0xffffffffffffffff); -uint_least64_t d4max = UINT_LEAST64_MAX; -int_fast8_t e1 = INT_FAST8_MAX; -int_fast8_t e1min = INT_FAST8_MIN; -int_fast16_t e2 = INT_FAST16_MAX; -int_fast16_t e2min = INT_FAST16_MIN; -int_fast32_t e3 = INT_FAST32_MAX; -int_fast32_t e3min = INT_FAST32_MIN; -int_fast64_t e4 = INT_FAST64_MAX; -int_fast64_t e4min = INT_FAST64_MIN; -uint_fast8_t f1 = UINT_FAST8_MAX; -uint_fast16_t f2 = UINT_FAST16_MAX; -uint_fast32_t f3 = UINT_FAST32_MAX; -uint_fast64_t f4 = UINT_FAST64_MAX; -#ifdef INTPTR_MAX -intptr_t g = INTPTR_MAX; -intptr_t gmin = INTPTR_MIN; -#endif -#ifdef UINTPTR_MAX -uintptr_t h = UINTPTR_MAX; -#endif -intmax_t i = INTMAX_MAX; -uintmax_t j = UINTMAX_MAX; - -/* Check that SIZE_MAX has the correct type, if possible. */ -#if 201112 <= __STDC_VERSION__ -int k = _Generic (SIZE_MAX, size_t: 0); -#elif (2 <= __GNUC__ || defined __IBM__TYPEOF__ \ - || (0x5110 <= __SUNPRO_C && !__STDC__)) -extern size_t k; -extern __typeof__ (SIZE_MAX) k; -#endif - -#include /* for CHAR_BIT */ -#define TYPE_MINIMUM(t) \ - ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t))) -#define TYPE_MAXIMUM(t) \ - ((t) ((t) 0 < (t) -1 \ - ? (t) -1 \ - : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1))) -struct s { - int check_PTRDIFF: - PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t) - && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t) - ? 1 : -1; - /* Detect bug in FreeBSD 6.0 / ia64. */ - int check_SIG_ATOMIC: - SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t) - && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t) - ? 1 : -1; - int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1; - int check_WCHAR: - WCHAR_MIN == TYPE_MINIMUM (wchar_t) - && WCHAR_MAX == TYPE_MAXIMUM (wchar_t) - ? 1 : -1; - /* Detect bug in mingw. */ - int check_WINT: - WINT_MIN == TYPE_MINIMUM (wint_t) - && WINT_MAX == TYPE_MAXIMUM (wint_t) - ? 1 : -1; - - /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */ - int check_UINT8_C: - (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1; - int check_UINT16_C: - (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1; - - /* Detect bugs in OpenBSD 3.9 stdint.h. */ -#ifdef UINT8_MAX - int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1; -#endif -#ifdef UINT16_MAX - int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1; -#endif -#ifdef UINT32_MAX - int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1; -#endif -#ifdef UINT64_MAX - int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1; -#endif - int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1; - int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1; - int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1; - int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1; - int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1; - int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1; - int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1; - int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1; - int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1; - int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1; - int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1; -}; - ]])], - [dnl Determine whether the various *_MIN, *_MAX macros are usable - dnl in preprocessor expression. We could do it by compiling a test - dnl program for each of these macros. It is faster to run a program - dnl that inspects the macro expansion. - dnl This detects a bug on HP-UX 11.23/ia64. - AC_RUN_IFELSE([ - AC_LANG_PROGRAM([[ -#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ -#define __STDC_CONSTANT_MACROS 1 -#define __STDC_LIMIT_MACROS 1 -#include -] -gl_STDINT_INCLUDES -[ -#include -#include -#define MVAL(macro) MVAL1(macro) -#define MVAL1(expression) #expression -static const char *macro_values[] = - { -#ifdef INT8_MAX - MVAL (INT8_MAX), -#endif -#ifdef INT16_MAX - MVAL (INT16_MAX), -#endif -#ifdef INT32_MAX - MVAL (INT32_MAX), -#endif -#ifdef INT64_MAX - MVAL (INT64_MAX), -#endif -#ifdef UINT8_MAX - MVAL (UINT8_MAX), -#endif -#ifdef UINT16_MAX - MVAL (UINT16_MAX), -#endif -#ifdef UINT32_MAX - MVAL (UINT32_MAX), -#endif -#ifdef UINT64_MAX - MVAL (UINT64_MAX), -#endif - NULL - }; -]], [[ - const char **mv; - for (mv = macro_values; *mv != NULL; mv++) - { - const char *value = *mv; - /* Test whether it looks like a cast expression. */ - if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0 - || strncmp (value, "((unsigned short)"/*)*/, 17) == 0 - || strncmp (value, "((unsigned char)"/*)*/, 16) == 0 - || strncmp (value, "((int)"/*)*/, 6) == 0 - || strncmp (value, "((signed short)"/*)*/, 15) == 0 - || strncmp (value, "((signed char)"/*)*/, 14) == 0) - return mv - macro_values + 1; - } - return 0; -]])], - [gl_cv_header_working_stdint_h=yes], - [], - [dnl When cross-compiling, assume it works. - gl_cv_header_working_stdint_h=yes - ]) - ]) - ]) - fi - - HAVE_C99_STDINT_H=0 - HAVE_SYS_BITYPES_H=0 - HAVE_SYS_INTTYPES_H=0 - STDINT_H=stdint.h - if test "$gl_cv_header_working_stdint_h" = yes; then - HAVE_C99_STDINT_H=1 - dnl Now see whether the system works without - dnl __STDC_CONSTANT_MACROS/__STDC_LIMIT_MACROS defined. - AC_CACHE_CHECK([whether stdint.h predates C++11], - [gl_cv_header_stdint_predates_cxx11_h], - [gl_cv_header_stdint_predates_cxx11_h=yes - AC_COMPILE_IFELSE([ - AC_LANG_PROGRAM([[ -#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ -#include -] -gl_STDINT_INCLUDES -[ -intmax_t im = INTMAX_MAX; -int32_t i32 = INT32_C (0x7fffffff); - ]])], - [gl_cv_header_stdint_predates_cxx11_h=no])]) - - if test "$gl_cv_header_stdint_predates_cxx11_h" = yes; then - AC_DEFINE([__STDC_CONSTANT_MACROS], [1], - [Define to 1 if the system predates C++11.]) - AC_DEFINE([__STDC_LIMIT_MACROS], [1], - [Define to 1 if the system predates C++11.]) - fi - AC_CACHE_CHECK([whether stdint.h has UINTMAX_WIDTH etc.], - [gl_cv_header_stdint_width], - [gl_cv_header_stdint_width=no - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([[ - /* Work if build is not clean. */ - #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 - #ifndef __STDC_WANT_IEC_60559_BFP_EXT__ - #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 - #endif - #include - ]gl_STDINT_INCLUDES[ - int iw = UINTMAX_WIDTH; - ]])], - [gl_cv_header_stdint_width=yes])]) - if test "$gl_cv_header_stdint_width" = yes; then - STDINT_H= - fi - else - dnl Check for , and for - dnl (used in Linux libc4 >= 4.6.7 and libc5). - AC_CHECK_HEADERS([sys/inttypes.h sys/bitypes.h]) - if test $ac_cv_header_sys_inttypes_h = yes; then - HAVE_SYS_INTTYPES_H=1 - fi - if test $ac_cv_header_sys_bitypes_h = yes; then - HAVE_SYS_BITYPES_H=1 - fi - gl_STDINT_TYPE_PROPERTIES - fi - - dnl The substitute stdint.h needs the substitute limit.h's _GL_INTEGER_WIDTH. - LIMITS_H=limits.h - AM_CONDITIONAL([GL_GENERATE_LIMITS_H], [test -n "$LIMITS_H"]) - - AC_SUBST([HAVE_C99_STDINT_H]) - AC_SUBST([HAVE_SYS_BITYPES_H]) - AC_SUBST([HAVE_SYS_INTTYPES_H]) - AC_SUBST([STDINT_H]) - AM_CONDITIONAL([GL_GENERATE_STDINT_H], [test -n "$STDINT_H"]) -]) - -dnl gl_STDINT_BITSIZEOF(TYPES, INCLUDES) -dnl Determine the size of each of the given types in bits. -AC_DEFUN([gl_STDINT_BITSIZEOF], -[ - dnl Use a shell loop, to avoid bloating configure, and - dnl - extra AH_TEMPLATE calls, so that autoheader knows what to put into - dnl config.h.in, - dnl - extra AC_SUBST calls, so that the right substitutions are made. - m4_foreach_w([gltype], [$1], - [AH_TEMPLATE([BITSIZEOF_]m4_translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]), - [Define to the number of bits in type ']gltype['.])]) - for gltype in $1 ; do - AC_CACHE_CHECK([for bit size of $gltype], [gl_cv_bitsizeof_${gltype}], - [AC_COMPUTE_INT([result], [sizeof ($gltype) * CHAR_BIT], - [$2 -#include ], [result=unknown]) - eval gl_cv_bitsizeof_${gltype}=\$result - ]) - eval result=\$gl_cv_bitsizeof_${gltype} - if test $result = unknown; then - dnl Use a nonempty default, because some compilers, such as IRIX 5 cc, - dnl do a syntax check even on unused #if conditions and give an error - dnl on valid C code like this: - dnl #if 0 - dnl # if > 32 - dnl # endif - dnl #endif - result=0 - fi - GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` - AC_DEFINE_UNQUOTED([BITSIZEOF_${GLTYPE}], [$result]) - eval BITSIZEOF_${GLTYPE}=\$result - done - m4_foreach_w([gltype], [$1], - [AC_SUBST([BITSIZEOF_]m4_translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]))]) -]) - -dnl gl_CHECK_TYPES_SIGNED(TYPES, INCLUDES) -dnl Determine the signedness of each of the given types. -dnl Define HAVE_SIGNED_TYPE if type is signed. -AC_DEFUN([gl_CHECK_TYPES_SIGNED], -[ - dnl Use a shell loop, to avoid bloating configure, and - dnl - extra AH_TEMPLATE calls, so that autoheader knows what to put into - dnl config.h.in, - dnl - extra AC_SUBST calls, so that the right substitutions are made. - m4_foreach_w([gltype], [$1], - [AH_TEMPLATE([HAVE_SIGNED_]m4_translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]), - [Define to 1 if ']gltype[' is a signed integer type.])]) - for gltype in $1 ; do - AC_CACHE_CHECK([whether $gltype is signed], [gl_cv_type_${gltype}_signed], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([$2[ - int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];]])], - result=yes, result=no) - eval gl_cv_type_${gltype}_signed=\$result - ]) - eval result=\$gl_cv_type_${gltype}_signed - GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` - if test "$result" = yes; then - AC_DEFINE_UNQUOTED([HAVE_SIGNED_${GLTYPE}], [1]) - eval HAVE_SIGNED_${GLTYPE}=1 - else - eval HAVE_SIGNED_${GLTYPE}=0 - fi - done - m4_foreach_w([gltype], [$1], - [AC_SUBST([HAVE_SIGNED_]m4_translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]))]) -]) - -dnl gl_INTEGER_TYPE_SUFFIX(TYPES, INCLUDES) -dnl Determine the suffix to use for integer constants of the given types. -dnl Define t_SUFFIX for each such type. -AC_DEFUN([gl_INTEGER_TYPE_SUFFIX], -[ - dnl Use a shell loop, to avoid bloating configure, and - dnl - extra AH_TEMPLATE calls, so that autoheader knows what to put into - dnl config.h.in, - dnl - extra AC_SUBST calls, so that the right substitutions are made. - m4_foreach_w([gltype], [$1], - [AH_TEMPLATE(m4_translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_])[_SUFFIX], - [Define to l, ll, u, ul, ull, etc., as suitable for - constants of type ']gltype['.])]) - for gltype in $1 ; do - AC_CACHE_CHECK([for $gltype integer literal suffix], - [gl_cv_type_${gltype}_suffix], - [eval gl_cv_type_${gltype}_suffix=no - eval result=\$gl_cv_type_${gltype}_signed - if test "$result" = yes; then - glsufu= - else - glsufu=u - fi - for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do - case $glsuf in - '') gltype1='int';; - l) gltype1='long int';; - ll) gltype1='long long int';; - i64) gltype1='__int64';; - u) gltype1='unsigned int';; - ul) gltype1='unsigned long int';; - ull) gltype1='unsigned long long int';; - ui64)gltype1='unsigned __int64';; - esac - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([$2[ - extern $gltype foo; - extern $gltype1 foo;]])], - [eval gl_cv_type_${gltype}_suffix=\$glsuf]) - eval result=\$gl_cv_type_${gltype}_suffix - test "$result" != no && break - done]) - GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` - eval result=\$gl_cv_type_${gltype}_suffix - test "$result" = no && result= - eval ${GLTYPE}_SUFFIX=\$result - AC_DEFINE_UNQUOTED([${GLTYPE}_SUFFIX], [$result]) - done - m4_foreach_w([gltype], [$1], - [AC_SUBST(m4_translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_])[_SUFFIX])]) -]) - -dnl gl_STDINT_INCLUDES -AC_DEFUN([gl_STDINT_INCLUDES], -[[ - /* BSD/OS 4.0.1 has a bug: , and must be - included before . */ - #include - #include - #if HAVE_WCHAR_H - # include - # include - # include - #endif -]]) - -dnl gl_STDINT_TYPE_PROPERTIES -dnl Compute HAVE_SIGNED_t, BITSIZEOF_t and t_SUFFIX, for all the types t -dnl of interest to stdint.in.h. -AC_DEFUN([gl_STDINT_TYPE_PROPERTIES], -[ - AC_REQUIRE([gl_MULTIARCH]) - if test $APPLE_UNIVERSAL_BUILD = 0; then - gl_STDINT_BITSIZEOF([ptrdiff_t size_t], - [gl_STDINT_INCLUDES]) - fi - gl_STDINT_BITSIZEOF([sig_atomic_t wchar_t wint_t], - [gl_STDINT_INCLUDES]) - gl_CHECK_TYPES_SIGNED([sig_atomic_t wchar_t wint_t], - [gl_STDINT_INCLUDES]) - gl_cv_type_ptrdiff_t_signed=yes - gl_cv_type_size_t_signed=no - if test $APPLE_UNIVERSAL_BUILD = 0; then - gl_INTEGER_TYPE_SUFFIX([ptrdiff_t size_t], - [gl_STDINT_INCLUDES]) - fi - gl_INTEGER_TYPE_SUFFIX([sig_atomic_t wchar_t wint_t], - [gl_STDINT_INCLUDES]) - - dnl If wint_t is smaller than 'int', it cannot satisfy the ISO C 99 - dnl requirement that wint_t is "unchanged by default argument promotions". - dnl In this case gnulib's and override wint_t. - dnl Set the variable BITSIZEOF_WINT_T accordingly. - if test $GNULIB_OVERRIDES_WINT_T = 1; then - BITSIZEOF_WINT_T=32 - fi -]) - -dnl Autoconf >= 2.61 has AC_COMPUTE_INT built-in. -dnl Remove this when we can assume autoconf >= 2.61. -m4_ifdef([AC_COMPUTE_INT], [], [ - AC_DEFUN([AC_COMPUTE_INT], [_AC_COMPUTE_INT([$2],[$1],[$3],[$4])]) -]) diff --git a/lib/glm4/string_h.m4 b/lib/glm4/string_h.m4 deleted file mode 100644 index 3d2ad22..0000000 --- a/lib/glm4/string_h.m4 +++ /dev/null @@ -1,120 +0,0 @@ -# Configure a GNU-like replacement for . - -# Copyright (C) 2007-2017 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 21 - -# Written by Paul Eggert. - -AC_DEFUN([gl_HEADER_STRING_H], -[ - dnl Use AC_REQUIRE here, so that the default behavior below is expanded - dnl once only, before all statements that occur in other macros. - AC_REQUIRE([gl_HEADER_STRING_H_BODY]) -]) - -AC_DEFUN([gl_HEADER_STRING_H_BODY], -[ - AC_REQUIRE([AC_C_RESTRICT]) - AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) - gl_NEXT_HEADERS([string.h]) - - dnl Check for declarations of anything we want to poison if the - dnl corresponding gnulib module is not in use, and which is not - dnl guaranteed by C89. - gl_WARN_ON_USE_PREPARE([[#include - ]], - [ffsl ffsll memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul - strdup strncat strndup strnlen strpbrk strsep strcasestr strtok_r - strerror_r strsignal strverscmp]) -]) - -AC_DEFUN([gl_STRING_MODULE_INDICATOR], -[ - dnl Use AC_REQUIRE here, so that the default settings are expanded once only. - AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) - gl_MODULE_INDICATOR_SET_VARIABLE([$1]) - dnl Define it also as a C macro, for the benefit of the unit tests. - gl_MODULE_INDICATOR_FOR_TESTS([$1]) -]) - -AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS], -[ - GNULIB_FFSL=0; AC_SUBST([GNULIB_FFSL]) - GNULIB_FFSLL=0; AC_SUBST([GNULIB_FFSLL]) - GNULIB_MEMCHR=0; AC_SUBST([GNULIB_MEMCHR]) - GNULIB_MEMMEM=0; AC_SUBST([GNULIB_MEMMEM]) - GNULIB_MEMPCPY=0; AC_SUBST([GNULIB_MEMPCPY]) - GNULIB_MEMRCHR=0; AC_SUBST([GNULIB_MEMRCHR]) - GNULIB_RAWMEMCHR=0; AC_SUBST([GNULIB_RAWMEMCHR]) - GNULIB_STPCPY=0; AC_SUBST([GNULIB_STPCPY]) - GNULIB_STPNCPY=0; AC_SUBST([GNULIB_STPNCPY]) - GNULIB_STRCHRNUL=0; AC_SUBST([GNULIB_STRCHRNUL]) - GNULIB_STRDUP=0; AC_SUBST([GNULIB_STRDUP]) - GNULIB_STRNCAT=0; AC_SUBST([GNULIB_STRNCAT]) - GNULIB_STRNDUP=0; AC_SUBST([GNULIB_STRNDUP]) - GNULIB_STRNLEN=0; AC_SUBST([GNULIB_STRNLEN]) - GNULIB_STRPBRK=0; AC_SUBST([GNULIB_STRPBRK]) - GNULIB_STRSEP=0; AC_SUBST([GNULIB_STRSEP]) - GNULIB_STRSTR=0; AC_SUBST([GNULIB_STRSTR]) - GNULIB_STRCASESTR=0; AC_SUBST([GNULIB_STRCASESTR]) - GNULIB_STRTOK_R=0; AC_SUBST([GNULIB_STRTOK_R]) - GNULIB_MBSLEN=0; AC_SUBST([GNULIB_MBSLEN]) - GNULIB_MBSNLEN=0; AC_SUBST([GNULIB_MBSNLEN]) - GNULIB_MBSCHR=0; AC_SUBST([GNULIB_MBSCHR]) - GNULIB_MBSRCHR=0; AC_SUBST([GNULIB_MBSRCHR]) - GNULIB_MBSSTR=0; AC_SUBST([GNULIB_MBSSTR]) - GNULIB_MBSCASECMP=0; AC_SUBST([GNULIB_MBSCASECMP]) - GNULIB_MBSNCASECMP=0; AC_SUBST([GNULIB_MBSNCASECMP]) - GNULIB_MBSPCASECMP=0; AC_SUBST([GNULIB_MBSPCASECMP]) - GNULIB_MBSCASESTR=0; AC_SUBST([GNULIB_MBSCASESTR]) - GNULIB_MBSCSPN=0; AC_SUBST([GNULIB_MBSCSPN]) - GNULIB_MBSPBRK=0; AC_SUBST([GNULIB_MBSPBRK]) - GNULIB_MBSSPN=0; AC_SUBST([GNULIB_MBSSPN]) - GNULIB_MBSSEP=0; AC_SUBST([GNULIB_MBSSEP]) - GNULIB_MBSTOK_R=0; AC_SUBST([GNULIB_MBSTOK_R]) - GNULIB_STRERROR=0; AC_SUBST([GNULIB_STRERROR]) - GNULIB_STRERROR_R=0; AC_SUBST([GNULIB_STRERROR_R]) - GNULIB_STRSIGNAL=0; AC_SUBST([GNULIB_STRSIGNAL]) - GNULIB_STRVERSCMP=0; AC_SUBST([GNULIB_STRVERSCMP]) - HAVE_MBSLEN=0; AC_SUBST([HAVE_MBSLEN]) - dnl Assume proper GNU behavior unless another module says otherwise. - HAVE_FFSL=1; AC_SUBST([HAVE_FFSL]) - HAVE_FFSLL=1; AC_SUBST([HAVE_FFSLL]) - HAVE_MEMCHR=1; AC_SUBST([HAVE_MEMCHR]) - HAVE_DECL_MEMMEM=1; AC_SUBST([HAVE_DECL_MEMMEM]) - HAVE_MEMPCPY=1; AC_SUBST([HAVE_MEMPCPY]) - HAVE_DECL_MEMRCHR=1; AC_SUBST([HAVE_DECL_MEMRCHR]) - HAVE_RAWMEMCHR=1; AC_SUBST([HAVE_RAWMEMCHR]) - HAVE_STPCPY=1; AC_SUBST([HAVE_STPCPY]) - HAVE_STPNCPY=1; AC_SUBST([HAVE_STPNCPY]) - HAVE_STRCHRNUL=1; AC_SUBST([HAVE_STRCHRNUL]) - HAVE_DECL_STRDUP=1; AC_SUBST([HAVE_DECL_STRDUP]) - HAVE_DECL_STRNDUP=1; AC_SUBST([HAVE_DECL_STRNDUP]) - HAVE_DECL_STRNLEN=1; AC_SUBST([HAVE_DECL_STRNLEN]) - HAVE_STRPBRK=1; AC_SUBST([HAVE_STRPBRK]) - HAVE_STRSEP=1; AC_SUBST([HAVE_STRSEP]) - HAVE_STRCASESTR=1; AC_SUBST([HAVE_STRCASESTR]) - HAVE_DECL_STRTOK_R=1; AC_SUBST([HAVE_DECL_STRTOK_R]) - HAVE_DECL_STRERROR_R=1; AC_SUBST([HAVE_DECL_STRERROR_R]) - HAVE_DECL_STRSIGNAL=1; AC_SUBST([HAVE_DECL_STRSIGNAL]) - HAVE_STRVERSCMP=1; AC_SUBST([HAVE_STRVERSCMP]) - REPLACE_MEMCHR=0; AC_SUBST([REPLACE_MEMCHR]) - REPLACE_MEMMEM=0; AC_SUBST([REPLACE_MEMMEM]) - REPLACE_STPNCPY=0; AC_SUBST([REPLACE_STPNCPY]) - REPLACE_STRDUP=0; AC_SUBST([REPLACE_STRDUP]) - REPLACE_STRSTR=0; AC_SUBST([REPLACE_STRSTR]) - REPLACE_STRCASESTR=0; AC_SUBST([REPLACE_STRCASESTR]) - REPLACE_STRCHRNUL=0; AC_SUBST([REPLACE_STRCHRNUL]) - REPLACE_STRERROR=0; AC_SUBST([REPLACE_STRERROR]) - REPLACE_STRERROR_R=0; AC_SUBST([REPLACE_STRERROR_R]) - REPLACE_STRNCAT=0; AC_SUBST([REPLACE_STRNCAT]) - REPLACE_STRNDUP=0; AC_SUBST([REPLACE_STRNDUP]) - REPLACE_STRNLEN=0; AC_SUBST([REPLACE_STRNLEN]) - REPLACE_STRSIGNAL=0; AC_SUBST([REPLACE_STRSIGNAL]) - REPLACE_STRTOK_R=0; AC_SUBST([REPLACE_STRTOK_R]) - UNDEFINE_STRTOK_R=0; AC_SUBST([UNDEFINE_STRTOK_R]) -]) diff --git a/lib/glm4/strverscmp.m4 b/lib/glm4/strverscmp.m4 deleted file mode 100644 index cbcca3f..0000000 --- a/lib/glm4/strverscmp.m4 +++ /dev/null @@ -1,22 +0,0 @@ -# strverscmp.m4 serial 8 -dnl Copyright (C) 2002, 2005-2017 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_STRVERSCMP], -[ - dnl Persuade glibc to declare strverscmp(). - AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) - - AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) - AC_CHECK_FUNCS([strverscmp]) - if test $ac_cv_func_strverscmp = no; then - HAVE_STRVERSCMP=0 - fi -]) - -# Prerequisites of lib/strverscmp.c. -AC_DEFUN([gl_PREREQ_STRVERSCMP], [ - : -]) diff --git a/lib/glm4/sys_types_h.m4 b/lib/glm4/sys_types_h.m4 deleted file mode 100644 index 2eb4e9e..0000000 --- a/lib/glm4/sys_types_h.m4 +++ /dev/null @@ -1,49 +0,0 @@ -# sys_types_h.m4 serial 6 -dnl Copyright (C) 2011-2017 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN_ONCE([gl_SYS_TYPES_H], -[ - AC_REQUIRE([gl_SYS_TYPES_H_DEFAULTS]) - gl_NEXT_HEADERS([sys/types.h]) - - dnl Ensure the type pid_t gets defined. - AC_REQUIRE([AC_TYPE_PID_T]) - - dnl Ensure the type mode_t gets defined. - AC_REQUIRE([AC_TYPE_MODE_T]) - - dnl Whether to override the 'off_t' type. - AC_REQUIRE([gl_TYPE_OFF_T]) -]) - -AC_DEFUN([gl_SYS_TYPES_H_DEFAULTS], -[ -]) - -# This works around a buggy version in autoconf <= 2.69. -# See - -m4_version_prereq([2.70], [], [ - -# This is taken from the following Autoconf patch: -# http://git.sv.gnu.org/cgit/autoconf.git/commit/?id=e17a30e98 - -m4_undefine([AC_HEADER_MAJOR]) -AC_DEFUN([AC_HEADER_MAJOR], -[AC_CHECK_HEADERS_ONCE([sys/types.h]) -AC_CHECK_HEADER([sys/mkdev.h], - [AC_DEFINE([MAJOR_IN_MKDEV], [1], - [Define to 1 if `major', `minor', and `makedev' are declared in - .])]) -if test $ac_cv_header_sys_mkdev_h = no; then - AC_CHECK_HEADER([sys/sysmacros.h], - [AC_DEFINE([MAJOR_IN_SYSMACROS], [1], - [Define to 1 if `major', `minor', and `makedev' are declared in - .])]) -fi -]) - -]) diff --git a/lib/glm4/visibility.m4 b/lib/glm4/visibility.m4 deleted file mode 100644 index ce00e72..0000000 --- a/lib/glm4/visibility.m4 +++ /dev/null @@ -1,77 +0,0 @@ -# visibility.m4 serial 5 (gettext-0.18.2) -dnl Copyright (C) 2005, 2008, 2010-2017 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Bruno Haible. - -dnl Tests whether the compiler supports the command-line option -dnl -fvisibility=hidden and the function and variable attributes -dnl __attribute__((__visibility__("hidden"))) and -dnl __attribute__((__visibility__("default"))). -dnl Does *not* test for __visibility__("protected") - which has tricky -dnl semantics (see the 'vismain' test in glibc) and does not exist e.g. on -dnl Mac OS X. -dnl Does *not* test for __visibility__("internal") - which has processor -dnl dependent semantics. -dnl Does *not* test for #pragma GCC visibility push(hidden) - which is -dnl "really only recommended for legacy code". -dnl Set the variable CFLAG_VISIBILITY. -dnl Defines and sets the variable HAVE_VISIBILITY. - -AC_DEFUN([gl_VISIBILITY], -[ - AC_REQUIRE([AC_PROG_CC]) - CFLAG_VISIBILITY= - HAVE_VISIBILITY=0 - if test -n "$GCC"; then - dnl First, check whether -Werror can be added to the command line, or - dnl whether it leads to an error because of some other option that the - dnl user has put into $CC $CFLAGS $CPPFLAGS. - AC_MSG_CHECKING([whether the -Werror option is usable]) - AC_CACHE_VAL([gl_cv_cc_vis_werror], [ - gl_save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -Werror" - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([[]], [[]])], - [gl_cv_cc_vis_werror=yes], - [gl_cv_cc_vis_werror=no]) - CFLAGS="$gl_save_CFLAGS"]) - AC_MSG_RESULT([$gl_cv_cc_vis_werror]) - dnl Now check whether visibility declarations are supported. - AC_MSG_CHECKING([for simple visibility declarations]) - AC_CACHE_VAL([gl_cv_cc_visibility], [ - gl_save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -fvisibility=hidden" - dnl We use the option -Werror and a function dummyfunc, because on some - dnl platforms (Cygwin 1.7) the use of -fvisibility triggers a warning - dnl "visibility attribute not supported in this configuration; ignored" - dnl at the first function definition in every compilation unit, and we - dnl don't want to use the option in this case. - if test $gl_cv_cc_vis_werror = yes; then - CFLAGS="$CFLAGS -Werror" - fi - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[extern __attribute__((__visibility__("hidden"))) int hiddenvar; - extern __attribute__((__visibility__("default"))) int exportedvar; - extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void); - extern __attribute__((__visibility__("default"))) int exportedfunc (void); - void dummyfunc (void) {} - ]], - [[]])], - [gl_cv_cc_visibility=yes], - [gl_cv_cc_visibility=no]) - CFLAGS="$gl_save_CFLAGS"]) - AC_MSG_RESULT([$gl_cv_cc_visibility]) - if test $gl_cv_cc_visibility = yes; then - CFLAG_VISIBILITY="-fvisibility=hidden" - HAVE_VISIBILITY=1 - fi - fi - AC_SUBST([CFLAG_VISIBILITY]) - AC_SUBST([HAVE_VISIBILITY]) - AC_DEFINE_UNQUOTED([HAVE_VISIBILITY], [$HAVE_VISIBILITY], - [Define to 1 or 0, depending whether the compiler supports simple visibility declarations.]) -]) diff --git a/lib/glm4/warn-on-use.m4 b/lib/glm4/warn-on-use.m4 deleted file mode 100644 index 25ce737..0000000 --- a/lib/glm4/warn-on-use.m4 +++ /dev/null @@ -1,47 +0,0 @@ -# warn-on-use.m4 serial 5 -dnl Copyright (C) 2010-2017 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -# gl_WARN_ON_USE_PREPARE(INCLUDES, NAMES) -# --------------------------------------- -# For each whitespace-separated element in the list of NAMES, define -# HAVE_RAW_DECL_name if the function has a declaration among INCLUDES -# even after being undefined as a macro. -# -# See warn-on-use.h for some hints on how to poison function names, as -# well as ideas on poisoning global variables and macros. NAMES may -# include global variables, but remember that only functions work with -# _GL_WARN_ON_USE. Typically, INCLUDES only needs to list a single -# header, but if the replacement header pulls in other headers because -# some systems declare functions in the wrong header, then INCLUDES -# should do likewise. -# -# It is generally safe to assume declarations for functions declared -# in the intersection of C89 and C11 (such as printf) without -# needing gl_WARN_ON_USE_PREPARE. -AC_DEFUN([gl_WARN_ON_USE_PREPARE], -[ - m4_foreach_w([gl_decl], [$2], - [AH_TEMPLATE([HAVE_RAW_DECL_]AS_TR_CPP(m4_defn([gl_decl])), - [Define to 1 if ]m4_defn([gl_decl])[ is declared even after - undefining macros.])])dnl -dnl FIXME: gl_Symbol must be used unquoted until we can assume -dnl autoconf 2.64 or newer. - for gl_func in m4_flatten([$2]); do - AS_VAR_PUSHDEF([gl_Symbol], [gl_cv_have_raw_decl_$gl_func])dnl - AC_CACHE_CHECK([whether $gl_func is declared without a macro], - gl_Symbol, - [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([$1], -[@%:@undef $gl_func - (void) $gl_func;])], - [AS_VAR_SET(gl_Symbol, [yes])], [AS_VAR_SET(gl_Symbol, [no])])]) - AS_VAR_IF(gl_Symbol, [yes], - [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_RAW_DECL_$gl_func]), [1]) - dnl shortcut - if the raw declaration exists, then set a cache - dnl variable to allow skipping any later AC_CHECK_DECL efforts - eval ac_cv_have_decl_$gl_func=yes]) - AS_VAR_POPDEF([gl_Symbol])dnl - done -]) diff --git a/lib/glm4/wchar_t.m4 b/lib/glm4/wchar_t.m4 deleted file mode 100644 index 11783d2..0000000 --- a/lib/glm4/wchar_t.m4 +++ /dev/null @@ -1,24 +0,0 @@ -# wchar_t.m4 serial 4 (gettext-0.18.2) -dnl Copyright (C) 2002-2003, 2008-2017 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Bruno Haible. -dnl Test whether has the 'wchar_t' type. -dnl Prerequisite: AC_PROG_CC - -AC_DEFUN([gt_TYPE_WCHAR_T], -[ - AC_CACHE_CHECK([for wchar_t], [gt_cv_c_wchar_t], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[#include - wchar_t foo = (wchar_t)'\0';]], - [[]])], - [gt_cv_c_wchar_t=yes], - [gt_cv_c_wchar_t=no])]) - if test $gt_cv_c_wchar_t = yes; then - AC_DEFINE([HAVE_WCHAR_T], [1], [Define if you have the 'wchar_t' type.]) - fi -]) diff --git a/lib/glm4/wint_t.m4 b/lib/glm4/wint_t.m4 deleted file mode 100644 index 65e25a4..0000000 --- a/lib/glm4/wint_t.m4 +++ /dev/null @@ -1,62 +0,0 @@ -# wint_t.m4 serial 6 -dnl Copyright (C) 2003, 2007-2017 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Bruno Haible. -dnl Test whether has the 'wint_t' type and whether gnulib's -dnl or would, if present, override 'wint_t'. -dnl Prerequisite: AC_PROG_CC - -AC_DEFUN([gt_TYPE_WINT_T], -[ - AC_CACHE_CHECK([for wint_t], [gt_cv_c_wint_t], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[ -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be included - before . */ -#include -#include -#include -#include - wint_t foo = (wchar_t)'\0';]], - [[]])], - [gt_cv_c_wint_t=yes], - [gt_cv_c_wint_t=no])]) - if test $gt_cv_c_wint_t = yes; then - AC_DEFINE([HAVE_WINT_T], [1], [Define if you have the 'wint_t' type.]) - - dnl Determine whether gnulib's or would, if present, - dnl override 'wint_t'. - AC_CACHE_CHECK([whether wint_t is too small], - [gl_cv_type_wint_t_too_small], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([[ -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#if !(defined __GLIBC__ && !defined __UCLIBC__) -# include -# include -# include -#endif -#include - int verify[sizeof (wint_t) < sizeof (int) ? -1 : 1]; - ]])], - [gl_cv_type_wint_t_too_small=no], - [gl_cv_type_wint_t_too_small=yes])]) - if test $gl_cv_type_wint_t_too_small = yes; then - GNULIB_OVERRIDES_WINT_T=1 - else - GNULIB_OVERRIDES_WINT_T=0 - fi - else - GNULIB_OVERRIDES_WINT_T=0 - fi - AC_SUBST([GNULIB_OVERRIDES_WINT_T]) -]) diff --git a/lib/gstr.c b/lib/gstr.c deleted file mode 100644 index e91a3a1..0000000 --- a/lib/gstr.c +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (C) 2002-2014 Free Software Foundation, Inc. - * - * This file is part of LIBTASN1. - * - * The LIBTASN1 library is free software; you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA - */ - -#include -#include "gstr.h" - -/* These function are like strcat, strcpy. They only - * do bounds checking (they shouldn't cause buffer overruns), - * and they always produce null terminated strings. - * - * They should be used only with null terminated strings. - */ -void -_asn1_str_cat (char *dest, size_t dest_tot_size, const char *src) -{ - size_t str_size = strlen (src); - size_t dest_size = strlen (dest); - - if (dest_tot_size - dest_size > str_size) - { - strcat (dest, src); - } - else - { - if (dest_tot_size - dest_size > 0) - { - strncat (dest, src, (dest_tot_size - dest_size) - 1); - dest[dest_tot_size - 1] = 0; - } - } -} - -/* Returns the bytes copied (not including the null terminator) */ -unsigned int -_asn1_str_cpy (char *dest, size_t dest_tot_size, const char *src) -{ - size_t str_size = strlen (src); - - if (dest_tot_size > str_size) - { - strcpy (dest, src); - return str_size; - } - else - { - if (dest_tot_size > 0) - { - str_size = dest_tot_size - 1; - memcpy (dest, src, str_size); - dest[str_size] = 0; - return str_size; - } - else - return 0; - } -} diff --git a/lib/gstr.h b/lib/gstr.h deleted file mode 100644 index 00c335c..0000000 --- a/lib/gstr.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (C) 2002-2014 Free Software Foundation, Inc. - * - * This file is part of LIBTASN1. - * - * The LIBTASN1 library is free software; you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA - */ - -unsigned int _asn1_str_cpy (char *dest, size_t dest_tot_size, - const char *src); -void _asn1_str_cat (char *dest, size_t dest_tot_size, const char *src); - -#define Estrcpy(x,y) _asn1_str_cpy(x,ASN1_MAX_ERROR_DESCRIPTION_SIZE,y) -#define Estrcat(x,y) _asn1_str_cat(x,ASN1_MAX_ERROR_DESCRIPTION_SIZE,y) - -inline static -void safe_memset(void *data, int c, size_t size) -{ - volatile unsigned volatile_zero = 0; - volatile char *vdata = (volatile char*)data; - - /* This is based on a nice trick for safe memset, - * sent by David Jacobson in the openssl-dev mailing list. - */ - - if (size > 0) do { - memset(data, c, size); - } while(vdata[volatile_zero] != c); -} diff --git a/lib/int.h b/lib/int.h deleted file mode 100644 index 7d2eea3..0000000 --- a/lib/int.h +++ /dev/null @@ -1,222 +0,0 @@ -/* - * Copyright (C) 2002-2014 Free Software Foundation, Inc. - * - * This file is part of LIBTASN1. - * - * The LIBTASN1 library is free software; you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA - */ - -#ifndef INT_H -#define INT_H - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include -#include -#include -#include -#include - -#ifdef HAVE_SYS_TYPES_H -#include -#endif - -#include - -#define ASN1_SMALL_VALUE_SIZE 16 - -/* This structure is also in libtasn1.h, but then contains less - fields. You cannot make any modifications to these first fields - without breaking ABI. */ -struct asn1_node_st -{ - /* public fields: */ - char name[ASN1_MAX_NAME_SIZE + 1]; /* Node name */ - unsigned int name_hash; - unsigned int type; /* Node type */ - unsigned char *value; /* Node value */ - int value_len; - asn1_node down; /* Pointer to the son node */ - asn1_node right; /* Pointer to the brother node */ - asn1_node left; /* Pointer to the next list element */ - /* private fields: */ - unsigned char small_value[ASN1_SMALL_VALUE_SIZE]; /* For small values */ - - /* values used during decoding/coding */ - int tmp_ival; - unsigned start; /* the start of the DER sequence - if decoded */ - unsigned end; /* the end of the DER sequence - if decoded */ -}; - -typedef struct tag_and_class_st -{ - unsigned tag; - unsigned class; - const char *desc; -} tag_and_class_st; - -/* the types that are handled in _asn1_tags */ -#define CASE_HANDLED_ETYPES \ - case ASN1_ETYPE_NULL: \ - case ASN1_ETYPE_BOOLEAN: \ - case ASN1_ETYPE_INTEGER: \ - case ASN1_ETYPE_ENUMERATED: \ - case ASN1_ETYPE_OBJECT_ID: \ - case ASN1_ETYPE_OCTET_STRING: \ - case ASN1_ETYPE_GENERALSTRING: \ - case ASN1_ETYPE_NUMERIC_STRING: \ - case ASN1_ETYPE_IA5_STRING: \ - case ASN1_ETYPE_TELETEX_STRING: \ - case ASN1_ETYPE_PRINTABLE_STRING: \ - case ASN1_ETYPE_UNIVERSAL_STRING: \ - case ASN1_ETYPE_BMP_STRING: \ - case ASN1_ETYPE_UTF8_STRING: \ - case ASN1_ETYPE_VISIBLE_STRING: \ - case ASN1_ETYPE_BIT_STRING: \ - case ASN1_ETYPE_SEQUENCE: \ - case ASN1_ETYPE_SEQUENCE_OF: \ - case ASN1_ETYPE_SET: \ - case ASN1_ETYPE_UTC_TIME: \ - case ASN1_ETYPE_GENERALIZED_TIME: \ - case ASN1_ETYPE_SET_OF - -#define ETYPE_TAG(etype) (_asn1_tags[etype].tag) -#define ETYPE_CLASS(etype) (_asn1_tags[etype].class) -#define ETYPE_OK(etype) (((etype) != ASN1_ETYPE_INVALID && \ - (etype) <= _asn1_tags_size && \ - _asn1_tags[(etype)].desc != NULL)?1:0) - -#define ETYPE_IS_STRING(etype) ((etype == ASN1_ETYPE_GENERALSTRING || \ - etype == ASN1_ETYPE_NUMERIC_STRING || etype == ASN1_ETYPE_IA5_STRING || \ - etype == ASN1_ETYPE_TELETEX_STRING || etype == ASN1_ETYPE_PRINTABLE_STRING || \ - etype == ASN1_ETYPE_UNIVERSAL_STRING || etype == ASN1_ETYPE_BMP_STRING || \ - etype == ASN1_ETYPE_UTF8_STRING || etype == ASN1_ETYPE_VISIBLE_STRING || \ - etype == ASN1_ETYPE_OCTET_STRING)?1:0) - -extern unsigned int _asn1_tags_size; -extern const tag_and_class_st _asn1_tags[]; - -#define _asn1_strlen(s) strlen((const char *) s) -#define _asn1_strtol(n,e,b) strtol((const char *) n, e, b) -#define _asn1_strtoul(n,e,b) strtoul((const char *) n, e, b) -#define _asn1_strcmp(a,b) strcmp((const char *)a, (const char *)b) -#define _asn1_strcpy(a,b) strcpy((char *)a, (const char *)b) -#define _asn1_strcat(a,b) strcat((char *)a, (const char *)b) - -#if SIZEOF_UNSIGNED_LONG_INT == 8 -# define _asn1_strtou64(n,e,b) strtoul((const char *) n, e, b) -#else -# define _asn1_strtou64(n,e,b) strtoull((const char *) n, e, b) -#endif - -#define MAX_LOG_SIZE 1024 /* maximum number of characters of a log message */ - -/* Define used for visiting trees. */ -#define UP 1 -#define RIGHT 2 -#define DOWN 3 - -/***********************************************************************/ -/* List of constants to better specify the type of typedef asn1_node_st. */ -/***********************************************************************/ -/* Used with TYPE_TAG */ -#define CONST_UNIVERSAL (1<<8) -#define CONST_PRIVATE (1<<9) -#define CONST_APPLICATION (1<<10) -#define CONST_EXPLICIT (1<<11) -#define CONST_IMPLICIT (1<<12) - -#define CONST_TAG (1<<13) /* Used in ASN.1 assignement */ -#define CONST_OPTION (1<<14) -#define CONST_DEFAULT (1<<15) -#define CONST_TRUE (1<<16) -#define CONST_FALSE (1<<17) - -#define CONST_LIST (1<<18) /* Used with TYPE_INTEGER and TYPE_BIT_STRING */ -#define CONST_MIN_MAX (1<<19) - -#define CONST_1_PARAM (1<<20) - -#define CONST_SIZE (1<<21) - -#define CONST_DEFINED_BY (1<<22) - -/* Those two are deprecated and used for backwards compatibility */ -#define CONST_GENERALIZED (1<<23) -#define CONST_UTC (1<<24) - -/* #define CONST_IMPORTS (1<<25) */ - -#define CONST_NOT_USED (1<<26) -#define CONST_SET (1<<27) -#define CONST_ASSIGN (1<<28) - -#define CONST_DOWN (1<<29) -#define CONST_RIGHT (1<<30) - - -#define ASN1_ETYPE_TIME 17 -/****************************************/ -/* Returns the first 8 bits. */ -/* Used with the field type of asn1_node_st */ -/****************************************/ -inline static unsigned int -type_field (unsigned int ntype) -{ - return (ntype & 0xff); -} - -/* To convert old types from a static structure */ -inline static unsigned int -convert_old_type (unsigned int ntype) -{ - unsigned int type = ntype & 0xff; - if (type == ASN1_ETYPE_TIME) - { - if (ntype & CONST_UTC) - type = ASN1_ETYPE_UTC_TIME; - else - type = ASN1_ETYPE_GENERALIZED_TIME; - - ntype &= ~(CONST_UTC | CONST_GENERALIZED); - ntype &= 0xffffff00; - ntype |= type; - - return ntype; - } - else - return ntype; -} - -static inline -void *_asn1_realloc(void *ptr, size_t size) -{ - void *ret; - - if (size == 0) - return ptr; - - ret = realloc(ptr, size); - if (ret == NULL) - { - free(ptr); - } - return ret; -} - -#endif /* INT_H */ diff --git a/lib/libtasn1.h b/lib/libtasn1.h deleted file mode 100644 index ea26b78..0000000 --- a/lib/libtasn1.h +++ /dev/null @@ -1,405 +0,0 @@ -/* - * Copyright (C) 2002-2014 Free Software Foundation, Inc. - * - * This file is part of LIBTASN1. - * - * LIBTASN1 is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2.1 of - * the License, or (at your option) any later version. - * - * LIBTASN1 is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with LIBTASN1; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA - * - */ - -#ifndef LIBTASN1_H -#define LIBTASN1_H - -#ifndef ASN1_API -#if defined ASN1_BUILDING && defined HAVE_VISIBILITY && HAVE_VISIBILITY -#define ASN1_API __attribute__((__visibility__("default"))) -#elif defined ASN1_BUILDING && defined _MSC_VER && ! defined ASN1_STATIC -#define ASN1_API __declspec(dllexport) -#elif defined _MSC_VER && ! defined ASN1_STATIC -#define ASN1_API __declspec(dllimport) -#else -#define ASN1_API -#endif -#endif - -#include -#include -#include /* for FILE* */ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#define ASN1_VERSION "4.13" - -#if defined(__GNUC__) && !defined(ASN1_INTERNAL_BUILD) -# define _ASN1_GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) -# if _ASN1_GCC_VERSION >= 30100 -# define _ASN1_GCC_ATTR_DEPRECATED __attribute__ ((__deprecated__)) -# endif -#endif - -#ifndef _ASN1_GCC_ATTR_DEPRECATED -#define _ASN1_GCC_ATTR_DEPRECATED -#endif - - /*****************************************/ - /* Errors returned by libtasn1 functions */ - /*****************************************/ -#define ASN1_SUCCESS 0 -#define ASN1_FILE_NOT_FOUND 1 -#define ASN1_ELEMENT_NOT_FOUND 2 -#define ASN1_IDENTIFIER_NOT_FOUND 3 -#define ASN1_DER_ERROR 4 -#define ASN1_VALUE_NOT_FOUND 5 -#define ASN1_GENERIC_ERROR 6 -#define ASN1_VALUE_NOT_VALID 7 -#define ASN1_TAG_ERROR 8 -#define ASN1_TAG_IMPLICIT 9 -#define ASN1_ERROR_TYPE_ANY 10 -#define ASN1_SYNTAX_ERROR 11 -#define ASN1_MEM_ERROR 12 -#define ASN1_MEM_ALLOC_ERROR 13 -#define ASN1_DER_OVERFLOW 14 -#define ASN1_NAME_TOO_LONG 15 -#define ASN1_ARRAY_ERROR 16 -#define ASN1_ELEMENT_NOT_EMPTY 17 -#define ASN1_TIME_ENCODING_ERROR 18 - - /*************************************/ - /* Constants used in asn1_visit_tree */ - /*************************************/ -#define ASN1_PRINT_NAME 1 -#define ASN1_PRINT_NAME_TYPE 2 -#define ASN1_PRINT_NAME_TYPE_VALUE 3 -#define ASN1_PRINT_ALL 4 - - /*****************************************/ - /* Constants returned by asn1_read_tag */ - /*****************************************/ -#define ASN1_CLASS_UNIVERSAL 0x00 /* old: 1 */ -#define ASN1_CLASS_APPLICATION 0x40 /* old: 2 */ -#define ASN1_CLASS_CONTEXT_SPECIFIC 0x80 /* old: 3 */ -#define ASN1_CLASS_PRIVATE 0xC0 /* old: 4 */ -#define ASN1_CLASS_STRUCTURED 0x20 - - /*****************************************/ - /* Constants returned by asn1_read_tag */ - /*****************************************/ -#define ASN1_TAG_BOOLEAN 0x01 -#define ASN1_TAG_INTEGER 0x02 -#define ASN1_TAG_SEQUENCE 0x10 -#define ASN1_TAG_SET 0x11 -#define ASN1_TAG_OCTET_STRING 0x04 -#define ASN1_TAG_BIT_STRING 0x03 -#define ASN1_TAG_UTCTime 0x17 -#define ASN1_TAG_GENERALIZEDTime 0x18 -#define ASN1_TAG_OBJECT_ID 0x06 -#define ASN1_TAG_ENUMERATED 0x0A -#define ASN1_TAG_NULL 0x05 -#define ASN1_TAG_GENERALSTRING 0x1B -#define ASN1_TAG_NUMERIC_STRING 0x12 -#define ASN1_TAG_IA5_STRING 0x16 -#define ASN1_TAG_TELETEX_STRING 0x14 -#define ASN1_TAG_PRINTABLE_STRING 0x13 -#define ASN1_TAG_UNIVERSAL_STRING 0x1C -#define ASN1_TAG_BMP_STRING 0x1E -#define ASN1_TAG_UTF8_STRING 0x0C -#define ASN1_TAG_VISIBLE_STRING 0x1A - - /******************************************************/ - /* Structure definition used for the node of the tree */ - /* that represent an ASN.1 DEFINITION. */ - /******************************************************/ - - typedef struct asn1_node_st asn1_node_st; - - typedef asn1_node_st *asn1_node; - - /* maximum number of characters of a name */ - /* inside a file with ASN1 definitons */ -#define ASN1_MAX_NAME_SIZE 64 - - - /*****************************************/ - /* For the on-disk format of ASN.1 trees */ - /*****************************************/ - struct asn1_static_node_st - { - const char *name; /* Node name */ - unsigned int type; /* Node type */ - const void *value; /* Node value */ - }; - typedef struct asn1_static_node_st asn1_static_node; - -/* List of constants for field type of node_asn */ -#define ASN1_ETYPE_INVALID 0 -#define ASN1_ETYPE_CONSTANT 1 -#define ASN1_ETYPE_IDENTIFIER 2 -#define ASN1_ETYPE_INTEGER 3 -#define ASN1_ETYPE_BOOLEAN 4 -#define ASN1_ETYPE_SEQUENCE 5 -#define ASN1_ETYPE_BIT_STRING 6 -#define ASN1_ETYPE_OCTET_STRING 7 -#define ASN1_ETYPE_TAG 8 -#define ASN1_ETYPE_DEFAULT 9 -#define ASN1_ETYPE_SIZE 10 -#define ASN1_ETYPE_SEQUENCE_OF 11 -#define ASN1_ETYPE_OBJECT_ID 12 -#define ASN1_ETYPE_ANY 13 -#define ASN1_ETYPE_SET 14 -#define ASN1_ETYPE_SET_OF 15 -#define ASN1_ETYPE_DEFINITIONS 16 -#define ASN1_ETYPE_CHOICE 18 -#define ASN1_ETYPE_IMPORTS 19 -#define ASN1_ETYPE_NULL 20 -#define ASN1_ETYPE_ENUMERATED 21 -#define ASN1_ETYPE_GENERALSTRING 27 -#define ASN1_ETYPE_NUMERIC_STRING 28 -#define ASN1_ETYPE_IA5_STRING 29 -#define ASN1_ETYPE_TELETEX_STRING 30 -#define ASN1_ETYPE_PRINTABLE_STRING 31 -#define ASN1_ETYPE_UNIVERSAL_STRING 32 -#define ASN1_ETYPE_BMP_STRING 33 -#define ASN1_ETYPE_UTF8_STRING 34 -#define ASN1_ETYPE_VISIBLE_STRING 35 -#define ASN1_ETYPE_UTC_TIME 36 -#define ASN1_ETYPE_GENERALIZED_TIME 37 - -/* Flags used by asn1_delete_structure2() */ - -/* makes sure the values are zeroized prior to deinitialization */ -#define ASN1_DELETE_FLAG_ZEROIZE 1 - -/* Flags used by asn1_der_decoding2(). */ - -/* This flag would allow arbitrary data past the DER data */ -#define ASN1_DECODE_FLAG_ALLOW_PADDING 1 -/* This flag would ensure that no BER decoding takes place */ -#define ASN1_DECODE_FLAG_STRICT_DER (1<<1) -/* This flag will tolerate Time encoding errors when in strict DER */ -#define ASN1_DECODE_FLAG_ALLOW_INCORRECT_TIME (1<<2) - - - struct asn1_data_node_st - { - const char *name; /* Node name */ - const void *value; /* Node value */ - unsigned int value_len; /* Node value size */ - unsigned int type; /* Node value type (ASN1_ETYPE_*) */ - }; - typedef struct asn1_data_node_st asn1_data_node_st; - - /***********************************/ - /* Fixed constants */ - /***********************************/ - - - /* maximum number of characters */ - /* of a description message */ - /* (null character included) */ -#define ASN1_MAX_ERROR_DESCRIPTION_SIZE 128 - - /***********************************/ - /* Functions definitions */ - /***********************************/ - - extern ASN1_API int - asn1_parser2tree (const char *file, - asn1_node * definitions, char *error_desc); - - extern ASN1_API int - asn1_parser2array (const char *inputFileName, - const char *outputFileName, - const char *vectorName, char *error_desc); - - extern ASN1_API int - asn1_array2tree (const asn1_static_node * array, - asn1_node * definitions, char *errorDescription); - - extern ASN1_API void - asn1_print_structure (FILE * out, asn1_node structure, - const char *name, int mode); - - extern ASN1_API int - asn1_create_element (asn1_node definitions, - const char *source_name, asn1_node * element); - - extern ASN1_API int asn1_delete_structure (asn1_node * structure); - - extern ASN1_API int asn1_delete_structure2 (asn1_node * structure, unsigned int flags); - - extern ASN1_API int - asn1_delete_element (asn1_node structure, const char *element_name); - - extern ASN1_API int - asn1_write_value (asn1_node node_root, const char *name, - const void *ivalue, int len); - - extern ASN1_API int - asn1_read_value (asn1_node root, const char *name, - void *ivalue, int *len); - - extern ASN1_API int - asn1_read_value_type (asn1_node root, const char *name, - void *ivalue, int *len, unsigned int *etype); - - extern ASN1_API int - asn1_read_node_value (asn1_node node, asn1_data_node_st * data); - - extern ASN1_API int - asn1_number_of_elements (asn1_node element, const char *name, int *num); - - extern ASN1_API int - asn1_der_coding (asn1_node element, const char *name, - void *ider, int *len, char *ErrorDescription); - - extern ASN1_API int - asn1_der_decoding2 (asn1_node *element, const void *ider, - int *max_ider_len, unsigned int flags, - char *errorDescription); - - extern ASN1_API int - asn1_der_decoding (asn1_node * element, const void *ider, - int len, char *errorDescription); - - /* Do not use. Use asn1_der_decoding() instead. */ - extern ASN1_API int - asn1_der_decoding_element (asn1_node * structure, - const char *elementName, - const void *ider, int len, - char *errorDescription) _ASN1_GCC_ATTR_DEPRECATED; - - extern ASN1_API int - asn1_der_decoding_startEnd (asn1_node element, - const void *ider, int len, - const char *name_element, - int *start, int *end); - - extern ASN1_API int - asn1_expand_any_defined_by (asn1_node definitions, asn1_node * element); - - extern ASN1_API int - asn1_expand_octet_string (asn1_node definitions, - asn1_node * element, - const char *octetName, const char *objectName); - - extern ASN1_API int - asn1_read_tag (asn1_node root, const char *name, - int *tagValue, int *classValue); - - extern ASN1_API const char *asn1_find_structure_from_oid (asn1_node - definitions, - const char - *oidValue); - - extern ASN1_API const char *asn1_check_version (const char *req_version); - - extern ASN1_API const char *asn1_strerror (int error); - - extern ASN1_API void asn1_perror (int error); - -#define ASN1_MAX_TAG_SIZE 4 -#define ASN1_MAX_LENGTH_SIZE 9 -#define ASN1_MAX_TL_SIZE (ASN1_MAX_TAG_SIZE+ASN1_MAX_LENGTH_SIZE) - extern ASN1_API long - asn1_get_length_der (const unsigned char *der, int der_len, int *len); - - extern ASN1_API long - asn1_get_length_ber (const unsigned char *ber, int ber_len, int *len); - - extern ASN1_API void - asn1_length_der (unsigned long int len, unsigned char *der, int *der_len); - - /* Other utility functions. */ - - extern ASN1_API - int asn1_decode_simple_der (unsigned int etype, const unsigned char *der, - unsigned int der_len, - const unsigned char **str, - unsigned int *str_len); - - extern ASN1_API - int asn1_decode_simple_ber (unsigned int etype, const unsigned char *der, - unsigned int der_len, - unsigned char **str, - unsigned int *str_len, - unsigned int *ber_len); - - extern ASN1_API int - asn1_encode_simple_der (unsigned int etype, const unsigned char *str, - unsigned int str_len, unsigned char *tl, - unsigned int *tl_len); - - extern ASN1_API asn1_node - asn1_find_node (asn1_node pointer, const char *name); - - extern ASN1_API int - asn1_copy_node (asn1_node dst, const char *dst_name, - asn1_node src, const char *src_name); - extern ASN1_API asn1_node - asn1_dup_node (asn1_node src, const char *src_name); - - /* Internal and low-level DER utility functions. */ - - extern ASN1_API int - asn1_get_tag_der (const unsigned char *der, int der_len, - unsigned char *cls, int *len, unsigned long *tag); - - extern ASN1_API void - asn1_octet_der (const unsigned char *str, int str_len, - unsigned char *der, int *der_len); - - extern ASN1_API int - asn1_get_octet_der (const unsigned char *der, int der_len, - int *ret_len, unsigned char *str, - int str_size, int *str_len); - - extern ASN1_API void asn1_bit_der (const unsigned char *str, int bit_len, - unsigned char *der, int *der_len); - - extern ASN1_API int - asn1_get_bit_der (const unsigned char *der, int der_len, - int *ret_len, unsigned char *str, - int str_size, int *bit_len); - - extern ASN1_API int - asn1_get_object_id_der (const unsigned char *der, - int der_len, int *ret_len, - char *str, int str_size); - -/* Compatibility types */ - - typedef int asn1_retCode; /* type returned by libtasn1 functions */ - -#define node_asn_struct asn1_node_st -#define node_asn asn1_node_st -#define ASN1_TYPE asn1_node -#define ASN1_TYPE_EMPTY NULL - -#define static_struct_asn asn1_static_node_st -#define ASN1_ARRAY_TYPE asn1_static_node -#define asn1_static_node_t asn1_static_node - -#define node_data_struct asn1_data_node_st -#define ASN1_DATA_NODE asn1_data_node_st - -#ifdef __cplusplus -} -#endif - -#endif /* LIBTASN1_H */ diff --git a/lib/libtasn1.map b/lib/libtasn1.map deleted file mode 100644 index 007925c..0000000 --- a/lib/libtasn1.map +++ /dev/null @@ -1,63 +0,0 @@ -# Copyright (C) 2009-2014 Free Software Foundation, Inc. -# -# This file is part of LIBTASN1. -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -LIBTASN1_0_3 -{ - global: - asn1_array2tree; - asn1_bit_der; - asn1_check_version; - asn1_copy_node; - asn1_create_element; - asn1_delete_element; - asn1_delete_structure; - asn1_der_coding; - asn1_der_decoding2; - asn1_der_decoding; - asn1_der_decoding_element; - asn1_der_decoding_startEnd; - asn1_expand_any_defined_by; - asn1_expand_octet_string; - asn1_find_node; - asn1_find_structure_from_oid; - asn1_get_bit_der; - asn1_get_length_ber; - asn1_get_length_der; - asn1_get_octet_der; - asn1_get_tag_der; - asn1_length_der; - asn1_number_of_elements; - asn1_octet_der; - asn1_parser2array; - asn1_parser2tree; - asn1_perror; - asn1_print_structure; - asn1_read_tag; - asn1_read_value; - asn1_strerror; - asn1_write_value; - asn1_read_node_value; - asn1_encode_simple_der; - asn1_decode_simple_der; - asn1_read_value_type; - asn1_delete_structure2; - asn1_dup_node; - asn1_decode_simple_ber; - asn1_get_object_id_der; - local: - *; -}; diff --git a/lib/libtasn1.pc.in b/lib/libtasn1.pc.in deleted file mode 100644 index 41e7584..0000000 --- a/lib/libtasn1.pc.in +++ /dev/null @@ -1,30 +0,0 @@ -# Copyright (C) 2005-2014 Free Software Foundation, Inc. -# -# This file is part of LIBTASN1. -# -# The LIBTASN1 library is free software; you can redistribute it -# and/or modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -# 02110-1301, USA - -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -includedir=@includedir@ - -Name: libtasn1 -Description: Library for ASN.1 and DER manipulation -URL: http://www.gnu.org/software/libtasn1/ -Version: @VERSION@ -Libs: -L${libdir} -ltasn1 -Cflags: -I${includedir} diff --git a/lib/parser_aux.c b/lib/parser_aux.c deleted file mode 100644 index 786ea64..0000000 --- a/lib/parser_aux.c +++ /dev/null @@ -1,1097 +0,0 @@ -/* - * Copyright (C) 2000-2016 Free Software Foundation, Inc. - * - * This file is part of LIBTASN1. - * - * The LIBTASN1 library is free software; you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA - */ - -#include -#include -#include "parser_aux.h" -#include "gstr.h" -#include "structure.h" -#include "element.h" - -char _asn1_identifierMissing[ASN1_MAX_NAME_SIZE + 1]; /* identifier name not found */ - -/***********************************************/ -/* Type: list_type */ -/* Description: type used in the list during */ -/* the structure creation. */ -/***********************************************/ -typedef struct list_struct -{ - asn1_node node; - struct list_struct *next; -} list_type; - - -/* Pointer to the first element of the list */ -list_type *firstElement = NULL; - -/******************************************************/ -/* Function : _asn1_add_static_node */ -/* Description: creates a new NODE_ASN element and */ -/* puts it in the list pointed by firstElement. */ -/* Parameters: */ -/* type: type of the new element (see ASN1_ETYPE_ */ -/* and CONST_ constants). */ -/* Return: pointer to the new element. */ -/******************************************************/ -asn1_node -_asn1_add_static_node (unsigned int type) -{ - list_type *listElement; - asn1_node punt; - - punt = calloc (1, sizeof (struct asn1_node_st)); - if (punt == NULL) - return NULL; - - listElement = malloc (sizeof (list_type)); - if (listElement == NULL) - { - free (punt); - return NULL; - } - - listElement->node = punt; - listElement->next = firstElement; - firstElement = listElement; - - punt->type = type; - - return punt; -} - -/** - * asn1_find_node: - * @pointer: NODE_ASN element pointer. - * @name: null terminated string with the element's name to find. - * - * Searches for an element called @name starting from @pointer. The - * name is composed by different identifiers separated by dots. When - * *@pointer has a name, the first identifier must be the name of - * *@pointer, otherwise it must be the name of one child of *@pointer. - * - * Returns: the search result, or %NULL if not found. - **/ -asn1_node -asn1_find_node (asn1_node pointer, const char *name) -{ - asn1_node p; - char *n_end, n[ASN1_MAX_NAME_SIZE + 1]; - const char *n_start; - unsigned int nsize; - unsigned int nhash; - - if (pointer == NULL) - return NULL; - - if (name == NULL) - return NULL; - - p = pointer; - n_start = name; - - if (name[0] == '?' && name[1] == 'C' && p->name[0] == '?') - { /* ?CURRENT */ - n_start = strchr(n_start, '.'); - if (n_start) - n_start++; - } - else if (p->name[0] != 0) - { /* has *pointer got a name ? */ - n_end = strchr (n_start, '.'); /* search the first dot */ - if (n_end) - { - nsize = n_end - n_start; - if (nsize >= sizeof(n)) - return NULL; - - memcpy (n, n_start, nsize); - n[nsize] = 0; - n_start = n_end; - n_start++; - - nhash = hash_pjw_bare (n, nsize); - } - else - { - nsize = _asn1_str_cpy (n, sizeof (n), n_start); - nhash = hash_pjw_bare (n, nsize); - - n_start = NULL; - } - - while (p) - { - if (nhash == p->name_hash && (!strcmp (p->name, n))) - break; - else - p = p->right; - } /* while */ - - if (p == NULL) - return NULL; - } - else - { /* *pointer doesn't have a name */ - if (n_start[0] == 0) - return p; - } - - while (n_start) - { /* Has the end of NAME been reached? */ - n_end = strchr (n_start, '.'); /* search the next dot */ - if (n_end) - { - nsize = n_end - n_start; - if (nsize >= sizeof(n)) - return NULL; - - memcpy (n, n_start, nsize); - n[nsize] = 0; - n_start = n_end; - n_start++; - - nhash = hash_pjw_bare (n, nsize); - } - else - { - nsize = _asn1_str_cpy (n, sizeof (n), n_start); - nhash = hash_pjw_bare (n, nsize); - n_start = NULL; - } - - if (p->down == NULL) - return NULL; - - p = p->down; - if (p == NULL) - return NULL; - - /* The identifier "?LAST" indicates the last element - in the right chain. */ - if (n[0] == '?' && n[1] == 'L') /* ?LAST */ - { - while (p->right) - p = p->right; - } - else - { /* no "?LAST" */ - while (p) - { - if (p->name_hash == nhash && !strcmp (p->name, n)) - break; - else - p = p->right; - } - } - if (p == NULL) - return NULL; - } /* while */ - - return p; -} - - -/******************************************************************/ -/* Function : _asn1_set_value */ -/* Description: sets the field VALUE in a NODE_ASN element. The */ -/* previous value (if exist) will be lost */ -/* Parameters: */ -/* node: element pointer. */ -/* value: pointer to the value that you want to set. */ -/* len: character number of value. */ -/* Return: pointer to the NODE_ASN element. */ -/******************************************************************/ -asn1_node -_asn1_set_value (asn1_node node, const void *value, unsigned int len) -{ - if (node == NULL) - return node; - if (node->value) - { - if (node->value != node->small_value) - free (node->value); - node->value = NULL; - node->value_len = 0; - } - - if (!len) - return node; - - if (len < sizeof (node->small_value)) - { - node->value = node->small_value; - } - else - { - node->value = malloc (len); - if (node->value == NULL) - return NULL; - } - node->value_len = len; - - memcpy (node->value, value, len); - return node; -} - -/******************************************************************/ -/* Function : _asn1_set_value_lv */ -/* Description: sets the field VALUE in a NODE_ASN element. The */ -/* previous value (if exist) will be lost. The value */ -/* given is stored as an length-value format (LV */ -/* Parameters: */ -/* node: element pointer. */ -/* value: pointer to the value that you want to set. */ -/* len: character number of value. */ -/* Return: pointer to the NODE_ASN element. */ -/******************************************************************/ -asn1_node -_asn1_set_value_lv (asn1_node node, const void *value, unsigned int len) -{ - int len2; - void *temp; - - if (node == NULL) - return node; - - asn1_length_der (len, NULL, &len2); - temp = malloc (len + len2); - if (temp == NULL) - return NULL; - - asn1_octet_der (value, len, temp, &len2); - return _asn1_set_value_m (node, temp, len2); -} - -/* the same as _asn1_set_value except that it sets an already malloc'ed - * value. - */ -asn1_node -_asn1_set_value_m (asn1_node node, void *value, unsigned int len) -{ - if (node == NULL) - return node; - - if (node->value) - { - if (node->value != node->small_value) - free (node->value); - node->value = NULL; - node->value_len = 0; - } - - if (!len) - return node; - - node->value = value; - node->value_len = len; - - return node; -} - -/******************************************************************/ -/* Function : _asn1_append_value */ -/* Description: appends to the field VALUE in a NODE_ASN element. */ -/* */ -/* Parameters: */ -/* node: element pointer. */ -/* value: pointer to the value that you want to be appended. */ -/* len: character number of value. */ -/* Return: pointer to the NODE_ASN element. */ -/******************************************************************/ -asn1_node -_asn1_append_value (asn1_node node, const void *value, unsigned int len) -{ - if (node == NULL) - return node; - - if (node->value == NULL) - return _asn1_set_value (node, value, len); - - if (len == 0) - return node; - - if (node->value == node->small_value) - { - /* value is in node */ - int prev_len = node->value_len; - node->value_len += len; - node->value = malloc (node->value_len); - if (node->value == NULL) - { - node->value_len = 0; - return NULL; - } - - if (prev_len > 0) - memcpy (node->value, node->small_value, prev_len); - - memcpy (&node->value[prev_len], value, len); - - return node; - } - else /* if (node->value != NULL && node->value != node->small_value) */ - { - /* value is allocated */ - int prev_len = node->value_len; - node->value_len += len; - - node->value = _asn1_realloc (node->value, node->value_len); - if (node->value == NULL) - { - node->value_len = 0; - return NULL; - } - - memcpy (&node->value[prev_len], value, len); - - return node; - } -} - -/******************************************************************/ -/* Function : _asn1_set_name */ -/* Description: sets the field NAME in a NODE_ASN element. The */ -/* previous value (if exist) will be lost */ -/* Parameters: */ -/* node: element pointer. */ -/* name: a null terminated string with the name that you want */ -/* to set. */ -/* Return: pointer to the NODE_ASN element. */ -/******************************************************************/ -asn1_node -_asn1_set_name (asn1_node node, const char *name) -{ - unsigned int nsize; - - if (node == NULL) - return node; - - if (name == NULL) - { - node->name[0] = 0; - node->name_hash = hash_pjw_bare (node->name, 0); - return node; - } - - nsize = _asn1_str_cpy (node->name, sizeof (node->name), name); - node->name_hash = hash_pjw_bare (node->name, nsize); - - return node; -} - -/******************************************************************/ -/* Function : _asn1_cpy_name */ -/* Description: copies the field NAME in a NODE_ASN element. */ -/* Parameters: */ -/* dst: a dest element pointer. */ -/* src: a source element pointer. */ -/* Return: pointer to the NODE_ASN element. */ -/******************************************************************/ -asn1_node -_asn1_cpy_name (asn1_node dst, asn1_node src) -{ - if (dst == NULL) - return dst; - - if (src == NULL) - { - dst->name[0] = 0; - dst->name_hash = hash_pjw_bare (dst->name, 0); - return dst; - } - - _asn1_str_cpy (dst->name, sizeof (dst->name), src->name); - dst->name_hash = src->name_hash; - - return dst; -} - -/******************************************************************/ -/* Function : _asn1_set_right */ -/* Description: sets the field RIGHT in a NODE_ASN element. */ -/* Parameters: */ -/* node: element pointer. */ -/* right: pointer to a NODE_ASN element that you want be pointed*/ -/* by NODE. */ -/* Return: pointer to *NODE. */ -/******************************************************************/ -asn1_node -_asn1_set_right (asn1_node node, asn1_node right) -{ - if (node == NULL) - return node; - node->right = right; - if (right) - right->left = node; - return node; -} - - -/******************************************************************/ -/* Function : _asn1_get_last_right */ -/* Description: return the last element along the right chain. */ -/* Parameters: */ -/* node: starting element pointer. */ -/* Return: pointer to the last element along the right chain. */ -/******************************************************************/ -asn1_node -_asn1_get_last_right (asn1_node node) -{ - asn1_node p; - - if (node == NULL) - return NULL; - p = node; - while (p->right) - p = p->right; - return p; -} - -/******************************************************************/ -/* Function : _asn1_remove_node */ -/* Description: gets free the memory allocated for an NODE_ASN */ -/* element (not the elements pointed by it). */ -/* Parameters: */ -/* node: NODE_ASN element pointer. */ -/* flags: ASN1_DELETE_FLAG_* */ -/******************************************************************/ -void -_asn1_remove_node (asn1_node node, unsigned int flags) -{ - if (node == NULL) - return; - - if (node->value != NULL) - { - if (flags & ASN1_DELETE_FLAG_ZEROIZE) - { - safe_memset(node->value, 0, node->value_len); - } - - if (node->value != node->small_value) - free (node->value); - } - free (node); -} - -/******************************************************************/ -/* Function : _asn1_find_up */ -/* Description: return the father of the NODE_ASN element. */ -/* Parameters: */ -/* node: NODE_ASN element pointer. */ -/* Return: Null if not found. */ -/******************************************************************/ -asn1_node -_asn1_find_up (asn1_node node) -{ - asn1_node p; - - if (node == NULL) - return NULL; - - p = node; - - while ((p->left != NULL) && (p->left->right == p)) - p = p->left; - - return p->left; -} - -/******************************************************************/ -/* Function : _asn1_delete_list */ -/* Description: deletes the list elements (not the elements */ -/* pointed by them). */ -/******************************************************************/ -void -_asn1_delete_list (void) -{ - list_type *listElement; - - while (firstElement) - { - listElement = firstElement; - firstElement = firstElement->next; - free (listElement); - } -} - -/******************************************************************/ -/* Function : _asn1_delete_list_and nodes */ -/* Description: deletes the list elements and the elements */ -/* pointed by them. */ -/******************************************************************/ -void -_asn1_delete_list_and_nodes (void) -{ - list_type *listElement; - - while (firstElement) - { - listElement = firstElement; - firstElement = firstElement->next; - _asn1_remove_node (listElement->node, 0); - free (listElement); - } -} - - -char * -_asn1_ltostr (int64_t v, char str[LTOSTR_MAX_SIZE]) -{ - uint64_t d, r; - char temp[LTOSTR_MAX_SIZE]; - int count, k, start; - uint64_t val; - - if (v < 0) - { - str[0] = '-'; - start = 1; - val = -((uint64_t)v); - } - else - { - val = v; - start = 0; - } - - count = 0; - do - { - d = val / 10; - r = val - d * 10; - temp[start + count] = '0' + (char) r; - count++; - val = d; - } - while (val && ((start+count) < LTOSTR_MAX_SIZE-1)); - - for (k = 0; k < count; k++) - str[k + start] = temp[start + count - k - 1]; - str[count + start] = 0; - return str; -} - - -/******************************************************************/ -/* Function : _asn1_change_integer_value */ -/* Description: converts into DER coding the value assign to an */ -/* INTEGER constant. */ -/* Parameters: */ -/* node: root of an ASN1element. */ -/* Return: */ -/* ASN1_ELEMENT_NOT_FOUND if NODE is NULL, */ -/* otherwise ASN1_SUCCESS */ -/******************************************************************/ -int -_asn1_change_integer_value (asn1_node node) -{ - asn1_node p; - unsigned char val[SIZEOF_UNSIGNED_LONG_INT]; - unsigned char val2[SIZEOF_UNSIGNED_LONG_INT + 1]; - int len; - - if (node == NULL) - return ASN1_ELEMENT_NOT_FOUND; - - p = node; - while (p) - { - if ((type_field (p->type) == ASN1_ETYPE_INTEGER) - && (p->type & CONST_ASSIGN)) - { - if (p->value) - { - _asn1_convert_integer (p->value, val, sizeof (val), &len); - asn1_octet_der (val, len, val2, &len); - _asn1_set_value (p, val2, len); - } - } - - if (p->down) - { - p = p->down; - } - else - { - if (p == node) - p = NULL; - else if (p->right) - p = p->right; - else - { - while (1) - { - p = _asn1_find_up (p); - if (p == node) - { - p = NULL; - break; - } - if (p && p->right) - { - p = p->right; - break; - } - } - } - } - } - - return ASN1_SUCCESS; -} - - -/******************************************************************/ -/* Function : _asn1_expand_object_id */ -/* Description: expand the IDs of an OBJECT IDENTIFIER constant. */ -/* Parameters: */ -/* node: root of an ASN1 element. */ -/* Return: */ -/* ASN1_ELEMENT_NOT_FOUND if NODE is NULL, */ -/* otherwise ASN1_SUCCESS */ -/******************************************************************/ -int -_asn1_expand_object_id (asn1_node node) -{ - asn1_node p, p2, p3, p4, p5; - char name_root[ASN1_MAX_NAME_SIZE], name2[2 * ASN1_MAX_NAME_SIZE + 1]; - int move, tlen; - - if (node == NULL) - return ASN1_ELEMENT_NOT_FOUND; - - _asn1_str_cpy (name_root, sizeof (name_root), node->name); - - p = node; - move = DOWN; - - while (!((p == node) && (move == UP))) - { - if (move != UP) - { - if ((type_field (p->type) == ASN1_ETYPE_OBJECT_ID) - && (p->type & CONST_ASSIGN)) - { - p2 = p->down; - if (p2 && (type_field (p2->type) == ASN1_ETYPE_CONSTANT)) - { - if (p2->value && !isdigit (p2->value[0])) - { - _asn1_str_cpy (name2, sizeof (name2), name_root); - _asn1_str_cat (name2, sizeof (name2), "."); - _asn1_str_cat (name2, sizeof (name2), - (char *) p2->value); - p3 = asn1_find_node (node, name2); - if (!p3 - || (type_field (p3->type) != ASN1_ETYPE_OBJECT_ID) - || !(p3->type & CONST_ASSIGN)) - return ASN1_ELEMENT_NOT_FOUND; - _asn1_set_down (p, p2->right); - _asn1_remove_node (p2, 0); - p2 = p; - p4 = p3->down; - while (p4) - { - if (type_field (p4->type) == ASN1_ETYPE_CONSTANT) - { - p5 = - _asn1_add_single_node (ASN1_ETYPE_CONSTANT); - _asn1_set_name (p5, p4->name); - if (p4->value) - { - tlen = _asn1_strlen (p4->value); - if (tlen > 0) - _asn1_set_value (p5, p4->value, tlen + 1); - } - if (p2 == p) - { - _asn1_set_right (p5, p->down); - _asn1_set_down (p, p5); - } - else - { - _asn1_set_right (p5, p2->right); - _asn1_set_right (p2, p5); - } - p2 = p5; - } - p4 = p4->right; - } - move = DOWN; - continue; - } - } - } - move = DOWN; - } - else - move = RIGHT; - - if (move == DOWN) - { - if (p->down) - p = p->down; - else - move = RIGHT; - } - - if (p == node) - { - move = UP; - continue; - } - - if (move == RIGHT) - { - if (p && p->right) - p = p->right; - else - move = UP; - } - if (move == UP) - p = _asn1_find_up (p); - } - - - /*******************************/ - /* expand DEFAULT */ - /*******************************/ - p = node; - move = DOWN; - - while (!((p == node) && (move == UP))) - { - if (move != UP) - { - if ((type_field (p->type) == ASN1_ETYPE_OBJECT_ID) && - (p->type & CONST_DEFAULT)) - { - p2 = p->down; - if (p2 && (type_field (p2->type) == ASN1_ETYPE_DEFAULT)) - { - _asn1_str_cpy (name2, sizeof (name2), name_root); - _asn1_str_cat (name2, sizeof (name2), "."); - _asn1_str_cat (name2, sizeof (name2), (char *) p2->value); - p3 = asn1_find_node (node, name2); - if (!p3 || (type_field (p3->type) != ASN1_ETYPE_OBJECT_ID) - || !(p3->type & CONST_ASSIGN)) - return ASN1_ELEMENT_NOT_FOUND; - p4 = p3->down; - name2[0] = 0; - while (p4) - { - if (type_field (p4->type) == ASN1_ETYPE_CONSTANT) - { - if (p4->value == NULL) - return ASN1_VALUE_NOT_FOUND; - - if (name2[0]) - _asn1_str_cat (name2, sizeof (name2), "."); - _asn1_str_cat (name2, sizeof (name2), - (char *) p4->value); - } - p4 = p4->right; - } - tlen = strlen (name2); - if (tlen > 0) - _asn1_set_value (p2, name2, tlen + 1); - } - } - move = DOWN; - } - else - move = RIGHT; - - if (move == DOWN) - { - if (p->down) - p = p->down; - else - move = RIGHT; - } - - if (p == node) - { - move = UP; - continue; - } - - if (move == RIGHT) - { - if (p && p->right) - p = p->right; - else - move = UP; - } - if (move == UP) - p = _asn1_find_up (p); - } - - return ASN1_SUCCESS; -} - - -/******************************************************************/ -/* Function : _asn1_type_set_config */ -/* Description: sets the CONST_SET and CONST_NOT_USED properties */ -/* in the fields of the SET elements. */ -/* Parameters: */ -/* node: root of an ASN1 element. */ -/* Return: */ -/* ASN1_ELEMENT_NOT_FOUND if NODE is NULL, */ -/* otherwise ASN1_SUCCESS */ -/******************************************************************/ -int -_asn1_type_set_config (asn1_node node) -{ - asn1_node p, p2; - int move; - - if (node == NULL) - return ASN1_ELEMENT_NOT_FOUND; - - p = node; - move = DOWN; - - while (!((p == node) && (move == UP))) - { - if (move != UP) - { - if (type_field (p->type) == ASN1_ETYPE_SET) - { - p2 = p->down; - while (p2) - { - if (type_field (p2->type) != ASN1_ETYPE_TAG) - p2->type |= CONST_SET | CONST_NOT_USED; - p2 = p2->right; - } - } - move = DOWN; - } - else - move = RIGHT; - - if (move == DOWN) - { - if (p->down) - p = p->down; - else - move = RIGHT; - } - - if (p == node) - { - move = UP; - continue; - } - - if (move == RIGHT) - { - if (p && p->right) - p = p->right; - else - move = UP; - } - if (move == UP) - p = _asn1_find_up (p); - } - - return ASN1_SUCCESS; -} - - -/******************************************************************/ -/* Function : _asn1_check_identifier */ -/* Description: checks the definitions of all the identifiers */ -/* and the first element of an OBJECT_ID (e.g. {pkix 0 4}). */ -/* The _asn1_identifierMissing global variable is filled if */ -/* necessary. */ -/* Parameters: */ -/* node: root of an ASN1 element. */ -/* Return: */ -/* ASN1_ELEMENT_NOT_FOUND if NODE is NULL, */ -/* ASN1_IDENTIFIER_NOT_FOUND if an identifier is not defined, */ -/* otherwise ASN1_SUCCESS */ -/******************************************************************/ -int -_asn1_check_identifier (asn1_node node) -{ - asn1_node p, p2; - char name2[ASN1_MAX_NAME_SIZE * 2 + 2]; - - if (node == NULL) - return ASN1_ELEMENT_NOT_FOUND; - - p = node; - while (p) - { - if (p->value && type_field (p->type) == ASN1_ETYPE_IDENTIFIER) - { - _asn1_str_cpy (name2, sizeof (name2), node->name); - _asn1_str_cat (name2, sizeof (name2), "."); - _asn1_str_cat (name2, sizeof (name2), (char *) p->value); - p2 = asn1_find_node (node, name2); - if (p2 == NULL) - { - if (p->value) - _asn1_str_cpy (_asn1_identifierMissing, sizeof(_asn1_identifierMissing), (char*)p->value); - else - _asn1_strcpy (_asn1_identifierMissing, "(null)"); - return ASN1_IDENTIFIER_NOT_FOUND; - } - } - else if ((type_field (p->type) == ASN1_ETYPE_OBJECT_ID) && - (p->type & CONST_DEFAULT)) - { - p2 = p->down; - if (p2 && (type_field (p2->type) == ASN1_ETYPE_DEFAULT)) - { - _asn1_str_cpy (name2, sizeof (name2), node->name); - if (p2->value) - { - _asn1_str_cat (name2, sizeof (name2), "."); - _asn1_str_cat (name2, sizeof (name2), (char *) p2->value); - _asn1_str_cpy (_asn1_identifierMissing, sizeof(_asn1_identifierMissing), (char*)p2->value); - } - else - _asn1_strcpy (_asn1_identifierMissing, "(null)"); - - p2 = asn1_find_node (node, name2); - if (!p2 || (type_field (p2->type) != ASN1_ETYPE_OBJECT_ID) || - !(p2->type & CONST_ASSIGN)) - return ASN1_IDENTIFIER_NOT_FOUND; - else - _asn1_identifierMissing[0] = 0; - } - } - else if ((type_field (p->type) == ASN1_ETYPE_OBJECT_ID) && - (p->type & CONST_ASSIGN)) - { - p2 = p->down; - if (p2 && (type_field (p2->type) == ASN1_ETYPE_CONSTANT)) - { - if (p2->value && !isdigit (p2->value[0])) - { - _asn1_str_cpy (name2, sizeof (name2), node->name); - _asn1_str_cat (name2, sizeof (name2), "."); - _asn1_str_cat (name2, sizeof (name2), (char *) p2->value); - _asn1_str_cpy (_asn1_identifierMissing, sizeof(_asn1_identifierMissing), (char*)p2->value); - - p2 = asn1_find_node (node, name2); - if (!p2 || (type_field (p2->type) != ASN1_ETYPE_OBJECT_ID) - || !(p2->type & CONST_ASSIGN)) - return ASN1_IDENTIFIER_NOT_FOUND; - else - _asn1_identifierMissing[0] = 0; - } - } - } - - if (p->down) - { - p = p->down; - } - else if (p->right) - p = p->right; - else - { - while (1) - { - p = _asn1_find_up (p); - if (p == node) - { - p = NULL; - break; - } - if (p && p->right) - { - p = p->right; - break; - } - } - } - } - - return ASN1_SUCCESS; -} - - -/******************************************************************/ -/* Function : _asn1_set_default_tag */ -/* Description: sets the default IMPLICIT or EXPLICIT property in */ -/* the tagged elements that don't have this declaration. */ -/* Parameters: */ -/* node: pointer to a DEFINITIONS element. */ -/* Return: */ -/* ASN1_ELEMENT_NOT_FOUND if NODE is NULL or not a pointer to */ -/* a DEFINITIONS element, */ -/* otherwise ASN1_SUCCESS */ -/******************************************************************/ -int -_asn1_set_default_tag (asn1_node node) -{ - asn1_node p; - - if ((node == NULL) || (type_field (node->type) != ASN1_ETYPE_DEFINITIONS)) - return ASN1_ELEMENT_NOT_FOUND; - - p = node; - while (p) - { - if ((type_field (p->type) == ASN1_ETYPE_TAG) && - !(p->type & CONST_EXPLICIT) && !(p->type & CONST_IMPLICIT)) - { - if (node->type & CONST_EXPLICIT) - p->type |= CONST_EXPLICIT; - else - p->type |= CONST_IMPLICIT; - } - - if (p->down) - { - p = p->down; - } - else if (p->right) - p = p->right; - else - { - while (1) - { - p = _asn1_find_up (p); - if (p == node) - { - p = NULL; - break; - } - if (p && p->right) - { - p = p->right; - break; - } - } - } - } - - return ASN1_SUCCESS; -} diff --git a/lib/parser_aux.h b/lib/parser_aux.h deleted file mode 100644 index 9f91833..0000000 --- a/lib/parser_aux.h +++ /dev/null @@ -1,158 +0,0 @@ -/* - * Copyright (C) 2000-2014 Free Software Foundation, Inc. - * - * This file is part of LIBTASN1. - * - * The LIBTASN1 library is free software; you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA - */ - -#ifndef _PARSER_AUX_H -#define _PARSER_AUX_H - -/***************************************/ -/* Functions used by ASN.1 parser */ -/***************************************/ -asn1_node _asn1_add_static_node (unsigned int type); - -asn1_node -_asn1_set_value (asn1_node node, const void *value, unsigned int len); - -asn1_node _asn1_set_value_m (asn1_node node, void *value, unsigned int len); - -asn1_node -_asn1_set_value_lv (asn1_node node, const void *value, unsigned int len); - -asn1_node -_asn1_append_value (asn1_node node, const void *value, unsigned int len); - -asn1_node _asn1_set_name (asn1_node node, const char *name); - -asn1_node _asn1_cpy_name (asn1_node dst, asn1_node src); - -asn1_node _asn1_set_right (asn1_node node, asn1_node right); - -asn1_node _asn1_get_last_right (asn1_node node); - -void _asn1_remove_node (asn1_node node, unsigned int flags); - -void _asn1_delete_list (void); - -void _asn1_delete_list_and_nodes (void); - -/* Max 64-bit integer length is 20 chars + 1 for sign + 1 for null termination */ -#define LTOSTR_MAX_SIZE 22 -char *_asn1_ltostr (int64_t v, char str[LTOSTR_MAX_SIZE]); - -asn1_node _asn1_find_up (asn1_node node); - -int _asn1_change_integer_value (asn1_node node); - -int _asn1_expand_object_id (asn1_node node); - -int _asn1_type_set_config (asn1_node node); - -int _asn1_check_identifier (asn1_node node); - -int _asn1_set_default_tag (asn1_node node); - -/******************************************************************/ -/* Function : _asn1_get_right */ -/* Description: returns the element pointed by the RIGHT field of */ -/* a NODE_ASN element. */ -/* Parameters: */ -/* node: NODE_ASN element pointer. */ -/* Return: field RIGHT of NODE. */ -/******************************************************************/ -inline static asn1_node -_asn1_get_right (asn1_node node) -{ - if (node == NULL) - return NULL; - return node->right; -} - -/******************************************************************/ -/* Function : _asn1_set_down */ -/* Description: sets the field DOWN in a NODE_ASN element. */ -/* Parameters: */ -/* node: element pointer. */ -/* down: pointer to a NODE_ASN element that you want be pointed */ -/* by NODE. */ -/* Return: pointer to *NODE. */ -/******************************************************************/ -inline static asn1_node -_asn1_set_down (asn1_node node, asn1_node down) -{ - if (node == NULL) - return node; - node->down = down; - if (down) - down->left = node; - return node; -} - -/******************************************************************/ -/* Function : _asn1_get_down */ -/* Description: returns the element pointed by the DOWN field of */ -/* a NODE_ASN element. */ -/* Parameters: */ -/* node: NODE_ASN element pointer. */ -/* Return: field DOWN of NODE. */ -/******************************************************************/ -inline static asn1_node -_asn1_get_down (asn1_node node) -{ - if (node == NULL) - return NULL; - return node->down; -} - -/******************************************************************/ -/* Function : _asn1_get_name */ -/* Description: returns the name of a NODE_ASN element. */ -/* Parameters: */ -/* node: NODE_ASN element pointer. */ -/* Return: a null terminated string. */ -/******************************************************************/ -inline static char * -_asn1_get_name (asn1_node node) -{ - if (node == NULL) - return NULL; - return node->name; -} - -/******************************************************************/ -/* Function : _asn1_mod_type */ -/* Description: change the field TYPE of an NODE_ASN element. */ -/* The new value is the old one | (bitwise or) the */ -/* paramener VALUE. */ -/* Parameters: */ -/* node: NODE_ASN element pointer. */ -/* value: the integer value that must be or-ed with the current */ -/* value of field TYPE. */ -/* Return: NODE pointer. */ -/******************************************************************/ -inline static asn1_node -_asn1_mod_type (asn1_node node, unsigned int value) -{ - if (node == NULL) - return node; - node->type |= value; - return node; -} - -#endif diff --git a/lib/structure.c b/lib/structure.c deleted file mode 100644 index 01715b1..0000000 --- a/lib/structure.c +++ /dev/null @@ -1,1197 +0,0 @@ -/* - * Copyright (C) 2002-2014 Free Software Foundation, Inc. - * - * This file is part of LIBTASN1. - * - * The LIBTASN1 library is free software; you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA - */ - - -/*****************************************************/ -/* File: structure.c */ -/* Description: Functions to create and delete an */ -/* ASN1 tree. */ -/*****************************************************/ - - -#include -#include -#include "parser_aux.h" -#include - - -extern char _asn1_identifierMissing[]; - - -/******************************************************/ -/* Function : _asn1_add_single_node */ -/* Description: creates a new NODE_ASN element. */ -/* Parameters: */ -/* type: type of the new element (see ASN1_ETYPE_ */ -/* and CONST_ constants). */ -/* Return: pointer to the new element. */ -/******************************************************/ -asn1_node -_asn1_add_single_node (unsigned int type) -{ - asn1_node punt; - - punt = calloc (1, sizeof (struct asn1_node_st)); - if (punt == NULL) - return NULL; - - punt->type = type; - - return punt; -} - - -/******************************************************************/ -/* Function : _asn1_find_left */ -/* Description: returns the NODE_ASN element with RIGHT field that*/ -/* points the element NODE. */ -/* Parameters: */ -/* node: NODE_ASN element pointer. */ -/* Return: NULL if not found. */ -/******************************************************************/ -asn1_node -_asn1_find_left (asn1_node node) -{ - if ((node == NULL) || (node->left == NULL) || (node->left->down == node)) - return NULL; - - return node->left; -} - - -int -_asn1_create_static_structure (asn1_node pointer, char *output_file_name, - char *vector_name) -{ - FILE *file; - asn1_node p; - unsigned long t; - - file = fopen (output_file_name, "w"); - - if (file == NULL) - return ASN1_FILE_NOT_FOUND; - - fprintf (file, "#if HAVE_CONFIG_H\n"); - fprintf (file, "# include \"config.h\"\n"); - fprintf (file, "#endif\n\n"); - - fprintf (file, "#include \n\n"); - - fprintf (file, "const asn1_static_node %s[] = {\n", vector_name); - - p = pointer; - - while (p) - { - fprintf (file, " { "); - - if (p->name[0] != 0) - fprintf (file, "\"%s\", ", p->name); - else - fprintf (file, "NULL, "); - - t = p->type; - if (p->down) - t |= CONST_DOWN; - if (p->right) - t |= CONST_RIGHT; - - fprintf (file, "%lu, ", t); - - if (p->value) - fprintf (file, "\"%s\"},\n", p->value); - else - fprintf (file, "NULL },\n"); - - if (p->down) - { - p = p->down; - } - else if (p->right) - { - p = p->right; - } - else - { - while (1) - { - p = _asn1_find_up (p); - if (p == pointer) - { - p = NULL; - break; - } - if (p->right) - { - p = p->right; - break; - } - } - } - } - - fprintf (file, " { NULL, 0, NULL }\n};\n"); - - fclose (file); - - return ASN1_SUCCESS; -} - - -/** - * asn1_array2tree: - * @array: specify the array that contains ASN.1 declarations - * @definitions: return the pointer to the structure created by - * *ARRAY ASN.1 declarations - * @errorDescription: return the error description. - * - * Creates the structures needed to manage the ASN.1 definitions. - * @array is a vector created by asn1_parser2array(). - * - * Returns: %ASN1_SUCCESS if structure was created correctly, - * %ASN1_ELEMENT_NOT_EMPTY if *@definitions not NULL, - * %ASN1_IDENTIFIER_NOT_FOUND if in the file there is an identifier - * that is not defined (see @errorDescription for more information), - * %ASN1_ARRAY_ERROR if the array pointed by @array is wrong. - **/ -int -asn1_array2tree (const asn1_static_node * array, asn1_node * definitions, - char *errorDescription) -{ - asn1_node p, p_last = NULL; - unsigned long k; - int move; - int result; - unsigned int type; - - if (errorDescription) - errorDescription[0] = 0; - - if (*definitions != NULL) - return ASN1_ELEMENT_NOT_EMPTY; - - move = UP; - - k = 0; - while (array[k].value || array[k].type || array[k].name) - { - type = convert_old_type (array[k].type); - - p = _asn1_add_static_node (type & (~CONST_DOWN)); - if (array[k].name) - _asn1_set_name (p, array[k].name); - if (array[k].value) - _asn1_set_value (p, array[k].value, strlen (array[k].value) + 1); - - if (*definitions == NULL) - *definitions = p; - - if (move == DOWN) - _asn1_set_down (p_last, p); - else if (move == RIGHT) - _asn1_set_right (p_last, p); - - p_last = p; - - if (type & CONST_DOWN) - move = DOWN; - else if (type & CONST_RIGHT) - move = RIGHT; - else - { - while (1) - { - if (p_last == *definitions) - break; - - p_last = _asn1_find_up (p_last); - - if (p_last == NULL) - break; - - if (p_last->type & CONST_RIGHT) - { - p_last->type &= ~CONST_RIGHT; - move = RIGHT; - break; - } - } /* while */ - } - k++; - } /* while */ - - if (p_last == *definitions) - { - result = _asn1_check_identifier (*definitions); - if (result == ASN1_SUCCESS) - { - _asn1_change_integer_value (*definitions); - _asn1_expand_object_id (*definitions); - } - } - else - { - result = ASN1_ARRAY_ERROR; - } - - if (errorDescription != NULL) - { - if (result == ASN1_IDENTIFIER_NOT_FOUND) - { - Estrcpy (errorDescription, ":: identifier '"); - Estrcat (errorDescription, _asn1_identifierMissing); - Estrcat (errorDescription, "' not found"); - } - else - errorDescription[0] = 0; - } - - if (result != ASN1_SUCCESS) - { - _asn1_delete_list_and_nodes (); - *definitions = NULL; - } - else - _asn1_delete_list (); - - return result; -} - -/** - * asn1_delete_structure: - * @structure: pointer to the structure that you want to delete. - * - * Deletes the structure *@structure. At the end, *@structure is set - * to NULL. - * - * Returns: %ASN1_SUCCESS if successful, %ASN1_ELEMENT_NOT_FOUND if - * *@structure was NULL. - **/ -int -asn1_delete_structure (asn1_node * structure) -{ - return asn1_delete_structure2(structure, 0); -} - -/** - * asn1_delete_structure2: - * @structure: pointer to the structure that you want to delete. - * @flags: additional flags (see %ASN1_DELETE_FLAG) - * - * Deletes the structure *@structure. At the end, *@structure is set - * to NULL. - * - * Returns: %ASN1_SUCCESS if successful, %ASN1_ELEMENT_NOT_FOUND if - * *@structure was NULL. - **/ -int -asn1_delete_structure2 (asn1_node * structure, unsigned int flags) -{ - asn1_node p, p2, p3; - - if (*structure == NULL) - return ASN1_ELEMENT_NOT_FOUND; - - p = *structure; - while (p) - { - if (p->down) - { - p = p->down; - } - else - { /* no down */ - p2 = p->right; - if (p != *structure) - { - p3 = _asn1_find_up (p); - _asn1_set_down (p3, p2); - _asn1_remove_node (p, flags); - p = p3; - } - else - { /* p==root */ - p3 = _asn1_find_left (p); - if (!p3) - { - p3 = _asn1_find_up (p); - if (p3) - _asn1_set_down (p3, p2); - else - { - if (p->right) - p->right->left = NULL; - } - } - else - _asn1_set_right (p3, p2); - _asn1_remove_node (p, flags); - p = NULL; - } - } - } - - *structure = NULL; - return ASN1_SUCCESS; -} - - - -/** - * asn1_delete_element: - * @structure: pointer to the structure that contains the element you - * want to delete. - * @element_name: element's name you want to delete. - * - * Deletes the element named *@element_name inside *@structure. - * - * Returns: %ASN1_SUCCESS if successful, %ASN1_ELEMENT_NOT_FOUND if - * the @element_name was not found. - **/ -int -asn1_delete_element (asn1_node structure, const char *element_name) -{ - asn1_node p2, p3, source_node; - - source_node = asn1_find_node (structure, element_name); - - if (source_node == NULL) - return ASN1_ELEMENT_NOT_FOUND; - - p2 = source_node->right; - p3 = _asn1_find_left (source_node); - if (!p3) - { - p3 = _asn1_find_up (source_node); - if (p3) - _asn1_set_down (p3, p2); - else if (source_node->right) - source_node->right->left = NULL; - } - else - _asn1_set_right (p3, p2); - - return asn1_delete_structure (&source_node); -} - -asn1_node -_asn1_copy_structure3 (asn1_node source_node) -{ - asn1_node dest_node, p_s, p_d, p_d_prev; - int move; - - if (source_node == NULL) - return NULL; - - dest_node = _asn1_add_single_node (source_node->type); - - p_s = source_node; - p_d = dest_node; - - move = DOWN; - - do - { - if (move != UP) - { - if (p_s->name[0] != 0) - _asn1_cpy_name (p_d, p_s); - if (p_s->value) - _asn1_set_value (p_d, p_s->value, p_s->value_len); - if (p_s->down) - { - p_s = p_s->down; - p_d_prev = p_d; - p_d = _asn1_add_single_node (p_s->type); - _asn1_set_down (p_d_prev, p_d); - continue; - } - p_d->start = p_s->start; - p_d->end = p_s->end; - } - - if (p_s == source_node) - break; - - if (p_s->right) - { - move = RIGHT; - p_s = p_s->right; - p_d_prev = p_d; - p_d = _asn1_add_single_node (p_s->type); - _asn1_set_right (p_d_prev, p_d); - } - else - { - move = UP; - p_s = _asn1_find_up (p_s); - p_d = _asn1_find_up (p_d); - } - } - while (p_s != source_node); - - return dest_node; -} - - -static asn1_node -_asn1_copy_structure2 (asn1_node root, const char *source_name) -{ - asn1_node source_node; - - source_node = asn1_find_node (root, source_name); - - return _asn1_copy_structure3 (source_node); - -} - - -static int -_asn1_type_choice_config (asn1_node node) -{ - asn1_node p, p2, p3, p4; - int move, tlen; - - if (node == NULL) - return ASN1_ELEMENT_NOT_FOUND; - - p = node; - move = DOWN; - - while (!((p == node) && (move == UP))) - { - if (move != UP) - { - if ((type_field (p->type) == ASN1_ETYPE_CHOICE) - && (p->type & CONST_TAG)) - { - p2 = p->down; - while (p2) - { - if (type_field (p2->type) != ASN1_ETYPE_TAG) - { - p2->type |= CONST_TAG; - p3 = _asn1_find_left (p2); - while (p3) - { - if (type_field (p3->type) == ASN1_ETYPE_TAG) - { - p4 = _asn1_add_single_node (p3->type); - tlen = _asn1_strlen (p3->value); - if (tlen > 0) - _asn1_set_value (p4, p3->value, tlen + 1); - _asn1_set_right (p4, p2->down); - _asn1_set_down (p2, p4); - } - p3 = _asn1_find_left (p3); - } - } - p2 = p2->right; - } - p->type &= ~(CONST_TAG); - p2 = p->down; - while (p2) - { - p3 = p2->right; - if (type_field (p2->type) == ASN1_ETYPE_TAG) - asn1_delete_structure (&p2); - p2 = p3; - } - } - move = DOWN; - } - else - move = RIGHT; - - if (move == DOWN) - { - if (p->down) - p = p->down; - else - move = RIGHT; - } - - if (p == node) - { - move = UP; - continue; - } - - if (move == RIGHT) - { - if (p->right) - p = p->right; - else - move = UP; - } - if (move == UP) - p = _asn1_find_up (p); - } - - return ASN1_SUCCESS; -} - - -static int -_asn1_expand_identifier (asn1_node * node, asn1_node root) -{ - asn1_node p, p2, p3; - char name2[ASN1_MAX_NAME_SIZE + 2]; - int move; - - if (node == NULL) - return ASN1_ELEMENT_NOT_FOUND; - - p = *node; - move = DOWN; - - while (!((p == *node) && (move == UP))) - { - if (move != UP) - { - if (type_field (p->type) == ASN1_ETYPE_IDENTIFIER) - { - snprintf (name2, sizeof (name2), "%s.%s", root->name, p->value); - p2 = _asn1_copy_structure2 (root, name2); - if (p2 == NULL) - { - return ASN1_IDENTIFIER_NOT_FOUND; - } - _asn1_cpy_name (p2, p); - p2->right = p->right; - p2->left = p->left; - if (p->right) - p->right->left = p2; - p3 = p->down; - if (p3) - { - while (p3->right) - p3 = p3->right; - _asn1_set_right (p3, p2->down); - _asn1_set_down (p2, p->down); - } - - p3 = _asn1_find_left (p); - if (p3) - _asn1_set_right (p3, p2); - else - { - p3 = _asn1_find_up (p); - if (p3) - _asn1_set_down (p3, p2); - else - { - p2->left = NULL; - } - } - - if (p->type & CONST_SIZE) - p2->type |= CONST_SIZE; - if (p->type & CONST_TAG) - p2->type |= CONST_TAG; - if (p->type & CONST_OPTION) - p2->type |= CONST_OPTION; - if (p->type & CONST_DEFAULT) - p2->type |= CONST_DEFAULT; - if (p->type & CONST_SET) - p2->type |= CONST_SET; - if (p->type & CONST_NOT_USED) - p2->type |= CONST_NOT_USED; - - if (p == *node) - *node = p2; - _asn1_remove_node (p, 0); - p = p2; - move = DOWN; - continue; - } - move = DOWN; - } - else - move = RIGHT; - - if (move == DOWN) - { - if (p->down) - p = p->down; - else - move = RIGHT; - } - - if (p == *node) - { - move = UP; - continue; - } - - if (move == RIGHT) - { - if (p->right) - p = p->right; - else - move = UP; - } - if (move == UP) - p = _asn1_find_up (p); - } - - return ASN1_SUCCESS; -} - - -/** - * asn1_create_element: - * @definitions: pointer to the structure returned by "parser_asn1" function - * @source_name: the name of the type of the new structure (must be - * inside p_structure). - * @element: pointer to the structure created. - * - * Creates a structure of type @source_name. Example using - * "pkix.asn": - * - * rc = asn1_create_element(cert_def, "PKIX1.Certificate", certptr); - * - * Returns: %ASN1_SUCCESS if creation OK, %ASN1_ELEMENT_NOT_FOUND if - * @source_name is not known. - **/ -int -asn1_create_element (asn1_node definitions, const char *source_name, - asn1_node * element) -{ - asn1_node dest_node; - int res; - - dest_node = _asn1_copy_structure2 (definitions, source_name); - - if (dest_node == NULL) - return ASN1_ELEMENT_NOT_FOUND; - - _asn1_set_name (dest_node, ""); - - res = _asn1_expand_identifier (&dest_node, definitions); - _asn1_type_choice_config (dest_node); - - *element = dest_node; - - return res; -} - - -/** - * asn1_print_structure: - * @out: pointer to the output file (e.g. stdout). - * @structure: pointer to the structure that you want to visit. - * @name: an element of the structure - * @mode: specify how much of the structure to print, can be - * %ASN1_PRINT_NAME, %ASN1_PRINT_NAME_TYPE, - * %ASN1_PRINT_NAME_TYPE_VALUE, or %ASN1_PRINT_ALL. - * - * Prints on the @out file descriptor the structure's tree starting - * from the @name element inside the structure @structure. - **/ -void -asn1_print_structure (FILE * out, asn1_node structure, const char *name, - int mode) -{ - asn1_node p, root; - int k, indent = 0, len, len2, len3; - - if (out == NULL) - return; - - root = asn1_find_node (structure, name); - - if (root == NULL) - return; - - p = root; - while (p) - { - if (mode == ASN1_PRINT_ALL) - { - for (k = 0; k < indent; k++) - fprintf (out, " "); - fprintf (out, "name:"); - if (p->name[0] != 0) - fprintf (out, "%s ", p->name); - else - fprintf (out, "NULL "); - } - else - { - switch (type_field (p->type)) - { - case ASN1_ETYPE_CONSTANT: - case ASN1_ETYPE_TAG: - case ASN1_ETYPE_SIZE: - break; - default: - for (k = 0; k < indent; k++) - fprintf (out, " "); - fprintf (out, "name:"); - if (p->name[0] != 0) - fprintf (out, "%s ", p->name); - else - fprintf (out, "NULL "); - } - } - - if (mode != ASN1_PRINT_NAME) - { - unsigned type = type_field (p->type); - switch (type) - { - case ASN1_ETYPE_CONSTANT: - if (mode == ASN1_PRINT_ALL) - fprintf (out, "type:CONST"); - break; - case ASN1_ETYPE_TAG: - if (mode == ASN1_PRINT_ALL) - fprintf (out, "type:TAG"); - break; - case ASN1_ETYPE_SIZE: - if (mode == ASN1_PRINT_ALL) - fprintf (out, "type:SIZE"); - break; - case ASN1_ETYPE_DEFAULT: - fprintf (out, "type:DEFAULT"); - break; - case ASN1_ETYPE_IDENTIFIER: - fprintf (out, "type:IDENTIFIER"); - break; - case ASN1_ETYPE_ANY: - fprintf (out, "type:ANY"); - break; - case ASN1_ETYPE_CHOICE: - fprintf (out, "type:CHOICE"); - break; - case ASN1_ETYPE_DEFINITIONS: - fprintf (out, "type:DEFINITIONS"); - break; - CASE_HANDLED_ETYPES: - fprintf (out, "%s", _asn1_tags[type].desc); - break; - default: - break; - } - } - - if ((mode == ASN1_PRINT_NAME_TYPE_VALUE) || (mode == ASN1_PRINT_ALL)) - { - switch (type_field (p->type)) - { - case ASN1_ETYPE_CONSTANT: - if (mode == ASN1_PRINT_ALL) - if (p->value) - fprintf (out, " value:%s", p->value); - break; - case ASN1_ETYPE_TAG: - if (mode == ASN1_PRINT_ALL) - if (p->value) - fprintf (out, " value:%s", p->value); - break; - case ASN1_ETYPE_SIZE: - if (mode == ASN1_PRINT_ALL) - if (p->value) - fprintf (out, " value:%s", p->value); - break; - case ASN1_ETYPE_DEFAULT: - if (p->value) - fprintf (out, " value:%s", p->value); - else if (p->type & CONST_TRUE) - fprintf (out, " value:TRUE"); - else if (p->type & CONST_FALSE) - fprintf (out, " value:FALSE"); - break; - case ASN1_ETYPE_IDENTIFIER: - if (p->value) - fprintf (out, " value:%s", p->value); - break; - case ASN1_ETYPE_INTEGER: - if (p->value) - { - len2 = -1; - len = asn1_get_length_der (p->value, p->value_len, &len2); - fprintf (out, " value:0x"); - if (len > 0) - for (k = 0; k < len; k++) - fprintf (out, "%02x", (unsigned) (p->value)[k + len2]); - } - break; - case ASN1_ETYPE_ENUMERATED: - if (p->value) - { - len2 = -1; - len = asn1_get_length_der (p->value, p->value_len, &len2); - fprintf (out, " value:0x"); - if (len > 0) - for (k = 0; k < len; k++) - fprintf (out, "%02x", (unsigned) (p->value)[k + len2]); - } - break; - case ASN1_ETYPE_BOOLEAN: - if (p->value) - { - if (p->value[0] == 'T') - fprintf (out, " value:TRUE"); - else if (p->value[0] == 'F') - fprintf (out, " value:FALSE"); - } - break; - case ASN1_ETYPE_BIT_STRING: - if (p->value) - { - len2 = -1; - len = asn1_get_length_der (p->value, p->value_len, &len2); - if (len > 0) - { - fprintf (out, " value(%i):", - (len - 1) * 8 - (p->value[len2])); - for (k = 1; k < len; k++) - fprintf (out, "%02x", (unsigned) (p->value)[k + len2]); - } - } - break; - case ASN1_ETYPE_GENERALIZED_TIME: - case ASN1_ETYPE_UTC_TIME: - if (p->value) - { - fprintf (out, " value:"); - for (k = 0; k < p->value_len; k++) - fprintf (out, "%c", (p->value)[k]); - } - break; - case ASN1_ETYPE_GENERALSTRING: - case ASN1_ETYPE_NUMERIC_STRING: - case ASN1_ETYPE_IA5_STRING: - case ASN1_ETYPE_TELETEX_STRING: - case ASN1_ETYPE_PRINTABLE_STRING: - case ASN1_ETYPE_UNIVERSAL_STRING: - case ASN1_ETYPE_UTF8_STRING: - case ASN1_ETYPE_VISIBLE_STRING: - if (p->value) - { - len2 = -1; - len = asn1_get_length_der (p->value, p->value_len, &len2); - fprintf (out, " value:"); - if (len > 0) - for (k = 0; k < len; k++) - fprintf (out, "%c", (p->value)[k + len2]); - } - break; - case ASN1_ETYPE_BMP_STRING: - case ASN1_ETYPE_OCTET_STRING: - if (p->value) - { - len2 = -1; - len = asn1_get_length_der (p->value, p->value_len, &len2); - fprintf (out, " value:"); - if (len > 0) - for (k = 0; k < len; k++) - fprintf (out, "%02x", (unsigned) (p->value)[k + len2]); - } - break; - case ASN1_ETYPE_OBJECT_ID: - if (p->value) - fprintf (out, " value:%s", p->value); - break; - case ASN1_ETYPE_ANY: - if (p->value) - { - len3 = -1; - len2 = asn1_get_length_der (p->value, p->value_len, &len3); - fprintf (out, " value:"); - if (len2 > 0) - for (k = 0; k < len2; k++) - fprintf (out, "%02x", (unsigned) (p->value)[k + len3]); - } - break; - case ASN1_ETYPE_SET: - case ASN1_ETYPE_SET_OF: - case ASN1_ETYPE_CHOICE: - case ASN1_ETYPE_DEFINITIONS: - case ASN1_ETYPE_SEQUENCE_OF: - case ASN1_ETYPE_SEQUENCE: - case ASN1_ETYPE_NULL: - break; - default: - break; - } - } - - if (mode == ASN1_PRINT_ALL) - { - if (p->type & 0x1FFFFF00) - { - fprintf (out, " attr:"); - if (p->type & CONST_UNIVERSAL) - fprintf (out, "UNIVERSAL,"); - if (p->type & CONST_PRIVATE) - fprintf (out, "PRIVATE,"); - if (p->type & CONST_APPLICATION) - fprintf (out, "APPLICATION,"); - if (p->type & CONST_EXPLICIT) - fprintf (out, "EXPLICIT,"); - if (p->type & CONST_IMPLICIT) - fprintf (out, "IMPLICIT,"); - if (p->type & CONST_TAG) - fprintf (out, "TAG,"); - if (p->type & CONST_DEFAULT) - fprintf (out, "DEFAULT,"); - if (p->type & CONST_TRUE) - fprintf (out, "TRUE,"); - if (p->type & CONST_FALSE) - fprintf (out, "FALSE,"); - if (p->type & CONST_LIST) - fprintf (out, "LIST,"); - if (p->type & CONST_MIN_MAX) - fprintf (out, "MIN_MAX,"); - if (p->type & CONST_OPTION) - fprintf (out, "OPTION,"); - if (p->type & CONST_1_PARAM) - fprintf (out, "1_PARAM,"); - if (p->type & CONST_SIZE) - fprintf (out, "SIZE,"); - if (p->type & CONST_DEFINED_BY) - fprintf (out, "DEF_BY,"); - if (p->type & CONST_GENERALIZED) - fprintf (out, "GENERALIZED,"); - if (p->type & CONST_UTC) - fprintf (out, "UTC,"); - if (p->type & CONST_SET) - fprintf (out, "SET,"); - if (p->type & CONST_NOT_USED) - fprintf (out, "NOT_USED,"); - if (p->type & CONST_ASSIGN) - fprintf (out, "ASSIGNMENT,"); - } - } - - if (mode == ASN1_PRINT_ALL) - { - fprintf (out, "\n"); - } - else - { - switch (type_field (p->type)) - { - case ASN1_ETYPE_CONSTANT: - case ASN1_ETYPE_TAG: - case ASN1_ETYPE_SIZE: - break; - default: - fprintf (out, "\n"); - } - } - - if (p->down) - { - p = p->down; - indent += 2; - } - else if (p == root) - { - p = NULL; - break; - } - else if (p->right) - p = p->right; - else - { - while (1) - { - p = _asn1_find_up (p); - if (p == root) - { - p = NULL; - break; - } - indent -= 2; - if (p->right) - { - p = p->right; - break; - } - } - } - } -} - - - -/** - * asn1_number_of_elements: - * @element: pointer to the root of an ASN1 structure. - * @name: the name of a sub-structure of ROOT. - * @num: pointer to an integer where the result will be stored - * - * Counts the number of elements of a sub-structure called NAME with - * names equal to "?1","?2", ... - * - * Returns: %ASN1_SUCCESS if successful, %ASN1_ELEMENT_NOT_FOUND if - * @name is not known, %ASN1_GENERIC_ERROR if pointer @num is %NULL. - **/ -int -asn1_number_of_elements (asn1_node element, const char *name, int *num) -{ - asn1_node node, p; - - if (num == NULL) - return ASN1_GENERIC_ERROR; - - *num = 0; - - node = asn1_find_node (element, name); - if (node == NULL) - return ASN1_ELEMENT_NOT_FOUND; - - p = node->down; - - while (p) - { - if (p->name[0] == '?') - (*num)++; - p = p->right; - } - - return ASN1_SUCCESS; -} - - -/** - * asn1_find_structure_from_oid: - * @definitions: ASN1 definitions - * @oidValue: value of the OID to search (e.g. "1.2.3.4"). - * - * Search the structure that is defined just after an OID definition. - * - * Returns: %NULL when @oidValue not found, otherwise the pointer to a - * constant string that contains the element name defined just after - * the OID. - **/ -const char * -asn1_find_structure_from_oid (asn1_node definitions, const char *oidValue) -{ - char name[2 * ASN1_MAX_NAME_SIZE + 1]; - char value[ASN1_MAX_NAME_SIZE]; - asn1_node p; - int len; - int result; - const char *definitionsName; - - if ((definitions == NULL) || (oidValue == NULL)) - return NULL; /* ASN1_ELEMENT_NOT_FOUND; */ - - definitionsName = definitions->name; - - /* search the OBJECT_ID into definitions */ - p = definitions->down; - while (p) - { - if ((type_field (p->type) == ASN1_ETYPE_OBJECT_ID) && - (p->type & CONST_ASSIGN)) - { - snprintf(name, sizeof(name), "%s.%s", definitionsName, p->name); - - len = ASN1_MAX_NAME_SIZE; - result = asn1_read_value (definitions, name, value, &len); - - if ((result == ASN1_SUCCESS) && (!strcmp (oidValue, value))) - { - p = p->right; - if (p == NULL) /* reach the end of ASN1 definitions */ - return NULL; /* ASN1_ELEMENT_NOT_FOUND; */ - - return p->name; - } - } - p = p->right; - } - - return NULL; /* ASN1_ELEMENT_NOT_FOUND; */ -} - -/** - * asn1_copy_node: - * @dst: Destination asn1 node. - * @dst_name: Field name in destination node. - * @src: Source asn1 node. - * @src_name: Field name in source node. - * - * Create a deep copy of a asn1_node variable. That - * function requires @dst to be expanded using asn1_create_element(). - * - * Returns: Return %ASN1_SUCCESS on success. - **/ -int -asn1_copy_node (asn1_node dst, const char *dst_name, - asn1_node src, const char *src_name) -{ - int result; - asn1_node dst_node; - void *data = NULL; - int size = 0; - - result = asn1_der_coding (src, src_name, NULL, &size, NULL); - if (result != ASN1_MEM_ERROR) - return result; - - data = malloc (size); - if (data == NULL) - return ASN1_MEM_ERROR; - - result = asn1_der_coding (src, src_name, data, &size, NULL); - if (result != ASN1_SUCCESS) - { - free (data); - return result; - } - - dst_node = asn1_find_node (dst, dst_name); - if (dst_node == NULL) - { - free (data); - return ASN1_ELEMENT_NOT_FOUND; - } - - result = asn1_der_decoding (&dst_node, data, size, NULL); - - free (data); - - return result; -} - -/** - * asn1_dup_node: - * @src: Source asn1 node. - * @src_name: Field name in source node. - * - * Create a deep copy of a asn1_node variable. This function - * will return an exact copy of the provided structure. - * - * Returns: Return %NULL on failure. - **/ -asn1_node -asn1_dup_node (asn1_node src, const char *src_name) -{ - return _asn1_copy_structure2(src, src_name); -} diff --git a/lib/structure.h b/lib/structure.h deleted file mode 100644 index bb6e7a9..0000000 --- a/lib/structure.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (C) 2002-2014 Free Software Foundation, Inc. - * - * This file is part of LIBTASN1. - * - * The LIBTASN1 library is free software; you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA - */ - -/*************************************************/ -/* File: structure.h */ -/* Description: list of exported object by */ -/* "structure.c" */ -/*************************************************/ - -#ifndef _STRUCTURE_H -#define _STRUCTURE_H - -int _asn1_create_static_structure (asn1_node pointer, - char *output_file_name, char *vector_name); - -asn1_node _asn1_copy_structure3 (asn1_node source_node); - -asn1_node _asn1_add_single_node (unsigned int type); - -asn1_node _asn1_find_left (asn1_node node); - -#endif diff --git a/lib/version.c b/lib/version.c deleted file mode 100644 index 25f8a8f..0000000 --- a/lib/version.c +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (C) 2000-2014 Free Software Foundation, Inc. - * - * This file is part of LIBTASN1. - * - * The LIBTASN1 library is free software; you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA - */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include /* for strverscmp */ - -#include "libtasn1.h" - -/** - * asn1_check_version: - * @req_version: Required version number, or %NULL. - * - * Check that the version of the library is at minimum the - * requested one and return the version string; return %NULL if the - * condition is not satisfied. If a %NULL is passed to this function, - * no check is done, but the version string is simply returned. - * - * See %ASN1_VERSION for a suitable @req_version string. - * - * Returns: Version string of run-time library, or %NULL if the - * run-time library does not meet the required version number. - */ -const char * -asn1_check_version (const char *req_version) -{ - if (!req_version || strverscmp (req_version, ASN1_VERSION) <= 0) - return ASN1_VERSION; - - return NULL; -} diff --git a/m4/gtk-doc.m4 b/m4/gtk-doc.m4 deleted file mode 100644 index e337492..0000000 --- a/m4/gtk-doc.m4 +++ /dev/null @@ -1,62 +0,0 @@ -dnl -*- mode: autoconf -*- - -# serial 1 - -dnl Usage: -dnl GTK_DOC_CHECK([minimum-gtk-doc-version]) -AC_DEFUN([GTK_DOC_CHECK], -[ - AC_REQUIRE([PKG_PROG_PKG_CONFIG]) - AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first - AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first - - dnl check for tools we added during development - AC_PATH_PROG([GTKDOC_CHECK],[gtkdoc-check]) - AC_PATH_PROGS([GTKDOC_REBASE],[gtkdoc-rebase],[true]) - AC_PATH_PROG([GTKDOC_MKPDF],[gtkdoc-mkpdf]) - - dnl for overriding the documentation installation directory - AC_ARG_WITH([html-dir], - AS_HELP_STRING([--with-html-dir=PATH], [path to installed docs]),, - [with_html_dir='${datadir}/gtk-doc/html']) - HTML_DIR="$with_html_dir" - AC_SUBST([HTML_DIR]) - - dnl enable/disable documentation building - AC_ARG_ENABLE([gtk-doc], - AS_HELP_STRING([--enable-gtk-doc], - [use gtk-doc to build documentation [[default=no]]]),, - [enable_gtk_doc=no]) - - if test x$enable_gtk_doc = xyes; then - ifelse([$1],[], - [PKG_CHECK_EXISTS([gtk-doc],, - AC_MSG_ERROR([gtk-doc not installed and --enable-gtk-doc requested]))], - [PKG_CHECK_EXISTS([gtk-doc >= $1],, - AC_MSG_ERROR([You need to have gtk-doc >= $1 installed to build $PACKAGE_NAME]))]) - fi - - AC_MSG_CHECKING([whether to build gtk-doc documentation]) - AC_MSG_RESULT($enable_gtk_doc) - - dnl enable/disable output formats - AC_ARG_ENABLE([gtk-doc-html], - AS_HELP_STRING([--enable-gtk-doc-html], - [build documentation in html format [[default=yes]]]),, - [enable_gtk_doc_html=yes]) - AC_ARG_ENABLE([gtk-doc-pdf], - AS_HELP_STRING([--enable-gtk-doc-pdf], - [build documentation in pdf format [[default=no]]]),, - [enable_gtk_doc_pdf=no]) - - if test -z "$GTKDOC_MKPDF"; then - enable_gtk_doc_pdf=no - fi - - - AM_CONDITIONAL([ENABLE_GTK_DOC], [test x$enable_gtk_doc = xyes]) - AM_CONDITIONAL([GTK_DOC_BUILD_HTML], [test x$enable_gtk_doc_html = xyes]) - AM_CONDITIONAL([GTK_DOC_BUILD_PDF], [test x$enable_gtk_doc_pdf = xyes]) - AM_CONDITIONAL([GTK_DOC_USE_LIBTOOL], [test -n "$LIBTOOL"]) - AM_CONDITIONAL([GTK_DOC_USE_REBASE], [test -n "$GTKDOC_REBASE"]) -]) diff --git a/m4/pkg.m4 b/m4/pkg.m4 deleted file mode 100644 index 0048a3f..0000000 --- a/m4/pkg.m4 +++ /dev/null @@ -1,157 +0,0 @@ -# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- -# -# Copyright © 2004 Scott James Remnant . -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# PKG_PROG_PKG_CONFIG([MIN-VERSION]) -# ---------------------------------- -AC_DEFUN([PKG_PROG_PKG_CONFIG], -[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) -m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) -AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl -if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then - AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) -fi -if test -n "$PKG_CONFIG"; then - _pkg_min_version=m4_default([$1], [0.9.0]) - AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) - if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - PKG_CONFIG="" - fi - -fi[]dnl -])# PKG_PROG_PKG_CONFIG - -# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) -# -# Check to see whether a particular set of modules exists. Similar -# to PKG_CHECK_MODULES(), but does not set variables or print errors. -# -# -# Similar to PKG_CHECK_MODULES, make sure that the first instance of -# this or PKG_CHECK_MODULES is called, or make sure to call -# PKG_CHECK_EXISTS manually -# -------------------------------------------------------------- -AC_DEFUN([PKG_CHECK_EXISTS], -[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl -if test -n "$PKG_CONFIG" && \ - AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then - m4_ifval([$2], [$2], [:]) -m4_ifvaln([$3], [else - $3])dnl -fi]) - - -# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) -# --------------------------------------------- -m4_define([_PKG_CONFIG], -[if test -n "$PKG_CONFIG"; then - if test -n "$$1"; then - pkg_cv_[]$1="$$1" - else - PKG_CHECK_EXISTS([$3], - [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], - [pkg_failed=yes]) - fi -else - pkg_failed=untried -fi[]dnl -])# _PKG_CONFIG - -# _PKG_SHORT_ERRORS_SUPPORTED -# ----------------------------- -AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], -[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi[]dnl -])# _PKG_SHORT_ERRORS_SUPPORTED - - -# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], -# [ACTION-IF-NOT-FOUND]) -# -# -# Note that if there is a possibility the first call to -# PKG_CHECK_MODULES might not happen, you should be sure to include an -# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac -# -# -# -------------------------------------------------------------- -AC_DEFUN([PKG_CHECK_MODULES], -[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl -AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl -AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl - -pkg_failed=no -AC_MSG_CHECKING([for $1]) - -_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) -_PKG_CONFIG([$1][_LIBS], [libs], [$2]) - -m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS -and $1[]_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details.]) - -if test $pkg_failed = yes; then - _PKG_SHORT_ERRORS_SUPPORTED - if test $_pkg_short_errors_supported = yes; then - $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` - else - $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` - fi - # Put the nasty error message in config.log where it belongs - echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD - - ifelse([$4], , [AC_MSG_ERROR(dnl -[Package requirements ($2) were not met: - -$$1_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -_PKG_TEXT -])], - [AC_MSG_RESULT([no]) - $4]) -elif test $pkg_failed = untried; then - ifelse([$4], , [AC_MSG_FAILURE(dnl -[The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -_PKG_TEXT - -To get pkg-config, see .])], - [$4]) -else - $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS - $1[]_LIBS=$pkg_cv_[]$1[]_LIBS - AC_MSG_RESULT([yes]) - ifelse([$3], , :, [$3]) -fi[]dnl -])# PKG_CHECK_MODULES diff --git a/m4/update-header-version.m4 b/m4/update-header-version.m4 deleted file mode 100644 index 73575a2..0000000 --- a/m4/update-header-version.m4 +++ /dev/null @@ -1,24 +0,0 @@ -# update-header-version.m4 serial 1 -dnl Copyright (C) 2008-2014 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Simon Josefsson - -# sj_UPDATE_HEADER_VERSION(HEADER-FILE) -# ------------- -# Update version number in HEADER-FILE. It searches for '_VERSION ".*"' -# and replaces the .* part with the $PACKAGE_VERSION. -AC_DEFUN([sj_UPDATE_HEADER_VERSION], -[ - # Update version number in lib/libtasn1.h. - if ! sed 's/_VERSION ".*"/_VERSION "'$PACKAGE_VERSION'"/' $1 > fixhdr.tmp; then - AC_MSG_ERROR([[*** Failed to update version number in $1...]]) - fi - if cmp -s $1 fixhdr.tmp 2>/dev/null; then - rm -f fixhdr.tmp - elif ! mv fixhdr.tmp $1; then - AC_MSG_ERROR([[*** Failed to move fixhdr.tmp to $1...]]) - fi -]) diff --git a/maint.mk b/maint.mk deleted file mode 100644 index 0cabd2f..0000000 --- a/maint.mk +++ /dev/null @@ -1,1674 +0,0 @@ -# -*-Makefile-*- -# This Makefile fragment tries to be general-purpose enough to be -# used by many projects via the gnulib maintainer-makefile module. - -## Copyright (C) 2001-2017 Free Software Foundation, Inc. -## -## This program is free software: you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation, either version 3 of the License, or -## (at your option) any later version. -## -## This program is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with this program. If not, see . - -# This is reported not to work with make-3.79.1 -# ME := $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)) -ME := maint.mk - -# Helper variables. -_empty = -_sp = $(_empty) $(_empty) - -# _equal,S1,S2 -# ------------ -# If S1 == S2, return S1, otherwise the empty string. -_equal = $(and $(findstring $(1),$(2)),$(findstring $(2),$(1))) - -# member-check,VARIABLE,VALID-VALUES -# ---------------------------------- -# Check that $(VARIABLE) is in the space-separated list of VALID-VALUES, and -# return it. Die otherwise. -member-check = \ - $(strip \ - $(if $($(1)), \ - $(if $(findstring $(_sp),$($(1))), \ - $(error invalid $(1): '$($(1))', expected $(2)), \ - $(or $(findstring $(_sp)$($(1))$(_sp),$(_sp)$(2)$(_sp)), \ - $(error invalid $(1): '$($(1))', expected $(2)))), \ - $(error $(1) undefined))) - -# Do not save the original name or timestamp in the .tar.gz file. -# Use --rsyncable if available. -gzip_rsyncable := \ - $(shell gzip --help 2>/dev/null|grep rsyncable >/dev/null \ - && printf %s --rsyncable) -GZIP_ENV = '--no-name --best $(gzip_rsyncable)' - -GIT = git -VC = $(GIT) - -VC_LIST = $(srcdir)/$(_build-aux)/vc-list-files -C $(srcdir) - -# You can override this variable in cfg.mk if your gnulib submodule lives -# in a different location. -gnulib_dir ?= $(srcdir)/gnulib - -# You can override this variable in cfg.mk to set your own regexp -# matching files to ignore. -VC_LIST_ALWAYS_EXCLUDE_REGEX ?= ^$$ - -# This is to preprocess robustly the output of $(VC_LIST), so that even -# when $(srcdir) is a pathological name like "....", the leading sed command -# removes only the intended prefix. -_dot_escaped_srcdir = $(subst .,\.,$(srcdir)) - -# Post-process $(VC_LIST) output, prepending $(srcdir)/, but only -# when $(srcdir) is not ".". -ifeq ($(srcdir),.) - _prepend_srcdir_prefix = -else - _prepend_srcdir_prefix = | $(SED) 's|^|$(srcdir)/|' -endif - -# In order to be able to consistently filter "."-relative names, -# (i.e., with no $(srcdir) prefix), this definition is careful to -# remove any $(srcdir) prefix, and to restore what it removes. -_sc_excl = \ - $(or $(exclude_file_name_regexp--$@),^$$) -VC_LIST_EXCEPT = \ - $(VC_LIST) | $(SED) 's|^$(_dot_escaped_srcdir)/||' \ - | if test -f $(srcdir)/.x-$@; then grep -vEf $(srcdir)/.x-$@; \ - else grep -Ev -e "$${VC_LIST_EXCEPT_DEFAULT-ChangeLog}"; fi \ - | grep -Ev -e '($(VC_LIST_ALWAYS_EXCLUDE_REGEX)|$(_sc_excl))' \ - $(_prepend_srcdir_prefix) - -ifeq ($(origin prev_version_file), undefined) - prev_version_file = $(srcdir)/.prev-version -endif - -PREV_VERSION := $(shell cat $(prev_version_file) 2>/dev/null) -VERSION_REGEXP = $(subst .,\.,$(VERSION)) -PREV_VERSION_REGEXP = $(subst .,\.,$(PREV_VERSION)) - -ifeq ($(VC),$(GIT)) - this-vc-tag = v$(VERSION) - this-vc-tag-regexp = v$(VERSION_REGEXP) -else - tag-package = $(shell echo "$(PACKAGE)" | tr '[:lower:]' '[:upper:]') - tag-this-version = $(subst .,_,$(VERSION)) - this-vc-tag = $(tag-package)-$(tag-this-version) - this-vc-tag-regexp = $(this-vc-tag) -endif -my_distdir = $(PACKAGE)-$(VERSION) - -# Old releases are stored here. -release_archive_dir ?= ../release - -# If RELEASE_TYPE is undefined, but RELEASE is, use its second word. -# But overwrite VERSION. -ifdef RELEASE - VERSION := $(word 1, $(RELEASE)) - RELEASE_TYPE ?= $(word 2, $(RELEASE)) -endif - -# Validate and return $(RELEASE_TYPE), or die. -RELEASE_TYPES = alpha beta stable -release-type = $(call member-check,RELEASE_TYPE,$(RELEASE_TYPES)) - -# Override gnu_rel_host and url_dir_list in cfg.mk if these are not right. -# Use alpha.gnu.org for alpha and beta releases. -# Use ftp.gnu.org for stable releases. -gnu_ftp_host-alpha = alpha.gnu.org -gnu_ftp_host-beta = alpha.gnu.org -gnu_ftp_host-stable = ftp.gnu.org -gnu_rel_host ?= $(gnu_ftp_host-$(release-type)) - -url_dir_list ?= $(if $(call _equal,$(gnu_rel_host),ftp.gnu.org), \ - http://ftpmirror.gnu.org/$(PACKAGE), \ - ftp://$(gnu_rel_host)/gnu/$(PACKAGE)) - -# Override this in cfg.mk if you are using a different format in your -# NEWS file. -today = $(shell date +%Y-%m-%d) - -# Select which lines of NEWS are searched for $(news-check-regexp). -# This is a sed line number spec. The default says that we search -# lines 1..10 of NEWS for $(news-check-regexp). -# If you want to search only line 3 or only lines 20-22, use "3" or "20,22". -news-check-lines-spec ?= 1,10 -news-check-regexp ?= '^\*.* $(VERSION_REGEXP) \($(today)\)' - -# Prevent programs like 'sort' from considering distinct strings to be equal. -# Doing it here saves us from having to set LC_ALL elsewhere in this file. -export LC_ALL = C - -## --------------- ## -## Sanity checks. ## -## --------------- ## - -ifneq ($(_gl-Makefile),) -_cfg_mk := $(wildcard $(srcdir)/cfg.mk) - -# Collect the names of rules starting with 'sc_'. -syntax-check-rules := $(sort $(shell $(SED) -n \ - 's/^\(sc_[a-zA-Z0-9_-]*\):.*/\1/p' $(srcdir)/$(ME) $(_cfg_mk))) -.PHONY: $(syntax-check-rules) - -ifeq ($(shell $(VC_LIST) >/dev/null 2>&1; echo $$?),0) - local-checks-available += $(syntax-check-rules) -else - local-checks-available += no-vc-detected -no-vc-detected: - @echo "No version control files detected; skipping syntax check" -endif -.PHONY: $(local-checks-available) - -# Arrange to print the name of each syntax-checking rule just before running it. -$(syntax-check-rules): %: %.m -sc_m_rules_ = $(patsubst %, %.m, $(syntax-check-rules)) -.PHONY: $(sc_m_rules_) -$(sc_m_rules_): - @echo $(patsubst sc_%.m, %, $@) - @date +%s.%N > .sc-start-$(basename $@) - -# Compute and print the elapsed time for each syntax-check rule. -sc_z_rules_ = $(patsubst %, %.z, $(syntax-check-rules)) -.PHONY: $(sc_z_rules_) -$(sc_z_rules_): %.z: % - @end=$$(date +%s.%N); \ - start=$$(cat .sc-start-$*); \ - rm -f .sc-start-$*; \ - awk -v s=$$start -v e=$$end \ - 'END {printf "%.2f $(patsubst sc_%,%,$*)\n", e - s}' < /dev/null - -# The patsubst here is to replace each sc_% rule with its sc_%.z wrapper -# that computes and prints elapsed time. -local-check := \ - $(patsubst sc_%, sc_%.z, \ - $(filter-out $(local-checks-to-skip), $(local-checks-available))) - -syntax-check: $(local-check) -endif - -# _sc_search_regexp -# -# This macro searches for a given construct in the selected files and -# then takes some action. -# -# Parameters (shell variables): -# -# prohibit | require -# -# Regular expression (ERE) denoting either a forbidden construct -# or a required construct. Those arguments are exclusive. -# -# exclude -# -# Regular expression (ERE) denoting lines to ignore that matched -# a prohibit construct. For example, this can be used to exclude -# comments that mention why the nearby code uses an alternative -# construct instead of the simpler prohibited construct. -# -# in_vc_files | in_files -# -# grep-E-style regexp selecting the files to check. For in_vc_files, -# the regexp is used to select matching files from the list of all -# version-controlled files; for in_files, it's from the names printed -# by "find $(srcdir)". When neither is specified, use all files that -# are under version control. -# -# containing | non_containing -# -# Select the files (non) containing strings matching this regexp. -# If both arguments are specified then CONTAINING takes -# precedence. -# -# with_grep_options -# -# Extra options for grep. -# -# ignore_case -# -# Ignore case. -# -# halt -# -# Message to display before to halting execution. -# -# Finally, you may exempt files based on an ERE matching file names. -# For example, to exempt from the sc_space_tab check all files with the -# .diff suffix, set this Make variable: -# -# exclude_file_name_regexp--sc_space_tab = \.diff$ -# -# Note that while this functionality is mostly inherited via VC_LIST_EXCEPT, -# when filtering by name via in_files, we explicitly filter out matching -# names here as well. - -# Initialize each, so that envvar settings cannot interfere. -export require = -export prohibit = -export exclude = -export in_vc_files = -export in_files = -export containing = -export non_containing = -export halt = -export with_grep_options = - -# By default, _sc_search_regexp does not ignore case. -export ignore_case = -_ignore_case = $$(test -n "$$ignore_case" && printf %s -i || :) - -define _sc_say_and_exit - dummy=; : so we do not need a semicolon before each use; \ - { printf '%s\n' "$(ME): $$msg" 1>&2; exit 1; }; -endef - -define _sc_search_regexp - dummy=; : so we do not need a semicolon before each use; \ - \ - : Check arguments; \ - test -n "$$prohibit" && test -n "$$require" \ - && { msg='Cannot specify both prohibit and require' \ - $(_sc_say_and_exit) } || :; \ - test -z "$$prohibit" && test -z "$$require" \ - && { msg='Should specify either prohibit or require' \ - $(_sc_say_and_exit) } || :; \ - test -z "$$prohibit" && test -n "$$exclude" \ - && { msg='Use of exclude requires a prohibit pattern' \ - $(_sc_say_and_exit) } || :; \ - test -n "$$in_vc_files" && test -n "$$in_files" \ - && { msg='Cannot specify both in_vc_files and in_files' \ - $(_sc_say_and_exit) } || :; \ - test "x$$halt" != x \ - || { msg='halt not defined' $(_sc_say_and_exit) }; \ - \ - : Filter by file name; \ - if test -n "$$in_files"; then \ - files=$$(find $(srcdir) | grep -E "$$in_files" \ - | grep -Ev '$(_sc_excl)'); \ - else \ - files=$$($(VC_LIST_EXCEPT)); \ - if test -n "$$in_vc_files"; then \ - files=$$(echo "$$files" | grep -E "$$in_vc_files"); \ - fi; \ - fi; \ - \ - : Filter by content; \ - test -n "$$files" && test -n "$$containing" \ - && { files=$$(grep -l "$$containing" $$files); } || :; \ - test -n "$$files" && test -n "$$non_containing" \ - && { files=$$(grep -vl "$$non_containing" $$files); } || :; \ - \ - : Check for the construct; \ - if test -n "$$files"; then \ - if test -n "$$prohibit"; then \ - grep $$with_grep_options $(_ignore_case) -nE "$$prohibit" $$files \ - | grep -vE "$${exclude:-^$$}" \ - && { msg="$$halt" $(_sc_say_and_exit) } || :; \ - else \ - grep $$with_grep_options $(_ignore_case) -LE "$$require" $$files \ - | grep . \ - && { msg="$$halt" $(_sc_say_and_exit) } || :; \ - fi \ - else :; \ - fi || :; -endef - -sc_avoid_if_before_free: - @$(srcdir)/$(_build-aux)/useless-if-before-free \ - $(useless_free_options) \ - $$($(VC_LIST_EXCEPT) | grep -v useless-if-before-free) && \ - { echo '$(ME): found useless "if" before "free" above' 1>&2; \ - exit 1; } || : - -sc_cast_of_argument_to_free: - @prohibit='\&2; \ - exit 1; } || : - -# Error messages should not start with a capital letter -sc_error_message_uppercase: - @grep -nEA2 '[^rp]error *\(' $$($(VC_LIST_EXCEPT)) \ - | grep -E '"[A-Z]' \ - | grep -vE '"FATAL|"WARNING|"Java|"C#|PRIuMAX' && \ - { echo '$(ME): found capitalized error message' 1>&2; \ - exit 1; } || : - -# Error messages should not end with a period -sc_error_message_period: - @grep -nEA2 '[^rp]error *\(' $$($(VC_LIST_EXCEPT)) \ - | grep -E '[^."]\."' && \ - { echo '$(ME): found error message ending in period' 1>&2; \ - exit 1; } || : - -sc_file_system: - @prohibit=file''system \ - ignore_case=1 \ - halt='found use of "file''system"; spell it "file system"' \ - $(_sc_search_regexp) - -# Don't use cpp tests of this symbol. All code assumes config.h is included. -sc_prohibit_have_config_h: - @prohibit='^# *if.*HAVE''_CONFIG_H' \ - halt='found use of HAVE''_CONFIG_H; remove' \ - $(_sc_search_regexp) - -# Nearly all .c files must include . However, we also permit this -# via inclusion of a package-specific header, if cfg.mk specified one. -# config_h_header must be suitable for grep -E. -config_h_header ?= -sc_require_config_h: - @require='^# *include $(config_h_header)' \ - in_vc_files='\.c$$' \ - halt='the above files do not include ' \ - $(_sc_search_regexp) - -# Print each file name for which the first #include does not match -# $(config_h_header). Like grep -m 1, this only looks at the first match. -perl_config_h_first_ = \ - -e 'BEGIN {$$ret = 0}' \ - -e 'if (/^\# *include\b/) {' \ - -e ' if (not m{^\# *include $(config_h_header)}) {' \ - -e ' print "$$ARGV\n";' \ - -e ' $$ret = 1;' \ - -e ' }' \ - -e ' \# Move on to next file after first include' \ - -e ' close ARGV;' \ - -e '}' \ - -e 'END {exit $$ret}' - -# You must include before including any other header file. -# This can possibly be via a package-specific header, if given by cfg.mk. -sc_require_config_h_first: - @if $(VC_LIST_EXCEPT) | grep '\.c$$' > /dev/null; then \ - files=$$($(VC_LIST_EXCEPT) | grep '\.c$$') && \ - perl -n $(perl_config_h_first_) $$files || \ - { echo '$(ME): the above files include some other header' \ - 'before ' 1>&2; exit 1; } || :; \ - else :; \ - fi - -sc_prohibit_HAVE_MBRTOWC: - @prohibit='\bHAVE_MBRTOWC\b' \ - halt="do not use $$prohibit; it is always defined" \ - $(_sc_search_regexp) - -# To use this "command" macro, you must first define two shell variables: -# h: the header name, with no enclosing <> or "" -# re: a regular expression that matches IFF something provided by $h is used. -define _sc_header_without_use - dummy=; : so we do not need a semicolon before each use; \ - h_esc=`echo '[<"]'"$$h"'[">]'|$(SED) 's/\./\\\\./g'`; \ - if $(VC_LIST_EXCEPT) | grep '\.c$$' > /dev/null; then \ - files=$$(grep -l '^# *include '"$$h_esc" \ - $$($(VC_LIST_EXCEPT) | grep '\.c$$')) && \ - grep -LE "$$re" $$files | grep . && \ - { echo "$(ME): the above files include $$h but don't use it" \ - 1>&2; exit 1; } || :; \ - else :; \ - fi -endef - -# Prohibit the inclusion of assert.h without an actual use of assert. -sc_prohibit_assert_without_use: - @h='assert.h' re='\new(file => "/dev/stdin")->as_string'|sed 's/\?://g' -# Note this was produced by the above: -# _xa1 = \ -#x(((2n?)?re|c(har)?|n(re|m)|z)alloc|alloc_(oversized|die)|m(alloc|emdup)|strdup) -# But we can do better, in at least two ways: -# 1) take advantage of two "dup"-suffixed strings: -# x(((2n?)?re|c(har)?|n(re|m)|[mz])alloc|alloc_(oversized|die)|(mem|str)dup) -# 2) notice that "c(har)?|[mz]" is equivalent to the shorter and more readable -# "char|[cmz]" -# x(((2n?)?re|char|n(re|m)|[cmz])alloc|alloc_(oversized|die)|(mem|str)dup) -_xa1 = x(((2n?)?re|char|n(re|m)|[cmz])alloc|alloc_(oversized|die)|(mem|str)dup) -_xa2 = X([CZ]|N?M)ALLOC -sc_prohibit_xalloc_without_use: - @h='xalloc.h' \ - re='\<($(_xa1)|$(_xa2)) *\('\ - $(_sc_header_without_use) - -# Extract function names: -# perl -lne '/^(?:extern )?(?:void|char) \*?(\w+) *\(/ and print $1' lib/hash.h -_hash_re = \ -clear|delete|free|get_(first|next)|insert|lookup|print_statistics|reset_tuning -_hash_fn = \<($(_hash_re)) *\( -_hash_struct = (struct )?\<[Hh]ash_(table|tuning)\> -sc_prohibit_hash_without_use: - @h='hash.h' \ - re='$(_hash_fn)|$(_hash_struct)'\ - $(_sc_header_without_use) - -sc_prohibit_cloexec_without_use: - @h='cloexec.h' re='\<(set_cloexec_flag|dup_cloexec) *\(' \ - $(_sc_header_without_use) - -sc_prohibit_posixver_without_use: - @h='posixver.h' re='\' \ - halt='do not use HAVE''_FCNTL_H or O'_NDELAY \ - $(_sc_search_regexp) - -# FIXME: warn about definitions of EXIT_FAILURE, EXIT_SUCCESS, STREQ - -# Each nonempty ChangeLog line must start with a year number, or a TAB. -sc_changelog: - @prohibit='^[^12 ]' \ - in_vc_files='^ChangeLog$$' \ - halt='found unexpected prefix in a ChangeLog' \ - $(_sc_search_regexp) - -# Ensure that each .c file containing a "main" function also -# calls bindtextdomain. -sc_bindtextdomain: - @require='bindtextdomain *\(' \ - in_vc_files='\.c$$' \ - containing='\
/dev/null \ - && : || { die=1; echo $$i; } \ - done; \ - test $$die = 1 && \ - { echo 1>&2 '$(ME): the final line in each of the above is not:'; \ - echo 1>&2 'Exit something'; \ - exit 1; } || :; \ - fi - -sc_trailing_blank: - @prohibit='[ ]$$' \ - halt='found trailing blank(s)' \ - exclude='^Binary file .* matches$$' \ - $(_sc_search_regexp) - -# Match lines like the following, but where there is only one space -# between the options and the description: -# -D, --all-repeated[=delimit-method] print all duplicate lines\n -longopt_re = --[a-z][0-9A-Za-z-]*(\[?=[0-9A-Za-z-]*\]?)? -sc_two_space_separator_in_usage: - @prohibit='^ *(-[A-Za-z],)? $(longopt_re) [^ ].*\\$$' \ - halt='help2man requires at least two spaces between an option and its description'\ - $(_sc_search_regexp) - -# A regexp matching function names like "error" that may be used -# to emit translatable messages. -_gl_translatable_diag_func_re ?= error - -# Look for diagnostics that aren't marked for translation. -# This won't find any for which error's format string is on a separate line. -sc_unmarked_diagnostics: - @prohibit='\<$(_gl_translatable_diag_func_re) *\([^"]*"[^"]*[a-z]{3}' \ - exclude='(_|ngettext ?)\(' \ - halt='found unmarked diagnostic(s)' \ - $(_sc_search_regexp) - -# Avoid useless parentheses like those in this example: -# #if defined (SYMBOL) || defined (SYM2) -sc_useless_cpp_parens: - @prohibit='^# *if .*defined *\(' \ - halt='found useless parentheses in cpp directive' \ - $(_sc_search_regexp) - -# List headers for which HAVE_HEADER_H is always true, assuming you are -# using the appropriate gnulib module. CAUTION: for each "unnecessary" -# #if HAVE_HEADER_H that you remove, be sure that your project explicitly -# requires the gnulib module that guarantees the usability of that header. -gl_assured_headers_ = \ - cd $(gnulib_dir)/lib && echo *.in.h|$(SED) 's/\.in\.h//g' - -# Convert the list of names to upper case, and replace each space with "|". -az_ = abcdefghijklmnopqrstuvwxyz -AZ_ = ABCDEFGHIJKLMNOPQRSTUVWXYZ -gl_header_upper_case_or_ = \ - $$($(gl_assured_headers_) \ - | tr $(az_)/.- $(AZ_)___ \ - | tr -s ' ' '|' \ - ) -sc_prohibit_always_true_header_tests: - @or=$(gl_header_upper_case_or_); \ - re="HAVE_($$or)_H"; \ - prohibit='\<'"$$re"'\>' \ - halt=$$(printf '%s\n' \ - 'do not test the above HAVE_
_H symbol(s);' \ - ' with the corresponding gnulib module, they are always true') \ - $(_sc_search_regexp) - -sc_prohibit_defined_have_decl_tests: - @prohibit='(#[ ]*ifn?def|\[ (]+HAVE_DECL_' \ - halt='HAVE_DECL macros are always defined' \ - $(_sc_search_regexp) - -# ================================================================== -gl_other_headers_ ?= \ - intprops.h \ - openat.h \ - stat-macros.h - -# Perl -lne code to extract "significant" cpp-defined symbols from a -# gnulib header file, eliminating a few common false-positives. -# The exempted names below are defined only conditionally in gnulib, -# and hence sometimes must/may be defined in application code. -gl_extract_significant_defines_ = \ - /^\# *define ([^_ (][^ (]*)(\s*\(|\s+\w+)/\ - && $$2 !~ /(?:rpl_|_used_without_)/\ - && $$1 !~ /^(?:NSIG|ENODATA)$$/\ - && $$1 !~ /^(?:SA_RESETHAND|SA_RESTART)$$/\ - and print $$1 - -# Create a list of regular expressions matching the names -# of macros that are guaranteed to be defined by parts of gnulib. -define def_sym_regex - gen_h=$(gl_generated_headers_); \ - (cd $(gnulib_dir)/lib; \ - for f in *.in.h $(gl_other_headers_); do \ - test -f $$f \ - && perl -lne '$(gl_extract_significant_defines_)' $$f; \ - done; \ - ) | sort -u \ - | $(SED) 's/^/^ *# *(define|undef) */;s/$$/\\>/' -endef - -# Don't define macros that we already get from gnulib header files. -sc_prohibit_always-defined_macros: - @if test -d $(gnulib_dir); then \ - case $$(echo all: | grep -l -f - Makefile) in Makefile);; *) \ - echo '$(ME): skipping $@: you lack GNU grep' 1>&2; exit 0;; \ - esac; \ - $(def_sym_regex) | grep -E -f - $$($(VC_LIST_EXCEPT)) \ - && { echo '$(ME): define the above via some gnulib .h file' \ - 1>&2; exit 1; } || :; \ - fi -# ================================================================== - -# Prohibit checked in backup files. -sc_prohibit_backup_files: - @$(VC_LIST) | grep '~$$' && \ - { echo '$(ME): found version controlled backup file' 1>&2; \ - exit 1; } || : - -# Require the latest GPL. -sc_GPL_version: - @prohibit='either ''version [^3]' \ - halt='GPL vN, N!=3' \ - $(_sc_search_regexp) - -# Require the latest GFDL. Two regexp, since some .texi files end up -# line wrapping between 'Free Documentation License,' and 'Version'. -_GFDL_regexp = (Free ''Documentation.*Version 1\.[^3]|Version 1\.[^3] or any) -sc_GFDL_version: - @prohibit='$(_GFDL_regexp)' \ - halt='GFDL vN, N!=3' \ - $(_sc_search_regexp) - -# Don't use Texinfo's @acronym{}. -# http://lists.gnu.org/archive/html/bug-gnulib/2010-03/msg00321.html -texinfo_suffix_re_ ?= \.(txi|texi(nfo)?)$$ -sc_texinfo_acronym: - @prohibit='@acronym\{' \ - in_vc_files='$(texinfo_suffix_re_)' \ - halt='found use of Texinfo @acronym{}' \ - $(_sc_search_regexp) - -cvs_keywords = \ - Author|Date|Header|Id|Name|Locker|Log|RCSfile|Revision|Source|State - -sc_prohibit_cvs_keyword: - @prohibit='\$$($(cvs_keywords))\$$' \ - halt='do not use CVS keyword expansion' \ - $(_sc_search_regexp) - -# This Perl code is slightly obfuscated. Not only is each "$" doubled -# because it's in a Makefile, but the $$c's are comments; we cannot -# use "#" due to the way the script ends up concatenated onto one line. -# It would be much more concise, and would produce better output (including -# counts) if written as: -# perl -ln -0777 -e '/\n(\n+)$/ and print "$ARGV: ".length $1' ... -# but that would be far less efficient, reading the entire contents -# of each file, rather than just the last two bytes of each. -# In addition, while the code below detects both blank lines and a missing -# newline at EOF, the above detects only the former. -# -# This is a perl script that is expected to be the single-quoted argument -# to a command-line "-le". The remaining arguments are file names. -# Print the name of each file that does not end in exactly one newline byte. -# I.e., warn if there are blank lines (2 or more newlines), or if the -# last byte is not a newline. However, currently we don't complain -# about any file that contains exactly one byte. -# Exit nonzero if at least one such file is found, otherwise, exit 0. -# Warn about, but otherwise ignore open failure. Ignore seek/read failure. -# -# Use this if you want to remove trailing empty lines from selected files: -# perl -pi -0777 -e 's/\n\n+$/\n/' files... -# -require_exactly_one_NL_at_EOF_ = \ - foreach my $$f (@ARGV) \ - { \ - open F, "<", $$f or (warn "failed to open $$f: $$!\n"), next; \ - my $$p = sysseek (F, -2, 2); \ - my $$c = "seek failure probably means file has < 2 bytes; ignore"; \ - my $$last_two_bytes; \ - defined $$p and $$p = sysread F, $$last_two_bytes, 2; \ - close F; \ - $$c = "ignore read failure"; \ - $$p && ($$last_two_bytes eq "\n\n" \ - || substr ($$last_two_bytes,1) ne "\n") \ - and (print $$f), $$fail=1; \ - } \ - END { exit defined $$fail } -sc_prohibit_empty_lines_at_EOF: - @perl -le '$(require_exactly_one_NL_at_EOF_)' $$($(VC_LIST_EXCEPT)) \ - || { echo '$(ME): empty line(s) or no newline at EOF' \ - 1>&2; exit 1; } || : - -# Make sure we don't use st_blocks. Use ST_NBLOCKS instead. -# This is a bit of a kludge, since it prevents use of the string -# even in comments, but for now it does the job with no false positives. -sc_prohibit_stat_st_blocks: - @prohibit='[.>]st_blocks' \ - halt='do not use st_blocks; use ST_NBLOCKS' \ - $(_sc_search_regexp) - -# Make sure we don't define any S_IS* macros in src/*.c files. -# They're already defined via gnulib's sys/stat.h replacement. -sc_prohibit_S_IS_definition: - @prohibit='^ *# *define *S_IS' \ - halt='do not define S_IS* macros; include ' \ - $(_sc_search_regexp) - -# Perl block to convert a match to FILE_NAME:LINENO:TEST, -# that is shared by two definitions below. -perl_filename_lineno_text_ = \ - -e ' {' \ - -e ' $$n = ($$` =~ tr/\n/\n/ + 1);' \ - -e ' ($$v = $$&) =~ s/\n/\\n/g;' \ - -e ' print "$$ARGV:$$n:$$v\n";' \ - -e ' }' - -prohibit_doubled_words_ = \ - the then in an on if is it but for or at and do to -# expand the regex before running the check to avoid using expensive captures -prohibit_doubled_word_expanded_ = \ - $(join $(prohibit_doubled_words_),$(addprefix \s+,$(prohibit_doubled_words_))) -prohibit_doubled_word_RE_ ?= \ - /\b(?:$(subst $(_sp),|,$(prohibit_doubled_word_expanded_)))\b/gims -prohibit_doubled_word_ = \ - -e 'while ($(prohibit_doubled_word_RE_))' \ - $(perl_filename_lineno_text_) - -# Define this to a regular expression that matches -# any filename:dd:match lines you want to ignore. -# The default is to ignore no matches. -ignore_doubled_word_match_RE_ ?= ^$$ - -sc_prohibit_doubled_word: - @perl -n -0777 $(prohibit_doubled_word_) $$($(VC_LIST_EXCEPT)) \ - | grep -vE '$(ignore_doubled_word_match_RE_)' \ - | grep . && { echo '$(ME): doubled words' 1>&2; exit 1; } || : - -# A regular expression matching undesirable combinations of words like -# "can not"; this matches them even when the two words appear on different -# lines, but not when there is an intervening delimiter like "#" or "*". -# Similarly undesirable, "See @xref{...}", since an @xref should start -# a sentence. Explicitly prohibit any prefix of "see" or "also". -# Also prohibit a prefix matching "\w+ +". -# @pxref gets the same see/also treatment and should be parenthesized; -# presume it must *not* start a sentence. -# POSIX spells it "timestamp" rather than "time\s+stamp", so we do, too. -bad_xref_re_ ?= (?:[\w,:;] +|(?:see|also)\s+)\@xref\{ -bad_pxref_re_ ?= (?:[.!?]|(?:see|also))\s+\@pxref\{ -prohibit_undesirable_word_seq_RE_ ?= \ - /(?:\bcan\s+not\b|\btime\s+stamps?\b|$(bad_xref_re_)|$(bad_pxref_re_))/gims -prohibit_undesirable_word_seq_ = \ - -e 'while ($(prohibit_undesirable_word_seq_RE_))' \ - $(perl_filename_lineno_text_) -# Define this to a regular expression that matches -# any filename:dd:match lines you want to ignore. -# The default is to ignore no matches. -ignore_undesirable_word_sequence_RE_ ?= ^$$ - -sc_prohibit_undesirable_word_seq: - @perl -n -0777 $(prohibit_undesirable_word_seq_) \ - $$($(VC_LIST_EXCEPT)) \ - | grep -vE '$(ignore_undesirable_word_sequence_RE_)' | grep . \ - && { echo '$(ME): undesirable word sequence' >&2; exit 1; } || : - -# Except for shell files and for loops, double semicolon is probably a mistake -sc_prohibit_double_semicolon: - @prohibit='; *;[ {} \]*(/[/*]|$$)' \ - in_vc_files='\.[chly]$$' \ - exclude='\bfor *\(.*\)' \ - halt="Double semicolon detected" \ - $(_sc_search_regexp) - -_ptm1 = use "test C1 && test C2", not "test C1 -''a C2" -_ptm2 = use "test C1 || test C2", not "test C1 -''o C2" -# Using test's -a and -o operators is not portable. -# We prefer test over [, since the latter is spelled [[ in configure.ac. -sc_prohibit_test_minus_ao: - @prohibit='(\ /dev/null \ - || { fail=1; echo 1>&2 "$(ME): $$p uses proper_name_utf8"; }; \ - done; \ - test $$fail = 1 && \ - { echo 1>&2 '$(ME): the above do not link with any ICONV library'; \ - exit 1; } || :; \ - fi - -# Warn about "c0nst struct Foo const foo[]", -# but not about "char const *const foo" or "#define const const". -sc_redundant_const: - @prohibit='\bconst\b[[:space:][:alnum:]]{2,}\bconst\b' \ - halt='redundant "const" in declarations' \ - $(_sc_search_regexp) - -sc_const_long_option: - @prohibit='^ *static.*struct option ' \ - exclude='const struct option|struct option const' \ - halt='add "const" to the above declarations' \ - $(_sc_search_regexp) - -NEWS_hash = \ - $$($(SED) -n '/^\*.* $(PREV_VERSION_REGEXP) ([0-9-]*)/,$$p' \ - $(srcdir)/NEWS \ - | perl -0777 -pe \ - 's/^Copyright.+?Free\sSoftware\sFoundation,\sInc\.\n//ms' \ - | md5sum - \ - | $(SED) 's/ .*//') - -# Ensure that we don't accidentally insert an entry into an old NEWS block. -sc_immutable_NEWS: - @if test -f $(srcdir)/NEWS; then \ - test "$(NEWS_hash)" = '$(old_NEWS_hash)' && : || \ - { echo '$(ME): you have modified old NEWS' 1>&2; exit 1; }; \ - fi - -# Update the hash stored above. Do this after each release and -# for any corrections to old entries. -update-NEWS-hash: NEWS - perl -pi -e 's/^(old_NEWS_hash[ \t]+:?=[ \t]+).*/$${1}'"$(NEWS_hash)/" \ - $(srcdir)/cfg.mk - -# Ensure that we use only the standard $(VAR) notation, -# not @...@ in Makefile.am, now that we can rely on automake -# to emit a definition for each substituted variable. -# However, there is still one case in which @VAR@ use is not just -# legitimate, but actually required: when augmenting an automake-defined -# variable with a prefix. For example, gettext uses this: -# MAKEINFO = env LANG= LC_MESSAGES= LC_ALL= LANGUAGE= @MAKEINFO@ -# otherwise, makeinfo would put German or French (current locale) -# navigation hints in the otherwise-English documentation. -# -# Allow the package to add exceptions via a hook in cfg.mk; -# for example, @PRAGMA_SYSTEM_HEADER@ can be permitted by -# setting this to ' && !/PRAGMA_SYSTEM_HEADER/'. -_makefile_at_at_check_exceptions ?= -sc_makefile_at_at_check: - @perl -ne '/\@\w+\@/' \ - -e ' && !/(\w+)\s+=.*\@\1\@$$/' \ - -e ''$(_makefile_at_at_check_exceptions) \ - -e 'and (print "$$ARGV:$$.: $$_"), $$m=1; END {exit !$$m}' \ - $$($(VC_LIST_EXCEPT) | grep -E '(^|/)(Makefile\.am|[^/]+\.mk)$$') \ - && { echo '$(ME): use $$(...), not @...@' 1>&2; exit 1; } || : - -news-check: NEWS - $(AM_V_GEN)if $(SED) -n $(news-check-lines-spec)p $< \ - | grep -E $(news-check-regexp) >/dev/null; then \ - :; \ - else \ - echo 'NEWS: $$(news-check-regexp) failed to match' 1>&2; \ - exit 1; \ - fi - -sc_makefile_TAB_only_indentation: - @prohibit='^ [ ]{8}' \ - in_vc_files='akefile|\.mk$$' \ - halt='found TAB-8-space indentation' \ - $(_sc_search_regexp) - -sc_m4_quote_check: - @prohibit='(AC_DEFINE(_UNQUOTED)?|AC_DEFUN)\([^[]' \ - in_vc_files='(^configure\.ac|\.m4)$$' \ - halt='quote the first arg to AC_DEF*' \ - $(_sc_search_regexp) - -fix_po_file_diag = \ -'you have changed the set of files with translatable diagnostics;\n\ -apply the above patch\n' - -# Generate a list of files in which to search for translatable strings. -perl_translatable_files_list_ = \ - -e 'foreach $$file (@ARGV) {' \ - -e ' \# Consider only file extensions with one or two letters' \ - -e ' $$file =~ /\...?$$/ or next;' \ - -e ' \# Ignore m4 and mk files' \ - -e ' $$file =~ /\.m[4k]$$/ and next;' \ - -e ' \# Ignore a .c or .h file with a corresponding .l or .y file' \ - -e ' $$file =~ /(.+)\.[ch]$$/ && (-e "$${1}.l" || -e "$${1}.y")' \ - -e ' and next;' \ - -e ' \# Skip unreadable files' \ - -e ' -r $$file or next;' \ - -e ' print "$$file ";' \ - -e '}' - -# Verify that all source files using _() (more specifically, files that -# match $(_gl_translatable_string_re)) are listed in po/POTFILES.in. -po_file ?= $(srcdir)/po/POTFILES.in -generated_files ?= $(srcdir)/lib/*.[ch] -_gl_translatable_string_re ?= \b(N?_|gettext *)\([^)"]*("|$$) -sc_po_check: - @if test -f $(po_file); then \ - grep -E -v '^(#|$$)' $(po_file) \ - | grep -v '^src/false\.c$$' | sort > $@-1; \ - files=$$(perl $(perl_translatable_files_list_) \ - $$($(VC_LIST_EXCEPT)) $(generated_files)); \ - grep -E -l '$(_gl_translatable_string_re)' $$files \ - | $(SED) 's|^$(_dot_escaped_srcdir)/||' | sort -u > $@-2; \ - diff -u -L $(po_file) -L $(po_file) $@-1 $@-2 \ - || { printf '$(ME): '$(fix_po_file_diag) 1>&2; exit 1; }; \ - rm -f $@-1 $@-2; \ - fi - -# Sometimes it is useful to change the PATH environment variable -# in Makefiles. When doing so, it's better not to use the Unix-centric -# path separator of ':', but rather the automake-provided '$(PATH_SEPARATOR)'. -msg = 'Do not use ":" above; use $$(PATH_SEPARATOR) instead' -sc_makefile_path_separator_check: - @prohibit='PATH[=].*:' \ - in_vc_files='akefile|\.mk$$' \ - halt=$(msg) \ - $(_sc_search_regexp) - -# Check that 'make alpha' will not fail at the end of the process, -# i.e., when pkg-M.N.tar.xz already exists (either in "." or in ../release) -# and is read-only. -writable-files: - $(AM_V_GEN)if test -d $(release_archive_dir); then \ - for file in $(DIST_ARCHIVES); do \ - for p in ./ $(release_archive_dir)/; do \ - test -e $$p$$file || continue; \ - test -w $$p$$file \ - || { echo ERROR: $$p$$file is not writable; fail=1; }; \ - done; \ - done; \ - test "$$fail" && exit 1 || : ; \ - else :; \ - fi - -v_etc_file = $(gnulib_dir)/lib/version-etc.c -sample-test = tests/sample-test -texi = doc/$(PACKAGE).texi -# Make sure that the copyright date in $(v_etc_file) is up to date. -# Do the same for the $(sample-test) and the main doc/.texi file. -sc_copyright_check: - @require='enum { COPYRIGHT_YEAR = '$$(date +%Y)' };' \ - in_files=$(v_etc_file) \ - halt='out of date copyright in $(v_etc_file); update it' \ - $(_sc_search_regexp) - @require='# Copyright \(C\) '$$(date +%Y)' Free' \ - in_vc_files=$(sample-test) \ - halt='out of date copyright in $(sample-test); update it' \ - $(_sc_search_regexp) - @require='Copyright @copyright\{\} .*'$$(date +%Y) \ - in_vc_files=$(texi) \ - halt='out of date copyright in $(texi); update it' \ - $(_sc_search_regexp) - -# If tests/help-version exists and seems to be new enough, assume that its -# use of init.sh and path_prepend_ is correct, and ensure that every other -# use of init.sh is identical. -# This is useful because help-version cross-checks prog --version -# with $(VERSION), which verifies that its path_prepend_ invocation -# sets PATH correctly. This is an inexpensive way to ensure that -# the other init.sh-using tests also get it right. -_hv_file ?= $(srcdir)/tests/help-version -_hv_regex_weak ?= ^ *\. .*/init\.sh" -# Fix syntax-highlighters " -_hv_regex_strong ?= ^ *\. "\$${srcdir=\.}/init\.sh" -sc_cross_check_PATH_usage_in_tests: - @if test -f $(_hv_file); then \ - grep -l 'VERSION mismatch' $(_hv_file) >/dev/null \ - || { echo "$@: skipped: no such file: $(_hv_file)" 1>&2; \ - exit 0; }; \ - grep -lE '$(_hv_regex_strong)' $(_hv_file) >/dev/null \ - || { echo "$@: $(_hv_file) lacks conforming use of init.sh" 1>&2; \ - exit 1; }; \ - good=$$(grep -E '$(_hv_regex_strong)' $(_hv_file)); \ - grep -LFx "$$good" \ - $$(grep -lE '$(_hv_regex_weak)' $$($(VC_LIST_EXCEPT))) \ - | grep . && \ - { echo "$(ME): the above files use path_prepend_ inconsistently" \ - 1>&2; exit 1; } || :; \ - fi - -# BRE regex of file contents to identify a test script. -_test_script_regex ?= \ - -# In tests, use "compare expected actual", not the reverse. -sc_prohibit_reversed_compare_failure: - @prohibit='\ vc-diffs || : - $(AM_V_at)if test -s vc-diffs; then \ - cat vc-diffs; \ - echo "Some files are locally modified:" 1>&2; \ - exit 1; \ - else \ - rm vc-diffs; \ - fi - -rel-files = $(DIST_ARCHIVES) - -gnulib-version = $$(cd $(gnulib_dir) \ - && { git describe || git rev-parse --short=10 HEAD; } ) -bootstrap-tools ?= autoconf,automake,gnulib - -gpgv = $$(gpgv2 --version >/dev/null && echo gpgv2 || echo gpgv) -# If it's not already specified, derive the GPG key ID from -# the signed tag we've just applied to mark this release. -gpg_key_ID ?= \ - $$(cd $(srcdir) \ - && git cat-file tag v$(VERSION) \ - | $(gpgv) --status-fd 1 --keyring /dev/null - - 2>/dev/null \ - | awk '/^\[GNUPG:\] ERRSIG / {print $$3; exit}') - -translation_project_ ?= coordinator@translationproject.org - -# Make info-gnu the default only for a stable release. -announcement_Cc_stable = $(translation_project_), $(PACKAGE_BUGREPORT) -announcement_mail_headers_stable = \ - To: info-gnu@gnu.org \ - Cc: $(announcement_Cc_) \ - Mail-Followup-To: $(PACKAGE_BUGREPORT) - -announcement_Cc_alpha = $(translation_project_) -announcement_mail_headers_alpha = \ - To: $(PACKAGE_BUGREPORT) \ - Cc: $(announcement_Cc_) - -announcement_mail_Cc_beta = $(announcement_mail_Cc_alpha) -announcement_mail_headers_beta = $(announcement_mail_headers_alpha) - -announcement_mail_Cc_ ?= $(announcement_mail_Cc_$(release-type)) -announcement_mail_headers_ ?= $(announcement_mail_headers_$(release-type)) -announcement: NEWS ChangeLog $(rel-files) -# Not $(AM_V_GEN) since the output of this command serves as -# announcement message: it would start with " GEN announcement". - $(AM_V_at)$(srcdir)/$(_build-aux)/announce-gen \ - --mail-headers='$(announcement_mail_headers_)' \ - --release-type=$(release-type) \ - --package=$(PACKAGE) \ - --prev=$(PREV_VERSION) \ - --curr=$(VERSION) \ - --gpg-key-id=$(gpg_key_ID) \ - --srcdir=$(srcdir) \ - --news=$(srcdir)/NEWS \ - --bootstrap-tools=$(bootstrap-tools) \ - $$(case ,$(bootstrap-tools), in (*,gnulib,*) \ - echo --gnulib-version=$(gnulib-version);; esac) \ - --no-print-checksums \ - $(addprefix --url-dir=, $(url_dir_list)) - -.PHONY: release-commit -release-commit: - $(AM_V_GEN)cd $(srcdir) \ - && $(_build-aux)/do-release-commit-and-tag \ - -C $(abs_builddir) $(RELEASE) - -## ---------------- ## -## Updating files. ## -## ---------------- ## - -ftp-gnu = ftp://ftp.gnu.org/gnu -www-gnu = http://www.gnu.org - -upload_dest_dir_ ?= $(PACKAGE) -upload_command = \ - $(srcdir)/$(_build-aux)/gnupload $(GNUPLOADFLAGS) \ - --to $(gnu_rel_host):$(upload_dest_dir_) \ - $(rel-files) -emit_upload_commands: - @echo ===================================== - @echo ===================================== - @echo '$(upload_command)' - @echo '# send the ~/announce-$(my_distdir) e-mail' - @echo ===================================== - @echo ===================================== - -.PHONY: upload -upload: - $(AM_V_GEN)$(upload_command) - -define emit-commit-log - printf '%s\n' 'maint: post-release administrivia' '' \ - '* NEWS: Add header line for next release.' \ - '* .prev-version: Record previous version.' \ - '* cfg.mk (old_NEWS_hash): Auto-update.' -endef - -.PHONY: no-submodule-changes -no-submodule-changes: - $(AM_V_GEN)if test -d $(srcdir)/.git \ - && git --version >/dev/null 2>&1; then \ - diff=$$(cd $(srcdir) && git submodule -q foreach \ - git diff-index --name-only HEAD) \ - || exit 1; \ - case $$diff in '') ;; \ - *) echo '$(ME): submodule files are locally modified:'; \ - echo "$$diff"; exit 1;; esac; \ - else \ - : ; \ - fi - -submodule-checks ?= no-submodule-changes public-submodule-commit - -# Ensure that each sub-module commit we're using is public. -# Without this, it is too easy to tag and release code that -# cannot be built from a fresh clone. -.PHONY: public-submodule-commit -public-submodule-commit: - $(AM_V_GEN)if test -d $(srcdir)/.git \ - && git --version >/dev/null 2>&1; then \ - cd $(srcdir) && \ - git submodule --quiet foreach \ - 'test "$$(git rev-parse "$$sha1")" \ - = "$$(git merge-base origin "$$sha1")"' \ - || { echo '$(ME): found non-public submodule commit' >&2; \ - exit 1; }; \ - else \ - : ; \ - fi -# This rule has a high enough utility/cost ratio that it should be a -# dependent of "check" by default. However, some of us do occasionally -# commit a temporary change that deliberately points to a non-public -# submodule commit, and want to be able to use rules like "make check". -# In that case, run e.g., "make check gl_public_submodule_commit=" -# to disable this test. -gl_public_submodule_commit ?= public-submodule-commit -check: $(gl_public_submodule_commit) - -.PHONY: alpha beta stable release -ALL_RECURSIVE_TARGETS += alpha beta stable -alpha beta stable: $(local-check) writable-files $(submodule-checks) - $(AM_V_GEN)test $@ = stable \ - && { echo $(VERSION) | grep -E '^[0-9]+(\.[0-9]+)+$$' \ - || { echo "invalid version string: $(VERSION)" 1>&2; exit 1;};}\ - || : - $(AM_V_at)$(MAKE) vc-diff-check - $(AM_V_at)$(MAKE) news-check - $(AM_V_at)$(MAKE) distcheck - $(AM_V_at)$(MAKE) dist - $(AM_V_at)$(MAKE) $(release-prep-hook) RELEASE_TYPE=$@ - $(AM_V_at)$(MAKE) -s emit_upload_commands RELEASE_TYPE=$@ - -release: - $(AM_V_GEN)$(MAKE) _version - $(AM_V_GEN)$(MAKE) $(release-type) - -# Override this in cfg.mk if you follow different procedures. -release-prep-hook ?= release-prep - -gl_noteworthy_news_ = * Noteworthy changes in release ?.? (????-??-??) [?] -.PHONY: release-prep -release-prep: - $(AM_V_GEN)$(MAKE) --no-print-directory -s announcement \ - > ~/announce-$(my_distdir) - $(AM_V_at)if test -d $(release_archive_dir); then \ - ln $(rel-files) $(release_archive_dir); \ - chmod a-w $(rel-files); \ - fi - $(AM_V_at)echo $(VERSION) > $(prev_version_file) - $(AM_V_at)$(MAKE) update-NEWS-hash - $(AM_V_at)perl -pi \ - -e '$$. == 3 and print "$(gl_noteworthy_news_)\n\n\n"' \ - $(srcdir)/NEWS - $(AM_V_at)msg=$$($(emit-commit-log)) || exit 1; \ - cd $(srcdir) && $(VC) commit -m "$$msg" -a - -# Override this with e.g., -s $(srcdir)/some_other_name.texi -# if the default $(PACKAGE)-derived name doesn't apply. -gendocs_options_ ?= - -.PHONY: web-manual -web-manual: - $(AM_V_GEN)test -z "$(manual_title)" \ - && { echo define manual_title in cfg.mk 1>&2; exit 1; } || : - $(AM_V_at)cd '$(srcdir)/doc'; \ - $(SHELL) ../$(_build-aux)/gendocs.sh $(gendocs_options_) \ - -o '$(abs_builddir)/doc/manual' \ - --email $(PACKAGE_BUGREPORT) $(PACKAGE) \ - "$(PACKAGE_NAME) - $(manual_title)" - $(AM_V_at)echo " *** Upload the doc/manual directory to web-cvs." - -.PHONY: web-manual-update -web-manual-update: - $(AM_V_GEN)cd $(srcdir) \ - && $(_build-aux)/gnu-web-doc-update -C $(abs_builddir) - - -# Code Coverage - -init-coverage: - $(MAKE) $(AM_MAKEFLAGS) clean - lcov --directory . --zerocounters - -COVERAGE_CCOPTS ?= "-g --coverage" -COVERAGE_OUT ?= doc/coverage - -build-coverage: - $(MAKE) $(AM_MAKEFLAGS) CFLAGS=$(COVERAGE_CCOPTS) CXXFLAGS=$(COVERAGE_CCOPTS) - $(MAKE) $(AM_MAKEFLAGS) CFLAGS=$(COVERAGE_CCOPTS) CXXFLAGS=$(COVERAGE_CCOPTS) check - mkdir -p $(COVERAGE_OUT) - lcov --directory . --output-file $(COVERAGE_OUT)/$(PACKAGE).info \ - --capture - -gen-coverage: - genhtml --output-directory $(COVERAGE_OUT) \ - $(COVERAGE_OUT)/$(PACKAGE).info \ - --highlight --frames --legend \ - --title "$(PACKAGE_NAME)" - -coverage: - $(MAKE) init-coverage - $(MAKE) build-coverage - $(MAKE) gen-coverage - -# Some projects carry local adjustments for gnulib modules via patches in -# a gnulib patch directory whose default name is gl/ (defined in bootstrap -# via local_gl_dir=gl). Those patches become stale as the originals evolve -# in gnulib. Use this rule to refresh any stale patches. It applies each -# patch to the original in $(gnulib_dir) and uses the temporary result to -# generate a fuzz-free .diff file. If you customize the name of your local -# gnulib patch directory via bootstrap.conf, this rule detects that name. -# Run this from a non-VPATH (i.e., srcdir) build directory. -.PHONY: refresh-gnulib-patches -refresh-gnulib-patches: - gl=gl; \ - if test -f bootstrap.conf; then \ - t=$$(perl -lne '/^\s*local_gl_dir=(\S+)/ and $$d=$$1;' \ - -e 'END{defined $$d and print $$d}' bootstrap.conf); \ - test -n "$$t" && gl=$$t; \ - fi; \ - for diff in $$(cd $$gl; git ls-files | grep '\.diff$$'); do \ - b=$$(printf %s "$$diff"|$(SED) 's/\.diff$$//'); \ - VERSION_CONTROL=none \ - patch "$(gnulib_dir)/$$b" "$$gl/$$diff" || exit 1; \ - ( cd $(gnulib_dir) || exit 1; \ - git diff "$$b" > "../$$gl/$$diff"; \ - git checkout $$b ) || exit 1; \ - done - -# Update gettext files. -PACKAGE ?= $(shell basename $(PWD)) -PO_DOMAIN ?= $(PACKAGE) -POURL = http://translationproject.org/latest/$(PO_DOMAIN)/ -PODIR ?= po -refresh-po: - rm -f $(PODIR)/*.po && \ - echo "$(ME): getting translations into po (please ignore the robots.txt ERROR 404)..." && \ - wget --no-verbose --directory-prefix $(PODIR) --no-directories --recursive --level 1 --accept .po --accept .po.1 $(POURL) && \ - echo 'en@boldquot' > $(PODIR)/LINGUAS && \ - echo 'en@quot' >> $(PODIR)/LINGUAS && \ - ls $(PODIR)/*.po | $(SED) 's/\.po//;s,$(PODIR)/,,' | \ - sort >> $(PODIR)/LINGUAS - - # Running indent once is not idempotent, but running it twice is. -INDENT_SOURCES ?= $(C_SOURCES) -.PHONY: indent -indent: - indent $(INDENT_SOURCES) - indent $(INDENT_SOURCES) - -# If you want to set UPDATE_COPYRIGHT_* environment variables, -# put the assignments in this variable. -update-copyright-env ?= - -# Run this rule once per year (usually early in January) -# to update all FSF copyright year lists in your project. -# If you have an additional project-specific rule, -# add it in cfg.mk along with a line 'update-copyright: prereq'. -# By default, exclude all variants of COPYING; you can also -# add exemptions (such as ChangeLog..* for rotated change logs) -# in the file .x-update-copyright. -.PHONY: update-copyright -update-copyright: - $(AM_V_GEN)grep -l -w Copyright \ - $$(export VC_LIST_EXCEPT_DEFAULT=COPYING && $(VC_LIST_EXCEPT)) \ - | $(update-copyright-env) xargs $(srcdir)/$(_build-aux)/$@ - -# This tight_scope test is skipped with a warning if $(_gl_TS_headers) is not -# overridden and $(_gl_TS_dir)/Makefile.am does not mention noinst_HEADERS. - -# NOTE: to override any _gl_TS_* default value, you must -# define the variable(s) using "export" in cfg.mk. -_gl_TS_dir ?= src - -ALL_RECURSIVE_TARGETS += sc_tight_scope -sc_tight_scope: tight-scope.mk - @fail=0; \ - if ! grep '^ *export _gl_TS_headers *=' $(srcdir)/cfg.mk \ - > /dev/null \ - && ! grep -w noinst_HEADERS $(srcdir)/$(_gl_TS_dir)/Makefile.am \ - > /dev/null 2>&1; then \ - echo '$(ME): skipping $@'; \ - else \ - $(MAKE) -s -C $(_gl_TS_dir) \ - -f Makefile \ - -f $(abs_top_srcdir)/cfg.mk \ - -f $(abs_top_builddir)/$< \ - _gl_tight_scope \ - || fail=1; \ - fi; \ - rm -f $<; \ - exit $$fail - -tight-scope.mk: $(ME) - @rm -f $@ $@-t - @perl -ne '/^# TS-start/.../^# TS-end/ and print' $(srcdir)/$(ME) > $@-t - @chmod a=r $@-t && mv $@-t $@ - -ifeq (a,b) -# TS-start - -# Most functions should have static scope. -# Any that don't must be marked with 'extern', but 'main' -# and 'usage' are exceptions: they're always extern, but -# do not need to be marked. Symbols matching '__.*' are -# reserved by the compiler, so are automatically excluded below. -_gl_TS_unmarked_extern_functions ?= main usage -_gl_TS_function_match ?= /^(?:$(_gl_TS_extern)) +.*?(\w+) *\(/ - -# If your project uses a macro like "XTERN", then put -# the following in cfg.mk to override this default: -# export _gl_TS_extern = extern|XTERN -_gl_TS_extern ?= extern - -# The second nm|grep checks for file-scope variables with 'extern' scope. -# Without gnulib's progname module, you might put program_name here. -# Symbols matching '__.*' are reserved by the compiler, -# so are automatically excluded below. -_gl_TS_unmarked_extern_vars ?= - -# NOTE: the _match variables are perl expressions -- not mere regular -# expressions -- so that you can extend them to match other patterns -# and easily extract matched variable names. -# For example, if your project declares some global variables via -# a macro like this: GLOBAL(type, var_name, initializer), then you -# can override this definition to automatically extract those names: -# export _gl_TS_var_match = \ -# /^(?:$(_gl_TS_extern)) .*?\**(\w+)(\[.*?\])?;/ || /\bGLOBAL\(.*?,\s*(.*?),/ -_gl_TS_var_match ?= /^(?:$(_gl_TS_extern)) .*?(\w+)(\[.*?\])?;/ - -# The names of object files in (or relative to) $(_gl_TS_dir). -_gl_TS_obj_files ?= *.$(OBJEXT) - -# Files in which to search for the one-line style extern declarations. -# $(_gl_TS_dir)-relative. -_gl_TS_headers ?= $(noinst_HEADERS) -_gl_TS_other_headers ?= *.h - -.PHONY: _gl_tight_scope -_gl_tight_scope: $(bin_PROGRAMS) - sed_wrap='s/^/^_?/;s/$$/$$/'; \ - t=exceptions-$$$$; \ - trap 's=$$?; rm -f $$t; exit $$s' 0; \ - for sig in 1 2 3 13 15; do \ - eval "trap 'v=`expr $$sig + 128`; (exit $$v); exit $$v' $$sig"; \ - done; \ - src=`for f in $(SOURCES); do \ - test -f $$f && d= || d=$(srcdir)/; echo $$d$$f; done`; \ - hdr=`for f in $(_gl_TS_headers); do \ - test -f $$f && d= || d=$(srcdir)/; echo $$d$$f; done`; \ - ( printf '%s\n' '__.*' $(_gl_TS_unmarked_extern_functions); \ - grep -h -A1 '^extern .*[^;]$$' $$src \ - | grep -vE '^(extern |--|#)' | $(SED) 's/ .*//; /^$$/d'; \ - perl -lne \ - '$(_gl_TS_function_match) and print $$1' $$hdr; \ - ) | sort -u | $(SED) "$$sed_wrap" > $$t; \ - nm -g $(_gl_TS_obj_files)|$(SED) -n 's/.* T //p'|grep -Ev -f $$t \ - && { echo the above functions should have static scope >&2; \ - exit 1; } || : ; \ - ( printf '%s\n' '__.*' main $(_gl_TS_unmarked_extern_vars); \ - perl -lne '$(_gl_TS_var_match) and print $$1' \ - $$hdr $(_gl_TS_other_headers) \ - ) | sort -u | $(SED) "$$sed_wrap" > $$t; \ - nm -g $(_gl_TS_obj_files) | $(SED) -n 's/.* [BCDGRS] //p' \ - | sort -u | grep -Ev -f $$t \ - && { echo the above variables should have static scope >&2; \ - exit 1; } || : -# TS-end -endif diff --git a/msvc/build_debug.bat b/msvc/build_debug.bat deleted file mode 100644 index c1576ab..0000000 --- a/msvc/build_debug.bat +++ /dev/null @@ -1,11 +0,0 @@ -@echo off - -echo build 32 bit DEBUG -gmake -f libtasn1.mak VSTOOLSET=VS140 CONFIG=Debug ARCH=32 clean >nul -gmake -f libtasn1.mak VSTOOLSET=VS140 CONFIG=Debug ARCH=32 -gmake -f test_parser.mak VSTOOLSET=VS140 CONFIG=Debug ARCH=32 -echo build 64 bit DEBUG -gmake -f libtasn1.mak VSTOOLSET=VS140 CONFIG=Debug ARCH=64 clean >nul -gmake -f libtasn1.mak VSTOOLSET=VS140 CONFIG=Debug ARCH=64 -gmake -f test_parser.mak VSTOOLSET=VS140 CONFIG=Debug ARCH=64 - diff --git a/msvc/build_release.bat b/msvc/build_release.bat deleted file mode 100644 index 7bcae24..0000000 --- a/msvc/build_release.bat +++ /dev/null @@ -1,9 +0,0 @@ -@echo off - -echo build 32 bit RELEASE -gmake -f libtasn1.mak VSTOOLSET=VS140 CONFIG=Release ARCH=32 clean -gmake -f libtasn1.mak VSTOOLSET=VS140 CONFIG=Release ARCH=32 -echo build 64 bit RELEASE -gmake -f libtasn1.mak VSTOOLSET=VS140 CONFIG=Release ARCH=64 clean -gmake -f libtasn1.mak VSTOOLSET=VS140 CONFIG=Release ARCH=64 - diff --git a/msvc/libtasn1.mak b/msvc/libtasn1.mak deleted file mode 100644 index ddc3209..0000000 --- a/msvc/libtasn1.mak +++ /dev/null @@ -1,42 +0,0 @@ -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# Makefile to build libtasn1 as static library (libtasn1.lib) - -# Written by Vasiliy Olekhov November 2016. - -VPATH=../gl:../lib:../lib/gllib - -SRC= ASN1.c coding.c decoding.c element.c errors.c gstr.c -SRC+= parser_aux.c structure.c version.c -SRC+= strverscmp.c hash-pjw-bare.c - -TARGET=libtasn1.lib - -ifeq ($(ARCH), 64) -ULSIZE=8 -else -ULSIZE=4 -endif - -CFLAGS+=/D inline=__inline /D ASN1_STATIC /D _CRT_SECURE_NO_WARNINGS /D ASN1_API= -CFLAGS+=/D SIZEOF_UNSIGNED_INT=4 /D SIZEOF_UNSIGNED_LONG_INT=$(ULSIZE) -CFLAGS+=/D HAVE_CONFIG_H -CFLAGS+=-I ../lib/gllib -I ../lib -I ../gl /I . -I .. - -# GLib stuff -CFLAGS+=/D _GL_ATTRIBUTE_PURE= -# snprintf workaround -CFLAGS+=/FI ./snprintf.h - -include msvc_lib.mk diff --git a/msvc/msvc_exe.mk b/msvc/msvc_exe.mk deleted file mode 100644 index 0c42f24..0000000 --- a/msvc/msvc_exe.mk +++ /dev/null @@ -1,49 +0,0 @@ -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# Makefile to build something to console executable (.exe) -# requires gnu make 4.0, some posix tools (mkdir, rm) - -# set C sources to SRC var, extra libs to EXTRA_LIBS -# set TARGET to executable (e.g. runtest.exe) - -# Written by Vasiliy Olekhov November 2016. - - -include vcvars.mk - -#$(info Building $(ARCH) bits $(CONFIG)) - -MKDIR_P=C:/gow/bin/mkdir.exe -p - -BUILD_PATH=build/$(ARCH)/$(CONFIG) -BUILD_DIRS+=$(BUILD_PATH) - -LDFLAGS+=/libpath:'build/$(ARCH)/$(CONFIG)' - -OBJS=$(addprefix $(BUILD_PATH)/,$(SRC:.c=.obj)) - -all: $(BUILD_DIRS) $(BUILD_PATH)/$(TARGET) - -$(BUILD_PATH)/$(TARGET): $(BUILD_DIRS) $(OBJS) - $(LD) $(LDFLAGS) $(OBJS) $(EXTRA_LIBS) /OUT:$@ - -$(BUILD_PATH)/%.obj: %.c $(EXTRA_DEPS) - $(CC) $(CFLAGS) $(CDEBUG) $< /Fo$@ - -$(BUILD_DIRS): - $(MKDIR_P) $@ - -clean: - rm -f $(OBJS) $(BUILD_PATH)/$(TARGET) - diff --git a/msvc/msvc_lib.mk b/msvc/msvc_lib.mk deleted file mode 100644 index 0289969..0000000 --- a/msvc/msvc_lib.mk +++ /dev/null @@ -1,46 +0,0 @@ -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# Makefile to build something to static library (.lib) -# requires gnu make 4.0, some posix tools (mkdir, rm) - -# set C sources to SRC var, extra libs to EXTRA_LIBS -# set TARGET to library name (e.g. mylibrary.lib) - -# Written by Vasiliy Olekhov November 2016. - - -include vcvars.mk - -#$(info Building $(ARCH) bits $(CONFIG)) - -MKDIR_P=C:/gow/bin/mkdir.exe -p - -BUILD_PATH=build/$(ARCH)/$(CONFIG) -BUILD_DIRS+=$(BUILD_PATH) - -OBJS=$(addprefix $(BUILD_PATH)/,$(SRC:.c=.obj)) - -all: $(BUILD_DIRS) $(BUILD_PATH)/$(TARGET) - -$(BUILD_PATH)/$(TARGET): $(BUILD_DIRS) $(OBJS) - $(LIB) $(LIBFLAGS) $(OBJS) /OUT:$@ - -$(BUILD_PATH)/%.obj: %.c $(EXTRA_DEPS) - $(CC) $(CFLAGS) $(CDEBUG) $< /Fo$@ - -$(BUILD_DIRS): - $(MKDIR_P) $@ - -clean: - rm -f $(OBJS) $(BUILD_PATH)/$(TARGET) diff --git a/msvc/snprintf.h b/msvc/snprintf.h deleted file mode 100644 index a26247f..0000000 --- a/msvc/snprintf.h +++ /dev/null @@ -1,33 +0,0 @@ -#if defined(_MSC_VER) && _MSC_VER <= 1900 -#include -#include - - -#define snprintf c99_snprintf -#define vsnprintf c99_vsnprintf - -__inline int c99_vsnprintf(char *outBuf, size_t size, const char *format, va_list ap) -{ - int count = -1; - - if (size != 0) - count = _vsnprintf_s(outBuf, size, _TRUNCATE, format, ap); - if (count == -1) - count = _vscprintf(format, ap); - - return count; -} - -__inline int c99_snprintf(char *outBuf, size_t size, const char *format, ...) -{ - int count; - va_list ap; - - va_start(ap, format); - count = c99_vsnprintf(outBuf, size, format, ap); - va_end(ap); - - return count; -} - -#endif \ No newline at end of file diff --git a/msvc/test_parser.mak b/msvc/test_parser.mak deleted file mode 100644 index 3999d98..0000000 --- a/msvc/test_parser.mak +++ /dev/null @@ -1,31 +0,0 @@ -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# Makefile to build test_parser.exe - -# Written by Vasiliy Olekhov November 2016. - -VPATH=../tests - -SRC= Test_parser.c - -TARGET=Test_parser.exe - -CFLAGS+=/D ASN1_STATIC -CFLAGS+=/D _CRT_SECURE_NO_WARNINGS -CFLAGS+=/D ASN1_API= -CFLAGS+=-I ../lib - -EXTRA_LIBS=libtasn1.lib - -include msvc_exe.mk diff --git a/msvc/vcvars.mk b/msvc/vcvars.mk deleted file mode 100644 index 32a6b70..0000000 --- a/msvc/vcvars.mk +++ /dev/null @@ -1,138 +0,0 @@ -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# This is a vcvarsall.bat replacement, makefile style -# Needs gmake 4.0 -# You may encounter Windows builds of gnu make v.3.81. These are full of bugs. -# You should get gnu make at least of version 4.0. -# Better compile it yourself. Get sources from - -# This script tries to guess paths to compiler and SDK. - -# You need some posix tools in path: grep cut - -# Written by Vasiliy Olekhov November 2016. - -IS4MAKE=$(findstring z4, z$(MAKE_VERSION)) - -ifneq ($(IS4MAKE),z4) -$(error Need GNU MAKE 4.0 or higher) -endif - -# Visual Studio Toolset. This is toolchain: compiler, linker, etc -# VS120 = VisualStudio 2013 -# VS140 = VisualStudio 2015 -# Check your environment variable $(VS??COMNTOOLS). -# See also -# You may have different VS installed. -VSTOOLSET?=VS120 -# Target platform: 32 or 64 -ARCH?=32 -# Target configuration: Debug or Release -CONFIG?=Release - -# SDK Version. This is library set: standard C library etc. -# You can compile with different Visual Studios and different SDKs -# More info: -# You may have different SDKs installed. Set here what you need. - -# -SDKVER=v8.1 -SDKSUBVER=winv6.3 -# Tested with VS2015 (VSTOOLSET=VS140) and VS2013 (VSTOOLSET=VS120): -# SDKVER=v8.1 SDKSUBVER=winv6.3 -# SDKVER=v10.0 SDKSUBVER=10.0.14393.0 - -# VS110 (VisualStudio 2012) and earlier do not support C99 -# (e.g. array initialization by index), don't bother - -# VSTOOLSET is commonly set in environment. -# No matter whether you're running make from VS command prompt or not. -TOOLS=$($(VSTOOLSET)COMNTOOLS) -ifeq ($(TOOLS), ) -$(error Toolset not found. Check "$(VSTOOLSET)COMNTOOLS" environment variable) -else -#$(info Using toolset $(TOOLS)) -endif - -# Guess paths to SDKs -SDKKEY=SOFTWARE\Microsoft\Microsoft SDKs\Windows -SDK64KEY=SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows - -SDK!=reg query "HKLM\$(SDKKEY)\$(SDKVER)" 2>nul | grep InstallationFolder | cut -c 37- -ifeq ($(SDK), ) -#$(info not found in HKLM 32bit) -SDK!=reg query "HKLM\$(SDK64KEY)\$(SDKVER)" 2>nul | grep InstallationFolder | cut -c 37- -endif -ifeq ($(SDK), ) -#$(info not found in HKLM 64bit) -SDK!=reg query "HKCU\$(SDKKEY)\$(SDKVER)" 2>nul | grep InstallationFolder | cut -c 37- -endif -ifeq ($(SDK), ) -#$(info not found in HKCU 32bit) -SDK!=reg query "HKCU\$(SDK64KEY)\$(SDKVER)"2>nul | grep InstallationFolder | cut -c 37- -endif -ifeq ($(SDK), ) -$(error Can not find SDK installation.) -endif -#$(info SDK= [$(SDK)]) - -SDK := $(subst \,/,$(SDK)) - -VCROOT=$(subst \,/,$(TOOLS))../../vc -VCINC=$(VCROOT)/Include -#$(info VCROOT=$(VCROOT)) - -ifeq ($(ARCH), 64) -BIN=$(VCROOT)/bin/amd64 -VCLIB=$(VCROOT)/LIB/amd64 -SDKLIB=$(SDK)/lib/$(SDKSUBVER)/um/x64 -UCRTLIB=$(SDK)/lib/$(SDKSUBVER)/ucrt/x64 -else -BIN=$(VCROOT)/bin -VCLIB=$(VCROOT)/lib -SDKLIB=$(SDK)/lib/$(SDKSUBVER)/um/x86 -UCRTLIB=$(SDK)/lib/$(SDKSUBVER)/ucrt/x86 -endif - -$(info Building $(ARCH) bits $(CONFIG)) - -CC='$(BIN)/cl.exe' -CFLAGS+=/nologo -c -CFLAGS+=/EHsc -CFLAGS+=/I '$(VCINC)' /I '$(SDK)Include/um' - -LD='$(BIN)/link.exe' -LDFLAGS+=/nologo /libpath:'$(VCLIB)' /libpath:'$(SDKLIB)' /libpath:'$(UCRTLIB)' - -LIB='$(BIN)/lib.exe' -LIBFLAGS+=/nologo - -# Please, check debug flags to meet your needs - -# MSVC runtime is compiled-in (static build) -# Otherwise you need spare MSVCR???(D).dll lying -# somewhere around at runtime. - -# Please note that it is strongly advised to match -# runtime versions of library and user code. - -# If you need that dynamically linked, change /MTd to /MDd (debug) -# and /MT to /MD (release) -ifeq ($(CONFIG), Debug) -CDEBUG=/DEBUG /Zi /W3 /WX- /sdl /Od /Oy- /D _DEBUG /RTC1 /MTd /GS /Gd /TC /analyze- -LDEBUG=/DEBUG /MTd -else -CDEBUG=/MT -LDEBUG=/MT -endif diff --git a/src/Makefile.am b/src/Makefile.am deleted file mode 100644 index 06439b4..0000000 --- a/src/Makefile.am +++ /dev/null @@ -1,30 +0,0 @@ -## Process this file with automake to produce Makefile.in -# Copyright (C) 2002-2014 Free Software Foundation, Inc. -# -# This file is part of LIBTASN1. -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -AM_CFLAGS = $(WARN_CFLAGS) $(WERROR_CFLAGS) -AM_CPPFLAGS = -I$(top_srcdir)/lib -I$(top_srcdir)/gl -I$(top_builddir)/gl - -LDADD = ../lib/libtasn1.la ../gl/libgnu.la - -bin_PROGRAMS = asn1Parser asn1Coding asn1Decoding - -asn1Parser_SOURCES = asn1Parser.c - -asn1Coding_SOURCES = asn1Coding.c - -asn1Decoding_SOURCES = asn1Decoding.c benchmark.c benchmark.h diff --git a/src/asn1Coding.c b/src/asn1Coding.c deleted file mode 100644 index b516bfe..0000000 --- a/src/asn1Coding.c +++ /dev/null @@ -1,359 +0,0 @@ -/* asn1Coding.c --- program to generate a DER coding of an ASN1 definition. - * Copyright (C) 2002-2014 Free Software Foundation, Inc. - * - * This file is part of LIBTASN1. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -#include - -#include -#include -#include -#include -#include - -#include - -#include -#include - -/* This feature is available in gcc versions 2.5 and later. */ -#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) -#define ATTR_NO_RETRUN -#else -#define ATTR_NO_RETRUN __attribute__ ((__noreturn__)) -#endif - -ATTR_NO_RETRUN static void -usage (int status) -{ - if (status != EXIT_SUCCESS) - fprintf (stderr, "Try `%s --help' for more information.\n", program_name); - else - { - printf ("\ -Usage: %s [OPTION] DEFINITIONS ASSIGNMENTS\n", program_name); - printf ("\ -Generates a DER encoding of ASN.1 DEFINITIONS file\n\ -and ASSIGNMENTS file with value assignments.\n\ -\n"); - printf ("\ -Mandatory arguments to long options are mandatory for short options too.\n\ - -c, --check checks the syntax only\n\ - -o, --output=FILE output file\n\ - -h, --help display this help and exit\n\ - -v, --version output version information and exit\n"); - emit_bug_reporting_address (); - } - exit (status); -} - -#define ASSIGNMENT_SUCCESS 1 -#define ASSIGNMENT_ERROR 2 -#define ASSIGNMENT_EOF 3 - -static int -readAssignment (FILE * file, char *varName, char *value) -{ - - int ret; - - ret = fscanf (file, "%s", varName); - if (ret == EOF) - return ASSIGNMENT_EOF; - if (!strcmp (varName, "''")) - varName[0] = 0; - - ret = fscanf (file, "%s", value); - if (ret == EOF) - return ASSIGNMENT_ERROR; - - return ASSIGNMENT_SUCCESS; -} - -static void -createFileName (char *inputFileName, char **outputFileName) -{ - char *char_p, *slash_p, *dot_p; - - /* searching the last '/' and '.' in inputFileAssignmentName */ - char_p = inputFileName; - slash_p = inputFileName; - while ((char_p = strchr (char_p, '/'))) - { - char_p++; - slash_p = char_p; - } - - char_p = slash_p; - dot_p = inputFileName + strlen (inputFileName); - - while ((char_p = strchr (char_p, '.'))) - { - dot_p = char_p; - char_p++; - } - - /* outputFileName= inputFileName + .out */ - *outputFileName = (char *) malloc (dot_p - inputFileName + 1 + - strlen (".out")); - memcpy (*outputFileName, inputFileName, dot_p - inputFileName); - (*outputFileName)[dot_p - inputFileName] = 0; - strcat (*outputFileName, ".out"); - return; -} - -int -main (int argc, char *argv[]) -{ - static const struct option long_options[] = { - {"help", no_argument, 0, 'h'}, - {"version", no_argument, 0, 'v'}, - {"check", no_argument, 0, 'c'}, - {"output", required_argument, 0, 'o'}, - {0, 0, 0, 0} - }; - int option_index = 0; - int option_result; - char *outputFileName = NULL; - char *inputFileAsnName = NULL; - char *inputFileAssignmentName = NULL; - int checkSyntaxOnly = 0; - asn1_node definitions = NULL; - asn1_node structure = NULL; - char errorDescription[ASN1_MAX_ERROR_DESCRIPTION_SIZE]; - int asn1_result = ASN1_SUCCESS; - FILE *outputFile; - FILE *inputFile; - char varName[1024]; - char value[1024]; - unsigned char *der = NULL; - int der_len; - int k; - int last_ra; - - set_program_name (argv[0]); - - opterr = 0; /* disable error messages from getopt */ - - while (1) - { - - option_result = - getopt_long (argc, argv, "hvco:", long_options, &option_index); - - if (option_result == -1) - break; - - switch (option_result) - { - case 'h': /* HELP */ - free (outputFileName); - usage (EXIT_SUCCESS); - break; - case 'v': /* VERSION */ - version_etc (stdout, program_name, PACKAGE, VERSION, - "Fabio Fiorina", NULL); - free (outputFileName); - exit (0); - break; - case 'c': /* CHECK SYNTAX */ - checkSyntaxOnly = 1; - break; - case 'o': /* OUTPUT */ - outputFileName = (char *) malloc (strlen (optarg) + 1); - strcpy (outputFileName, optarg); - break; - case '?': /* UNKNOW OPTION */ - free (outputFileName); - fprintf (stderr, - "asn1Coding: option '%s' not recognized or without argument.\n\n", - argv[optind - 1]); - usage (EXIT_FAILURE); - break; - default: - fprintf (stderr, - "asn1Coding: ?? getopt returned character code Ox%x ??\n", - (unsigned)option_result); - } - } - - if (optind == argc || optind == argc - 1) - { - free (outputFileName); - fputs ("asn1Coding: input files missing\n", stderr); - usage (EXIT_FAILURE); - } - - inputFileAsnName = (char *) malloc (strlen (argv[optind]) + 1); - strcpy (inputFileAsnName, argv[optind]); - - inputFileAssignmentName = (char *) malloc (strlen (argv[optind + 1]) + 1); - strcpy (inputFileAssignmentName, argv[optind + 1]); - - asn1_result = - asn1_parser2tree (inputFileAsnName, &definitions, errorDescription); - - switch (asn1_result) - { - case ASN1_SUCCESS: - fputs ("Parse: done.\n", stderr); - break; - case ASN1_FILE_NOT_FOUND: - fprintf (stderr, "asn1Coding: FILE %s NOT FOUND\n", inputFileAsnName); - break; - case ASN1_SYNTAX_ERROR: - case ASN1_IDENTIFIER_NOT_FOUND: - case ASN1_NAME_TOO_LONG: - fprintf (stderr, "asn1Coding: %s\n", errorDescription); - break; - default: - fprintf (stderr, "libtasn1 ERROR: %s\n", asn1_strerror (asn1_result)); - } - - if (asn1_result != ASN1_SUCCESS) - { - free (inputFileAsnName); - free (inputFileAssignmentName); - exit (1); - } - - - inputFile = fopen (inputFileAssignmentName, "r"); - - if (inputFile == NULL) - { - fprintf (stderr, "asn1Coding: file '%s' not found\n", - inputFileAssignmentName); - free (inputFileAsnName); - free (inputFileAssignmentName); - exit (1); - } - - - putc ('\n', stderr); - - while ((last_ra = readAssignment (inputFile, varName, value)) - == ASSIGNMENT_SUCCESS) - { - fprintf (stderr, "var=%s, value=%s\n", varName, value); - if (structure == NULL) - { - asn1_result = asn1_create_element (definitions, value, &structure); - } - else - { - if (strcmp(value, "(NULL)") == 0) - asn1_result = asn1_write_value (structure, varName, NULL, 0); - else - asn1_result = asn1_write_value (structure, varName, value, 0); - } - - if (asn1_result != ASN1_SUCCESS) - { - fprintf (stderr, "libtasn1 ERROR: %s\n", - asn1_strerror (asn1_result)); - - asn1_delete_structure (&definitions); - asn1_delete_structure (&structure); - - free (inputFileAsnName); - free (inputFileAssignmentName); - - fclose (inputFile); - exit (1); - } - } - if (last_ra != ASSIGNMENT_EOF) - { - fprintf (stderr, "asn1Coding: error reading assignment file\n"); - exit (1); - } - fclose (inputFile); - - putc ('\n', stderr); - asn1_print_structure (stderr, structure, "", ASN1_PRINT_NAME_TYPE_VALUE); - - der_len = 0; - asn1_result = asn1_der_coding (structure, "", der, &der_len, - errorDescription); - if (asn1_result == ASN1_MEM_ERROR) - { - der = malloc (der_len); - asn1_result = asn1_der_coding (structure, "", der, &der_len, - errorDescription); - } - fprintf (stderr, "\nCoding: %s\n\n", asn1_strerror (asn1_result)); - if (asn1_result != ASN1_SUCCESS) - { - fprintf (stderr, "asn1Coding: %s\n", errorDescription); - - free (der); - - asn1_delete_structure (&definitions); - asn1_delete_structure (&structure); - - free (inputFileAsnName); - free (inputFileAssignmentName); - - exit (1); - } - - /* Print the 'Certificate1' DER encoding */ - fprintf (stderr, "-----------------\nNumber of bytes=%i\n", der_len); - for (k = 0; k < der_len; k++) - fprintf (stderr, "%02x ", der[k]); - fputs ("\n-----------------\n", stderr); - - asn1_delete_structure (&definitions); - asn1_delete_structure (&structure); - - if (!checkSyntaxOnly) - { - if (outputFileName == NULL) - createFileName (inputFileAssignmentName, &outputFileName); - - fprintf (stderr, "\nOutputFile=%s\n", outputFileName); - - outputFile = fopen (outputFileName, "w"); - - if (outputFile == NULL) - { - fprintf (stderr, - "asn1Coding: output file '%s' not available\n", - outputFileName); - free (der); - free (inputFileAsnName); - free (inputFileAssignmentName); - free (outputFileName); - exit (1); - } - - for (k = 0; k < der_len; k++) - fprintf (outputFile, "%c", der[k]); - fclose (outputFile); - fputs ("\nWriting: done.\n", stderr); - } - - free (der); - - free (inputFileAsnName); - free (inputFileAssignmentName); - free (outputFileName); - - exit (0); -} diff --git a/src/asn1Decoding.c b/src/asn1Decoding.c deleted file mode 100644 index 65456bf..0000000 --- a/src/asn1Decoding.c +++ /dev/null @@ -1,327 +0,0 @@ -/* asn1Decoding.c --- program to generate an ASN1 type from a DER coding. - * Copyright (C) 2002-2014 Free Software Foundation, Inc. - * - * This file is part of LIBTASN1. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -#include - -#include -#include -#include -#include -#include - -#include - -#include -#include -#include -#include "benchmark.h" - -static int decode (asn1_node definitions, const char *typeName, void *der, - int der_len, int benchmark, int strict); - -/* This feature is available in gcc versions 2.5 and later. */ -#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) -#define ATTR_NO_RETRUN -#else -#define ATTR_NO_RETRUN __attribute__ ((__noreturn__)) -#endif - -ATTR_NO_RETRUN static void -usage (int status) -{ - if (status != EXIT_SUCCESS) - fprintf (stderr, "Try `%s --help' for more information.\n", program_name); - else - { - printf ("\ -Usage: %s [OPTION] DEFINITIONS ENCODED ASN1TYPE\n", program_name); - printf ("\ -Decodes DER data in ENCODED file, for the ASN1TYPE element\n\ -described in ASN.1 DEFINITIONS file, and print decoded structures.\n\ -\n"); - printf ("\ - -b, --benchmark perform a benchmark on decoding\n\ - -s, --strict use strict DER decoding\n\ - -t, --no-time-strict use strict DER decoding but not in time fields\n\ - -h, --help display this help and exit\n\ - -v, --version output version information and exit\n"); - emit_bug_reporting_address (); - } - exit (status); -} - -int -main (int argc, char *argv[]) -{ - static const struct option long_options[] = { - {"help", no_argument, 0, 'h'}, - {"strict", no_argument, 0, 's'}, - {"no-time-strict", no_argument, 0, 't'}, - {"debug", no_argument, 0, 'd'}, - {"benchmark", no_argument, 0, 'b'}, - {"version", no_argument, 0, 'v'}, - {0, 0, 0, 0} - }; - int option_index = 0; - int option_result; - char *inputFileAsnName = NULL; - char *inputFileDerName = NULL; - char *typeName = NULL; - asn1_node definitions = NULL; - char errorDescription[ASN1_MAX_ERROR_DESCRIPTION_SIZE]; - int asn1_result = ASN1_SUCCESS; - unsigned char *der; - int der_len = 0, benchmark = 0; - int flags = 0, debug = 0; - /* FILE *outputFile; */ - - set_program_name (argv[0]); - - opterr = 0; /* disable error messages from getopt */ - - while (1) - { - - option_result = - getopt_long (argc, argv, "hbdsvtc", long_options, &option_index); - - if (option_result == -1) - break; - - switch (option_result) - { - case 'h': /* HELP */ - usage (EXIT_SUCCESS); - break; - case 'b': - benchmark = 1; - break; - case 'd': - debug = 1; - break; - case 's': - case 't': - flags |= ASN1_DECODE_FLAG_STRICT_DER; - if (option_result == 't') - flags |= ASN1_DECODE_FLAG_ALLOW_INCORRECT_TIME; - break; - case 'v': /* VERSION */ - version_etc (stdout, program_name, PACKAGE, VERSION, - "Fabio Fiorina", NULL); - exit (0); - break; - case '?': /* UNKNOW OPTION */ - fprintf (stderr, - "asn1Decoding: option '%s' not recognized or without argument.\n\n", - argv[optind - 1]); - usage (EXIT_FAILURE); - break; - default: - fprintf (stderr, - "asn1Decoding: ?? getopt returned character code Ox%x ??\n", - (unsigned)option_result); - } - } - - if (optind == argc || optind == argc - 1 || optind == argc - 2) - { - fprintf (stderr, "asn1Decoding: input files or ASN.1 type " - "name missing\n"); - usage (EXIT_FAILURE); - } - - inputFileAsnName = strdup(argv[optind]); - inputFileDerName = strdup(argv[optind + 1]); - typeName = strdup(argv[optind + 2]); - - if (!(inputFileAsnName && inputFileDerName && typeName)) - { - fprintf(stderr, "allocation failed\n"); - free(inputFileAsnName); - free(inputFileDerName); - free(typeName); - exit(1); - } - - asn1_result = - asn1_parser2tree (inputFileAsnName, &definitions, errorDescription); - - switch (asn1_result) - { - case ASN1_SUCCESS: - fprintf (stderr, "Parse: done.\n"); - break; - case ASN1_FILE_NOT_FOUND: - fprintf (stderr, "asn1Decoding: FILE %s NOT FOUND\n", inputFileAsnName); - break; - case ASN1_SYNTAX_ERROR: - case ASN1_IDENTIFIER_NOT_FOUND: - case ASN1_NAME_TOO_LONG: - fprintf (stderr, "asn1Decoding: %s\n", errorDescription); - break; - default: - fprintf (stderr, "libtasn1 ERROR: %s\n", asn1_strerror (asn1_result)); - } - - if (asn1_result != ASN1_SUCCESS) - { - free (inputFileAsnName); - free (inputFileDerName); - free (typeName); - exit (1); - } - - - { - size_t tmplen; - der = (unsigned char *) read_binary_file (inputFileDerName, &tmplen); - der_len = tmplen; - } - - /* read_binary_file() returns a buffer with more data than required, - * with this reallocation we ensure that memory accesses outside the - * boundaries are detected */ - if (der != NULL && debug != 0) - der = realloc(der, der_len); - - if (der == NULL) - { - fprintf (stderr, "asn1Decoding: could not read '%s'\n", - inputFileDerName); - asn1_delete_structure (&definitions); - - free (inputFileAsnName); - free (inputFileDerName); - free (typeName); - exit (1); - } - - /*****************************************/ - /* ONLY FOR TEST */ - /*****************************************/ - /* - der_len=0; - outputFile=fopen("data.p12","w"); - while(fscanf(inputFile,"%c",der+der_len) != EOF){ - if((der_len>=0x11) && (der_len<=(0xe70))) - fprintf(outputFile,"%c",der[der_len]); - der_len++; - } - fclose(outputFile); - fclose(inputFile); - */ - - if (decode (definitions, typeName, der, der_len, benchmark, flags) != ASN1_SUCCESS) - { - asn1_delete_structure (&definitions); - free (inputFileAsnName); - free (inputFileDerName); - free (typeName); - free (der); - exit (1); - } - - asn1_delete_structure (&definitions); - - free (der); - - free (inputFileAsnName); - free (inputFileDerName); - free (typeName); - - if (asn1_result != ASN1_SUCCESS) - exit (1); - - exit (0); -} - -static int -simple_decode (asn1_node definitions, const char *typeName, void *der, - int der_len, int benchmark, int flags) -{ - - int asn1_result; - asn1_node structure = NULL; - char errorDescription[ASN1_MAX_ERROR_DESCRIPTION_SIZE]; - - asn1_result = asn1_create_element (definitions, typeName, &structure); - - /* asn1_print_structure(stdout,structure,"",ASN1_PRINT_ALL); */ - - - if (asn1_result != ASN1_SUCCESS) - { - fprintf (stderr, "Structure creation: %s\n", - asn1_strerror (asn1_result)); - asn1_delete_structure (&structure); - return asn1_result; - } - - if (flags != 0) - asn1_result = - asn1_der_decoding2(&structure, der, &der_len, flags, errorDescription); - else - asn1_result = - asn1_der_decoding (&structure, der, der_len, errorDescription); - - if (!benchmark) - fprintf (stderr, "\nDecoding: %s\n", asn1_strerror (asn1_result)); - if (asn1_result != ASN1_SUCCESS) - { - fprintf (stderr, "asn1Decoding: %s\n", errorDescription); - asn1_delete_structure (&structure); - return asn1_result; - } - - if (!benchmark) - { - fprintf (stderr, "\nDECODING RESULT:\n"); - asn1_print_structure (stdout, structure, "", - ASN1_PRINT_NAME_TYPE_VALUE); - } - asn1_delete_structure (&structure); - return ASN1_SUCCESS; -} - -static int -decode (asn1_node definitions, const char *typeName, void *der, int der_len, - int benchmark, int flags) -{ - struct benchmark_st st; - - if (benchmark == 0) - return simple_decode (definitions, typeName, der, der_len, benchmark, flags); - else - { - start_benchmark (&st); - - do - { - simple_decode (definitions, typeName, der, der_len, benchmark, flags); - st.size++; - } - while (benchmark_must_finish == 0); - - stop_benchmark (&st, "structures"); - fprintf (stdout, "\n"); - - } - return ASN1_SUCCESS; -} diff --git a/src/asn1Parser.c b/src/asn1Parser.c deleted file mode 100644 index 475bfc9..0000000 --- a/src/asn1Parser.c +++ /dev/null @@ -1,195 +0,0 @@ -/* asn1Parser.c -- program to parse a file with ASN1 definitions - * Copyright (C) 2002-2014 Free Software Foundation, Inc. - * - * This file is part of LIBTASN1. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -#include - -#include -#include -#include -#include -#include - -#include - -#include -#include - -/* This feature is available in gcc versions 2.5 and later. */ -#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) -#define ATTR_NO_RETRUN -#else -#define ATTR_NO_RETRUN __attribute__ ((__noreturn__)) -#endif - -ATTR_NO_RETRUN static void -usage (int status) -{ - if (status != EXIT_SUCCESS) - fprintf (stderr, "Try `%s --help' for more information.\n", program_name); - else - { - printf ("\ -Usage: %s [OPTION] FILE\n", program_name); - printf ("\ -Read FILE with ASN.1 definitions and generate\n\ -a C array that is used with libtasn1 functions.\n\ -\n"); - printf ("\ -Mandatory arguments to long options are mandatory for short options too.\n\ - -c, --check checks the syntax only\n\ - -o, --output=FILE output file\n\ - -n, --name=NAME array name\n\ - -h, --help display this help and exit\n\ - -v, --version output version information and exit\n"); - emit_bug_reporting_address (); - } - exit (status); -} - -int -main (int argc, char *argv[]) -{ - static const struct option long_options[] = { - {"help", no_argument, 0, 'h'}, - {"version", no_argument, 0, 'v'}, - {"check", no_argument, 0, 'c'}, - {"output", required_argument, 0, 'o'}, - {"name", required_argument, 0, 'n'}, - {0, 0, 0, 0} - }; - int option_index = 0; - int option_result; - char *outputFileName = NULL; - char *inputFileName = NULL; - char *vectorName = NULL; - int checkSyntaxOnly = 0; - asn1_node pointer = NULL; - char errorDescription[ASN1_MAX_ERROR_DESCRIPTION_SIZE]; - int parse_result = ASN1_SUCCESS; - - set_program_name (argv[0]); - - opterr = 0; /* disable error messages from getopt */ - - while (1) - { - - option_result = - getopt_long (argc, argv, "hvco:n:", long_options, &option_index); - - if (option_result == -1) - break; - - switch (option_result) - { - case 0: - fprintf (stderr, "option %s", long_options[option_index].name); - if (optarg) - fprintf (stderr, " with arg %s", optarg); - putc ('\n', stderr); - break; - case 'h': /* HELP */ - free (outputFileName); - free (vectorName); - usage (EXIT_SUCCESS); - break; - case 'v': /* VERSION */ - version_etc (stdout, program_name, PACKAGE, VERSION, - "Fabio Fiorina", NULL); - free (outputFileName); - free (vectorName); - exit (0); - break; - case 'c': /* CHECK SYNTAX */ - checkSyntaxOnly = 1; - break; - case 'o': /* OUTPUT */ - outputFileName = (char *) malloc (strlen (optarg) + 1); - strcpy (outputFileName, optarg); - break; - case 'n': /* VECTOR NAME */ - vectorName = (char *) malloc (strlen (optarg) + 1); - strcpy (vectorName, optarg); - break; - case '?': /* UNKNOW OPTION */ - fprintf (stderr, - "asn1Parser: option '%s' not recognized or without argument.\n\n", - argv[optind - 1]); - free (outputFileName); - free (vectorName); - usage (EXIT_FAILURE); - break; - default: - fprintf (stderr, - "asn1Parser: ?? getopt returned character code Ox%x ??\n", - (unsigned)option_result); - } - - } - - if (optind == argc) - { - free (outputFileName); - free (vectorName); - usage (EXIT_SUCCESS); - } - else - { - inputFileName = (char *) malloc (strlen (argv[optind]) + 1); - strcpy (inputFileName, argv[optind]); - } - - if (checkSyntaxOnly == 1) - { - parse_result = - asn1_parser2tree (inputFileName, &pointer, errorDescription); - asn1_delete_structure (&pointer); - } - else /* C VECTOR CREATION */ - parse_result = asn1_parser2array (inputFileName, - outputFileName, vectorName, - errorDescription); - - switch (parse_result) - { - case ASN1_SUCCESS: - fputs ("Done.\n", stderr); - break; - case ASN1_FILE_NOT_FOUND: - fprintf (stderr, "asn1Parser: file %s was not found\n", inputFileName); - break; - case ASN1_SYNTAX_ERROR: - case ASN1_IDENTIFIER_NOT_FOUND: - case ASN1_NAME_TOO_LONG: - fprintf (stderr, "asn1Parser: %s\n", errorDescription); - break; - default: - fprintf (stderr, "libtasn1 ERROR: %s\n", asn1_strerror (parse_result)); - } - - - free (inputFileName); - free (outputFileName); - free (vectorName); - - if (parse_result != ASN1_SUCCESS) - exit (1); - exit (0); -} diff --git a/src/benchmark.c b/src/benchmark.c deleted file mode 100644 index f36115b..0000000 --- a/src/benchmark.c +++ /dev/null @@ -1,160 +0,0 @@ -/* - * Copyright (C) 2011-2014 Free Software Foundation, Inc. - * - * This file is part of GnuTLS. - * - * GnuTLS is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * GnuTLS is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include -#include -#include -#include -#include -#include -#include -#include "benchmark.h" - -int benchmark_must_finish = 0; - -#if defined _WIN32 -#include -static DWORD WINAPI -alarm_handler (LPVOID lpParameter) -{ - HANDLE wtimer = *((HANDLE *) lpParameter); - WaitForSingleObject (wtimer, INFINITE); - benchmark_must_finish = 1; - return 0; -} -#else -static void -alarm_handler (int signo) -{ - benchmark_must_finish = 1; -} -#endif - -static void -value2human (unsigned long bytes, double secs, double *data, double *speed, - char *metric) -{ - if (bytes > 1000 && bytes < 1000 * 1000) - { - *data = ((double) bytes) / 1000; - *speed = *data / secs; - strcpy (metric, "KB"); - return; - } - else if (bytes >= 1000 * 1000 && bytes < 1000 * 1000 * 1000) - { - *data = ((double) bytes) / (1000 * 1000); - *speed = *data / secs; - strcpy (metric, "MB"); - return; - } - else if (bytes >= 1000 * 1000 * 1000) - { - *data = ((double) bytes) / (1000 * 1000 * 1000); - *speed = *data / secs; - strcpy (metric, "GB"); - return; - } - else - { - *data = (double) bytes; - *speed = *data / secs; - strcpy (metric, "bytes"); - return; - } -} - -void -start_benchmark (struct benchmark_st *st) -{ - memset (st, 0, sizeof (*st)); -#ifndef _WIN32 - st->old_handler = signal (SIGALRM, alarm_handler); -#endif - gettime (&st->start); - benchmark_must_finish = 0; - -#if defined _WIN32 - st->wtimer = CreateWaitableTimer (NULL, TRUE, NULL); - if (st->wtimer == NULL) - { - fprintf (stderr, "error: CreateWaitableTimer %u\n", GetLastError ()); - exit (1); - } - st->wthread = CreateThread (NULL, 0, alarm_handler, &st->wtimer, 0, NULL); - if (st->wthread == NULL) - { - fprintf (stderr, "error: CreateThread %u\n", GetLastError ()); - exit (1); - } - st->alarm_timeout.QuadPart = (5) * 10000000; - if (SetWaitableTimer (st->wtimer, &st->alarm_timeout, 0, NULL, NULL, FALSE) - == 0) - { - fprintf (stderr, "error: SetWaitableTimer %u\n", GetLastError ()); - exit (1); - } -#else - alarm (5); -#endif - -} - -/* returns the elapsed time */ -double -stop_benchmark (struct benchmark_st *st, const char *metric) -{ - double secs; - unsigned long lsecs; - struct timespec stop; - double dspeed, ddata; - char imetric[16]; - -#if defined _WIN32 - if (st->wtimer != NULL) - CloseHandle (st->wtimer); - if (st->wthread != NULL) - CloseHandle (st->wthread); -#else - signal (SIGALRM, st->old_handler); -#endif - - gettime (&stop); - - lsecs = (stop.tv_sec * 1000 + stop.tv_nsec / (1000 * 1000) - - (st->start.tv_sec * 1000 + st->start.tv_nsec / (1000 * 1000))); - secs = lsecs; - secs /= 1000; - - if (metric == NULL) - { /* assume bytes/sec */ - value2human (st->size, secs, &ddata, &dspeed, imetric); - printf (" Processed %.2f %s in %.2f secs: ", ddata, imetric, secs); - printf ("%.2f %s/sec\n", dspeed, imetric); - } - else - { - ddata = (double) st->size; - dspeed = ddata / secs; - printf (" Processed %.2f %s in %.2f secs: ", ddata, metric, secs); - printf ("%.2f %s/sec\n", dspeed, metric); - } - - return secs; -} diff --git a/src/benchmark.h b/src/benchmark.h deleted file mode 100644 index 1f45c56..0000000 --- a/src/benchmark.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (C) 2011-2014 Free Software Foundation, Inc. - * - * This file is part of GnuTLS. - * - * GnuTLS is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * GnuTLS is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include -#include -#include -#if defined _WIN32 -#include -#endif -#include "timespec.h" /* gnulib gettime */ - -typedef void (*sighandler_t) (int); - -struct benchmark_st -{ - struct timespec start; - unsigned long size; - sighandler_t old_handler; -#if defined _WIN32 - HANDLE wtimer; - HANDLE wthread; - LARGE_INTEGER alarm_timeout; -#endif -}; - -extern int benchmark_must_finish; - -void start_benchmark (struct benchmark_st *st); -double stop_benchmark (struct benchmark_st *st, const char *metric); - -inline static unsigned int -timespec_sub_ms (struct timespec *a, struct timespec *b) -{ - return (a->tv_sec * 1000 + a->tv_nsec / (1000 * 1000) - - (b->tv_sec * 1000 + b->tv_nsec / (1000 * 1000))); -} diff --git a/tests/Makefile.am b/tests/Makefile.am deleted file mode 100644 index be10bbb..0000000 --- a/tests/Makefile.am +++ /dev/null @@ -1,92 +0,0 @@ -## Process this file with automake to produce Makefile.in -# Copyright (C) 2002-2014 Free Software Foundation, Inc. -# -# This file is part of LIBTASN1. -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -AM_CFLAGS = $(WARN_CFLAGS) $(WERROR_CFLAGS) $(CFLAG_VISIBILITY) -AM_CPPFLAGS = -I$(top_srcdir)/lib -I$(top_srcdir)/gl -I../gl - -AM_LDFLAGS = -no-install -LDADD = ../lib/libtasn1.la ../gl/libgnu.la - -EXTRA_DIST = Test_parser.asn Test_tree.asn Test_tree_asn1_tab.c mscat.asn \ - Test_encoding.asn pkix.asn TestIndef.p12 choice.asn coding-decoding2.asn \ - TestIndef2.p12 TestIndef3.der TestCertOctetOverflow.der \ - cert-invalid-time.der \ - libtasn1.supp ocsp-basic-response.der spc_pe_image_data.der \ - invalid-x509/id-000000.der invalid-x509/id-000001.der \ - invalid-x509/id-000002.der invalid-x509/id-000003.der \ - invalid-x509/id-000004.der invalid-x509/id-000005.der \ - invalid-x509/id-000006.der invalid-x509/id-000007.der \ - invalid-x509/id-000008.der invalid-x509/id-000009.der \ - invalid-x509/id-000010.der invalid-x509/id-000011.der \ - invalid-x509/id-000012.der invalid-x509/id-000013.der \ - invalid-x509/id-000014.der invalid-x509/id-000015.der \ - invalid-x509/id-000016.der invalid-x509/id-000017.der \ - invalid-x509/id-000018.der invalid-x509/id-000019.der \ - invalid-x509/id-000020.der invalid-x509/id-000021.der \ - invalid-x509/id-000022.der invalid-x509/id-000023.der \ - invalid-x509/id-000024.der invalid-x509/id-000025.der \ - invalid-x509/id-000026.der invalid-x509/id-000027.der \ - invalid-x509/id-000028.der invalid-x509/id-000029.der \ - invalid-x509/id-000030.der invalid-x509/id-000031.der \ - invalid-x509/id-000032.der invalid-x509/id-000033.der \ - invalid-x509/id-000034.der invalid-x509/id-000035.der \ - invalid-pkcs7/id-000001.der invalid-pkcs7/id-000002.der \ - invalid-pkcs7/id-000003.der invalid-assignments1.txt \ - invalid-assignments2.txt - -# For crlf. -EXTRA_DIST += crlf.cer crl.der ocsp.der -dist_check_SCRIPTS = crlf benchmark threadsafety decoding decoding-invalid-x509 \ - decoding-invalid-pkcs7 coding - -MOSTLYCLEANFILES = Test_parser_ERROR.asn - -check_PROGRAMS = Test_parser Test_tree Test_encoding Test_indefinite \ - Test_errors Test_simple Test_overflow Test_strings Test_choice \ - Test_encdec copynode coding-decoding2 strict-der Test_choice_ocsp \ - ocsp-basic-response octet-string coding-long-oid object-id-decoding \ - spc_pe_image_data - -TESTS = Test_parser Test_tree Test_encoding Test_indefinite \ - Test_errors Test_simple Test_overflow crlf threadsafety \ - Test_strings Test_choice Test_encdec copynode coding-decoding2 \ - strict-der Test_choice_ocsp decoding decoding-invalid-x509 \ - ocsp-basic-response octet-string coding-long-oid object-id-decoding \ - spc_pe_image_data decoding-invalid-pkcs7 coding - -TESTS_ENVIRONMENT = \ - ASN1PARSER=$(srcdir)/Test_parser.asn \ - ASN1TREE=$(srcdir)/Test_tree.asn \ - ASN1CHOICE=$(srcdir)/choice.asn \ - ASN1CODINGDECODING2=$(srcdir)/coding-decoding2.asn \ - ASN1PKIX=$(srcdir)/pkix.asn \ - ASN1CRLDER=$(srcdir)/crl.der \ - ASN1INDEF=$(srcdir)/TestIndef.p12 \ - ASN1INDEF2=$(srcdir)/TestIndef2.p12 \ - ASN1INDEF3=$(srcdir)/TestIndef3.der \ - ASN1ENCODING=$(srcdir)/Test_encoding.asn \ - ASN1CHOICE_OCSP=$(srcdir)/pkix.asn \ - ASN1CHOICE_OCSP_DATA=$(srcdir)/ocsp.der \ - ASN1_RESPONSE_OCSP_DATA=$(srcdir)/ocsp-basic-response.der \ - ASN1_MSCAT=$(srcdir)/mscat.asn \ - ASN1_SPC_PE_IMAGE_DATA=$(srcdir)/spc_pe_image_data.der \ - ASAN_OPTIONS="detect_leaks=0:exitcode=6" \ - THREADSAFETY_FILES=`find $(top_srcdir)/lib -name \*.c` \ - EXEEXT=$(EXEEXT) \ - LSAN_OPTIONS=suppressions=libtasn1.supp \ - $(VALGRIND) diff --git a/tests/TestCertOctetOverflow.der b/tests/TestCertOctetOverflow.der deleted file mode 100644 index 6c45107..0000000 Binary files a/tests/TestCertOctetOverflow.der and /dev/null differ diff --git a/tests/TestIndef.p12 b/tests/TestIndef.p12 deleted file mode 100644 index 285d8dd..0000000 Binary files a/tests/TestIndef.p12 and /dev/null differ diff --git a/tests/TestIndef2.p12 b/tests/TestIndef2.p12 deleted file mode 100644 index 2829073..0000000 Binary files a/tests/TestIndef2.p12 and /dev/null differ diff --git a/tests/TestIndef3.der b/tests/TestIndef3.der deleted file mode 100644 index 3ad5847..0000000 Binary files a/tests/TestIndef3.der and /dev/null differ diff --git a/tests/Test_choice.c b/tests/Test_choice.c deleted file mode 100644 index 9288ea3..0000000 --- a/tests/Test_choice.c +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Copyright (C) 2014 Free Software Foundation, Inc. - * - * This file is part of LIBTASN1. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -#include -#include -#include - -int -main (int argc, char** argv) -{ - int result = 0; - asn1_node definitions = NULL, node1 = NULL, node2 = NULL; - char errorDescription[ASN1_MAX_ERROR_DESCRIPTION_SIZE]; - const char *choicefile = getenv ("ASN1CHOICE"); - - char data[1024]; - int data_size = sizeof (data); - - if (!choicefile) - choicefile = "pkix.asn"; - - /* Encode */ - result = asn1_parser2tree (choicefile, &definitions, errorDescription); - if (result != ASN1_SUCCESS) - { - printf ("error in %d\n", __LINE__); - exit (1); - } - - result = asn1_create_element (definitions, "TEST.Choice0", &node1); - if (result != ASN1_SUCCESS) - { - printf ("error in %d\n", __LINE__); - exit (1); - } - - result = asn1_write_value (node1, "", "choice1", 1); - if (result != ASN1_SUCCESS) - { - printf ("error in %d\n", __LINE__); - exit (1); - } - - result = asn1_write_value (node1, "choice1", "choice2", 1); - if (result != ASN1_SUCCESS) - { - printf ("error in %d\n", __LINE__); - exit (1); - } - - result = asn1_write_value (node1, "choice1.choice2", "int1", 1); - if (result != ASN1_SUCCESS) - { - printf ("error in %d\n", __LINE__); - exit (1); - } - - result = asn1_write_value (node1, "choice1.choice2.int1", "1234", 0); - if (result != ASN1_SUCCESS) - { - printf ("error in %d\n", __LINE__); - exit (1); - } - - result = asn1_der_coding (node1, "", data, &data_size, errorDescription); - if (result != ASN1_SUCCESS) - { - printf ("error in %d\n", __LINE__); - exit (1); - } - - asn1_delete_structure (&node1); - - /* Decode */ - result = asn1_create_element (definitions, "TEST.Choice0", &node2); - if (result != ASN1_SUCCESS) - { - printf ("error in %d\n", __LINE__); - exit (1); - } - -#if 0 - printf ("der:"); - for (i = 0; i < data_size; i++) - printf ("%.2x ", (unsigned char) (data[i])); - printf ("\n"); -#endif - - result = asn1_der_decoding (&node2, data, data_size, errorDescription); - if (result != ASN1_SUCCESS) - { - printf ("error in %d\n", __LINE__); - exit (1); - } - - asn1_delete_structure (&node2); - asn1_delete_structure (&definitions); - - return 0; -} diff --git a/tests/Test_choice_ocsp.c b/tests/Test_choice_ocsp.c deleted file mode 100644 index 33c17fc..0000000 --- a/tests/Test_choice_ocsp.c +++ /dev/null @@ -1,80 +0,0 @@ -#include -#include -#include -#include - -int -main (int argc, char** argv) -{ - int result = 0, len; - asn1_node definitions = NULL, node1 = NULL; - char errorDescription[ASN1_MAX_ERROR_DESCRIPTION_SIZE]; - const char *choicefile = getenv ("ASN1CHOICE_OCSP"); - const char *datafile = getenv ("ASN1CHOICE_OCSP_DATA"); - FILE *fp; - char data[1024]; - char data2[1024]; - int data_size = sizeof (data); - - if (!choicefile) - choicefile = "pkix.asn"; - - if (!datafile) - datafile = "ocsp.der"; - - /* Encode */ - result = asn1_parser2tree (choicefile, &definitions, errorDescription); - if (result != ASN1_SUCCESS) - { - printf ("error in %d: %s\n", __LINE__, errorDescription); - exit (1); - } - - result = asn1_create_element (definitions, "PKIX1.ResponseData", &node1); - if (result != ASN1_SUCCESS) - { - printf ("error in %d\n", __LINE__); - exit (1); - } - - fp = fopen(datafile, "rb"); - if (fp == NULL) - { - printf ("error in %d\n", __LINE__); - exit (1); - } - data_size = fread(data, 1, sizeof(data), fp); - fclose(fp); - - result = asn1_der_decoding (&node1, data, data_size, errorDescription); - if (result != ASN1_SUCCESS) - { - printf ("error in %d: %s\n", __LINE__, errorDescription); - exit (1); - } - - len = sizeof(data2); - result = asn1_der_coding (node1, "", data2, &len, errorDescription); - if (result != ASN1_SUCCESS) - { - printf ("error in %d: %s\n", __LINE__, errorDescription); - exit (1); - } - - if (len != data_size) - { - printf ("length doesn't match (got: %d, should be: %d)\n", len, data_size); - exit (1); - } - - if (memcmp(data, data2, len) != 0) - { - printf ("contents don't match\n"); - exit (1); - } - - asn1_delete_structure (&node1); - asn1_delete_structure (&definitions); - - return 0; -} diff --git a/tests/Test_encdec.c b/tests/Test_encdec.c deleted file mode 100644 index 9b49e72..0000000 --- a/tests/Test_encdec.c +++ /dev/null @@ -1,182 +0,0 @@ -/* - * Copyright (C) 2002-2014 Free Software Foundation, Inc. - * - * This file is part of LIBTASN1. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - -/*****************************************************/ -/* File: Test_tree.c */ -/* Description: Test sequences for these functions: */ -/* asn1_visit_tree, */ -/* asn1_create_element, */ -/* asn1_delete_structure, */ -/* asn1_write_value, */ -/* asn1_read_value, */ -/*****************************************************/ - -#include -#include -#include -#include "libtasn1.h" - - - -int -main (int argc, char *argv[]) -{ - int result; - char buffer[5 * 1024]; - char buffer2[5 * 1024]; - asn1_node definitions = NULL; - asn1_node asn1_element = NULL; - char errorDescription[ASN1_MAX_ERROR_DESCRIPTION_SIZE]; - FILE *out, *fd; - ssize_t size; - int start, end; - int size2; - const char *treefile = getenv ("ASN1PKIX"); - const char *derfile = getenv ("ASN1CRLDER"); - int verbose = 0; - - if (argc > 1) - verbose = 1; - - if (!treefile) - treefile = "pkix.asn"; - - if (!derfile) - derfile = "crl.der"; - - if (verbose) - { - printf ("\n\n/****************************************/\n"); - printf ("/* Test sequence : Test_indefinite */\n"); - printf ("/****************************************/\n\n"); - printf ("ASN1TREE: %s\n", treefile); - } - - /* Check version */ - if (asn1_check_version ("0.3.3") == NULL) - printf ("\nLibrary version check ERROR:\n actual version: %s\n\n", - asn1_check_version (NULL)); - - result = asn1_parser2tree (treefile, &definitions, errorDescription); - if (result != ASN1_SUCCESS) - { - asn1_perror (result); - printf ("ErrorDescription = %s\n\n", errorDescription); - exit (1); - } - - out = stdout; - - fd = fopen (derfile, "rb"); - if (fd == NULL) - { - printf ("Cannot read file %s\n", derfile); - exit (1); - } - size = fread (buffer, 1, sizeof (buffer), fd); - if (size <= 0) - { - printf ("Cannot read from file %s\n", derfile); - exit (1); - } - - fclose (fd); - - result = - asn1_create_element (definitions, "PKIX1.CertificateList", &asn1_element); - if (result != ASN1_SUCCESS) - { - asn1_perror (result); - printf ("Cannot create CRL element\n"); - exit (1); - } - - result = asn1_der_decoding (&asn1_element, buffer, size, errorDescription); - if (result != ASN1_SUCCESS) - { - asn1_perror (result); - printf ("Cannot decode DER data (size %ld)\n", (long) size); - exit (1); - } - - result = asn1_der_decoding_startEnd (asn1_element, buffer, size, "tbsCertList", &start, &end); - if (result != ASN1_SUCCESS) - { - asn1_perror (result); - printf ("Cannot find start End\n"); - exit (1); - } - if (start != 4 && end != 358) - { - printf("Error in start and end values. Have: %d..%d\n", start, end); - exit(1); - } - - result = asn1_der_decoding_startEnd (asn1_element, buffer, size, "signature", &start, &end); - if (result != ASN1_SUCCESS) - { - asn1_perror (result); - printf ("Cannot find start End\n"); - exit (1); - } - if (start != 372 && end != 503) - { - printf("Error in start and end values for signature. Have: %d..%d\n", start, end); - exit(1); - } - - result = asn1_der_decoding_startEnd (asn1_element, buffer, size, "tbsCertList.revokedCertificates.?1.userCertificate", &start, &end); - if (result != ASN1_SUCCESS) - { - asn1_perror (result); - printf ("Cannot find start End\n"); - exit (1); - } - if (start != 326 && end != 343) - { - printf("Error in start and end values for userCertificate. Have: %d..%d\n", start, end); - exit(1); - } - - size2 = sizeof(buffer2); - result = asn1_der_coding (asn1_element, "", buffer2, &size2, NULL); - if (result != ASN1_SUCCESS) - { - asn1_perror (result); - printf ("Cannot encode data (size %ld)\n", (long) size); - exit (1); - } - - if (size2 != size || memcmp(buffer, buffer2, size) != 0) - { - printf("DER encoded data differ!\n"); - exit(1); - } - - /* Clear the definition structures */ - asn1_delete_structure (&definitions); - asn1_delete_structure (&asn1_element); - - if (out != stdout) - fclose (out); - - exit (0); -} diff --git a/tests/Test_encoding.asn b/tests/Test_encoding.asn deleted file mode 100644 index 040c88f..0000000 --- a/tests/Test_encoding.asn +++ /dev/null @@ -1,38 +0,0 @@ --- --- File used in the test sequence Test_encoding. --- - -TEST_TREE { } - -DEFINITIONS IMPLICIT TAGS ::= - -BEGIN - -Koko ::= SEQUENCE { - seqint SEQUENCE OF INTEGER, - int INTEGER, - a [1] OCTET STRING, - b [10] OCTET STRING, - c [100] OCTET STRING, - exp [3] EXPLICIT OCTET STRING OPTIONAL, - str OCTET STRING -} - -END - --- Copyright (C) 2002-2014 Free Software Foundation, Inc. --- --- This file is part of LIBTASN1. --- --- This program is free software: you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation, either version 3 of the License, or --- (at your option) any later version. --- --- This program is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License --- along with this program. If not, see . diff --git a/tests/Test_encoding.c b/tests/Test_encoding.c deleted file mode 100644 index 8e8c702..0000000 --- a/tests/Test_encoding.c +++ /dev/null @@ -1,168 +0,0 @@ -/* - * Copyright (C) 2002-2014 Free Software Foundation, Inc. - * - * This file is part of LIBTASN1. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/******************************************************/ -/* File: Test_encoding.c */ -/* Description: Test writing values and DER encoding. */ -/******************************************************/ - -#include -#include -#include -#include "libtasn1.h" - - -unsigned char data[256]; -int data_size = sizeof (data); - - -int -main (int argc, char *argv[]) -{ - int result, verbose = 0; - asn1_node definitions = NULL; - asn1_node asn1_element = NULL; - char errorDescription[ASN1_MAX_ERROR_DESCRIPTION_SIZE]; - const char *treefile = getenv ("ASN1ENCODING"); - - if (argc > 1) - verbose = 1; - - if (!treefile) - treefile = "Test_encoding.asn"; - - if (verbose != 0) - { - printf ("\n\n/****************************************/\n"); - printf ("/* Test sequence : coding-decoding */\n"); - printf ("/****************************************/\n\n"); - } - - /* Check version */ - if (asn1_check_version ("0.3.3") == NULL) - printf ("\nLibrary version check ERROR:\n actual version: %s\n\n", - asn1_check_version (NULL)); - - result = asn1_parser2tree (treefile, &definitions, errorDescription); - - if (result != ASN1_SUCCESS) - { - asn1_perror (result); - printf ("ErrorDescription = %s\n\n", errorDescription); - exit (1); - } - - result = asn1_create_element (definitions, "TEST_TREE.Koko", &asn1_element); - if (result != ASN1_SUCCESS) - { - fprintf (stderr, "asn1_create_element(): "); - asn1_perror (result); - exit (1); - } - - result = asn1_write_value (asn1_element, "seqint", "NEW", 1); - if (result != ASN1_SUCCESS) - { - fprintf (stderr, "asn1_write_value(): seqint "); - asn1_perror (result); - exit (1); - } - - result = asn1_write_value (asn1_element, "seqint.?LAST", "1234", 0); - if (result != ASN1_SUCCESS) - { - fprintf (stderr, "asn1_write_value(): seqint.?LAST "); - asn1_perror (result); - exit (1); - } - - result = asn1_write_value (asn1_element, "int", "\x0f\xff\x01", 3); - if (result != ASN1_SUCCESS) - { - fprintf (stderr, "asn1_write_value(): int "); - asn1_perror (result); - exit (1); - } - - result = asn1_write_value (asn1_element, "str", "string", 6); - if (result != ASN1_SUCCESS) - { - fprintf (stderr, "asn1_write_value(): str "); - asn1_perror (result); - exit (1); - } - - result = asn1_write_value (asn1_element, "a", "string1", 7); - if (result != ASN1_SUCCESS) - { - fprintf (stderr, "asn1_write_value(): str "); - asn1_perror (result); - exit (1); - } - - result = asn1_write_value (asn1_element, "b", "string2", 7); - if (result != ASN1_SUCCESS) - { - fprintf (stderr, "asn1_write_value(): str "); - asn1_perror (result); - exit (1); - } - - result = asn1_write_value (asn1_element, "c", "string3", 7); - if (result != ASN1_SUCCESS) - { - fprintf (stderr, "asn1_write_value(): str "); - asn1_perror (result); - exit (1); - } - - result = asn1_write_value (asn1_element, "exp", "string4", 7); - if (result != ASN1_SUCCESS) - { - fprintf (stderr, "asn1_write_value(): str "); - asn1_perror (result); - exit (1); - } - - /* Clear the definition structures */ - asn1_delete_structure (&definitions); - - result = asn1_der_coding (asn1_element, "", data, &data_size, NULL); - if (result != ASN1_SUCCESS) - { - fprintf (stderr, "Encoding error.\n"); - asn1_perror (result); - exit (1); - } - - result = asn1_der_decoding (&asn1_element, data, data_size, NULL); - if (result != ASN1_SUCCESS) - { - fprintf (stderr, "Decoding error.\n"); - asn1_perror (result); - exit (1); - } - - asn1_delete_structure (&asn1_element); - - if (verbose) - printf ("Success\n"); - exit (0); -} diff --git a/tests/Test_errors.c b/tests/Test_errors.c deleted file mode 100644 index 35771b0..0000000 --- a/tests/Test_errors.c +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (C) 2010-2014 Free Software Foundation, Inc. - * - * This file is part of LIBTASN1. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -#include "libtasn1.h" - -int -main (int argc, char *argv[]) -{ - int ec = 0; - const char *errstr; - int verbose = 0; - - if (argc > 1) - verbose = 1; - - do - { - errstr = asn1_strerror (ec); - if (verbose != 0) - asn1_perror (ec); - ec++; - } - while (errstr); - - return 0; -} diff --git a/tests/Test_indefinite.c b/tests/Test_indefinite.c deleted file mode 100644 index 9f08793..0000000 --- a/tests/Test_indefinite.c +++ /dev/null @@ -1,204 +0,0 @@ -/* - * Copyright (C) 2002-2014 Free Software Foundation, Inc. - * - * This file is part of LIBTASN1. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - -/*****************************************************/ -/* File: Test_tree.c */ -/* Description: Test sequences for these functions: */ -/* asn1_visit_tree, */ -/* asn1_create_element, */ -/* asn1_delete_structure, */ -/* asn1_write_value, */ -/* asn1_read_value, */ -/*****************************************************/ - -#include -#include -#include -#include "libtasn1.h" - - - -int -main (int argc, char *argv[]) -{ - int result; - char buffer[10 * 1024]; - asn1_node definitions = NULL; - asn1_node asn1_element = NULL; - char errorDescription[ASN1_MAX_ERROR_DESCRIPTION_SIZE]; - FILE *out, *fd; - ssize_t size; - const char *treefile = getenv ("ASN1PKIX"); - const char *indeffile = getenv ("ASN1INDEF"); - const char *indeffile2 = getenv ("ASN1INDEF2"); - const char *indeffile3 = getenv ("ASN1INDEF3"); - int verbose = 0; - - if (argc > 1) - verbose = 1; - - if (!treefile) - treefile = "pkix.asn"; - - if (!indeffile) - indeffile = "TestIndef.p12"; - - if (!indeffile2) - indeffile2 = "TestIndef2.p12"; - - if (!indeffile3) - indeffile3 = "TestIndef3.der"; - - if (verbose) - { - printf ("\n\n/****************************************/\n"); - printf ("/* Test sequence : Test_indefinite */\n"); - printf ("/****************************************/\n\n"); - printf ("ASN1TREE: %s\n", treefile); - } - - /* Check version */ - if (asn1_check_version ("0.2.11") == NULL) - printf ("\nLibrary version check ERROR:\n actual version: %s\n\n", - asn1_check_version (NULL)); - - result = asn1_parser2tree (treefile, &definitions, errorDescription); - if (result != ASN1_SUCCESS) - { - asn1_perror (result); - printf ("ErrorDescription = %s\n\n", errorDescription); - exit (1); - } - - out = stdout; - - fd = fopen (indeffile, "rb"); - if (fd == NULL) - { - printf ("Cannot read file %s\n", indeffile); - exit (1); - } - size = fread (buffer, 1, sizeof (buffer), fd); - if (size <= 0) - { - printf ("Cannot read from file %s\n", indeffile); - exit (1); - } - - fclose (fd); - - result = - asn1_create_element (definitions, "PKIX1.pkcs-12-PFX", &asn1_element); - if (result != ASN1_SUCCESS) - { - asn1_perror (result); - printf ("Cannot create PKCS12 element\n"); - exit (1); - } - - result = asn1_der_decoding (&asn1_element, buffer, size, errorDescription); - if (result != ASN1_SUCCESS) - { - asn1_perror (result); - printf ("Cannot decode BER data (size %ld) in %s: %s\n", (long) size, indeffile, errorDescription); - exit (1); - } - - asn1_delete_structure (&asn1_element); - - /* second test */ - fd = fopen (indeffile2, "rb"); - if (fd == NULL) - { - printf ("Cannot read file %s\n", indeffile2); - exit (1); - } - size = fread (buffer, 1, sizeof (buffer), fd); - if (size <= 0) - { - printf ("Cannot read from file %s\n", indeffile2); - exit (1); - } - - fclose (fd); - - result = - asn1_create_element (definitions, "PKIX1.pkcs-12-PFX", &asn1_element); - if (result != ASN1_SUCCESS) - { - asn1_perror (result); - printf ("Cannot create PKCS12 element\n"); - exit (1); - } - - result = asn1_der_decoding (&asn1_element, buffer, size, errorDescription); - if (result != ASN1_SUCCESS) - { - asn1_perror (result); - printf ("Cannot decode BER data (size %ld) in %s: %s\n", (long) size, indeffile2, errorDescription); - exit (1); - } - - asn1_delete_structure (&asn1_element); - - /* third test */ - fd = fopen (indeffile3, "rb"); - if (fd == NULL) - { - printf ("Cannot read file %s\n", indeffile3); - exit (1); - } - size = fread (buffer, 1, sizeof (buffer), fd); - if (size <= 0) - { - printf ("Cannot read from file %s\n", indeffile3); - exit (1); - } - - fclose (fd); - - result = - asn1_create_element (definitions, "PKIX1.pkcs-12-CertBag", &asn1_element); - if (result != ASN1_SUCCESS) - { - asn1_perror (result); - printf ("Cannot create CertBag element\n"); - exit (1); - } - - result = asn1_der_decoding (&asn1_element, buffer, size, errorDescription); - if (result != ASN1_SUCCESS) - { - asn1_perror (result); - printf ("Cannot decode DER data (size %ld) in %s: %s\n", (long) size, indeffile3, errorDescription); - exit (1); - } - - asn1_delete_structure (&asn1_element); - - /* Clear the definition structures */ - asn1_delete_structure (&definitions); - - if (out != stdout) - fclose (out); - - exit (0); -} diff --git a/tests/Test_overflow.c b/tests/Test_overflow.c deleted file mode 100644 index b276b6d..0000000 --- a/tests/Test_overflow.c +++ /dev/null @@ -1,168 +0,0 @@ -/* - * Copyright (C) 2012-2014 Free Software Foundation, Inc. - * - * This file is part of LIBTASN1. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/* Written by Simon Josefsson */ - -#include -#include -#include -#include - -#include "libtasn1.h" - -int -main (int argc, char **argv) -{ - /* Test that values larger than long are rejected. This has worked - fine with all versions of libtasn1. */ - int verbose = 0; - - if (argc > 1) - verbose = 1; - - { - unsigned char der[] = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"; - long l; - int len; - - l = asn1_get_length_der (der, sizeof der, &len); - - if (l == -2L) - { - if (verbose) - puts ("OK: asn1_get_length_der bignum"); - } - else - { - printf ("ERROR: asn1_get_length_der bignum (l %ld len %d)\n", l, len); - return 1; - } - } - - /* Test that values larger than int but smaller than long are - rejected. This limitation was introduced with libtasn1 2.12. */ - if (LONG_MAX > INT_MAX) - { - unsigned long num = ((long) UINT_MAX) << 2; - unsigned char der[20]; - int der_len; - long l; - int len; - - asn1_length_der (num, der, &der_len); - - l = asn1_get_length_der (der, der_len, &len); - - if (l == -2L) - { - if (verbose) - puts ("OK: asn1_get_length_der intnum"); - } - else - { - printf ("ERROR: asn1_get_length_der intnum (l %ld len %d)\n", l, - len); - return 1; - } - } - - /* Test that values larger than would fit in the input string are - rejected. This problem was fixed in libtasn1 2.12. */ - { - unsigned long num = 64; - unsigned char der[20]; - int der_len; - long l; - int len; - - asn1_length_der (num, der, &der_len); - - der_len = sizeof (der); - l = asn1_get_length_der (der, der_len, &len); - - if (l == -4L) - { - if (verbose) - puts ("OK: asn1_get_length_der overflow-small"); - } - else - { - printf ("ERROR: asn1_get_length_der overflow-small (l %ld len %d)\n", - l, len); - return 1; - } - } - - /* Test that values larger than would fit in the input string are - rejected. This problem was fixed in libtasn1 2.12. */ - { - unsigned long num = 1073741824; - unsigned char der[20]; - int der_len; - long l; - int len; - - asn1_length_der (num, der, &der_len); - - der_len = sizeof (der); - l = asn1_get_length_der (der, der_len, &len); - - if (l == -4L) - { - if (verbose) - puts ("OK: asn1_get_length_der overflow-large1"); - } - else - { - printf ("ERROR: asn1_get_length_der overflow-large1 (l %ld len %d)\n", - l, len); - return 1; - } - } - - /* Test that values larger than would fit in the input string are - rejected. This problem was fixed in libtasn1 2.12. */ - { - unsigned long num = 2147483649; - unsigned char der[20]; - int der_len; - long l; - int len; - - asn1_length_der (num, der, &der_len); - - der_len = sizeof (der); - l = asn1_get_length_der (der, der_len, &len); - - if (l == -2L) - { - if (verbose) - puts ("OK: asn1_get_length_der overflow-large2"); - } - else - { - printf ("ERROR: asn1_get_length_der overflow-large2 (l %ld len %d)\n", - l, len); - return 1; - } - } - - return 0; -} diff --git a/tests/Test_parser.asn b/tests/Test_parser.asn deleted file mode 100644 index fe2c7b3..0000000 --- a/tests/Test_parser.asn +++ /dev/null @@ -1,44 +0,0 @@ --- --- File used in the test sequence Test_parser. --- - - -TEST_PARSER {iso(1) identified-organization(3) dod(6) internet(1) security(5) mechanisms(5) pkix(7) id-mod(0) id-pkix1-implicit-88(2)} - -DEFINITIONS IMPLICIT TAGS ::= - -BEGIN - - -Sequence1 ::= SEQUENCE{ - int1 -- Test -- INTEGER (5), - int2 INTEGER (10 | 12), - generic GeneralString -} - -OidTest ::= SEQUENCE{ - oid1 OBJECT IDENTIFIER DEFAULT Oid-type1 -} - -Oid-type1 OBJECT IDENTIFIER ::= {1 2 3 4} - -Bitstringsizetest ::= BIT STRING (SIZE(42)) - -END - --- Copyright (C) 2002-2014 Free Software Foundation, Inc. --- --- This file is part of LIBTASN1. --- --- This program is free software: you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation, either version 3 of the License, or --- (at your option) any later version. --- --- This program is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License --- along with this program. If not, see . diff --git a/tests/Test_parser.c b/tests/Test_parser.c deleted file mode 100644 index 7a51843..0000000 --- a/tests/Test_parser.c +++ /dev/null @@ -1,236 +0,0 @@ -/* - * Copyright (C) 2002-2014 Free Software Foundation, Inc. - * - * This file is part of LIBTASN1. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - -/*****************************************************/ -/* File: Test_parser.c */ -/* Description: Test sequences for these functions: */ -/* asn1_parser_asn1, */ -/*****************************************************/ - -#include -#include -#include -#include "libtasn1.h" - -typedef struct -{ - int lineNumber; - const char *line; - int errorNumber; - const char *errorDescription; -} test_type; - -const char *fileCorrectName; -char fileErroredName[] = "Test_parser_ERROR.asn"; - -#define _FILE_ "Test_parser_ERROR.asn" - -test_type test_array[] = { - /* Test DEFINITIONS syntax */ - {5, - "TEST_PARSER2 { } DEFINITIONS IMPLICIT TAGS ::= BEGIN int1 ::= INTEGER END", - ASN1_SYNTAX_ERROR, - _FILE_ - ":6: Error: syntax error, unexpected IDENTIFIER, expecting $end near 'TEST_PARSER'"}, - {6, "TEST_PARSER { }", ASN1_SUCCESS, ""}, - - /* Test ASN1_MAX_NAME_SIZE (128) */ - {12, - "a123456789012345678901234567890123456789012345678901234567890123 ::= INTEGER", - ASN1_SUCCESS, ""}, - {12, - "a1234567890123456789012345678901234567890123456789012345678901234 ::= INTEGER", - ASN1_NAME_TOO_LONG, - _FILE_ ":12: name too long (more than 64 characters)"}, - /* Test 'check identifier' function */ - {12, "ident1 ::= ident2 ident2 ::= INTEGER", - ASN1_SUCCESS, ""}, - {12, "ident1 ::= ident2", - ASN1_IDENTIFIER_NOT_FOUND, _FILE_ ":: identifier 'ident2' not found"}, - {12, "obj1 OBJECT IDENTIFIER ::= {pkix 0 5 4} " - "pkix OBJECT IDENTIFIER ::= {1 2}", - ASN1_SUCCESS, ""}, - {12, "obj1 OBJECT IDENTIFIER ::= {pkix 0 5 4}", - ASN1_IDENTIFIER_NOT_FOUND, _FILE_ ":: identifier 'pkix' not found"}, - - /* Test INTEGER */ - {14, "int1 INTEGER (-5..5),", ASN1_SUCCESS, ""}, - {14, "int1 INTEGER OPTIONAL,", ASN1_SUCCESS, ""}, - {14, "int1 INTEGER DEFAULT 1,", ASN1_SUCCESS, ""}, - {14, "int1 INTEGER DEFAULT -1,", ASN1_SUCCESS, ""}, - {14, "int1 INTEGER DEFAULT v1,", ASN1_SUCCESS, ""}, - {14, "int1 [1] INTEGER,", ASN1_SUCCESS, ""}, - {14, "int1 [1] EXPLICIT INTEGER,", ASN1_SUCCESS, ""}, - {14, "int1 [1] IMPLICIT INTEGER,", ASN1_SUCCESS, ""}, - {12, "Integer ::= [1] EXPLICIT INTEGER {v1(-1), v2(1)}", ASN1_SUCCESS, ""}, - {12, "Integer ::= INTEGER {v1(0), v2}", ASN1_SYNTAX_ERROR, - _FILE_ ":12: Error: syntax error, unexpected '}', expecting '(' near '}'"}, - {12, "Integer ::= INTEGER {v1(0), 1}", - ASN1_SYNTAX_ERROR, - _FILE_ - ":12: Error: syntax error, unexpected NUM, expecting IDENTIFIER or '(' near '1'"}, - {12, "const1 INTEGER ::= -1", ASN1_SUCCESS, ""}, - {12, "const1 INTEGER ::= 1", ASN1_SUCCESS, ""}, - {12, "const1 INTEGER ::= v1", - ASN1_SYNTAX_ERROR, - _FILE_ - ":12: Error: syntax error, unexpected IDENTIFIER, expecting NUM or '+' or '-' near 'v1'"}, - {16, " generic generalstring", - ASN1_IDENTIFIER_NOT_FOUND, - _FILE_ ":: identifier 'generalstring' not found"}, - - /* Test: OID */ - {20, " oid1 OBJECT IDENTIFIER DEFAULT Oid-type", - ASN1_IDENTIFIER_NOT_FOUND, _FILE_ ":: identifier 'Oid-type' not found"}, - {20, " oid1 OBJECT IDENTIFIER DEFAULT 1", - ASN1_IDENTIFIER_NOT_FOUND, _FILE_ ":: identifier '1' not found"}, - {20, " oid1 OBJECT IDENTIFIER DEFAULT", - ASN1_SYNTAX_ERROR, - _FILE_ ":21: Error: syntax error, unexpected '}' near '}'"}, - {20, " oid1 OBJECT IDENTIFIER DEFAULT Oid-type1", - ASN1_SUCCESS, ""}, - - /* end */ - {0} -}; - -static int -readLine (FILE * file, char *line) -{ - int c; - - while (((c = fgetc (file)) != EOF) && (c != '\n')) - { - *line = c; - line++; - } - - *line = 0; - - return c; -} - -static void -createFile (int lineNumber, const char *line) -{ - FILE *fileIn, *fileOut; - char lineRead[1024]; - int fileInLineNumber = 0; - - fileIn = fopen (fileCorrectName, "r"); - fileOut = fopen (fileErroredName, "w"); - - while (readLine (fileIn, lineRead) != EOF) - { - fileInLineNumber++; - if (fileInLineNumber == lineNumber) - fprintf (fileOut, "%s\n", line); - else - fprintf (fileOut, "%s\n", lineRead); - } - - fclose (fileOut); - fclose (fileIn); -} - - -int -main (int argc, char *argv[]) -{ - int result; - asn1_node definitions = NULL; - char errorDescription[ASN1_MAX_ERROR_DESCRIPTION_SIZE]; - test_type *test; - int errorCounter = 0, testCounter = 0; - int verbose = 0; - - if (argc > 1) - verbose = 1; - - fileCorrectName = getenv ("ASN1PARSER"); - if (!fileCorrectName) - fileCorrectName = "Test_parser.asn"; - - if (verbose != 0) - { - printf ("\n\n/****************************************/\n"); - printf ("/* Test sequence : Test_parser */\n"); - printf ("/****************************************/\n\n"); - printf ("ASN1PARSER: %s\n", fileCorrectName); - } - - result = asn1_parser2tree (fileCorrectName, &definitions, errorDescription); - - if (result != ASN1_SUCCESS) - { - printf ("File '%s' not correct\n", fileCorrectName); - asn1_perror (result); - printf ("ErrorDescription = %s\n\n", errorDescription); - exit (1); - } - - /* Only for Test */ - /* asn1_visit_tree(stdout,definitions,"TEST_PARSER",ASN1_PRINT_ALL); */ - - /* Clear the definitions structures */ - asn1_delete_structure (&definitions); - - - test = test_array; - - while (test->lineNumber != 0) - { - testCounter++; - - createFile (test->lineNumber, test->line); - - result = - asn1_parser2tree (fileErroredName, &definitions, errorDescription); - asn1_delete_structure (&definitions); - - if ((result != test->errorNumber) || - (strcmp (errorDescription, test->errorDescription))) - { - errorCounter++; - printf ("ERROR N. %d:\n", errorCounter); - printf (" Line %d - %s\n", test->lineNumber, test->line); - printf (" Error expected: %s - %s\n", - asn1_strerror (test->errorNumber), test->errorDescription); - printf (" Error detected: %s - %s\n\n", asn1_strerror (result), - errorDescription); - exit (1); - } - - test++; - } - - - if (verbose != 0) - { - printf ("Total tests : %d\n", testCounter); - printf ("Total errors: %d\n", errorCounter); - } - - if (errorCounter > 0) - return 1; - - exit (0); -} diff --git a/tests/Test_simple.c b/tests/Test_simple.c deleted file mode 100644 index a846958..0000000 --- a/tests/Test_simple.c +++ /dev/null @@ -1,209 +0,0 @@ -/* - * Copyright (C) 2011-2014 Free Software Foundation, Inc. - * - * This file is part of LIBTASN1. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * Written by Simon Josefsson - * - */ - -#include -#include -#include - -#include "libtasn1.h" - -struct tv -{ - int bitlen; - const char *bitstr; - int derlen; - const char *der; -}; - -static const struct tv tv[] = { - {0, "", 2, "\x01\x00"}, - {1, "\x00", 3, "\x02\x07\x00"}, - {2, "\x00", 3, "\x02\x06\x00"}, - {3, "\x00", 3, "\x02\x05\x00"}, - {4, "\x00", 3, "\x02\x04\x00"}, - {5, "\x00", 3, "\x02\x03\x00"}, - {6, "\x00", 3, "\x02\x02\x00"}, - {7, "\x00", 3, "\x02\x01\x00"}, - {8, "\x00\x00", 3, "\x02\x00\x00"}, - {9, "\x00\x00", 4, "\x03\x07\x00\x00"}, - {10, "\x00\x00", 4, "\x03\x06\x00\x00"}, - {11, "\x00\x00", 4, "\x03\x05\x00\x00"}, - {12, "\x00\x00", 4, "\x03\x04\x00\x00"}, - {13, "\x00\x00", 4, "\x03\x03\x00\x00"}, - {14, "\x00\x00", 4, "\x03\x02\x00\x00"}, - {15, "\x00\x00", 4, "\x03\x01\x00\x00"}, - {16, "\x00\x00", 4, "\x03\x00\x00\x00"}, - {17, "\x00\x00\x00", 5, "\x04\x07\x00\x00\x00"}, - {18, "\x00\x00\x00", 5, "\x04\x06\x00\x00\x00"}, - {19, "\x00\x00\x00", 5, "\x04\x05\x00\x00\x00"}, - {1, "\xFF", 3, "\x02\x07\x80"}, - {2, "\xFF", 3, "\x02\x06\xc0"}, - {3, "\xFF", 3, "\x02\x05\xe0"}, - {4, "\xFF", 3, "\x02\x04\xf0"}, - {5, "\xFF", 3, "\x02\x03\xf8"}, - {6, "\xFF", 3, "\x02\x02\xfc"}, - {7, "\xFF", 3, "\x02\x01\xfe"}, - {8, "\xFF\xFF", 3, "\x02\x00\xff"}, - {9, "\xFF\xFF", 4, "\x03\x07\xff\x80"}, - {10, "\xFF\xFF", 4, "\x03\x06\xff\xc0"}, - {11, "\xFF\xFF", 4, "\x03\x05\xff\xe0"}, - {12, "\xFF\xFF", 4, "\x03\x04\xff\xf0"}, - {13, "\xFF\xFF", 4, "\x03\x03\xff\xf8"}, - {14, "\xFF\xFF", 4, "\x03\x02\xff\xfc"}, - {15, "\xFF\xFF", 4, "\x03\x01\xff\xfe"}, - {16, "\xFF\xFF", 4, "\x03\x00\xff\xff"}, - {17, "\xFF\xFF\xFF", 5, "\x04\x07\xff\xff\x80"}, - {18, "\xFF\xFF\xFF", 5, "\x04\x06\xff\xff\xc0"}, - {19, "\xFF\xFF\xFF", 5, "\x04\x05\xff\xff\xe0"}, -}; - -int -main (int argc, char *argv[]) -{ - int result; - unsigned char der[100]; - unsigned char str[100]; - int der_len = sizeof (der); - int str_size = sizeof (str); - int ret_len, bit_len; - size_t i; - - /* Dummy test */ - - asn1_bit_der (NULL, 0, der, &der_len); - result = asn1_get_bit_der (der, 0, &ret_len, str, str_size, &bit_len); - if (result != ASN1_GENERIC_ERROR) - { - fprintf (stderr, "asn1_get_bit_der zero\n"); - return 1; - } - - /* Encode short strings with increasing bit lengths */ - - for (i = 0; i < sizeof (tv) / sizeof (tv[0]); i++) - { - /* Encode */ - - asn1_bit_der ((const unsigned char *) tv[i].bitstr, tv[i].bitlen, - der, &der_len); - -#if 0 - { - size_t j; - for (j = 0; j < der_len; j++) - printf ("\\x%02x", der[j]); - printf ("\n"); - } -#endif - - if (der_len != tv[i].derlen || memcmp (der, tv[i].der, der_len) != 0) - { - fprintf (stderr, "asn1_bit_der iter %lu\n", (unsigned long) i); - return 1; - } - - /* Decode it */ - - result = asn1_get_bit_der (der, der_len, &ret_len, str, - str_size, &bit_len); - if (result != ASN1_SUCCESS || ret_len != tv[i].derlen - || bit_len != tv[i].bitlen) - { - fprintf (stderr, "asn1_get_bit_der iter %lu, err: %d\n", (unsigned long) i, result); - return 1; - } - } - - - /* Decode sample from "A Layman's Guide to a Subset of ASN.1, BER, - and DER" section 5.4 "BIT STRING": "The BER encoding of the BIT - STRING value "011011100101110111" can be any of the following, - among others, depending on the choice of padding bits, the form - of length octets [...]". - */ - - /* 03 04 06 6e 5d c0 DER encoding */ - - memcpy (der, "\x04\x06\x6e\x5d\xc0", 5); - der_len = 5; - - result = asn1_get_bit_der (der, der_len, &ret_len, str, str_size, &bit_len); - if (result != ASN1_SUCCESS || ret_len != 5 - || bit_len != 18 || memcmp (str, "\x6e\x5d\xc0", 3) != 0) - { - fprintf (stderr, "asn1_get_bit_der example\n"); - return 1; - } - - der_len = sizeof (der); - asn1_bit_der (str, bit_len, der, &der_len); - if (der_len != 5 || memcmp (der, "\x04\x06\x6e\x5d\xc0", 5) != 0) - { - fprintf (stderr, "asn1_bit_der example roundtrip\n"); - return 1; - } - - /* 03 04 06 6e 5d e0 padded with "100000" */ - - memcpy (der, "\x04\x06\x6e\x5d\xe0", 5); - der_len = 5; - - result = asn1_get_bit_der (der, der_len, &ret_len, str, str_size, &bit_len); - if (result != ASN1_SUCCESS || ret_len != 5 - || bit_len != 18 || memcmp (str, "\x6e\x5d\xe0", 3) != 0) - { - fprintf (stderr, "asn1_get_bit_der example padded\n"); - return 1; - } - - der_len = sizeof (der); - asn1_bit_der (str, bit_len, der, &der_len); - if (der_len != 5 || memcmp (der, "\x04\x06\x6e\x5d\xc0", 5) != 0) - { - fprintf (stderr, "asn1_bit_der example roundtrip\n"); - return 1; - } - - /* 03 81 04 06 6e 5d c0 long form of length octets */ - - memcpy (der, "\x81\x04\x06\x6e\x5d\xc0", 6); - der_len = 6; - - result = asn1_get_bit_der (der, der_len, &ret_len, str, str_size, &bit_len); - - if (result != ASN1_SUCCESS || ret_len != 6 - || bit_len != 18 || memcmp (str, "\x6e\x5d\xc0", 3) != 0) - { - fprintf (stderr, "asn1_get_bit_der example long form\n"); - return 1; - } - - der_len = sizeof (der); - asn1_bit_der (str, bit_len, der, &der_len); - if (der_len != 5 || memcmp (der, "\x04\x06\x6e\x5d\xc0", 5) != 0) - { - fprintf (stderr, "asn1_bit_der example roundtrip\n"); - return 1; - } - - return 0; -} diff --git a/tests/Test_strings.c b/tests/Test_strings.c deleted file mode 100644 index 83a73cc..0000000 --- a/tests/Test_strings.c +++ /dev/null @@ -1,153 +0,0 @@ -/* - * Copyright (C) 2012-2014 Free Software Foundation, Inc. - * - * This file is part of LIBTASN1. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * Written by Simon Josefsson - * - */ - -#include -#include -#include - -#include "libtasn1.h" - -struct tv -{ - unsigned int etype; - unsigned int str_len; - const void *str; - unsigned int der_len; - const void *der; -}; - -static const struct tv tv[] = { - {ASN1_ETYPE_IA5_STRING, 20, - "\x63\x73\x63\x61\x40\x70\x61\x73\x73\x70\x6f\x72\x74\x2e\x67\x6f\x76\x2e\x67\x72", - 22, - "\x16\x14\x63\x73\x63\x61\x40\x70\x61\x73\x73\x70\x6f\x72\x74\x2e\x67\x6f\x76\x2e\x67\x72"}, - {ASN1_ETYPE_PRINTABLE_STRING, 5, "\x4e\x69\x6b\x6f\x73", - 7, "\x13\x05\x4e\x69\x6b\x6f\x73"}, - {ASN1_ETYPE_UTF8_STRING, 12, "Αττική", - 14, "\x0c\x0c\xce\x91\xcf\x84\xcf\x84\xce\xb9\xce\xba\xce\xae"}, - {ASN1_ETYPE_TELETEX_STRING, 15, - "\x53\x69\x6d\x6f\x6e\x20\x4a\x6f\x73\x65\x66\x73\x73\x6f\x6e", - 17, - "\x14\x0f\x53\x69\x6d\x6f\x6e\x20\x4a\x6f\x73\x65\x66\x73\x73\x6f\x6e"}, - {ASN1_ETYPE_OCTET_STRING, 36, - "\x30\x22\x80\x0F\x32\x30\x31\x31\x30\x38\x32\x31\x30\x38\x30\x30\x30\x36\x5A\x81\x0F\x32\x30\x31\x31\x30\x38\x32\x33\x32\x30\x35\x39\x35\x39\x5A", - 38, - "\x04\x24\x30\x22\x80\x0F\x32\x30\x31\x31\x30\x38\x32\x31\x30\x38\x30\x30\x30\x36\x5A\x81\x0F\x32\x30\x31\x31\x30\x38\x32\x33\x32\x30\x35\x39\x35\x39\x5A"} -}; - -#define SSTR(x) sizeof(x)-1,x -static const struct tv ber[] = { - {ASN1_ETYPE_OCTET_STRING, - SSTR("\xa0\xa0"), - SSTR("\x24\x80\x04\x82\x00\x02\xa0\xa0\x00\x00")}, - {ASN1_ETYPE_OCTET_STRING, - SSTR("\xa0\xa0\xb0\xb0\xb0"), - SSTR("\x24\x80\x04\x82\x00\x02\xa0\xa0\x04\x82\x00\x03\xb0\xb0\xb0\x00\x00")}, - {ASN1_ETYPE_OCTET_STRING, - SSTR("\xa0\xa0\xb0\xb0\xb0\xa1\xa1"), - SSTR("\x24\x80\x04\x82\x00\x02\xa0\xa0\x04\x82\x00\x03\xb0\xb0\xb0\x24\x80\x04\x82\x00\x02\xa1\xa1\x00\x00\x00\x00")}, - {ASN1_ETYPE_OCTET_STRING, - SSTR("\xa0\xa0\xb0\xb0\xb0\xa1\xa1\xc1"), - SSTR("\x24\x80\x04\x82\x00\x02\xa0\xa0\x04\x82\x00\x03\xb0\xb0\xb0\x24\x80\x04\x82\x00\x02\xa1\xa1\x04\x82\x00\x01\xc1\x00\x00\x00\x00")}, -}; - -int -main (int argc, char *argv[]) -{ - int ret; - unsigned char tl[ASN1_MAX_TL_SIZE]; - unsigned int tl_len, der_len, str_len; - const unsigned char *str; - unsigned char *b; - unsigned int i; - - /* Dummy test */ - - for (i = 0; i < sizeof (tv) / sizeof (tv[0]); i++) - { - /* Encode */ - tl_len = sizeof (tl); - ret = asn1_encode_simple_der (tv[i].etype, tv[i].str, tv[i].str_len, - tl, &tl_len); - if (ret != ASN1_SUCCESS) - { - fprintf (stderr, "Encoding error in %u: %s\n", i, - asn1_strerror (ret)); - return 1; - } - der_len = tl_len + tv[i].str_len; - - if (der_len != tv[i].der_len || memcmp (tl, tv[i].der, tl_len) != 0) - { - fprintf (stderr, - "DER encoding differs in %u! (size: %u, expected: %u)\n", - i, der_len, tv[i].der_len); - return 1; - } - - /* decoding */ - ret = - asn1_decode_simple_der (tv[i].etype, tv[i].der, tv[i].der_len, &str, - &str_len); - if (ret != ASN1_SUCCESS) - { - fprintf (stderr, "Decoding error in %u: %s\n", i, - asn1_strerror (ret)); - return 1; - } - - if (str_len != tv[i].str_len || memcmp (str, tv[i].str, str_len) != 0) - { - fprintf (stderr, - "DER decoded data differ in %u! (size: %u, expected: %u)\n", - i, der_len, tv[i].str_len); - return 1; - } - } - - /* BER decoding */ - for (i = 0; i < sizeof (ber) / sizeof (ber[0]); i++) - { - /* decoding */ - ret = - asn1_decode_simple_ber (ber[i].etype, ber[i].der, ber[i].der_len, &b, - &str_len, NULL); - if (ret != ASN1_SUCCESS) - { - fprintf (stderr, "BER decoding error in %u: %s\n", i, - asn1_strerror (ret)); - return 1; - } - - if (str_len != ber[i].str_len || memcmp (b, ber[i].str, str_len) != 0) - { - fprintf (stderr, - "BER decoded data differ in %u! (size: %u, expected: %u)\n", - i, str_len, ber[i].str_len); - return 1; - } - free(b); - } - - - return 0; -} diff --git a/tests/Test_tree.asn b/tests/Test_tree.asn deleted file mode 100644 index 0ad0dc5..0000000 --- a/tests/Test_tree.asn +++ /dev/null @@ -1,176 +0,0 @@ --- --- File used in the test sequence Test_tree. --- - -TEST_TREE {iso(1) identified-organization(3) dod(6) internet(1) - security(5) mechanisms(5) pkix(7) id-mod(0) id-pkix1-implicit-88(2)} - -DEFINITIONS IMPLICIT TAGS ::= - -BEGIN - -KrbError ::= [APPLICATION 30] SEQUENCE { - pvno[0] INTEGER -} - -Checksum ::= SEQUENCE { - checksum [1] OCTET STRING -} - -CertTemplate ::= SEQUENCE { - version [0] INTEGER OPTIONAL, - issuer [3] Name OPTIONAL, - validity [4] INTEGER OPTIONAL -} - -Name ::= CHOICE { - rdnSequence RDNSequence } - -RDNSequence ::= RelativeDistinguishedName - -RelativeDistinguishedName ::= - - SET SIZE (1 .. MAX) OF AttributeTypeAndValue - -AttributeTypeAndValue ::= SEQUENCE { - type AttributeType, - value AttributeValue } - -AttributeType ::= OBJECT IDENTIFIER -AttributeValue ::= ANY - - -sequenceEmpty ::= SEQUENCE{ - int1 INTEGER, - seq1 [1] IMPLICIT Sequence_octetTest1, - set1 [2] EXPLICIT SET OF INTEGER -} - - -IndefiniteLengthTest ::= SEQUENCE{ - seq1 [1] IMPLICIT Sequence_octetTest1, - set1 SET OF OBJECT IDENTIFIER, - int1 INTEGER -} - - -OidTest ::= SEQUENCE{ - oid3 [3] OBJECT IDENTIFIER DEFAULT id-Test, - oid [1] OBJECT IDENTIFIER DEFAULT id-anyTest2, - oid2 [2] OBJECT IDENTIFIER DEFAULT id-anyTest -} - -OidAndTimeTest ::= SEQUENCE{ - set SET OF INTEGER, - oid OBJECT IDENTIFIER, - time2 GeneralizedTime, - bol BOOLEAN, - oct OCTET STRING, - bit BIT STRING OPTIONAL, - bol2 BOOLEAN DEFAULT TRUE, - enum ENUMERATED {v1(1),v2(2)} DEFAULT v1, - any [1] ANY OPTIONAL, - gen GeneralString OPTIONAL, - time1 UTCTime -} - -SequenceTestTag ::= SEQUENCE{ - int1 [2] EXPLICIT INTEGER, - int2 [3] IMPLICIT INTEGER, - str1 [1] IMPLICIT PrintableString, - str2 UniversalString, - str3 [2] EXPLICIT UniversalString -} - - -Sequence1 ::= SEQUENCE{ - int1 [0] INTEGER {v1(0),v2(1),v3(2)} DEFAULT v2, - int2 INTEGER, - seq SET OF INTEGER, - id OBJECT IDENTIFIER, - oct OCTET STRING, - any1 ANY DEFINED BY id OPTIONAL -} - -DHParameter ::= SEQUENCE { - prime INTEGER, - base INTEGER, - privateValueLength INTEGER OPTIONAL -} - -id-octetTest1 OBJECT IDENTIFIER ::= {1 2 3 4} - -Sequence_octetTest1 ::= SEQUENCE{ - int INTEGER OPTIONAL -} - - -AnyTest2 ::= CHOICE{ - str OCTET STRING, - int INTEGER -} - -id-ic OBJECT IDENTIFIER ::= {2 5} -id-anyTest OBJECT IDENTIFIER ::= {id-ic 29 1} -id-anyTest2 OBJECT IDENTIFIER ::= {id-ic 29 2} - - -anyTest2 ::= INTEGER - - -VisibleString ::= [UNIVERSAL 26] IMPLICIT OCTET STRING - -NumericString ::= [UNIVERSAL 18] IMPLICIT OCTET STRING - -IA5String ::= [UNIVERSAL 22] IMPLICIT OCTET STRING - -TeletexString ::= [UNIVERSAL 20] IMPLICIT OCTET STRING - -PrintableString ::= [UNIVERSAL 19] IMPLICIT OCTET STRING - -UniversalString ::= [UNIVERSAL 28] IMPLICIT OCTET STRING - -- UniversalString is defined in ASN.1:1993 - -BMPString ::= [UNIVERSAL 30] IMPLICIT OCTET STRING - -- BMPString is the subtype of UniversalString and models - -- the Basic Multilingual Plane of ISO/IEC/ITU 10646-1 - -UTF8String ::= [UNIVERSAL 12] IMPLICIT OCTET STRING - -- The content of this type conforms to RFC 2279. - - -Test3 ::= SEQUENCE{ - a INTEGER, - b [1] EXPLICIT GeneralString2 -} - -GeneralString2 ::= [2] EXPLICIT GeneralString - -X520LocalityName ::= CHOICE { - teletexString TeletexString, - printableString PrintableString, - universalString UniversalString, - utf8String UTF8String, - bmpString BMPString } - - -id-Test OBJECT IDENTIFIER ::= {1 2 29 2} - -END - --- Copyright (C) 2002-2014 Free Software Foundation, Inc. --- --- This file is part of LIBTASN1. --- --- This program is free software: you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation, either version 3 of the License, or --- (at your option) any later version. --- --- This program is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License --- along with this program. If not, see . diff --git a/tests/Test_tree.c b/tests/Test_tree.c deleted file mode 100644 index 0b6a7df..0000000 --- a/tests/Test_tree.c +++ /dev/null @@ -1,829 +0,0 @@ -/* - * Copyright (C) 2002-2014 Free Software Foundation, Inc. - * - * This file is part of LIBTASN1. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - -/*****************************************************/ -/* File: Test_tree.c */ -/* Description: Test sequences for these functions: */ -/* asn1_visit_tree, */ -/* asn1_create_element, */ -/* asn1_delete_structure2, */ -/* asn1_delete_structure, */ -/* asn1_write_value, */ -/* asn1_read_value, */ -/*****************************************************/ - -#include -#include -#include - -#define ASN1_INTERNAL_BUILD -#include "libtasn1.h" - -#include "Test_tree_asn1_tab.c" - -#define ACT_NULL 0 -#define ACT_CREATE 1 -#define ACT_DELETE 2 -#define ACT_WRITE 3 -#define ACT_READ 4 -#define ACT_VISIT 5 -#define ACT_ENCODING 6 -#define ACT_DECODING 7 -#define ACT_PRINT_DER 8 -#define ACT_EXPAND_ANY 9 -#define ACT_DECODING_ELEMENT 10 -#define ACT_EXPAND_OCTET 11 -#define ACT_NUMBER_OF_ELEMENTS 12 -#define ACT_DECODING_START_END 13 -#define ACT_READ_DEFINITIONS 14 -#define ACT_READ_TAG_CLASS 15 -#define ACT_OID_2_STRUCTURE 16 -#define ACT_READ_LENGTH 17 -#define ACT_ENCODING_LENGTH 18 -#define ACT_READ_BIT 19 -#define ACT_SET_DER 20 -#define ACT_DELETE_ELEMENT 21 -#define ACT_DELETE2 22 - - -typedef struct -{ - int action; - const char *par1; - const char *par2; - int par3; - int errorNumber; - int line; -} test_type; - - -test_type test_array[] = { - - {ACT_DELETE, "", "", 0, ASN1_ELEMENT_NOT_FOUND, __LINE__}, - - /* Test: APPLICATION 30 */ - {ACT_CREATE, "TEST_TREE.KrbError", 0, 0, ASN1_SUCCESS, __LINE__}, - {ACT_WRITE, "pvno", "5", 0, ASN1_SUCCESS, __LINE__}, - {ACT_ENCODING_LENGTH, "", 0, 5, ASN1_MEM_ERROR, __LINE__}, - {ACT_ENCODING, "", 0, 4, ASN1_MEM_ERROR, __LINE__}, - {ACT_ENCODING, "", 0, 5, ASN1_SUCCESS, __LINE__}, - {ACT_PRINT_DER, 0, 0, 0, ASN1_SUCCESS, __LINE__}, - {ACT_DELETE, "", "", 0, ASN1_SUCCESS, __LINE__}, - {ACT_CREATE, "TEST_TREE.KrbError", 0, 0, ASN1_SUCCESS, __LINE__}, - {ACT_DECODING, 0, 0, 0, ASN1_SUCCESS, __LINE__}, - {ACT_VISIT, "", "", ASN1_PRINT_ALL, ASN1_SUCCESS, __LINE__}, - {ACT_DELETE_ELEMENT, "pvno", "", 0, ASN1_SUCCESS, __LINE__}, - {ACT_DELETE_ELEMENT, "pvno", "", 0, ASN1_ELEMENT_NOT_FOUND, __LINE__}, - {ACT_DELETE2, "", "", 0, ASN1_SUCCESS, __LINE__}, - - /* Test: CHOICE */ - {ACT_CREATE, "TEST_TREE.CertTemplate", 0, 0, ASN1_SUCCESS, __LINE__}, - {ACT_WRITE, "version", 0, 0, ASN1_SUCCESS, __LINE__}, - {ACT_WRITE, "validity", 0, 0, ASN1_SUCCESS, __LINE__}, - {ACT_WRITE, "issuer", "rdnSequence", 0, ASN1_SUCCESS, __LINE__}, - {ACT_WRITE, "issuer.rdnSequence", "NEW", 0, ASN1_SUCCESS, __LINE__}, - {ACT_WRITE, "issuer.rdnSequence.?LAST.type", "2.5.4.3", 0, ASN1_SUCCESS, - __LINE__}, - {ACT_WRITE, "issuer.rdnSequence.?LAST.value", - "\x0c\x18\x71\x75\x61\x73\x61\x72\x2e\x6c\x61\x73\x2e\x69\x63\x2e\x75\x6e\x69\x63\x61\x6d\x70\x2e\x62\x72", - 26, ASN1_SUCCESS, __LINE__}, - {ACT_WRITE, "issuer.rdnSequence", "NEW", 0, ASN1_SUCCESS, __LINE__}, - {ACT_WRITE, "issuer.rdnSequence.?LAST.type", "2.5.4.7", 0, ASN1_SUCCESS, - __LINE__}, - {ACT_WRITE, "issuer.rdnSequence.?LAST.value", - "\x0c\x08\x43\x61\x6d\x70\x69\x6e\x61\x73", 10, ASN1_SUCCESS, __LINE__}, - {ACT_WRITE, "issuer.rdnSequence", "NEW", 0, ASN1_SUCCESS, __LINE__}, - {ACT_WRITE, "issuer.rdnSequence.?LAST.type", "2.5.4.6", 0, ASN1_SUCCESS, - __LINE__}, - {ACT_WRITE, "issuer.rdnSequence.?LAST.value", - "\x13\x06\x42\x72\x61\x73\x69\x6c", 8, ASN1_SUCCESS, __LINE__}, - {ACT_WRITE, "issuer.rdnSequence", "NEW", 0, ASN1_SUCCESS, __LINE__}, - {ACT_WRITE, "issuer.rdnSequence.?LAST.type", "2.5.4.10", 0, ASN1_SUCCESS, - __LINE__}, - {ACT_WRITE, "issuer.rdnSequence.?LAST.value", "\x0c\x02\x49\x43", 4, - ASN1_SUCCESS, __LINE__}, - {ACT_WRITE, "issuer.rdnSequence", "NEW", 0, ASN1_SUCCESS, __LINE__}, - {ACT_WRITE, "issuer.rdnSequence.?LAST.type", "2.5.4.11", 0, ASN1_SUCCESS, - __LINE__}, - {ACT_WRITE, "issuer.rdnSequence.?LAST.value", "\x0c\x03\x4c\x41\x53", 5, - ASN1_SUCCESS, __LINE__}, - {ACT_WRITE, "issuer.rdnSequence", "NEW", 0, ASN1_SUCCESS, __LINE__}, - {ACT_WRITE, "issuer.rdnSequence.?LAST.type", "2.5.4.8", 0, ASN1_SUCCESS, - __LINE__}, - {ACT_WRITE, "issuer.rdnSequence.?LAST.value", - "\x0c\x09\x53\x61\x6f\x20\x50\x61\x75\x6c\x6f", 11, ASN1_SUCCESS, - __LINE__}, - {ACT_WRITE, "issuer.rdnSequence", "NEW", 0, ASN1_SUCCESS, __LINE__}, - {ACT_WRITE, "issuer.rdnSequence.?LAST.type", "1.2.840.113549.1.9.1", 0, - ASN1_SUCCESS, __LINE__}, - {ACT_WRITE, "issuer.rdnSequence.?LAST.value", - "\x16\x19\x65\x64\x75\x61\x72\x64\x6f\x40\x6c\x61\x73\x2e\x69\x63\x2e\x75\x6e\x69\x63\x61\x6d\x70\x2e\x62\x72", - 27, ASN1_SUCCESS, __LINE__}, - {ACT_VISIT, "", "", ASN1_PRINT_ALL, ASN1_SUCCESS, __LINE__}, - {ACT_ENCODING_LENGTH, "", 0, 152, ASN1_MEM_ERROR, __LINE__}, - {ACT_ENCODING, "", 0, 151, ASN1_MEM_ERROR, __LINE__}, - {ACT_ENCODING, "", 0, 152, ASN1_SUCCESS, __LINE__}, - {ACT_PRINT_DER, 0, 0, 0, ASN1_SUCCESS, __LINE__}, - {ACT_DELETE, "", "", 0, ASN1_SUCCESS, __LINE__}, - {ACT_CREATE, "TEST_TREE.CertTemplate", 0, 0, ASN1_SUCCESS, __LINE__}, - {ACT_DECODING, 0, 0, 0, ASN1_SUCCESS, __LINE__}, - {ACT_VISIT, "", "", ASN1_PRINT_ALL, ASN1_SUCCESS, __LINE__}, - {ACT_DELETE_ELEMENT, "issuer.rdnSequence.?1", "", 0, ASN1_SUCCESS, - __LINE__}, - {ACT_DELETE_ELEMENT, "issuer.rdnSequence.?1", "", 0, - ASN1_ELEMENT_NOT_FOUND, __LINE__}, - {ACT_DELETE_ELEMENT, "issuer.rdnSequence.?3", "", 0, ASN1_SUCCESS, - __LINE__}, - {ACT_DELETE_ELEMENT, "issuer.rdnSequence.?5", "", 0, ASN1_SUCCESS, - __LINE__}, - {ACT_DELETE_ELEMENT, "issuer.rdnSequence.?7", "", 0, ASN1_SUCCESS, - __LINE__}, - {ACT_VISIT, "", "", ASN1_PRINT_ALL, ASN1_SUCCESS, __LINE__}, - {ACT_DELETE, "", "", 0, ASN1_SUCCESS, __LINE__}, - - /* Test: Empty sequnces */ - {ACT_CREATE, "TEST_TREE.sequenceEmpty", 0, 0, ASN1_SUCCESS, __LINE__}, - {ACT_WRITE, "int1", "1", 0, ASN1_SUCCESS, __LINE__}, - {ACT_WRITE, "seq1.int", NULL, 0, ASN1_SUCCESS, __LINE__}, - {ACT_ENCODING_LENGTH, "", 0, 11, ASN1_MEM_ERROR, __LINE__}, - {ACT_ENCODING, "", 0, 10, ASN1_MEM_ERROR, __LINE__}, - {ACT_ENCODING, "", 0, 11, ASN1_SUCCESS, __LINE__}, - {ACT_PRINT_DER, 0, 0, 0, ASN1_SUCCESS, __LINE__}, - {ACT_DELETE, "", "", 0, ASN1_SUCCESS, __LINE__}, - {ACT_CREATE, "TEST_TREE.sequenceEmpty", 0, 0, ASN1_SUCCESS, __LINE__}, - {ACT_DECODING, 0, 0, 0, ASN1_SUCCESS, __LINE__}, - {ACT_DECODING_START_END, "seq1", "START", 5, ASN1_SUCCESS, __LINE__}, - {ACT_DECODING_START_END, "seq1", "END", 6, ASN1_SUCCESS, __LINE__}, - {ACT_DECODING_START_END, "set1", "START", 7, ASN1_SUCCESS, __LINE__}, - {ACT_DECODING_START_END, "set1", "END", 10, ASN1_SUCCESS, __LINE__}, - {ACT_VISIT, "", "", ASN1_PRINT_ALL, ASN1_SUCCESS, __LINE__}, - {ACT_DELETE, "", "", 0, ASN1_SUCCESS, __LINE__}, - - /* Test: Indefinite Length */ - {ACT_CREATE, "TEST_TREE.IndefiniteLengthTest", 0, 0, ASN1_SUCCESS, - __LINE__}, - {ACT_WRITE, "int1", "1", 0, ASN1_SUCCESS, __LINE__}, - {ACT_WRITE, "seq1.int", "2", 0, ASN1_SUCCESS, __LINE__}, - {ACT_WRITE, "set1", "NEW", 0, ASN1_SUCCESS, __LINE__}, - {ACT_WRITE, "set1.?LAST", "1.2.3.4", 0, ASN1_SUCCESS, __LINE__}, - {ACT_WRITE, "set1", "NEW", 0, ASN1_SUCCESS, __LINE__}, - {ACT_WRITE, "set1.?LAST", "1.2.5.6", 0, ASN1_SUCCESS, __LINE__}, - {ACT_ENCODING, "", 0, 255, ASN1_SUCCESS, __LINE__}, - {ACT_PRINT_DER, 0, 0, 0, ASN1_SUCCESS, __LINE__}, - {ACT_SET_DER, - "\x30\x18\xa1\x80\x02\x01\x02\x00\x00\x31\x80\x06\x03\x2a\x03\x04\x06\x03\x2a\x05\x06\x00\x00\x02\x01\x01", - 0, 26, ASN1_SUCCESS, __LINE__}, - {ACT_DELETE, "", "", 0, ASN1_SUCCESS, __LINE__}, - {ACT_CREATE, "TEST_TREE.IndefiniteLengthTest", 0, 0, ASN1_SUCCESS, - __LINE__}, - {ACT_DECODING, 0, 0, 0, ASN1_SUCCESS, __LINE__}, - {ACT_DECODING_START_END, "seq1", "START", 2, ASN1_SUCCESS, __LINE__}, - {ACT_DECODING_START_END, "seq1", "END", 8, ASN1_SUCCESS, __LINE__}, - {ACT_DECODING_START_END, "set1", "START", 9, ASN1_SUCCESS, __LINE__}, - {ACT_DECODING_START_END, "set1", "END", 22, ASN1_SUCCESS, __LINE__}, - {ACT_VISIT, "", "", ASN1_PRINT_ALL, ASN1_SUCCESS, __LINE__}, - {ACT_DELETE, "", "", 0, ASN1_SUCCESS, __LINE__}, - - /* Test: OID */ - {ACT_CREATE, "TEST_TREE.OidTest", 0, 0, ASN1_SUCCESS, __LINE__}, - {ACT_READ_LENGTH, "oid", NULL, 9, ASN1_MEM_ERROR, __LINE__}, - {ACT_READ, "oid", "2.5.29.2", 9, ASN1_SUCCESS, __LINE__}, - {ACT_WRITE, "oid", "1.2.3.4", 0, ASN1_SUCCESS, __LINE__}, - {ACT_WRITE, "oid2", "2.5.29.1", 0, ASN1_SUCCESS, __LINE__}, - {ACT_WRITE, "oid3", "1.2.29.2", 0, ASN1_SUCCESS, __LINE__}, - {ACT_ENCODING_LENGTH, "", 0, 7, ASN1_MEM_ERROR, __LINE__}, - {ACT_ENCODING, "", 0, 6, ASN1_MEM_ERROR, __LINE__}, - {ACT_ENCODING, "", 0, 7, ASN1_SUCCESS, __LINE__}, - {ACT_PRINT_DER, 0, 0, 0, ASN1_SUCCESS, __LINE__}, - {ACT_DELETE, "", "", 0, ASN1_SUCCESS, __LINE__}, - {ACT_CREATE, "TEST_TREE.OidTest", 0, 0, ASN1_SUCCESS, __LINE__}, - {ACT_DECODING, 0, 0, 0, ASN1_SUCCESS, __LINE__}, - {ACT_DECODING_START_END, "oid", "START", 2, ASN1_SUCCESS, __LINE__}, - {ACT_DECODING_START_END, "oid", "END", 6, ASN1_SUCCESS, __LINE__}, - {ACT_DECODING_START_END, "", "START", 0, ASN1_SUCCESS, __LINE__}, - {ACT_DECODING_START_END, "", "END", 6, ASN1_SUCCESS, __LINE__}, - {ACT_READ, "oid2", "2.5.29.1", 9, ASN1_SUCCESS, __LINE__}, - {ACT_READ, "oid3", "1.2.29.2", 9, ASN1_SUCCESS, __LINE__}, - {ACT_WRITE, "oid", "1.2.3.4", 0, ASN1_SUCCESS, __LINE__}, - {ACT_VISIT, "", "", ASN1_PRINT_ALL, ASN1_SUCCESS, __LINE__}, - {ACT_DELETE, "", "", 0, ASN1_SUCCESS, __LINE__}, - - /* Test: ENCODING_LENGTH and READ_LEN */ - {ACT_CREATE, "TEST_TREE.OidAndTimeTest", 0, 0, ASN1_SUCCESS, __LINE__}, - {ACT_WRITE, "oid", "1.2.3.4", 0, ASN1_SUCCESS, __LINE__}, - {ACT_WRITE, "time1", "9801011200Z", 1, ASN1_SUCCESS, __LINE__}, - {ACT_WRITE, "time2", "2001010112001.12-0700", 1, ASN1_SUCCESS, __LINE__}, - {ACT_WRITE, "oct", "ABCD", 4, ASN1_SUCCESS, __LINE__}, - {ACT_WRITE, "bol", "TRUE", 1, ASN1_SUCCESS, __LINE__}, - {ACT_WRITE, "enum", "2", 0, ASN1_SUCCESS, __LINE__}, - {ACT_WRITE, "bit", "1\xC0", 10, ASN1_SUCCESS, __LINE__}, - {ACT_WRITE, "any", "\x30\x01\x01", 3, ASN1_SUCCESS, __LINE__}, - {ACT_WRITE, "set", "NEW", 0, ASN1_SUCCESS, __LINE__}, - {ACT_WRITE, "set.?LAST", "10", 0, ASN1_SUCCESS, __LINE__}, - {ACT_WRITE, "set", "NEW", 0, ASN1_SUCCESS, __LINE__}, - {ACT_WRITE, "set.?LAST", "1", 0, ASN1_SUCCESS, __LINE__}, - {ACT_WRITE, "gen", "Prova", 5, ASN1_SUCCESS, __LINE__}, - {ACT_READ_LENGTH, "oid", NULL, 8, ASN1_MEM_ERROR, __LINE__}, - {ACT_READ_LENGTH, "time1", NULL, 12, ASN1_MEM_ERROR, __LINE__}, - {ACT_READ_LENGTH, "time2", NULL, 22, ASN1_MEM_ERROR, __LINE__}, - {ACT_READ_LENGTH, "oct", NULL, 4, ASN1_MEM_ERROR, __LINE__}, - {ACT_READ_LENGTH, "bol", NULL, 5, ASN1_MEM_ERROR, __LINE__}, - {ACT_READ_LENGTH, "enum", NULL, 1, ASN1_MEM_ERROR, __LINE__}, - {ACT_READ_LENGTH, "any", NULL, 3, ASN1_MEM_ERROR, __LINE__}, - {ACT_READ_LENGTH, "gen", NULL, 5, ASN1_MEM_ERROR, __LINE__}, - {ACT_READ_LENGTH, "bit", NULL, 10, ASN1_MEM_ERROR, __LINE__}, - {ACT_READ_BIT, "bit", "1\xC0", 10, ASN1_SUCCESS, __LINE__}, - {ACT_ENCODING_LENGTH, "", 0, 79, ASN1_MEM_ERROR, __LINE__}, - {ACT_ENCODING, "", 0, 78, ASN1_MEM_ERROR, __LINE__}, - {ACT_ENCODING, "", 0, 79, ASN1_SUCCESS, __LINE__}, - {ACT_PRINT_DER, 0, 0, 0, ASN1_SUCCESS, __LINE__}, - {ACT_DELETE, "", "", 0, ASN1_SUCCESS, __LINE__}, - {ACT_CREATE, "TEST_TREE.OidAndTimeTest", 0, 0, ASN1_SUCCESS, __LINE__}, - {ACT_DECODING, 0, 0, 0, ASN1_SUCCESS, __LINE__}, - {ACT_VISIT, "", "", ASN1_PRINT_ALL, ASN1_SUCCESS, __LINE__}, - {ACT_DELETE, "", "", 0, ASN1_SUCCESS, __LINE__}, - - /* Test: OID to STRUCTURE */ - {ACT_OID_2_STRUCTURE, "2.5.29.3", "", 0, ASN1_ELEMENT_NOT_FOUND, __LINE__}, - {ACT_OID_2_STRUCTURE, "1.2.29.2", "", 0, ASN1_ELEMENT_NOT_FOUND, __LINE__}, - {ACT_OID_2_STRUCTURE, "2.5.29.2", "anyTest2", 0, ASN1_SUCCESS, __LINE__}, - - /* Test: READ TAG and CLASS */ - {ACT_CREATE, "TEST_TREE.SequenceTestTag", 0, 0, ASN1_SUCCESS, __LINE__}, - {ACT_READ_TAG_CLASS, "int", "", 0, ASN1_ELEMENT_NOT_FOUND, __LINE__}, - {ACT_READ_TAG_CLASS, "int1", "TAG", ASN1_TAG_INTEGER, ASN1_SUCCESS, - __LINE__}, - {ACT_READ_TAG_CLASS, "int1", "CLASS", ASN1_CLASS_UNIVERSAL, ASN1_SUCCESS, - __LINE__}, - {ACT_READ_TAG_CLASS, "int2", "TAG", 3, ASN1_SUCCESS, __LINE__}, - {ACT_READ_TAG_CLASS, "int2", "CLASS", ASN1_CLASS_CONTEXT_SPECIFIC, - ASN1_SUCCESS, __LINE__}, - {ACT_READ_TAG_CLASS, "str1", "TAG", 1, ASN1_SUCCESS, __LINE__}, - {ACT_READ_TAG_CLASS, "str1", "CLASS", ASN1_CLASS_CONTEXT_SPECIFIC, - ASN1_SUCCESS, __LINE__}, - {ACT_READ_TAG_CLASS, "str2", "TAG", 28, ASN1_SUCCESS, __LINE__}, - {ACT_READ_TAG_CLASS, "str2", "CLASS", ASN1_CLASS_UNIVERSAL, ASN1_SUCCESS, - __LINE__}, - {ACT_READ_TAG_CLASS, "str3", "TAG", 28, ASN1_SUCCESS, __LINE__}, - {ACT_READ_TAG_CLASS, "str3", "CLASS", ASN1_CLASS_UNIVERSAL, ASN1_SUCCESS, - __LINE__}, - {ACT_VISIT, "", "", ASN1_PRINT_ALL, ASN1_SUCCESS, __LINE__}, - {ACT_DELETE, "", "", 0, ASN1_SUCCESS, __LINE__}, - - /* Test: OBJECT IDENTIFIER elements */ - {ACT_CREATE, "TEST_TREE.Sequence1", 0, 0, ASN1_SUCCESS, __LINE__}, - {ACT_WRITE, "int1", "v2", 0, ASN1_SUCCESS, __LINE__}, - {ACT_READ, "int1", "\x01", 1, ASN1_SUCCESS, __LINE__}, - {ACT_WRITE, "int2", "0", 0, ASN1_SUCCESS, __LINE__}, - {ACT_WRITE, "oct", "\x02\x01\x0a", 3, ASN1_SUCCESS, __LINE__}, - {ACT_WRITE, "id", "1 2 3 4 5", 0, ASN1_VALUE_NOT_VALID, __LINE__}, - {ACT_WRITE, "id", "2.5.29.2", 0, ASN1_SUCCESS, __LINE__}, - {ACT_READ, "id", "2.5.29.2", 9, ASN1_SUCCESS, __LINE__}, - {ACT_READ_LENGTH, "id", NULL, 9, ASN1_MEM_ERROR, __LINE__}, - {ACT_WRITE, "any1", "\x02\x01\x05", 3, ASN1_SUCCESS, __LINE__}, - {ACT_READ_DEFINITIONS, "TEST_TREE.id-anyTest", "2.5.29.1", 9, ASN1_SUCCESS, - __LINE__}, - {ACT_ENCODING_LENGTH, "", 0, 20, ASN1_MEM_ERROR, __LINE__}, - {ACT_ENCODING, "", 0, 19, ASN1_MEM_ERROR, __LINE__}, - {ACT_ENCODING, "", 0, 200, ASN1_SUCCESS, __LINE__}, - {ACT_PRINT_DER, 0, 0, 0, ASN1_SUCCESS, __LINE__}, - {ACT_DELETE, "", "", 0, ASN1_SUCCESS, __LINE__}, - {ACT_CREATE, "TEST_TREE.Sequence1", 0, 0, ASN1_SUCCESS, __LINE__}, - {ACT_DECODING, 0, 0, 0, ASN1_SUCCESS, __LINE__}, - {ACT_DECODING_START_END, "id", "START", 7, ASN1_SUCCESS, __LINE__}, - {ACT_READ, "id", "2.5.29.2", 9, ASN1_SUCCESS, __LINE__}, - {ACT_EXPAND_ANY, "", NULL, 0, ASN1_SUCCESS, __LINE__}, - {ACT_EXPAND_OCTET, "oct", "id", 0, ASN1_SUCCESS, __LINE__}, - {ACT_VISIT, "", "", ASN1_PRINT_ALL, ASN1_SUCCESS, __LINE__}, - {ACT_DELETE, "", "", 0, ASN1_SUCCESS, __LINE__}, - - /* Test: CHOICE elements */ - {ACT_CREATE, "TEST_TREE.X520LocalityName", 0, 0, ASN1_SUCCESS, __LINE__}, - {ACT_VISIT, "", "", ASN1_PRINT_ALL, ASN1_SUCCESS, __LINE__}, - {ACT_WRITE, "", "teletexString", 0, ASN1_SUCCESS, __LINE__}, - {ACT_WRITE, "teletexString", "PROVA", 5, ASN1_SUCCESS, __LINE__}, - {ACT_ENCODING_LENGTH, "", 0, 7, ASN1_MEM_ERROR, __LINE__}, - {ACT_ENCODING, "", 0, 6, ASN1_MEM_ERROR, __LINE__}, - {ACT_ENCODING, "", 0, 7, ASN1_SUCCESS, __LINE__}, - {ACT_PRINT_DER, 0, 0, 0, ASN1_SUCCESS, __LINE__}, - {ACT_DELETE, "", "", 0, ASN1_SUCCESS, __LINE__}, - {ACT_CREATE, "TEST_TREE.X520LocalityName", 0, 0, ASN1_SUCCESS, __LINE__}, - {ACT_DECODING, 0, 0, 0, ASN1_SUCCESS, __LINE__}, - {ACT_VISIT, "", "", ASN1_PRINT_ALL, ASN1_SUCCESS, __LINE__}, - {ACT_DELETE, "", "", 0, ASN1_SUCCESS, __LINE__}, - - /* Test: OPTIONAL elements */ - {ACT_CREATE, "TEST_TREE.DHParameter", 0, 0, ASN1_SUCCESS, __LINE__}, - {ACT_WRITE, "prime", "1", 0, ASN1_SUCCESS, __LINE__}, - {ACT_WRITE, "base", "2", 0, ASN1_SUCCESS, __LINE__}, - {ACT_WRITE, "privateValueLength", NULL, 0, ASN1_SUCCESS, __LINE__}, - {ACT_VISIT, "", "", ASN1_PRINT_ALL, ASN1_SUCCESS, __LINE__}, - {ACT_ENCODING_LENGTH, "", 0, 8, ASN1_MEM_ERROR, __LINE__}, - {ACT_ENCODING, "", 0, 7, ASN1_MEM_ERROR, __LINE__}, - {ACT_ENCODING, "", 0, 8, ASN1_SUCCESS, __LINE__}, - {ACT_PRINT_DER, 0, 0, 0, ASN1_SUCCESS, __LINE__}, - {ACT_DELETE, "", "", 0, ASN1_SUCCESS, __LINE__}, - {ACT_CREATE, "TEST_TREE.DHParameter", 0, 0, ASN1_SUCCESS, __LINE__}, - {ACT_DECODING, 0, 0, 0, ASN1_SUCCESS, __LINE__}, - {ACT_VISIT, "", "", ASN1_PRINT_ALL, ASN1_SUCCESS, __LINE__}, - {ACT_DELETE, "", "", 0, ASN1_SUCCESS, __LINE__}, - - /* Test: Integer */ - {ACT_CREATE, "TEST_TREE.AnyTest2", 0, 0, ASN1_SUCCESS, __LINE__}, - {ACT_WRITE, "", "int", 0, ASN1_SUCCESS, __LINE__}, - {ACT_WRITE, "int", "0", 0, ASN1_SUCCESS, __LINE__}, - {ACT_ENCODING_LENGTH, "", 0, 3, ASN1_MEM_ERROR, __LINE__}, - {ACT_ENCODING, "", 0, 2, ASN1_MEM_ERROR, __LINE__}, - {ACT_ENCODING, "", 0, 3, ASN1_SUCCESS, __LINE__}, - {ACT_PRINT_DER, 0, 0, 0, ASN1_SUCCESS, __LINE__}, - {ACT_VISIT, "", "", ASN1_PRINT_ALL, ASN1_SUCCESS, __LINE__}, - {ACT_WRITE, "int", "-1", 0, ASN1_SUCCESS, __LINE__}, - {ACT_ENCODING, "", 0, 1024, ASN1_SUCCESS, __LINE__}, - {ACT_PRINT_DER, 0, 0, 0, ASN1_SUCCESS, __LINE__}, - {ACT_VISIT, "", "", ASN1_PRINT_ALL, ASN1_SUCCESS, __LINE__}, - {ACT_WRITE, "int", "1", 0, ASN1_SUCCESS, __LINE__}, - {ACT_ENCODING, "", 0, 1024, ASN1_SUCCESS, __LINE__}, - {ACT_PRINT_DER, 0, 0, 0, ASN1_SUCCESS, __LINE__}, - {ACT_VISIT, "", "", ASN1_PRINT_ALL, ASN1_SUCCESS, __LINE__}, - {ACT_WRITE, "int", "2000000000", 0, ASN1_SUCCESS, __LINE__}, - {ACT_ENCODING, "", 0, 1024, ASN1_SUCCESS, __LINE__}, - {ACT_PRINT_DER, 0, 0, 0, ASN1_SUCCESS, __LINE__}, - {ACT_VISIT, "", "", ASN1_PRINT_ALL, ASN1_SUCCESS, __LINE__}, - {ACT_WRITE, "int", "-2000000000", 0, ASN1_SUCCESS, __LINE__}, - {ACT_ENCODING, "", 0, 1024, ASN1_SUCCESS, __LINE__}, - {ACT_PRINT_DER, 0, 0, 0, ASN1_SUCCESS, __LINE__}, - {ACT_VISIT, "", "", ASN1_PRINT_ALL, ASN1_SUCCESS, __LINE__}, - {ACT_WRITE, "int", "-20000000000", 0, ASN1_SUCCESS, __LINE__}, - {ACT_ENCODING, "", 0, 1024, ASN1_SUCCESS, __LINE__}, - {ACT_PRINT_DER, 0, 0, 0, ASN1_SUCCESS, __LINE__}, - {ACT_VISIT, "", "", ASN1_PRINT_ALL, ASN1_SUCCESS, __LINE__}, - {ACT_WRITE, "int", "20000000000", 0, ASN1_SUCCESS, __LINE__}, - {ACT_ENCODING, "", 0, 1024, ASN1_SUCCESS, __LINE__}, - {ACT_PRINT_DER, 0, 0, 0, ASN1_SUCCESS, __LINE__}, - {ACT_VISIT, "", "", ASN1_PRINT_ALL, ASN1_SUCCESS, __LINE__}, - {ACT_DELETE, "", "", 0, ASN1_SUCCESS, __LINE__}, - - /* Test: elements without names */ - {ACT_CREATE, "TEST_TREE.Sequence1", 0, 0, ASN1_SUCCESS, __LINE__}, - {ACT_WRITE, "int2", "10", 0, ASN1_SUCCESS, __LINE__}, - {ACT_WRITE, "seq", "NEW", 1, ASN1_SUCCESS, __LINE__}, - {ACT_WRITE, "seq.?LAST", "1", 0, ASN1_SUCCESS, __LINE__}, - {ACT_WRITE, "seq", "NEW", 1, ASN1_SUCCESS, __LINE__}, - {ACT_WRITE, "seq.?LAST", "2", 0, ASN1_SUCCESS, __LINE__}, - {ACT_WRITE, "any1", NULL, 0, ASN1_SUCCESS, __LINE__}, - {ACT_NUMBER_OF_ELEMENTS, "seq", "", 2, ASN1_SUCCESS, __LINE__}, - {ACT_WRITE, "id", "1.2.3.4", 0, ASN1_SUCCESS, __LINE__}, - {ACT_WRITE, "oct", "\x30\x03\x02\x01\x15", 5, ASN1_SUCCESS, __LINE__}, - {ACT_ENCODING, "int2", 0, 1024, ASN1_SUCCESS, __LINE__}, - {ACT_PRINT_DER, 0, 0, 0, ASN1_SUCCESS, __LINE__}, - {ACT_ENCODING, "seq.?2", 0, 2, ASN1_MEM_ERROR, __LINE__}, - {ACT_ENCODING, "seq.?2", 0, 3, ASN1_SUCCESS, __LINE__}, - {ACT_PRINT_DER, 0, 0, 0, ASN1_SUCCESS, __LINE__}, - {ACT_ENCODING_LENGTH, "", 0, 25, ASN1_MEM_ERROR, __LINE__}, - {ACT_ENCODING, "", 0, 24, ASN1_MEM_ERROR, __LINE__}, - {ACT_ENCODING, "", 0, 25, ASN1_SUCCESS, __LINE__}, - {ACT_PRINT_DER, 0, 0, 0, ASN1_SUCCESS, __LINE__}, - {ACT_DELETE, "", "", 0, ASN1_SUCCESS, __LINE__}, - {ACT_CREATE, "TEST_TREE.Sequence1", 0, 0, ASN1_SUCCESS, __LINE__}, - {ACT_DECODING_ELEMENT, "int2", 0, 0, ASN1_SUCCESS, __LINE__}, - {ACT_VISIT, "", "", ASN1_PRINT_ALL, ASN1_SUCCESS, __LINE__}, - {ACT_READ, "int2", "\x0a", 1, ASN1_SUCCESS, __LINE__}, - {ACT_READ_LENGTH, "int2", NULL, 1, ASN1_MEM_ERROR, __LINE__}, - {ACT_DELETE, "", "", 0, ASN1_SUCCESS, __LINE__}, - {ACT_CREATE, "TEST_TREE.Sequence1", 0, 0, ASN1_SUCCESS, __LINE__}, - {ACT_DECODING, 0, 0, 0, ASN1_SUCCESS, __LINE__}, - {ACT_DECODING_START_END, "seq.?2", "START", 10, ASN1_SUCCESS, __LINE__}, - {ACT_EXPAND_OCTET, "oct", "id", 0, ASN1_SUCCESS, __LINE__}, - {ACT_VISIT, "", "", ASN1_PRINT_ALL, ASN1_SUCCESS, __LINE__}, - {ACT_DELETE, "", "", 0, ASN1_SUCCESS, __LINE__}, - - /* Test GeneralString */ - {ACT_CREATE, "TEST_TREE.Test3", 0, 0, ASN1_SUCCESS, __LINE__}, - {ACT_WRITE, "a", "1234", 0, ASN1_SUCCESS, __LINE__}, - {ACT_WRITE, "b", "prova", 5, ASN1_SUCCESS, __LINE__}, - {ACT_ENCODING_LENGTH, "", 0, 17, ASN1_MEM_ERROR, __LINE__}, - {ACT_ENCODING, "", 0, 16, ASN1_MEM_ERROR, __LINE__}, - {ACT_ENCODING, "", 0, 17, ASN1_SUCCESS, __LINE__}, - {ACT_PRINT_DER, 0, 0, 0, ASN1_SUCCESS, __LINE__}, - {ACT_DELETE, "", "", 0, ASN1_SUCCESS, __LINE__}, - {ACT_CREATE, "TEST_TREE.Test3", 0, 0, ASN1_SUCCESS, __LINE__}, - {ACT_DECODING, 0, 0, 0, ASN1_SUCCESS, __LINE__}, - {ACT_DECODING_ELEMENT, "b", 0, 0, ASN1_SUCCESS, __LINE__}, - {ACT_READ, "b", "prova", 5, ASN1_SUCCESS, __LINE__}, - {ACT_READ_LENGTH, "b", NULL, 5, ASN1_MEM_ERROR, __LINE__}, - {ACT_VISIT, "", "", ASN1_PRINT_ALL, ASN1_SUCCESS, __LINE__}, - {ACT_DELETE, "", "", 0, ASN1_SUCCESS, __LINE__}, - - /* Bug regression test: Empty write on 64-bit platforms */ - {ACT_CREATE, "TEST_TREE.Checksum", 0, 0, ASN1_SUCCESS, __LINE__}, - {ACT_WRITE, "checksum", "foo", 0, ASN1_SUCCESS, __LINE__}, - {ACT_WRITE, "checksum", "", 0, ASN1_SUCCESS, __LINE__}, - {ACT_ENCODING_LENGTH, "", 0, 4, ASN1_MEM_ERROR, __LINE__}, - {ACT_ENCODING, "", 0, 3, ASN1_MEM_ERROR, __LINE__}, - {ACT_ENCODING, "", 0, 4, ASN1_SUCCESS, __LINE__}, - {ACT_PRINT_DER, 0, 0, 0, ASN1_SUCCESS, __LINE__}, - {ACT_DELETE, "", "", 0, ASN1_SUCCESS, __LINE__}, - {ACT_CREATE, "TEST_TREE.Checksum", 0, 0, ASN1_SUCCESS, __LINE__}, - {ACT_DECODING, 0, 0, 0, ASN1_SUCCESS, __LINE__}, - {ACT_DECODING_ELEMENT, "checksum", 0, 0, ASN1_SUCCESS, __LINE__}, - {ACT_READ, "checksum", "", 0, ASN1_SUCCESS, __LINE__}, - {ACT_READ_LENGTH, "checksum", NULL, 0, ASN1_SUCCESS, __LINE__}, /* MEM_FAILURE? */ - {ACT_VISIT, "", "", ASN1_PRINT_ALL, ASN1_SUCCESS, __LINE__}, - {ACT_DELETE, "", "", 0, ASN1_SUCCESS, __LINE__}, - - /* end */ - {ACT_NULL} - -}; - - -#define error() fprintf(stderr, "Error at line %d\n", __LINE__); exit(1) - -int -main (int argc, char *argv[]) -{ - int result; - asn1_node definitions = NULL; - asn1_node asn1_element = NULL; - char errorDescription[ASN1_MAX_ERROR_DESCRIPTION_SIZE]; - FILE *out; - test_type *test; - int errorCounter = 0, testCounter = 0, der_len; - unsigned char value[1024], der[1024]; - int valueLen, tag = 0, class = 0; - int k; - int start, end, verbose = 0; - const char *str_p = NULL; - const char *treefile = getenv ("ASN1TREE"); - - if (argc > 1) - verbose = 1; - - if (!treefile) - treefile = "Test_tree.asn"; - - if (verbose != 0) - { - printf ("\n\n/****************************************/\n"); - printf ("/* Test sequence : Test_tree */\n"); - printf ("/****************************************/\n\n"); - printf ("ASN1TREE: %s\n", treefile); - } - - /* Check version */ - if (asn1_check_version ("0.2.11") == NULL) - printf ("\nLibrary version check ERROR:\n actual version: %s\n\n", - asn1_check_version (NULL)); - - if (1) - result = asn1_parser2tree (treefile, &definitions, errorDescription); - else - result = - asn1_array2tree (Test_tree_asn1_tab, &definitions, errorDescription); - - if (result != ASN1_SUCCESS) - { - asn1_perror (result); - printf ("ErrorDescription = %s\n\n", errorDescription); - exit (1); - } - - if (1) - out = stdout; - else - out = fopen ("Test_tree.out", "w"); - - if (out == NULL) - { - printf ("Output file ERROR\n"); - exit (1); - } - - if (0) - { - asn1_print_structure (out, definitions, "TEST_TREE", ASN1_PRINT_ALL); - fprintf (out, "\n"); - } - - test = test_array; - - while (test->action != ACT_NULL) - { - testCounter++; - - switch (test->action) - { - case ACT_CREATE: - result = - asn1_create_element (definitions, test->par1, &asn1_element); - break; - case ACT_DELETE: - result = asn1_delete_structure (&asn1_element); - break; - case ACT_DELETE2: - result = asn1_delete_structure2 (&asn1_element, ASN1_DELETE_FLAG_ZEROIZE); - break; - case ACT_DELETE_ELEMENT: - result = asn1_delete_element (asn1_element, test->par1); - break; - case ACT_WRITE: - if ((test->par2) && (!strcmp ("DER", test->par2))) - result = - asn1_write_value (asn1_element, test->par1, der, der_len); - else - result = - asn1_write_value (asn1_element, test->par1, test->par2, - test->par3); - break; - case ACT_READ: - case ACT_READ_BIT: - valueLen = test->par3; - result = - asn1_read_value (asn1_element, test->par1, value, &valueLen); - break; - case ACT_READ_LENGTH: - valueLen = 0; - result = - asn1_read_value (asn1_element, test->par1, NULL, &valueLen); - break; - case ACT_READ_DEFINITIONS: - valueLen = 1024; - result = - asn1_read_value (definitions, test->par1, value, &valueLen); - break; - case ACT_READ_TAG_CLASS: - result = asn1_read_tag (asn1_element, test->par1, &tag, &class); - break; - case ACT_ENCODING: - der_len = test->par3; - result = asn1_der_coding (asn1_element, test->par1, der, &der_len, - errorDescription); - break; - case ACT_ENCODING_LENGTH: - der_len = 0; - result = asn1_der_coding (asn1_element, test->par1, NULL, &der_len, - errorDescription); - break; - case ACT_DECODING: - result = asn1_der_decoding (&asn1_element, der, der_len, - errorDescription); - break; - case ACT_DECODING_ELEMENT: - result = - asn1_der_decoding_element (&asn1_element, test->par1, der, - der_len, errorDescription); - break; - case ACT_DECODING_START_END: - result = - asn1_der_decoding_startEnd (asn1_element, der, der_len, - test->par1, &start, &end); - break; - case ACT_EXPAND_ANY: - result = asn1_expand_any_defined_by (definitions, &asn1_element); - break; - case ACT_EXPAND_OCTET: - result = - asn1_expand_octet_string (definitions, &asn1_element, test->par1, - test->par2); - break; - case ACT_OID_2_STRUCTURE: - str_p = asn1_find_structure_from_oid (definitions, test->par1); - break; - case ACT_VISIT: - if (verbose) - { - asn1_print_structure (out, asn1_element, test->par1, - test->par3); - fprintf (out, "\n"); - } - result = ASN1_SUCCESS; - break; - case ACT_PRINT_DER: - if (verbose) - { - printf ("DER encoding len:%i\n", der_len); - printf ("DER encoding: "); - for (k = 0; k < der_len; k++) - printf ("%02x ", der[k]); - printf ("\n\n"); - } - result = ASN1_SUCCESS; - break; - case ACT_SET_DER: - der_len = test->par3; - memcpy (der, test->par1, der_len); - result = ASN1_SUCCESS; - break; - case ACT_NUMBER_OF_ELEMENTS: - result = - asn1_number_of_elements (asn1_element, test->par1, &valueLen); - break; - default: - break; - } - - - switch (test->action) - { - case ACT_CREATE: - case ACT_DELETE: - case ACT_DELETE_ELEMENT: - case ACT_WRITE: - case ACT_VISIT: - case ACT_ENCODING: - case ACT_DECODING: - case ACT_PRINT_DER: - case ACT_EXPAND_ANY: - case ACT_EXPAND_OCTET: - case ACT_SET_DER: - if (result != test->errorNumber) - { - errorCounter++; - printf ("ERROR in %d:\n", test->line); - printf (" Action %d - %s - %s - %d\n", test->action, - test->par1, test->par2, test->par3); - printf (" Error expected: %s\n", - asn1_strerror (test->errorNumber)); - printf (" Error detected: %s\n\n", asn1_strerror (result)); - error (); - } - break; - case ACT_DECODING_ELEMENT: - if (result != test->errorNumber) - { - errorCounter++; - printf ("ERROR in %d:\n", test->line); - printf (" Action %d - %s - %s - %d\n", test->action, - test->par1, test->par2, test->par3); - printf (" Error expected: %s\n", - asn1_strerror (test->errorNumber)); - printf (" Error detected: %s\n", asn1_strerror (result)); - printf (" Error description : %s\n\n", errorDescription); - error (); - } - break; - case ACT_NUMBER_OF_ELEMENTS: - case ACT_READ_LENGTH: - if ((result != test->errorNumber) || (valueLen != test->par3)) - { - errorCounter++; - printf ("ERROR in %d:\n", test->line); - printf (" Action %d - %s\n", test->action, test->par1); - printf (" Error expected: %s - %d\n", - asn1_strerror (test->errorNumber), test->par3); - printf (" Error detected: %s - %d\n\n", asn1_strerror (result), - valueLen); - error (); - } - break; - case ACT_ENCODING_LENGTH: - if ((result != test->errorNumber) || (der_len != test->par3)) - { - errorCounter++; - printf ("ERROR in %d:\n", test->line); - printf (" Action %d - %s\n", test->action, test->par1); - printf (" Error expected: %s - %d\n", - asn1_strerror (test->errorNumber), test->par3); - printf (" Error detected: %s - %d\n\n", asn1_strerror (result), - der_len); - error (); - } - break; - case ACT_OID_2_STRUCTURE: - if (((test->errorNumber != ASN1_SUCCESS) && (str_p != NULL)) || - ((test->errorNumber == ASN1_SUCCESS) && (str_p == NULL)) || - ((test->errorNumber == ASN1_SUCCESS) - && (strcmp (str_p, test->par2)))) - { - errorCounter++; - printf ("ERROR in %d:\n", test->line); - printf (" Action %d - %s\n", test->action, test->par1); - printf (" Error expected: %s - %s\n", - asn1_strerror (test->errorNumber), test->par2); - printf (" Value detected: %s\n\n", str_p); - error (); - } - break; - case ACT_DECODING_START_END: - if ((result != test->errorNumber) || - ((!strcmp (test->par2, "START")) && (start != test->par3)) || - ((!strcmp (test->par2, "END")) && (end != test->par3))) - { - errorCounter++; - printf ("ERROR in %d:\n", test->line); - printf (" Action %d - %s - %d\n", test->action, test->par1, - test->par3); - printf (" Error expected: %s - %s - %d\n", - asn1_strerror (test->errorNumber), test->par2, - test->par3); - printf (" Error detected: %s - %d - %d\n\n", - asn1_strerror (result), start, end); - error (); - } - break; - - case ACT_READ_TAG_CLASS: - if ((result != test->errorNumber) || - ((!strcmp (test->par2, "TAG")) && (tag != test->par3)) || - ((!strcmp (test->par2, "CLASS")) && (class != test->par3))) - { - errorCounter++; - printf ("ERROR in %d:\n", test->line); - printf (" Action %d - %s - %d\n", test->action, test->par1, - test->par3); - printf (" Error expected: %s - %s - %d\n", - asn1_strerror (test->errorNumber), test->par2, - test->par3); - printf (" Error detected: %s - %d - %d\n\n", - asn1_strerror (result), tag, class); - error (); - } - - break; - - case ACT_READ: - case ACT_READ_DEFINITIONS: - case ACT_READ_BIT: - if (test->action == ACT_READ_BIT) - { - if (valueLen % 8 == 0) - tag = valueLen / 8; - else - tag = (valueLen / 8) + 1; - if (test->par3 % 8 == 0) - class = test->par3 / 8; - else - class = (test->par3 / 8) + 1; - } - - for (k = 0; k < class; k++) - if ((unsigned char) test->par2[k] != value[k]) - { - k = -1; - break; - } - - if ((result != test->errorNumber) || - (valueLen != test->par3) || (k == -1)) - { - errorCounter++; - printf ("ERROR in %d:\n", test->line); - printf (" Action %d - %s\n", test->action, test->par1); - printf (" Error expected: %s - %d - ", - asn1_strerror (test->errorNumber), test->par3); - for (k = 0; k < test->par3; k++) - printf ("%02x", test->par2[k]); - printf ("\n Error detected: %s - %d - ", - asn1_strerror (result), valueLen); - for (k = 0; k < valueLen; k++) - printf ("%02x", value[k]); - printf ("\n\n"); - - error (); - } - - break; - default: - break; - } - - test++; - } - - - if (verbose != 0) - { - printf ("Total tests : %d\n", testCounter); - printf ("Total errors: %d\n", errorCounter); - } - - /* Clear the definition structures */ - asn1_delete_structure (&definitions); - - - if (out != stdout) - fclose (out); - - if (errorCounter > 0) - return 1; - - exit (0); -} diff --git a/tests/Test_tree_asn1_tab.c b/tests/Test_tree_asn1_tab.c deleted file mode 100644 index 7869f85..0000000 --- a/tests/Test_tree_asn1_tab.c +++ /dev/null @@ -1,169 +0,0 @@ -#if HAVE_CONFIG_H -# include "config.h" -#endif - -#include - -const asn1_static_node Test_tree_asn1_tab[] = { - { "TEST_TREE", 536875024, NULL }, - { NULL, 1610612748, NULL }, - { "iso", 1073741825, "1"}, - { "identified-organization", 1073741825, "3"}, - { "dod", 1073741825, "6"}, - { "internet", 1073741825, "1"}, - { "security", 1073741825, "5"}, - { "mechanisms", 1073741825, "5"}, - { "pkix", 1073741825, "7"}, - { "id-mod", 1073741825, "0"}, - { "id-pkix1-implicit-88", 1, "2"}, - { "KrbError", 1610620933, NULL }, - { NULL, 1073746952, "30"}, - { "pvno", 536879107, NULL }, - { NULL, 4104, "0"}, - { "Checksum", 1610612741, NULL }, - { "checksum", 536879111, NULL }, - { NULL, 4104, "1"}, - { "CertTemplate", 1610612741, NULL }, - { "version", 1610637315, NULL }, - { NULL, 4104, "0"}, - { "issuer", 1610637314, "Name"}, - { NULL, 4104, "3"}, - { "validity", 536895491, NULL }, - { NULL, 4104, "4"}, - { "Name", 1610612754, NULL }, - { "rdnSequence", 2, "RDNSequence"}, - { "RDNSequence", 1073741826, "RelativeDistinguishedName"}, - { "RelativeDistinguishedName", 1612709903, NULL }, - { "MAX", 1074266122, "1"}, - { NULL, 2, "AttributeTypeAndValue"}, - { "AttributeTypeAndValue", 1610612741, NULL }, - { "type", 1073741826, "AttributeType"}, - { "value", 2, "AttributeValue"}, - { "AttributeType", 1073741836, NULL }, - { "AttributeValue", 1073741837, NULL }, - { "sequenceEmpty", 1610612741, NULL }, - { "int1", 1073741827, NULL }, - { "seq1", 1610620930, "Sequence_octetTest1"}, - { NULL, 4104, "1"}, - { "set1", 536879119, NULL }, - { NULL, 1073743880, "2"}, - { NULL, 3, NULL }, - { "IndefiniteLengthTest", 1610612741, NULL }, - { "seq1", 1610620930, "Sequence_octetTest1"}, - { NULL, 4104, "1"}, - { "set1", 1610612751, NULL }, - { NULL, 12, NULL }, - { "int1", 3, NULL }, - { "OidTest", 1610612741, NULL }, - { "oid3", 1610653708, NULL }, - { NULL, 1073741833, "id-Test"}, - { NULL, 4104, "3"}, - { "oid", 1610653708, NULL }, - { NULL, 1073741833, "id-anyTest2"}, - { NULL, 4104, "1"}, - { "oid2", 536911884, NULL }, - { NULL, 1073741833, "id-anyTest"}, - { NULL, 4104, "2"}, - { "OidAndTimeTest", 1610612741, NULL }, - { "set", 1610612751, NULL }, - { NULL, 3, NULL }, - { "oid", 1073741836, NULL }, - { "time2", 1082130449, NULL }, - { "bol", 1073741828, NULL }, - { "oct", 1073741831, NULL }, - { "bit", 1073758214, NULL }, - { "bol2", 1610645508, NULL }, - { NULL, 65545, NULL }, - { "enum", 1610907669, NULL }, - { NULL, 1073741833, "v1"}, - { "v1", 1073741825, "1"}, - { "v2", 1, "2"}, - { "any", 1610637325, NULL }, - { NULL, 4104, "1"}, - { "gen", 1073758235, NULL }, - { "time1", 16777233, NULL }, - { "SequenceTestTag", 1610612741, NULL }, - { "int1", 1610620931, NULL }, - { NULL, 2056, "2"}, - { "int2", 1610620931, NULL }, - { NULL, 4104, "3"}, - { "str1", 1610620959, NULL }, - { NULL, 4104, "1"}, - { "str2", 1073741856, NULL }, - { "str3", 536879136, NULL }, - { NULL, 2056, "2"}, - { "Sequence1", 1610612741, NULL }, - { "int1", 1610915843, NULL }, - { NULL, 1073741833, "v2"}, - { NULL, 1073745928, "0"}, - { "v1", 1073741825, "0"}, - { "v2", 1073741825, "1"}, - { "v3", 1, "2"}, - { "int2", 1073741827, NULL }, - { "seq", 1610612751, NULL }, - { NULL, 3, NULL }, - { "id", 1073741836, NULL }, - { "oct", 1073741831, NULL }, - { "any1", 541081613, NULL }, - { "id", 1, NULL }, - { "DHParameter", 1610612741, NULL }, - { "prime", 1073741827, NULL }, - { "base", 1073741827, NULL }, - { "privateValueLength", 16387, NULL }, - { "id-octetTest1", 1879048204, NULL }, - { NULL, 1073741825, "1"}, - { NULL, 1073741825, "2"}, - { NULL, 1073741825, "3"}, - { NULL, 1, "4"}, - { "Sequence_octetTest1", 1610612741, NULL }, - { "int", 16387, NULL }, - { "AnyTest2", 1610612754, NULL }, - { "str", 1073741831, NULL }, - { "int", 3, NULL }, - { "id-ic", 1879048204, NULL }, - { NULL, 1073741825, "2"}, - { NULL, 1, "5"}, - { "id-anyTest", 1879048204, NULL }, - { NULL, 1073741825, "id-ic"}, - { NULL, 1073741825, "29"}, - { NULL, 1, "1"}, - { "id-anyTest2", 1879048204, NULL }, - { NULL, 1073741825, "id-ic"}, - { NULL, 1073741825, "29"}, - { NULL, 1, "2"}, - { "anyTest2", 1073741827, NULL }, - { "VisibleString", 1610620935, NULL }, - { NULL, 4360, "26"}, - { "NumericString", 1610620935, NULL }, - { NULL, 4360, "18"}, - { "IA5String", 1610620935, NULL }, - { NULL, 4360, "22"}, - { "TeletexString", 1610620935, NULL }, - { NULL, 4360, "20"}, - { "PrintableString", 1610620935, NULL }, - { NULL, 4360, "19"}, - { "UniversalString", 1610620935, NULL }, - { NULL, 4360, "28"}, - { "BMPString", 1610620935, NULL }, - { NULL, 4360, "30"}, - { "UTF8String", 1610620935, NULL }, - { NULL, 4360, "12"}, - { "Test3", 1610612741, NULL }, - { "a", 1073741827, NULL }, - { "b", 536879106, "GeneralString2"}, - { NULL, 2056, "1"}, - { "GeneralString2", 1610620955, NULL }, - { NULL, 2056, "2"}, - { "X520LocalityName", 1610612754, NULL }, - { "teletexString", 1073741854, NULL }, - { "printableString", 1073741855, NULL }, - { "universalString", 1073741856, NULL }, - { "utf8String", 1073741858, NULL }, - { "bmpString", 33, NULL }, - { "id-Test", 805306380, NULL }, - { NULL, 1073741825, "1"}, - { NULL, 1073741825, "2"}, - { NULL, 1073741825, "29"}, - { NULL, 1, "2"}, - { NULL, 0, NULL } -}; diff --git a/tests/benchmark b/tests/benchmark deleted file mode 100755 index 478e7fb..0000000 --- a/tests/benchmark +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh - -# Copyright (C) 2006-2014 Free Software Foundation, Inc. -# -# Author: Simon Josefsson -# -# This file is part of LIBTASN1. -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -set -e - -srcdir=${srcdir:-.} -ASN1DECODING=../src/asn1Decoding${EXEEXT} - -# The crlf.cer file is a normal certificate which contains bytes 0x0A -# (LF), 0x0D (CF), and 0xFF (EOF), all are known to cause failures -# when using fopen/fgetc/fscanf on streams on some systems (read: -# Windows). - -$ASN1DECODING \ - -b $srcdir/../examples/pkix.asn \ - $srcdir/crlf.cer \ - PKIX1Implicit88.Certificate diff --git a/tests/cert-invalid-time.der b/tests/cert-invalid-time.der deleted file mode 100644 index 994ea3f..0000000 Binary files a/tests/cert-invalid-time.der and /dev/null differ diff --git a/tests/choice.asn b/tests/choice.asn deleted file mode 100644 index b309204..0000000 --- a/tests/choice.asn +++ /dev/null @@ -1,23 +0,0 @@ -TEST {} -DEFINITIONS IMPLICIT TAGS ::= -BEGIN - -Choice2 ::= CHOICE { - oct1 OCTET STRING, - int1 [3] INTEGER, - oct2 OCTET STRING -} - -Choice1 ::= CHOICE { - int4 [0] INTEGER, - choice2 Choice2, - int5 [1] INTEGER -} - -Choice0 ::= CHOICE { - int6 [0] INTEGER, - choice1 Choice1, - int7 [1] INTEGER -} - -END diff --git a/tests/coding b/tests/coding deleted file mode 100755 index 922629b..0000000 --- a/tests/coding +++ /dev/null @@ -1,60 +0,0 @@ -#!/bin/sh - -# Copyright (C) 2017 Free Software Foundation, Inc. -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -srcdir="${srcdir:-.}" - -ASAN_OPTIONS="detect_leaks=0:exitcode=6" -export ASAN_OPTIONS - -if ! test -z "${VALGRIND}";then -VALGRIND="${LIBTOOL:-libtool} --mode=execute ${VALGRIND} --error-exitcode=7 --leak-check=no" -fi - -ASN1CODING="${ASN1CODING:-../src/asn1Coding$EXEEXT}" -ASN1PKIX="${ASN1PKIX:-pkix.asn}" -TMPFILE="asn1.$$.tmp" - -cat <$TMPFILE -PKIX1 { } - -DEFINITIONS IMPLICIT TAGS ::= - -BEGIN - -Dss-Sig-Value ::= SEQUENCE { - r INTEGER, - s INTEGER -} - -END -EOF - -$VALGRIND $ASN1CODING -c $TMPFILE ${srcdir}/invalid-assignments1.txt -if test $? != 1;then - echo "Encoding failed (1)" - exit 1 -fi - -$VALGRIND $ASN1CODING -c $TMPFILE ${srcdir}/invalid-assignments2.txt -if test $? != 1;then - echo "Encoding failed (2)" - exit 1 -fi - -rm -f $TMPFILE - -exit 0 diff --git a/tests/coding-decoding2.asn b/tests/coding-decoding2.asn deleted file mode 100644 index ee167a1..0000000 --- a/tests/coding-decoding2.asn +++ /dev/null @@ -1,30 +0,0 @@ -TEST {} -DEFINITIONS IMPLICIT TAGS ::= -BEGIN - -Choice2 ::= CHOICE { - oct1 OCTET STRING, - int1 [3] INTEGER, - oct2 OCTET STRING -} - - -Choice1 ::= CHOICE { - int4 [0] INTEGER, - choice2 Choice2, - int5 [1] INTEGER -} - -Choice0 ::= CHOICE { - int6 [0] INTEGER, - choice1 Choice1, - int7 [1] INTEGER -} - -Main ::= SEQUENCE { - pad1 INTEGER, - choice0 Choice0, - pad2 INTEGER -} - -END diff --git a/tests/coding-decoding2.c b/tests/coding-decoding2.c deleted file mode 100644 index e5d5f32..0000000 --- a/tests/coding-decoding2.c +++ /dev/null @@ -1,199 +0,0 @@ -/* - * Copyright (C) 2014 Free Software Foundation, Inc. - * - * This file is part of LIBTASN1. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -#include -#include -#include - -int -main (int argc, char** argv) -{ - int result = 0; - asn1_node definitions = NULL, node1 = NULL, node2 = NULL; - char errorDescription[ASN1_MAX_ERROR_DESCRIPTION_SIZE]; - const char *choicefile = getenv ("ASN1CODINGDECODING2"); - int start, end; - - char data[1024]; - int data_size = sizeof (data); - - if (!choicefile) - choicefile = "coding-decoding2.asn"; - - /* Encode */ - result = asn1_parser2tree (choicefile, &definitions, errorDescription); - if (result != ASN1_SUCCESS) - { - printf ("error in %d\n", __LINE__); - exit (1); - } - - result = asn1_create_element (definitions, "TEST.Main", &node1); - if (result != ASN1_SUCCESS) - { - printf ("error in %d\n", __LINE__); - exit (1); - } - - result = asn1_write_value (node1, "pad1", "\x01\x02\x03", 3); - if (result != ASN1_SUCCESS) - { - printf ("error in %d\n", __LINE__); - exit (1); - } - - result = asn1_write_value (node1, "pad2", "\x00\x01", 2); - if (result != ASN1_SUCCESS) - { - printf ("error in %d\n", __LINE__); - exit (1); - } - - result = asn1_write_value (node1, "choice0", "choice1", 1); - if (result != ASN1_SUCCESS) - { - printf ("error in %d\n", __LINE__); - exit (1); - } - - result = asn1_write_value (node1, "choice0.choice1", "choice2", 1); - if (result != ASN1_SUCCESS) - { - printf ("error in %d\n", __LINE__); - exit (1); - } - - result = asn1_write_value (node1, "choice0.choice1.choice2", "int1", 1); - if (result != ASN1_SUCCESS) - { - printf ("error in %d\n", __LINE__); - exit (1); - } - - result = asn1_write_value (node1, "choice0.choice1.choice2.int1", "1234", 0); - if (result != ASN1_SUCCESS) - { - printf ("error in %d\n", __LINE__); - exit (1); - } - - result = asn1_der_coding (node1, "", data, &data_size, errorDescription); - if (result != ASN1_SUCCESS) - { - printf ("error in %d\n", __LINE__); - exit (1); - } - - /*asn1_print_structure(stdout, node1, "", ASN1_PRINT_ALL);*/ - - result = asn1_der_decoding_startEnd (node1, data, data_size, "choice0.choice1.choice2.int1", &start, &end); - if (result != ASN1_SUCCESS) - { - asn1_perror (result); - printf ("Cannot find start End: %d\n", __LINE__); - exit (1); - } - if (start != 7 && end != 10) - { - printf("Error in start and end values for choice1.choice2.int1. Have: %d..%d\n", start, end); - exit(1); - } - - result = asn1_der_decoding_startEnd (node1, data, data_size, "choice0.choice1", &start, &end); - if (result != ASN1_SUCCESS) - { - asn1_perror (result); - printf ("Cannot find start End: %d\n", __LINE__); - exit (1); - } - if (start != 7 && end != 10) - { - printf("Error in start and end values for choice1. Have: %d..%d\n", start, end); - exit(1); - } - - result = asn1_der_decoding_startEnd (node1, data, data_size, "pad2", &start, &end); - if (result != ASN1_SUCCESS) - { - asn1_perror (result); - printf ("Cannot find start End\n"); - exit (1); - } - if (start != 11 && end != 13) - { - printf("Error in start and end values for pad2. Have: %d..%d\n", start, end); - exit(1); - } - - asn1_delete_structure (&node1); - - /* Decode */ - result = asn1_create_element (definitions, "TEST.Main", &node2); - if (result != ASN1_SUCCESS) - { - printf ("error in %d\n", __LINE__); - exit (1); - } - -#if 0 - printf ("der:"); - for (i = 0; i < data_size; i++) - printf ("%.2x ", (unsigned char) (data[i])); - printf ("\n"); -#endif - - result = asn1_der_decoding (&node2, data, data_size, errorDescription); - if (result != ASN1_SUCCESS) - { - printf ("error in %d: %s\n", __LINE__, errorDescription); - exit (1); - } - - result = asn1_der_decoding_startEnd (node2, data, data_size, "choice0.choice1.choice2.int1", &start, &end); - if (result != ASN1_SUCCESS) - { - asn1_perror (result); - printf ("Cannot find start End: %d\n", __LINE__); - exit (1); - } - if (start != 7 && end != 10) - { - printf("Error in start and end values for choice0.choice1.choice2.int1. Have: %d..%d\n", start, end); - exit(1); - } - - result = asn1_der_decoding_startEnd (node2, data, data_size, "pad2", &start, &end); - if (result != ASN1_SUCCESS) - { - asn1_perror (result); - printf ("Cannot find start End: %d\n", __LINE__); - exit (1); - } - if (start != 11 && end != 13) - { - printf("Error in start and end values for pad2. Have: %d..%d\n", start, end); - exit(1); - } - - asn1_delete_structure (&node2); - asn1_delete_structure (&definitions); - - return 0; -} diff --git a/tests/coding-long-oid.c b/tests/coding-long-oid.c deleted file mode 100644 index 6031cf2..0000000 --- a/tests/coding-long-oid.c +++ /dev/null @@ -1,205 +0,0 @@ -/* - * Copyright (C) 2016 Free Software Foundation, Inc. - * - * This file is part of LIBTASN1. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -#include -#include -#include -#include - -/* This checks the decoding and re-encoding of OIDs which contain elements - * >= 2^32 bits. - */ - -const unsigned char der_data[] = - "\x30\x82\x06\xdc\x30\x82\x05\xc4\xa0\x03\x02\x01\x02\x02\x08\x35" - "\x73\x8c\xaf\x21\xea\xbd\x2d\x30\x0d\x06\x09\x2a\x86\x48\x86\xf7" - "\x0d\x01\x01\x05\x05\x00\x30\x81\x8e\x31\x0b\x30\x09\x06\x03\x55" - "\x04\x06\x13\x02\x55\x53\x31\x17\x30\x15\x06\x03\x55\x04\x08\x13" - "\x0e\x4e\x6f\x72\x74\x68\x20\x43\x61\x72\x6f\x6c\x69\x6e\x61\x31" - "\x10\x30\x0e\x06\x03\x55\x04\x07\x13\x07\x52\x61\x6c\x65\x69\x67" - "\x68\x31\x10\x30\x0e\x06\x03\x55\x04\x0a\x13\x07\x4b\x61\x74\x65" - "\x6c\x6c\x6f\x31\x14\x30\x12\x06\x03\x55\x04\x0b\x13\x0b\x53\x6f" - "\x6d\x65\x4f\x72\x67\x55\x6e\x69\x74\x31\x2c\x30\x2a\x06\x03\x55" - "\x04\x03\x13\x23\x73\x61\x74\x2d\x72\x32\x32\x30\x2d\x31\x30\x2e" - "\x6c\x61\x62\x2e\x65\x6e\x67\x2e\x72\x64\x75\x32\x2e\x72\x65\x64" - "\x68\x61\x74\x2e\x63\x6f\x6d\x30\x1e\x17\x0d\x31\x36\x30\x37\x30" - "\x31\x31\x38\x35\x34\x31\x37\x5a\x17\x0d\x34\x39\x31\x32\x30\x31" - "\x31\x33\x30\x30\x30\x30\x5a\x30\x2b\x31\x29\x30\x27\x06\x03\x55" - "\x04\x03\x13\x20\x38\x61\x38\x38\x38\x30\x31\x37\x35\x35\x61\x37" - "\x63\x39\x30\x37\x30\x31\x35\x35\x61\x37\x63\x66\x62\x65\x33\x36" - "\x30\x30\x30\x34\x30\x82\x01\x22\x30\x0d\x06\x09\x2a\x86\x48\x86" - "\xf7\x0d\x01\x01\x01\x05\x00\x03\x82\x01\x0f\x00\x30\x82\x01\x0a" - "\x02\x82\x01\x01\x00\xdc\x70\x8b\x9c\x84\xe9\x3e\x79\x8f\x03\xe5" - "\x5f\x21\xf0\x29\x9e\xd9\x94\x4e\x0f\x37\x45\x47\x42\xda\x2a\xe0" - "\xda\xf5\x8b\xfa\xe1\xf8\x62\x51\x14\x9d\x9e\xe0\xc7\x69\xd0\x3d" - "\xfc\x25\x2f\xb6\x10\x45\xbd\x0d\xbc\x92\x86\x54\xbb\x4e\x7d\xd4" - "\x92\x75\x65\xba\x48\xa4\x64\xa1\xeb\xf7\xe7\xdc\xc0\xd7\x0a\x5e" - "\x36\x13\x0e\x4e\x35\xcc\x2c\xc6\xf3\xe7\xe7\xe5\x32\x8a\x0c\xf7" - "\x47\x28\x7a\x02\xc2\x68\x66\x19\x3a\xba\xca\x31\xe2\xdd\x43\xbe" - "\x26\x4c\x80\x12\x0c\xae\x44\x40\xeb\x69\x7d\x9e\x58\xd3\xab\xaf" - "\x69\xe6\x54\xae\x7d\x80\xee\x2c\x10\xe9\xbb\x5e\x6b\x89\x15\x2e" - "\x2c\x72\x26\xba\x7f\xe5\xa3\x66\xc5\x98\xc6\x57\xbf\x05\x1e\x55" - "\x93\xa6\x16\x83\xa6\x88\x79\x8f\x4e\xb5\x7e\x70\xeb\xf0\xa9\xa6" - "\xd5\xf9\x1f\xe6\xab\x70\x06\x43\xe0\xde\x82\xad\x0e\x04\x17\x2b" - "\x69\x82\x40\x98\x84\x14\x00\x2a\xa2\xda\x61\x7b\x35\xac\x71\x05" - "\x43\x6f\x55\x3a\x28\x4b\xd1\xa4\xeb\x3b\xf5\x03\xc2\xf8\x3c\xfd" - "\x0a\xc4\x99\x1d\xa7\x7d\x08\x5c\xd1\x15\x70\x73\xb9\xdc\x5c\xf2" - "\xfe\x2c\xc6\x21\x8a\xbe\xbd\x52\x37\x64\x04\xe5\x06\x3e\xc6\x62" - "\xa1\xe9\x8e\xcb\xc1\x02\x03\x01\x00\x01\xa3\x82\x03\x9e\x30\x82" - "\x03\x9a\x30\x11\x06\x09\x60\x86\x48\x01\x86\xf8\x42\x01\x01\x04" - "\x04\x03\x02\x05\xa0\x30\x0b\x06\x03\x55\x1d\x0f\x04\x04\x03\x02" - "\x04\xb0\x30\x81\xc3\x06\x03\x55\x1d\x23\x04\x81\xbb\x30\x81\xb8" - "\x80\x14\xca\xca\x62\x86\x04\x05\xf0\xf5\x9b\x38\xd2\x2c\x3c\x8c" - "\x65\x0f\xc6\xba\xa5\x3c\xa1\x81\x94\xa4\x81\x91\x30\x81\x8e\x31" - "\x0b\x30\x09\x06\x03\x55\x04\x06\x13\x02\x55\x53\x31\x17\x30\x15" - "\x06\x03\x55\x04\x08\x13\x0e\x4e\x6f\x72\x74\x68\x20\x43\x61\x72" - "\x6f\x6c\x69\x6e\x61\x31\x10\x30\x0e\x06\x03\x55\x04\x07\x13\x07" - "\x52\x61\x6c\x65\x69\x67\x68\x31\x10\x30\x0e\x06\x03\x55\x04\x0a" - "\x13\x07\x4b\x61\x74\x65\x6c\x6c\x6f\x31\x14\x30\x12\x06\x03\x55" - "\x04\x0b\x13\x0b\x53\x6f\x6d\x65\x4f\x72\x67\x55\x6e\x69\x74\x31" - "\x2c\x30\x2a\x06\x03\x55\x04\x03\x13\x23\x73\x61\x74\x2d\x72\x32" - "\x32\x30\x2d\x31\x30\x2e\x6c\x61\x62\x2e\x65\x6e\x67\x2e\x72\x64" - "\x75\x32\x2e\x72\x65\x64\x68\x61\x74\x2e\x63\x6f\x6d\x82\x09\x00" - "\xa4\xe7\xca\xeb\xbe\x43\x5d\xcc\x30\x1d\x06\x03\x55\x1d\x0e\x04" - "\x16\x04\x14\x0e\x8d\x7b\x53\xba\x5a\x9e\x92\x44\xe5\x64\x58\xa1" - "\xdb\x83\x47\x05\x3e\x32\xd3\x30\x13\x06\x03\x55\x1d\x25\x04\x0c" - "\x30\x0a\x06\x08\x2b\x06\x01\x05\x05\x07\x03\x02\x30\x2a\x06\x10" - "\x2b\x06\x01\x04\x01\x92\x08\x09\x01\xaa\xda\xbe\xbe\xfa\x5b\x01" - "\x04\x16\x0c\x14\x6d\x6f\x72\x64\x6f\x72\x5f\x75\x65\x62\x65\x72" - "\x5f\x70\x72\x6f\x64\x75\x63\x74\x30\x16\x06\x10\x2b\x06\x01\x04" - "\x01\x92\x08\x09\x01\xaa\xda\xbe\xbe\xfa\x5b\x03\x04\x02\x0c\x00" - "\x30\x16\x06\x10\x2b\x06\x01\x04\x01\x92\x08\x09\x01\xaa\xda\xbe" - "\xbe\xfa\x5b\x02\x04\x02\x0c\x00\x30\x16\x06\x10\x2b\x06\x01\x04" - "\x01\x92\x08\x09\x01\xaa\xda\xbe\xbe\xfa\x5b\x05\x04\x02\x0c\x00" - "\x30\x19\x06\x10\x2b\x06\x01\x04\x01\x92\x08\x09\x02\xaa\xda\xbe" - "\xbe\xfa\x72\x01\x04\x05\x0c\x03\x79\x75\x6d\x30\x24\x06\x11\x2b" - "\x06\x01\x04\x01\x92\x08\x09\x02\xaa\xda\xbe\xbe\xfa\x72\x01\x01" - "\x04\x0f\x0c\x0d\x75\x65\x62\x65\x72\x5f\x63\x6f\x6e\x74\x65\x6e" - "\x74\x30\x32\x06\x11\x2b\x06\x01\x04\x01\x92\x08\x09\x02\xaa\xda" - "\xbe\xbe\xfa\x72\x01\x02\x04\x1d\x0c\x1b\x31\x34\x36\x37\x33\x39" - "\x39\x32\x35\x37\x34\x33\x35\x5f\x75\x65\x62\x65\x72\x5f\x63\x6f" - "\x6e\x74\x65\x6e\x74\x30\x1d\x06\x11\x2b\x06\x01\x04\x01\x92\x08" - "\x09\x02\xaa\xda\xbe\xbe\xfa\x72\x01\x05\x04\x08\x0c\x06\x43\x75" - "\x73\x74\x6f\x6d\x30\x1e\x06\x11\x2b\x06\x01\x04\x01\x92\x08\x09" - "\x02\xaa\xda\xbe\xbe\xfa\x72\x01\x06\x04\x09\x0c\x07\x2f\x6d\x6f" - "\x72\x64\x6f\x72\x30\x17\x06\x11\x2b\x06\x01\x04\x01\x92\x08\x09" - "\x02\xaa\xda\xbe\xbe\xfa\x72\x01\x07\x04\x02\x0c\x00\x30\x18\x06" - "\x11\x2b\x06\x01\x04\x01\x92\x08\x09\x02\xaa\xda\xbe\xbe\xfa\x72" - "\x01\x08\x04\x03\x0c\x01\x31\x30\x24\x06\x0a\x2b\x06\x01\x04\x01" - "\x92\x08\x09\x04\x01\x04\x16\x0c\x14\x6d\x6f\x72\x64\x6f\x72\x5f" - "\x75\x65\x62\x65\x72\x5f\x70\x72\x6f\x64\x75\x63\x74\x30\x10\x06" - "\x0a\x2b\x06\x01\x04\x01\x92\x08\x09\x04\x02\x04\x02\x0c\x00\x30" - "\x1d\x06\x0a\x2b\x06\x01\x04\x01\x92\x08\x09\x04\x03\x04\x0f\x0c" - "\x0d\x31\x34\x36\x37\x33\x39\x39\x32\x35\x37\x34\x33\x35\x30\x11" - "\x06\x0a\x2b\x06\x01\x04\x01\x92\x08\x09\x04\x05\x04\x03\x0c\x01" - "\x31\x30\x24\x06\x0a\x2b\x06\x01\x04\x01\x92\x08\x09\x04\x06\x04" - "\x16\x0c\x14\x32\x30\x31\x36\x2d\x30\x37\x2d\x30\x31\x54\x31\x38" - "\x3a\x35\x34\x3a\x31\x37\x5a\x30\x24\x06\x0a\x2b\x06\x01\x04\x01" - "\x92\x08\x09\x04\x07\x04\x16\x0c\x14\x32\x30\x34\x39\x2d\x31\x32" - "\x2d\x30\x31\x54\x31\x33\x3a\x30\x30\x3a\x30\x30\x5a\x30\x11\x06" - "\x0a\x2b\x06\x01\x04\x01\x92\x08\x09\x04\x0c\x04\x03\x0c\x01\x30" - "\x30\x11\x06\x0a\x2b\x06\x01\x04\x01\x92\x08\x09\x04\x0e\x04\x03" - "\x0c\x01\x30\x30\x11\x06\x0a\x2b\x06\x01\x04\x01\x92\x08\x09\x04" - "\x0b\x04\x03\x0c\x01\x31\x30\x34\x06\x0a\x2b\x06\x01\x04\x01\x92" - "\x08\x09\x05\x01\x04\x26\x0c\x24\x39\x34\x35\x33\x66\x38\x65\x36" - "\x2d\x38\x34\x62\x32\x2d\x34\x38\x32\x65\x2d\x61\x33\x65\x61\x2d" - "\x30\x31\x63\x33\x62\x33\x65\x32\x36\x36\x61\x35\x30\x0d\x06\x09" - "\x2a\x86\x48\x86\xf7\x0d\x01\x01\x05\x05\x00\x03\x82\x01\x01\x00" - "\xf7\x4d\xf3\x30\x53\xcd\x35\xbf\x49\x07\x29\x9b\xf0\x7a\xaa\x49" - "\x60\xda\xce\x14\x45\xb5\x32\x8f\xda\xc3\xce\x6b\xec\xbf\x20\xc0" - "\x05\xa3\x3a\x89\xc4\x7d\x66\x34\xfc\xf3\x16\xb8\xf3\x03\xda\xfc" - "\x82\x4a\xb8\x97\xf8\x67\x3d\xc2\x8c\x78\xb4\x6d\xb8\xbb\x18\xec" - "\x36\xee\xc4\x28\x79\xda\xfe\xa1\x1f\xaf\x0b\x3f\xe4\x75\xde\x83" - "\xff\x6b\xf9\x11\x60\x09\x57\xea\x85\x34\xed\x60\xe2\x94\x8b\xd6" - "\xf2\x21\x9b\xda\x97\x99\xf3\x0d\xa9\x0f\xb5\x3b\x3a\x8f\x96\x8d" - "\x0b\xdf\x30\x17\x03\xe6\x47\xc3\x71\x32\x09\x18\xbc\xc0\xa9\x83" - "\x7e\xb7\x5f\x5c\xbb\xeb\x0a\x18\x3f\xa9\x40\x98\xae\x57\xab\x99" - "\x3d\x47\x1b\x98\x8a\xdc\x6e\x85\xa2\xea\x5e\x21\x80\xa9\xb5\x48" - "\xc9\x1d\x63\xc1\x1b\xe6\x01\xa1\xbd\x84\x38\x7f\x1a\x43\xa5\xd4" - "\x7f\x41\x5b\xf6\x88\x33\xb0\xf1\xb8\x8f\xe1\x39\x69\x6f\x60\x13" - "\xd3\x5d\x70\xde\x95\x0d\x2f\xa9\x89\x6c\xd4\x3a\xeb\x22\x59\xe6" - "\x31\x67\x71\xa5\xed\xfb\xcb\x20\x11\x0c\x31\x2e\xe0\x98\x9a\x3b" - "\x9c\x7b\xa2\x74\x6f\x87\x97\xa1\xd9\x82\x7f\x7d\x62\x6b\x45\x6c" - "\x0b\x5e\x25\x43\x8a\x20\x16\x7d\xe5\x84\x18\x3f\x7c\xda\xfc\xf9"; - -int der_data_size = sizeof(der_data)-1; - -char new_data[4*1024]; - -int -main (int argc, char** argv) -{ - int result = 0; - asn1_node definitions = NULL, node1 = NULL; - char errorDescription[ASN1_MAX_ERROR_DESCRIPTION_SIZE]; - const char *pkixfile = getenv ("ASN1PKIX"); - int new_data_size; - - if (!pkixfile) - pkixfile = "pkix.asn"; - - /* Encode */ - result = asn1_parser2tree (pkixfile, &definitions, errorDescription); - if (result != ASN1_SUCCESS) - { - printf ("error in %d: %s\n", __LINE__, errorDescription); - exit (1); - } - - result = asn1_create_element (definitions, "PKIX1.Certificate", &node1); - if (result != ASN1_SUCCESS) - { - printf ("error in %d\n", __LINE__); - exit (1); - } - - result = asn1_der_decoding (&node1, der_data, der_data_size, errorDescription); - if (result != ASN1_SUCCESS) - { - printf ("error in %d: %s\n", __LINE__, errorDescription); - exit (1); - } - - new_data_size = sizeof(new_data); - result = asn1_der_coding (node1, "", new_data, &new_data_size, errorDescription); - if (result != ASN1_SUCCESS) - { - printf ("error in %d\n", __LINE__); - exit (1); - } - - if (new_data_size != der_data_size) - { - printf ("error in %d\n", __LINE__); - printf ("new_size is %d, expected: %d\n", new_data_size, der_data_size); - exit (1); - } - - if (memcmp(new_data, der_data, der_data_size) != 0) - { - printf ("error in %d\n", __LINE__); - exit (1); - } - - asn1_delete_structure (&node1); - asn1_delete_structure (&definitions); - - return 0; -} diff --git a/tests/copynode.c b/tests/copynode.c deleted file mode 100644 index 29a8a51..0000000 --- a/tests/copynode.c +++ /dev/null @@ -1,215 +0,0 @@ -/* - * Copyright (C) 2002-2014 Free Software Foundation, Inc. - * - * This file is part of LIBTASN1. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - -/*****************************************************/ -/* File: Test_tree.c */ -/* Description: Test sequences for these functions: */ -/* asn1_visit_tree, */ -/* asn1_create_element, */ -/* asn1_delete_structure, */ -/* asn1_write_value, */ -/* asn1_read_value, */ -/*****************************************************/ - -#include -#include -#include -#include "libtasn1.h" - - - -int -main (int argc, char *argv[]) -{ - int result; - char buffer[5 * 1024]; - char buffer2[5 * 1024]; - asn1_node definitions = NULL; - asn1_node asn1_element = NULL, cpy_node = NULL; - char errorDescription[ASN1_MAX_ERROR_DESCRIPTION_SIZE]; - FILE *out, *fd; - int start, end; - ssize_t size; - int size2; - const char *treefile = getenv ("ASN1PKIX"); - const char *derfile = getenv ("ASN1CRLDER"); - int verbose = 0; - - if (argc > 1) - verbose = 1; - - if (!treefile) - treefile = "pkix.asn"; - - if (!derfile) - derfile = "crl.der"; - - if (verbose) - { - printf ("\n\n/****************************************/\n"); - printf ("/* Test sequence : Test_indefinite */\n"); - printf ("/****************************************/\n\n"); - printf ("ASN1TREE: %s\n", treefile); - } - - /* Check version */ - if (asn1_check_version ("0.3.3") == NULL) - printf ("\nLibrary version check ERROR:\n actual version: %s\n\n", - asn1_check_version (NULL)); - - result = asn1_parser2tree (treefile, &definitions, errorDescription); - if (result != ASN1_SUCCESS) - { - asn1_perror (result); - printf ("ErrorDescription = %s\n\n", errorDescription); - exit (1); - } - - out = stdout; - - fd = fopen (derfile, "rb"); - if (fd == NULL) - { - printf ("Cannot read file %s\n", derfile); - exit (1); - } - size = fread (buffer, 1, sizeof (buffer), fd); - if (size <= 0) - { - printf ("Cannot read from file %s\n", derfile); - exit (1); - } - - fclose (fd); - - result = - asn1_create_element (definitions, "PKIX1.CertificateList", &asn1_element); - if (result != ASN1_SUCCESS) - { - asn1_perror (result); - printf ("Cannot create CRL element\n"); - exit (1); - } - - result = asn1_der_decoding (&asn1_element, buffer, size, errorDescription); - if (result != ASN1_SUCCESS) - { - asn1_perror (result); - printf ("Cannot decode DER data (size %ld)\n", (long) size); - exit (1); - } - - /* test asn1_copy_node */ - result = - asn1_create_element (definitions, "PKIX1.CertificateList", &cpy_node); - if (result != ASN1_SUCCESS) - { - asn1_perror (result); - printf ("Cannot create CRL element\n"); - exit (1); - } - - result = asn1_copy_node(cpy_node, "", asn1_element, ""); - if (result != ASN1_SUCCESS) - { - asn1_perror (result); - printf ("Cannot copy node\n"); - exit (1); - } - - /* test whether the copied node encodes the same */ - size2 = sizeof(buffer2); - result = asn1_der_coding (cpy_node, "", buffer2, &size2, NULL); - if (result != ASN1_SUCCESS) - { - asn1_perror (result); - printf ("Cannot encode data (size %ld)\n", (long) size); - exit (1); - } - - if (size2 != size || memcmp(buffer, buffer2, size) != 0) - { - printf("DER encoded data differ!\n"); - exit(1); - } - - asn1_delete_structure (&cpy_node); - - /* Test asn1_dup_node */ - cpy_node = asn1_dup_node(asn1_element, ""); - if (cpy_node == NULL) - { - printf ("Cannot copy node (dup_node)\n"); - exit (1); - } - - /* test whether the copied node encodes the same */ - size2 = sizeof(buffer2); - result = asn1_der_coding (cpy_node, "", buffer2, &size2, NULL); - if (result != ASN1_SUCCESS) - { - asn1_perror (result); - printf ("Cannot encode data (size %ld)\n", (long) size); - exit (1); - } - - if (size2 != size || memcmp(buffer, buffer2, size) != 0) - { - printf("DER encoded data differ!\n"); - exit(1); - } - - result = asn1_der_decoding_startEnd (asn1_element, buffer, size, "tbsCertList.issuer", &start, &end); - if (result != ASN1_SUCCESS) - { - asn1_perror (result); - printf ("Cannot find start End\n"); - exit (1); - } - if (start != 24 && end != 291) - { - printf("Error in start and end values for issuer. Have: %d..%d\n", start, end); - exit(1); - } - - result = asn1_der_decoding_startEnd (asn1_element, buffer, size, "signature", &start, &end); - if (result != ASN1_SUCCESS) - { - asn1_perror (result); - printf ("Cannot find start End\n"); - exit (1); - } - if (start != 372 && end != 503) - { - printf("Error in start and end values for signature. Have: %d..%d\n", start, end); - exit(1); - } - - /* Clear the definition structures */ - asn1_delete_structure (&asn1_element); - asn1_delete_structure (&cpy_node); - asn1_delete_structure (&definitions); - - if (out != stdout) - fclose (out); - - exit (0); -} diff --git a/tests/crl.der b/tests/crl.der deleted file mode 100644 index 7ab7752..0000000 Binary files a/tests/crl.der and /dev/null differ diff --git a/tests/crlf b/tests/crlf deleted file mode 100755 index 54a3199..0000000 --- a/tests/crlf +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh - -# Copyright (C) 2006-2014 Free Software Foundation, Inc. -# -# Author: Simon Josefsson -# -# This file is part of LIBTASN1. -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -set -e - -srcdir=${srcdir:-.} -ASN1DECODING=../src/asn1Decoding${EXEEXT} - -# The crlf.cer file is a normal certificate which contains bytes 0x0A -# (LF), 0x0D (CF), and 0xFF (EOF), all are known to cause failures -# when using fopen/fgetc/fscanf on streams on some systems (read: -# Windows). - -$ASN1DECODING \ - $srcdir/../examples/pkix.asn \ - $srcdir/crlf.cer \ - PKIX1Implicit88.Certificate >/dev/null 2>&1 diff --git a/tests/crlf.cer b/tests/crlf.cer deleted file mode 100644 index 534e7e6..0000000 Binary files a/tests/crlf.cer and /dev/null differ diff --git a/tests/decoding b/tests/decoding deleted file mode 100755 index 6dccb1c..0000000 --- a/tests/decoding +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/sh - -# Copyright (C) 2015 Free Software Foundation, Inc. -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -srcdir="${srcdir:-.}" - -if ! test -z "${VALGRIND}";then -VALGRIND="${LIBTOOL:-libtool} --mode=execute ${VALGRIND} --error-exitcode=7 --leak-check=no" -fi - -ASN1DECODING="${ASN1DECODING:-../src/asn1Decoding$EXEEXT}" -ASN1PKIX="${ASN1PKIX:-pkix.asn}" - -$VALGRIND $ASN1DECODING $ASN1PKIX ${srcdir}/TestCertOctetOverflow.der PKIX1.Certificate -if test $? != 1;then - echo "Decoding failed" - exit 1 -fi - -# test decoding of certificate with invalid time field -$VALGRIND $ASN1DECODING -s $ASN1PKIX ${srcdir}/cert-invalid-time.der PKIX1.Certificate -if test $? != 1;then - echo "Decoding with invalid time succeeded when not expected" - exit 1 -fi - -# test decoding of certificate with invalid time field -$VALGRIND $ASN1DECODING -t $ASN1PKIX ${srcdir}/cert-invalid-time.der PKIX1.Certificate -if test $? != 0;then - echo "Decoding with invalid time failed when not expected" - exit 1 -fi - -exit 0 diff --git a/tests/decoding-invalid-pkcs7 b/tests/decoding-invalid-pkcs7 deleted file mode 100755 index b91d725..0000000 --- a/tests/decoding-invalid-pkcs7 +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/sh - -# Copyright (C) 2017 Free Software Foundation, Inc. -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -srcdir="${srcdir:-.}" - -if ! test -z "${VALGRIND}";then -VALGRIND="${LIBTOOL:-libtool} --mode=execute ${VALGRIND} --error-exitcode=7 --leak-check=no" -fi -TMPFILE=decoding-invalid.$$.tmp -ASN1DECODING="${ASN1DECODING:-../src/asn1Decoding$EXEEXT}" -ASN1PKIX="${ASN1PKIX:-pkix.asn}" - -# This tests an invalid input which caused an infinite recursion -# to certain libtasn1 versions. - -for i in "${srcdir}/invalid-pkcs7/"*.der;do -$VALGRIND $ASN1DECODING "$ASN1PKIX" "$i" PKIX1.pkcs-7-ContentInfo >$TMPFILE 2>&1 -ret=$? -if test $ret != 1;then - echo "Decoding failed for $i" - cat $TMPFILE - exit 1 -fi -echo "$(basename $i): ok" -done - -rm -f $TMPFILE - -exit 0 diff --git a/tests/decoding-invalid-x509 b/tests/decoding-invalid-x509 deleted file mode 100755 index 904cda7..0000000 --- a/tests/decoding-invalid-x509 +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/sh - -# Copyright (C) 2016 Free Software Foundation, Inc. -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -srcdir="${srcdir:-.}" - -if ! test -z "${VALGRIND}";then -VALGRIND="${LIBTOOL:-libtool} --mode=execute ${VALGRIND} --error-exitcode=7 --leak-check=no" -fi -TMPFILE=decoding-invalid.$$.tmp -ASN1DECODING="${ASN1DECODING:-../src/asn1Decoding$EXEEXT}" -ASN1PKIX="${ASN1PKIX:-pkix.asn}" - -# This tests an invalid input which caused an infinite recursion -# to certain libtasn1 versions. - -for i in "${srcdir}/invalid-x509/"*.der;do -$VALGRIND $ASN1DECODING "$ASN1PKIX" "$i" PKIX1.Certificate >$TMPFILE 2>&1 -ret=$? -if test $ret != 1;then - echo "Decoding failed for $i" - cat $TMPFILE - exit 1 -fi -echo "$(basename $i): ok" -done - -rm -f $TMPFILE - -exit 0 diff --git a/tests/invalid-assignments1.txt b/tests/invalid-assignments1.txt deleted file mode 100644 index 4b78266..0000000 --- a/tests/invalid-assignments1.txt +++ /dev/null @@ -1 +0,0 @@ -dp ?CIX1-VKralxeKIX1ig-VKIX1.Isg-VKr-V \ No newline at end of file diff --git a/tests/invalid-assignments2.txt b/tests/invalid-assignments2.txt deleted file mode 100644 index 49933e5..0000000 Binary files a/tests/invalid-assignments2.txt and /dev/null differ diff --git a/tests/invalid-pkcs7/id-000001.der b/tests/invalid-pkcs7/id-000001.der deleted file mode 100644 index 6c91a25..0000000 Binary files a/tests/invalid-pkcs7/id-000001.der and /dev/null differ diff --git a/tests/invalid-pkcs7/id-000002.der b/tests/invalid-pkcs7/id-000002.der deleted file mode 100644 index 9c38f9f..0000000 Binary files a/tests/invalid-pkcs7/id-000002.der and /dev/null differ diff --git a/tests/invalid-pkcs7/id-000003.der b/tests/invalid-pkcs7/id-000003.der deleted file mode 100644 index 06f6f9c..0000000 Binary files a/tests/invalid-pkcs7/id-000003.der and /dev/null differ diff --git a/tests/invalid-x509/id-000000.der b/tests/invalid-x509/id-000000.der deleted file mode 100644 index 6fb540a..0000000 Binary files a/tests/invalid-x509/id-000000.der and /dev/null differ diff --git a/tests/invalid-x509/id-000001.der b/tests/invalid-x509/id-000001.der deleted file mode 100644 index 371a2a0..0000000 Binary files a/tests/invalid-x509/id-000001.der and /dev/null differ diff --git a/tests/invalid-x509/id-000002.der b/tests/invalid-x509/id-000002.der deleted file mode 100644 index 7e3b13c..0000000 Binary files a/tests/invalid-x509/id-000002.der and /dev/null differ diff --git a/tests/invalid-x509/id-000003.der b/tests/invalid-x509/id-000003.der deleted file mode 100644 index a8e3b43..0000000 Binary files a/tests/invalid-x509/id-000003.der and /dev/null differ diff --git a/tests/invalid-x509/id-000004.der b/tests/invalid-x509/id-000004.der deleted file mode 100644 index 22f4f28..0000000 Binary files a/tests/invalid-x509/id-000004.der and /dev/null differ diff --git a/tests/invalid-x509/id-000005.der b/tests/invalid-x509/id-000005.der deleted file mode 100644 index fb491cd..0000000 Binary files a/tests/invalid-x509/id-000005.der and /dev/null differ diff --git a/tests/invalid-x509/id-000006.der b/tests/invalid-x509/id-000006.der deleted file mode 100644 index 56380db..0000000 Binary files a/tests/invalid-x509/id-000006.der and /dev/null differ diff --git a/tests/invalid-x509/id-000007.der b/tests/invalid-x509/id-000007.der deleted file mode 100644 index e788a77..0000000 Binary files a/tests/invalid-x509/id-000007.der and /dev/null differ diff --git a/tests/invalid-x509/id-000008.der b/tests/invalid-x509/id-000008.der deleted file mode 100644 index 172eb85..0000000 Binary files a/tests/invalid-x509/id-000008.der and /dev/null differ diff --git a/tests/invalid-x509/id-000009.der b/tests/invalid-x509/id-000009.der deleted file mode 100644 index 178c8c3..0000000 Binary files a/tests/invalid-x509/id-000009.der and /dev/null differ diff --git a/tests/invalid-x509/id-000010.der b/tests/invalid-x509/id-000010.der deleted file mode 100644 index 9879226..0000000 Binary files a/tests/invalid-x509/id-000010.der and /dev/null differ diff --git a/tests/invalid-x509/id-000011.der b/tests/invalid-x509/id-000011.der deleted file mode 100644 index dffe303..0000000 Binary files a/tests/invalid-x509/id-000011.der and /dev/null differ diff --git a/tests/invalid-x509/id-000012.der b/tests/invalid-x509/id-000012.der deleted file mode 100644 index cdbcfa0..0000000 Binary files a/tests/invalid-x509/id-000012.der and /dev/null differ diff --git a/tests/invalid-x509/id-000013.der b/tests/invalid-x509/id-000013.der deleted file mode 100644 index d28df0e..0000000 Binary files a/tests/invalid-x509/id-000013.der and /dev/null differ diff --git a/tests/invalid-x509/id-000014.der b/tests/invalid-x509/id-000014.der deleted file mode 100644 index 5886113..0000000 Binary files a/tests/invalid-x509/id-000014.der and /dev/null differ diff --git a/tests/invalid-x509/id-000015.der b/tests/invalid-x509/id-000015.der deleted file mode 100644 index aa78dbe..0000000 Binary files a/tests/invalid-x509/id-000015.der and /dev/null differ diff --git a/tests/invalid-x509/id-000016.der b/tests/invalid-x509/id-000016.der deleted file mode 100644 index 93c221d..0000000 Binary files a/tests/invalid-x509/id-000016.der and /dev/null differ diff --git a/tests/invalid-x509/id-000017.der b/tests/invalid-x509/id-000017.der deleted file mode 100644 index ff2d6a1..0000000 Binary files a/tests/invalid-x509/id-000017.der and /dev/null differ diff --git a/tests/invalid-x509/id-000018.der b/tests/invalid-x509/id-000018.der deleted file mode 100644 index 1482e61..0000000 Binary files a/tests/invalid-x509/id-000018.der and /dev/null differ diff --git a/tests/invalid-x509/id-000019.der b/tests/invalid-x509/id-000019.der deleted file mode 100644 index 8760ec6..0000000 Binary files a/tests/invalid-x509/id-000019.der and /dev/null differ diff --git a/tests/invalid-x509/id-000020.der b/tests/invalid-x509/id-000020.der deleted file mode 100644 index 59238f8..0000000 Binary files a/tests/invalid-x509/id-000020.der and /dev/null differ diff --git a/tests/invalid-x509/id-000021.der b/tests/invalid-x509/id-000021.der deleted file mode 100644 index 93e9b9d..0000000 Binary files a/tests/invalid-x509/id-000021.der and /dev/null differ diff --git a/tests/invalid-x509/id-000022.der b/tests/invalid-x509/id-000022.der deleted file mode 100644 index 6d5a977..0000000 Binary files a/tests/invalid-x509/id-000022.der and /dev/null differ diff --git a/tests/invalid-x509/id-000023.der b/tests/invalid-x509/id-000023.der deleted file mode 100644 index 288f69b..0000000 Binary files a/tests/invalid-x509/id-000023.der and /dev/null differ diff --git a/tests/invalid-x509/id-000024.der b/tests/invalid-x509/id-000024.der deleted file mode 100644 index 69c9e61..0000000 Binary files a/tests/invalid-x509/id-000024.der and /dev/null differ diff --git a/tests/invalid-x509/id-000025.der b/tests/invalid-x509/id-000025.der deleted file mode 100644 index 0e5dce4..0000000 Binary files a/tests/invalid-x509/id-000025.der and /dev/null differ diff --git a/tests/invalid-x509/id-000026.der b/tests/invalid-x509/id-000026.der deleted file mode 100644 index ffe5d9f..0000000 Binary files a/tests/invalid-x509/id-000026.der and /dev/null differ diff --git a/tests/invalid-x509/id-000027.der b/tests/invalid-x509/id-000027.der deleted file mode 100644 index dfe00cc..0000000 Binary files a/tests/invalid-x509/id-000027.der and /dev/null differ diff --git a/tests/invalid-x509/id-000028.der b/tests/invalid-x509/id-000028.der deleted file mode 100644 index 88bd1e3..0000000 Binary files a/tests/invalid-x509/id-000028.der and /dev/null differ diff --git a/tests/invalid-x509/id-000029.der b/tests/invalid-x509/id-000029.der deleted file mode 100644 index 4fdd0e9..0000000 Binary files a/tests/invalid-x509/id-000029.der and /dev/null differ diff --git a/tests/invalid-x509/id-000030.der b/tests/invalid-x509/id-000030.der deleted file mode 100644 index cd22250..0000000 Binary files a/tests/invalid-x509/id-000030.der and /dev/null differ diff --git a/tests/invalid-x509/id-000031.der b/tests/invalid-x509/id-000031.der deleted file mode 100644 index 78e606a..0000000 Binary files a/tests/invalid-x509/id-000031.der and /dev/null differ diff --git a/tests/invalid-x509/id-000032.der b/tests/invalid-x509/id-000032.der deleted file mode 100644 index 107964e..0000000 Binary files a/tests/invalid-x509/id-000032.der and /dev/null differ diff --git a/tests/invalid-x509/id-000033.der b/tests/invalid-x509/id-000033.der deleted file mode 100644 index b0db73f..0000000 Binary files a/tests/invalid-x509/id-000033.der and /dev/null differ diff --git a/tests/invalid-x509/id-000034.der b/tests/invalid-x509/id-000034.der deleted file mode 100644 index 35d7079..0000000 Binary files a/tests/invalid-x509/id-000034.der and /dev/null differ diff --git a/tests/invalid-x509/id-000035.der b/tests/invalid-x509/id-000035.der deleted file mode 100644 index 6fb540a..0000000 Binary files a/tests/invalid-x509/id-000035.der and /dev/null differ diff --git a/tests/invalid-x509/id:000002,orig:TFPA-2015-002-libtasn1-4.3-stack-overflow.crt.der b/tests/invalid-x509/id:000002,orig:TFPA-2015-002-libtasn1-4.3-stack-overflow.crt.der deleted file mode 100644 index 619b44b..0000000 Binary files a/tests/invalid-x509/id:000002,orig:TFPA-2015-002-libtasn1-4.3-stack-overflow.crt.der and /dev/null differ diff --git a/tests/invalid-x509/id:000047,orig:id:000009,src:000044,op:havoc,rep:2.der b/tests/invalid-x509/id:000047,orig:id:000009,src:000044,op:havoc,rep:2.der deleted file mode 100644 index f51592f..0000000 --- a/tests/invalid-x509/id:000047,orig:id:000009,src:000044,op:havoc,rep:2.der +++ /dev/null @@ -1 +0,0 @@ -0a \ No newline at end of file diff --git a/tests/invalid-x509/id:000116,orig:id:000026,src:000000,op:havoc,rep:32,+cov.der b/tests/invalid-x509/id:000116,orig:id:000026,src:000000,op:havoc,rep:32,+cov.der deleted file mode 100644 index 20279f8..0000000 --- a/tests/invalid-x509/id:000116,orig:id:000026,src:000000,op:havoc,rep:32,+cov.der +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/tests/invalid-x509/id:000164,orig:id:000038,src:000000,op:havoc,rep:64,+cov.der b/tests/invalid-x509/id:000164,orig:id:000038,src:000000,op:havoc,rep:64,+cov.der deleted file mode 100644 index 58930ba..0000000 --- a/tests/invalid-x509/id:000164,orig:id:000038,src:000000,op:havoc,rep:64,+cov.der +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/tests/invalid-x509/id:000168,orig:id:000039,src:000000,op:havoc,rep:128.der b/tests/invalid-x509/id:000168,orig:id:000039,src:000000,op:havoc,rep:128.der deleted file mode 100644 index c10aed4..0000000 Binary files a/tests/invalid-x509/id:000168,orig:id:000039,src:000000,op:havoc,rep:128.der and /dev/null differ diff --git a/tests/invalid-x509/id:000170,orig:id:000040,src:000061,op:havoc,rep:4.der b/tests/invalid-x509/id:000170,orig:id:000040,src:000061,op:havoc,rep:4.der deleted file mode 100644 index a942ed4..0000000 Binary files a/tests/invalid-x509/id:000170,orig:id:000040,src:000061,op:havoc,rep:4.der and /dev/null differ diff --git a/tests/invalid-x509/id:000190,orig:id:000045,src:000019+000093,op:splice,rep:2.der b/tests/invalid-x509/id:000190,orig:id:000045,src:000019+000093,op:splice,rep:2.der deleted file mode 100644 index e298c82..0000000 Binary files a/tests/invalid-x509/id:000190,orig:id:000045,src:000019+000093,op:splice,rep:2.der and /dev/null differ diff --git a/tests/invalid-x509/id:000200,orig:id:000048,src:000035+000050,op:splice,rep:2.der b/tests/invalid-x509/id:000200,orig:id:000048,src:000035+000050,op:splice,rep:2.der deleted file mode 100644 index be2a897..0000000 --- a/tests/invalid-x509/id:000200,orig:id:000048,src:000035+000050,op:splice,rep:2.der +++ /dev/null @@ -1 +0,0 @@ -0T \ No newline at end of file diff --git a/tests/invalid-x509/id:000204,orig:id:000049,src:000004,op:havoc,rep:2,+cov.der b/tests/invalid-x509/id:000204,orig:id:000049,src:000004,op:havoc,rep:2,+cov.der deleted file mode 100644 index e57e6cf..0000000 --- a/tests/invalid-x509/id:000204,orig:id:000049,src:000004,op:havoc,rep:2,+cov.der +++ /dev/null @@ -1 +0,0 @@ -0 \ No newline at end of file diff --git a/tests/invalid-x509/id:000231,orig:id:000061,src:000036,op:havoc,rep:16.der b/tests/invalid-x509/id:000231,orig:id:000061,src:000036,op:havoc,rep:16.der deleted file mode 100644 index 17ee4de..0000000 Binary files a/tests/invalid-x509/id:000231,orig:id:000061,src:000036,op:havoc,rep:16.der and /dev/null differ diff --git a/tests/invalid-x509/id:000243,orig:id:000067,src:000039,op:havoc,rep:2.der b/tests/invalid-x509/id:000243,orig:id:000067,src:000039,op:havoc,rep:2.der deleted file mode 100644 index 2ae72af..0000000 Binary files a/tests/invalid-x509/id:000243,orig:id:000067,src:000039,op:havoc,rep:2.der and /dev/null differ diff --git a/tests/invalid-x509/id:000247,orig:id:000069,src:000039,op:havoc,rep:2.der b/tests/invalid-x509/id:000247,orig:id:000069,src:000039,op:havoc,rep:2.der deleted file mode 100644 index 2799094..0000000 Binary files a/tests/invalid-x509/id:000247,orig:id:000069,src:000039,op:havoc,rep:2.der and /dev/null differ diff --git a/tests/invalid-x509/id:000294,orig:id:000096,src:000062,op:havoc,rep:2.der b/tests/invalid-x509/id:000294,orig:id:000096,src:000062,op:havoc,rep:2.der deleted file mode 100644 index ea4e9ca..0000000 Binary files a/tests/invalid-x509/id:000294,orig:id:000096,src:000062,op:havoc,rep:2.der and /dev/null differ diff --git a/tests/invalid-x509/id:000297,orig:id:000099,src:000097,op:havoc,rep:4.der b/tests/invalid-x509/id:000297,orig:id:000099,src:000097,op:havoc,rep:4.der deleted file mode 100644 index a7a1d60..0000000 --- a/tests/invalid-x509/id:000297,orig:id:000099,src:000097,op:havoc,rep:4.der +++ /dev/null @@ -1 +0,0 @@ -? \ No newline at end of file diff --git a/tests/invalid-x509/id:000310,orig:id:000112,src:000102,op:havoc,rep:4.der b/tests/invalid-x509/id:000310,orig:id:000112,src:000102,op:havoc,rep:4.der deleted file mode 100644 index 17ec5cd..0000000 --- a/tests/invalid-x509/id:000310,orig:id:000112,src:000102,op:havoc,rep:4.der +++ /dev/null @@ -1 +0,0 @@ -?a \ No newline at end of file diff --git a/tests/invalid-x509/id:000327,orig:id:000129,src:000112,op:havoc,rep:2.der b/tests/invalid-x509/id:000327,orig:id:000129,src:000112,op:havoc,rep:2.der deleted file mode 100644 index c343d6e..0000000 --- a/tests/invalid-x509/id:000327,orig:id:000129,src:000112,op:havoc,rep:2.der +++ /dev/null @@ -1 +0,0 @@ -?aa \ No newline at end of file diff --git a/tests/invalid-x509/id:000334,orig:id:000136,src:000016+000011,op:splice,rep:8,+cov.der b/tests/invalid-x509/id:000334,orig:id:000136,src:000016+000011,op:splice,rep:8,+cov.der deleted file mode 100644 index e0c9ec9..0000000 --- a/tests/invalid-x509/id:000334,orig:id:000136,src:000016+000011,op:splice,rep:8,+cov.der +++ /dev/null @@ -1 +0,0 @@ -0 \ No newline at end of file diff --git a/tests/invalid-x509/id:000344,src:000001,op:flip1,pos:6,+cov.der b/tests/invalid-x509/id:000344,src:000001,op:flip1,pos:6,+cov.der deleted file mode 100644 index cd7d0dd..0000000 Binary files a/tests/invalid-x509/id:000344,src:000001,op:flip1,pos:6,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:000347,src:000001,op:flip1,pos:8,+cov.der b/tests/invalid-x509/id:000347,src:000001,op:flip1,pos:8,+cov.der deleted file mode 100644 index 30ecdae..0000000 Binary files a/tests/invalid-x509/id:000347,src:000001,op:flip1,pos:8,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:000359,src:000001,op:flip1,pos:21,+cov.der b/tests/invalid-x509/id:000359,src:000001,op:flip1,pos:21,+cov.der deleted file mode 100644 index 1205344..0000000 Binary files a/tests/invalid-x509/id:000359,src:000001,op:flip1,pos:21,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:000396,src:000001,op:flip1,pos:104.der b/tests/invalid-x509/id:000396,src:000001,op:flip1,pos:104.der deleted file mode 100644 index eb57fa0..0000000 Binary files a/tests/invalid-x509/id:000396,src:000001,op:flip1,pos:104.der and /dev/null differ diff --git a/tests/invalid-x509/id:000398,src:000001,op:flip1,pos:104,+cov.der b/tests/invalid-x509/id:000398,src:000001,op:flip1,pos:104,+cov.der deleted file mode 100644 index 5c21be9..0000000 Binary files a/tests/invalid-x509/id:000398,src:000001,op:flip1,pos:104,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:000399,src:000001,op:flip1,pos:104.der b/tests/invalid-x509/id:000399,src:000001,op:flip1,pos:104.der deleted file mode 100644 index d4334e0..0000000 Binary files a/tests/invalid-x509/id:000399,src:000001,op:flip1,pos:104.der and /dev/null differ diff --git a/tests/invalid-x509/id:000415,src:000001,op:flip1,pos:228,+cov.der b/tests/invalid-x509/id:000415,src:000001,op:flip1,pos:228,+cov.der deleted file mode 100644 index 05c5274..0000000 Binary files a/tests/invalid-x509/id:000415,src:000001,op:flip1,pos:228,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:000438,src:000001,op:flip1,pos:573.der b/tests/invalid-x509/id:000438,src:000001,op:flip1,pos:573.der deleted file mode 100644 index 2bbd821..0000000 Binary files a/tests/invalid-x509/id:000438,src:000001,op:flip1,pos:573.der and /dev/null differ diff --git a/tests/invalid-x509/id:000444,src:000001,op:flip1,pos:583,+cov.der b/tests/invalid-x509/id:000444,src:000001,op:flip1,pos:583,+cov.der deleted file mode 100644 index d5bc603..0000000 Binary files a/tests/invalid-x509/id:000444,src:000001,op:flip1,pos:583,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:000459,src:000001,op:flip2,pos:23,+cov.der b/tests/invalid-x509/id:000459,src:000001,op:flip2,pos:23,+cov.der deleted file mode 100644 index 7a2b5f8..0000000 Binary files a/tests/invalid-x509/id:000459,src:000001,op:flip2,pos:23,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:000469,src:000001,op:flip2,pos:542,+cov.der b/tests/invalid-x509/id:000469,src:000001,op:flip2,pos:542,+cov.der deleted file mode 100644 index fbfd384..0000000 Binary files a/tests/invalid-x509/id:000469,src:000001,op:flip2,pos:542,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:000470,src:000001,op:flip2,pos:544.der b/tests/invalid-x509/id:000470,src:000001,op:flip2,pos:544.der deleted file mode 100644 index 1772877..0000000 Binary files a/tests/invalid-x509/id:000470,src:000001,op:flip2,pos:544.der and /dev/null differ diff --git a/tests/invalid-x509/id:000473,src:000001,op:flip2,pos:714.der b/tests/invalid-x509/id:000473,src:000001,op:flip2,pos:714.der deleted file mode 100644 index 049844f..0000000 Binary files a/tests/invalid-x509/id:000473,src:000001,op:flip2,pos:714.der and /dev/null differ diff --git a/tests/invalid-x509/id:000476,src:000001,op:flip2,pos:739.der b/tests/invalid-x509/id:000476,src:000001,op:flip2,pos:739.der deleted file mode 100644 index 9175e8d..0000000 Binary files a/tests/invalid-x509/id:000476,src:000001,op:flip2,pos:739.der and /dev/null differ diff --git a/tests/invalid-x509/id:000478,src:000001,op:flip4,pos:21.der b/tests/invalid-x509/id:000478,src:000001,op:flip4,pos:21.der deleted file mode 100644 index 8619342..0000000 Binary files a/tests/invalid-x509/id:000478,src:000001,op:flip4,pos:21.der and /dev/null differ diff --git a/tests/invalid-x509/id:000487,src:000001,op:flip4,pos:739.der b/tests/invalid-x509/id:000487,src:000001,op:flip4,pos:739.der deleted file mode 100644 index 3b64f12..0000000 Binary files a/tests/invalid-x509/id:000487,src:000001,op:flip4,pos:739.der and /dev/null differ diff --git a/tests/invalid-x509/id:000492,src:000001,op:flip8,pos:36,+cov.der b/tests/invalid-x509/id:000492,src:000001,op:flip8,pos:36,+cov.der deleted file mode 100644 index 42a84c7..0000000 Binary files a/tests/invalid-x509/id:000492,src:000001,op:flip8,pos:36,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:000503,src:000001,op:arith8,pos:104,val:-17,+cov.der b/tests/invalid-x509/id:000503,src:000001,op:arith8,pos:104,val:-17,+cov.der deleted file mode 100644 index 9dc2885..0000000 Binary files a/tests/invalid-x509/id:000503,src:000001,op:arith8,pos:104,val:-17,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:000505,src:000001,op:arith8,pos:174,val:+35.der b/tests/invalid-x509/id:000505,src:000001,op:arith8,pos:174,val:+35.der deleted file mode 100644 index c8819b5..0000000 Binary files a/tests/invalid-x509/id:000505,src:000001,op:arith8,pos:174,val:+35.der and /dev/null differ diff --git a/tests/invalid-x509/id:000508,src:000001,op:arith8,pos:503,val:+3,+cov.der b/tests/invalid-x509/id:000508,src:000001,op:arith8,pos:503,val:+3,+cov.der deleted file mode 100644 index 4c3f1cf..0000000 Binary files a/tests/invalid-x509/id:000508,src:000001,op:arith8,pos:503,val:+3,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:000509,src:000001,op:arith8,pos:506,val:+3,+cov.der b/tests/invalid-x509/id:000509,src:000001,op:arith8,pos:506,val:+3,+cov.der deleted file mode 100644 index 1f607da..0000000 Binary files a/tests/invalid-x509/id:000509,src:000001,op:arith8,pos:506,val:+3,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:000517,src:000001,op:int8,pos:11,val:-128,+cov.der b/tests/invalid-x509/id:000517,src:000001,op:int8,pos:11,val:-128,+cov.der deleted file mode 100644 index 9d850e8..0000000 Binary files a/tests/invalid-x509/id:000517,src:000001,op:int8,pos:11,val:-128,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:000519,src:000001,op:int8,pos:21,val:-128,+cov.der b/tests/invalid-x509/id:000519,src:000001,op:int8,pos:21,val:-128,+cov.der deleted file mode 100644 index 0e469a0..0000000 Binary files a/tests/invalid-x509/id:000519,src:000001,op:int8,pos:21,val:-128,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:000521,src:000001,op:int8,pos:34,val:-128,+cov.der b/tests/invalid-x509/id:000521,src:000001,op:int8,pos:34,val:-128,+cov.der deleted file mode 100644 index 232311b..0000000 Binary files a/tests/invalid-x509/id:000521,src:000001,op:int8,pos:34,val:-128,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:000523,src:000001,op:int8,pos:43,val:-128,+cov.der b/tests/invalid-x509/id:000523,src:000001,op:int8,pos:43,val:-128,+cov.der deleted file mode 100644 index 9841b8a..0000000 Binary files a/tests/invalid-x509/id:000523,src:000001,op:int8,pos:43,val:-128,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:000527,src:000001,op:int8,pos:104,val:-128,+cov.der b/tests/invalid-x509/id:000527,src:000001,op:int8,pos:104,val:-128,+cov.der deleted file mode 100644 index 759b6ea..0000000 Binary files a/tests/invalid-x509/id:000527,src:000001,op:int8,pos:104,val:-128,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:000532,src:000001,op:int8,pos:516,val:-128,+cov.der b/tests/invalid-x509/id:000532,src:000001,op:int8,pos:516,val:-128,+cov.der deleted file mode 100644 index 84e9ef8..0000000 Binary files a/tests/invalid-x509/id:000532,src:000001,op:int8,pos:516,val:-128,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:000535,src:000001,op:int8,pos:739,val:+127.der b/tests/invalid-x509/id:000535,src:000001,op:int8,pos:739,val:+127.der deleted file mode 100644 index b3b051c..0000000 Binary files a/tests/invalid-x509/id:000535,src:000001,op:int8,pos:739,val:+127.der and /dev/null differ diff --git a/tests/invalid-x509/id:000542,src:000001,op:int16,pos:209,val:be:+127,+cov.der b/tests/invalid-x509/id:000542,src:000001,op:int16,pos:209,val:be:+127,+cov.der deleted file mode 100644 index 3c1ec22..0000000 Binary files a/tests/invalid-x509/id:000542,src:000001,op:int16,pos:209,val:be:+127,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:000552,src:000001,op:int32,pos:21,val:+100663045.der b/tests/invalid-x509/id:000552,src:000001,op:int32,pos:21,val:+100663045.der deleted file mode 100644 index 6635674..0000000 Binary files a/tests/invalid-x509/id:000552,src:000001,op:int32,pos:21,val:+100663045.der and /dev/null differ diff --git a/tests/invalid-x509/id:000565,src:000001,op:int32,pos:104,val:+255,+cov.der b/tests/invalid-x509/id:000565,src:000001,op:int32,pos:104,val:+255,+cov.der deleted file mode 100644 index 56d9892..0000000 Binary files a/tests/invalid-x509/id:000565,src:000001,op:int32,pos:104,val:+255,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:000566,src:000001,op:int32,pos:178,val:be:-128,+cov.der b/tests/invalid-x509/id:000566,src:000001,op:int32,pos:178,val:be:-128,+cov.der deleted file mode 100644 index 64d4232..0000000 Binary files a/tests/invalid-x509/id:000566,src:000001,op:int32,pos:178,val:be:-128,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:000574,src:000001,op:int32,pos:515,val:be:-128.der b/tests/invalid-x509/id:000574,src:000001,op:int32,pos:515,val:be:-128.der deleted file mode 100644 index b5fae8f..0000000 Binary files a/tests/invalid-x509/id:000574,src:000001,op:int32,pos:515,val:be:-128.der and /dev/null differ diff --git a/tests/invalid-x509/id:000578,src:000001,op:havoc,rep:32.der b/tests/invalid-x509/id:000578,src:000001,op:havoc,rep:32.der deleted file mode 100644 index f42160a..0000000 Binary files a/tests/invalid-x509/id:000578,src:000001,op:havoc,rep:32.der and /dev/null differ diff --git a/tests/invalid-x509/id:000581,src:000001,op:havoc,rep:2.der b/tests/invalid-x509/id:000581,src:000001,op:havoc,rep:2.der deleted file mode 100644 index 6c98d86..0000000 Binary files a/tests/invalid-x509/id:000581,src:000001,op:havoc,rep:2.der and /dev/null differ diff --git a/tests/invalid-x509/id:000582,src:000001,op:havoc,rep:2.der b/tests/invalid-x509/id:000582,src:000001,op:havoc,rep:2.der deleted file mode 100644 index 1d51db3..0000000 Binary files a/tests/invalid-x509/id:000582,src:000001,op:havoc,rep:2.der and /dev/null differ diff --git a/tests/invalid-x509/id:000585,src:000001,op:havoc,rep:8.der b/tests/invalid-x509/id:000585,src:000001,op:havoc,rep:8.der deleted file mode 100644 index b892ade..0000000 Binary files a/tests/invalid-x509/id:000585,src:000001,op:havoc,rep:8.der and /dev/null differ diff --git a/tests/invalid-x509/id:000586,src:000001,op:havoc,rep:16.der b/tests/invalid-x509/id:000586,src:000001,op:havoc,rep:16.der deleted file mode 100644 index c89faa6..0000000 Binary files a/tests/invalid-x509/id:000586,src:000001,op:havoc,rep:16.der and /dev/null differ diff --git a/tests/invalid-x509/id:000587,src:000001,op:havoc,rep:2,+cov.der b/tests/invalid-x509/id:000587,src:000001,op:havoc,rep:2,+cov.der deleted file mode 100644 index da623b4..0000000 Binary files a/tests/invalid-x509/id:000587,src:000001,op:havoc,rep:2,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:000590,src:000001,op:havoc,rep:32,+cov.der b/tests/invalid-x509/id:000590,src:000001,op:havoc,rep:32,+cov.der deleted file mode 100644 index f980acf..0000000 Binary files a/tests/invalid-x509/id:000590,src:000001,op:havoc,rep:32,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:000592,src:000001,op:havoc,rep:32,+cov.der b/tests/invalid-x509/id:000592,src:000001,op:havoc,rep:32,+cov.der deleted file mode 100644 index f187fa1..0000000 Binary files a/tests/invalid-x509/id:000592,src:000001,op:havoc,rep:32,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:000594,src:000001,op:havoc,rep:2,+cov.der b/tests/invalid-x509/id:000594,src:000001,op:havoc,rep:2,+cov.der deleted file mode 100644 index a93b6c0..0000000 Binary files a/tests/invalid-x509/id:000594,src:000001,op:havoc,rep:2,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:000595,src:000001,op:havoc,rep:2,+cov.der b/tests/invalid-x509/id:000595,src:000001,op:havoc,rep:2,+cov.der deleted file mode 100644 index e19efd4..0000000 Binary files a/tests/invalid-x509/id:000595,src:000001,op:havoc,rep:2,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:000598,src:000001,op:havoc,rep:32.der b/tests/invalid-x509/id:000598,src:000001,op:havoc,rep:32.der deleted file mode 100644 index 055bc42..0000000 Binary files a/tests/invalid-x509/id:000598,src:000001,op:havoc,rep:32.der and /dev/null differ diff --git a/tests/invalid-x509/id:000600,src:000001,op:havoc,rep:8,+cov.der b/tests/invalid-x509/id:000600,src:000001,op:havoc,rep:8,+cov.der deleted file mode 100644 index bfef89c..0000000 Binary files a/tests/invalid-x509/id:000600,src:000001,op:havoc,rep:8,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:000601,src:000001,op:havoc,rep:8,+cov.der b/tests/invalid-x509/id:000601,src:000001,op:havoc,rep:8,+cov.der deleted file mode 100644 index 68bf2cf..0000000 Binary files a/tests/invalid-x509/id:000601,src:000001,op:havoc,rep:8,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:000603,src:000002,op:flip1,pos:19.der b/tests/invalid-x509/id:000603,src:000002,op:flip1,pos:19.der deleted file mode 100644 index 8c31213..0000000 Binary files a/tests/invalid-x509/id:000603,src:000002,op:flip1,pos:19.der and /dev/null differ diff --git a/tests/invalid-x509/id:000605,src:000002,op:havoc,rep:8.der b/tests/invalid-x509/id:000605,src:000002,op:havoc,rep:8.der deleted file mode 100644 index 0dd69e1..0000000 Binary files a/tests/invalid-x509/id:000605,src:000002,op:havoc,rep:8.der and /dev/null differ diff --git a/tests/invalid-x509/id:000621,src:000003,op:flip1,pos:229,+cov.der b/tests/invalid-x509/id:000621,src:000003,op:flip1,pos:229,+cov.der deleted file mode 100644 index 4af92d9..0000000 Binary files a/tests/invalid-x509/id:000621,src:000003,op:flip1,pos:229,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:000629,src:000003,op:arith8,pos:205,val:-26,+cov.der b/tests/invalid-x509/id:000629,src:000003,op:arith8,pos:205,val:-26,+cov.der deleted file mode 100644 index 35f729d..0000000 Binary files a/tests/invalid-x509/id:000629,src:000003,op:arith8,pos:205,val:-26,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:000636,src:000003,op:int8,pos:205,val:-128,+cov.der b/tests/invalid-x509/id:000636,src:000003,op:int8,pos:205,val:-128,+cov.der deleted file mode 100644 index 381415b..0000000 Binary files a/tests/invalid-x509/id:000636,src:000003,op:int8,pos:205,val:-128,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:000637,src:000003,op:int8,pos:207,val:-128,+cov.der b/tests/invalid-x509/id:000637,src:000003,op:int8,pos:207,val:-128,+cov.der deleted file mode 100644 index 6556bea..0000000 Binary files a/tests/invalid-x509/id:000637,src:000003,op:int8,pos:207,val:-128,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:000639,src:000003,op:int16,pos:205,val:+128,+cov.der b/tests/invalid-x509/id:000639,src:000003,op:int16,pos:205,val:+128,+cov.der deleted file mode 100644 index b9af482..0000000 Binary files a/tests/invalid-x509/id:000639,src:000003,op:int16,pos:205,val:+128,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:000644,src:000003,op:int32,pos:205,val:+255,+cov.der b/tests/invalid-x509/id:000644,src:000003,op:int32,pos:205,val:+255,+cov.der deleted file mode 100644 index 84bcfe1..0000000 Binary files a/tests/invalid-x509/id:000644,src:000003,op:int32,pos:205,val:+255,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:000648,src:000003,op:havoc,rep:8.der b/tests/invalid-x509/id:000648,src:000003,op:havoc,rep:8.der deleted file mode 100644 index 7eb86a0..0000000 Binary files a/tests/invalid-x509/id:000648,src:000003,op:havoc,rep:8.der and /dev/null differ diff --git a/tests/invalid-x509/id:000649,src:000003,op:havoc,rep:2,+cov.der b/tests/invalid-x509/id:000649,src:000003,op:havoc,rep:2,+cov.der deleted file mode 100644 index 9402b5c..0000000 Binary files a/tests/invalid-x509/id:000649,src:000003,op:havoc,rep:2,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:000650,src:000003,op:havoc,rep:8.der b/tests/invalid-x509/id:000650,src:000003,op:havoc,rep:8.der deleted file mode 100644 index 2d6e952..0000000 Binary files a/tests/invalid-x509/id:000650,src:000003,op:havoc,rep:8.der and /dev/null differ diff --git a/tests/invalid-x509/id:000652,src:000003,op:havoc,rep:4.der b/tests/invalid-x509/id:000652,src:000003,op:havoc,rep:4.der deleted file mode 100644 index 0739f62..0000000 Binary files a/tests/invalid-x509/id:000652,src:000003,op:havoc,rep:4.der and /dev/null differ diff --git a/tests/invalid-x509/id:000654,src:000003,op:havoc,rep:16.der b/tests/invalid-x509/id:000654,src:000003,op:havoc,rep:16.der deleted file mode 100644 index c733059..0000000 Binary files a/tests/invalid-x509/id:000654,src:000003,op:havoc,rep:16.der and /dev/null differ diff --git a/tests/invalid-x509/id:000657,src:000003,op:havoc,rep:2.der b/tests/invalid-x509/id:000657,src:000003,op:havoc,rep:2.der deleted file mode 100644 index 776eab7..0000000 Binary files a/tests/invalid-x509/id:000657,src:000003,op:havoc,rep:2.der and /dev/null differ diff --git a/tests/invalid-x509/id:000658,src:000003,op:havoc,rep:4.der b/tests/invalid-x509/id:000658,src:000003,op:havoc,rep:4.der deleted file mode 100644 index 60016f2..0000000 Binary files a/tests/invalid-x509/id:000658,src:000003,op:havoc,rep:4.der and /dev/null differ diff --git a/tests/invalid-x509/id:000660,src:000003,op:havoc,rep:4.der b/tests/invalid-x509/id:000660,src:000003,op:havoc,rep:4.der deleted file mode 100644 index acdcce0..0000000 Binary files a/tests/invalid-x509/id:000660,src:000003,op:havoc,rep:4.der and /dev/null differ diff --git a/tests/invalid-x509/id:000661,src:000003,op:havoc,rep:8,+cov.der b/tests/invalid-x509/id:000661,src:000003,op:havoc,rep:8,+cov.der deleted file mode 100644 index 0ccf68d..0000000 Binary files a/tests/invalid-x509/id:000661,src:000003,op:havoc,rep:8,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:000662,src:000003,op:havoc,rep:4,+cov.der b/tests/invalid-x509/id:000662,src:000003,op:havoc,rep:4,+cov.der deleted file mode 100644 index 3358ad3..0000000 Binary files a/tests/invalid-x509/id:000662,src:000003,op:havoc,rep:4,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:000664,src:000003,op:havoc,rep:2,+cov.der b/tests/invalid-x509/id:000664,src:000003,op:havoc,rep:2,+cov.der deleted file mode 100644 index 57a4760..0000000 Binary files a/tests/invalid-x509/id:000664,src:000003,op:havoc,rep:2,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:000670,src:000182,op:havoc,rep:4,+cov.der b/tests/invalid-x509/id:000670,src:000182,op:havoc,rep:4,+cov.der deleted file mode 100644 index c795fa8..0000000 Binary files a/tests/invalid-x509/id:000670,src:000182,op:havoc,rep:4,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:000672,src:000182,op:havoc,rep:8.der b/tests/invalid-x509/id:000672,src:000182,op:havoc,rep:8.der deleted file mode 100644 index 2b4ad4f..0000000 --- a/tests/invalid-x509/id:000672,src:000182,op:havoc,rep:8.der +++ /dev/null @@ -1 +0,0 @@ -00 \ No newline at end of file diff --git a/tests/invalid-x509/id:000676,src:000254,op:havoc,rep:4,+cov.der b/tests/invalid-x509/id:000676,src:000254,op:havoc,rep:4,+cov.der deleted file mode 100644 index d95ca0f..0000000 --- a/tests/invalid-x509/id:000676,src:000254,op:havoc,rep:4,+cov.der +++ /dev/null @@ -1 +0,0 @@ -00dd \ No newline at end of file diff --git a/tests/invalid-x509/id:000677,src:000254,op:havoc,rep:2,+cov.der b/tests/invalid-x509/id:000677,src:000254,op:havoc,rep:2,+cov.der deleted file mode 100644 index 501b455..0000000 --- a/tests/invalid-x509/id:000677,src:000254,op:havoc,rep:2,+cov.der +++ /dev/null @@ -1 +0,0 @@ -00 \ No newline at end of file diff --git a/tests/invalid-x509/id:000678,src:000254,op:havoc,rep:2,+cov.der b/tests/invalid-x509/id:000678,src:000254,op:havoc,rep:2,+cov.der deleted file mode 100644 index 2c30255..0000000 --- a/tests/invalid-x509/id:000678,src:000254,op:havoc,rep:2,+cov.der +++ /dev/null @@ -1 +0,0 @@ -00 \ No newline at end of file diff --git a/tests/invalid-x509/id:000679,src:000254,op:havoc,rep:2,+cov.der b/tests/invalid-x509/id:000679,src:000254,op:havoc,rep:2,+cov.der deleted file mode 100644 index cd8741b..0000000 --- a/tests/invalid-x509/id:000679,src:000254,op:havoc,rep:2,+cov.der +++ /dev/null @@ -1,2 +0,0 @@ -00 - \ No newline at end of file diff --git a/tests/invalid-x509/id:000680,src:000254,op:havoc,rep:2,+cov.der b/tests/invalid-x509/id:000680,src:000254,op:havoc,rep:2,+cov.der deleted file mode 100644 index 90e6f78..0000000 --- a/tests/invalid-x509/id:000680,src:000254,op:havoc,rep:2,+cov.der +++ /dev/null @@ -1 +0,0 @@ -00 \ No newline at end of file diff --git a/tests/invalid-x509/id:000681,src:000254,op:havoc,rep:4,+cov.der b/tests/invalid-x509/id:000681,src:000254,op:havoc,rep:4,+cov.der deleted file mode 100644 index 9345efc..0000000 --- a/tests/invalid-x509/id:000681,src:000254,op:havoc,rep:4,+cov.der +++ /dev/null @@ -1 +0,0 @@ -00 \ No newline at end of file diff --git a/tests/invalid-x509/id:000682,src:000254,op:havoc,rep:2,+cov.der b/tests/invalid-x509/id:000682,src:000254,op:havoc,rep:2,+cov.der deleted file mode 100644 index 4cdc6cc..0000000 --- a/tests/invalid-x509/id:000682,src:000254,op:havoc,rep:2,+cov.der +++ /dev/null @@ -1 +0,0 @@ -00 \ No newline at end of file diff --git a/tests/invalid-x509/id:000683,src:000254,op:havoc,rep:4,+cov.der b/tests/invalid-x509/id:000683,src:000254,op:havoc,rep:4,+cov.der deleted file mode 100644 index 016c8ba..0000000 --- a/tests/invalid-x509/id:000683,src:000254,op:havoc,rep:4,+cov.der +++ /dev/null @@ -1 +0,0 @@ -00 \ No newline at end of file diff --git a/tests/invalid-x509/id:000684,src:000254,op:havoc,rep:2,+cov.der b/tests/invalid-x509/id:000684,src:000254,op:havoc,rep:2,+cov.der deleted file mode 100644 index 6360bf6..0000000 --- a/tests/invalid-x509/id:000684,src:000254,op:havoc,rep:2,+cov.der +++ /dev/null @@ -1 +0,0 @@ -00 \ No newline at end of file diff --git a/tests/invalid-x509/id:000685,src:000254,op:havoc,rep:2,+cov.der b/tests/invalid-x509/id:000685,src:000254,op:havoc,rep:2,+cov.der deleted file mode 100644 index 8f54019..0000000 --- a/tests/invalid-x509/id:000685,src:000254,op:havoc,rep:2,+cov.der +++ /dev/null @@ -1 +0,0 @@ -00 \ No newline at end of file diff --git a/tests/invalid-x509/id:000687,src:000336,op:flip1,pos:508.der b/tests/invalid-x509/id:000687,src:000336,op:flip1,pos:508.der deleted file mode 100644 index f0c9333..0000000 Binary files a/tests/invalid-x509/id:000687,src:000336,op:flip1,pos:508.der and /dev/null differ diff --git a/tests/invalid-x509/id:000688,src:000336,op:flip4,pos:508.der b/tests/invalid-x509/id:000688,src:000336,op:flip4,pos:508.der deleted file mode 100644 index 3872e5a..0000000 Binary files a/tests/invalid-x509/id:000688,src:000336,op:flip4,pos:508.der and /dev/null differ diff --git a/tests/invalid-x509/id:000689,src:000336,op:int16,pos:424,val:be:-128,+cov.der b/tests/invalid-x509/id:000689,src:000336,op:int16,pos:424,val:be:-128,+cov.der deleted file mode 100644 index 14c1171..0000000 Binary files a/tests/invalid-x509/id:000689,src:000336,op:int16,pos:424,val:be:-128,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:000691,src:000336,op:int32,pos:423,val:-128,+cov.der b/tests/invalid-x509/id:000691,src:000336,op:int32,pos:423,val:-128,+cov.der deleted file mode 100644 index e7d942e..0000000 Binary files a/tests/invalid-x509/id:000691,src:000336,op:int32,pos:423,val:-128,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:000694,src:000350,op:flip8,pos:16.der b/tests/invalid-x509/id:000694,src:000350,op:flip8,pos:16.der deleted file mode 100644 index 883540c..0000000 Binary files a/tests/invalid-x509/id:000694,src:000350,op:flip8,pos:16.der and /dev/null differ diff --git a/tests/invalid-x509/id:000695,src:000350,op:arith8,pos:12,val:-35.der b/tests/invalid-x509/id:000695,src:000350,op:arith8,pos:12,val:-35.der deleted file mode 100644 index b84511d..0000000 Binary files a/tests/invalid-x509/id:000695,src:000350,op:arith8,pos:12,val:-35.der and /dev/null differ diff --git a/tests/invalid-x509/id:000704,src:000403,op:flip4,pos:103.der b/tests/invalid-x509/id:000704,src:000403,op:flip4,pos:103.der deleted file mode 100644 index 8d921cc..0000000 Binary files a/tests/invalid-x509/id:000704,src:000403,op:flip4,pos:103.der and /dev/null differ diff --git a/tests/invalid-x509/id:000708,src:000416,op:flip4,pos:228,+cov.der b/tests/invalid-x509/id:000708,src:000416,op:flip4,pos:228,+cov.der deleted file mode 100644 index e5c6cf6..0000000 Binary files a/tests/invalid-x509/id:000708,src:000416,op:flip4,pos:228,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:000709,src:000436,op:int32,pos:550,val:+0.der b/tests/invalid-x509/id:000709,src:000436,op:int32,pos:550,val:+0.der deleted file mode 100644 index 5c8efb9..0000000 Binary files a/tests/invalid-x509/id:000709,src:000436,op:int32,pos:550,val:+0.der and /dev/null differ diff --git a/tests/invalid-x509/id:000712,src:000444,op:flip1,pos:584,+cov.der b/tests/invalid-x509/id:000712,src:000444,op:flip1,pos:584,+cov.der deleted file mode 100644 index 1916b0a..0000000 Binary files a/tests/invalid-x509/id:000712,src:000444,op:flip1,pos:584,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:000714,src:000444,op:ext_AO,pos:584,+cov.der b/tests/invalid-x509/id:000714,src:000444,op:ext_AO,pos:584,+cov.der deleted file mode 100644 index e9df802..0000000 Binary files a/tests/invalid-x509/id:000714,src:000444,op:ext_AO,pos:584,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:000722,src:000472,op:havoc,rep:2.der b/tests/invalid-x509/id:000722,src:000472,op:havoc,rep:2.der deleted file mode 100644 index 8684f35..0000000 Binary files a/tests/invalid-x509/id:000722,src:000472,op:havoc,rep:2.der and /dev/null differ diff --git a/tests/invalid-x509/id:000723,src:000472,op:havoc,rep:4.der b/tests/invalid-x509/id:000723,src:000472,op:havoc,rep:4.der deleted file mode 100644 index a38df30..0000000 Binary files a/tests/invalid-x509/id:000723,src:000472,op:havoc,rep:4.der and /dev/null differ diff --git a/tests/invalid-x509/id:000729,src:000483,op:int32,pos:229,val:+0.der b/tests/invalid-x509/id:000729,src:000483,op:int32,pos:229,val:+0.der deleted file mode 100644 index cae5964..0000000 Binary files a/tests/invalid-x509/id:000729,src:000483,op:int32,pos:229,val:+0.der and /dev/null differ diff --git a/tests/invalid-x509/id:000730,src:000484,op:flip1,pos:503.der b/tests/invalid-x509/id:000730,src:000484,op:flip1,pos:503.der deleted file mode 100644 index f0d28d5..0000000 Binary files a/tests/invalid-x509/id:000730,src:000484,op:flip1,pos:503.der and /dev/null differ diff --git a/tests/invalid-x509/id:000731,src:000484,op:flip1,pos:505,+cov.der b/tests/invalid-x509/id:000731,src:000484,op:flip1,pos:505,+cov.der deleted file mode 100644 index da492c9..0000000 Binary files a/tests/invalid-x509/id:000731,src:000484,op:flip1,pos:505,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:000735,src:000484,op:int32,pos:505,val:-128.der b/tests/invalid-x509/id:000735,src:000484,op:int32,pos:505,val:-128.der deleted file mode 100644 index 35fe384..0000000 Binary files a/tests/invalid-x509/id:000735,src:000484,op:int32,pos:505,val:-128.der and /dev/null differ diff --git a/tests/invalid-x509/id:000738,src:000495,op:int32,pos:550,val:+0.der b/tests/invalid-x509/id:000738,src:000495,op:int32,pos:550,val:+0.der deleted file mode 100644 index 09d9199..0000000 Binary files a/tests/invalid-x509/id:000738,src:000495,op:int32,pos:550,val:+0.der and /dev/null differ diff --git a/tests/invalid-x509/id:000743,src:000508,op:ext_AO,pos:504,+cov.der b/tests/invalid-x509/id:000743,src:000508,op:ext_AO,pos:504,+cov.der deleted file mode 100644 index 1f9f127..0000000 Binary files a/tests/invalid-x509/id:000743,src:000508,op:ext_AO,pos:504,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:000744,src:000509,op:ext_AO,pos:507,+cov.der b/tests/invalid-x509/id:000744,src:000509,op:ext_AO,pos:507,+cov.der deleted file mode 100644 index c277e9b..0000000 Binary files a/tests/invalid-x509/id:000744,src:000509,op:ext_AO,pos:507,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:000748,src:000522,op:int8,pos:34,val:-128.der b/tests/invalid-x509/id:000748,src:000522,op:int8,pos:34,val:-128.der deleted file mode 100644 index e11035e..0000000 Binary files a/tests/invalid-x509/id:000748,src:000522,op:int8,pos:34,val:-128.der and /dev/null differ diff --git a/tests/invalid-x509/id:000753,src:000528,op:int16,pos:119,val:+16.der b/tests/invalid-x509/id:000753,src:000528,op:int16,pos:119,val:+16.der deleted file mode 100644 index 5b998a7..0000000 Binary files a/tests/invalid-x509/id:000753,src:000528,op:int16,pos:119,val:+16.der and /dev/null differ diff --git a/tests/invalid-x509/id:000754,src:000528,op:havoc,rep:2.der b/tests/invalid-x509/id:000754,src:000528,op:havoc,rep:2.der deleted file mode 100644 index f1d452f..0000000 Binary files a/tests/invalid-x509/id:000754,src:000528,op:havoc,rep:2.der and /dev/null differ diff --git a/tests/invalid-x509/id:000756,src:000539,op:flip1,pos:268,+cov.der b/tests/invalid-x509/id:000756,src:000539,op:flip1,pos:268,+cov.der deleted file mode 100644 index dc99ed2..0000000 Binary files a/tests/invalid-x509/id:000756,src:000539,op:flip1,pos:268,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:000757,src:000539,op:flip32,pos:47,+cov.der b/tests/invalid-x509/id:000757,src:000539,op:flip32,pos:47,+cov.der deleted file mode 100644 index 0eaae56..0000000 Binary files a/tests/invalid-x509/id:000757,src:000539,op:flip32,pos:47,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:000763,src:000539,op:havoc,rep:32,+cov.der b/tests/invalid-x509/id:000763,src:000539,op:havoc,rep:32,+cov.der deleted file mode 100644 index bd12f8b..0000000 Binary files a/tests/invalid-x509/id:000763,src:000539,op:havoc,rep:32,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:000767,src:000539,op:havoc,rep:8,+cov.der b/tests/invalid-x509/id:000767,src:000539,op:havoc,rep:8,+cov.der deleted file mode 100644 index 622921b..0000000 Binary files a/tests/invalid-x509/id:000767,src:000539,op:havoc,rep:8,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:000769,src:000539,op:havoc,rep:32,+cov.der b/tests/invalid-x509/id:000769,src:000539,op:havoc,rep:32,+cov.der deleted file mode 100644 index 1512c92..0000000 Binary files a/tests/invalid-x509/id:000769,src:000539,op:havoc,rep:32,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:000770,src:000539,op:havoc,rep:32.der b/tests/invalid-x509/id:000770,src:000539,op:havoc,rep:32.der deleted file mode 100644 index 71bd1b1..0000000 Binary files a/tests/invalid-x509/id:000770,src:000539,op:havoc,rep:32.der and /dev/null differ diff --git a/tests/invalid-x509/id:000776,src:000549,op:int32,pos:13,val:+0.der b/tests/invalid-x509/id:000776,src:000549,op:int32,pos:13,val:+0.der deleted file mode 100644 index f5afde8..0000000 Binary files a/tests/invalid-x509/id:000776,src:000549,op:int32,pos:13,val:+0.der and /dev/null differ diff --git a/tests/invalid-x509/id:000783,src:000579,op:ext_AO,pos:33,+cov.der b/tests/invalid-x509/id:000783,src:000579,op:ext_AO,pos:33,+cov.der deleted file mode 100644 index 51c7dc5..0000000 Binary files a/tests/invalid-x509/id:000783,src:000579,op:ext_AO,pos:33,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:000784,src:000587,op:ext_AO,pos:15,+cov.der b/tests/invalid-x509/id:000784,src:000587,op:ext_AO,pos:15,+cov.der deleted file mode 100644 index eee1620..0000000 Binary files a/tests/invalid-x509/id:000784,src:000587,op:ext_AO,pos:15,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:000786,src:000600,op:ext_AO,pos:545,+cov.der b/tests/invalid-x509/id:000786,src:000600,op:ext_AO,pos:545,+cov.der deleted file mode 100644 index 774661d..0000000 Binary files a/tests/invalid-x509/id:000786,src:000600,op:ext_AO,pos:545,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:000787,src:000601,op:int16,pos:103,val:-1.der b/tests/invalid-x509/id:000787,src:000601,op:int16,pos:103,val:-1.der deleted file mode 100644 index 120144c..0000000 Binary files a/tests/invalid-x509/id:000787,src:000601,op:int16,pos:103,val:-1.der and /dev/null differ diff --git a/tests/invalid-x509/id:000788,src:000601,op:ext_AO,pos:105,+cov.der b/tests/invalid-x509/id:000788,src:000601,op:ext_AO,pos:105,+cov.der deleted file mode 100644 index 4f4d2b5..0000000 Binary files a/tests/invalid-x509/id:000788,src:000601,op:ext_AO,pos:105,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:000789,src:000608,op:havoc,rep:8.der b/tests/invalid-x509/id:000789,src:000608,op:havoc,rep:8.der deleted file mode 100644 index 1769900..0000000 Binary files a/tests/invalid-x509/id:000789,src:000608,op:havoc,rep:8.der and /dev/null differ diff --git a/tests/invalid-x509/id:000791,src:000612,op:int32,pos:206,val:+0.der b/tests/invalid-x509/id:000791,src:000612,op:int32,pos:206,val:+0.der deleted file mode 100644 index 653738f..0000000 Binary files a/tests/invalid-x509/id:000791,src:000612,op:int32,pos:206,val:+0.der and /dev/null differ diff --git a/tests/invalid-x509/id:000792,src:000613,op:flip4,pos:207.der b/tests/invalid-x509/id:000792,src:000613,op:flip4,pos:207.der deleted file mode 100644 index 41966ab..0000000 Binary files a/tests/invalid-x509/id:000792,src:000613,op:flip4,pos:207.der and /dev/null differ diff --git a/tests/invalid-x509/id:000797,src:000621,op:flip1,pos:235.der b/tests/invalid-x509/id:000797,src:000621,op:flip1,pos:235.der deleted file mode 100644 index 657ed9a..0000000 Binary files a/tests/invalid-x509/id:000797,src:000621,op:flip1,pos:235.der and /dev/null differ diff --git a/tests/invalid-x509/id:000799,src:000623,op:flip1,pos:354,+cov.der b/tests/invalid-x509/id:000799,src:000623,op:flip1,pos:354,+cov.der deleted file mode 100644 index 0b5859f..0000000 Binary files a/tests/invalid-x509/id:000799,src:000623,op:flip1,pos:354,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:000800,src:000623,op:flip1,pos:354,+cov.der b/tests/invalid-x509/id:000800,src:000623,op:flip1,pos:354,+cov.der deleted file mode 100644 index dacb36e..0000000 Binary files a/tests/invalid-x509/id:000800,src:000623,op:flip1,pos:354,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:000801,src:000623,op:arith8,pos:354,val:-25,+cov.der b/tests/invalid-x509/id:000801,src:000623,op:arith8,pos:354,val:-25,+cov.der deleted file mode 100644 index a6fbbf7..0000000 Binary files a/tests/invalid-x509/id:000801,src:000623,op:arith8,pos:354,val:-25,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:000802,src:000623,op:int16,pos:354,val:-128,+cov.der b/tests/invalid-x509/id:000802,src:000623,op:int16,pos:354,val:-128,+cov.der deleted file mode 100644 index 401fa61..0000000 Binary files a/tests/invalid-x509/id:000802,src:000623,op:int16,pos:354,val:-128,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:000804,src:000623,op:int32,pos:193,val:-32768,+cov.der b/tests/invalid-x509/id:000804,src:000623,op:int32,pos:193,val:-32768,+cov.der deleted file mode 100644 index 4522961..0000000 Binary files a/tests/invalid-x509/id:000804,src:000623,op:int32,pos:193,val:-32768,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:000805,src:000624,op:int8,pos:355,val:-128,+cov.der b/tests/invalid-x509/id:000805,src:000624,op:int8,pos:355,val:-128,+cov.der deleted file mode 100644 index c2bb742..0000000 Binary files a/tests/invalid-x509/id:000805,src:000624,op:int8,pos:355,val:-128,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:000806,src:000624,op:int32,pos:193,val:-32768,+cov.der b/tests/invalid-x509/id:000806,src:000624,op:int32,pos:193,val:-32768,+cov.der deleted file mode 100644 index 6e077f3..0000000 Binary files a/tests/invalid-x509/id:000806,src:000624,op:int32,pos:193,val:-32768,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:000810,src:000628,op:flip1,pos:7.der b/tests/invalid-x509/id:000810,src:000628,op:flip1,pos:7.der deleted file mode 100644 index a681f7d..0000000 Binary files a/tests/invalid-x509/id:000810,src:000628,op:flip1,pos:7.der and /dev/null differ diff --git a/tests/invalid-x509/id:000815,src:000640,op:int32,pos:230,val:-2147483648.der b/tests/invalid-x509/id:000815,src:000640,op:int32,pos:230,val:-2147483648.der deleted file mode 100644 index fc11f24..0000000 Binary files a/tests/invalid-x509/id:000815,src:000640,op:int32,pos:230,val:-2147483648.der and /dev/null differ diff --git a/tests/invalid-x509/id:000817,src:000641,op:flip1,pos:11.der b/tests/invalid-x509/id:000817,src:000641,op:flip1,pos:11.der deleted file mode 100644 index 7eacdde..0000000 Binary files a/tests/invalid-x509/id:000817,src:000641,op:flip1,pos:11.der and /dev/null differ diff --git a/tests/invalid-x509/id:000821,src:000645,op:flip1,pos:207.der b/tests/invalid-x509/id:000821,src:000645,op:flip1,pos:207.der deleted file mode 100644 index 94687f7..0000000 Binary files a/tests/invalid-x509/id:000821,src:000645,op:flip1,pos:207.der and /dev/null differ diff --git a/tests/invalid-x509/id:000823,src:000645,op:int32,pos:211,val:+0.der b/tests/invalid-x509/id:000823,src:000645,op:int32,pos:211,val:+0.der deleted file mode 100644 index 86fe589..0000000 Binary files a/tests/invalid-x509/id:000823,src:000645,op:int32,pos:211,val:+0.der and /dev/null differ diff --git a/tests/invalid-x509/id:000825,src:000647,op:int32,pos:232,val:+0.der b/tests/invalid-x509/id:000825,src:000647,op:int32,pos:232,val:+0.der deleted file mode 100644 index ced5dcc..0000000 Binary files a/tests/invalid-x509/id:000825,src:000647,op:int32,pos:232,val:+0.der and /dev/null differ diff --git a/tests/invalid-x509/id:000828,src:000652,op:int32,pos:30,val:+0.der b/tests/invalid-x509/id:000828,src:000652,op:int32,pos:30,val:+0.der deleted file mode 100644 index df37575..0000000 Binary files a/tests/invalid-x509/id:000828,src:000652,op:int32,pos:30,val:+0.der and /dev/null differ diff --git a/tests/invalid-x509/id:000833,src:000654,op:int32,pos:43,val:+0.der b/tests/invalid-x509/id:000833,src:000654,op:int32,pos:43,val:+0.der deleted file mode 100644 index 9f48b6e..0000000 Binary files a/tests/invalid-x509/id:000833,src:000654,op:int32,pos:43,val:+0.der and /dev/null differ diff --git a/tests/invalid-x509/id:000840,src:000655,op:havoc,rep:16,+cov.der b/tests/invalid-x509/id:000840,src:000655,op:havoc,rep:16,+cov.der deleted file mode 100644 index 38119bc..0000000 Binary files a/tests/invalid-x509/id:000840,src:000655,op:havoc,rep:16,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:000841,src:000655,op:havoc,rep:8,+cov.der b/tests/invalid-x509/id:000841,src:000655,op:havoc,rep:8,+cov.der deleted file mode 100644 index a0c787f..0000000 Binary files a/tests/invalid-x509/id:000841,src:000655,op:havoc,rep:8,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:000846,src:000655,op:havoc,rep:64.der b/tests/invalid-x509/id:000846,src:000655,op:havoc,rep:64.der deleted file mode 100644 index b58efc8..0000000 Binary files a/tests/invalid-x509/id:000846,src:000655,op:havoc,rep:64.der and /dev/null differ diff --git a/tests/invalid-x509/id:000849,src:000655,op:havoc,rep:2.der b/tests/invalid-x509/id:000849,src:000655,op:havoc,rep:2.der deleted file mode 100644 index e69322d..0000000 Binary files a/tests/invalid-x509/id:000849,src:000655,op:havoc,rep:2.der and /dev/null differ diff --git a/tests/invalid-x509/id:000852,src:000655,op:havoc,rep:32.der b/tests/invalid-x509/id:000852,src:000655,op:havoc,rep:32.der deleted file mode 100644 index f30e7c3..0000000 Binary files a/tests/invalid-x509/id:000852,src:000655,op:havoc,rep:32.der and /dev/null differ diff --git a/tests/invalid-x509/id:000854,src:000655,op:havoc,rep:16.der b/tests/invalid-x509/id:000854,src:000655,op:havoc,rep:16.der deleted file mode 100644 index efd19e1..0000000 Binary files a/tests/invalid-x509/id:000854,src:000655,op:havoc,rep:16.der and /dev/null differ diff --git a/tests/invalid-x509/id:000855,src:000655,op:havoc,rep:64.der b/tests/invalid-x509/id:000855,src:000655,op:havoc,rep:64.der deleted file mode 100644 index 33fd46e..0000000 Binary files a/tests/invalid-x509/id:000855,src:000655,op:havoc,rep:64.der and /dev/null differ diff --git a/tests/invalid-x509/id:000857,src:000655,op:havoc,rep:8,+cov.der b/tests/invalid-x509/id:000857,src:000655,op:havoc,rep:8,+cov.der deleted file mode 100644 index 0fa65e0..0000000 Binary files a/tests/invalid-x509/id:000857,src:000655,op:havoc,rep:8,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:000859,src:000659,op:ext_AO,pos:259,+cov.der b/tests/invalid-x509/id:000859,src:000659,op:ext_AO,pos:259,+cov.der deleted file mode 100644 index fb0a561..0000000 Binary files a/tests/invalid-x509/id:000859,src:000659,op:ext_AO,pos:259,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:000861,src:000660,op:int32,pos:92,val:+0.der b/tests/invalid-x509/id:000861,src:000660,op:int32,pos:92,val:+0.der deleted file mode 100644 index fa5d54a..0000000 Binary files a/tests/invalid-x509/id:000861,src:000660,op:int32,pos:92,val:+0.der and /dev/null differ diff --git a/tests/invalid-x509/id:000862,src:000661,op:flip4,pos:282,+cov.der b/tests/invalid-x509/id:000862,src:000661,op:flip4,pos:282,+cov.der deleted file mode 100644 index 9b7982f..0000000 Binary files a/tests/invalid-x509/id:000862,src:000661,op:flip4,pos:282,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:000864,src:000661,op:int8,pos:356,val:-128,+cov.der b/tests/invalid-x509/id:000864,src:000661,op:int8,pos:356,val:-128,+cov.der deleted file mode 100644 index 84b34ba..0000000 Binary files a/tests/invalid-x509/id:000864,src:000661,op:int8,pos:356,val:-128,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:000865,src:000661,op:int16,pos:356,val:-128,+cov.der b/tests/invalid-x509/id:000865,src:000661,op:int16,pos:356,val:-128,+cov.der deleted file mode 100644 index 647d0b5..0000000 Binary files a/tests/invalid-x509/id:000865,src:000661,op:int16,pos:356,val:-128,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:000866,src:000661,op:int32,pos:193,val:-32768,+cov.der b/tests/invalid-x509/id:000866,src:000661,op:int32,pos:193,val:-32768,+cov.der deleted file mode 100644 index 1f97f36..0000000 Binary files a/tests/invalid-x509/id:000866,src:000661,op:int32,pos:193,val:-32768,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:000867,src:000664,op:ext_AO,pos:206,+cov.der b/tests/invalid-x509/id:000867,src:000664,op:ext_AO,pos:206,+cov.der deleted file mode 100644 index 101fb63..0000000 Binary files a/tests/invalid-x509/id:000867,src:000664,op:ext_AO,pos:206,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:000871,src:000676,op:arith8,pos:6,val:-5,+cov.der b/tests/invalid-x509/id:000871,src:000676,op:arith8,pos:6,val:-5,+cov.der deleted file mode 100644 index 2aa418e..0000000 --- a/tests/invalid-x509/id:000871,src:000676,op:arith8,pos:6,val:-5,+cov.der +++ /dev/null @@ -1 +0,0 @@ -00d_ \ No newline at end of file diff --git a/tests/invalid-x509/id:000872,src:000676,op:arith8,pos:7,val:-21,+cov.der b/tests/invalid-x509/id:000872,src:000676,op:arith8,pos:7,val:-21,+cov.der deleted file mode 100644 index c6f486c..0000000 --- a/tests/invalid-x509/id:000872,src:000676,op:arith8,pos:7,val:-21,+cov.der +++ /dev/null @@ -1 +0,0 @@ -00dd \ No newline at end of file diff --git a/tests/invalid-x509/id:000873,src:000676,op:havoc,rep:2,+cov.der b/tests/invalid-x509/id:000873,src:000676,op:havoc,rep:2,+cov.der deleted file mode 100644 index d589560..0000000 --- a/tests/invalid-x509/id:000873,src:000676,op:havoc,rep:2,+cov.der +++ /dev/null @@ -1 +0,0 @@ -00d \ No newline at end of file diff --git a/tests/invalid-x509/id:000875,src:000680,op:havoc,rep:2,+cov.der b/tests/invalid-x509/id:000875,src:000680,op:havoc,rep:2,+cov.der deleted file mode 100644 index faa1788..0000000 --- a/tests/invalid-x509/id:000875,src:000680,op:havoc,rep:2,+cov.der +++ /dev/null @@ -1 +0,0 @@ -00 \ No newline at end of file diff --git a/tests/invalid-x509/id:000876,src:000681,op:havoc,rep:2,+cov.der b/tests/invalid-x509/id:000876,src:000681,op:havoc,rep:2,+cov.der deleted file mode 100644 index 4f79e25..0000000 --- a/tests/invalid-x509/id:000876,src:000681,op:havoc,rep:2,+cov.der +++ /dev/null @@ -1 +0,0 @@ -00 \ No newline at end of file diff --git a/tests/invalid-x509/id:000880,src:000683,op:havoc,rep:2,+cov.der b/tests/invalid-x509/id:000880,src:000683,op:havoc,rep:2,+cov.der deleted file mode 100644 index f3e73f7..0000000 --- a/tests/invalid-x509/id:000880,src:000683,op:havoc,rep:2,+cov.der +++ /dev/null @@ -1 +0,0 @@ -00 \ No newline at end of file diff --git a/tests/invalid-x509/id:000881,src:000685,op:havoc,rep:2,+cov.der b/tests/invalid-x509/id:000881,src:000685,op:havoc,rep:2,+cov.der deleted file mode 100644 index 0344d80..0000000 --- a/tests/invalid-x509/id:000881,src:000685,op:havoc,rep:2,+cov.der +++ /dev/null @@ -1 +0,0 @@ -00 \ No newline at end of file diff --git a/tests/invalid-x509/id:000885,src:000701,op:int32,pos:106,val:+0.der b/tests/invalid-x509/id:000885,src:000701,op:int32,pos:106,val:+0.der deleted file mode 100644 index 373b87b..0000000 Binary files a/tests/invalid-x509/id:000885,src:000701,op:int32,pos:106,val:+0.der and /dev/null differ diff --git a/tests/invalid-x509/id:000886,src:000701,op:int32,pos:107,val:+0.der b/tests/invalid-x509/id:000886,src:000701,op:int32,pos:107,val:+0.der deleted file mode 100644 index aff1698..0000000 Binary files a/tests/invalid-x509/id:000886,src:000701,op:int32,pos:107,val:+0.der and /dev/null differ diff --git a/tests/invalid-x509/id:000887,src:000708,op:ext_AO,pos:229,+cov.der b/tests/invalid-x509/id:000887,src:000708,op:ext_AO,pos:229,+cov.der deleted file mode 100644 index dd8ab77..0000000 Binary files a/tests/invalid-x509/id:000887,src:000708,op:ext_AO,pos:229,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:000888,src:000713,op:flip1,pos:601.der b/tests/invalid-x509/id:000888,src:000713,op:flip1,pos:601.der deleted file mode 100644 index 2a5a5ef..0000000 Binary files a/tests/invalid-x509/id:000888,src:000713,op:flip1,pos:601.der and /dev/null differ diff --git a/tests/invalid-x509/id:000889,src:000713,op:flip1,pos:647.der b/tests/invalid-x509/id:000889,src:000713,op:flip1,pos:647.der deleted file mode 100644 index 89a9838..0000000 Binary files a/tests/invalid-x509/id:000889,src:000713,op:flip1,pos:647.der and /dev/null differ diff --git a/tests/invalid-x509/id:000890,src:000714,op:flip1,pos:503,+cov.der b/tests/invalid-x509/id:000890,src:000714,op:flip1,pos:503,+cov.der deleted file mode 100644 index 28ee30a..0000000 Binary files a/tests/invalid-x509/id:000890,src:000714,op:flip1,pos:503,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:000891,src:000721,op:int32,pos:798,val:be:+1.der b/tests/invalid-x509/id:000891,src:000721,op:int32,pos:798,val:be:+1.der deleted file mode 100644 index 8ed41db..0000000 Binary files a/tests/invalid-x509/id:000891,src:000721,op:int32,pos:798,val:be:+1.der and /dev/null differ diff --git a/tests/invalid-x509/id:000892,src:000724,op:int16,pos:503,val:+1.der b/tests/invalid-x509/id:000892,src:000724,op:int16,pos:503,val:+1.der deleted file mode 100644 index a14f807..0000000 Binary files a/tests/invalid-x509/id:000892,src:000724,op:int16,pos:503,val:+1.der and /dev/null differ diff --git a/tests/invalid-x509/id:000894,src:000734,op:int16,pos:503,val:+1.der b/tests/invalid-x509/id:000894,src:000734,op:int16,pos:503,val:+1.der deleted file mode 100644 index 61f6237..0000000 Binary files a/tests/invalid-x509/id:000894,src:000734,op:int16,pos:503,val:+1.der and /dev/null differ diff --git a/tests/invalid-x509/id:000895,src:000745,op:flip4,pos:751.der b/tests/invalid-x509/id:000895,src:000745,op:flip4,pos:751.der deleted file mode 100644 index cac6321..0000000 Binary files a/tests/invalid-x509/id:000895,src:000745,op:flip4,pos:751.der and /dev/null differ diff --git a/tests/invalid-x509/id:000900,src:000745,op:havoc,rep:64.der b/tests/invalid-x509/id:000900,src:000745,op:havoc,rep:64.der deleted file mode 100644 index 7990ed9..0000000 Binary files a/tests/invalid-x509/id:000900,src:000745,op:havoc,rep:64.der and /dev/null differ diff --git a/tests/invalid-x509/id:000901,src:000745,op:havoc,rep:8.der b/tests/invalid-x509/id:000901,src:000745,op:havoc,rep:8.der deleted file mode 100644 index 00fac92..0000000 Binary files a/tests/invalid-x509/id:000901,src:000745,op:havoc,rep:8.der and /dev/null differ diff --git a/tests/invalid-x509/id:000903,src:000768,op:int16,pos:230,val:+256.der b/tests/invalid-x509/id:000903,src:000768,op:int16,pos:230,val:+256.der deleted file mode 100644 index c533bf8..0000000 Binary files a/tests/invalid-x509/id:000903,src:000768,op:int16,pos:230,val:+256.der and /dev/null differ diff --git a/tests/invalid-x509/id:000904,src:000768,op:int16,pos:1012,val:-128,+cov.der b/tests/invalid-x509/id:000904,src:000768,op:int16,pos:1012,val:-128,+cov.der deleted file mode 100644 index efa9435..0000000 Binary files a/tests/invalid-x509/id:000904,src:000768,op:int16,pos:1012,val:-128,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:000905,src:000768,op:int32,pos:1010,val:-128,+cov.der b/tests/invalid-x509/id:000905,src:000768,op:int32,pos:1010,val:-128,+cov.der deleted file mode 100644 index 093148e..0000000 Binary files a/tests/invalid-x509/id:000905,src:000768,op:int32,pos:1010,val:-128,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:000906,src:000768,op:int32,pos:1011,val:+32768,+cov.der b/tests/invalid-x509/id:000906,src:000768,op:int32,pos:1011,val:+32768,+cov.der deleted file mode 100644 index 8853b93..0000000 Binary files a/tests/invalid-x509/id:000906,src:000768,op:int32,pos:1011,val:+32768,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:000910,src:000777,op:int32,pos:28,val:+0.der b/tests/invalid-x509/id:000910,src:000777,op:int32,pos:28,val:+0.der deleted file mode 100644 index b24dd22..0000000 Binary files a/tests/invalid-x509/id:000910,src:000777,op:int32,pos:28,val:+0.der and /dev/null differ diff --git a/tests/invalid-x509/id:000913,src:000793,op:int32,pos:208,val:-2147483648.der b/tests/invalid-x509/id:000913,src:000793,op:int32,pos:208,val:-2147483648.der deleted file mode 100644 index 66d6e9b..0000000 Binary files a/tests/invalid-x509/id:000913,src:000793,op:int32,pos:208,val:-2147483648.der and /dev/null differ diff --git a/tests/invalid-x509/id:000914,src:000793,op:ext_AO,pos:208,+cov.der b/tests/invalid-x509/id:000914,src:000793,op:ext_AO,pos:208,+cov.der deleted file mode 100644 index 67b8170..0000000 Binary files a/tests/invalid-x509/id:000914,src:000793,op:ext_AO,pos:208,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:000916,src:000808,op:flip1,pos:44.der b/tests/invalid-x509/id:000916,src:000808,op:flip1,pos:44.der deleted file mode 100644 index f8729a5..0000000 Binary files a/tests/invalid-x509/id:000916,src:000808,op:flip1,pos:44.der and /dev/null differ diff --git a/tests/invalid-x509/id:000918,src:000811,op:int8,pos:300,val:-128.der b/tests/invalid-x509/id:000918,src:000811,op:int8,pos:300,val:-128.der deleted file mode 100644 index 5349687..0000000 Binary files a/tests/invalid-x509/id:000918,src:000811,op:int8,pos:300,val:-128.der and /dev/null differ diff --git a/tests/invalid-x509/id:000920,src:000813,op:int32,pos:231,val:+0.der b/tests/invalid-x509/id:000920,src:000813,op:int32,pos:231,val:+0.der deleted file mode 100644 index 05640b9..0000000 Binary files a/tests/invalid-x509/id:000920,src:000813,op:int32,pos:231,val:+0.der and /dev/null differ diff --git a/tests/invalid-x509/id:000923,src:000818,op:int32,pos:18,val:+0.der b/tests/invalid-x509/id:000923,src:000818,op:int32,pos:18,val:+0.der deleted file mode 100644 index 3dd5ba6..0000000 Binary files a/tests/invalid-x509/id:000923,src:000818,op:int32,pos:18,val:+0.der and /dev/null differ diff --git a/tests/invalid-x509/id:000924,src:000818,op:int32,pos:19,val:+0.der b/tests/invalid-x509/id:000924,src:000818,op:int32,pos:19,val:+0.der deleted file mode 100644 index e2d173a..0000000 Binary files a/tests/invalid-x509/id:000924,src:000818,op:int32,pos:19,val:+0.der and /dev/null differ diff --git a/tests/invalid-x509/id:000927,src:000819,op:int8,pos:9,val:-128.der b/tests/invalid-x509/id:000927,src:000819,op:int8,pos:9,val:-128.der deleted file mode 100644 index af69968..0000000 Binary files a/tests/invalid-x509/id:000927,src:000819,op:int8,pos:9,val:-128.der and /dev/null differ diff --git a/tests/invalid-x509/id:000928,src:000819,op:int32,pos:9,val:+255.der b/tests/invalid-x509/id:000928,src:000819,op:int32,pos:9,val:+255.der deleted file mode 100644 index d6fda79..0000000 Binary files a/tests/invalid-x509/id:000928,src:000819,op:int32,pos:9,val:+255.der and /dev/null differ diff --git a/tests/invalid-x509/id:000930,src:000820,op:flip1,pos:205.der b/tests/invalid-x509/id:000930,src:000820,op:flip1,pos:205.der deleted file mode 100644 index 7621ece..0000000 Binary files a/tests/invalid-x509/id:000930,src:000820,op:flip1,pos:205.der and /dev/null differ diff --git a/tests/invalid-x509/id:000935,src:000822,op:int32,pos:214,val:+0.der b/tests/invalid-x509/id:000935,src:000822,op:int32,pos:214,val:+0.der deleted file mode 100644 index ffed7c6..0000000 Binary files a/tests/invalid-x509/id:000935,src:000822,op:int32,pos:214,val:+0.der and /dev/null differ diff --git a/tests/invalid-x509/id:000936,src:000826,op:flip1,pos:229.der b/tests/invalid-x509/id:000936,src:000826,op:flip1,pos:229.der deleted file mode 100644 index edb706c..0000000 Binary files a/tests/invalid-x509/id:000936,src:000826,op:flip1,pos:229.der and /dev/null differ diff --git a/tests/invalid-x509/id:000939,src:000828,op:int32,pos:34,val:+0.der b/tests/invalid-x509/id:000939,src:000828,op:int32,pos:34,val:+0.der deleted file mode 100644 index 87aed35..0000000 Binary files a/tests/invalid-x509/id:000939,src:000828,op:int32,pos:34,val:+0.der and /dev/null differ diff --git a/tests/invalid-x509/id:000940,src:000829,op:flip2,pos:334.der b/tests/invalid-x509/id:000940,src:000829,op:flip2,pos:334.der deleted file mode 100644 index d3c435b..0000000 Binary files a/tests/invalid-x509/id:000940,src:000829,op:flip2,pos:334.der and /dev/null differ diff --git a/tests/invalid-x509/id:000943,src:000832,op:int32,pos:46,val:+0.der b/tests/invalid-x509/id:000943,src:000832,op:int32,pos:46,val:+0.der deleted file mode 100644 index cf9a363..0000000 Binary files a/tests/invalid-x509/id:000943,src:000832,op:int32,pos:46,val:+0.der and /dev/null differ diff --git a/tests/invalid-x509/id:000945,src:000840,op:flip1,pos:518,+cov.der b/tests/invalid-x509/id:000945,src:000840,op:flip1,pos:518,+cov.der deleted file mode 100644 index 6a26584..0000000 Binary files a/tests/invalid-x509/id:000945,src:000840,op:flip1,pos:518,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:000947,src:000849,op:flip1,pos:279.der b/tests/invalid-x509/id:000947,src:000849,op:flip1,pos:279.der deleted file mode 100644 index ed847ab..0000000 Binary files a/tests/invalid-x509/id:000947,src:000849,op:flip1,pos:279.der and /dev/null differ diff --git a/tests/invalid-x509/id:000949,src:000858,op:arith8,pos:280,val:-5.der b/tests/invalid-x509/id:000949,src:000858,op:arith8,pos:280,val:-5.der deleted file mode 100644 index 519f7cc..0000000 Binary files a/tests/invalid-x509/id:000949,src:000858,op:arith8,pos:280,val:-5.der and /dev/null differ diff --git a/tests/invalid-x509/id:000950,src:000860,op:int16,pos:95,val:+0.der b/tests/invalid-x509/id:000950,src:000860,op:int16,pos:95,val:+0.der deleted file mode 100644 index 9cb481d..0000000 Binary files a/tests/invalid-x509/id:000950,src:000860,op:int16,pos:95,val:+0.der and /dev/null differ diff --git a/tests/invalid-x509/id:000953,src:000862,op:flip1,pos:355,+cov.der b/tests/invalid-x509/id:000953,src:000862,op:flip1,pos:355,+cov.der deleted file mode 100644 index e902738..0000000 Binary files a/tests/invalid-x509/id:000953,src:000862,op:flip1,pos:355,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:000954,src:000862,op:flip1,pos:355,+cov.der b/tests/invalid-x509/id:000954,src:000862,op:flip1,pos:355,+cov.der deleted file mode 100644 index 4f54a1c..0000000 Binary files a/tests/invalid-x509/id:000954,src:000862,op:flip1,pos:355,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:000955,src:000862,op:flip1,pos:356,+cov.der b/tests/invalid-x509/id:000955,src:000862,op:flip1,pos:356,+cov.der deleted file mode 100644 index 233359f..0000000 Binary files a/tests/invalid-x509/id:000955,src:000862,op:flip1,pos:356,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:000956,src:000862,op:flip2,pos:355,+cov.der b/tests/invalid-x509/id:000956,src:000862,op:flip2,pos:355,+cov.der deleted file mode 100644 index f0782e7..0000000 Binary files a/tests/invalid-x509/id:000956,src:000862,op:flip2,pos:355,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:000958,src:000863,op:flip1,pos:228.der b/tests/invalid-x509/id:000958,src:000863,op:flip1,pos:228.der deleted file mode 100644 index 94ee913..0000000 Binary files a/tests/invalid-x509/id:000958,src:000863,op:flip1,pos:228.der and /dev/null differ diff --git a/tests/invalid-x509/id:000959,src:000864,op:flip1,pos:357,+cov.der b/tests/invalid-x509/id:000959,src:000864,op:flip1,pos:357,+cov.der deleted file mode 100644 index dfa0be1..0000000 Binary files a/tests/invalid-x509/id:000959,src:000864,op:flip1,pos:357,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:000961,src:000866,op:flip1,pos:357,+cov.der b/tests/invalid-x509/id:000961,src:000866,op:flip1,pos:357,+cov.der deleted file mode 100644 index 7a7d21a..0000000 Binary files a/tests/invalid-x509/id:000961,src:000866,op:flip1,pos:357,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:000962,src:000875,op:havoc,rep:4,+cov.der b/tests/invalid-x509/id:000962,src:000875,op:havoc,rep:4,+cov.der deleted file mode 100644 index 781ac5d..0000000 --- a/tests/invalid-x509/id:000962,src:000875,op:havoc,rep:4,+cov.der +++ /dev/null @@ -1 +0,0 @@ -00՜ \ No newline at end of file diff --git a/tests/invalid-x509/id:000963,src:000876,op:flip4,pos:5,+cov.der b/tests/invalid-x509/id:000963,src:000876,op:flip4,pos:5,+cov.der deleted file mode 100644 index 1e2388d..0000000 --- a/tests/invalid-x509/id:000963,src:000876,op:flip4,pos:5,+cov.der +++ /dev/null @@ -1 +0,0 @@ -00 \ No newline at end of file diff --git a/tests/invalid-x509/id:000964,src:000878,op:int16,pos:4,val:be:-128,+cov.der b/tests/invalid-x509/id:000964,src:000878,op:int16,pos:4,val:be:-128,+cov.der deleted file mode 100644 index d183d9e..0000000 --- a/tests/invalid-x509/id:000964,src:000878,op:int16,pos:4,val:be:-128,+cov.der +++ /dev/null @@ -1 +0,0 @@ -00 \ No newline at end of file diff --git a/tests/invalid-x509/id:000975,src:000920,op:int32,pos:235,val:+0.der b/tests/invalid-x509/id:000975,src:000920,op:int32,pos:235,val:+0.der deleted file mode 100644 index b4623d6..0000000 Binary files a/tests/invalid-x509/id:000975,src:000920,op:int32,pos:235,val:+0.der and /dev/null differ diff --git a/tests/invalid-x509/id:000976,src:000924,op:int32,pos:23,val:+0.der b/tests/invalid-x509/id:000976,src:000924,op:int32,pos:23,val:+0.der deleted file mode 100644 index 29d05fb..0000000 Binary files a/tests/invalid-x509/id:000976,src:000924,op:int32,pos:23,val:+0.der and /dev/null differ diff --git a/tests/invalid-x509/id:000977,src:000928,op:int32,pos:20,val:+0.der b/tests/invalid-x509/id:000977,src:000928,op:int32,pos:20,val:+0.der deleted file mode 100644 index 96ed291..0000000 Binary files a/tests/invalid-x509/id:000977,src:000928,op:int32,pos:20,val:+0.der and /dev/null differ diff --git a/tests/invalid-x509/id:000978,src:000928,op:havoc,rep:32.der b/tests/invalid-x509/id:000978,src:000928,op:havoc,rep:32.der deleted file mode 100644 index 0264af9..0000000 Binary files a/tests/invalid-x509/id:000978,src:000928,op:havoc,rep:32.der and /dev/null differ diff --git a/tests/invalid-x509/id:000980,src:000929,op:int32,pos:212,val:+0.der b/tests/invalid-x509/id:000980,src:000929,op:int32,pos:212,val:+0.der deleted file mode 100644 index 76ae238..0000000 Binary files a/tests/invalid-x509/id:000980,src:000929,op:int32,pos:212,val:+0.der and /dev/null differ diff --git a/tests/invalid-x509/id:000983,src:000934,op:int32,pos:216,val:+0.der b/tests/invalid-x509/id:000983,src:000934,op:int32,pos:216,val:+0.der deleted file mode 100644 index b9bc647..0000000 Binary files a/tests/invalid-x509/id:000983,src:000934,op:int32,pos:216,val:+0.der and /dev/null differ diff --git a/tests/invalid-x509/id:000985,src:000934,op:havoc,rep:2.der b/tests/invalid-x509/id:000985,src:000934,op:havoc,rep:2.der deleted file mode 100644 index 5ebb790..0000000 Binary files a/tests/invalid-x509/id:000985,src:000934,op:havoc,rep:2.der and /dev/null differ diff --git a/tests/invalid-x509/id:000986,src:000935,op:int32,pos:205,val:+255.der b/tests/invalid-x509/id:000986,src:000935,op:int32,pos:205,val:+255.der deleted file mode 100644 index c9bbfe3..0000000 Binary files a/tests/invalid-x509/id:000986,src:000935,op:int32,pos:205,val:+255.der and /dev/null differ diff --git a/tests/invalid-x509/id:000988,src:000936,op:int32,pos:237,val:+0.der b/tests/invalid-x509/id:000988,src:000936,op:int32,pos:237,val:+0.der deleted file mode 100644 index 6a326bd..0000000 Binary files a/tests/invalid-x509/id:000988,src:000936,op:int32,pos:237,val:+0.der and /dev/null differ diff --git a/tests/invalid-x509/id:000989,src:000939,op:flip2,pos:39.der b/tests/invalid-x509/id:000989,src:000939,op:flip2,pos:39.der deleted file mode 100644 index 868479b..0000000 Binary files a/tests/invalid-x509/id:000989,src:000939,op:flip2,pos:39.der and /dev/null differ diff --git a/tests/invalid-x509/id:000990,src:000939,op:int16,pos:39,val:+0.der b/tests/invalid-x509/id:000990,src:000939,op:int16,pos:39,val:+0.der deleted file mode 100644 index c43a474..0000000 Binary files a/tests/invalid-x509/id:000990,src:000939,op:int16,pos:39,val:+0.der and /dev/null differ diff --git a/tests/invalid-x509/id:000991,src:000944,op:int32,pos:41,val:-32768.der b/tests/invalid-x509/id:000991,src:000944,op:int32,pos:41,val:-32768.der deleted file mode 100644 index 8ecd348..0000000 Binary files a/tests/invalid-x509/id:000991,src:000944,op:int32,pos:41,val:-32768.der and /dev/null differ diff --git a/tests/invalid-x509/id:000992,src:000944,op:int32,pos:371,val:-128.der b/tests/invalid-x509/id:000992,src:000944,op:int32,pos:371,val:-128.der deleted file mode 100644 index a6cac2a..0000000 Binary files a/tests/invalid-x509/id:000992,src:000944,op:int32,pos:371,val:-128.der and /dev/null differ diff --git a/tests/invalid-x509/id:000995,src:000944,op:havoc,rep:4.der b/tests/invalid-x509/id:000995,src:000944,op:havoc,rep:4.der deleted file mode 100644 index f704dde..0000000 Binary files a/tests/invalid-x509/id:000995,src:000944,op:havoc,rep:4.der and /dev/null differ diff --git a/tests/invalid-x509/id:000997,src:000944,op:havoc,rep:2.der b/tests/invalid-x509/id:000997,src:000944,op:havoc,rep:2.der deleted file mode 100644 index 2180484..0000000 Binary files a/tests/invalid-x509/id:000997,src:000944,op:havoc,rep:2.der and /dev/null differ diff --git a/tests/invalid-x509/id:000998,src:000944,op:havoc,rep:2.der b/tests/invalid-x509/id:000998,src:000944,op:havoc,rep:2.der deleted file mode 100644 index 7159728..0000000 Binary files a/tests/invalid-x509/id:000998,src:000944,op:havoc,rep:2.der and /dev/null differ diff --git a/tests/invalid-x509/id:001001,src:000950,op:int32,pos:97,val:+0.der b/tests/invalid-x509/id:001001,src:000950,op:int32,pos:97,val:+0.der deleted file mode 100644 index 7de1659..0000000 Binary files a/tests/invalid-x509/id:001001,src:000950,op:int32,pos:97,val:+0.der and /dev/null differ diff --git a/tests/invalid-x509/id:001003,src:000951,op:havoc,rep:2.der b/tests/invalid-x509/id:001003,src:000951,op:havoc,rep:2.der deleted file mode 100644 index f0eadcc..0000000 Binary files a/tests/invalid-x509/id:001003,src:000951,op:havoc,rep:2.der and /dev/null differ diff --git a/tests/invalid-x509/id:001004,src:000957,op:havoc,rep:16.der b/tests/invalid-x509/id:001004,src:000957,op:havoc,rep:16.der deleted file mode 100644 index 04faaa1..0000000 Binary files a/tests/invalid-x509/id:001004,src:000957,op:havoc,rep:16.der and /dev/null differ diff --git a/tests/invalid-x509/id:001005,src:000965,op:arith8,pos:426,val:+14.der b/tests/invalid-x509/id:001005,src:000965,op:arith8,pos:426,val:+14.der deleted file mode 100644 index c6028a7..0000000 Binary files a/tests/invalid-x509/id:001005,src:000965,op:arith8,pos:426,val:+14.der and /dev/null differ diff --git a/tests/invalid-x509/id:001007,src:000965,op:havoc,rep:64.der b/tests/invalid-x509/id:001007,src:000965,op:havoc,rep:64.der deleted file mode 100644 index 8b97840..0000000 Binary files a/tests/invalid-x509/id:001007,src:000965,op:havoc,rep:64.der and /dev/null differ diff --git a/tests/invalid-x509/id:001015,src:000968,op:int32,pos:35,val:-128.der b/tests/invalid-x509/id:001015,src:000968,op:int32,pos:35,val:-128.der deleted file mode 100644 index 6ef849f..0000000 Binary files a/tests/invalid-x509/id:001015,src:000968,op:int32,pos:35,val:-128.der and /dev/null differ diff --git a/tests/invalid-x509/id:001017,src:000973,op:int32,pos:237,val:+0.der b/tests/invalid-x509/id:001017,src:000973,op:int32,pos:237,val:+0.der deleted file mode 100644 index cd94ee7..0000000 Binary files a/tests/invalid-x509/id:001017,src:000973,op:int32,pos:237,val:+0.der and /dev/null differ diff --git a/tests/invalid-x509/id:001019,src:000974,op:int32,pos:230,val:be:+32768.der b/tests/invalid-x509/id:001019,src:000974,op:int32,pos:230,val:be:+32768.der deleted file mode 100644 index 550268a..0000000 Binary files a/tests/invalid-x509/id:001019,src:000974,op:int32,pos:230,val:be:+32768.der and /dev/null differ diff --git a/tests/invalid-x509/id:001021,src:000978,op:int32,pos:29,val:+0.der b/tests/invalid-x509/id:001021,src:000978,op:int32,pos:29,val:+0.der deleted file mode 100644 index ed35d27..0000000 Binary files a/tests/invalid-x509/id:001021,src:000978,op:int32,pos:29,val:+0.der and /dev/null differ diff --git a/tests/invalid-x509/id:001022,src:000978,op:havoc,rep:8.der b/tests/invalid-x509/id:001022,src:000978,op:havoc,rep:8.der deleted file mode 100644 index d5b3b2a..0000000 Binary files a/tests/invalid-x509/id:001022,src:000978,op:havoc,rep:8.der and /dev/null differ diff --git a/tests/invalid-x509/id:001026,src:000986,op:int32,pos:217,val:+0.der b/tests/invalid-x509/id:001026,src:000986,op:int32,pos:217,val:+0.der deleted file mode 100644 index 96b2fd1..0000000 Binary files a/tests/invalid-x509/id:001026,src:000986,op:int32,pos:217,val:+0.der and /dev/null differ diff --git a/tests/invalid-x509/id:001028,src:000992,op:havoc,rep:2.der b/tests/invalid-x509/id:001028,src:000992,op:havoc,rep:2.der deleted file mode 100644 index e08213d..0000000 Binary files a/tests/invalid-x509/id:001028,src:000992,op:havoc,rep:2.der and /dev/null differ diff --git a/tests/invalid-x509/id:001033,src:001016,op:int32,pos:239,val:+0.der b/tests/invalid-x509/id:001033,src:001016,op:int32,pos:239,val:+0.der deleted file mode 100644 index 13b6248..0000000 Binary files a/tests/invalid-x509/id:001033,src:001016,op:int32,pos:239,val:+0.der and /dev/null differ diff --git a/tests/invalid-x509/id:001034,src:001017,op:int32,pos:240,val:+0.der b/tests/invalid-x509/id:001034,src:001017,op:int32,pos:240,val:+0.der deleted file mode 100644 index e5c13f3..0000000 Binary files a/tests/invalid-x509/id:001034,src:001017,op:int32,pos:240,val:+0.der and /dev/null differ diff --git a/tests/invalid-x509/id:001037,src:000942,op:int32,pos:48,val:+0.der b/tests/invalid-x509/id:001037,src:000942,op:int32,pos:48,val:+0.der deleted file mode 100644 index d69dd5c..0000000 Binary files a/tests/invalid-x509/id:001037,src:000942,op:int32,pos:48,val:+0.der and /dev/null differ diff --git a/tests/invalid-x509/id:001040,src:001035,op:int32,pos:234,val:+0.der b/tests/invalid-x509/id:001040,src:001035,op:int32,pos:234,val:+0.der deleted file mode 100644 index cd9f10f..0000000 Binary files a/tests/invalid-x509/id:001040,src:001035,op:int32,pos:234,val:+0.der and /dev/null differ diff --git a/tests/invalid-x509/id:001041,src:001035,op:int32,pos:235,val:+0.der b/tests/invalid-x509/id:001041,src:001035,op:int32,pos:235,val:+0.der deleted file mode 100644 index 5ede851..0000000 Binary files a/tests/invalid-x509/id:001041,src:001035,op:int32,pos:235,val:+0.der and /dev/null differ diff --git a/tests/invalid-x509/id:001042,src:001036,op:flip2,pos:229.der b/tests/invalid-x509/id:001042,src:001036,op:flip2,pos:229.der deleted file mode 100644 index b4bf50f..0000000 Binary files a/tests/invalid-x509/id:001042,src:001036,op:flip2,pos:229.der and /dev/null differ diff --git a/tests/invalid-x509/id:001044,src:001039,op:int32,pos:236,val:+0.der b/tests/invalid-x509/id:001044,src:001039,op:int32,pos:236,val:+0.der deleted file mode 100644 index f0c75c7..0000000 Binary files a/tests/invalid-x509/id:001044,src:001039,op:int32,pos:236,val:+0.der and /dev/null differ diff --git a/tests/invalid-x509/id:001047,src:000328,op:havoc,rep:2.der b/tests/invalid-x509/id:001047,src:000328,op:havoc,rep:2.der deleted file mode 100644 index de605c1..0000000 --- a/tests/invalid-x509/id:001047,src:000328,op:havoc,rep:2.der +++ /dev/null @@ -1 +0,0 @@ -??t \ No newline at end of file diff --git a/tests/invalid-x509/id:001051,src:001050,op:havoc,rep:2.der b/tests/invalid-x509/id:001051,src:001050,op:havoc,rep:2.der deleted file mode 100644 index 3ccab9a..0000000 --- a/tests/invalid-x509/id:001051,src:001050,op:havoc,rep:2.der +++ /dev/null @@ -1 +0,0 @@ -??w? \ No newline at end of file diff --git a/tests/invalid-x509/id:001052,src:001050,op:havoc,rep:2.der b/tests/invalid-x509/id:001052,src:001050,op:havoc,rep:2.der deleted file mode 100644 index 47b8df5..0000000 --- a/tests/invalid-x509/id:001052,src:001050,op:havoc,rep:2.der +++ /dev/null @@ -1 +0,0 @@ -?? \ No newline at end of file diff --git a/tests/invalid-x509/id:001054,src:001050,op:havoc,rep:2.der b/tests/invalid-x509/id:001054,src:001050,op:havoc,rep:2.der deleted file mode 100644 index 3fe4570..0000000 --- a/tests/invalid-x509/id:001054,src:001050,op:havoc,rep:2.der +++ /dev/null @@ -1 +0,0 @@ -?? \ No newline at end of file diff --git a/tests/invalid-x509/id:001056,src:001050,op:havoc,rep:2.der b/tests/invalid-x509/id:001056,src:001050,op:havoc,rep:2.der deleted file mode 100644 index 6bc079b..0000000 --- a/tests/invalid-x509/id:001056,src:001050,op:havoc,rep:2.der +++ /dev/null @@ -1 +0,0 @@ -?? \ No newline at end of file diff --git a/tests/invalid-x509/id:001069,src:000337,op:flip1,pos:285.der b/tests/invalid-x509/id:001069,src:000337,op:flip1,pos:285.der deleted file mode 100644 index 6c8a004..0000000 Binary files a/tests/invalid-x509/id:001069,src:000337,op:flip1,pos:285.der and /dev/null differ diff --git a/tests/invalid-x509/id:001071,src:000337,op:flip8,pos:245.der b/tests/invalid-x509/id:001071,src:000337,op:flip8,pos:245.der deleted file mode 100644 index 96b590d..0000000 Binary files a/tests/invalid-x509/id:001071,src:000337,op:flip8,pos:245.der and /dev/null differ diff --git a/tests/invalid-x509/id:001072,src:000337,op:havoc,rep:4.der b/tests/invalid-x509/id:001072,src:000337,op:havoc,rep:4.der deleted file mode 100644 index a805c7b..0000000 Binary files a/tests/invalid-x509/id:001072,src:000337,op:havoc,rep:4.der and /dev/null differ diff --git a/tests/invalid-x509/id:001076,src:001073,op:havoc,rep:64.der b/tests/invalid-x509/id:001076,src:001073,op:havoc,rep:64.der deleted file mode 100644 index 43a13c1..0000000 Binary files a/tests/invalid-x509/id:001076,src:001073,op:havoc,rep:64.der and /dev/null differ diff --git a/tests/invalid-x509/id:001078,src:001073,op:havoc,rep:128.der b/tests/invalid-x509/id:001078,src:001073,op:havoc,rep:128.der deleted file mode 100644 index ee3e64e..0000000 Binary files a/tests/invalid-x509/id:001078,src:001073,op:havoc,rep:128.der and /dev/null differ diff --git a/tests/invalid-x509/id:001079,src:001073,op:havoc,rep:128.der b/tests/invalid-x509/id:001079,src:001073,op:havoc,rep:128.der deleted file mode 100644 index ffac2f3..0000000 Binary files a/tests/invalid-x509/id:001079,src:001073,op:havoc,rep:128.der and /dev/null differ diff --git a/tests/invalid-x509/id:001081,src:001073,op:havoc,rep:4.der b/tests/invalid-x509/id:001081,src:001073,op:havoc,rep:4.der deleted file mode 100644 index 0ee2768..0000000 --- a/tests/invalid-x509/id:001081,src:001073,op:havoc,rep:4.der +++ /dev/null @@ -1,3 +0,0 @@ -00  0 U - -G \ No newline at end of file diff --git a/tests/invalid-x509/id:001082,src:001073,op:havoc,rep:16.der b/tests/invalid-x509/id:001082,src:001073,op:havoc,rep:16.der deleted file mode 100644 index 90df437..0000000 --- a/tests/invalid-x509/id:001082,src:001073,op:havoc,rep:16.der +++ /dev/null @@ -1,3 +0,0 @@ -002 - -Gogle Xnc1%0#\Google Internet AuthoriTy 2 \ No newline at end of file diff --git a/tests/invalid-x509/id:001083,src:001080,op:havoc,rep:16.der b/tests/invalid-x509/id:001083,src:001080,op:havoc,rep:16.der deleted file mode 100644 index ca6df8a..0000000 Binary files a/tests/invalid-x509/id:001083,src:001080,op:havoc,rep:16.der and /dev/null differ diff --git a/tests/invalid-x509/id:001084,src:001080,op:havoc,rep:16.der b/tests/invalid-x509/id:001084,src:001080,op:havoc,rep:16.der deleted file mode 100644 index fda118d..0000000 --- a/tests/invalid-x509/id:001084,src:001080,op:havoc,rep:16.der +++ /dev/null @@ -1 +0,0 @@ -00  0 UUS@0US@0USagzzzzzzzzzzzzzzzzzzzzzzzzzzzzzag`aag \ No newline at end of file diff --git a/tests/invalid-x509/id:001087,src:000435,op:havoc,rep:8.der b/tests/invalid-x509/id:001087,src:000435,op:havoc,rep:8.der deleted file mode 100644 index 460ab1f..0000000 Binary files a/tests/invalid-x509/id:001087,src:000435,op:havoc,rep:8.der and /dev/null differ diff --git a/tests/invalid-x509/id:001095,src:000435,op:havoc,rep:64,+cov.der b/tests/invalid-x509/id:001095,src:000435,op:havoc,rep:64,+cov.der deleted file mode 100644 index 28750d5..0000000 Binary files a/tests/invalid-x509/id:001095,src:000435,op:havoc,rep:64,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:001098,src:000992,op:havoc,rep:2.der b/tests/invalid-x509/id:001098,src:000992,op:havoc,rep:2.der deleted file mode 100644 index 09f6ccf..0000000 Binary files a/tests/invalid-x509/id:001098,src:000992,op:havoc,rep:2.der and /dev/null differ diff --git a/tests/invalid-x509/id:001099,src:001095,op:flip1,pos:573.der b/tests/invalid-x509/id:001099,src:001095,op:flip1,pos:573.der deleted file mode 100644 index 3fce894..0000000 Binary files a/tests/invalid-x509/id:001099,src:001095,op:flip1,pos:573.der and /dev/null differ diff --git a/tests/invalid-x509/id:001104,src:001096,op:havoc,rep:4.der b/tests/invalid-x509/id:001104,src:001096,op:havoc,rep:4.der deleted file mode 100644 index 6f4d18b..0000000 Binary files a/tests/invalid-x509/id:001104,src:001096,op:havoc,rep:4.der and /dev/null differ diff --git a/tests/invalid-x509/id:001105,src:001102,op:havoc,rep:8.der b/tests/invalid-x509/id:001105,src:001102,op:havoc,rep:8.der deleted file mode 100644 index c00e813..0000000 Binary files a/tests/invalid-x509/id:001105,src:001102,op:havoc,rep:8.der and /dev/null differ diff --git a/tests/invalid-x509/id:001106,src:000413,op:havoc,rep:4.der b/tests/invalid-x509/id:001106,src:000413,op:havoc,rep:4.der deleted file mode 100644 index 3bd1529..0000000 Binary files a/tests/invalid-x509/id:001106,src:000413,op:havoc,rep:4.der and /dev/null differ diff --git a/tests/invalid-x509/id:001108,src:000004,op:ext_AO,pos:258.der b/tests/invalid-x509/id:001108,src:000004,op:ext_AO,pos:258.der deleted file mode 100644 index 857e9d4..0000000 Binary files a/tests/invalid-x509/id:001108,src:000004,op:ext_AO,pos:258.der and /dev/null differ diff --git a/tests/invalid-x509/id:001111,src:001108,op:flip1,pos:262.der b/tests/invalid-x509/id:001111,src:001108,op:flip1,pos:262.der deleted file mode 100644 index 8cfb14c..0000000 Binary files a/tests/invalid-x509/id:001111,src:001108,op:flip1,pos:262.der and /dev/null differ diff --git a/tests/invalid-x509/id:001112,src:001108,op:ext_AO,pos:280.der b/tests/invalid-x509/id:001112,src:001108,op:ext_AO,pos:280.der deleted file mode 100644 index 7478f56..0000000 Binary files a/tests/invalid-x509/id:001112,src:001108,op:ext_AO,pos:280.der and /dev/null differ diff --git a/tests/invalid-x509/id:001114,src:000425,op:flip1,pos:749.der b/tests/invalid-x509/id:001114,src:000425,op:flip1,pos:749.der deleted file mode 100644 index 9c6e1d8..0000000 Binary files a/tests/invalid-x509/id:001114,src:000425,op:flip1,pos:749.der and /dev/null differ diff --git a/tests/invalid-x509/id:001116,src:000584,op:havoc,rep:2.der b/tests/invalid-x509/id:001116,src:000584,op:havoc,rep:2.der deleted file mode 100644 index ea775ca..0000000 Binary files a/tests/invalid-x509/id:001116,src:000584,op:havoc,rep:2.der and /dev/null differ diff --git a/tests/invalid-x509/id:001118,src:000592,op:havoc,rep:64.der b/tests/invalid-x509/id:001118,src:000592,op:havoc,rep:64.der deleted file mode 100644 index 4efde52..0000000 Binary files a/tests/invalid-x509/id:001118,src:000592,op:havoc,rep:64.der and /dev/null differ diff --git a/tests/invalid-x509/id:001120,src:000669,op:int16,pos:6,val:be:+1000,+cov.der b/tests/invalid-x509/id:001120,src:000669,op:int16,pos:6,val:be:+1000,+cov.der deleted file mode 100644 index 03c65a0..0000000 Binary files a/tests/invalid-x509/id:001120,src:000669,op:int16,pos:6,val:be:+1000,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:001123,src:000589,op:flip2,pos:551.der b/tests/invalid-x509/id:001123,src:000589,op:flip2,pos:551.der deleted file mode 100644 index 0d1f2b8..0000000 Binary files a/tests/invalid-x509/id:001123,src:000589,op:flip2,pos:551.der and /dev/null differ diff --git a/tests/invalid-x509/id:001124,src:000589,op:arith8,pos:551,val:+9.der b/tests/invalid-x509/id:001124,src:000589,op:arith8,pos:551,val:+9.der deleted file mode 100644 index 06ea8a6..0000000 Binary files a/tests/invalid-x509/id:001124,src:000589,op:arith8,pos:551,val:+9.der and /dev/null differ diff --git a/tests/invalid-x509/id:001125,src:000589,op:int32,pos:550,val:-128.der b/tests/invalid-x509/id:001125,src:000589,op:int32,pos:550,val:-128.der deleted file mode 100644 index 43359da..0000000 Binary files a/tests/invalid-x509/id:001125,src:000589,op:int32,pos:550,val:-128.der and /dev/null differ diff --git a/tests/invalid-x509/id:001129,src:001126,op:arith8,pos:503,val:+1.der b/tests/invalid-x509/id:001129,src:001126,op:arith8,pos:503,val:+1.der deleted file mode 100644 index 52f3e77..0000000 Binary files a/tests/invalid-x509/id:001129,src:001126,op:arith8,pos:503,val:+1.der and /dev/null differ diff --git a/tests/invalid-x509/id:001130,src:001126,op:havoc,rep:4.der b/tests/invalid-x509/id:001130,src:001126,op:havoc,rep:4.der deleted file mode 100644 index 2d8aed1..0000000 Binary files a/tests/invalid-x509/id:001130,src:001126,op:havoc,rep:4.der and /dev/null differ diff --git a/tests/invalid-x509/id:001136,src:000605,op:havoc,rep:4.der b/tests/invalid-x509/id:001136,src:000605,op:havoc,rep:4.der deleted file mode 100644 index 17781df..0000000 Binary files a/tests/invalid-x509/id:001136,src:000605,op:havoc,rep:4.der and /dev/null differ diff --git a/tests/invalid-x509/id:001137,src:000827,op:flip1,pos:210.der b/tests/invalid-x509/id:001137,src:000827,op:flip1,pos:210.der deleted file mode 100644 index 0994ec2..0000000 Binary files a/tests/invalid-x509/id:001137,src:000827,op:flip1,pos:210.der and /dev/null differ diff --git a/tests/invalid-x509/id:001138,src:000827,op:arith8,pos:210,val:-12.der b/tests/invalid-x509/id:001138,src:000827,op:arith8,pos:210,val:-12.der deleted file mode 100644 index fca9a54..0000000 Binary files a/tests/invalid-x509/id:001138,src:000827,op:arith8,pos:210,val:-12.der and /dev/null differ diff --git a/tests/invalid-x509/id:001145,src:000728,op:havoc,rep:32.der b/tests/invalid-x509/id:001145,src:000728,op:havoc,rep:32.der deleted file mode 100644 index 0e132a1..0000000 Binary files a/tests/invalid-x509/id:001145,src:000728,op:havoc,rep:32.der and /dev/null differ diff --git a/tests/invalid-x509/id:001148,src:001142,op:havoc,rep:8.der b/tests/invalid-x509/id:001148,src:001142,op:havoc,rep:8.der deleted file mode 100644 index 68bd5b8..0000000 Binary files a/tests/invalid-x509/id:001148,src:001142,op:havoc,rep:8.der and /dev/null differ diff --git a/tests/invalid-x509/id:001156,src:001152,op:flip1,pos:39.der b/tests/invalid-x509/id:001156,src:001152,op:flip1,pos:39.der deleted file mode 100644 index 9c46db2..0000000 Binary files a/tests/invalid-x509/id:001156,src:001152,op:flip1,pos:39.der and /dev/null differ diff --git a/tests/invalid-x509/id:001163,src:001152,op:flip1,pos:46.der b/tests/invalid-x509/id:001163,src:001152,op:flip1,pos:46.der deleted file mode 100644 index 5d1935c..0000000 Binary files a/tests/invalid-x509/id:001163,src:001152,op:flip1,pos:46.der and /dev/null differ diff --git a/tests/invalid-x509/id:001164,src:001152,op:flip1,pos:47.der b/tests/invalid-x509/id:001164,src:001152,op:flip1,pos:47.der deleted file mode 100644 index 21427e3..0000000 Binary files a/tests/invalid-x509/id:001164,src:001152,op:flip1,pos:47.der and /dev/null differ diff --git a/tests/invalid-x509/id:001169,src:001152,op:flip1,pos:64.der b/tests/invalid-x509/id:001169,src:001152,op:flip1,pos:64.der deleted file mode 100644 index 1e09e7d..0000000 Binary files a/tests/invalid-x509/id:001169,src:001152,op:flip1,pos:64.der and /dev/null differ diff --git a/tests/invalid-x509/id:001170,src:001152,op:flip1,pos:95.der b/tests/invalid-x509/id:001170,src:001152,op:flip1,pos:95.der deleted file mode 100644 index 80720d1..0000000 Binary files a/tests/invalid-x509/id:001170,src:001152,op:flip1,pos:95.der and /dev/null differ diff --git a/tests/invalid-x509/id:001172,src:001152,op:havoc,rep:4.der b/tests/invalid-x509/id:001172,src:001152,op:havoc,rep:4.der deleted file mode 100644 index 94dd54d..0000000 Binary files a/tests/invalid-x509/id:001172,src:001152,op:havoc,rep:4.der and /dev/null differ diff --git a/tests/invalid-x509/id:001173,src:001152,op:havoc,rep:16.der b/tests/invalid-x509/id:001173,src:001152,op:havoc,rep:16.der deleted file mode 100644 index aab1e05..0000000 Binary files a/tests/invalid-x509/id:001173,src:001152,op:havoc,rep:16.der and /dev/null differ diff --git a/tests/invalid-x509/id:001175,src:001159,op:havoc,rep:4.der b/tests/invalid-x509/id:001175,src:001159,op:havoc,rep:4.der deleted file mode 100644 index 9491a8c..0000000 Binary files a/tests/invalid-x509/id:001175,src:001159,op:havoc,rep:4.der and /dev/null differ diff --git a/tests/invalid-x509/id:001176,src:001165,op:havoc,rep:32.der b/tests/invalid-x509/id:001176,src:001165,op:havoc,rep:32.der deleted file mode 100644 index 648027a..0000000 Binary files a/tests/invalid-x509/id:001176,src:001165,op:havoc,rep:32.der and /dev/null differ diff --git a/tests/invalid-x509/id:001177,src:000591,op:arith8,pos:575,val:+3.der b/tests/invalid-x509/id:001177,src:000591,op:arith8,pos:575,val:+3.der deleted file mode 100644 index 79ce6d1..0000000 Binary files a/tests/invalid-x509/id:001177,src:000591,op:arith8,pos:575,val:+3.der and /dev/null differ diff --git a/tests/invalid-x509/id:001178,src:000656,op:int32,pos:353,val:-32768,+cov.der b/tests/invalid-x509/id:001178,src:000656,op:int32,pos:353,val:-32768,+cov.der deleted file mode 100644 index 1f38680..0000000 Binary files a/tests/invalid-x509/id:001178,src:000656,op:int32,pos:353,val:-32768,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:001179,src:001178,op:flip1,pos:355,+cov.der b/tests/invalid-x509/id:001179,src:001178,op:flip1,pos:355,+cov.der deleted file mode 100644 index 55550bc..0000000 Binary files a/tests/invalid-x509/id:001179,src:001178,op:flip1,pos:355,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:001180,src:001178,op:flip1,pos:355,+cov.der b/tests/invalid-x509/id:001180,src:001178,op:flip1,pos:355,+cov.der deleted file mode 100644 index 5902867..0000000 Binary files a/tests/invalid-x509/id:001180,src:001178,op:flip1,pos:355,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:001185,src:000857,op:havoc,rep:16.der b/tests/invalid-x509/id:001185,src:000857,op:havoc,rep:16.der deleted file mode 100644 index c96049b..0000000 Binary files a/tests/invalid-x509/id:001185,src:000857,op:havoc,rep:16.der and /dev/null differ diff --git a/tests/invalid-x509/id:001188,src:000966,op:havoc,rep:32.der b/tests/invalid-x509/id:001188,src:000966,op:havoc,rep:32.der deleted file mode 100644 index f213473..0000000 Binary files a/tests/invalid-x509/id:001188,src:000966,op:havoc,rep:32.der and /dev/null differ diff --git a/tests/invalid-x509/id:001189,src:000990,op:havoc,rep:2.der b/tests/invalid-x509/id:001189,src:000990,op:havoc,rep:2.der deleted file mode 100644 index 9fb8044..0000000 Binary files a/tests/invalid-x509/id:001189,src:000990,op:havoc,rep:2.der and /dev/null differ diff --git a/tests/invalid-x509/id:001190,src:001177,op:arith8,pos:639,val:+3.der b/tests/invalid-x509/id:001190,src:001177,op:arith8,pos:639,val:+3.der deleted file mode 100644 index 0e56e75..0000000 Binary files a/tests/invalid-x509/id:001190,src:001177,op:arith8,pos:639,val:+3.der and /dev/null differ diff --git a/tests/invalid-x509/id:001191,src:001189,op:flip1,pos:27.der b/tests/invalid-x509/id:001191,src:001189,op:flip1,pos:27.der deleted file mode 100644 index 8ebd496..0000000 Binary files a/tests/invalid-x509/id:001191,src:001189,op:flip1,pos:27.der and /dev/null differ diff --git a/tests/invalid-x509/id:001192,src:001189,op:int32,pos:25,val:+255.der b/tests/invalid-x509/id:001192,src:001189,op:int32,pos:25,val:+255.der deleted file mode 100644 index 404e0b4..0000000 Binary files a/tests/invalid-x509/id:001192,src:001189,op:int32,pos:25,val:+255.der and /dev/null differ diff --git a/tests/invalid-x509/id:001193,src:001189,op:ext_AO,pos:5.der b/tests/invalid-x509/id:001193,src:001189,op:ext_AO,pos:5.der deleted file mode 100644 index 11c8050..0000000 Binary files a/tests/invalid-x509/id:001193,src:001189,op:ext_AO,pos:5.der and /dev/null differ diff --git a/tests/invalid-x509/id:001194,src:001189,op:havoc,rep:16.der b/tests/invalid-x509/id:001194,src:001189,op:havoc,rep:16.der deleted file mode 100644 index 2eac8a0..0000000 Binary files a/tests/invalid-x509/id:001194,src:001189,op:havoc,rep:16.der and /dev/null differ diff --git a/tests/invalid-x509/id:001195,src:001189,op:havoc,rep:32.der b/tests/invalid-x509/id:001195,src:001189,op:havoc,rep:32.der deleted file mode 100644 index aec51c3..0000000 Binary files a/tests/invalid-x509/id:001195,src:001189,op:havoc,rep:32.der and /dev/null differ diff --git a/tests/invalid-x509/id:001196,src:001189,op:havoc,rep:2.der b/tests/invalid-x509/id:001196,src:001189,op:havoc,rep:2.der deleted file mode 100644 index 12e51ce..0000000 Binary files a/tests/invalid-x509/id:001196,src:001189,op:havoc,rep:2.der and /dev/null differ diff --git a/tests/invalid-x509/id:001197,src:001189,op:havoc,rep:8.der b/tests/invalid-x509/id:001197,src:001189,op:havoc,rep:8.der deleted file mode 100644 index e9524a3..0000000 Binary files a/tests/invalid-x509/id:001197,src:001189,op:havoc,rep:8.der and /dev/null differ diff --git a/tests/invalid-x509/id:001198,src:001189,op:havoc,rep:4.der b/tests/invalid-x509/id:001198,src:001189,op:havoc,rep:4.der deleted file mode 100644 index 5508ec3..0000000 Binary files a/tests/invalid-x509/id:001198,src:001189,op:havoc,rep:4.der and /dev/null differ diff --git a/tests/invalid-x509/id:001200,src:001193,op:flip2,pos:154.der b/tests/invalid-x509/id:001200,src:001193,op:flip2,pos:154.der deleted file mode 100644 index b3e5154..0000000 Binary files a/tests/invalid-x509/id:001200,src:001193,op:flip2,pos:154.der and /dev/null differ diff --git a/tests/invalid-x509/id:001201,src:001195,op:int8,pos:47,val:+0.der b/tests/invalid-x509/id:001201,src:001195,op:int8,pos:47,val:+0.der deleted file mode 100644 index 5fdeae6..0000000 Binary files a/tests/invalid-x509/id:001201,src:001195,op:int8,pos:47,val:+0.der and /dev/null differ diff --git a/tests/invalid-x509/id:001202,src:001196,op:flip1,pos:31.der b/tests/invalid-x509/id:001202,src:001196,op:flip1,pos:31.der deleted file mode 100644 index a52629d..0000000 Binary files a/tests/invalid-x509/id:001202,src:001196,op:flip1,pos:31.der and /dev/null differ diff --git a/tests/invalid-x509/id:001204,src:000710,op:arith8,pos:639,val:+3.der b/tests/invalid-x509/id:001204,src:000710,op:arith8,pos:639,val:+3.der deleted file mode 100644 index 50386af..0000000 Binary files a/tests/invalid-x509/id:001204,src:000710,op:arith8,pos:639,val:+3.der and /dev/null differ diff --git a/tests/invalid-x509/id:001206,src:000829,op:havoc,rep:16.der b/tests/invalid-x509/id:001206,src:000829,op:havoc,rep:16.der deleted file mode 100644 index 5ac131f..0000000 Binary files a/tests/invalid-x509/id:001206,src:000829,op:havoc,rep:16.der and /dev/null differ diff --git a/tests/invalid-x509/id:001207,src:000886,op:int32,pos:110,val:+0.der b/tests/invalid-x509/id:001207,src:000886,op:int32,pos:110,val:+0.der deleted file mode 100644 index 397c602..0000000 Binary files a/tests/invalid-x509/id:001207,src:000886,op:int32,pos:110,val:+0.der and /dev/null differ diff --git a/tests/invalid-x509/id:001208,src:000934,op:havoc,rep:2.der b/tests/invalid-x509/id:001208,src:000934,op:havoc,rep:2.der deleted file mode 100644 index fca1b20..0000000 Binary files a/tests/invalid-x509/id:001208,src:000934,op:havoc,rep:2.der and /dev/null differ diff --git a/tests/invalid-x509/id:001209,src:000958,op:int16,pos:230,val:+1024.der b/tests/invalid-x509/id:001209,src:000958,op:int16,pos:230,val:+1024.der deleted file mode 100644 index ed2f042..0000000 Binary files a/tests/invalid-x509/id:001209,src:000958,op:int16,pos:230,val:+1024.der and /dev/null differ diff --git a/tests/invalid-x509/id:001210,src:001025,op:flip1,pos:204.der b/tests/invalid-x509/id:001210,src:001025,op:flip1,pos:204.der deleted file mode 100644 index 56c5eb8..0000000 Binary files a/tests/invalid-x509/id:001210,src:001025,op:flip1,pos:204.der and /dev/null differ diff --git a/tests/invalid-x509/id:001215,src:001093,op:havoc,rep:16.der b/tests/invalid-x509/id:001215,src:001093,op:havoc,rep:16.der deleted file mode 100644 index d53f640..0000000 Binary files a/tests/invalid-x509/id:001215,src:001093,op:havoc,rep:16.der and /dev/null differ diff --git a/tests/invalid-x509/id:001217,src:001119,op:flip1,pos:27.der b/tests/invalid-x509/id:001217,src:001119,op:flip1,pos:27.der deleted file mode 100644 index 1454617..0000000 Binary files a/tests/invalid-x509/id:001217,src:001119,op:flip1,pos:27.der and /dev/null differ diff --git a/tests/invalid-x509/id:001219,src:001136,op:flip1,pos:40.der b/tests/invalid-x509/id:001219,src:001136,op:flip1,pos:40.der deleted file mode 100644 index 6fcb82f..0000000 Binary files a/tests/invalid-x509/id:001219,src:001136,op:flip1,pos:40.der and /dev/null differ diff --git a/tests/invalid-x509/id:001244,src:001239,op:flip1,pos:344.der b/tests/invalid-x509/id:001244,src:001239,op:flip1,pos:344.der deleted file mode 100644 index 6adb530..0000000 Binary files a/tests/invalid-x509/id:001244,src:001239,op:flip1,pos:344.der and /dev/null differ diff --git a/tests/invalid-x509/id:001245,src:001239,op:flip1,pos:347.der b/tests/invalid-x509/id:001245,src:001239,op:flip1,pos:347.der deleted file mode 100644 index 833c57d..0000000 Binary files a/tests/invalid-x509/id:001245,src:001239,op:flip1,pos:347.der and /dev/null differ diff --git a/tests/invalid-x509/id:001247,src:001239,op:flip1,pos:356.der b/tests/invalid-x509/id:001247,src:001239,op:flip1,pos:356.der deleted file mode 100644 index 077598b..0000000 Binary files a/tests/invalid-x509/id:001247,src:001239,op:flip1,pos:356.der and /dev/null differ diff --git a/tests/invalid-x509/id:001248,src:001239,op:flip1,pos:356.der b/tests/invalid-x509/id:001248,src:001239,op:flip1,pos:356.der deleted file mode 100644 index 7eee675..0000000 Binary files a/tests/invalid-x509/id:001248,src:001239,op:flip1,pos:356.der and /dev/null differ diff --git a/tests/invalid-x509/id:001250,src:001239,op:flip2,pos:356.der b/tests/invalid-x509/id:001250,src:001239,op:flip2,pos:356.der deleted file mode 100644 index 531e9f5..0000000 Binary files a/tests/invalid-x509/id:001250,src:001239,op:flip2,pos:356.der and /dev/null differ diff --git a/tests/invalid-x509/id:001251,src:001239,op:flip4,pos:347.der b/tests/invalid-x509/id:001251,src:001239,op:flip4,pos:347.der deleted file mode 100644 index a71c101..0000000 Binary files a/tests/invalid-x509/id:001251,src:001239,op:flip4,pos:347.der and /dev/null differ diff --git a/tests/invalid-x509/id:001252,src:001239,op:arith8,pos:310,val:+10.der b/tests/invalid-x509/id:001252,src:001239,op:arith8,pos:310,val:+10.der deleted file mode 100644 index 379e087..0000000 Binary files a/tests/invalid-x509/id:001252,src:001239,op:arith8,pos:310,val:+10.der and /dev/null differ diff --git a/tests/invalid-x509/id:001254,src:001239,op:int32,pos:353,val:+255.der b/tests/invalid-x509/id:001254,src:001239,op:int32,pos:353,val:+255.der deleted file mode 100644 index 9da5edf..0000000 Binary files a/tests/invalid-x509/id:001254,src:001239,op:int32,pos:353,val:+255.der and /dev/null differ diff --git a/tests/invalid-x509/id:001255,src:001239,op:int32,pos:353,val:be:+1000.der b/tests/invalid-x509/id:001255,src:001239,op:int32,pos:353,val:be:+1000.der deleted file mode 100644 index 1fc12ba..0000000 Binary files a/tests/invalid-x509/id:001255,src:001239,op:int32,pos:353,val:be:+1000.der and /dev/null differ diff --git a/tests/invalid-x509/id:001257,src:001239,op:ext_AO,pos:355.der b/tests/invalid-x509/id:001257,src:001239,op:ext_AO,pos:355.der deleted file mode 100644 index c4b90e6..0000000 Binary files a/tests/invalid-x509/id:001257,src:001239,op:ext_AO,pos:355.der and /dev/null differ diff --git a/tests/invalid-x509/id:001258,src:001239,op:ext_AO,pos:356.der b/tests/invalid-x509/id:001258,src:001239,op:ext_AO,pos:356.der deleted file mode 100644 index 8bd72d5..0000000 Binary files a/tests/invalid-x509/id:001258,src:001239,op:ext_AO,pos:356.der and /dev/null differ diff --git a/tests/invalid-x509/id:001259,src:001252,op:flip1,pos:356.der b/tests/invalid-x509/id:001259,src:001252,op:flip1,pos:356.der deleted file mode 100644 index df22449..0000000 Binary files a/tests/invalid-x509/id:001259,src:001252,op:flip1,pos:356.der and /dev/null differ diff --git a/tests/invalid-x509/id:001260,src:001252,op:flip1,pos:356.der b/tests/invalid-x509/id:001260,src:001252,op:flip1,pos:356.der deleted file mode 100644 index 1a7bee7..0000000 Binary files a/tests/invalid-x509/id:001260,src:001252,op:flip1,pos:356.der and /dev/null differ diff --git a/tests/invalid-x509/id:001261,src:001252,op:flip2,pos:356.der b/tests/invalid-x509/id:001261,src:001252,op:flip2,pos:356.der deleted file mode 100644 index 59978c4..0000000 Binary files a/tests/invalid-x509/id:001261,src:001252,op:flip2,pos:356.der and /dev/null differ diff --git a/tests/invalid-x509/id:001262,src:001252,op:int16,pos:355,val:+255.der b/tests/invalid-x509/id:001262,src:001252,op:int16,pos:355,val:+255.der deleted file mode 100644 index b0aba48..0000000 Binary files a/tests/invalid-x509/id:001262,src:001252,op:int16,pos:355,val:+255.der and /dev/null differ diff --git a/tests/invalid-x509/id:001264,src:001252,op:int32,pos:353,val:be:+1000.der b/tests/invalid-x509/id:001264,src:001252,op:int32,pos:353,val:be:+1000.der deleted file mode 100644 index 8c47445..0000000 Binary files a/tests/invalid-x509/id:001264,src:001252,op:int32,pos:353,val:be:+1000.der and /dev/null differ diff --git a/tests/invalid-x509/id:001265,src:001252,op:int32,pos:354,val:+255.der b/tests/invalid-x509/id:001265,src:001252,op:int32,pos:354,val:+255.der deleted file mode 100644 index 507b763..0000000 Binary files a/tests/invalid-x509/id:001265,src:001252,op:int32,pos:354,val:+255.der and /dev/null differ diff --git a/tests/invalid-x509/id:001266,src:001252,op:ext_AO,pos:355.der b/tests/invalid-x509/id:001266,src:001252,op:ext_AO,pos:355.der deleted file mode 100644 index dde7b0d..0000000 Binary files a/tests/invalid-x509/id:001266,src:001252,op:ext_AO,pos:355.der and /dev/null differ diff --git a/tests/invalid-x509/id:001267,src:001252,op:ext_AO,pos:356.der b/tests/invalid-x509/id:001267,src:001252,op:ext_AO,pos:356.der deleted file mode 100644 index b693bac..0000000 Binary files a/tests/invalid-x509/id:001267,src:001252,op:ext_AO,pos:356.der and /dev/null differ diff --git a/tests/invalid-x509/id:001270,src:001252,op:havoc,rep:8.der b/tests/invalid-x509/id:001270,src:001252,op:havoc,rep:8.der deleted file mode 100644 index f09be9b..0000000 Binary files a/tests/invalid-x509/id:001270,src:001252,op:havoc,rep:8.der and /dev/null differ diff --git a/tests/invalid-x509/id:001272,src:001254,op:flip1,pos:207.der b/tests/invalid-x509/id:001272,src:001254,op:flip1,pos:207.der deleted file mode 100644 index 0103c02..0000000 Binary files a/tests/invalid-x509/id:001272,src:001254,op:flip1,pos:207.der and /dev/null differ diff --git a/tests/invalid-x509/id:001273,src:001254,op:flip1,pos:278.der b/tests/invalid-x509/id:001273,src:001254,op:flip1,pos:278.der deleted file mode 100644 index a14c1e7..0000000 Binary files a/tests/invalid-x509/id:001273,src:001254,op:flip1,pos:278.der and /dev/null differ diff --git a/tests/invalid-x509/id:001274,src:001254,op:flip1,pos:279.der b/tests/invalid-x509/id:001274,src:001254,op:flip1,pos:279.der deleted file mode 100644 index a0bc684..0000000 Binary files a/tests/invalid-x509/id:001274,src:001254,op:flip1,pos:279.der and /dev/null differ diff --git a/tests/invalid-x509/id:001275,src:001254,op:flip1,pos:328.der b/tests/invalid-x509/id:001275,src:001254,op:flip1,pos:328.der deleted file mode 100644 index 3d96ca9..0000000 Binary files a/tests/invalid-x509/id:001275,src:001254,op:flip1,pos:328.der and /dev/null differ diff --git a/tests/invalid-x509/id:001276,src:001254,op:flip1,pos:344.der b/tests/invalid-x509/id:001276,src:001254,op:flip1,pos:344.der deleted file mode 100644 index 40356a7..0000000 Binary files a/tests/invalid-x509/id:001276,src:001254,op:flip1,pos:344.der and /dev/null differ diff --git a/tests/invalid-x509/id:001277,src:001254,op:flip1,pos:347.der b/tests/invalid-x509/id:001277,src:001254,op:flip1,pos:347.der deleted file mode 100644 index 5a3ef64..0000000 Binary files a/tests/invalid-x509/id:001277,src:001254,op:flip1,pos:347.der and /dev/null differ diff --git a/tests/invalid-x509/id:001278,src:001254,op:flip1,pos:353.der b/tests/invalid-x509/id:001278,src:001254,op:flip1,pos:353.der deleted file mode 100644 index e27303e..0000000 Binary files a/tests/invalid-x509/id:001278,src:001254,op:flip1,pos:353.der and /dev/null differ diff --git a/tests/invalid-x509/id:001279,src:001254,op:flip1,pos:353.der b/tests/invalid-x509/id:001279,src:001254,op:flip1,pos:353.der deleted file mode 100644 index c86a1d8..0000000 Binary files a/tests/invalid-x509/id:001279,src:001254,op:flip1,pos:353.der and /dev/null differ diff --git a/tests/invalid-x509/id:001280,src:001254,op:flip2,pos:353.der b/tests/invalid-x509/id:001280,src:001254,op:flip2,pos:353.der deleted file mode 100644 index 18051c9..0000000 Binary files a/tests/invalid-x509/id:001280,src:001254,op:flip2,pos:353.der and /dev/null differ diff --git a/tests/invalid-x509/id:001282,src:001254,op:arith8,pos:310,val:+7.der b/tests/invalid-x509/id:001282,src:001254,op:arith8,pos:310,val:+7.der deleted file mode 100644 index 9d4913b..0000000 Binary files a/tests/invalid-x509/id:001282,src:001254,op:arith8,pos:310,val:+7.der and /dev/null differ diff --git a/tests/invalid-x509/id:001286,src:001254,op:int32,pos:351,val:+255.der b/tests/invalid-x509/id:001286,src:001254,op:int32,pos:351,val:+255.der deleted file mode 100644 index f351421..0000000 Binary files a/tests/invalid-x509/id:001286,src:001254,op:int32,pos:351,val:+255.der and /dev/null differ diff --git a/tests/invalid-x509/id:001287,src:001254,op:havoc,rep:8.der b/tests/invalid-x509/id:001287,src:001254,op:havoc,rep:8.der deleted file mode 100644 index 78d6f48..0000000 Binary files a/tests/invalid-x509/id:001287,src:001254,op:havoc,rep:8.der and /dev/null differ diff --git a/tests/invalid-x509/id:001288,src:001254,op:havoc,rep:4.der b/tests/invalid-x509/id:001288,src:001254,op:havoc,rep:4.der deleted file mode 100644 index eadd68e..0000000 Binary files a/tests/invalid-x509/id:001288,src:001254,op:havoc,rep:4.der and /dev/null differ diff --git a/tests/invalid-x509/id:001289,src:001254,op:havoc,rep:4.der b/tests/invalid-x509/id:001289,src:001254,op:havoc,rep:4.der deleted file mode 100644 index b5c669a..0000000 Binary files a/tests/invalid-x509/id:001289,src:001254,op:havoc,rep:4.der and /dev/null differ diff --git a/tests/invalid-x509/id:001291,src:001255,op:flip1,pos:278.der b/tests/invalid-x509/id:001291,src:001255,op:flip1,pos:278.der deleted file mode 100644 index 0acb26e..0000000 Binary files a/tests/invalid-x509/id:001291,src:001255,op:flip1,pos:278.der and /dev/null differ diff --git a/tests/invalid-x509/id:001293,src:001255,op:int16,pos:356,val:-128.der b/tests/invalid-x509/id:001293,src:001255,op:int16,pos:356,val:-128.der deleted file mode 100644 index 1c8880e..0000000 Binary files a/tests/invalid-x509/id:001293,src:001255,op:int16,pos:356,val:-128.der and /dev/null differ diff --git a/tests/invalid-x509/id:001294,src:001271,op:flip1,pos:353.der b/tests/invalid-x509/id:001294,src:001271,op:flip1,pos:353.der deleted file mode 100644 index d2a5ad7..0000000 Binary files a/tests/invalid-x509/id:001294,src:001271,op:flip1,pos:353.der and /dev/null differ diff --git a/tests/invalid-x509/id:001298,src:001297,op:flip1,pos:207.der b/tests/invalid-x509/id:001298,src:001297,op:flip1,pos:207.der deleted file mode 100644 index bf2581a..0000000 Binary files a/tests/invalid-x509/id:001298,src:001297,op:flip1,pos:207.der and /dev/null differ diff --git a/tests/invalid-x509/id:001300,src:001297,op:flip1,pos:278.der b/tests/invalid-x509/id:001300,src:001297,op:flip1,pos:278.der deleted file mode 100644 index 3439afe..0000000 Binary files a/tests/invalid-x509/id:001300,src:001297,op:flip1,pos:278.der and /dev/null differ diff --git a/tests/invalid-x509/id:001302,src:001297,op:flip1,pos:347.der b/tests/invalid-x509/id:001302,src:001297,op:flip1,pos:347.der deleted file mode 100644 index 0e3d972..0000000 Binary files a/tests/invalid-x509/id:001302,src:001297,op:flip1,pos:347.der and /dev/null differ diff --git a/tests/invalid-x509/id:001303,src:001297,op:flip4,pos:344.der b/tests/invalid-x509/id:001303,src:001297,op:flip4,pos:344.der deleted file mode 100644 index 56e80b2..0000000 Binary files a/tests/invalid-x509/id:001303,src:001297,op:flip4,pos:344.der and /dev/null differ diff --git a/tests/invalid-x509/id:001304,src:001297,op:int16,pos:354,val:+128.der b/tests/invalid-x509/id:001304,src:001297,op:int16,pos:354,val:+128.der deleted file mode 100644 index 5b06911..0000000 Binary files a/tests/invalid-x509/id:001304,src:001297,op:int16,pos:354,val:+128.der and /dev/null differ diff --git a/tests/invalid-x509/id:001305,src:001297,op:int32,pos:349,val:be:+1024.der b/tests/invalid-x509/id:001305,src:001297,op:int32,pos:349,val:be:+1024.der deleted file mode 100644 index f5c38d0..0000000 Binary files a/tests/invalid-x509/id:001305,src:001297,op:int32,pos:349,val:be:+1024.der and /dev/null differ diff --git a/tests/invalid-x509/id:001306,src:001297,op:int32,pos:351,val:be:+512.der b/tests/invalid-x509/id:001306,src:001297,op:int32,pos:351,val:be:+512.der deleted file mode 100644 index 1b09c87..0000000 Binary files a/tests/invalid-x509/id:001306,src:001297,op:int32,pos:351,val:be:+512.der and /dev/null differ diff --git a/tests/invalid-x509/id:001308,src:001299,op:int16,pos:354,val:+128.der b/tests/invalid-x509/id:001308,src:001299,op:int16,pos:354,val:+128.der deleted file mode 100644 index 3151ce8..0000000 Binary files a/tests/invalid-x509/id:001308,src:001299,op:int16,pos:354,val:+128.der and /dev/null differ diff --git a/tests/invalid-x509/id:001310,src:001042,op:havoc,rep:8,+cov.der b/tests/invalid-x509/id:001310,src:001042,op:havoc,rep:8,+cov.der deleted file mode 100644 index 5ce3cdc..0000000 Binary files a/tests/invalid-x509/id:001310,src:001042,op:havoc,rep:8,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:001311,src:001227,op:flip1,pos:359.der b/tests/invalid-x509/id:001311,src:001227,op:flip1,pos:359.der deleted file mode 100644 index 9ff4990..0000000 Binary files a/tests/invalid-x509/id:001311,src:001227,op:flip1,pos:359.der and /dev/null differ diff --git a/tests/invalid-x509/id:001312,src:001227,op:flip4,pos:358.der b/tests/invalid-x509/id:001312,src:001227,op:flip4,pos:358.der deleted file mode 100644 index 6d66bae..0000000 Binary files a/tests/invalid-x509/id:001312,src:001227,op:flip4,pos:358.der and /dev/null differ diff --git a/tests/invalid-x509/id:001314,src:001310,op:flip1,pos:48,+cov.der b/tests/invalid-x509/id:001314,src:001310,op:flip1,pos:48,+cov.der deleted file mode 100644 index 0a238e0..0000000 Binary files a/tests/invalid-x509/id:001314,src:001310,op:flip1,pos:48,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:001315,src:001310,op:flip1,pos:403,+cov.der b/tests/invalid-x509/id:001315,src:001310,op:flip1,pos:403,+cov.der deleted file mode 100644 index 76ca324..0000000 Binary files a/tests/invalid-x509/id:001315,src:001310,op:flip1,pos:403,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:001316,src:001310,op:flip2,pos:48,+cov.der b/tests/invalid-x509/id:001316,src:001310,op:flip2,pos:48,+cov.der deleted file mode 100644 index bdeb74a..0000000 Binary files a/tests/invalid-x509/id:001316,src:001310,op:flip2,pos:48,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:001317,src:001310,op:int32,pos:401,val:be:-32768,+cov.der b/tests/invalid-x509/id:001317,src:001310,op:int32,pos:401,val:be:-32768,+cov.der deleted file mode 100644 index 763e167..0000000 Binary files a/tests/invalid-x509/id:001317,src:001310,op:int32,pos:401,val:be:-32768,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:001319,src:001314,op:flip1,pos:402,+cov.der b/tests/invalid-x509/id:001319,src:001314,op:flip1,pos:402,+cov.der deleted file mode 100644 index cef0616..0000000 Binary files a/tests/invalid-x509/id:001319,src:001314,op:flip1,pos:402,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:001320,src:001314,op:flip1,pos:402,+cov.der b/tests/invalid-x509/id:001320,src:001314,op:flip1,pos:402,+cov.der deleted file mode 100644 index 70e4275..0000000 Binary files a/tests/invalid-x509/id:001320,src:001314,op:flip1,pos:402,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:001321,src:001318,op:flip2,pos:752.der b/tests/invalid-x509/id:001321,src:001318,op:flip2,pos:752.der deleted file mode 100644 index 1addc2f..0000000 Binary files a/tests/invalid-x509/id:001321,src:001318,op:flip2,pos:752.der and /dev/null differ diff --git a/tests/invalid-x509/id:001322,src:000713,op:havoc,rep:4.der b/tests/invalid-x509/id:001322,src:000713,op:havoc,rep:4.der deleted file mode 100644 index 5f1a9e3..0000000 Binary files a/tests/invalid-x509/id:001322,src:000713,op:havoc,rep:4.der and /dev/null differ diff --git a/tests/invalid-x509/id:001323,src:000998,op:havoc,rep:16.der b/tests/invalid-x509/id:001323,src:000998,op:havoc,rep:16.der deleted file mode 100644 index eccb082..0000000 Binary files a/tests/invalid-x509/id:001323,src:000998,op:havoc,rep:16.der and /dev/null differ diff --git a/tests/invalid-x509/id:001325,src:000998,op:havoc,rep:4.der b/tests/invalid-x509/id:001325,src:000998,op:havoc,rep:4.der deleted file mode 100644 index 36cc5fc..0000000 Binary files a/tests/invalid-x509/id:001325,src:000998,op:havoc,rep:4.der and /dev/null differ diff --git a/tests/invalid-x509/id:001329,src:000998,op:havoc,rep:8.der b/tests/invalid-x509/id:001329,src:000998,op:havoc,rep:8.der deleted file mode 100644 index aeff168..0000000 Binary files a/tests/invalid-x509/id:001329,src:000998,op:havoc,rep:8.der and /dev/null differ diff --git a/tests/invalid-x509/id:001330,src:001026,op:flip1,pos:204.der b/tests/invalid-x509/id:001330,src:001026,op:flip1,pos:204.der deleted file mode 100644 index 5b62978..0000000 Binary files a/tests/invalid-x509/id:001330,src:001026,op:flip1,pos:204.der and /dev/null differ diff --git a/tests/invalid-x509/id:001331,src:001029,op:havoc,rep:16.der b/tests/invalid-x509/id:001331,src:001029,op:havoc,rep:16.der deleted file mode 100644 index 375787c..0000000 Binary files a/tests/invalid-x509/id:001331,src:001029,op:havoc,rep:16.der and /dev/null differ diff --git a/tests/invalid-x509/id:001334,src:001044,op:int16,pos:241,val:+0.der b/tests/invalid-x509/id:001334,src:001044,op:int16,pos:241,val:+0.der deleted file mode 100644 index f73fc17..0000000 Binary files a/tests/invalid-x509/id:001334,src:001044,op:int16,pos:241,val:+0.der and /dev/null differ diff --git a/tests/invalid-x509/id:001335,src:001074,op:int16,pos:227,val:+0.der b/tests/invalid-x509/id:001335,src:001074,op:int16,pos:227,val:+0.der deleted file mode 100644 index 3b6d12a..0000000 Binary files a/tests/invalid-x509/id:001335,src:001074,op:int16,pos:227,val:+0.der and /dev/null differ diff --git a/tests/invalid-x509/id:001340,src:001120,op:havoc,rep:2,+cov.der b/tests/invalid-x509/id:001340,src:001120,op:havoc,rep:2,+cov.der deleted file mode 100644 index f6d29ad..0000000 Binary files a/tests/invalid-x509/id:001340,src:001120,op:havoc,rep:2,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:001341,src:001120,op:havoc,rep:2,+cov.der b/tests/invalid-x509/id:001341,src:001120,op:havoc,rep:2,+cov.der deleted file mode 100644 index 514a681..0000000 Binary files a/tests/invalid-x509/id:001341,src:001120,op:havoc,rep:2,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:001342,src:001120,op:havoc,rep:4,+cov.der b/tests/invalid-x509/id:001342,src:001120,op:havoc,rep:4,+cov.der deleted file mode 100644 index de736c9..0000000 Binary files a/tests/invalid-x509/id:001342,src:001120,op:havoc,rep:4,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:001343,src:001120,op:havoc,rep:2,+cov.der b/tests/invalid-x509/id:001343,src:001120,op:havoc,rep:2,+cov.der deleted file mode 100644 index b63a484..0000000 Binary files a/tests/invalid-x509/id:001343,src:001120,op:havoc,rep:2,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:001344,src:001120,op:havoc,rep:2,+cov.der b/tests/invalid-x509/id:001344,src:001120,op:havoc,rep:2,+cov.der deleted file mode 100644 index 27f5457..0000000 Binary files a/tests/invalid-x509/id:001344,src:001120,op:havoc,rep:2,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:001350,src:000891,op:havoc,rep:2.der b/tests/invalid-x509/id:001350,src:000891,op:havoc,rep:2.der deleted file mode 100644 index 3ba82d3..0000000 Binary files a/tests/invalid-x509/id:001350,src:000891,op:havoc,rep:2.der and /dev/null differ diff --git a/tests/invalid-x509/id:001351,src:001002,op:havoc,rep:8.der b/tests/invalid-x509/id:001351,src:001002,op:havoc,rep:8.der deleted file mode 100644 index 8ae7746..0000000 Binary files a/tests/invalid-x509/id:001351,src:001002,op:havoc,rep:8.der and /dev/null differ diff --git a/tests/invalid-x509/id:001352,src:001250,op:flip1,pos:207.der b/tests/invalid-x509/id:001352,src:001250,op:flip1,pos:207.der deleted file mode 100644 index 2d06a2e..0000000 Binary files a/tests/invalid-x509/id:001352,src:001250,op:flip1,pos:207.der and /dev/null differ diff --git a/tests/invalid-x509/id:001353,src:001250,op:flip1,pos:278.der b/tests/invalid-x509/id:001353,src:001250,op:flip1,pos:278.der deleted file mode 100644 index 1d3cdfb..0000000 Binary files a/tests/invalid-x509/id:001353,src:001250,op:flip1,pos:278.der and /dev/null differ diff --git a/tests/invalid-x509/id:001354,src:001250,op:flip1,pos:347.der b/tests/invalid-x509/id:001354,src:001250,op:flip1,pos:347.der deleted file mode 100644 index 3fd4a2a..0000000 Binary files a/tests/invalid-x509/id:001354,src:001250,op:flip1,pos:347.der and /dev/null differ diff --git a/tests/invalid-x509/id:001355,src:001351,op:flip1,pos:88.der b/tests/invalid-x509/id:001355,src:001351,op:flip1,pos:88.der deleted file mode 100644 index 5afddeb..0000000 Binary files a/tests/invalid-x509/id:001355,src:001351,op:flip1,pos:88.der and /dev/null differ diff --git a/tests/invalid-x509/id:001356,src:001133,op:flip4,pos:552.der b/tests/invalid-x509/id:001356,src:001133,op:flip4,pos:552.der deleted file mode 100644 index 72ecedf..0000000 Binary files a/tests/invalid-x509/id:001356,src:001133,op:flip4,pos:552.der and /dev/null differ diff --git a/tests/invalid-x509/id:001357,src:001185,op:havoc,rep:8.der b/tests/invalid-x509/id:001357,src:001185,op:havoc,rep:8.der deleted file mode 100644 index 37d6737..0000000 Binary files a/tests/invalid-x509/id:001357,src:001185,op:havoc,rep:8.der and /dev/null differ diff --git a/tests/invalid-x509/id:001358,src:001187,op:havoc,rep:8.der b/tests/invalid-x509/id:001358,src:001187,op:havoc,rep:8.der deleted file mode 100644 index 9d905f2..0000000 Binary files a/tests/invalid-x509/id:001358,src:001187,op:havoc,rep:8.der and /dev/null differ diff --git a/tests/invalid-x509/id:001359,src:001206,op:havoc,rep:8.der b/tests/invalid-x509/id:001359,src:001206,op:havoc,rep:8.der deleted file mode 100644 index 8c0ac1c..0000000 Binary files a/tests/invalid-x509/id:001359,src:001206,op:havoc,rep:8.der and /dev/null differ diff --git a/tests/invalid-x509/id:001360,src:001206,op:havoc,rep:8.der b/tests/invalid-x509/id:001360,src:001206,op:havoc,rep:8.der deleted file mode 100644 index 1e4ea82..0000000 Binary files a/tests/invalid-x509/id:001360,src:001206,op:havoc,rep:8.der and /dev/null differ diff --git a/tests/invalid-x509/id:001361,src:001208,op:flip2,pos:200.der b/tests/invalid-x509/id:001361,src:001208,op:flip2,pos:200.der deleted file mode 100644 index fd176cd..0000000 Binary files a/tests/invalid-x509/id:001361,src:001208,op:flip2,pos:200.der and /dev/null differ diff --git a/tests/invalid-x509/id:001362,src:001208,op:int32,pos:205,val:+255.der b/tests/invalid-x509/id:001362,src:001208,op:int32,pos:205,val:+255.der deleted file mode 100644 index 0635841..0000000 Binary files a/tests/invalid-x509/id:001362,src:001208,op:int32,pos:205,val:+255.der and /dev/null differ diff --git a/tests/invalid-x509/id:001365,src:001221,op:int16,pos:114,val:+0.der b/tests/invalid-x509/id:001365,src:001221,op:int16,pos:114,val:+0.der deleted file mode 100644 index 590a24a..0000000 Binary files a/tests/invalid-x509/id:001365,src:001221,op:int16,pos:114,val:+0.der and /dev/null differ diff --git a/tests/invalid-x509/id:001366,src:001221,op:int32,pos:113,val:+0.der b/tests/invalid-x509/id:001366,src:001221,op:int32,pos:113,val:+0.der deleted file mode 100644 index f6afaa1..0000000 Binary files a/tests/invalid-x509/id:001366,src:001221,op:int32,pos:113,val:+0.der and /dev/null differ diff --git a/tests/invalid-x509/id:001367,src:001221,op:int32,pos:114,val:+0.der b/tests/invalid-x509/id:001367,src:001221,op:int32,pos:114,val:+0.der deleted file mode 100644 index 1646823..0000000 Binary files a/tests/invalid-x509/id:001367,src:001221,op:int32,pos:114,val:+0.der and /dev/null differ diff --git a/tests/invalid-x509/id:001370,src:001232,op:flip4,pos:358.der b/tests/invalid-x509/id:001370,src:001232,op:flip4,pos:358.der deleted file mode 100644 index 3c31eff..0000000 Binary files a/tests/invalid-x509/id:001370,src:001232,op:flip4,pos:358.der and /dev/null differ diff --git a/tests/invalid-x509/id:001371,src:001232,op:havoc,rep:4,+cov.der b/tests/invalid-x509/id:001371,src:001232,op:havoc,rep:4,+cov.der deleted file mode 100644 index 32b341c..0000000 Binary files a/tests/invalid-x509/id:001371,src:001232,op:havoc,rep:4,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:001372,src:001232,op:havoc,rep:4.der b/tests/invalid-x509/id:001372,src:001232,op:havoc,rep:4.der deleted file mode 100644 index a7f8c57..0000000 Binary files a/tests/invalid-x509/id:001372,src:001232,op:havoc,rep:4.der and /dev/null differ diff --git a/tests/invalid-x509/id:001375,src:001122,op:flip2,pos:502.der b/tests/invalid-x509/id:001375,src:001122,op:flip2,pos:502.der deleted file mode 100644 index 250288d..0000000 Binary files a/tests/invalid-x509/id:001375,src:001122,op:flip2,pos:502.der and /dev/null differ diff --git a/tests/invalid-x509/id:001379,src:001144,op:havoc,rep:16.der b/tests/invalid-x509/id:001379,src:001144,op:havoc,rep:16.der deleted file mode 100644 index 5eb9bc8..0000000 Binary files a/tests/invalid-x509/id:001379,src:001144,op:havoc,rep:16.der and /dev/null differ diff --git a/tests/invalid-x509/id:001380,src:001144,op:havoc,rep:32.der b/tests/invalid-x509/id:001380,src:001144,op:havoc,rep:32.der deleted file mode 100644 index 3d38fda..0000000 Binary files a/tests/invalid-x509/id:001380,src:001144,op:havoc,rep:32.der and /dev/null differ diff --git a/tests/invalid-x509/id:001381,src:001144,op:havoc,rep:32.der b/tests/invalid-x509/id:001381,src:001144,op:havoc,rep:32.der deleted file mode 100644 index e5121df..0000000 Binary files a/tests/invalid-x509/id:001381,src:001144,op:havoc,rep:32.der and /dev/null differ diff --git a/tests/invalid-x509/id:001382,src:001231,op:flip4,pos:358.der b/tests/invalid-x509/id:001382,src:001231,op:flip4,pos:358.der deleted file mode 100644 index 1aeff71..0000000 Binary files a/tests/invalid-x509/id:001382,src:001231,op:flip4,pos:358.der and /dev/null differ diff --git a/tests/invalid-x509/id:001383,src:001235,op:flip4,pos:358.der b/tests/invalid-x509/id:001383,src:001235,op:flip4,pos:358.der deleted file mode 100644 index 71cefc8..0000000 Binary files a/tests/invalid-x509/id:001383,src:001235,op:flip4,pos:358.der and /dev/null differ diff --git a/tests/invalid-x509/id:001385,src:001240,op:flip1,pos:356.der b/tests/invalid-x509/id:001385,src:001240,op:flip1,pos:356.der deleted file mode 100644 index 1a98b64..0000000 Binary files a/tests/invalid-x509/id:001385,src:001240,op:flip1,pos:356.der and /dev/null differ diff --git a/tests/invalid-x509/id:001386,src:001240,op:ext_AO,pos:356.der b/tests/invalid-x509/id:001386,src:001240,op:ext_AO,pos:356.der deleted file mode 100644 index 0a60ae1..0000000 Binary files a/tests/invalid-x509/id:001386,src:001240,op:ext_AO,pos:356.der and /dev/null differ diff --git a/tests/invalid-x509/id:001389,src:001242,op:int16,pos:272,val:be:+512.der b/tests/invalid-x509/id:001389,src:001242,op:int16,pos:272,val:be:+512.der deleted file mode 100644 index 838a270..0000000 Binary files a/tests/invalid-x509/id:001389,src:001242,op:int16,pos:272,val:be:+512.der and /dev/null differ diff --git a/tests/invalid-x509/id:001390,src:001242,op:int16,pos:355,val:+255.der b/tests/invalid-x509/id:001390,src:001242,op:int16,pos:355,val:+255.der deleted file mode 100644 index 4b8d80e..0000000 Binary files a/tests/invalid-x509/id:001390,src:001242,op:int16,pos:355,val:+255.der and /dev/null differ diff --git a/tests/invalid-x509/id:001391,src:001242,op:int32,pos:354,val:+255.der b/tests/invalid-x509/id:001391,src:001242,op:int32,pos:354,val:+255.der deleted file mode 100644 index 3f11e25..0000000 Binary files a/tests/invalid-x509/id:001391,src:001242,op:int32,pos:354,val:+255.der and /dev/null differ diff --git a/tests/invalid-x509/id:001392,src:001242,op:ext_AO,pos:356.der b/tests/invalid-x509/id:001392,src:001242,op:ext_AO,pos:356.der deleted file mode 100644 index 157c008..0000000 Binary files a/tests/invalid-x509/id:001392,src:001242,op:ext_AO,pos:356.der and /dev/null differ diff --git a/tests/invalid-x509/id:001393,src:001245,op:flip1,pos:356.der b/tests/invalid-x509/id:001393,src:001245,op:flip1,pos:356.der deleted file mode 100644 index 1efae5f..0000000 Binary files a/tests/invalid-x509/id:001393,src:001245,op:flip1,pos:356.der and /dev/null differ diff --git a/tests/invalid-x509/id:001394,src:001245,op:flip1,pos:356.der b/tests/invalid-x509/id:001394,src:001245,op:flip1,pos:356.der deleted file mode 100644 index 2a871bb..0000000 Binary files a/tests/invalid-x509/id:001394,src:001245,op:flip1,pos:356.der and /dev/null differ diff --git a/tests/invalid-x509/id:001395,src:001245,op:ext_AO,pos:356.der b/tests/invalid-x509/id:001395,src:001245,op:ext_AO,pos:356.der deleted file mode 100644 index 7179ed0..0000000 Binary files a/tests/invalid-x509/id:001395,src:001245,op:ext_AO,pos:356.der and /dev/null differ diff --git a/tests/invalid-x509/id:001396,src:001257,op:flip4,pos:344.der b/tests/invalid-x509/id:001396,src:001257,op:flip4,pos:344.der deleted file mode 100644 index 53f51e4..0000000 Binary files a/tests/invalid-x509/id:001396,src:001257,op:flip4,pos:344.der and /dev/null differ diff --git a/tests/invalid-x509/id:001397,src:001257,op:int16,pos:357,val:-128.der b/tests/invalid-x509/id:001397,src:001257,op:int16,pos:357,val:-128.der deleted file mode 100644 index 20679b6..0000000 Binary files a/tests/invalid-x509/id:001397,src:001257,op:int16,pos:357,val:-128.der and /dev/null differ diff --git a/tests/invalid-x509/id:001398,src:001266,op:int16,pos:357,val:-128.der b/tests/invalid-x509/id:001398,src:001266,op:int16,pos:357,val:-128.der deleted file mode 100644 index ec461af..0000000 Binary files a/tests/invalid-x509/id:001398,src:001266,op:int16,pos:357,val:-128.der and /dev/null differ diff --git a/tests/invalid-x509/id:001400,src:001267,op:flip1,pos:279.der b/tests/invalid-x509/id:001400,src:001267,op:flip1,pos:279.der deleted file mode 100644 index bce098e..0000000 Binary files a/tests/invalid-x509/id:001400,src:001267,op:flip1,pos:279.der and /dev/null differ diff --git a/tests/invalid-x509/id:001401,src:001267,op:int16,pos:358,val:-128.der b/tests/invalid-x509/id:001401,src:001267,op:int16,pos:358,val:-128.der deleted file mode 100644 index 7d3ca40..0000000 Binary files a/tests/invalid-x509/id:001401,src:001267,op:int16,pos:358,val:-128.der and /dev/null differ diff --git a/tests/invalid-x509/id:001402,src:001279,op:flip1,pos:278.der b/tests/invalid-x509/id:001402,src:001279,op:flip1,pos:278.der deleted file mode 100644 index 8cfe556..0000000 Binary files a/tests/invalid-x509/id:001402,src:001279,op:flip1,pos:278.der and /dev/null differ diff --git a/tests/invalid-x509/id:001403,src:001279,op:flip1,pos:328.der b/tests/invalid-x509/id:001403,src:001279,op:flip1,pos:328.der deleted file mode 100644 index 25895b0..0000000 Binary files a/tests/invalid-x509/id:001403,src:001279,op:flip1,pos:328.der and /dev/null differ diff --git a/tests/invalid-x509/id:001404,src:001303,op:havoc,rep:8.der b/tests/invalid-x509/id:001404,src:001303,op:havoc,rep:8.der deleted file mode 100644 index 366c501..0000000 Binary files a/tests/invalid-x509/id:001404,src:001303,op:havoc,rep:8.der and /dev/null differ diff --git a/tests/invalid-x509/id:001405,src:001404,op:flip1,pos:198.der b/tests/invalid-x509/id:001405,src:001404,op:flip1,pos:198.der deleted file mode 100644 index 0e93c14..0000000 Binary files a/tests/invalid-x509/id:001405,src:001404,op:flip1,pos:198.der and /dev/null differ diff --git a/tests/invalid-x509/id:001407,src:001406,op:flip1,pos:209.der b/tests/invalid-x509/id:001407,src:001406,op:flip1,pos:209.der deleted file mode 100644 index e2efdb3..0000000 Binary files a/tests/invalid-x509/id:001407,src:001406,op:flip1,pos:209.der and /dev/null differ diff --git a/tests/invalid-x509/id:001408,src:001406,op:flip16,pos:209.der b/tests/invalid-x509/id:001408,src:001406,op:flip16,pos:209.der deleted file mode 100644 index a0625b1..0000000 Binary files a/tests/invalid-x509/id:001408,src:001406,op:flip16,pos:209.der and /dev/null differ diff --git a/tests/invalid-x509/id:001409,src:000748,op:int32,pos:38,val:+0.der b/tests/invalid-x509/id:001409,src:000748,op:int32,pos:38,val:+0.der deleted file mode 100644 index 4cf0c97..0000000 Binary files a/tests/invalid-x509/id:001409,src:000748,op:int32,pos:38,val:+0.der and /dev/null differ diff --git a/tests/invalid-x509/id:001410,src:000748,op:int32,pos:48,val:+0.der b/tests/invalid-x509/id:001410,src:000748,op:int32,pos:48,val:+0.der deleted file mode 100644 index c6ab5b9..0000000 Binary files a/tests/invalid-x509/id:001410,src:000748,op:int32,pos:48,val:+0.der and /dev/null differ diff --git a/tests/invalid-x509/id:001411,src:000979,op:havoc,rep:2.der b/tests/invalid-x509/id:001411,src:000979,op:havoc,rep:2.der deleted file mode 100644 index ab9db83..0000000 Binary files a/tests/invalid-x509/id:001411,src:000979,op:havoc,rep:2.der and /dev/null differ diff --git a/tests/invalid-x509/id:001413,src:001222,op:havoc,rep:64.der b/tests/invalid-x509/id:001413,src:001222,op:havoc,rep:64.der deleted file mode 100644 index 5c451dc..0000000 Binary files a/tests/invalid-x509/id:001413,src:001222,op:havoc,rep:64.der and /dev/null differ diff --git a/tests/invalid-x509/id:001414,src:001237,op:flip4,pos:358.der b/tests/invalid-x509/id:001414,src:001237,op:flip4,pos:358.der deleted file mode 100644 index 07625ce..0000000 Binary files a/tests/invalid-x509/id:001414,src:001237,op:flip4,pos:358.der and /dev/null differ diff --git a/tests/invalid-x509/id:001415,src:001258,op:int16,pos:358,val:-128.der b/tests/invalid-x509/id:001415,src:001258,op:int16,pos:358,val:-128.der deleted file mode 100644 index 08e36ab..0000000 Binary files a/tests/invalid-x509/id:001415,src:001258,op:int16,pos:358,val:-128.der and /dev/null differ diff --git a/tests/invalid-x509/id:001416,src:001297,op:havoc,rep:8.der b/tests/invalid-x509/id:001416,src:001297,op:havoc,rep:8.der deleted file mode 100644 index 0de881f..0000000 Binary files a/tests/invalid-x509/id:001416,src:001297,op:havoc,rep:8.der and /dev/null differ diff --git a/tests/invalid-x509/id:001417,src:001314,op:havoc,rep:2,+cov.der b/tests/invalid-x509/id:001417,src:001314,op:havoc,rep:2,+cov.der deleted file mode 100644 index 3c7fd28..0000000 Binary files a/tests/invalid-x509/id:001417,src:001314,op:havoc,rep:2,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:001418,src:001314,op:havoc,rep:2,+cov.der b/tests/invalid-x509/id:001418,src:001314,op:havoc,rep:2,+cov.der deleted file mode 100644 index ba8fc8d..0000000 Binary files a/tests/invalid-x509/id:001418,src:001314,op:havoc,rep:2,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:001419,src:001411,op:flip1,pos:204.der b/tests/invalid-x509/id:001419,src:001411,op:flip1,pos:204.der deleted file mode 100644 index e29a382..0000000 Binary files a/tests/invalid-x509/id:001419,src:001411,op:flip1,pos:204.der and /dev/null differ diff --git a/tests/invalid-x509/id:001420,src:001411,op:havoc,rep:2.der b/tests/invalid-x509/id:001420,src:001411,op:havoc,rep:2.der deleted file mode 100644 index fd7b484..0000000 Binary files a/tests/invalid-x509/id:001420,src:001411,op:havoc,rep:2.der and /dev/null differ diff --git a/tests/invalid-x509/id:001421,src:001147,op:havoc,rep:8.der b/tests/invalid-x509/id:001421,src:001147,op:havoc,rep:8.der deleted file mode 100644 index 6fe5698..0000000 Binary files a/tests/invalid-x509/id:001421,src:001147,op:havoc,rep:8.der and /dev/null differ diff --git a/tests/invalid-x509/id:001422,src:001147,op:havoc,rep:8.der b/tests/invalid-x509/id:001422,src:001147,op:havoc,rep:8.der deleted file mode 100644 index 08023b6..0000000 Binary files a/tests/invalid-x509/id:001422,src:001147,op:havoc,rep:8.der and /dev/null differ diff --git a/tests/invalid-x509/id:001424,src:001324,op:int16,pos:21,val:+256.der b/tests/invalid-x509/id:001424,src:001324,op:int16,pos:21,val:+256.der deleted file mode 100644 index 257473d..0000000 Binary files a/tests/invalid-x509/id:001424,src:001324,op:int16,pos:21,val:+256.der and /dev/null differ diff --git a/tests/invalid-x509/id:001429,src:001324,op:havoc,rep:2.der b/tests/invalid-x509/id:001429,src:001324,op:havoc,rep:2.der deleted file mode 100644 index 8f4135e..0000000 Binary files a/tests/invalid-x509/id:001429,src:001324,op:havoc,rep:2.der and /dev/null differ diff --git a/tests/invalid-x509/id:001432,src:001326,op:havoc,rep:4.der b/tests/invalid-x509/id:001432,src:001326,op:havoc,rep:4.der deleted file mode 100644 index bed0141..0000000 Binary files a/tests/invalid-x509/id:001432,src:001326,op:havoc,rep:4.der and /dev/null differ diff --git a/tests/invalid-x509/id:001433,src:001334,op:havoc,rep:16.der b/tests/invalid-x509/id:001433,src:001334,op:havoc,rep:16.der deleted file mode 100644 index 89a6df5..0000000 Binary files a/tests/invalid-x509/id:001433,src:001334,op:havoc,rep:16.der and /dev/null differ diff --git a/tests/invalid-x509/id:001434,src:001350,op:havoc,rep:8.der b/tests/invalid-x509/id:001434,src:001350,op:havoc,rep:8.der deleted file mode 100644 index d406bd0..0000000 Binary files a/tests/invalid-x509/id:001434,src:001350,op:havoc,rep:8.der and /dev/null differ diff --git a/tests/invalid-x509/id:001435,src:001357,op:havoc,rep:8.der b/tests/invalid-x509/id:001435,src:001357,op:havoc,rep:8.der deleted file mode 100644 index 2977b46..0000000 Binary files a/tests/invalid-x509/id:001435,src:001357,op:havoc,rep:8.der and /dev/null differ diff --git a/tests/invalid-x509/id:001436,src:001360,op:havoc,rep:8.der b/tests/invalid-x509/id:001436,src:001360,op:havoc,rep:8.der deleted file mode 100644 index 170ebf9..0000000 Binary files a/tests/invalid-x509/id:001436,src:001360,op:havoc,rep:8.der and /dev/null differ diff --git a/tests/invalid-x509/id:001437,src:001369,op:havoc,rep:4.der b/tests/invalid-x509/id:001437,src:001369,op:havoc,rep:4.der deleted file mode 100644 index d46fefe..0000000 Binary files a/tests/invalid-x509/id:001437,src:001369,op:havoc,rep:4.der and /dev/null differ diff --git a/tests/invalid-x509/id:001439,src:001379,op:havoc,rep:16.der b/tests/invalid-x509/id:001439,src:001379,op:havoc,rep:16.der deleted file mode 100644 index e03de22..0000000 Binary files a/tests/invalid-x509/id:001439,src:001379,op:havoc,rep:16.der and /dev/null differ diff --git a/tests/invalid-x509/id:001440,src:001386,op:int16,pos:358,val:-128.der b/tests/invalid-x509/id:001440,src:001386,op:int16,pos:358,val:-128.der deleted file mode 100644 index 9f34f97..0000000 Binary files a/tests/invalid-x509/id:001440,src:001386,op:int16,pos:358,val:-128.der and /dev/null differ diff --git a/tests/invalid-x509/id:001441,src:001400,op:int16,pos:358,val:-128.der b/tests/invalid-x509/id:001441,src:001400,op:int16,pos:358,val:-128.der deleted file mode 100644 index 3d35fd3..0000000 Binary files a/tests/invalid-x509/id:001441,src:001400,op:int16,pos:358,val:-128.der and /dev/null differ diff --git a/tests/invalid-x509/id:001442,src:001401,op:flip1,pos:310.der b/tests/invalid-x509/id:001442,src:001401,op:flip1,pos:310.der deleted file mode 100644 index 54508e3..0000000 Binary files a/tests/invalid-x509/id:001442,src:001401,op:flip1,pos:310.der and /dev/null differ diff --git a/tests/invalid-x509/id:001443,src:001405,op:havoc,rep:4.der b/tests/invalid-x509/id:001443,src:001405,op:havoc,rep:4.der deleted file mode 100644 index d97a40c..0000000 Binary files a/tests/invalid-x509/id:001443,src:001405,op:havoc,rep:4.der and /dev/null differ diff --git a/tests/invalid-x509/id:001445,src:001429,op:havoc,rep:2.der b/tests/invalid-x509/id:001445,src:001429,op:havoc,rep:2.der deleted file mode 100644 index 964b5cd..0000000 Binary files a/tests/invalid-x509/id:001445,src:001429,op:havoc,rep:2.der and /dev/null differ diff --git a/tests/invalid-x509/id:001454,src:001444,op:havoc,rep:4.der b/tests/invalid-x509/id:001454,src:001444,op:havoc,rep:4.der deleted file mode 100644 index c737399..0000000 Binary files a/tests/invalid-x509/id:001454,src:001444,op:havoc,rep:4.der and /dev/null differ diff --git a/tests/invalid-x509/id:001461,src:001218,op:int8,pos:196,val:-128.der b/tests/invalid-x509/id:001461,src:001218,op:int8,pos:196,val:-128.der deleted file mode 100644 index 7466905..0000000 Binary files a/tests/invalid-x509/id:001461,src:001218,op:int8,pos:196,val:-128.der and /dev/null differ diff --git a/tests/invalid-x509/id:001462,src:001461,op:flip1,pos:234.der b/tests/invalid-x509/id:001462,src:001461,op:flip1,pos:234.der deleted file mode 100644 index 78490f5..0000000 Binary files a/tests/invalid-x509/id:001462,src:001461,op:flip1,pos:234.der and /dev/null differ diff --git a/tests/invalid-x509/id:001463,src:001335,op:int32,pos:144,val:+32768.der b/tests/invalid-x509/id:001463,src:001335,op:int32,pos:144,val:+32768.der deleted file mode 100644 index 69c0453..0000000 Binary files a/tests/invalid-x509/id:001463,src:001335,op:int32,pos:144,val:+32768.der and /dev/null differ diff --git a/tests/invalid-x509/id:001464,src:001349,op:havoc,rep:2.der b/tests/invalid-x509/id:001464,src:001349,op:havoc,rep:2.der deleted file mode 100644 index 97d11e4..0000000 Binary files a/tests/invalid-x509/id:001464,src:001349,op:havoc,rep:2.der and /dev/null differ diff --git a/tests/invalid-x509/id:001465,src:001349,op:havoc,rep:64.der b/tests/invalid-x509/id:001465,src:001349,op:havoc,rep:64.der deleted file mode 100644 index 5a4dfa3..0000000 Binary files a/tests/invalid-x509/id:001465,src:001349,op:havoc,rep:64.der and /dev/null differ diff --git a/tests/invalid-x509/id:001466,src:001406,op:havoc,rep:4.der b/tests/invalid-x509/id:001466,src:001406,op:havoc,rep:4.der deleted file mode 100644 index bba1dc1..0000000 Binary files a/tests/invalid-x509/id:001466,src:001406,op:havoc,rep:4.der and /dev/null differ diff --git a/tests/invalid-x509/id:001467,src:001414,op:flip2,pos:347.der b/tests/invalid-x509/id:001467,src:001414,op:flip2,pos:347.der deleted file mode 100644 index 8c28aa8..0000000 Binary files a/tests/invalid-x509/id:001467,src:001414,op:flip2,pos:347.der and /dev/null differ diff --git a/tests/invalid-x509/id:001469,src:000679,op:havoc,rep:2,+cov.der b/tests/invalid-x509/id:001469,src:000679,op:havoc,rep:2,+cov.der deleted file mode 100644 index dde15ef..0000000 Binary files a/tests/invalid-x509/id:001469,src:000679,op:havoc,rep:2,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:001476,src:001209,op:int8,pos:232,val:+127,+cov.der b/tests/invalid-x509/id:001476,src:001209,op:int8,pos:232,val:+127,+cov.der deleted file mode 100644 index 93f1607..0000000 Binary files a/tests/invalid-x509/id:001476,src:001209,op:int8,pos:232,val:+127,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:001478,src:001215,op:int32,pos:502,val:-32768.der b/tests/invalid-x509/id:001478,src:001215,op:int32,pos:502,val:-32768.der deleted file mode 100644 index ebc5861..0000000 Binary files a/tests/invalid-x509/id:001478,src:001215,op:int32,pos:502,val:-32768.der and /dev/null differ diff --git a/tests/invalid-x509/id:001479,src:001348,op:havoc,rep:16.der b/tests/invalid-x509/id:001479,src:001348,op:havoc,rep:16.der deleted file mode 100644 index dd170ed..0000000 Binary files a/tests/invalid-x509/id:001479,src:001348,op:havoc,rep:16.der and /dev/null differ diff --git a/tests/invalid-x509/id:001480,src:001404,op:havoc,rep:8.der b/tests/invalid-x509/id:001480,src:001404,op:havoc,rep:8.der deleted file mode 100644 index f4c8ccc..0000000 Binary files a/tests/invalid-x509/id:001480,src:001404,op:havoc,rep:8.der and /dev/null differ diff --git a/tests/invalid-x509/id:001481,src:001346,op:havoc,rep:4,+cov.der b/tests/invalid-x509/id:001481,src:001346,op:havoc,rep:4,+cov.der deleted file mode 100644 index 7bb6535..0000000 Binary files a/tests/invalid-x509/id:001481,src:001346,op:havoc,rep:4,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:001482,src:001468,op:havoc,rep:32.der b/tests/invalid-x509/id:001482,src:001468,op:havoc,rep:32.der deleted file mode 100644 index 33bbc27..0000000 Binary files a/tests/invalid-x509/id:001482,src:001468,op:havoc,rep:32.der and /dev/null differ diff --git a/tests/invalid-x509/id:001483,src:001481,op:flip1,pos:7,+cov.der b/tests/invalid-x509/id:001483,src:001481,op:flip1,pos:7,+cov.der deleted file mode 100644 index e25fa60..0000000 Binary files a/tests/invalid-x509/id:001483,src:001481,op:flip1,pos:7,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:001484,src:001481,op:flip1,pos:7,+cov.der b/tests/invalid-x509/id:001484,src:001481,op:flip1,pos:7,+cov.der deleted file mode 100644 index 35659d7..0000000 Binary files a/tests/invalid-x509/id:001484,src:001481,op:flip1,pos:7,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:001485,src:001481,op:flip2,pos:7,+cov.der b/tests/invalid-x509/id:001485,src:001481,op:flip2,pos:7,+cov.der deleted file mode 100644 index eded26a..0000000 Binary files a/tests/invalid-x509/id:001485,src:001481,op:flip2,pos:7,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:001486,src:001481,op:havoc,rep:4,+cov.der b/tests/invalid-x509/id:001486,src:001481,op:havoc,rep:4,+cov.der deleted file mode 100644 index 0735c67..0000000 Binary files a/tests/invalid-x509/id:001486,src:001481,op:havoc,rep:4,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:001487,src:001481,op:havoc,rep:2,+cov.der b/tests/invalid-x509/id:001487,src:001481,op:havoc,rep:2,+cov.der deleted file mode 100644 index fd7ef13..0000000 Binary files a/tests/invalid-x509/id:001487,src:001481,op:havoc,rep:2,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:001488,src:001481,op:havoc,rep:2,+cov.der b/tests/invalid-x509/id:001488,src:001481,op:havoc,rep:2,+cov.der deleted file mode 100644 index ac674f4..0000000 Binary files a/tests/invalid-x509/id:001488,src:001481,op:havoc,rep:2,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:001489,src:001481,op:havoc,rep:2,+cov.der b/tests/invalid-x509/id:001489,src:001481,op:havoc,rep:2,+cov.der deleted file mode 100644 index 37eaf51..0000000 Binary files a/tests/invalid-x509/id:001489,src:001481,op:havoc,rep:2,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:001491,src:001211,op:flip1,pos:24.der b/tests/invalid-x509/id:001491,src:001211,op:flip1,pos:24.der deleted file mode 100644 index 5b0148a..0000000 Binary files a/tests/invalid-x509/id:001491,src:001211,op:flip1,pos:24.der and /dev/null differ diff --git a/tests/invalid-x509/id:001492,src:001211,op:flip1,pos:230.der b/tests/invalid-x509/id:001492,src:001211,op:flip1,pos:230.der deleted file mode 100644 index 28fce92..0000000 Binary files a/tests/invalid-x509/id:001492,src:001211,op:flip1,pos:230.der and /dev/null differ diff --git a/tests/invalid-x509/id:001498,src:001439,op:havoc,rep:4.der b/tests/invalid-x509/id:001498,src:001439,op:havoc,rep:4.der deleted file mode 100644 index 9273d3a..0000000 Binary files a/tests/invalid-x509/id:001498,src:001439,op:havoc,rep:4.der and /dev/null differ diff --git a/tests/invalid-x509/id:001499,src:001450,op:havoc,rep:8.der b/tests/invalid-x509/id:001499,src:001450,op:havoc,rep:8.der deleted file mode 100644 index 69efdce..0000000 --- a/tests/invalid-x509/id:001499,src:001450,op:havoc,rep:8.der +++ /dev/null @@ -1 +0,0 @@ -00>v癞 \ No newline at end of file diff --git a/tests/invalid-x509/id:001500,src:001452,op:havoc,rep:32.der b/tests/invalid-x509/id:001500,src:001452,op:havoc,rep:32.der deleted file mode 100644 index 85c6fb7..0000000 Binary files a/tests/invalid-x509/id:001500,src:001452,op:havoc,rep:32.der and /dev/null differ diff --git a/tests/invalid-x509/id:001501,src:001469,op:havoc,rep:2,+cov.der b/tests/invalid-x509/id:001501,src:001469,op:havoc,rep:2,+cov.der deleted file mode 100644 index 376be3a..0000000 Binary files a/tests/invalid-x509/id:001501,src:001469,op:havoc,rep:2,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:001502,src:001501,op:havoc,rep:2,+cov.der b/tests/invalid-x509/id:001502,src:001501,op:havoc,rep:2,+cov.der deleted file mode 100644 index b15b9a8..0000000 Binary files a/tests/invalid-x509/id:001502,src:001501,op:havoc,rep:2,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:001503,src:001502,op:flip1,pos:9,+cov.der b/tests/invalid-x509/id:001503,src:001502,op:flip1,pos:9,+cov.der deleted file mode 100644 index d7f5f54..0000000 Binary files a/tests/invalid-x509/id:001503,src:001502,op:flip1,pos:9,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:001504,src:001502,op:flip2,pos:9,+cov.der b/tests/invalid-x509/id:001504,src:001502,op:flip2,pos:9,+cov.der deleted file mode 100644 index 8baf9e3..0000000 Binary files a/tests/invalid-x509/id:001504,src:001502,op:flip2,pos:9,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:001505,src:001502,op:havoc,rep:2,+cov.der b/tests/invalid-x509/id:001505,src:001502,op:havoc,rep:2,+cov.der deleted file mode 100644 index fdc9ce1..0000000 Binary files a/tests/invalid-x509/id:001505,src:001502,op:havoc,rep:2,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:001506,src:001502,op:havoc,rep:2,+cov.der b/tests/invalid-x509/id:001506,src:001502,op:havoc,rep:2,+cov.der deleted file mode 100644 index 04c6f07..0000000 Binary files a/tests/invalid-x509/id:001506,src:001502,op:havoc,rep:2,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:001507,src:001502,op:havoc,rep:4,+cov.der b/tests/invalid-x509/id:001507,src:001502,op:havoc,rep:4,+cov.der deleted file mode 100644 index a7f1c22..0000000 Binary files a/tests/invalid-x509/id:001507,src:001502,op:havoc,rep:4,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:001508,src:001502,op:havoc,rep:2,+cov.der b/tests/invalid-x509/id:001508,src:001502,op:havoc,rep:2,+cov.der deleted file mode 100644 index 20578a6..0000000 Binary files a/tests/invalid-x509/id:001508,src:001502,op:havoc,rep:2,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:001509,src:001502,op:havoc,rep:2,+cov.der b/tests/invalid-x509/id:001509,src:001502,op:havoc,rep:2,+cov.der deleted file mode 100644 index cd025f1..0000000 Binary files a/tests/invalid-x509/id:001509,src:001502,op:havoc,rep:2,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:001510,src:001506,op:flip1,pos:9,+cov.der b/tests/invalid-x509/id:001510,src:001506,op:flip1,pos:9,+cov.der deleted file mode 100644 index da95560..0000000 Binary files a/tests/invalid-x509/id:001510,src:001506,op:flip1,pos:9,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:001511,src:001506,op:flip2,pos:9,+cov.der b/tests/invalid-x509/id:001511,src:001506,op:flip2,pos:9,+cov.der deleted file mode 100644 index fb4679c..0000000 Binary files a/tests/invalid-x509/id:001511,src:001506,op:flip2,pos:9,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:001514,src:001476,op:havoc,rep:4.der b/tests/invalid-x509/id:001514,src:001476,op:havoc,rep:4.der deleted file mode 100644 index fe6f8de..0000000 Binary files a/tests/invalid-x509/id:001514,src:001476,op:havoc,rep:4.der and /dev/null differ diff --git a/tests/invalid-x509/id:001517,src:001461,op:havoc,rep:4.der b/tests/invalid-x509/id:001517,src:001461,op:havoc,rep:4.der deleted file mode 100644 index 125789b..0000000 Binary files a/tests/invalid-x509/id:001517,src:001461,op:havoc,rep:4.der and /dev/null differ diff --git a/tests/invalid-x509/id:001518,src:001463,op:havoc,rep:4.der b/tests/invalid-x509/id:001518,src:001463,op:havoc,rep:4.der deleted file mode 100644 index 60a35a8..0000000 Binary files a/tests/invalid-x509/id:001518,src:001463,op:havoc,rep:4.der and /dev/null differ diff --git a/tests/invalid-x509/id:001519,src:001490,op:flip1,pos:280.der b/tests/invalid-x509/id:001519,src:001490,op:flip1,pos:280.der deleted file mode 100644 index 7f481d2..0000000 Binary files a/tests/invalid-x509/id:001519,src:001490,op:flip1,pos:280.der and /dev/null differ diff --git a/tests/invalid-x509/id:001520,src:001498,op:int16,pos:29,val:+512.der b/tests/invalid-x509/id:001520,src:001498,op:int16,pos:29,val:+512.der deleted file mode 100644 index f8a4c1e..0000000 Binary files a/tests/invalid-x509/id:001520,src:001498,op:int16,pos:29,val:+512.der and /dev/null differ diff --git a/tests/invalid-x509/id:001523,src:001375,op:flip1,pos:513.der b/tests/invalid-x509/id:001523,src:001375,op:flip1,pos:513.der deleted file mode 100644 index 3a78f9d..0000000 Binary files a/tests/invalid-x509/id:001523,src:001375,op:flip1,pos:513.der and /dev/null differ diff --git a/tests/invalid-x509/id:001524,src:001375,op:flip1,pos:514.der b/tests/invalid-x509/id:001524,src:001375,op:flip1,pos:514.der deleted file mode 100644 index da157be..0000000 Binary files a/tests/invalid-x509/id:001524,src:001375,op:flip1,pos:514.der and /dev/null differ diff --git a/tests/invalid-x509/id:001525,src:001375,op:flip1,pos:515.der b/tests/invalid-x509/id:001525,src:001375,op:flip1,pos:515.der deleted file mode 100644 index 23da3cd..0000000 Binary files a/tests/invalid-x509/id:001525,src:001375,op:flip1,pos:515.der and /dev/null differ diff --git a/tests/invalid-x509/id:001526,src:001512,op:flip16,pos:28.der b/tests/invalid-x509/id:001526,src:001512,op:flip16,pos:28.der deleted file mode 100644 index fea10a3..0000000 Binary files a/tests/invalid-x509/id:001526,src:001512,op:flip16,pos:28.der and /dev/null differ diff --git a/tests/invalid-x509/id:001527,src:001512,op:havoc,rep:4.der b/tests/invalid-x509/id:001527,src:001512,op:havoc,rep:4.der deleted file mode 100644 index c0a13df..0000000 Binary files a/tests/invalid-x509/id:001527,src:001512,op:havoc,rep:4.der and /dev/null differ diff --git a/tests/invalid-x509/id:001528,src:001512,op:havoc,rep:4.der b/tests/invalid-x509/id:001528,src:001512,op:havoc,rep:4.der deleted file mode 100644 index 43a8fd7..0000000 Binary files a/tests/invalid-x509/id:001528,src:001512,op:havoc,rep:4.der and /dev/null differ diff --git a/tests/invalid-x509/id:001529,src:001512,op:havoc,rep:2.der b/tests/invalid-x509/id:001529,src:001512,op:havoc,rep:2.der deleted file mode 100644 index 14357b3..0000000 Binary files a/tests/invalid-x509/id:001529,src:001512,op:havoc,rep:2.der and /dev/null differ diff --git a/tests/invalid-x509/id:001531,src:001460,op:flip2,pos:236.der b/tests/invalid-x509/id:001531,src:001460,op:flip2,pos:236.der deleted file mode 100644 index 3f3b927..0000000 Binary files a/tests/invalid-x509/id:001531,src:001460,op:flip2,pos:236.der and /dev/null differ diff --git a/tests/invalid-x509/id:001532,src:001477,op:flip2,pos:205.der b/tests/invalid-x509/id:001532,src:001477,op:flip2,pos:205.der deleted file mode 100644 index 0309668..0000000 Binary files a/tests/invalid-x509/id:001532,src:001477,op:flip2,pos:205.der and /dev/null differ diff --git a/tests/invalid-x509/id:001533,src:001477,op:flip4,pos:205.der b/tests/invalid-x509/id:001533,src:001477,op:flip4,pos:205.der deleted file mode 100644 index 55a4991..0000000 Binary files a/tests/invalid-x509/id:001533,src:001477,op:flip4,pos:205.der and /dev/null differ diff --git a/tests/invalid-x509/id:001534,src:001477,op:int16,pos:419,val:+1024,+cov.der b/tests/invalid-x509/id:001534,src:001477,op:int16,pos:419,val:+1024,+cov.der deleted file mode 100644 index 04fa74a..0000000 Binary files a/tests/invalid-x509/id:001534,src:001477,op:int16,pos:419,val:+1024,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:001535,src:001477,op:havoc,rep:2,+cov.der b/tests/invalid-x509/id:001535,src:001477,op:havoc,rep:2,+cov.der deleted file mode 100644 index 1204945..0000000 Binary files a/tests/invalid-x509/id:001535,src:001477,op:havoc,rep:2,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:001536,src:001477,op:havoc,rep:4,+cov.der b/tests/invalid-x509/id:001536,src:001477,op:havoc,rep:4,+cov.der deleted file mode 100644 index 4d803a9..0000000 Binary files a/tests/invalid-x509/id:001536,src:001477,op:havoc,rep:4,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:001538,src:001534,op:flip1,pos:207,+cov.der b/tests/invalid-x509/id:001538,src:001534,op:flip1,pos:207,+cov.der deleted file mode 100644 index a9400ca..0000000 Binary files a/tests/invalid-x509/id:001538,src:001534,op:flip1,pos:207,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:001539,src:001534,op:flip1,pos:421,+cov.der b/tests/invalid-x509/id:001539,src:001534,op:flip1,pos:421,+cov.der deleted file mode 100644 index 6d3106a..0000000 Binary files a/tests/invalid-x509/id:001539,src:001534,op:flip1,pos:421,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:001540,src:001534,op:flip1,pos:421,+cov.der b/tests/invalid-x509/id:001540,src:001534,op:flip1,pos:421,+cov.der deleted file mode 100644 index eda3e80..0000000 Binary files a/tests/invalid-x509/id:001540,src:001534,op:flip1,pos:421,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:001541,src:001534,op:havoc,rep:4,+cov.der b/tests/invalid-x509/id:001541,src:001534,op:havoc,rep:4,+cov.der deleted file mode 100644 index f9ab091..0000000 Binary files a/tests/invalid-x509/id:001541,src:001534,op:havoc,rep:4,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:001542,src:001535,op:int16,pos:409,val:+255,+cov.der b/tests/invalid-x509/id:001542,src:001535,op:int16,pos:409,val:+255,+cov.der deleted file mode 100644 index 046e36e..0000000 Binary files a/tests/invalid-x509/id:001542,src:001535,op:int16,pos:409,val:+255,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:001543,src:001537,op:flip1,pos:602.der b/tests/invalid-x509/id:001543,src:001537,op:flip1,pos:602.der deleted file mode 100644 index bbb3b69..0000000 Binary files a/tests/invalid-x509/id:001543,src:001537,op:flip1,pos:602.der and /dev/null differ diff --git a/tests/invalid-x509/id:001546,src:001539,op:havoc,rep:2,+cov.der b/tests/invalid-x509/id:001546,src:001539,op:havoc,rep:2,+cov.der deleted file mode 100644 index 744c6e6..0000000 Binary files a/tests/invalid-x509/id:001546,src:001539,op:havoc,rep:2,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:001547,src:001433,op:havoc,rep:16.der b/tests/invalid-x509/id:001547,src:001433,op:havoc,rep:16.der deleted file mode 100644 index 14310d2..0000000 Binary files a/tests/invalid-x509/id:001547,src:001433,op:havoc,rep:16.der and /dev/null differ diff --git a/tests/invalid-x509/id:001548,src:001479,op:havoc,rep:32.der b/tests/invalid-x509/id:001548,src:001479,op:havoc,rep:32.der deleted file mode 100644 index d580b34..0000000 Binary files a/tests/invalid-x509/id:001548,src:001479,op:havoc,rep:32.der and /dev/null differ diff --git a/tests/invalid-x509/id:001549,src:001492,op:flip1,pos:424.der b/tests/invalid-x509/id:001549,src:001492,op:flip1,pos:424.der deleted file mode 100644 index 4beb257..0000000 Binary files a/tests/invalid-x509/id:001549,src:001492,op:flip1,pos:424.der and /dev/null differ diff --git a/tests/invalid-x509/id:001551,src:001499,op:havoc,rep:4.der b/tests/invalid-x509/id:001551,src:001499,op:havoc,rep:4.der deleted file mode 100644 index 65092ca..0000000 Binary files a/tests/invalid-x509/id:001551,src:001499,op:havoc,rep:4.der and /dev/null differ diff --git a/tests/invalid-x509/id:001552,src:001447,op:havoc,rep:2.der b/tests/invalid-x509/id:001552,src:001447,op:havoc,rep:2.der deleted file mode 100644 index 49be45d..0000000 Binary files a/tests/invalid-x509/id:001552,src:001447,op:havoc,rep:2.der and /dev/null differ diff --git a/tests/invalid-x509/id:001553,src:001457,op:havoc,rep:4.der b/tests/invalid-x509/id:001553,src:001457,op:havoc,rep:4.der deleted file mode 100644 index f01f704..0000000 Binary files a/tests/invalid-x509/id:001553,src:001457,op:havoc,rep:4.der and /dev/null differ diff --git a/tests/invalid-x509/id:001554,src:001459,op:havoc,rep:8.der b/tests/invalid-x509/id:001554,src:001459,op:havoc,rep:8.der deleted file mode 100644 index 225c942..0000000 Binary files a/tests/invalid-x509/id:001554,src:001459,op:havoc,rep:8.der and /dev/null differ diff --git a/tests/invalid-x509/id:001555,src:001459,op:havoc,rep:2.der b/tests/invalid-x509/id:001555,src:001459,op:havoc,rep:2.der deleted file mode 100644 index ebd6592..0000000 Binary files a/tests/invalid-x509/id:001555,src:001459,op:havoc,rep:2.der and /dev/null differ diff --git a/tests/invalid-x509/id:001556,src:001507,op:havoc,rep:2,+cov.der b/tests/invalid-x509/id:001556,src:001507,op:havoc,rep:2,+cov.der deleted file mode 100644 index 735dfd5..0000000 Binary files a/tests/invalid-x509/id:001556,src:001507,op:havoc,rep:2,+cov.der and /dev/null differ diff --git a/tests/invalid-x509/id:001557,src:000685+000981,op:splice,rep:2.der b/tests/invalid-x509/id:001557,src:000685+000981,op:splice,rep:2.der deleted file mode 100644 index 835581e..0000000 Binary files a/tests/invalid-x509/id:001557,src:000685+000981,op:splice,rep:2.der and /dev/null differ diff --git a/tests/invalid-x509/id:001558,src:001421,op:havoc,rep:4.der b/tests/invalid-x509/id:001558,src:001421,op:havoc,rep:4.der deleted file mode 100644 index e9cae3c..0000000 Binary files a/tests/invalid-x509/id:001558,src:001421,op:havoc,rep:4.der and /dev/null differ diff --git a/tests/invalid-x509/id:001559,src:001421,op:havoc,rep:4.der b/tests/invalid-x509/id:001559,src:001421,op:havoc,rep:4.der deleted file mode 100644 index f8c0f61..0000000 Binary files a/tests/invalid-x509/id:001559,src:001421,op:havoc,rep:4.der and /dev/null differ diff --git a/tests/invalid-x509/id:001560,src:001421,op:havoc,rep:32.der b/tests/invalid-x509/id:001560,src:001421,op:havoc,rep:32.der deleted file mode 100644 index a484612..0000000 Binary files a/tests/invalid-x509/id:001560,src:001421,op:havoc,rep:32.der and /dev/null differ diff --git a/tests/invalid-x509/id:001562,src:001421,op:havoc,rep:8.der b/tests/invalid-x509/id:001562,src:001421,op:havoc,rep:8.der deleted file mode 100644 index e066ab0..0000000 Binary files a/tests/invalid-x509/id:001562,src:001421,op:havoc,rep:8.der and /dev/null differ diff --git a/tests/invalid-x509/id:001567,src:000806+001307,op:splice,rep:4.der b/tests/invalid-x509/id:001567,src:000806+001307,op:splice,rep:4.der deleted file mode 100644 index 4754663..0000000 Binary files a/tests/invalid-x509/id:001567,src:000806+001307,op:splice,rep:4.der and /dev/null differ diff --git a/tests/invalid-x509/id:001568,src:001510+001564,op:splice,rep:4.der b/tests/invalid-x509/id:001568,src:001510+001564,op:splice,rep:4.der deleted file mode 100644 index e793b44..0000000 Binary files a/tests/invalid-x509/id:001568,src:001510+001564,op:splice,rep:4.der and /dev/null differ diff --git a/tests/invalid-x509/id:001571,src:000037,op:havoc,rep:8.der b/tests/invalid-x509/id:001571,src:000037,op:havoc,rep:8.der deleted file mode 100644 index 7b72754..0000000 Binary files a/tests/invalid-x509/id:001571,src:000037,op:havoc,rep:8.der and /dev/null differ diff --git a/tests/invalid-x509/id:001572,src:001530,op:flip1,pos:153.der b/tests/invalid-x509/id:001572,src:001530,op:flip1,pos:153.der deleted file mode 100644 index 5053cb1..0000000 Binary files a/tests/invalid-x509/id:001572,src:001530,op:flip1,pos:153.der and /dev/null differ diff --git a/tests/invalid-x509/id:001573,src:001530,op:flip2,pos:158.der b/tests/invalid-x509/id:001573,src:001530,op:flip2,pos:158.der deleted file mode 100644 index df55be0..0000000 Binary files a/tests/invalid-x509/id:001573,src:001530,op:flip2,pos:158.der and /dev/null differ diff --git a/tests/invalid-x509/id:001574,src:001540+001215,op:splice,rep:4.der b/tests/invalid-x509/id:001574,src:001540+001215,op:splice,rep:4.der deleted file mode 100644 index 644e225..0000000 Binary files a/tests/invalid-x509/id:001574,src:001540+001215,op:splice,rep:4.der and /dev/null differ diff --git a/tests/invalid-x509/id:001575,src:001543,op:havoc,rep:8.der b/tests/invalid-x509/id:001575,src:001543,op:havoc,rep:8.der deleted file mode 100644 index 5da1e3b..0000000 Binary files a/tests/invalid-x509/id:001575,src:001543,op:havoc,rep:8.der and /dev/null differ diff --git a/tests/invalid-x509/id:001577,src:001565,op:flip1,pos:21.der b/tests/invalid-x509/id:001577,src:001565,op:flip1,pos:21.der deleted file mode 100644 index 16a3f6a..0000000 Binary files a/tests/invalid-x509/id:001577,src:001565,op:flip1,pos:21.der and /dev/null differ diff --git a/tests/invalid-x509/id:001578,src:001565+000591,op:splice,rep:4.der b/tests/invalid-x509/id:001578,src:001565+000591,op:splice,rep:4.der deleted file mode 100644 index 742fe58..0000000 Binary files a/tests/invalid-x509/id:001578,src:001565+000591,op:splice,rep:4.der and /dev/null differ diff --git a/tests/invalid-x509/id:001579,src:001577,op:havoc,rep:4.der b/tests/invalid-x509/id:001579,src:001577,op:havoc,rep:4.der deleted file mode 100644 index 0c3a8a5..0000000 Binary files a/tests/invalid-x509/id:001579,src:001577,op:havoc,rep:4.der and /dev/null differ diff --git a/tests/invalid-x509/id:001580,src:001577,op:havoc,rep:64.der b/tests/invalid-x509/id:001580,src:001577,op:havoc,rep:64.der deleted file mode 100644 index 49c5853..0000000 Binary files a/tests/invalid-x509/id:001580,src:001577,op:havoc,rep:64.der and /dev/null differ diff --git a/tests/invalid-x509/id:001581,src:001473+001546,op:splice,rep:16.der b/tests/invalid-x509/id:001581,src:001473+001546,op:splice,rep:16.der deleted file mode 100644 index 2e4ca51..0000000 Binary files a/tests/invalid-x509/id:001581,src:001473+001546,op:splice,rep:16.der and /dev/null differ diff --git a/tests/invalid-x509/id:001583,src:001473+001546,op:splice,rep:16.der b/tests/invalid-x509/id:001583,src:001473+001546,op:splice,rep:16.der deleted file mode 100644 index a24571b..0000000 Binary files a/tests/invalid-x509/id:001583,src:001473+001546,op:splice,rep:16.der and /dev/null differ diff --git a/tests/invalid-x509/id:001584,src:001548,op:havoc,rep:8.der b/tests/invalid-x509/id:001584,src:001548,op:havoc,rep:8.der deleted file mode 100644 index 39577e1..0000000 Binary files a/tests/invalid-x509/id:001584,src:001548,op:havoc,rep:8.der and /dev/null differ diff --git a/tests/invalid-x509/id:001586,src:001576,op:int8,pos:498,val:+0.der b/tests/invalid-x509/id:001586,src:001576,op:int8,pos:498,val:+0.der deleted file mode 100644 index 612714f..0000000 Binary files a/tests/invalid-x509/id:001586,src:001576,op:int8,pos:498,val:+0.der and /dev/null differ diff --git a/tests/invalid-x509/id:001587,src:001576+001104,op:splice,rep:4.der b/tests/invalid-x509/id:001587,src:001576+001104,op:splice,rep:4.der deleted file mode 100644 index 8a4c10b..0000000 Binary files a/tests/invalid-x509/id:001587,src:001576+001104,op:splice,rep:4.der and /dev/null differ diff --git a/tests/invalid-x509/id:001588,src:001576+001104,op:splice,rep:16.der b/tests/invalid-x509/id:001588,src:001576+001104,op:splice,rep:16.der deleted file mode 100644 index 7d625be..0000000 Binary files a/tests/invalid-x509/id:001588,src:001576+001104,op:splice,rep:16.der and /dev/null differ diff --git a/tests/invalid-x509/id:001589,src:000691+001423,op:splice,rep:4.der b/tests/invalid-x509/id:001589,src:000691+001423,op:splice,rep:4.der deleted file mode 100644 index a557015..0000000 Binary files a/tests/invalid-x509/id:001589,src:000691+001423,op:splice,rep:4.der and /dev/null differ diff --git a/tests/libtasn1.supp b/tests/libtasn1.supp deleted file mode 100644 index fce46eb..0000000 --- a/tests/libtasn1.supp +++ /dev/null @@ -1 +0,0 @@ -leak:_asn1_add_static_node diff --git a/tests/mscat.asn b/tests/mscat.asn deleted file mode 100644 index beb69f7..0000000 --- a/tests/mscat.asn +++ /dev/null @@ -1,34 +0,0 @@ -CATALOG {} -DEFINITIONS IMPLICIT TAGS ::= -- assuming implicit tags, should try explicit too - -BEGIN - --- SPC_PE_IMAGE_DATA -SpcPEImageData ::= SEQUENCE { - flags SpcPeImageFlags DEFAULT includeResources, - link [0] EXPLICIT SpcLink OPTIONAL -} - -SpcPeImageFlags ::= BIT STRING { - includeResources (0), - includeDebugInfo (1), - includeImportAddressTable (2) -} - -SpcLink ::= CHOICE { - url [0] IMPLICIT IA5String, - moniker [1] IMPLICIT SpcSerializedObject, - file [2] EXPLICIT SpcString -} - -SpcSerializedObject ::= SEQUENCE { - classId OCTET STRING, -- GUID - data OCTET STRING -- Binary structure -} - -SpcString ::= CHOICE { - unicode [0] IMPLICIT BMPString, - ascii [1] IMPLICIT IA5String -} - -END diff --git a/tests/object-id-decoding.c b/tests/object-id-decoding.c deleted file mode 100644 index e3e9669..0000000 --- a/tests/object-id-decoding.c +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright (C) 2016 Red Hat, Inc. - * - * This file is part of LIBTASN1. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -#include -#include -#include - -#include "libtasn1.h" - -struct tv -{ - int der_len; - const unsigned char *der_str; - const char *oid; - int expected_error; -}; - -static const struct tv tv[] = { - {.der_len = 12, - .der_str = (void *) "\x06\x0a\x2b\x06\x01\x04\x01\x92\x08\x09\x05\x01", - .oid = "1.3.6.1.4.1.2312.9.5.1", - .expected_error = ASN1_SUCCESS}, - {.der_len = 19, - .der_str = - (void *) - "\x06\x11\x2b\x06\x01\x04\x01\x92\x08\x09\x02\xaa\xda\xbe\xbe\xfa\x72\x01\x07", - .oid = "1.3.6.1.4.1.2312.9.2.1467399257458.1.7", - .expected_error = ASN1_SUCCESS}, -}; - -int -main (int argc, char *argv[]) -{ - char str[128]; - int ret, ret_len; - size_t i; - - for (i = 0; i < sizeof (tv) / sizeof (tv[0]); i++) - { - /* decode */ - ret = - asn1_get_object_id_der (tv[i].der_str+1, - tv[i].der_len-1, &ret_len, str, - sizeof (str)); - if (ret != tv[i].expected_error) - { - fprintf (stderr, - "%d: asn1_get_object_id_der iter %lu: got %d expected %d\n", - __LINE__, (unsigned long) i, ret, tv[i].expected_error); - return 1; - } - - if (ret_len != tv[i].der_len-1) - { - fprintf (stderr, - "%d: iter %lu: error in DER, length returned is %d, had %d\n", - __LINE__, (unsigned long)i, ret_len, tv[i].der_len-1); - return 1; - } - - if (strcmp (tv[i].oid, str) != 0) - { - fprintf (stderr, - "%d: strcmp iter %lu: got invalid OID: %s, expected: %s\n", - __LINE__, (unsigned long) i, str, tv[i].oid); - return 1; - } - - } - - return 0; -} diff --git a/tests/ocsp-basic-response.c b/tests/ocsp-basic-response.c deleted file mode 100644 index 3a190a8..0000000 --- a/tests/ocsp-basic-response.c +++ /dev/null @@ -1,129 +0,0 @@ -/* - * Copyright (C) 2016 Red Hat, Inc. - * - * This file is part of LIBTASN1. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -#include -#include -#include -#include - -int -main (int argc, char** argv) -{ - int result = 0, len; - asn1_node definitions = NULL, node1 = NULL; - char errorDescription[ASN1_MAX_ERROR_DESCRIPTION_SIZE]; - const char *choicefile = getenv ("ASN1CHOICE_OCSP"); - const char *datafile = getenv ("ASN1_RESPONSE_OCSP_DATA"); - FILE *fp; - char data[1024]; - int data_size = sizeof (data); - unsigned etype; - - if (!choicefile) - choicefile = "pkix.asn"; - - if (!datafile) - datafile = "ocsp-basic-response.der"; - - result = asn1_parser2tree (choicefile, &definitions, errorDescription); - if (result != ASN1_SUCCESS) - { - fprintf (stderr, "error in %d: %s\n", __LINE__, errorDescription); - exit (1); - } - - result = asn1_create_element (definitions, "PKIX1.BasicOCSPResponse", &node1); - if (result != ASN1_SUCCESS) - { - fprintf (stderr, "error in %d\n", __LINE__); - exit (1); - } - - fp = fopen(datafile, "rb"); - if (fp == NULL) - { - fprintf (stderr, "error in %d\n", __LINE__); - exit (1); - } - data_size = fread(data, 1, sizeof(data), fp); - fclose(fp); - - result = asn1_der_decoding2 (&node1, data, &data_size, ASN1_DECODE_FLAG_STRICT_DER, errorDescription); - if (result != ASN1_SUCCESS) - { - fprintf (stderr, "error in %d: decoding: %s\n", __LINE__, errorDescription); - exit (1); - } - - len = sizeof(data); - result = asn1_read_value(node1, "tbsResponseData.responderID", data, &len); - if (result != ASN1_SUCCESS) - { - fprintf (stderr, "error in %d: %s\n", __LINE__, errorDescription); - exit (1); - } - - if (strcmp(data, "byKey") != 0) - { - fprintf (stderr, "error in %d: %s\n", __LINE__, data); - exit (1); - } - - len = 0; - result = asn1_read_value_type(node1, "tbsResponseData.responderID.byKey", NULL, &len, &etype); - if (result != ASN1_MEM_ERROR) - { - fprintf (stderr, "error in %d: result is: %s\n", __LINE__, asn1_strerror(result)); - exit (1); - } - - if (etype != ASN1_ETYPE_OCTET_STRING) - { - fprintf (stderr, "error in %d: The type (%d) doesn't match octet string.\n", __LINE__, (int)etype); - exit (1); - } - - if (len != 20) - { - fprintf (stderr, "length doesn't match the expected (got: %d, should be: 20)\n", len); - exit (1); - } - - - - len = sizeof(data); - result = asn1_read_value(node1, "tbsResponseData.responderID.byKey", data, &len); - if (result != ASN1_SUCCESS) - { - fprintf (stderr, "error in %d: %s\n", __LINE__, errorDescription); - exit (1); - } - - if (memcmp(data, "\x50\xEA\x73\x89\xDB\x29\xFB\x10\x8F\x9E\xE5\x01\x20\xD4\xDE\x79\x99\x48\x83\xF7", len) != 0) - { - fprintf (stderr, "contents don't match\n"); - exit (1); - } - - asn1_delete_structure (&node1); - asn1_delete_structure (&definitions); - - return 0; -} diff --git a/tests/ocsp-basic-response.der b/tests/ocsp-basic-response.der deleted file mode 100644 index d87678c..0000000 Binary files a/tests/ocsp-basic-response.der and /dev/null differ diff --git a/tests/ocsp.der b/tests/ocsp.der deleted file mode 100644 index 3134309..0000000 Binary files a/tests/ocsp.der and /dev/null differ diff --git a/tests/octet-string.c b/tests/octet-string.c deleted file mode 100644 index 6d53d50..0000000 --- a/tests/octet-string.c +++ /dev/null @@ -1,187 +0,0 @@ -/* - * Copyright (C) 2011-2014 Free Software Foundation, Inc. - * - * This file is part of LIBTASN1. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * Written by Simon Josefsson - * - */ - -#include -#include -#include - -#include "libtasn1.h" - -struct tv -{ - int der_len; - const unsigned char *der_str; - int len; - const unsigned char *string; - int expected_error; - int ber; -}; - -static const struct tv tv[] = { - /* primitive octet strings */ - {.der_len = 10, - .der_str = - (void*)"\x04\x08\x01\x23\x45\x67\x89\xab\xcd\xef", - .len = 8, - .string = - (void*)"\x01\x23\x45\x67\x89\xab\xcd\xef", - .ber = 0}, - {.der_len = 22, - .der_str = - (void*)"\x04\x14\x13\x00\xd9\xa8\x47\xf7\xf2\x1c\xf4\xb0\xec\x5f\xc1\x73\xe5\x1b\x25\xc2\x62\x27", - .len = 20, - .string = - (void*)"\x13\x00\xD9\xA8\x47\xF7\xF2\x1C\xF4\xB0\xEC\x5F\xC1\x73\xE5\x1B\x25\xC2\x62\x27"}, - - /* long type of length */ - {.der_len = 23, - .der_str = - (void*)"\x04\x81\x14\x13\x00\xd9\xa8\x47\xf7\xf2\x1c\xf4\xb0\xec\x5f\xc1\x73\xe5\x1b\x25\xc2\x62\x27", - .len = 20, - .string = - (void*)"\x13\x00\xD9\xA8\x47\xF7\xF2\x1C\xF4\xB0\xEC\x5F\xC1\x73\xE5\x1B\x25\xC2\x62\x27", - .ber = 1}, - {.der_len = 11, - .der_str = - (void*)"\x04\x81\x08\x01\x23\x45\x67\x89\xab\xcd\xef", - .len = 8, - .string = - (void*)"\x01\x23\x45\x67\x89\xab\xcd\xef", - .ber = 1}, - - /* constructed - indefinite */ - {.der_len = 11, - .der_str = (void*)"\x24\x80\x04\x05\x01\x02\x03\x04\x05\x00\x00", - .len = 5, - .string = (void*)"\x01\x02\x03\x04\x05", - .ber = 1, - }, - - /* a large amount of recursive indefinite encoding */ - {.der_len = 29325, - .der_str = (void*)"\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80\x24\x80", - .len = 0, - .ber = 1, - .expected_error = ASN1_DER_ERROR - } -}; - -int -main (int argc, char *argv[]) -{ - unsigned char str[100]; - unsigned char der[100]; - int der_len = sizeof (der); - int str_size = sizeof (str); - unsigned char *tmp = NULL; - int ret, ret_len; - size_t i; - - for (i = 0; i < sizeof (tv) / sizeof (tv[0]); i++) - { - /* Decode */ - - if (tv[i].ber == 0) - { - str_size = sizeof (str); - ret = - asn1_get_octet_der (tv[i].der_str + 1, - tv[i].der_len - 1, &ret_len, str, - sizeof (str), &str_size); - if (ret != tv[i].expected_error) - { - fprintf (stderr, - "%d: asn1_get_octet_der iter %lu: got %d expected %d\n", - __LINE__, (unsigned long) i, ret, - tv[i].expected_error); - return 1; - } - if (tv[i].expected_error) - continue; - - if (ret_len != tv[i].der_len - 1) - { - fprintf (stderr, - "%d: error in DER, length returned is %d, had %d\n", - __LINE__, ret_len, tv[i].der_len - 1); - return 1; - } - - if (str_size != tv[i].len - || memcmp (tv[i].string, str, tv[i].len) != 0) - { - fprintf (stderr, - "%d: memcmp iter %lu: got invalid decoding\n", - __LINE__, (unsigned long) i); - return 1; - } - - /* Encode */ - der_len = sizeof (der); - asn1_octet_der (str, str_size, der, &der_len); - - if (der_len != tv[i].der_len - 1 - || memcmp (tv[i].der_str + 1, der, tv[i].der_len - 1) != 0) - { - fprintf (stderr, - "encoding iter %lu: got invalid encoding\n", - (unsigned long) i); - return 1; - } - } - - ret = - asn1_decode_simple_ber (ASN1_ETYPE_OCTET_STRING, - tv[i].der_str, tv[i].der_len, - &tmp, (unsigned int*)&str_size, (unsigned int*)&der_len); - if (ret != tv[i].expected_error) - { - fprintf (stderr, - "%d: asn1_decode_simple_ber iter %lu: got %s expected %s\n", - __LINE__, (unsigned long) i, asn1_strerror(ret), asn1_strerror(tv[i].expected_error)); - return 1; - } - if (tv[i].expected_error) - continue; - - if (der_len != tv[i].der_len) - { - fprintf (stderr, - "%d: error in iter %lu: DER, length returned is %d, had %d\n", - __LINE__, (unsigned long)i, der_len, tv[i].der_len); - return 1; - } - - if (str_size != tv[i].len || memcmp (tv[i].string, tmp, tv[i].len) != 0) - { - fprintf (stderr, - "%d: memcmp iter %lu: got invalid decoding\n", - __LINE__, (unsigned long) i); - return 1; - } - free (tmp); - tmp = NULL; - - } - - return 0; -} diff --git a/tests/pkix.asn b/tests/pkix.asn deleted file mode 100644 index efdf95e..0000000 --- a/tests/pkix.asn +++ /dev/null @@ -1,1311 +0,0 @@ - -PKIX1 { } - -DEFINITIONS IMPLICIT TAGS ::= - -BEGIN - --- This contains both PKIX1Implicit88 and RFC2630 ASN.1 modules. - --- ISO arc for standard certificate and CRL extensions - -id-ce OBJECT IDENTIFIER ::= {joint-iso-ccitt(2) ds(5) 29} - - --- authority key identifier OID and syntax - -id-ce-authorityKeyIdentifier OBJECT IDENTIFIER ::= { id-ce 35 } - -AuthorityKeyIdentifier ::= SEQUENCE { - keyIdentifier [0] KeyIdentifier OPTIONAL, - authorityCertIssuer [1] GeneralNames OPTIONAL, - authorityCertSerialNumber [2] CertificateSerialNumber OPTIONAL } - -- authorityCertIssuer and authorityCertSerialNumber shall both - -- be present or both be absgent - -KeyIdentifier ::= OCTET STRING - --- subject key identifier OID and syntax - -id-ce-subjectKeyIdentifier OBJECT IDENTIFIER ::= { id-ce 14 } - -SubjectKeyIdentifier ::= KeyIdentifier - --- key usage extension OID and syntax - -id-ce-keyUsage OBJECT IDENTIFIER ::= { id-ce 15 } - -KeyUsage ::= BIT STRING { - digitalSignature (0), - nonRepudiation (1), - keyEncipherment (2), - dataEncipherment (3), - keyAgreement (4), - keyCertSign (5), - cRLSign (6), - encipherOnly (7), - decipherOnly (8) } - --- private key usage period extension OID and syntax - -id-ce-privateKeyUsagePeriod OBJECT IDENTIFIER ::= { id-ce 16 } - -PrivateKeyUsagePeriod ::= SEQUENCE { - notBefore [0] GeneralizedTime OPTIONAL, - notAfter [1] GeneralizedTime OPTIONAL } - -- either notBefore or notAfter shall be present - --- certificate policies extension OID and syntax - -id-ce-certificatePolicies OBJECT IDENTIFIER ::= { id-ce 32 } - -CertificatePolicies ::= SEQUENCE SIZE (1..MAX) OF PolicyInformation - -PolicyInformation ::= SEQUENCE { - policyIdentifier CertPolicyId, - policyQualifiers SEQUENCE SIZE (1..MAX) OF - PolicyQualifierInfo OPTIONAL } - -CertPolicyId ::= OBJECT IDENTIFIER - -PolicyQualifierInfo ::= SEQUENCE { - policyQualifierId PolicyQualifierId, - qualifier ANY DEFINED BY policyQualifierId } - --- Implementations that recognize additional policy qualifiers shall --- augment the following definition for PolicyQualifierId - -PolicyQualifierId ::= - OBJECT IDENTIFIER -- ( id-qt-cps | id-qt-unotice ) - --- CPS pointer qualifier - -CPSuri ::= IA5String - --- user notice qualifier - -UserNotice ::= SEQUENCE { - noticeRef NoticeReference OPTIONAL, - explicitText DisplayText OPTIONAL} - -NoticeReference ::= SEQUENCE { - organization DisplayText, - noticeNumbers SEQUENCE OF INTEGER } - -DisplayText ::= CHOICE { - visibleString VisibleString (SIZE (1..200)), - bmpString BMPString (SIZE (1..200)), - utf8String UTF8String (SIZE (1..200)) } - --- policy mapping extension OID and syntax - -id-ce-policyMappings OBJECT IDENTIFIER ::= { id-ce 33 } - -PolicyMappings ::= SEQUENCE SIZE (1..MAX) OF SEQUENCE { - issuerDomainPolicy CertPolicyId, - subjectDomainPolicy CertPolicyId } - --- subject alternative name extension OID and syntax - --- Directory string type -- - -DirectoryString ::= CHOICE { - teletexString TeletexString (SIZE (1..MAX)), - printableString PrintableString (SIZE (1..MAX)), - universalString UniversalString (SIZE (1..MAX)), - utf8String UTF8String (SIZE (1..MAX)), - bmpString BMPString (SIZE(1..MAX)), - -- IA5String is added here to handle old UID encoded as ia5String -- - -- See tests/userid/ for more information. It shouldn't be here, -- - -- so if it causes problems, considering dropping it. -- - ia5String IA5String (SIZE(1..MAX)) } - -id-ce-subjectAltName OBJECT IDENTIFIER ::= { id-ce 17 } - -SubjectAltName ::= GeneralNames - -GeneralNames ::= SEQUENCE SIZE (1..MAX) OF GeneralName - -GeneralName ::= CHOICE { - otherName [0] AnotherName, - rfc822Name [1] IA5String, - dNSName [2] IA5String, - x400Address [3] ORAddress, --- Changed to work with the libtasn1 parser. - directoryName [4] EXPLICIT RDNSequence, --Name, - ediPartyName [5] EDIPartyName, - uniformResourceIdentifier [6] IA5String, - iPAddress [7] OCTET STRING, - registeredID [8] OBJECT IDENTIFIER } - --- AnotherName replaces OTHER-NAME ::= TYPE-IDENTIFIER, as --- TYPE-IDENTIFIER is not supported in the '88 ASN.1 syntax - -AnotherName ::= SEQUENCE { - type-id OBJECT IDENTIFIER, - value [0] EXPLICIT ANY DEFINED BY type-id } - -EDIPartyName ::= SEQUENCE { - nameAssigner [0] DirectoryString OPTIONAL, - partyName [1] DirectoryString } - --- issuer alternative name extension OID and syntax - -id-ce-issuerAltName OBJECT IDENTIFIER ::= { id-ce 18 } - -IssuerAltName ::= GeneralNames - -id-ce-subjectDirectoryAttributes OBJECT IDENTIFIER ::= { id-ce 9 } - -SubjectDirectoryAttributes ::= SEQUENCE SIZE (1..MAX) OF Attribute - --- basic constraints extension OID and syntax - -id-ce-basicConstraints OBJECT IDENTIFIER ::= { id-ce 19 } - -BasicConstraints ::= SEQUENCE { - cA BOOLEAN DEFAULT FALSE, - pathLenConstraint INTEGER (0..MAX) OPTIONAL } - --- name constraints extension OID and syntax - -id-ce-nameConstraints OBJECT IDENTIFIER ::= { id-ce 30 } - -NameConstraints ::= SEQUENCE { - permittedSubtrees [0] GeneralSubtrees OPTIONAL, - excludedSubtrees [1] GeneralSubtrees OPTIONAL } - -GeneralSubtrees ::= SEQUENCE SIZE (1..MAX) OF GeneralSubtree - -GeneralSubtree ::= SEQUENCE { - base GeneralName, - minimum [0] BaseDistance DEFAULT 0, - maximum [1] BaseDistance OPTIONAL } - -BaseDistance ::= INTEGER (0..MAX) - --- policy constraints extension OID and syntax - -id-ce-policyConstraints OBJECT IDENTIFIER ::= { id-ce 36 } - -PolicyConstraints ::= SEQUENCE { - requireExplicitPolicy [0] SkipCerts OPTIONAL, - inhibitPolicyMapping [1] SkipCerts OPTIONAL } - -SkipCerts ::= INTEGER (0..MAX) - --- CRL distribution points extension OID and syntax - -id-ce-cRLDistributionPoints OBJECT IDENTIFIER ::= {id-ce 31} - -CRLDistributionPoints ::= SEQUENCE SIZE (1..MAX) OF DistributionPoint - -DistributionPoint ::= SEQUENCE { - distributionPoint [0] EXPLICIT DistributionPointName OPTIONAL, - reasons [1] ReasonFlags OPTIONAL, - cRLIssuer [2] GeneralNames OPTIONAL -} - -DistributionPointName ::= CHOICE { - fullName [0] GeneralNames, - nameRelativeToCRLIssuer [1] RelativeDistinguishedName -} - -ReasonFlags ::= BIT STRING { - unused (0), - keyCompromise (1), - cACompromise (2), - affiliationChanged (3), - superseded (4), - cessationOfOperation (5), - certificateHold (6), - privilegeWithdrawn (7), - aACompromise (8) } - --- extended key usage extension OID and syntax - -id-ce-extKeyUsage OBJECT IDENTIFIER ::= {id-ce 37} - -ExtKeyUsageSyntax ::= SEQUENCE SIZE (1..MAX) OF KeyPurposeId - -KeyPurposeId ::= OBJECT IDENTIFIER - --- extended key purpose OIDs -id-kp-serverAuth OBJECT IDENTIFIER ::= { id-kp 1 } -id-kp-clientAuth OBJECT IDENTIFIER ::= { id-kp 2 } -id-kp-codeSigning OBJECT IDENTIFIER ::= { id-kp 3 } -id-kp-emailProtection OBJECT IDENTIFIER ::= { id-kp 4 } -id-kp-ipsecEndSystem OBJECT IDENTIFIER ::= { id-kp 5 } -id-kp-ipsecTunnel OBJECT IDENTIFIER ::= { id-kp 6 } -id-kp-ipsecUser OBJECT IDENTIFIER ::= { id-kp 7 } -id-kp-timeStamping OBJECT IDENTIFIER ::= { id-kp 8 } - --- authority info access - -id-pe-authorityInfoAccess OBJECT IDENTIFIER ::= { id-pe 1 } - -AuthorityInfoAccessSyntax ::= - SEQUENCE SIZE (1..MAX) OF AccessDescription - -AccessDescription ::= SEQUENCE { - accessMethod OBJECT IDENTIFIER, - accessLocation GeneralName } - --- CRL number extension OID and syntax - -id-ce-cRLNumber OBJECT IDENTIFIER ::= { id-ce 20 } - -CRLNumber ::= INTEGER (0..MAX) - --- issuing distribution point extension OID and syntax - -id-ce-issuingDistributionPoint OBJECT IDENTIFIER ::= { id-ce 28 } - -IssuingDistributionPoint ::= SEQUENCE { - distributionPoint [0] DistributionPointName OPTIONAL, - onlyContainsUserCerts [1] BOOLEAN DEFAULT FALSE, - onlyContainsCACerts [2] BOOLEAN DEFAULT FALSE, - onlySomeReasons [3] ReasonFlags OPTIONAL, - indirectCRL [4] BOOLEAN DEFAULT FALSE } - - -id-ce-deltaCRLIndicator OBJECT IDENTIFIER ::= { id-ce 27 } - --- deltaCRLIndicator ::= BaseCRLNumber - -BaseCRLNumber ::= CRLNumber - --- CRL reasons extension OID and syntax - -id-ce-cRLReasons OBJECT IDENTIFIER ::= { id-ce 21 } - -CRLReason ::= ENUMERATED { - unspecified (0), - keyCompromise (1), - cACompromise (2), - affiliationChanged (3), - superseded (4), - cessationOfOperation (5), - certificateHold (6), - removeFromCRL (8) } - --- certificate issuer CRL entry extension OID and syntax - -id-ce-certificateIssuer OBJECT IDENTIFIER ::= { id-ce 29 } - -CertificateIssuer ::= GeneralNames - --- hold instruction extension OID and syntax - -id-ce-holdInstructionCode OBJECT IDENTIFIER ::= { id-ce 23 } - -HoldInstructionCode ::= OBJECT IDENTIFIER - --- ANSI x9 holdinstructions - --- ANSI x9 arc holdinstruction arc -holdInstruction OBJECT IDENTIFIER ::= - {joint-iso-itu-t(2) member-body(2) us(840) x9cm(10040) 2} - --- ANSI X9 holdinstructions referenced by this standard -id-holdinstruction-none OBJECT IDENTIFIER ::= - {holdInstruction 1} -- deprecated -id-holdinstruction-callissuer OBJECT IDENTIFIER ::= - {holdInstruction 2} -id-holdinstruction-reject OBJECT IDENTIFIER ::= - {holdInstruction 3} - --- invalidity date CRL entry extension OID and syntax - -id-ce-invalidityDate OBJECT IDENTIFIER ::= { id-ce 24 } - -InvalidityDate ::= GeneralizedTime - - --- -------------------------------------- --- EXPLICIT --- -------------------------------------- - --- UNIVERSAL Types defined in '93 and '98 ASN.1 --- but required by this specification - -VisibleString ::= [UNIVERSAL 26] IMPLICIT OCTET STRING - -NumericString ::= [UNIVERSAL 18] IMPLICIT OCTET STRING - -IA5String ::= [UNIVERSAL 22] IMPLICIT OCTET STRING - -TeletexString ::= [UNIVERSAL 20] IMPLICIT OCTET STRING - -PrintableString ::= [UNIVERSAL 19] IMPLICIT OCTET STRING - -UniversalString ::= [UNIVERSAL 28] IMPLICIT OCTET STRING - -- UniversalString is defined in ASN.1:1993 - -BMPString ::= [UNIVERSAL 30] IMPLICIT OCTET STRING - -- BMPString is the subtype of UniversalString and models - -- the Basic Multilingual Plane of ISO/IEC/ITU 10646-1 - -UTF8String ::= [UNIVERSAL 12] IMPLICIT OCTET STRING - -- The content of this type conforms to RFC 2279. - - --- PKIX specific OIDs - -id-pkix OBJECT IDENTIFIER ::= - { iso(1) identified-organization(3) dod(6) internet(1) - security(5) mechanisms(5) pkix(7) } - --- PKIX arcs - -id-pe OBJECT IDENTIFIER ::= { id-pkix 1 } - -- arc for private certificate extensions -id-qt OBJECT IDENTIFIER ::= { id-pkix 2 } - -- arc for policy qualifier types -id-kp OBJECT IDENTIFIER ::= { id-pkix 3 } - -- arc for extended key purpose OIDS -id-ad OBJECT IDENTIFIER ::= { id-pkix 48 } - -- arc for access descriptors - --- policyQualifierIds for Internet policy qualifiers - -id-qt-cps OBJECT IDENTIFIER ::= { id-qt 1 } - -- OID for CPS qualifier -id-qt-unotice OBJECT IDENTIFIER ::= { id-qt 2 } - -- OID for user notice qualifier - --- access descriptor definitions - -id-ad-ocsp OBJECT IDENTIFIER ::= { id-ad 1 } -id-ad-caIssuers OBJECT IDENTIFIER ::= { id-ad 2 } - --- attribute data types -- - -Attribute ::= SEQUENCE { - type AttributeType, - values SET OF AttributeValue - -- at least one value is required -- -} - -AttributeType ::= OBJECT IDENTIFIER - -AttributeValue ::= ANY DEFINED BY type - -AttributeTypeAndValue ::= SEQUENCE { - type AttributeType, - value AttributeValue } - --- suggested naming attributes: Definition of the following --- information object set may be augmented to meet local --- requirements. Note that deleting members of the set may --- prevent interoperability with conforming implementations. --- presented in pairs: the AttributeType followed by the --- type definition for the corresponding AttributeValue - --- Arc for standard naming attributes -id-at OBJECT IDENTIFIER ::= {joint-iso-ccitt(2) ds(5) 4} - --- Attributes of type NameDirectoryString -id-at-initials AttributeType ::= { id-at 43 } -X520initials ::= DirectoryString - -id-at-generationQualifier AttributeType ::= { id-at 44 } -X520generationQualifier ::= DirectoryString - -id-at-surname AttributeType ::= { id-at 4 } -X520surName ::= DirectoryString - -id-at-givenName AttributeType ::= { id-at 42 } -X520givenName ::= DirectoryString - -id-at-name AttributeType ::= { id-at 41 } -X520name ::= DirectoryString - -id-at-commonName AttributeType ::= {id-at 3} -X520CommonName ::= DirectoryString - -id-at-localityName AttributeType ::= {id-at 7} -X520LocalityName ::= DirectoryString - -id-at-stateOrProvinceName AttributeType ::= {id-at 8} -X520StateOrProvinceName ::= DirectoryString - -id-at-organizationName AttributeType ::= {id-at 10} -X520OrganizationName ::= DirectoryString - -id-at-organizationalUnitName AttributeType ::= {id-at 11} -X520OrganizationalUnitName ::= DirectoryString - -id-at-title AttributeType ::= {id-at 12} -X520Title ::= DirectoryString - -id-at-description AttributeType ::= {id-at 13} -X520Description ::= DirectoryString - -id-at-dnQualifier AttributeType ::= {id-at 46} -X520dnQualifier ::= PrintableString - -id-at-countryName AttributeType ::= {id-at 6} -X520countryName ::= PrintableString (SIZE (2)) -- IS 3166 codes - -id-at-serialNumber AttributeType ::= {id-at 5} -X520serialNumber ::= PrintableString - -id-at-telephoneNumber AttributeType ::= {id-at 20} -X520telephoneNumber ::= PrintableString - -id-at-facsimileTelephoneNumber AttributeType ::= {id-at 23} -X520facsimileTelephoneNumber ::= PrintableString - -id-at-pseudonym AttributeType ::= {id-at 65} -X520pseudonym ::= DirectoryString - -id-at-name AttributeType ::= {id-at 41} -X520name ::= DirectoryString - -id-at-streetAddress AttributeType ::= {id-at 9} -X520streetAddress ::= DirectoryString - -id-at-postalAddress AttributeType ::= {id-at 16} -X520postalAddress ::= PostalAddress - -PostalAddress ::= SEQUENCE OF DirectoryString - - - -- Legacy attributes - -pkcs OBJECT IDENTIFIER ::= - { iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) } - -pkcs-9 OBJECT IDENTIFIER ::= - { pkcs 9 } - - -emailAddress AttributeType ::= { pkcs-9 1 } - -Pkcs9email ::= IA5String (SIZE (1..ub-emailaddress-length)) - --- naming data types -- - -Name ::= CHOICE { -- only one possibility for now -- - rdnSequence RDNSequence } - -RDNSequence ::= SEQUENCE OF RelativeDistinguishedName - -DistinguishedName ::= RDNSequence - -RelativeDistinguishedName ::= - SET SIZE (1 .. MAX) OF AttributeTypeAndValue - - - --- -------------------------------------------------------- --- certificate and CRL specific structures begin here --- -------------------------------------------------------- - -Certificate ::= SEQUENCE { - tbsCertificate TBSCertificate, - signatureAlgorithm AlgorithmIdentifier, - signature BIT STRING } - -TBSCertificate ::= SEQUENCE { - version [0] EXPLICIT Version DEFAULT v1, - serialNumber CertificateSerialNumber, - signature AlgorithmIdentifier, - issuer Name, - validity Validity, - subject Name, - subjectPublicKeyInfo SubjectPublicKeyInfo, - issuerUniqueID [1] IMPLICIT UniqueIdentifier OPTIONAL, - -- If present, version shall be v2 or v3 - subjectUniqueID [2] IMPLICIT UniqueIdentifier OPTIONAL, - -- If present, version shall be v2 or v3 - extensions [3] EXPLICIT Extensions OPTIONAL - -- If present, version shall be v3 -- -} - -Version ::= INTEGER { v1(0), v2(1), v3(2) } - -CertificateSerialNumber ::= INTEGER - -Validity ::= SEQUENCE { - notBefore Time, - notAfter Time } - -Time ::= CHOICE { - utcTime UTCTime, - generalTime GeneralizedTime } - -UniqueIdentifier ::= BIT STRING - -SubjectPublicKeyInfo ::= SEQUENCE { - algorithm AlgorithmIdentifier, - subjectPublicKey BIT STRING } - -Extensions ::= SEQUENCE SIZE (1..MAX) OF Extension - -Extension ::= SEQUENCE { - extnID OBJECT IDENTIFIER, - critical BOOLEAN DEFAULT FALSE, - extnValue OCTET STRING } - - --- ------------------------------------------ --- CRL structures --- ------------------------------------------ - -CertificateList ::= SEQUENCE { - tbsCertList TBSCertList, - signatureAlgorithm AlgorithmIdentifier, - signature BIT STRING } - -TBSCertList ::= SEQUENCE { - version Version OPTIONAL, - -- if present, shall be v2 - signature AlgorithmIdentifier, - issuer Name, - thisUpdate Time, - nextUpdate Time OPTIONAL, - revokedCertificates SEQUENCE OF SEQUENCE { - userCertificate CertificateSerialNumber, - revocationDate Time, - crlEntryExtensions Extensions OPTIONAL - -- if present, shall be v2 - } OPTIONAL, - crlExtensions [0] EXPLICIT Extensions OPTIONAL - -- if present, shall be v2 -- -} - --- Version, Time, CertificateSerialNumber, and Extensions were --- defined earlier for use in the certificate structure - -AlgorithmIdentifier ::= SEQUENCE { - algorithm OBJECT IDENTIFIER, - parameters ANY DEFINED BY algorithm OPTIONAL } - -- contains a value of the type - -- registered for use with the - -- algorithm object identifier value - --- Algorithm OIDs and parameter structures - -pkcs-1 OBJECT IDENTIFIER ::= { - pkcs 1 } - -rsaEncryption OBJECT IDENTIFIER ::= { pkcs-1 1 } - -md2WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 2 } - -md5WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 4 } - -sha1WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 5 } - -id-dsa-with-sha1 OBJECT IDENTIFIER ::= { - iso(1) member-body(2) us(840) x9-57 (10040) x9algorithm(4) 3 } - -Dss-Sig-Value ::= SEQUENCE { - r INTEGER, - s INTEGER -} - -dhpublicnumber OBJECT IDENTIFIER ::= { - iso(1) member-body(2) us(840) ansi-x942(10046) number-type(2) 1 } - -DomainParameters ::= SEQUENCE { - p INTEGER, -- odd prime, p=jq +1 - g INTEGER, -- generator, g - q INTEGER, -- factor of p-1 - j INTEGER OPTIONAL, -- subgroup factor, j>= 2 - validationParms ValidationParms OPTIONAL } - -ValidationParms ::= SEQUENCE { - seed BIT STRING, - pgenCounter INTEGER } - -id-dsa OBJECT IDENTIFIER ::= { - iso(1) member-body(2) us(840) x9-57(10040) x9algorithm(4) 1 } - -Dss-Parms ::= SEQUENCE { - p INTEGER, - q INTEGER, - g INTEGER } - --- x400 address syntax starts here --- OR Names - -ORAddress ::= SEQUENCE { - built-in-standard-attributes BuiltInStandardAttributes, - built-in-domain-defined-attributes - BuiltInDomainDefinedAttributes OPTIONAL, - -- see also teletex-domain-defined-attributes - extension-attributes ExtensionAttributes OPTIONAL } --- The OR-address is semantically absent from the OR-name if the --- built-in-standard-attribute sequence is empty and the --- built-in-domain-defined-attributes and extension-attributes are --- both omitted. - --- Built-in Standard Attributes - -BuiltInStandardAttributes ::= SEQUENCE { - country-name CountryName OPTIONAL, - administration-domain-name AdministrationDomainName OPTIONAL, - network-address [0] EXPLICIT NetworkAddress OPTIONAL, - -- see also extended-network-address - terminal-identifier [1] EXPLICIT TerminalIdentifier OPTIONAL, - private-domain-name [2] EXPLICIT PrivateDomainName OPTIONAL, - organization-name [3] EXPLICIT OrganizationName OPTIONAL, - -- see also teletex-organization-name - numeric-user-identifier [4] EXPLICIT NumericUserIdentifier OPTIONAL, - personal-name [5] EXPLICIT PersonalName OPTIONAL, - -- see also teletex-personal-name - organizational-unit-names [6] EXPLICIT OrganizationalUnitNames OPTIONAL - -- see also teletex-organizational-unit-names -- -} - -CountryName ::= [APPLICATION 1] CHOICE { - x121-dcc-code NumericString - (SIZE (ub-country-name-numeric-length)), - iso-3166-alpha2-code PrintableString - (SIZE (ub-country-name-alpha-length)) } - -AdministrationDomainName ::= [APPLICATION 2] EXPLICIT CHOICE { - numeric NumericString (SIZE (0..ub-domain-name-length)), - printable PrintableString (SIZE (0..ub-domain-name-length)) } - -NetworkAddress ::= X121Address -- see also extended-network-address - -X121Address ::= NumericString (SIZE (1..ub-x121-address-length)) - -TerminalIdentifier ::= PrintableString (SIZE (1..ub-terminal-id-length)) - -PrivateDomainName ::= CHOICE { - numeric NumericString (SIZE (1..ub-domain-name-length)), - printable PrintableString (SIZE (1..ub-domain-name-length)) } - -OrganizationName ::= PrintableString - (SIZE (1..ub-organization-name-length)) --- see also teletex-organization-name - -NumericUserIdentifier ::= NumericString - (SIZE (1..ub-numeric-user-id-length)) - -PersonalName ::= SET { - surname [0] PrintableString (SIZE (1..ub-surname-length)), - given-name [1] PrintableString - (SIZE (1..ub-given-name-length)) OPTIONAL, - initials [2] PrintableString (SIZE (1..ub-initials-length)) OPTIONAL, - generation-qualifier [3] PrintableString - (SIZE (1..ub-generation-qualifier-length)) OPTIONAL } --- see also teletex-personal-name - -OrganizationalUnitNames ::= SEQUENCE SIZE (1..ub-organizational-units) - OF OrganizationalUnitName --- see also teletex-organizational-unit-names - -OrganizationalUnitName ::= PrintableString (SIZE - (1..ub-organizational-unit-name-length)) - --- Built-in Domain-defined Attributes - -BuiltInDomainDefinedAttributes ::= SEQUENCE SIZE - (1..ub-domain-defined-attributes) OF - BuiltInDomainDefinedAttribute - -BuiltInDomainDefinedAttribute ::= SEQUENCE { - type PrintableString (SIZE - (1..ub-domain-defined-attribute-type-length)), - value PrintableString (SIZE - (1..ub-domain-defined-attribute-value-length))} - --- Extension Attributes - -ExtensionAttributes ::= SET SIZE (1..ub-extension-attributes) OF - ExtensionAttribute - -ExtensionAttribute ::= SEQUENCE { - extension-attribute-type [0] EXPLICIT INTEGER (0..ub-extension-attributes), - extension-attribute-value [1] EXPLICIT - ANY DEFINED BY extension-attribute-type } - --- Extension types and attribute values --- - -common-name INTEGER ::= 1 - -CommonName ::= PrintableString (SIZE (1..ub-common-name-length)) - -teletex-common-name INTEGER ::= 2 - -TeletexCommonName ::= TeletexString (SIZE (1..ub-common-name-length)) - -teletex-organization-name INTEGER ::= 3 - -TeletexOrganizationName ::= - TeletexString (SIZE (1..ub-organization-name-length)) - -teletex-personal-name INTEGER ::= 4 - -TeletexPersonalName ::= SET { - surname [0] EXPLICIT TeletexString (SIZE (1..ub-surname-length)), - given-name [1] EXPLICIT TeletexString - (SIZE (1..ub-given-name-length)) OPTIONAL, - initials [2] EXPLICIT TeletexString (SIZE (1..ub-initials-length)) OPTIONAL, - generation-qualifier [3] EXPLICIT TeletexString (SIZE - (1..ub-generation-qualifier-length)) OPTIONAL } - -teletex-organizational-unit-names INTEGER ::= 5 - -TeletexOrganizationalUnitNames ::= SEQUENCE SIZE - (1..ub-organizational-units) OF TeletexOrganizationalUnitName - -TeletexOrganizationalUnitName ::= TeletexString - (SIZE (1..ub-organizational-unit-name-length)) - -pds-name INTEGER ::= 7 - -PDSName ::= PrintableString (SIZE (1..ub-pds-name-length)) - -physical-delivery-country-name INTEGER ::= 8 - -PhysicalDeliveryCountryName ::= CHOICE { - x121-dcc-code NumericString (SIZE (ub-country-name-numeric-length)), - iso-3166-alpha2-code PrintableString - (SIZE (ub-country-name-alpha-length)) } - -postal-code INTEGER ::= 9 - -PostalCode ::= CHOICE { - numeric-code NumericString (SIZE (1..ub-postal-code-length)), - printable-code PrintableString (SIZE (1..ub-postal-code-length)) } - -physical-delivery-office-name INTEGER ::= 10 - -PhysicalDeliveryOfficeName ::= PDSParameter - -physical-delivery-office-number INTEGER ::= 11 - -PhysicalDeliveryOfficeNumber ::= PDSParameter - -extension-OR-address-components INTEGER ::= 12 - -ExtensionORAddressComponents ::= PDSParameter - -physical-delivery-personal-name INTEGER ::= 13 - -PhysicalDeliveryPersonalName ::= PDSParameter - -physical-delivery-organization-name INTEGER ::= 14 - -PhysicalDeliveryOrganizationName ::= PDSParameter - -extension-physical-delivery-address-components INTEGER ::= 15 - -ExtensionPhysicalDeliveryAddressComponents ::= PDSParameter - -unformatted-postal-address INTEGER ::= 16 - -UnformattedPostalAddress ::= SET { - printable-address SEQUENCE SIZE (1..ub-pds-physical-address-lines) OF - PrintableString (SIZE (1..ub-pds-parameter-length)) OPTIONAL, - teletex-string TeletexString - (SIZE (1..ub-unformatted-address-length)) OPTIONAL } - -street-address INTEGER ::= 17 - -StreetAddress ::= PDSParameter - -post-office-box-address INTEGER ::= 18 - -PostOfficeBoxAddress ::= PDSParameter - -poste-restante-address INTEGER ::= 19 - -PosteRestanteAddress ::= PDSParameter - -unique-postal-name INTEGER ::= 20 - -UniquePostalName ::= PDSParameter - -local-postal-attributes INTEGER ::= 21 - -LocalPostalAttributes ::= PDSParameter - -PDSParameter ::= SET { - printable-string PrintableString - (SIZE(1..ub-pds-parameter-length)) OPTIONAL, - teletex-string TeletexString - (SIZE(1..ub-pds-parameter-length)) OPTIONAL } - -extended-network-address INTEGER ::= 22 - -ExtendedNetworkAddress ::= CHOICE { - e163-4-address SEQUENCE { - number [0] EXPLICIT NumericString (SIZE (1..ub-e163-4-number-length)), - sub-address [1] EXPLICIT NumericString - (SIZE (1..ub-e163-4-sub-address-length)) OPTIONAL }, - psap-address [0] EXPLICIT PresentationAddress } - -PresentationAddress ::= SEQUENCE { - pSelector [0] EXPLICIT OCTET STRING OPTIONAL, - sSelector [1] EXPLICIT OCTET STRING OPTIONAL, - tSelector [2] EXPLICIT OCTET STRING OPTIONAL, - nAddresses [3] EXPLICIT SET SIZE (1..MAX) OF OCTET STRING } - -terminal-type INTEGER ::= 23 - -TerminalType ::= INTEGER { - telex (3), - teletex (4), - g3-facsimile (5), - g4-facsimile (6), - ia5-terminal (7), - videotex (8) } -- (0..ub-integer-options) - --- Extension Domain-defined Attributes - -teletex-domain-defined-attributes INTEGER ::= 6 - -TeletexDomainDefinedAttributes ::= SEQUENCE SIZE - (1..ub-domain-defined-attributes) OF TeletexDomainDefinedAttribute - -TeletexDomainDefinedAttribute ::= SEQUENCE { - type TeletexString - (SIZE (1..ub-domain-defined-attribute-type-length)), - value TeletexString - (SIZE (1..ub-domain-defined-attribute-value-length)) } - --- specifications of Upper Bounds shall be regarded as mandatory --- from Annex B of ITU-T X.411 Reference Definition of MTS Parameter --- Upper Bounds - --- Upper Bounds -ub-name INTEGER ::= 32768 -ub-common-name INTEGER ::= 64 -ub-locality-name INTEGER ::= 128 -ub-state-name INTEGER ::= 128 -ub-organization-name INTEGER ::= 64 -ub-organizational-unit-name INTEGER ::= 64 -ub-title INTEGER ::= 64 -ub-match INTEGER ::= 128 - -ub-emailaddress-length INTEGER ::= 128 - -ub-common-name-length INTEGER ::= 64 -ub-country-name-alpha-length INTEGER ::= 2 -ub-country-name-numeric-length INTEGER ::= 3 -ub-domain-defined-attributes INTEGER ::= 4 -ub-domain-defined-attribute-type-length INTEGER ::= 8 -ub-domain-defined-attribute-value-length INTEGER ::= 128 -ub-domain-name-length INTEGER ::= 16 -ub-extension-attributes INTEGER ::= 256 -ub-e163-4-number-length INTEGER ::= 15 -ub-e163-4-sub-address-length INTEGER ::= 40 -ub-generation-qualifier-length INTEGER ::= 3 -ub-given-name-length INTEGER ::= 16 -ub-initials-length INTEGER ::= 5 -ub-integer-options INTEGER ::= 256 -ub-numeric-user-id-length INTEGER ::= 32 -ub-organization-name-length INTEGER ::= 64 -ub-organizational-unit-name-length INTEGER ::= 32 -ub-organizational-units INTEGER ::= 4 -ub-pds-name-length INTEGER ::= 16 -ub-pds-parameter-length INTEGER ::= 30 -ub-pds-physical-address-lines INTEGER ::= 6 -ub-postal-code-length INTEGER ::= 16 -ub-surname-length INTEGER ::= 40 -ub-terminal-id-length INTEGER ::= 24 -ub-unformatted-address-length INTEGER ::= 180 -ub-x121-address-length INTEGER ::= 16 - --- Note - upper bounds on string types, such as TeletexString, are --- measured in characters. Excepting PrintableString or IA5String, a --- significantly greater number of octets will be required to hold --- such a value. As a minimum, 16 octets, or twice the specified upper --- bound, whichever is the larger, should be allowed for TeletexString. --- For UTF8String or UniversalString at least four times the upper --- bound should be allowed. - - - --- END of PKIX1Implicit88 - - --- BEGIN of RFC2630 - --- Cryptographic Message Syntax - -pkcs-7-ContentInfo ::= SEQUENCE { - contentType OBJECT IDENTIFIER, - content [0] EXPLICIT ANY DEFINED BY contentType } - -pkcs-7-DigestInfo ::= SEQUENCE { - digestAlgorithm AlgorithmIdentifier, - digest OCTET STRING -} - -pkcs-7-SignedData ::= SEQUENCE { - version INTEGER, - digestAlgorithms pkcs-7-DigestAlgorithmIdentifiers, - encapContentInfo pkcs-7-EncapsulatedContentInfo, - certificates [0] IMPLICIT pkcs-7-CertificateSet OPTIONAL, - crls [1] IMPLICIT pkcs-7-CertificateRevocationLists OPTIONAL, - signerInfos pkcs-7-SignerInfos -} - -pkcs-7-DigestAlgorithmIdentifiers ::= SET OF AlgorithmIdentifier - --- rfc5652: eContent [0] EXPLICIT OCTET STRING OPTIONAL --- rfc2315: content [0] EXPLICIT ANY DEFINED BY contentType OPTIONAL - -pkcs-7-EncapsulatedContentInfo ::= SEQUENCE { - eContentType OBJECT IDENTIFIER, - eContent [0] EXPLICIT ANY OPTIONAL } - --- We don't use CertificateList here since we only want --- to read the raw data. -pkcs-7-CertificateRevocationLists ::= SET OF ANY - -pkcs-7-CertificateChoices ::= CHOICE { --- Although the paper uses Certificate type, we --- don't use it since, we don't need to parse it. --- We only need to read and store it. - certificate ANY -} - -pkcs-7-CertificateSet ::= SET OF pkcs-7-CertificateChoices - -IssuerAndSerialNumber ::= SEQUENCE { - issuer Name, - serialNumber CertificateSerialNumber -} - -pkcs-7-SignerInfo ::= SEQUENCE { - version INTEGER, - sid SignerIdentifier, - digestAlgorithm AlgorithmIdentifier, - signedAttrs [0] IMPLICIT SignedAttributes OPTIONAL, - signatureAlgorithm AlgorithmIdentifier, - signature OCTET STRING, - unsignedAttrs [1] IMPLICIT SignedAttributes OPTIONAL } - -SignedAttributes ::= SET SIZE (1..MAX) OF Attribute - -SignerIdentifier ::= CHOICE { - issuerAndSerialNumber IssuerAndSerialNumber, - subjectKeyIdentifier [0] SubjectKeyIdentifier -} - -pkcs-7-SignerInfos ::= SET OF pkcs-7-SignerInfo - - --- BEGIN of RFC2986 - --- Certificate requests -pkcs-10-CertificationRequestInfo ::= SEQUENCE { - version INTEGER { v1(0) }, - subject Name, - subjectPKInfo SubjectPublicKeyInfo, - attributes [0] Attributes -} - -Attributes ::= SET OF Attribute - -pkcs-10-CertificationRequest ::= SEQUENCE { - certificationRequestInfo pkcs-10-CertificationRequestInfo, - signatureAlgorithm AlgorithmIdentifier, - signature BIT STRING -} - --- stuff from PKCS#9 - -pkcs-9-ub-challengePassword INTEGER ::= 255 - -pkcs-9-certTypes OBJECT IDENTIFIER ::= {pkcs-9 22} -pkcs-9-crlTypes OBJECT IDENTIFIER ::= {pkcs-9 23} - -pkcs-9-at-challengePassword OBJECT IDENTIFIER ::= {pkcs-9 7} - -pkcs-9-challengePassword ::= CHOICE { - printableString PrintableString (SIZE (1..pkcs-9-ub-challengePassword)), - utf8String UTF8String (SIZE (1..pkcs-9-ub-challengePassword)) } - -pkcs-9-at-localKeyId OBJECT IDENTIFIER ::= {pkcs-9 21} - -pkcs-9-localKeyId ::= OCTET STRING - -pkcs-9-at-friendlyName OBJECT IDENTIFIER ::= {pkcs-9 20} - -pkcs-9-friendlyName ::= BMPString (SIZE (1..255)) - --- PKCS #8 stuff - --- Private-key information syntax - -pkcs-8-PrivateKeyInfo ::= SEQUENCE { - version pkcs-8-Version, - privateKeyAlgorithm AlgorithmIdentifier, - privateKey pkcs-8-PrivateKey, - attributes [0] Attributes OPTIONAL } - -pkcs-8-Version ::= INTEGER {v1(0)} - -pkcs-8-PrivateKey ::= OCTET STRING - -pkcs-8-Attributes ::= SET OF Attribute - --- Encrypted private-key information syntax - -pkcs-8-EncryptedPrivateKeyInfo ::= SEQUENCE { - encryptionAlgorithm AlgorithmIdentifier, - encryptedData pkcs-8-EncryptedData -} - -pkcs-8-EncryptedData ::= OCTET STRING - --- PKCS #5 stuff - -pkcs-5 OBJECT IDENTIFIER ::= - { pkcs 5 } - -pkcs-5-encryptionAlgorithm OBJECT IDENTIFIER ::= - { iso(1) member-body(2) us(840) rsadsi(113549) 3 } - -pkcs-5-des-EDE3-CBC OBJECT IDENTIFIER ::= {pkcs-5-encryptionAlgorithm 7} - -pkcs-5-des-EDE3-CBC-params ::= OCTET STRING (SIZE(8)) - -pkcs-5-id-PBES2 OBJECT IDENTIFIER ::= {pkcs-5 13} - -pkcs-5-PBES2-params ::= SEQUENCE { - keyDerivationFunc AlgorithmIdentifier, - encryptionScheme AlgorithmIdentifier } - --- PBKDF2 - -pkcs-5-id-PBKDF2 OBJECT IDENTIFIER ::= {pkcs-5 12} - --- pkcs-5-id-hmacWithSHA1 OBJECT IDENTIFIER ::= {iso(1) member-body(2) us(840) rsadsi(113549) 2 7} - --- pkcs-5-algid-hmacWithSHA1 AlgorithmIdentifier ::= --- {algorithm pkcs-5-id-hmacWithSHA1, parameters NULL : NULL} - -pkcs-5-PBKDF2-params ::= SEQUENCE { - salt CHOICE { - specified OCTET STRING, - otherSource AlgorithmIdentifier - }, - iterationCount INTEGER (1..MAX), - keyLength INTEGER (1..MAX) OPTIONAL, - prf AlgorithmIdentifier OPTIONAL -- DEFAULT pkcs-5-id-hmacWithSHA1 -} - --- PKCS #12 stuff - -pkcs-12 OBJECT IDENTIFIER ::= {pkcs 12} - -pkcs-12-PFX ::= SEQUENCE { - version INTEGER {v3(3)}, - authSafe pkcs-7-ContentInfo, - macData pkcs-12-MacData OPTIONAL -} - -pkcs-12-PbeParams ::= SEQUENCE { - salt OCTET STRING, - iterations INTEGER -} - -pkcs-12-MacData ::= SEQUENCE { - mac pkcs-7-DigestInfo, - macSalt OCTET STRING, - iterations INTEGER DEFAULT 1 --- Note: The default is for historical reasons and its use is --- deprecated. A higher value, like 1024 is recommended. -} - -pkcs-12-AuthenticatedSafe ::= SEQUENCE OF pkcs-7-ContentInfo - -- Data if unencrypted - -- EncryptedData if password-encrypted - -- EnvelopedData if public key-encrypted - -pkcs-12-SafeContents ::= SEQUENCE OF pkcs-12-SafeBag - -pkcs-12-SafeBag ::= SEQUENCE { - bagId OBJECT IDENTIFIER, - bagValue [0] EXPLICIT ANY DEFINED BY badId, - bagAttributes SET OF pkcs-12-PKCS12Attribute OPTIONAL -} - --- Bag types - - -pkcs-12-bagtypes OBJECT IDENTIFIER ::= {pkcs-12 10 1} - -pkcs-12-keyBag OBJECT IDENTIFIER ::= {pkcs-12-bagtypes 1} -pkcs-12-pkcs8ShroudedKeyBag OBJECT IDENTIFIER ::= {pkcs-12-bagtypes 2} -pkcs-12-certBag OBJECT IDENTIFIER ::= {pkcs-12-bagtypes 3} -pkcs-12-crlBag OBJECT IDENTIFIER ::= {pkcs-12-bagtypes 4} - -pkcs-12-KeyBag ::= pkcs-8-PrivateKeyInfo - --- Shrouded KeyBag - -pkcs-12-PKCS8ShroudedKeyBag ::= pkcs-8-EncryptedPrivateKeyInfo - --- CertBag - -pkcs-12-CertBag ::= SEQUENCE { - certId OBJECT IDENTIFIER, - certValue [0] EXPLICIT ANY DEFINED BY certId -} - --- x509Certificate BAG-TYPE ::= {OCTET STRING IDENTIFIED BY {pkcs-9-certTypes 1}} --- DER-encoded X.509 certificate stored in OCTET STRING - -pkcs-12-CRLBag ::= SEQUENCE { - crlId OBJECT IDENTIFIER, - crlValue [0] EXPLICIT ANY DEFINED BY crlId -} - --- x509CRL BAG-TYPE ::= --- {OCTET STRING IDENTIFIED BY {pkcs-9-crlTypes 1}} --- DER-encoded X.509 CRL stored in OCTET STRING - -pkcs-12-PKCS12Attribute ::= Attribute - --- PKCS #7 stuff (needed in PKCS 12) - -pkcs-7-Data ::= OCTET STRING - -pkcs-7-EncryptedData ::= SEQUENCE { - version INTEGER, - encryptedContentInfo pkcs-7-EncryptedContentInfo, - unprotectedAttrs [1] IMPLICIT pkcs-7-UnprotectedAttributes OPTIONAL } - -pkcs-7-EncryptedContentInfo ::= SEQUENCE { - contentType OBJECT IDENTIFIER, - contentEncryptionAlgorithm pkcs-7-ContentEncryptionAlgorithmIdentifier, - encryptedContent [0] IMPLICIT OCTET STRING OPTIONAL } - -pkcs-7-ContentEncryptionAlgorithmIdentifier ::= AlgorithmIdentifier - -pkcs-7-UnprotectedAttributes ::= SET SIZE (1..MAX) OF Attribute - --- LDAP stuff --- may not be correct - -id-at-ldap-DC AttributeType ::= { 0 9 2342 19200300 100 1 25 } - -ldap-DC ::= IA5String - -id-at-ldap-UID AttributeType ::= { 0 9 2342 19200300 100 1 1 } - -ldap-UID ::= DirectoryString - --- rfc3039 - -id-pda OBJECT IDENTIFIER ::= { id-pkix 9 } - -id-pda-dateOfBirth AttributeType ::= { id-pda 1 } -DateOfBirth ::= GeneralizedTime - -id-pda-placeOfBirth AttributeType ::= { id-pda 2 } -PlaceOfBirth ::= DirectoryString - -id-pda-gender AttributeType ::= { id-pda 3 } -Gender ::= PrintableString (SIZE(1)) - -- "M", "F", "m" or "f" - -id-pda-countryOfCitizenship AttributeType ::= { id-pda 4 } -CountryOfCitizenship ::= PrintableString (SIZE (2)) - -- ISO 3166 Country Code - -id-pda-countryOfResidence AttributeType ::= { id-pda 5 } -CountryOfResidence ::= PrintableString (SIZE (2)) - -- ISO 3166 Country Code - --- rfc3820 - -id-pe-proxyCertInfo OBJECT IDENTIFIER ::= { id-pe 14 } - -id-ppl-inheritAll OBJECT IDENTIFIER ::= { id-pkix 21 1 } -id-ppl-independent OBJECT IDENTIFIER ::= { id-pkix 21 2 } - -ProxyCertInfo ::= SEQUENCE { - pCPathLenConstraint INTEGER (0..MAX) OPTIONAL, - proxyPolicy ProxyPolicy } - -ProxyPolicy ::= SEQUENCE { - policyLanguage OBJECT IDENTIFIER, - policy OCTET STRING OPTIONAL } - --- rfc3920 section 5.1.1 - -id-on OBJECT IDENTIFIER ::= { id-pkix 8 } -- other name forms - -id-on-xmppAddr OBJECT IDENTIFIER ::= { id-on 5 } - -XmppAddr ::= UTF8String - --- ocsp - -BasicOCSPResponse ::= SEQUENCE { - tbsResponseData ResponseData, - signatureAlgorithm AlgorithmIdentifier, - signature BIT STRING, - certs [0] EXPLICIT SEQUENCE OF Certificate OPTIONAL } - -ResponseData ::= SEQUENCE { - version [0] EXPLICIT INTEGER DEFAULT 0, - responderID ResponderID, - producedAt GeneralizedTime, - responses SEQUENCE OF SingleResponse, - responseExtensions [1] EXPLICIT Extensions OPTIONAL } - -ResponderID ::= CHOICE { --- Changed to work with the libtasn1 parser. - byName [1] EXPLICIT RDNSequence, --Name - byKey [2] EXPLICIT OCTET STRING --SHA-1 hash of responder's public key -} - -CertID ::= SEQUENCE { - hashAlgorithm AlgorithmIdentifier, - issuerNameHash OCTET STRING, -- Hash of Issuer's DN - issuerKeyHash OCTET STRING, -- Hash of Issuers public key - serialNumber CertificateSerialNumber } - -CertStatus ::= CHOICE { - good [0] IMPLICIT NULL, - revoked [1] IMPLICIT RevokedInfo, - unknown [2] IMPLICIT UnknownInfo } - -SingleResponse ::= SEQUENCE { - certID CertID, - certStatus CertStatus, - thisUpdate GeneralizedTime, - nextUpdate [0] EXPLICIT GeneralizedTime OPTIONAL, - singleExtensions [1] EXPLICIT Extensions OPTIONAL } - -RevokedInfo ::= SEQUENCE { - revocationTime GeneralizedTime, - revocationReason [0] EXPLICIT CRLReason OPTIONAL } - -UnknownInfo ::= NULL -- this can be replaced with an enumeration - -END - --- Copyright (C) 2002-2014 Free Software Foundation, Inc. --- --- This file is part of LIBTASN1. --- --- This program is free software: you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation, either version 3 of the License, or --- (at your option) any later version. --- --- This program is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License --- along with this program. If not, see . - diff --git a/tests/spc_pe_image_data.c b/tests/spc_pe_image_data.c deleted file mode 100644 index a6bff0c..0000000 --- a/tests/spc_pe_image_data.c +++ /dev/null @@ -1,148 +0,0 @@ -/* - * Copyright (C) 2016 Red Hat, Inc. - * - * This file is part of LIBTASN1. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -#include -#include -#include -#include - -int main (int argc, char** argv) -{ - int result = 0, len; - asn1_node definitions = NULL, node1 = NULL; - char errorDescription[ASN1_MAX_ERROR_DESCRIPTION_SIZE]; - const char *choicefile = getenv ("ASN1_MSCAT"); - const char *datafile = getenv ("ASN1_SPC_PE_IMAGE_DATA"); - FILE *fp; - char data[1024]; - int data_size = sizeof (data); - unsigned etype; - int cmp; - - if (choicefile == NULL) { - choicefile = "mscat.asn"; - } - - if (datafile == NULL) { - datafile = "spc_pe_image_data.der"; - } - - result = asn1_parser2tree(choicefile, &definitions, errorDescription); - if (result != ASN1_SUCCESS) { - fprintf(stderr, "error in %d: %s\n", __LINE__, errorDescription); - exit (1); - } - - result = asn1_create_element(definitions, - "CATALOG.SpcPEImageData", - &node1); - if (result != ASN1_SUCCESS) { - fprintf(stderr, "error in %d\n", __LINE__); - exit (1); - } - - fp = fopen(datafile, "rb"); - if (fp == NULL) { - fprintf (stderr, "error in %d\n", __LINE__); - exit(1); - } - data_size = fread(data, 1, sizeof(data), fp); - fclose(fp); - - result = asn1_der_decoding2(&node1, - data, - &data_size, - ASN1_DECODE_FLAG_STRICT_DER, - errorDescription); - if (result != ASN1_SUCCESS) { - fprintf(stderr, "error in %d: decoding: %s\n", __LINE__, errorDescription); - exit(1); - } - - len = 0; - result = asn1_read_value_type(node1, - "flags", - NULL, - &len, - &etype); - if (result != ASN1_MEM_ERROR) { - fprintf(stderr, "error in %d: %s\n", __LINE__, errorDescription); - exit(1); - } - - if ((size_t)len >= sizeof(data)) { - fprintf(stderr, - "error len=%d, sizeof(data)=%zu\n", - len, - sizeof(data)); - exit(1); - } - - result = asn1_read_value(node1, "flags", data, &len); - if (result != ASN1_SUCCESS) { - fprintf(stderr, "error in %d: %s\n", __LINE__, errorDescription); - exit (1); - } - - etype = 0; - len = 0; - result = asn1_read_value_type(node1, "link", NULL, &len, &etype); - if (result != ASN1_MEM_ERROR) - { - fprintf(stderr, - "error in %d: result is: %s\n", - __LINE__, - asn1_strerror(result)); - exit(1); - } - - if (etype != ASN1_ETYPE_CHOICE) { - fprintf(stderr, - "error in %d: The type (%u) doesn't match choice.\n", - __LINE__, - etype); - exit(1); - } - - if (len != 5) { - fprintf (stderr, "length doesn't match the expected (got: %d, should be: 20)\n", len); - exit (1); - } - - len = sizeof(data); - result = asn1_read_value(node1, "link", data, &len); - if (result != ASN1_SUCCESS) { - fprintf(stderr, "error in %d: %s\n", __LINE__, errorDescription); - exit (1); - } - - cmp = memcmp(data, "file", len); - if (cmp != 0) { - fprintf(stderr, "contents don't match\n"); - exit(1); - } - - printf("SUCCESS\n"); - - asn1_delete_structure (&node1); - asn1_delete_structure (&definitions); - - return 0; -} diff --git a/tests/spc_pe_image_data.der b/tests/spc_pe_image_data.der deleted file mode 100644 index 0e72dfa..0000000 Binary files a/tests/spc_pe_image_data.der and /dev/null differ diff --git a/tests/strict-der.c b/tests/strict-der.c deleted file mode 100644 index 477e041..0000000 --- a/tests/strict-der.c +++ /dev/null @@ -1,136 +0,0 @@ -/* - * Copyright (C) 2002-2014 Free Software Foundation, Inc. - * - * This file is part of LIBTASN1. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - -#include -#include -#include -#include "libtasn1.h" - - - -int -main (int argc, char *argv[]) -{ - int result; - char buffer[10 * 1024]; - asn1_node definitions = NULL; - asn1_node asn1_element = NULL; - char errorDescription[ASN1_MAX_ERROR_DESCRIPTION_SIZE]; - FILE *out, *fd; - int size; - const char *treefile = getenv ("ASN1PKIX"); - const char *indeffile = getenv ("ASN1INDEF"); - int verbose = 0; - - if (argc > 1) - verbose = 1; - - if (!treefile) - treefile = "pkix.asn"; - - if (!indeffile) - indeffile = "TestIndef.p12"; - - if (verbose) - { - printf ("\n\n/****************************************/\n"); - printf ("/* Test sequence : strict DER decoding */\n"); - printf ("/****************************************/\n\n"); - printf ("ASN1TREE: %s\n", treefile); - } - - /* Check version */ - if (asn1_check_version ("0.2.11") == NULL) - printf ("\nLibrary version check ERROR:\n actual version: %s\n\n", - asn1_check_version (NULL)); - - result = asn1_parser2tree (treefile, &definitions, errorDescription); - if (result != ASN1_SUCCESS) - { - asn1_perror (result); - printf ("ErrorDescription = %s\n\n", errorDescription); - exit (1); - } - - out = stdout; - - fd = fopen (indeffile, "rb"); - if (fd == NULL) - { - printf ("Cannot read file %s\n", indeffile); - exit (1); - } - size = fread (buffer, 1, sizeof (buffer), fd); - if (size <= 0) - { - printf ("Cannot read from file %s\n", indeffile); - exit (1); - } - - fclose (fd); - - result = - asn1_create_element (definitions, "PKIX1.pkcs-12-PFX", &asn1_element); - if (result != ASN1_SUCCESS) - { - asn1_perror (result); - printf ("Cannot create PKCS12 element\n"); - exit (1); - } - - result = asn1_der_decoding2 (&asn1_element, buffer, &size, 0, errorDescription); - if (result != ASN1_SUCCESS) - { - asn1_perror (result); - printf ("Cannot decode BER data (size %ld) in %s: %s\n", (long) size, indeffile, errorDescription); - exit (1); - } - - asn1_delete_structure (&asn1_element); - - /* Now try with strict DER */ - result = - asn1_create_element (definitions, "PKIX1.pkcs-12-PFX", &asn1_element); - if (result != ASN1_SUCCESS) - { - asn1_perror (result); - printf ("Cannot create PKCS12 element\n"); - exit (1); - } - - result = asn1_der_decoding2 (&asn1_element, buffer, &size, ASN1_DECODE_FLAG_STRICT_DER, errorDescription); - if (result == ASN1_SUCCESS) - { - asn1_perror (result); - printf ("Should not have decoded DER data (size %ld) in %s: %s\n", (long) size, indeffile, errorDescription); - exit (1); - } - - asn1_delete_structure (&asn1_element); - - /* Clear the definition structures */ - asn1_delete_structure (&definitions); - - if (out != stdout) - fclose (out); - - exit (0); -} diff --git a/tests/threadsafety b/tests/threadsafety deleted file mode 100755 index 608fa16..0000000 --- a/tests/threadsafety +++ /dev/null @@ -1,175 +0,0 @@ -#!/bin/sh - -# Copyright (C) 2004-2014 Free Software Foundation, Inc. -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -FILES="$@" -FILES=${FILES:-$THREADSAFETY_FILES} -EGREP=${EGREP:-egrep} - -if test -z "$FILES"; then - echo "Usage: $0 [FILE...]" - exit 1 -fi - -UNSAFE="" - -# Thread unsafe functions according to latest POSIX, see: -# http://www.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html#tag_15_09_01 -UNSAFE="$UNSAFE asctime" -UNSAFE="$UNSAFE basename" -UNSAFE="$UNSAFE catgets" -UNSAFE="$UNSAFE crypt" -UNSAFE="$UNSAFE ctime" -UNSAFE="$UNSAFE dbm_clearerr" -UNSAFE="$UNSAFE dbm_close" -UNSAFE="$UNSAFE dbm_delete" -UNSAFE="$UNSAFE dbm_error" -UNSAFE="$UNSAFE dbm_fetch" -UNSAFE="$UNSAFE dbm_firstkey" -UNSAFE="$UNSAFE dbm_nextkey" -UNSAFE="$UNSAFE dbm_open" -UNSAFE="$UNSAFE dbm_store" -UNSAFE="$UNSAFE dirname" -UNSAFE="$UNSAFE dlerror" -UNSAFE="$UNSAFE drand48" -UNSAFE="$UNSAFE encrypt" -UNSAFE="$UNSAFE endgrent" -UNSAFE="$UNSAFE endpwent" -UNSAFE="$UNSAFE endutxent" -UNSAFE="$UNSAFE ftw" -UNSAFE="$UNSAFE getc_unlocked" -UNSAFE="$UNSAFE getchar_unlocked" -UNSAFE="$UNSAFE getdate" -UNSAFE="$UNSAFE getenv" -UNSAFE="$UNSAFE getgrent" -UNSAFE="$UNSAFE getgrgid" -UNSAFE="$UNSAFE getgrnam" -UNSAFE="$UNSAFE gethostent" -UNSAFE="$UNSAFE getlogin" -UNSAFE="$UNSAFE getnetbyaddr" -UNSAFE="$UNSAFE getnetbyname" -UNSAFE="$UNSAFE getnetent" -UNSAFE="$UNSAFE getopt" -UNSAFE="$UNSAFE getprotobyname" -UNSAFE="$UNSAFE getprotobynumber" -UNSAFE="$UNSAFE getprotoent" -UNSAFE="$UNSAFE getpwent" -UNSAFE="$UNSAFE getpwnam" -UNSAFE="$UNSAFE getpwuid" -UNSAFE="$UNSAFE getservbyname" -UNSAFE="$UNSAFE getservbyport" -UNSAFE="$UNSAFE getservent" -UNSAFE="$UNSAFE getutxent" -UNSAFE="$UNSAFE getutxid" -UNSAFE="$UNSAFE getutxline" -UNSAFE="$UNSAFE gmtime" -UNSAFE="$UNSAFE hcreate" -UNSAFE="$UNSAFE hdestroy" -UNSAFE="$UNSAFE hsearch" -UNSAFE="$UNSAFE inet_ntoa" -UNSAFE="$UNSAFE l64a" -UNSAFE="$UNSAFE lgamma" -UNSAFE="$UNSAFE lgammaf" -UNSAFE="$UNSAFE lgammal" -UNSAFE="$UNSAFE localeconv" -UNSAFE="$UNSAFE localtime" -UNSAFE="$UNSAFE lrand48" -UNSAFE="$UNSAFE mrand48" -UNSAFE="$UNSAFE nftw" -UNSAFE="$UNSAFE nl_langinfo" -UNSAFE="$UNSAFE ptsname" -UNSAFE="$UNSAFE putc_unlocked" -UNSAFE="$UNSAFE putchar_unlocked" -UNSAFE="$UNSAFE putenv" -UNSAFE="$UNSAFE pututxline" -UNSAFE="$UNSAFE rand" -UNSAFE="$UNSAFE readdir" -UNSAFE="$UNSAFE setenv" -UNSAFE="$UNSAFE setgrent" -UNSAFE="$UNSAFE setkey" -UNSAFE="$UNSAFE setpwent" -UNSAFE="$UNSAFE setutxent" -UNSAFE="$UNSAFE strerror" -UNSAFE="$UNSAFE strsignal" -UNSAFE="$UNSAFE strtok" -UNSAFE="$UNSAFE system" -UNSAFE="$UNSAFE ttyname" -UNSAFE="$UNSAFE unsetenv" -UNSAFE="$UNSAFE wcstombs" -UNSAFE="$UNSAFE wctomb" - -# Additional functions that aren't thread-safe if passed a NULL argument -UNSAFE="$UNSAFE ctermid" -UNSAFE="$UNSAFE tmpname" -UNSAFE="$UNSAFE wcrtomb" -UNSAFE="$UNSAFE wcsrtombs" - -# Legacy functions removed between issue 6 and 7, see: -# http://www.opengroup.org/onlinepubs/009695399/functions/xsh_chap02_09.html#tag_02_09_01 -UNSAFE="$UNSAFE ecvt" -UNSAFE="$UNSAFE fcvt" -UNSAFE="$UNSAFE gcvt" -UNSAFE="$UNSAFE gethostbyaddr" -UNSAFE="$UNSAFE gethostbyname" - -# Other (potentially) thread unsafe functions, see: -# http://blog.josefsson.org/2009/06/23/thread-safe-functions/ -UNSAFE="$UNSAFE erand48" -UNSAFE="$UNSAFE ether_aton" -UNSAFE="$UNSAFE ether_ntoa" -UNSAFE="$UNSAFE fgetgrent" -UNSAFE="$UNSAFE fgetpwent" -UNSAFE="$UNSAFE fgetspent" -UNSAFE="$UNSAFE getaliasbyname" -UNSAFE="$UNSAFE getaliasent" -UNSAFE="$UNSAFE gethostbyname2" -UNSAFE="$UNSAFE getmntent" -UNSAFE="$UNSAFE getnetgrent" -UNSAFE="$UNSAFE getrpcbyname" -UNSAFE="$UNSAFE getrpcbynumber" -UNSAFE="$UNSAFE getrpcent" -UNSAFE="$UNSAFE getspent" -UNSAFE="$UNSAFE getspnam" -UNSAFE="$UNSAFE getutent" -UNSAFE="$UNSAFE getutid" -UNSAFE="$UNSAFE getutline" -UNSAFE="$UNSAFE initstate" -UNSAFE="$UNSAFE jrand48" -UNSAFE="$UNSAFE lcong48" -UNSAFE="$UNSAFE nrand48" -UNSAFE="$UNSAFE qecvt" -UNSAFE="$UNSAFE qfcvt" -UNSAFE="$UNSAFE random" -UNSAFE="$UNSAFE seed48" -UNSAFE="$UNSAFE setstate" -UNSAFE="$UNSAFE sgetspent" -UNSAFE="$UNSAFE srand48" -UNSAFE="$UNSAFE srandom" - -set -- $UNSAFE -cmd="-e [^.>=_0-9a-z]($1" -shift -while test $# != 0; do - cmd="${cmd}|$1" - shift -done -cmd="${cmd})[^.>=_0-9a-z]*\(" - -if $EGREP $cmd $FILES; then - exit 1 -fi - -exit 0 diff --git a/windows/asn1-parser/asn1-parser.vcproj b/windows/asn1-parser/asn1-parser.vcproj deleted file mode 100755 index d71e9c9..0000000 --- a/windows/asn1-parser/asn1-parser.vcproj +++ /dev/null @@ -1,174 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/windows/asn1-parser/config.h b/windows/asn1-parser/config.h deleted file mode 100755 index 50f98e7..0000000 --- a/windows/asn1-parser/config.h +++ /dev/null @@ -1 +0,0 @@ -#define HAVE_GETOPT_H 1 diff --git a/windows/gnulib/getopt.h b/windows/gnulib/getopt.h deleted file mode 100755 index d8c6e4d..0000000 --- a/windows/gnulib/getopt.h +++ /dev/null @@ -1,2 +0,0 @@ -#define HAVE_GETOPT_LONG 1 -#include "getopt_.h" diff --git a/windows/gnulib/gnulib.vcproj b/windows/gnulib/gnulib.vcproj deleted file mode 100755 index 8808579..0000000 --- a/windows/gnulib/gnulib.vcproj +++ /dev/null @@ -1,180 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/windows/libtasn1.ncb b/windows/libtasn1.ncb deleted file mode 100755 index e8ad3b8..0000000 Binary files a/windows/libtasn1.ncb and /dev/null differ diff --git a/windows/libtasn1.sln b/windows/libtasn1.sln deleted file mode 100755 index 1c93911..0000000 --- a/windows/libtasn1.sln +++ /dev/null @@ -1,54 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual Studio 2005 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libtasn1", "libtasn1\libtasn1.vcproj", "{4DE20933-A72B-4261-9B63-0DE9AF31DAB2}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test-tree", "test-tree\test-tree.vcproj", "{53CDE0B4-BA0D-4911-8730-41B03CDC310A}" - ProjectSection(ProjectDependencies) = postProject - {4DE20933-A72B-4261-9B63-0DE9AF31DAB2} = {4DE20933-A72B-4261-9B63-0DE9AF31DAB2} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test-parser", "test-parser\test-parser.vcproj", "{CE8F8E2E-E5E9-43F6-A567-CB813B18C58A}" - ProjectSection(ProjectDependencies) = postProject - {4DE20933-A72B-4261-9B63-0DE9AF31DAB2} = {4DE20933-A72B-4261-9B63-0DE9AF31DAB2} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "asn1-parser", "asn1-parser\asn1-parser.vcproj", "{3E96D323-99DD-497F-991A-9316C9FFA99A}" - ProjectSection(ProjectDependencies) = postProject - {4DE20933-A72B-4261-9B63-0DE9AF31DAB2} = {4DE20933-A72B-4261-9B63-0DE9AF31DAB2} - {0C4318E2-FFD7-40DC-945C-40016B10665C} = {0C4318E2-FFD7-40DC-945C-40016B10665C} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gnulib", "gnulib\gnulib.vcproj", "{0C4318E2-FFD7-40DC-945C-40016B10665C}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {4DE20933-A72B-4261-9B63-0DE9AF31DAB2}.Debug|Win32.ActiveCfg = Debug|Win32 - {4DE20933-A72B-4261-9B63-0DE9AF31DAB2}.Debug|Win32.Build.0 = Debug|Win32 - {4DE20933-A72B-4261-9B63-0DE9AF31DAB2}.Release|Win32.ActiveCfg = Release|Win32 - {4DE20933-A72B-4261-9B63-0DE9AF31DAB2}.Release|Win32.Build.0 = Release|Win32 - {53CDE0B4-BA0D-4911-8730-41B03CDC310A}.Debug|Win32.ActiveCfg = Debug|Win32 - {53CDE0B4-BA0D-4911-8730-41B03CDC310A}.Debug|Win32.Build.0 = Debug|Win32 - {53CDE0B4-BA0D-4911-8730-41B03CDC310A}.Release|Win32.ActiveCfg = Release|Win32 - {53CDE0B4-BA0D-4911-8730-41B03CDC310A}.Release|Win32.Build.0 = Release|Win32 - {CE8F8E2E-E5E9-43F6-A567-CB813B18C58A}.Debug|Win32.ActiveCfg = Debug|Win32 - {CE8F8E2E-E5E9-43F6-A567-CB813B18C58A}.Debug|Win32.Build.0 = Debug|Win32 - {CE8F8E2E-E5E9-43F6-A567-CB813B18C58A}.Release|Win32.ActiveCfg = Release|Win32 - {CE8F8E2E-E5E9-43F6-A567-CB813B18C58A}.Release|Win32.Build.0 = Release|Win32 - {3E96D323-99DD-497F-991A-9316C9FFA99A}.Debug|Win32.ActiveCfg = Debug|Win32 - {3E96D323-99DD-497F-991A-9316C9FFA99A}.Debug|Win32.Build.0 = Debug|Win32 - {3E96D323-99DD-497F-991A-9316C9FFA99A}.Release|Win32.ActiveCfg = Release|Win32 - {3E96D323-99DD-497F-991A-9316C9FFA99A}.Release|Win32.Build.0 = Release|Win32 - {0C4318E2-FFD7-40DC-945C-40016B10665C}.Debug|Win32.ActiveCfg = Debug|Win32 - {0C4318E2-FFD7-40DC-945C-40016B10665C}.Debug|Win32.Build.0 = Debug|Win32 - {0C4318E2-FFD7-40DC-945C-40016B10665C}.Release|Win32.ActiveCfg = Release|Win32 - {0C4318E2-FFD7-40DC-945C-40016B10665C}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/windows/libtasn1.suo b/windows/libtasn1.suo deleted file mode 100755 index aecc6ca..0000000 Binary files a/windows/libtasn1.suo and /dev/null differ diff --git a/windows/libtasn1/libtasn1.vcproj b/windows/libtasn1/libtasn1.vcproj deleted file mode 100755 index 902a1c5..0000000 --- a/windows/libtasn1/libtasn1.vcproj +++ /dev/null @@ -1,222 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/windows/libtasn14win.mk b/windows/libtasn14win.mk deleted file mode 100644 index efae72b..0000000 --- a/windows/libtasn14win.mk +++ /dev/null @@ -1,51 +0,0 @@ -# Copyright (C) 2011-2013 Free Software Foundation, Inc. -# -# This file is part of LIBTASN1. -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# Written by Simon Josefsson October 2011. - -PACKAGE = libtasn1 -distdir = $(PACKAGE)-$(VERSION) -TGZ = $(distdir).tar.gz -URL = ftp://ftp.gnu.org/gnu/$(PACKAGE)/$(TGZ) - -all: - @echo 'Usage examples:' - @echo ' make -f libtasn14win.mk libtasn14win VERSION=2.10' - @echo ' make -f libtasn14win.mk libtasn14win32 VERSION=2.10 CHECK=check' - -libtasn14win: libtasn14win32 libtasn14win64 - -libtasn14win32: - $(MAKE) -f libtasn14win.mk doit ARCH=32 HOST=i686-w64-mingw32 CHECK=check - -libtasn14win64: - $(MAKE) -f libtasn14win.mk doit ARCH=64 HOST=x86_64-w64-mingw32 - -doit: - rm -rf tmp && mkdir tmp && cd tmp && \ - cp ../../$(TGZ) . || wget $(URL) && \ - tar xfa $(TGZ) && \ - cd $(distdir) && \ - ./configure --host=$(HOST) --build=x86_64-unknown-linux-gnu --prefix=$(PWD)/tmp/root && \ - make $(CHECK) install && \ - cd .. && \ - cd root && \ - zip -r ../../$(distdir)-win$(ARCH).zip * - -upload: - ../build-aux/gnupload --to ftp.gnu.org:$(PACKAGE) $(distdir)-win32.zip $(distdir)-win64.zip - cp $(distdir)-win32.zip $(distdir)-win32.zip.sig $(distdir)-win64.zip $(distdir)-win64.zip.sig ../../releases/$(PACKAGE)/ diff --git a/windows/test-parser/test-parser.vcproj b/windows/test-parser/test-parser.vcproj deleted file mode 100755 index 9e21ed1..0000000 --- a/windows/test-parser/test-parser.vcproj +++ /dev/null @@ -1,169 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/windows/test-tree/test-tree.vcproj b/windows/test-tree/test-tree.vcproj deleted file mode 100755 index 524086a..0000000 --- a/windows/test-tree/test-tree.vcproj +++ /dev/null @@ -1,172 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- cgit v1.2.1