diff --git a/.gitignore b/.gitignore index 441e077a9..a476f0bf9 100644 --- a/.gitignore +++ b/.gitignore @@ -19,11 +19,14 @@ config.status config.sub configure depcomp +html/ +Doxyfile gmon.out install-sh Makefile Makefile.in missing +rust/target src/config.h* stamp-h1 tests/*.err diff --git a/Makefile.am b/Makefile.am index 3931c3a71..fede5e824 100644 --- a/Makefile.am +++ b/Makefile.am @@ -13,6 +13,49 @@ dist_zshcomp_DATA = _the_silver_searcher EXTRA_DIST = Makefile.w32 LICENSE NOTICE the_silver_searcher.spec README.md +######################################################################################### + +RUST_SOURCE =\ + rust/Cargo.toml\ + rust/src/lib.rs + +RUST_EXTRA =\ + rust/Cargo.lock + +if DEBUG_RELEASE +CARGO_RELEASE_ARGS= +else +CARGO_RELEASE_ARGS=--release +endif + +rust_dir = $(top_srcdir)/rust + +check-local-rust: + cd $(rust_dir) && \ + CARGO_TARGET_DIR=target cargo test + +clean-local-rust: + cd $(rust_dir) && \ + cargo clean + +RUST_LIB=$(rust_dir)/target/@RUST_TARGET_SUBDIR@/librust_internals.a + +$(RUST_LIB): $(RUST_SOURCE) + cd $(rust_dir) && \ + CARGO_TARGET_DIR=target cargo build --verbose $(CARGO_RELEASE_ARGS) + +EXTRA_DIST += \ + $(RUST_SOURCE) \ + $(RUST_EXTRA) + +ag_LDADD += $(RUST_LIB) + +# solve undefined reference to 'dlsym' caused by newer +# versions of gcc/ld default to linking with --as-needed. +ag_LDFLAGS = -Wl,--no-as-needed -ldl + +######################################################################################### + all: @$(MAKE) ag -r diff --git a/README.md b/README.md index 9a88acf78..893184e54 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,18 @@ +# The Silver Searcher - Incremental manual transpilation to Rust + +Hi there! + +First of all, thank you for your work on this beautiful tool and for sharing it for free! + +About this pull request: +As part of my Bachelor thesis in Computer Science at the Technische Universität Darmstadt, I forumlated a "recipe" to do manual and incremental C to Rust transpilation and applied it on your project's filter and ignore functionalities. +Of course it would be great if you considered merging this pull request or branching off in your repository, but apart from that even some sort of smallish feedback would mean a lot coming from you and may substanciate further work on this topic. +For about 5 months, I will keep working on this with my thesis' supervisor, and, if everything works out, we will publish a paper - so thank you very much if you should find the time to contribute and help me pacing forward in this direction! + +Best +Phil + + # The Silver Searcher A code searching tool similar to `ack`, with a focus on speed. diff --git a/clean.sh b/clean.sh new file mode 100755 index 000000000..3db8bcbbf --- /dev/null +++ b/clean.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +make clean-local-rust && make clean && make distclean diff --git a/configure.ac b/configure.ac index 1267ce535..5f646d5ba 100644 --- a/configure.ac +++ b/configure.ac @@ -81,4 +81,26 @@ AM_COND_IF( [AC_MSG_WARN([clang-format not found. 'make test' will not detect improperly-formatted files.])] ) +############################################################################################### + +AC_ARG_ENABLE(debug, + AC_HELP_STRING([--enable-debug], + [Build Rust code with debugging information [default=no]]), + [debug_release=$enableval], + [debug_release=no]) + +AC_MSG_CHECKING(whether to build Rust code with debugging information) +if test "x$debug_release" = "xyes" ; then + AC_MSG_RESULT(yes) + RUST_TARGET_SUBDIR=debug +else + AC_MSG_RESULT(no) + RUST_TARGET_SUBDIR=release +fi +AM_CONDITIONAL([DEBUG_RELEASE], [test "x$debug_release" = "xyes"]) + +AC_SUBST([RUST_TARGET_SUBDIR]) + +############################################################################################### + AC_OUTPUT diff --git a/rust/Cargo.lock b/rust/Cargo.lock new file mode 100644 index 000000000..a0b1a62e3 --- /dev/null +++ b/rust/Cargo.lock @@ -0,0 +1,369 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +[[package]] +name = "aho-corasick" +version = "0.7.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "043164d8ba5c4c3035fec9bbee8647c0261d788f3474306f93bb65901cae0e86" +dependencies = [ + "memchr", +] + +[[package]] +name = "ansi_term" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" +dependencies = [ + "winapi", +] + +[[package]] +name = "atty" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" +dependencies = [ + "hermit-abi", + "libc", + "winapi", +] + +[[package]] +name = "bindgen" +version = "0.54.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4d49b80beb70d76cdac92f5681e666f9a697c737c4f4117a67229a0386dc736" +dependencies = [ + "bitflags", + "cexpr", + "cfg-if", + "clang-sys", + "clap", + "env_logger", + "lazy_static", + "lazycell", + "log", + "peeking_take_while", + "proc-macro2", + "quote", + "regex", + "rustc-hash", + "shlex", + "which", +] + +[[package]] +name = "bitflags" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" + +[[package]] +name = "cc" +version = "1.0.58" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9a06fb2e53271d7c279ec1efea6ab691c35a2ae67ec0d91d7acec0caf13b518" + +[[package]] +name = "cexpr" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4aedb84272dbe89af497cf81375129abda4fc0a9e7c5d317498c15cc30c0d27" +dependencies = [ + "nom", +] + +[[package]] +name = "cfg-if" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" + +[[package]] +name = "clang-sys" +version = "0.29.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe6837df1d5cba2397b835c8530f51723267e16abbf83892e9e5af4f0e5dd10a" +dependencies = [ + "glob", + "libc", + "libloading", +] + +[[package]] +name = "clap" +version = "2.33.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37e58ac78573c40708d45522f0d80fa2f01cc4f9b4e2bf749807255454312002" +dependencies = [ + "ansi_term", + "atty", + "bitflags", + "strsim", + "textwrap", + "unicode-width", + "vec_map", +] + +[[package]] +name = "cty" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7313c0d620d0cb4dbd9d019e461a4beb501071ff46ec0ab933efb4daa76d73e3" + +[[package]] +name = "env_logger" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36" +dependencies = [ + "atty", + "humantime", + "log", + "regex", + "termcolor", +] + +[[package]] +name = "glob" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" + +[[package]] +name = "hermit-abi" +version = "0.1.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3deed196b6e7f9e44a2ae8d94225d80302d81208b1bb673fd21fe634645c85a9" +dependencies = [ + "libc", +] + +[[package]] +name = "humantime" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f" +dependencies = [ + "quick-error", +] + +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" + +[[package]] +name = "lazycell" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" + +[[package]] +name = "libc" +version = "0.2.76" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "755456fae044e6fa1ebbbd1b3e902ae19e73097ed4ed87bb79934a867c007bc3" + +[[package]] +name = "libloading" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2b111a074963af1d37a139918ac6d49ad1d0d5e47f72fd55388619691a7d753" +dependencies = [ + "cc", + "winapi", +] + +[[package]] +name = "log" +version = "0.4.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fabed175da42fed1fa0746b0ea71f412aa9d35e76e95e59b192c64b9dc2bf8b" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "memchr" +version = "2.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400" + +[[package]] +name = "nom" +version = "5.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffb4262d26ed83a1c0a33a38fe2bb15797329c85770da05e6b828ddb782627af" +dependencies = [ + "memchr", + "version_check", +] + +[[package]] +name = "peeking_take_while" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" + +[[package]] +name = "proc-macro2" +version = "1.0.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04f5f085b5d71e2188cb8271e5da0161ad52c3f227a661a3c135fdf28e258b12" +dependencies = [ + "unicode-xid", +] + +[[package]] +name = "quick-error" +version = "1.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" + +[[package]] +name = "quote" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa563d17ecb180e500da1cfd2b028310ac758de548efdd203e18f283af693f37" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "regex" +version = "1.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c3780fcf44b193bc4d09f36d2a3c87b251da4a046c87795a0d35f4f927ad8e6" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", + "thread_local", +] + +[[package]] +name = "regex-syntax" +version = "0.6.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26412eb97c6b088a6997e05f69403a802a92d520de2f8e63c2b65f9e0f47c4e8" + +[[package]] +name = "rust" +version = "0.1.0" +dependencies = [ + "bindgen", + "cty", + "regex", +] + +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + +[[package]] +name = "shlex" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fdf1b9db47230893d76faad238fd6097fd6d6a9245cd7a4d90dbd639536bbd2" + +[[package]] +name = "strsim" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" + +[[package]] +name = "termcolor" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb6bfa289a4d7c5766392812c0a1f4c1ba45afa1ad47803c11e1f407d846d75f" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "textwrap" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" +dependencies = [ + "unicode-width", +] + +[[package]] +name = "thread_local" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d40c6d1b69745a6ec6fb1ca717914848da4b44ae29d9b3080cbee91d72a69b14" +dependencies = [ + "lazy_static", +] + +[[package]] +name = "unicode-width" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9337591893a19b88d8d87f2cec1e73fad5cdfd10e5a6f349f498ad6ea2ffb1e3" + +[[package]] +name = "unicode-xid" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7fe0bb3479651439c9112f72b6c505038574c9fbb575ed1bf3b797fa39dd564" + +[[package]] +name = "vec_map" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" + +[[package]] +name = "version_check" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5a972e5669d67ba988ce3dc826706fb0a8b01471c088cb0b6110b805cc36aed" + +[[package]] +name = "which" +version = "3.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d011071ae14a2f6671d0b74080ae0cd8ebf3a6f8c9589a2cd45f23126fe29724" +dependencies = [ + "libc", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +dependencies = [ + "winapi", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" diff --git a/rust/Cargo.toml b/rust/Cargo.toml new file mode 100644 index 000000000..04bd5b778 --- /dev/null +++ b/rust/Cargo.toml @@ -0,0 +1,18 @@ +[package] +name = "rust" +version = "0.1.0" +authors = ["Philip Koslowski "] +edition = "2018" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +cty = "0.2.1" +regex = "1.3.9" + +[build-dependencies] +bindgen = "0.54.1" + +[lib] +name = "rust_internals" +crate-type = ["staticlib"] diff --git a/rust/build.rs b/rust/build.rs new file mode 100644 index 000000000..e4f610705 --- /dev/null +++ b/rust/build.rs @@ -0,0 +1,16 @@ +extern crate bindgen; + +fn main() { + println!("cargo:rerun-if-changed=wrapper.h"); + + let bindings = bindgen::Builder::default() + .ctypes_prefix("cty") + .header("wrapper.h") + .rustfmt_bindings(true) + .generate() + .expect("Unable to generate bindings"); + + bindings + .write_to_file("src/bindings.rs") + .expect("Couldn't write bindings!"); +} diff --git a/rust/src/bindings.rs b/rust/src/bindings.rs new file mode 100644 index 000000000..73873dd4d --- /dev/null +++ b/rust/src/bindings.rs @@ -0,0 +1,8612 @@ +/* automatically generated by rust-bindgen 0.54.1 */ + +pub const _GETOPT_H: u32 = 1; +pub const _FEATURES_H: u32 = 1; +pub const _DEFAULT_SOURCE: u32 = 1; +pub const __GLIBC_USE_ISOC2X: u32 = 0; +pub const __USE_ISOC11: u32 = 1; +pub const __USE_ISOC99: u32 = 1; +pub const __USE_ISOC95: u32 = 1; +pub const __USE_POSIX_IMPLICITLY: u32 = 1; +pub const _POSIX_SOURCE: u32 = 1; +pub const _POSIX_C_SOURCE: u32 = 200809; +pub const __USE_POSIX: u32 = 1; +pub const __USE_POSIX2: u32 = 1; +pub const __USE_POSIX199309: u32 = 1; +pub const __USE_POSIX199506: u32 = 1; +pub const __USE_XOPEN2K: u32 = 1; +pub const __USE_XOPEN2K8: u32 = 1; +pub const _ATFILE_SOURCE: u32 = 1; +pub const __USE_MISC: u32 = 1; +pub const __USE_ATFILE: u32 = 1; +pub const __USE_FORTIFY_LEVEL: u32 = 0; +pub const __GLIBC_USE_DEPRECATED_GETS: u32 = 0; +pub const __GLIBC_USE_DEPRECATED_SCANF: u32 = 0; +pub const _STDC_PREDEF_H: u32 = 1; +pub const __STDC_IEC_559__: u32 = 1; +pub const __STDC_IEC_559_COMPLEX__: u32 = 1; +pub const __STDC_ISO_10646__: u32 = 201706; +pub const __GNU_LIBRARY__: u32 = 6; +pub const __GLIBC__: u32 = 2; +pub const __GLIBC_MINOR__: u32 = 32; +pub const _SYS_CDEFS_H: u32 = 1; +pub const __glibc_c99_flexarr_available: u32 = 1; +pub const __WORDSIZE: u32 = 64; +pub const __WORDSIZE_TIME64_COMPAT32: u32 = 1; +pub const __SYSCALL_WORDSIZE: u32 = 64; +pub const __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI: u32 = 0; +pub const __HAVE_GENERIC_SELECTION: u32 = 1; +pub const _GETOPT_CORE_H: u32 = 1; +pub const _GETOPT_EXT_H: u32 = 1; +pub const no_argument: u32 = 0; +pub const required_argument: u32 = 1; +pub const optional_argument: u32 = 2; +pub const _SYS_STAT_H: u32 = 1; +pub const _BITS_TYPES_H: u32 = 1; +pub const __TIMESIZE: u32 = 64; +pub const _BITS_TYPESIZES_H: u32 = 1; +pub const __OFF_T_MATCHES_OFF64_T: u32 = 1; +pub const __INO_T_MATCHES_INO64_T: u32 = 1; +pub const __RLIM_T_MATCHES_RLIM64_T: u32 = 1; +pub const __STATFS_MATCHES_STATFS64: u32 = 1; +pub const __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64: u32 = 1; +pub const __FD_SETSIZE: u32 = 1024; +pub const _BITS_TIME64_H: u32 = 1; +pub const _STRUCT_TIMESPEC: u32 = 1; +pub const _BITS_ENDIAN_H: u32 = 1; +pub const __LITTLE_ENDIAN: u32 = 1234; +pub const __BIG_ENDIAN: u32 = 4321; +pub const __PDP_ENDIAN: u32 = 3412; +pub const _BITS_ENDIANNESS_H: u32 = 1; +pub const __BYTE_ORDER: u32 = 1234; +pub const __FLOAT_WORD_ORDER: u32 = 1234; +pub const __time_t_defined: u32 = 1; +pub const _BITS_STAT_H: u32 = 1; +pub const _STAT_VER_KERNEL: u32 = 0; +pub const _STAT_VER_LINUX: u32 = 1; +pub const _MKNOD_VER_LINUX: u32 = 0; +pub const _STAT_VER: u32 = 1; +pub const __S_IFMT: u32 = 61440; +pub const __S_IFDIR: u32 = 16384; +pub const __S_IFCHR: u32 = 8192; +pub const __S_IFBLK: u32 = 24576; +pub const __S_IFREG: u32 = 32768; +pub const __S_IFIFO: u32 = 4096; +pub const __S_IFLNK: u32 = 40960; +pub const __S_IFSOCK: u32 = 49152; +pub const __S_ISUID: u32 = 2048; +pub const __S_ISGID: u32 = 1024; +pub const __S_ISVTX: u32 = 512; +pub const __S_IREAD: u32 = 256; +pub const __S_IWRITE: u32 = 128; +pub const __S_IEXEC: u32 = 64; +pub const UTIME_NOW: u32 = 1073741823; +pub const UTIME_OMIT: u32 = 1073741822; +pub const S_IFMT: u32 = 61440; +pub const S_IFDIR: u32 = 16384; +pub const S_IFCHR: u32 = 8192; +pub const S_IFBLK: u32 = 24576; +pub const S_IFREG: u32 = 32768; +pub const S_IFIFO: u32 = 4096; +pub const S_IFLNK: u32 = 40960; +pub const S_IFSOCK: u32 = 49152; +pub const S_ISUID: u32 = 2048; +pub const S_ISGID: u32 = 1024; +pub const S_ISVTX: u32 = 512; +pub const S_IRUSR: u32 = 256; +pub const S_IWUSR: u32 = 128; +pub const S_IXUSR: u32 = 64; +pub const S_IRWXU: u32 = 448; +pub const S_IREAD: u32 = 256; +pub const S_IWRITE: u32 = 128; +pub const S_IEXEC: u32 = 64; +pub const S_IRGRP: u32 = 32; +pub const S_IWGRP: u32 = 16; +pub const S_IXGRP: u32 = 8; +pub const S_IRWXG: u32 = 56; +pub const S_IROTH: u32 = 4; +pub const S_IWOTH: u32 = 2; +pub const S_IXOTH: u32 = 1; +pub const S_IRWXO: u32 = 7; +pub const ACCESSPERMS: u32 = 511; +pub const ALLPERMS: u32 = 4095; +pub const DEFFILEMODE: u32 = 438; +pub const S_BLKSIZE: u32 = 512; +pub const _MKNOD_VER: u32 = 0; +pub const PCRE_MAJOR: u32 = 8; +pub const PCRE_MINOR: u32 = 44; +pub const PCRE_DATE: u32 = 2006; +pub const __GLIBC_USE_LIB_EXT2: u32 = 0; +pub const __GLIBC_USE_IEC_60559_BFP_EXT: u32 = 0; +pub const __GLIBC_USE_IEC_60559_BFP_EXT_C2X: u32 = 0; +pub const __GLIBC_USE_IEC_60559_FUNCS_EXT: u32 = 0; +pub const __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X: u32 = 0; +pub const __GLIBC_USE_IEC_60559_TYPES_EXT: u32 = 0; +pub const _STDLIB_H: u32 = 1; +pub const WNOHANG: u32 = 1; +pub const WUNTRACED: u32 = 2; +pub const WSTOPPED: u32 = 2; +pub const WEXITED: u32 = 4; +pub const WCONTINUED: u32 = 8; +pub const WNOWAIT: u32 = 16777216; +pub const __WNOTHREAD: u32 = 536870912; +pub const __WALL: u32 = 1073741824; +pub const __WCLONE: u32 = 2147483648; +pub const __W_CONTINUED: u32 = 65535; +pub const __WCOREFLAG: u32 = 128; +pub const __HAVE_FLOAT128: u32 = 0; +pub const __HAVE_DISTINCT_FLOAT128: u32 = 0; +pub const __HAVE_FLOAT64X: u32 = 1; +pub const __HAVE_FLOAT64X_LONG_DOUBLE: u32 = 1; +pub const __HAVE_FLOAT16: u32 = 0; +pub const __HAVE_FLOAT32: u32 = 1; +pub const __HAVE_FLOAT64: u32 = 1; +pub const __HAVE_FLOAT32X: u32 = 1; +pub const __HAVE_FLOAT128X: u32 = 0; +pub const __HAVE_DISTINCT_FLOAT16: u32 = 0; +pub const __HAVE_DISTINCT_FLOAT32: u32 = 0; +pub const __HAVE_DISTINCT_FLOAT64: u32 = 0; +pub const __HAVE_DISTINCT_FLOAT32X: u32 = 0; +pub const __HAVE_DISTINCT_FLOAT64X: u32 = 0; +pub const __HAVE_DISTINCT_FLOAT128X: u32 = 0; +pub const __HAVE_FLOATN_NOT_TYPEDEF: u32 = 0; +pub const __ldiv_t_defined: u32 = 1; +pub const __lldiv_t_defined: u32 = 1; +pub const RAND_MAX: u32 = 2147483647; +pub const EXIT_FAILURE: u32 = 1; +pub const EXIT_SUCCESS: u32 = 0; +pub const _SYS_TYPES_H: u32 = 1; +pub const __clock_t_defined: u32 = 1; +pub const __clockid_t_defined: u32 = 1; +pub const __timer_t_defined: u32 = 1; +pub const _BITS_STDINT_INTN_H: u32 = 1; +pub const __BIT_TYPES_DEFINED__: u32 = 1; +pub const _ENDIAN_H: u32 = 1; +pub const LITTLE_ENDIAN: u32 = 1234; +pub const BIG_ENDIAN: u32 = 4321; +pub const PDP_ENDIAN: u32 = 3412; +pub const BYTE_ORDER: u32 = 1234; +pub const _BITS_BYTESWAP_H: u32 = 1; +pub const _BITS_UINTN_IDENTITY_H: u32 = 1; +pub const _SYS_SELECT_H: u32 = 1; +pub const __sigset_t_defined: u32 = 1; +pub const __timeval_defined: u32 = 1; +pub const FD_SETSIZE: u32 = 1024; +pub const _BITS_PTHREADTYPES_COMMON_H: u32 = 1; +pub const _THREAD_SHARED_TYPES_H: u32 = 1; +pub const _BITS_PTHREADTYPES_ARCH_H: u32 = 1; +pub const __SIZEOF_PTHREAD_MUTEX_T: u32 = 40; +pub const __SIZEOF_PTHREAD_ATTR_T: u32 = 56; +pub const __SIZEOF_PTHREAD_RWLOCK_T: u32 = 56; +pub const __SIZEOF_PTHREAD_BARRIER_T: u32 = 32; +pub const __SIZEOF_PTHREAD_MUTEXATTR_T: u32 = 4; +pub const __SIZEOF_PTHREAD_COND_T: u32 = 48; +pub const __SIZEOF_PTHREAD_CONDATTR_T: u32 = 4; +pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: u32 = 8; +pub const __SIZEOF_PTHREAD_BARRIERATTR_T: u32 = 4; +pub const _THREAD_MUTEX_INTERNAL_H: u32 = 1; +pub const __PTHREAD_MUTEX_HAVE_PREV: u32 = 1; +pub const __have_pthread_attr_t: u32 = 1; +pub const _ALLOCA_H: u32 = 1; +pub const PCRE_CASELESS: u32 = 1; +pub const PCRE_MULTILINE: u32 = 2; +pub const PCRE_DOTALL: u32 = 4; +pub const PCRE_EXTENDED: u32 = 8; +pub const PCRE_ANCHORED: u32 = 16; +pub const PCRE_DOLLAR_ENDONLY: u32 = 32; +pub const PCRE_EXTRA: u32 = 64; +pub const PCRE_NOTBOL: u32 = 128; +pub const PCRE_NOTEOL: u32 = 256; +pub const PCRE_UNGREEDY: u32 = 512; +pub const PCRE_NOTEMPTY: u32 = 1024; +pub const PCRE_UTF8: u32 = 2048; +pub const PCRE_UTF16: u32 = 2048; +pub const PCRE_UTF32: u32 = 2048; +pub const PCRE_NO_AUTO_CAPTURE: u32 = 4096; +pub const PCRE_NO_UTF8_CHECK: u32 = 8192; +pub const PCRE_NO_UTF16_CHECK: u32 = 8192; +pub const PCRE_NO_UTF32_CHECK: u32 = 8192; +pub const PCRE_AUTO_CALLOUT: u32 = 16384; +pub const PCRE_PARTIAL_SOFT: u32 = 32768; +pub const PCRE_PARTIAL: u32 = 32768; +pub const PCRE_NEVER_UTF: u32 = 65536; +pub const PCRE_DFA_SHORTEST: u32 = 65536; +pub const PCRE_NO_AUTO_POSSESS: u32 = 131072; +pub const PCRE_DFA_RESTART: u32 = 131072; +pub const PCRE_FIRSTLINE: u32 = 262144; +pub const PCRE_DUPNAMES: u32 = 524288; +pub const PCRE_NEWLINE_CR: u32 = 1048576; +pub const PCRE_NEWLINE_LF: u32 = 2097152; +pub const PCRE_NEWLINE_CRLF: u32 = 3145728; +pub const PCRE_NEWLINE_ANY: u32 = 4194304; +pub const PCRE_NEWLINE_ANYCRLF: u32 = 5242880; +pub const PCRE_BSR_ANYCRLF: u32 = 8388608; +pub const PCRE_BSR_UNICODE: u32 = 16777216; +pub const PCRE_JAVASCRIPT_COMPAT: u32 = 33554432; +pub const PCRE_NO_START_OPTIMIZE: u32 = 67108864; +pub const PCRE_NO_START_OPTIMISE: u32 = 67108864; +pub const PCRE_PARTIAL_HARD: u32 = 134217728; +pub const PCRE_NOTEMPTY_ATSTART: u32 = 268435456; +pub const PCRE_UCP: u32 = 536870912; +pub const PCRE_ERROR_NOMATCH: i32 = -1; +pub const PCRE_ERROR_NULL: i32 = -2; +pub const PCRE_ERROR_BADOPTION: i32 = -3; +pub const PCRE_ERROR_BADMAGIC: i32 = -4; +pub const PCRE_ERROR_UNKNOWN_OPCODE: i32 = -5; +pub const PCRE_ERROR_UNKNOWN_NODE: i32 = -5; +pub const PCRE_ERROR_NOMEMORY: i32 = -6; +pub const PCRE_ERROR_NOSUBSTRING: i32 = -7; +pub const PCRE_ERROR_MATCHLIMIT: i32 = -8; +pub const PCRE_ERROR_CALLOUT: i32 = -9; +pub const PCRE_ERROR_BADUTF8: i32 = -10; +pub const PCRE_ERROR_BADUTF16: i32 = -10; +pub const PCRE_ERROR_BADUTF32: i32 = -10; +pub const PCRE_ERROR_BADUTF8_OFFSET: i32 = -11; +pub const PCRE_ERROR_BADUTF16_OFFSET: i32 = -11; +pub const PCRE_ERROR_PARTIAL: i32 = -12; +pub const PCRE_ERROR_BADPARTIAL: i32 = -13; +pub const PCRE_ERROR_INTERNAL: i32 = -14; +pub const PCRE_ERROR_BADCOUNT: i32 = -15; +pub const PCRE_ERROR_DFA_UITEM: i32 = -16; +pub const PCRE_ERROR_DFA_UCOND: i32 = -17; +pub const PCRE_ERROR_DFA_UMLIMIT: i32 = -18; +pub const PCRE_ERROR_DFA_WSSIZE: i32 = -19; +pub const PCRE_ERROR_DFA_RECURSE: i32 = -20; +pub const PCRE_ERROR_RECURSIONLIMIT: i32 = -21; +pub const PCRE_ERROR_NULLWSLIMIT: i32 = -22; +pub const PCRE_ERROR_BADNEWLINE: i32 = -23; +pub const PCRE_ERROR_BADOFFSET: i32 = -24; +pub const PCRE_ERROR_SHORTUTF8: i32 = -25; +pub const PCRE_ERROR_SHORTUTF16: i32 = -25; +pub const PCRE_ERROR_RECURSELOOP: i32 = -26; +pub const PCRE_ERROR_JIT_STACKLIMIT: i32 = -27; +pub const PCRE_ERROR_BADMODE: i32 = -28; +pub const PCRE_ERROR_BADENDIANNESS: i32 = -29; +pub const PCRE_ERROR_DFA_BADRESTART: i32 = -30; +pub const PCRE_ERROR_JIT_BADOPTION: i32 = -31; +pub const PCRE_ERROR_BADLENGTH: i32 = -32; +pub const PCRE_ERROR_UNSET: i32 = -33; +pub const PCRE_UTF8_ERR0: u32 = 0; +pub const PCRE_UTF8_ERR1: u32 = 1; +pub const PCRE_UTF8_ERR2: u32 = 2; +pub const PCRE_UTF8_ERR3: u32 = 3; +pub const PCRE_UTF8_ERR4: u32 = 4; +pub const PCRE_UTF8_ERR5: u32 = 5; +pub const PCRE_UTF8_ERR6: u32 = 6; +pub const PCRE_UTF8_ERR7: u32 = 7; +pub const PCRE_UTF8_ERR8: u32 = 8; +pub const PCRE_UTF8_ERR9: u32 = 9; +pub const PCRE_UTF8_ERR10: u32 = 10; +pub const PCRE_UTF8_ERR11: u32 = 11; +pub const PCRE_UTF8_ERR12: u32 = 12; +pub const PCRE_UTF8_ERR13: u32 = 13; +pub const PCRE_UTF8_ERR14: u32 = 14; +pub const PCRE_UTF8_ERR15: u32 = 15; +pub const PCRE_UTF8_ERR16: u32 = 16; +pub const PCRE_UTF8_ERR17: u32 = 17; +pub const PCRE_UTF8_ERR18: u32 = 18; +pub const PCRE_UTF8_ERR19: u32 = 19; +pub const PCRE_UTF8_ERR20: u32 = 20; +pub const PCRE_UTF8_ERR21: u32 = 21; +pub const PCRE_UTF8_ERR22: u32 = 22; +pub const PCRE_UTF16_ERR0: u32 = 0; +pub const PCRE_UTF16_ERR1: u32 = 1; +pub const PCRE_UTF16_ERR2: u32 = 2; +pub const PCRE_UTF16_ERR3: u32 = 3; +pub const PCRE_UTF16_ERR4: u32 = 4; +pub const PCRE_UTF32_ERR0: u32 = 0; +pub const PCRE_UTF32_ERR1: u32 = 1; +pub const PCRE_UTF32_ERR2: u32 = 2; +pub const PCRE_UTF32_ERR3: u32 = 3; +pub const PCRE_INFO_OPTIONS: u32 = 0; +pub const PCRE_INFO_SIZE: u32 = 1; +pub const PCRE_INFO_CAPTURECOUNT: u32 = 2; +pub const PCRE_INFO_BACKREFMAX: u32 = 3; +pub const PCRE_INFO_FIRSTBYTE: u32 = 4; +pub const PCRE_INFO_FIRSTCHAR: u32 = 4; +pub const PCRE_INFO_FIRSTTABLE: u32 = 5; +pub const PCRE_INFO_LASTLITERAL: u32 = 6; +pub const PCRE_INFO_NAMEENTRYSIZE: u32 = 7; +pub const PCRE_INFO_NAMECOUNT: u32 = 8; +pub const PCRE_INFO_NAMETABLE: u32 = 9; +pub const PCRE_INFO_STUDYSIZE: u32 = 10; +pub const PCRE_INFO_DEFAULT_TABLES: u32 = 11; +pub const PCRE_INFO_OKPARTIAL: u32 = 12; +pub const PCRE_INFO_JCHANGED: u32 = 13; +pub const PCRE_INFO_HASCRORLF: u32 = 14; +pub const PCRE_INFO_MINLENGTH: u32 = 15; +pub const PCRE_INFO_JIT: u32 = 16; +pub const PCRE_INFO_JITSIZE: u32 = 17; +pub const PCRE_INFO_MAXLOOKBEHIND: u32 = 18; +pub const PCRE_INFO_FIRSTCHARACTER: u32 = 19; +pub const PCRE_INFO_FIRSTCHARACTERFLAGS: u32 = 20; +pub const PCRE_INFO_REQUIREDCHAR: u32 = 21; +pub const PCRE_INFO_REQUIREDCHARFLAGS: u32 = 22; +pub const PCRE_INFO_MATCHLIMIT: u32 = 23; +pub const PCRE_INFO_RECURSIONLIMIT: u32 = 24; +pub const PCRE_INFO_MATCH_EMPTY: u32 = 25; +pub const PCRE_CONFIG_UTF8: u32 = 0; +pub const PCRE_CONFIG_NEWLINE: u32 = 1; +pub const PCRE_CONFIG_LINK_SIZE: u32 = 2; +pub const PCRE_CONFIG_POSIX_MALLOC_THRESHOLD: u32 = 3; +pub const PCRE_CONFIG_MATCH_LIMIT: u32 = 4; +pub const PCRE_CONFIG_STACKRECURSE: u32 = 5; +pub const PCRE_CONFIG_UNICODE_PROPERTIES: u32 = 6; +pub const PCRE_CONFIG_MATCH_LIMIT_RECURSION: u32 = 7; +pub const PCRE_CONFIG_BSR: u32 = 8; +pub const PCRE_CONFIG_JIT: u32 = 9; +pub const PCRE_CONFIG_UTF16: u32 = 10; +pub const PCRE_CONFIG_JITTARGET: u32 = 11; +pub const PCRE_CONFIG_UTF32: u32 = 12; +pub const PCRE_CONFIG_PARENS_LIMIT: u32 = 13; +pub const PCRE_STUDY_JIT_COMPILE: u32 = 1; +pub const PCRE_STUDY_JIT_PARTIAL_SOFT_COMPILE: u32 = 2; +pub const PCRE_STUDY_JIT_PARTIAL_HARD_COMPILE: u32 = 4; +pub const PCRE_STUDY_EXTRA_NEEDED: u32 = 8; +pub const PCRE_EXTRA_STUDY_DATA: u32 = 1; +pub const PCRE_EXTRA_MATCH_LIMIT: u32 = 2; +pub const PCRE_EXTRA_CALLOUT_DATA: u32 = 4; +pub const PCRE_EXTRA_TABLES: u32 = 8; +pub const PCRE_EXTRA_MATCH_LIMIT_RECURSION: u32 = 16; +pub const PCRE_EXTRA_MARK: u32 = 32; +pub const PCRE_EXTRA_EXECUTABLE_JIT: u32 = 64; +pub const DEFAULT_AFTER_LEN: u32 = 2; +pub const DEFAULT_BEFORE_LEN: u32 = 2; +pub const DEFAULT_CONTEXT_LEN: u32 = 2; +pub const DEFAULT_MAX_SEARCH_DEPTH: u32 = 25; +pub const _DIRENT_H: u32 = 1; +pub const _DIRENT_MATCHES_DIRENT64: u32 = 1; +pub const _BITS_POSIX1_LIM_H: u32 = 1; +pub const _POSIX_AIO_LISTIO_MAX: u32 = 2; +pub const _POSIX_AIO_MAX: u32 = 1; +pub const _POSIX_ARG_MAX: u32 = 4096; +pub const _POSIX_CHILD_MAX: u32 = 25; +pub const _POSIX_DELAYTIMER_MAX: u32 = 32; +pub const _POSIX_HOST_NAME_MAX: u32 = 255; +pub const _POSIX_LINK_MAX: u32 = 8; +pub const _POSIX_LOGIN_NAME_MAX: u32 = 9; +pub const _POSIX_MAX_CANON: u32 = 255; +pub const _POSIX_MAX_INPUT: u32 = 255; +pub const _POSIX_MQ_OPEN_MAX: u32 = 8; +pub const _POSIX_MQ_PRIO_MAX: u32 = 32; +pub const _POSIX_NAME_MAX: u32 = 14; +pub const _POSIX_NGROUPS_MAX: u32 = 8; +pub const _POSIX_OPEN_MAX: u32 = 20; +pub const _POSIX_PATH_MAX: u32 = 256; +pub const _POSIX_PIPE_BUF: u32 = 512; +pub const _POSIX_RE_DUP_MAX: u32 = 255; +pub const _POSIX_RTSIG_MAX: u32 = 8; +pub const _POSIX_SEM_NSEMS_MAX: u32 = 256; +pub const _POSIX_SEM_VALUE_MAX: u32 = 32767; +pub const _POSIX_SIGQUEUE_MAX: u32 = 32; +pub const _POSIX_SSIZE_MAX: u32 = 32767; +pub const _POSIX_STREAM_MAX: u32 = 8; +pub const _POSIX_SYMLINK_MAX: u32 = 255; +pub const _POSIX_SYMLOOP_MAX: u32 = 8; +pub const _POSIX_TIMER_MAX: u32 = 32; +pub const _POSIX_TTY_NAME_MAX: u32 = 9; +pub const _POSIX_TZNAME_MAX: u32 = 6; +pub const _POSIX_CLOCKRES_MIN: u32 = 20000000; +pub const NR_OPEN: u32 = 1024; +pub const NGROUPS_MAX: u32 = 65536; +pub const ARG_MAX: u32 = 131072; +pub const LINK_MAX: u32 = 127; +pub const MAX_CANON: u32 = 255; +pub const MAX_INPUT: u32 = 255; +pub const NAME_MAX: u32 = 255; +pub const PATH_MAX: u32 = 4096; +pub const PIPE_BUF: u32 = 4096; +pub const XATTR_NAME_MAX: u32 = 255; +pub const XATTR_SIZE_MAX: u32 = 65536; +pub const XATTR_LIST_MAX: u32 = 65536; +pub const RTSIG_MAX: u32 = 32; +pub const _POSIX_THREAD_KEYS_MAX: u32 = 128; +pub const PTHREAD_KEYS_MAX: u32 = 1024; +pub const _POSIX_THREAD_DESTRUCTOR_ITERATIONS: u32 = 4; +pub const PTHREAD_DESTRUCTOR_ITERATIONS: u32 = 4; +pub const _POSIX_THREAD_THREADS_MAX: u32 = 64; +pub const AIO_PRIO_DELTA_MAX: u32 = 20; +pub const PTHREAD_STACK_MIN: u32 = 16384; +pub const DELAYTIMER_MAX: u32 = 2147483647; +pub const TTY_NAME_MAX: u32 = 32; +pub const LOGIN_NAME_MAX: u32 = 256; +pub const HOST_NAME_MAX: u32 = 64; +pub const MQ_PRIO_MAX: u32 = 32768; +pub const SEM_VALUE_MAX: u32 = 2147483647; +pub const MAXNAMLEN: u32 = 255; +pub const _STDINT_H: u32 = 1; +pub const _BITS_WCHAR_H: u32 = 1; +pub const _BITS_STDINT_UINTN_H: u32 = 1; +pub const INT8_MIN: i32 = -128; +pub const INT16_MIN: i32 = -32768; +pub const INT32_MIN: i32 = -2147483648; +pub const INT8_MAX: u32 = 127; +pub const INT16_MAX: u32 = 32767; +pub const INT32_MAX: u32 = 2147483647; +pub const UINT8_MAX: u32 = 255; +pub const UINT16_MAX: u32 = 65535; +pub const UINT32_MAX: u32 = 4294967295; +pub const INT_LEAST8_MIN: i32 = -128; +pub const INT_LEAST16_MIN: i32 = -32768; +pub const INT_LEAST32_MIN: i32 = -2147483648; +pub const INT_LEAST8_MAX: u32 = 127; +pub const INT_LEAST16_MAX: u32 = 32767; +pub const INT_LEAST32_MAX: u32 = 2147483647; +pub const UINT_LEAST8_MAX: u32 = 255; +pub const UINT_LEAST16_MAX: u32 = 65535; +pub const UINT_LEAST32_MAX: u32 = 4294967295; +pub const INT_FAST8_MIN: i32 = -128; +pub const INT_FAST16_MIN: i64 = -9223372036854775808; +pub const INT_FAST32_MIN: i64 = -9223372036854775808; +pub const INT_FAST8_MAX: u32 = 127; +pub const INT_FAST16_MAX: u64 = 9223372036854775807; +pub const INT_FAST32_MAX: u64 = 9223372036854775807; +pub const UINT_FAST8_MAX: u32 = 255; +pub const UINT_FAST16_MAX: i32 = -1; +pub const UINT_FAST32_MAX: i32 = -1; +pub const INTPTR_MIN: i64 = -9223372036854775808; +pub const INTPTR_MAX: u64 = 9223372036854775807; +pub const UINTPTR_MAX: i32 = -1; +pub const PTRDIFF_MIN: i64 = -9223372036854775808; +pub const PTRDIFF_MAX: u64 = 9223372036854775807; +pub const SIG_ATOMIC_MIN: i32 = -2147483648; +pub const SIG_ATOMIC_MAX: u32 = 2147483647; +pub const SIZE_MAX: i32 = -1; +pub const WINT_MIN: u32 = 0; +pub const WINT_MAX: u32 = 4294967295; +pub const _STDIO_H: u32 = 1; +pub const __GNUC_VA_LIST: u32 = 1; +pub const _____fpos_t_defined: u32 = 1; +pub const ____mbstate_t_defined: u32 = 1; +pub const _____fpos64_t_defined: u32 = 1; +pub const ____FILE_defined: u32 = 1; +pub const __FILE_defined: u32 = 1; +pub const __struct_FILE_defined: u32 = 1; +pub const _IO_EOF_SEEN: u32 = 16; +pub const _IO_ERR_SEEN: u32 = 32; +pub const _IO_USER_LOCK: u32 = 32768; +pub const _IOFBF: u32 = 0; +pub const _IOLBF: u32 = 1; +pub const _IONBF: u32 = 2; +pub const BUFSIZ: u32 = 8192; +pub const EOF: i32 = -1; +pub const SEEK_SET: u32 = 0; +pub const SEEK_CUR: u32 = 1; +pub const SEEK_END: u32 = 2; +pub const P_tmpdir: &'static [u8; 5usize] = b"/tmp\0"; +pub const _BITS_STDIO_LIM_H: u32 = 1; +pub const L_tmpnam: u32 = 20; +pub const TMP_MAX: u32 = 238328; +pub const FILENAME_MAX: u32 = 4096; +pub const L_ctermid: u32 = 9; +pub const FOPEN_MAX: u32 = 16; +pub const _STRING_H: u32 = 1; +pub const _BITS_TYPES_LOCALE_T_H: u32 = 1; +pub const _BITS_TYPES___LOCALE_T_H: u32 = 1; +pub const _STRINGS_H: u32 = 1; +pub const _SYS_TIME_H: u32 = 1; +pub const HAVE_ERR_H: u32 = 1; +pub const HAVE_FOPENCOOKIE: u32 = 1; +pub const HAVE_GETLINE: u32 = 1; +pub const HAVE_INTTYPES_H: u32 = 1; +pub const HAVE_LZMA_H: u32 = 1; +pub const HAVE_MADVISE: u32 = 1; +pub const HAVE_MEMORY_H: u32 = 1; +pub const HAVE_POSIX_FADVISE: u32 = 1; +pub const HAVE_PTHREAD_H: u32 = 1; +pub const HAVE_PTHREAD_PRIO_INHERIT: u32 = 1; +pub const HAVE_PTHREAD_SETAFFINITY_NP: u32 = 1; +pub const HAVE_REALPATH: u32 = 1; +pub const HAVE_STDINT_H: u32 = 1; +pub const HAVE_STDLIB_H: u32 = 1; +pub const HAVE_STRINGS_H: u32 = 1; +pub const HAVE_STRING_H: u32 = 1; +pub const HAVE_STRNDUP: u32 = 1; +pub const HAVE_SYS_STAT_H: u32 = 1; +pub const HAVE_SYS_TYPES_H: u32 = 1; +pub const HAVE_UNISTD_H: u32 = 1; +pub const HAVE_VASPRINTF: u32 = 1; +pub const HAVE_ZLIB_H: u32 = 1; +pub const PACKAGE_BUGREPORT: &'static [u8; 53usize] = + b"https://github.com/ggreer/the_silver_searcher/issues\0"; +pub const PACKAGE_NAME: &'static [u8; 20usize] = b"the_silver_searcher\0"; +pub const PACKAGE_STRING: &'static [u8; 26usize] = b"the_silver_searcher 2.2.0\0"; +pub const PACKAGE_TARNAME: &'static [u8; 20usize] = b"the_silver_searcher\0"; +pub const PACKAGE_URL: &'static [u8; 46usize] = b"https://github.com/ggreer/the_silver_searcher\0"; +pub const PACKAGE_VERSION: &'static [u8; 6usize] = b"2.2.0\0"; +pub const STDC_HEADERS: u32 = 1; +pub const _PTHREAD_H: u32 = 1; +pub const _SCHED_H: u32 = 1; +pub const _BITS_SCHED_H: u32 = 1; +pub const SCHED_OTHER: u32 = 0; +pub const SCHED_FIFO: u32 = 1; +pub const SCHED_RR: u32 = 2; +pub const _BITS_TYPES_STRUCT_SCHED_PARAM: u32 = 1; +pub const _BITS_CPU_SET_H: u32 = 1; +pub const __CPU_SETSIZE: u32 = 1024; +pub const _TIME_H: u32 = 1; +pub const _BITS_TIME_H: u32 = 1; +pub const CLOCK_REALTIME: u32 = 0; +pub const CLOCK_MONOTONIC: u32 = 1; +pub const CLOCK_PROCESS_CPUTIME_ID: u32 = 2; +pub const CLOCK_THREAD_CPUTIME_ID: u32 = 3; +pub const CLOCK_MONOTONIC_RAW: u32 = 4; +pub const CLOCK_REALTIME_COARSE: u32 = 5; +pub const CLOCK_MONOTONIC_COARSE: u32 = 6; +pub const CLOCK_BOOTTIME: u32 = 7; +pub const CLOCK_REALTIME_ALARM: u32 = 8; +pub const CLOCK_BOOTTIME_ALARM: u32 = 9; +pub const CLOCK_TAI: u32 = 11; +pub const TIMER_ABSTIME: u32 = 1; +pub const __struct_tm_defined: u32 = 1; +pub const __itimerspec_defined: u32 = 1; +pub const TIME_UTC: u32 = 1; +pub const _BITS_SETJMP_H: u32 = 1; +pub const PTHREAD_ONCE_INIT: u32 = 0; +pub const PTHREAD_BARRIER_SERIAL_THREAD: i32 = -1; +pub const TRUE: u32 = 1; +pub const FALSE: u32 = 0; +pub const H_SIZE: u32 = 65536; +extern "C" { + pub static mut optarg: *mut cty::c_char; +} +extern "C" { + pub static mut optind: cty::c_int; +} +extern "C" { + pub static mut opterr: cty::c_int; +} +extern "C" { + pub static mut optopt: cty::c_int; +} +extern "C" { + pub fn getopt( + ___argc: cty::c_int, + ___argv: *const *mut cty::c_char, + __shortopts: *const cty::c_char, + ) -> cty::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct option { + pub name: *const cty::c_char, + pub has_arg: cty::c_int, + pub flag: *mut cty::c_int, + pub val: cty::c_int, +} +#[test] +fn bindgen_test_layout_option() { + assert_eq!( + ::std::mem::size_of::