diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ae2a5e4..d064b3e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, macos-latest, windows-2019] - features: [default, bundled] + features: [default, bundled, buildtime_bindgen] runs-on: ${{ matrix.os }} steps: - name: Checkout sources @@ -33,6 +33,7 @@ jobs: run: | echo "RUSTFLAGS=-D warnings" >> $GITHUB_ENV echo "RUSTDOCFLAGS=-D warnings" >> $GITHUB_ENV + echo "BINDGEN_EXTRA_CLANG_ARGS=-I./pq-src/source/src/interfaces/libpq/ -I./pq-src/source/src/include/ -I ./pq-src/additional_include" >> $GITHUB_ENV - name: Install postgres (Linux) if: runner.os == 'Linux' && matrix.features == 'default' run: | @@ -52,7 +53,7 @@ jobs: createuser -s postgres - name: Install postgres (Windows) - if: runner.os == 'Windows' && matrix.features == 'default' + if: runner.os == 'Windows' && matrix.features != 'bundled' shell: bash run: | choco install postgresql12 --force --params '/Password:root' diff --git a/Cargo.toml b/Cargo.toml index 43a1b0b..84de9ab 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,10 +14,11 @@ members = ["pq-src"] name = "pq_sys" [dependencies] -pq-src = { path = "pq-src", optional = true } +pq-src = { path = "pq-src", version = "0.1", optional = true } [build-dependencies] pkg-config = { version = "0.3.0", optional = true } +bindgen = { version = "0.69.1", optional = true } [target.'cfg(target_env = "msvc")'.build-dependencies] vcpkg = "0.2.6" @@ -25,3 +26,4 @@ vcpkg = "0.2.6" [features] default = [] bundled = ["pq-src"] +buildtime_bindgen = ["dep:bindgen"] diff --git a/build.rs b/build.rs index c91cb04..669353f 100644 --- a/build.rs +++ b/build.rs @@ -1,17 +1,17 @@ -#[cfg(feature="pkg-config")] +#[cfg(feature = "pkg-config")] extern crate pkg_config; #[cfg(target_env = "msvc")] extern crate vcpkg; -use std::process::Command; use std::env; -use std::path::PathBuf; use std::fmt::{self, Display}; +use std::path::PathBuf; +use std::process::Command; enum LinkType { Static, - Dynamic + Dynamic, } impl Display for LinkType { @@ -32,19 +32,19 @@ impl LinkingOptions { fn from_name_and_type(lib_name: &'static str, tpe: LinkType) -> Self { LinkingOptions { linking_type: Some(tpe), - lib_name + lib_name, } } fn from_name(lib_name: &'static str) -> Self { LinkingOptions { linking_type: None, - lib_name + lib_name, } } fn from_env() -> Self { // On Windows-MSVC, always link dynamically - if cfg!(all(windows, target_env="msvc")) { + if cfg!(all(windows, target_env = "msvc")) { return LinkingOptions::from_name_and_type("libpq", LinkType::Dynamic); } @@ -55,7 +55,10 @@ impl LinkingOptions { // Examine the per-target env vars if let Ok(target) = env::var("TARGET") { - let pg_config_for_target = format!("PQ_LIB_STATIC_{}", target.to_ascii_uppercase().replace("-", "_")); + let pg_config_for_target = format!( + "PQ_LIB_STATIC_{}", + target.to_ascii_uppercase().replace("-", "_") + ); println!("cargo:rerun-if-env-changed={}", pg_config_for_target); if env::var_os(&pg_config_for_target).is_some() { return LinkingOptions::from_name_and_type("pq", LinkType::Static); @@ -77,11 +80,28 @@ impl Display for LinkingOptions { } fn main() { + if cfg!(feature = "bundled") && cfg!(feature = "buildtime_bindgen") { + panic!("Combining the `bundled` and `builtime_bindgen` feature is not supported"); + } if cfg!(feature = "bundled") { - // everything else is handled + // everything else is handled // by pq-src return; } + #[cfg(feature = "buildtime_bindgen")] + { + let bindings = bindgen::Builder::default() + .rustified_enum(".*") + .header("wrapper.h") + .parse_callbacks(Box::new(bindgen::CargoCallbacks::new())) + .generate() + .expect("Unable to generate bindings"); + + let out_path = PathBuf::from(env::var("OUT_DIR").unwrap()); + bindings + .write_to_file(out_path.join("bindings.rs")) + .expect("Couldn't write bindings!"); + } #[cfg(target_os = "windows")] println!("cargo:rustc-link-lib=libpq"); @@ -92,19 +112,22 @@ fn main() { // if target is specified the more concrete pq_lib_dir overwrites a more general one let lib_dir = if let Ok(target) = env::var("TARGET") { - let pq_lib_dir_for_target = format!("PQ_LIB_DIR_{}", target.to_ascii_uppercase().replace("-", "_")); - check_and_use_lib_dir(&pq_lib_dir_for_target).or_else(|_| check_and_use_lib_dir("PQ_LIB_DIR")) - } - else{ + let pq_lib_dir_for_target = format!( + "PQ_LIB_DIR_{}", + target.to_ascii_uppercase().replace("-", "_") + ); + check_and_use_lib_dir(&pq_lib_dir_for_target) + .or_else(|_| check_and_use_lib_dir("PQ_LIB_DIR")) + } else { check_and_use_lib_dir("PQ_LIB_DIR") }; if let Ok(lib_dir) = lib_dir { println!("cargo:rustc-link-search=native={}", lib_dir); } else if configured_by_pkg_config() { - return // pkg_config does everything for us, including output for cargo + return; // pkg_config does everything for us, including output for cargo } else if configured_by_vcpkg() { - return // vcpkg does everything for us, including output for cargo + return; // vcpkg does everything for us, including output for cargo } else if let Some(path) = pg_config_output("--libdir") { let path = replace_homebrew_path_on_mac(path); println!("cargo:rustc-link-search=native={}", path); @@ -124,14 +147,16 @@ fn configured_by_pkg_config() -> bool { #[cfg(target_env = "msvc")] fn configured_by_vcpkg() -> bool { - vcpkg::find_package("libpq").map(|_| { - println!("cargo:rustc-link-lib=crypt32"); - println!("cargo:rustc-link-lib=gdi32"); - println!("cargo:rustc-link-lib=user32"); - println!("cargo:rustc-link-lib=secur32"); - println!("cargo:rustc-link-lib=shell32"); - println!("cargo:rustc-link-lib=wldap32"); - }).is_ok() + vcpkg::find_package("libpq") + .map(|_| { + println!("cargo:rustc-link-lib=crypt32"); + println!("cargo:rustc-link-lib=gdi32"); + println!("cargo:rustc-link-lib=user32"); + println!("cargo:rustc-link-lib=secur32"); + println!("cargo:rustc-link-lib=shell32"); + println!("cargo:rustc-link-lib=wldap32"); + }) + .is_ok() } #[cfg(not(target_env = "msvc"))] @@ -139,15 +164,18 @@ fn configured_by_vcpkg() -> bool { false } -fn check_and_use_lib_dir(var_name: &str) -> Result{ +fn check_and_use_lib_dir(var_name: &str) -> Result { println!("cargo:rerun-if-env-changed={:?}", var_name); - println!("{:?} = {:?}", var_name , env::var(var_name)); + println!("{:?} = {:?}", var_name, env::var(var_name)); let pq_lib_dir = env::var(var_name); if let Ok(pg_lib_path) = pq_lib_dir.clone() { - let path = PathBuf::from(&pg_lib_path); + let path = PathBuf::from(&pg_lib_path); if !path.exists() { - panic!("Folder {:?} doesn't exist in the configured path: {:?}", var_name, path); + panic!( + "Folder {:?} doesn't exist in the configured path: {:?}", + var_name, path + ); } } pq_lib_dir @@ -155,11 +183,13 @@ fn check_and_use_lib_dir(var_name: &str) -> Result{ fn pg_config_path() -> PathBuf { if let Ok(target) = env::var("TARGET") { - let pg_config_for_target = &format!("PG_CONFIG_{}", target.to_ascii_uppercase().replace("-", "_")); + let pg_config_for_target = &format!( + "PG_CONFIG_{}", + target.to_ascii_uppercase().replace("-", "_") + ); println!("cargo:rerun-if-env-changed={}", pg_config_for_target); if let Some(pg_config_path) = env::var_os(pg_config_for_target) { - - let path = PathBuf::from(&pg_config_path); + let path = PathBuf::from(&pg_config_path); if !path.exists() { panic!("pg_config doesn't exist in the configured path: {:?}", path); diff --git a/src/bindings.rs b/src/bindings.rs index 158cc50..e680cf8 100644 --- a/src/bindings.rs +++ b/src/bindings.rs @@ -1,121 +1,1317 @@ -#![allow(non_camel_case_types, non_snake_case, non_upper_case_globals)] - -/* automatically generated by rust-bindgen */ +/* automatically generated by rust-bindgen 0.69.1 */ +pub const _STDIO_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 __WORDSIZE: u32 = 64; +pub const __WORDSIZE_TIME64_COMPAT32: u32 = 1; +pub const __SYSCALL_WORDSIZE: u32 = 64; +pub const __TIMESIZE: u32 = 64; +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 __GLIBC_USE_C2X_STRTOL: u32 = 0; +pub const _STDC_PREDEF_H: u32 = 1; +pub const __STDC_IEC_559__: u32 = 1; +pub const __STDC_IEC_60559_BFP__: u32 = 201404; +pub const __STDC_IEC_559_COMPLEX__: u32 = 1; +pub const __STDC_IEC_60559_COMPLEX__: u32 = 201404; +pub const __STDC_ISO_10646__: u32 = 201706; +pub const __GNU_LIBRARY__: u32 = 6; +pub const __GLIBC__: u32 = 2; +pub const __GLIBC_MINOR__: u32 = 38; +pub const _SYS_CDEFS_H: u32 = 1; +pub const __glibc_c99_flexarr_available: u32 = 1; +pub const __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI: u32 = 0; +pub const __HAVE_GENERIC_SELECTION: u32 = 1; +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_EXT: 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 _BITS_TYPES_H: u32 = 1; +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 _____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 __cookie_io_functions_t_defined: u32 = 1; +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: &[u8; 5] = b"/tmp\0"; +pub const L_tmpnam: u32 = 20; +pub const TMP_MAX: u32 = 238328; +pub const _BITS_STDIO_LIM_H: u32 = 1; +pub const FILENAME_MAX: u32 = 4096; +pub const L_ctermid: u32 = 9; +pub const FOPEN_MAX: u32 = 16; +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 PG_DIAG_SEVERITY: u8 = 83u8; +pub const PG_DIAG_SEVERITY_NONLOCALIZED: u8 = 86u8; +pub const PG_DIAG_SQLSTATE: u8 = 67u8; +pub const PG_DIAG_MESSAGE_PRIMARY: u8 = 77u8; +pub const PG_DIAG_MESSAGE_DETAIL: u8 = 68u8; +pub const PG_DIAG_MESSAGE_HINT: u8 = 72u8; +pub const PG_DIAG_STATEMENT_POSITION: u8 = 80u8; +pub const PG_DIAG_INTERNAL_POSITION: u8 = 112u8; +pub const PG_DIAG_INTERNAL_QUERY: u8 = 113u8; +pub const PG_DIAG_CONTEXT: u8 = 87u8; +pub const PG_DIAG_SCHEMA_NAME: u8 = 115u8; +pub const PG_DIAG_TABLE_NAME: u8 = 116u8; +pub const PG_DIAG_COLUMN_NAME: u8 = 99u8; +pub const PG_DIAG_DATATYPE_NAME: u8 = 100u8; +pub const PG_DIAG_CONSTRAINT_NAME: u8 = 110u8; +pub const PG_DIAG_SOURCE_FILE: u8 = 70u8; +pub const PG_DIAG_SOURCE_LINE: u8 = 76u8; +pub const PG_DIAG_SOURCE_FUNCTION: u8 = 82u8; +pub const LIBPQ_HAS_PIPELINING: u32 = 1; +pub const LIBPQ_HAS_TRACE_FLAGS: u32 = 1; +pub const LIBPQ_HAS_SSL_LIBRARY_DETECTION: u32 = 1; +pub const PG_COPYRES_ATTRS: u32 = 1; +pub const PG_COPYRES_TUPLES: u32 = 2; +pub const PG_COPYRES_EVENTS: u32 = 4; +pub const PG_COPYRES_NOTICEHOOKS: u32 = 8; +pub const PQTRACE_SUPPRESS_TIMESTAMPS: u32 = 1; +pub const PQTRACE_REGRESS_MODE: u32 = 2; +pub const PQ_QUERY_PARAM_MAX_LIMIT: u32 = 65535; +pub const PQnoPasswordSupplied: &[u8; 35] = b"fe_sendauth: no password supplied\n\0"; +pub type __gnuc_va_list = __builtin_va_list; +pub type __u_char = ::std::os::raw::c_uchar; +pub type __u_short = ::std::os::raw::c_ushort; +pub type __u_int = ::std::os::raw::c_uint; +pub type __u_long = ::std::os::raw::c_ulong; +pub type __int8_t = ::std::os::raw::c_schar; +pub type __uint8_t = ::std::os::raw::c_uchar; +pub type __int16_t = ::std::os::raw::c_short; +pub type __uint16_t = ::std::os::raw::c_ushort; +pub type __int32_t = ::std::os::raw::c_int; +pub type __uint32_t = ::std::os::raw::c_uint; +pub type __int64_t = ::std::os::raw::c_long; +pub type __uint64_t = ::std::os::raw::c_ulong; +pub type __int_least8_t = __int8_t; +pub type __uint_least8_t = __uint8_t; +pub type __int_least16_t = __int16_t; +pub type __uint_least16_t = __uint16_t; +pub type __int_least32_t = __int32_t; +pub type __uint_least32_t = __uint32_t; +pub type __int_least64_t = __int64_t; +pub type __uint_least64_t = __uint64_t; +pub type __quad_t = ::std::os::raw::c_long; +pub type __u_quad_t = ::std::os::raw::c_ulong; +pub type __intmax_t = ::std::os::raw::c_long; +pub type __uintmax_t = ::std::os::raw::c_ulong; +pub type __dev_t = ::std::os::raw::c_ulong; +pub type __uid_t = ::std::os::raw::c_uint; +pub type __gid_t = ::std::os::raw::c_uint; +pub type __ino_t = ::std::os::raw::c_ulong; +pub type __ino64_t = ::std::os::raw::c_ulong; +pub type __mode_t = ::std::os::raw::c_uint; +pub type __nlink_t = ::std::os::raw::c_ulong; +pub type __off_t = ::std::os::raw::c_long; +pub type __off64_t = ::std::os::raw::c_long; +pub type __pid_t = ::std::os::raw::c_int; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct __fsid_t { + pub __val: [::std::os::raw::c_int; 2usize], +} +#[test] +fn bindgen_test_layout___fsid_t() { + const UNINIT: ::std::mem::MaybeUninit<__fsid_t> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::<__fsid_t>(), + 8usize, + concat!("Size of: ", stringify!(__fsid_t)) + ); + assert_eq!( + ::std::mem::align_of::<__fsid_t>(), + 4usize, + concat!("Alignment of ", stringify!(__fsid_t)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).__val) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(__fsid_t), + "::", + stringify!(__val) + ) + ); +} +pub type __clock_t = ::std::os::raw::c_long; +pub type __rlim_t = ::std::os::raw::c_ulong; +pub type __rlim64_t = ::std::os::raw::c_ulong; +pub type __id_t = ::std::os::raw::c_uint; +pub type __time_t = ::std::os::raw::c_long; +pub type __useconds_t = ::std::os::raw::c_uint; +pub type __suseconds_t = ::std::os::raw::c_long; +pub type __suseconds64_t = ::std::os::raw::c_long; +pub type __daddr_t = ::std::os::raw::c_int; +pub type __key_t = ::std::os::raw::c_int; +pub type __clockid_t = ::std::os::raw::c_int; +pub type __timer_t = *mut ::std::os::raw::c_void; +pub type __blksize_t = ::std::os::raw::c_long; +pub type __blkcnt_t = ::std::os::raw::c_long; +pub type __blkcnt64_t = ::std::os::raw::c_long; +pub type __fsblkcnt_t = ::std::os::raw::c_ulong; +pub type __fsblkcnt64_t = ::std::os::raw::c_ulong; +pub type __fsfilcnt_t = ::std::os::raw::c_ulong; +pub type __fsfilcnt64_t = ::std::os::raw::c_ulong; +pub type __fsword_t = ::std::os::raw::c_long; +pub type __ssize_t = ::std::os::raw::c_long; +pub type __syscall_slong_t = ::std::os::raw::c_long; +pub type __syscall_ulong_t = ::std::os::raw::c_ulong; +pub type __loff_t = __off64_t; +pub type __caddr_t = *mut ::std::os::raw::c_char; +pub type __intptr_t = ::std::os::raw::c_long; +pub type __socklen_t = ::std::os::raw::c_uint; +pub type __sig_atomic_t = ::std::os::raw::c_int; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct __mbstate_t { + pub __count: ::std::os::raw::c_int, + pub __value: __mbstate_t__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union __mbstate_t__bindgen_ty_1 { + pub __wch: ::std::os::raw::c_uint, + pub __wchb: [::std::os::raw::c_char; 4usize], +} +#[test] +fn bindgen_test_layout___mbstate_t__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit<__mbstate_t__bindgen_ty_1> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::<__mbstate_t__bindgen_ty_1>(), + 4usize, + concat!("Size of: ", stringify!(__mbstate_t__bindgen_ty_1)) + ); + assert_eq!( + ::std::mem::align_of::<__mbstate_t__bindgen_ty_1>(), + 4usize, + concat!("Alignment of ", stringify!(__mbstate_t__bindgen_ty_1)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).__wch) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(__mbstate_t__bindgen_ty_1), + "::", + stringify!(__wch) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).__wchb) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(__mbstate_t__bindgen_ty_1), + "::", + stringify!(__wchb) + ) + ); +} +#[test] +fn bindgen_test_layout___mbstate_t() { + const UNINIT: ::std::mem::MaybeUninit<__mbstate_t> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::<__mbstate_t>(), + 8usize, + concat!("Size of: ", stringify!(__mbstate_t)) + ); + assert_eq!( + ::std::mem::align_of::<__mbstate_t>(), + 4usize, + concat!("Alignment of ", stringify!(__mbstate_t)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).__count) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(__mbstate_t), + "::", + stringify!(__count) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).__value) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(__mbstate_t), + "::", + stringify!(__value) + ) + ); +} #[repr(C)] -pub struct __BindgenUnionField(::std::marker::PhantomData); -impl __BindgenUnionField { - #[inline] - pub fn new() -> Self { __BindgenUnionField(::std::marker::PhantomData) } - #[inline] - pub unsafe fn as_ref(&self) -> &T { ::std::mem::transmute(self) } - #[inline] - pub unsafe fn as_mut(&mut self) -> &mut T { ::std::mem::transmute(self) } -} -impl ::std::default::Default for __BindgenUnionField { - #[inline] - fn default() -> Self { Self::new() } -} -impl ::std::clone::Clone for __BindgenUnionField { - #[inline] - fn clone(&self) -> Self { Self::new() } -} -impl ::std::marker::Copy for __BindgenUnionField { } -impl ::std::fmt::Debug for __BindgenUnionField { - fn fmt(&self, fmt: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - fmt.write_str("__BindgenUnionField") - } -} -pub type __int64_t = ::std::os::raw::c_longlong; -pub type __darwin_size_t = ::std::os::raw::c_ulong; -pub type __darwin_off_t = __int64_t; -pub type fpos_t = __darwin_off_t; +#[derive(Copy, Clone)] +pub struct _G_fpos_t { + pub __pos: __off_t, + pub __state: __mbstate_t, +} +#[test] +fn bindgen_test_layout__G_fpos_t() { + const UNINIT: ::std::mem::MaybeUninit<_G_fpos_t> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::<_G_fpos_t>(), + 16usize, + concat!("Size of: ", stringify!(_G_fpos_t)) + ); + assert_eq!( + ::std::mem::align_of::<_G_fpos_t>(), + 8usize, + concat!("Alignment of ", stringify!(_G_fpos_t)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).__pos) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(_G_fpos_t), + "::", + stringify!(__pos) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).__state) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(_G_fpos_t), + "::", + stringify!(__state) + ) + ); +} +pub type __fpos_t = _G_fpos_t; #[repr(C)] -#[derive(Debug, Copy)] -pub struct __sbuf { - pub _base: *mut ::std::os::raw::c_uchar, - pub _size: ::std::os::raw::c_int, +#[derive(Copy, Clone)] +pub struct _G_fpos64_t { + pub __pos: __off64_t, + pub __state: __mbstate_t, } #[test] -fn bindgen_test_layout___sbuf() { - assert_eq!(::std::mem::size_of::<__sbuf>() , 16usize); - assert_eq!(::std::mem::align_of::<__sbuf>() , 8usize); +fn bindgen_test_layout__G_fpos64_t() { + const UNINIT: ::std::mem::MaybeUninit<_G_fpos64_t> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::<_G_fpos64_t>(), + 16usize, + concat!("Size of: ", stringify!(_G_fpos64_t)) + ); + assert_eq!( + ::std::mem::align_of::<_G_fpos64_t>(), + 8usize, + concat!("Alignment of ", stringify!(_G_fpos64_t)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).__pos) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(_G_fpos64_t), + "::", + stringify!(__pos) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).__state) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(_G_fpos64_t), + "::", + stringify!(__state) + ) + ); +} +pub type __fpos64_t = _G_fpos64_t; +pub type __FILE = _IO_FILE; +pub type FILE = _IO_FILE; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _IO_marker { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _IO_codecvt { + _unused: [u8; 0], } -impl Clone for __sbuf { - fn clone(&self) -> Self { *self } +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _IO_wide_data { + _unused: [u8; 0], } +pub type _IO_lock_t = ::std::os::raw::c_void; #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct __sFILEX([u8; 0]); +pub struct _IO_FILE { + pub _flags: ::std::os::raw::c_int, + pub _IO_read_ptr: *mut ::std::os::raw::c_char, + pub _IO_read_end: *mut ::std::os::raw::c_char, + pub _IO_read_base: *mut ::std::os::raw::c_char, + pub _IO_write_base: *mut ::std::os::raw::c_char, + pub _IO_write_ptr: *mut ::std::os::raw::c_char, + pub _IO_write_end: *mut ::std::os::raw::c_char, + pub _IO_buf_base: *mut ::std::os::raw::c_char, + pub _IO_buf_end: *mut ::std::os::raw::c_char, + pub _IO_save_base: *mut ::std::os::raw::c_char, + pub _IO_backup_base: *mut ::std::os::raw::c_char, + pub _IO_save_end: *mut ::std::os::raw::c_char, + pub _markers: *mut _IO_marker, + pub _chain: *mut _IO_FILE, + pub _fileno: ::std::os::raw::c_int, + pub _flags2: ::std::os::raw::c_int, + pub _old_offset: __off_t, + pub _cur_column: ::std::os::raw::c_ushort, + pub _vtable_offset: ::std::os::raw::c_schar, + pub _shortbuf: [::std::os::raw::c_char; 1usize], + pub _lock: *mut _IO_lock_t, + pub _offset: __off64_t, + pub _codecvt: *mut _IO_codecvt, + pub _wide_data: *mut _IO_wide_data, + pub _freeres_list: *mut _IO_FILE, + pub _freeres_buf: *mut ::std::os::raw::c_void, + pub __pad5: usize, + pub _mode: ::std::os::raw::c_int, + pub _unused2: [::std::os::raw::c_char; 20usize], +} +#[test] +fn bindgen_test_layout__IO_FILE() { + const UNINIT: ::std::mem::MaybeUninit<_IO_FILE> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::<_IO_FILE>(), + 216usize, + concat!("Size of: ", stringify!(_IO_FILE)) + ); + assert_eq!( + ::std::mem::align_of::<_IO_FILE>(), + 8usize, + concat!("Alignment of ", stringify!(_IO_FILE)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr)._flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(_IO_FILE), + "::", + stringify!(_flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr)._IO_read_ptr) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(_IO_FILE), + "::", + stringify!(_IO_read_ptr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr)._IO_read_end) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(_IO_FILE), + "::", + stringify!(_IO_read_end) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr)._IO_read_base) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(_IO_FILE), + "::", + stringify!(_IO_read_base) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr)._IO_write_base) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(_IO_FILE), + "::", + stringify!(_IO_write_base) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr)._IO_write_ptr) as usize - ptr as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(_IO_FILE), + "::", + stringify!(_IO_write_ptr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr)._IO_write_end) as usize - ptr as usize }, + 48usize, + concat!( + "Offset of field: ", + stringify!(_IO_FILE), + "::", + stringify!(_IO_write_end) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr)._IO_buf_base) as usize - ptr as usize }, + 56usize, + concat!( + "Offset of field: ", + stringify!(_IO_FILE), + "::", + stringify!(_IO_buf_base) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr)._IO_buf_end) as usize - ptr as usize }, + 64usize, + concat!( + "Offset of field: ", + stringify!(_IO_FILE), + "::", + stringify!(_IO_buf_end) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr)._IO_save_base) as usize - ptr as usize }, + 72usize, + concat!( + "Offset of field: ", + stringify!(_IO_FILE), + "::", + stringify!(_IO_save_base) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr)._IO_backup_base) as usize - ptr as usize }, + 80usize, + concat!( + "Offset of field: ", + stringify!(_IO_FILE), + "::", + stringify!(_IO_backup_base) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr)._IO_save_end) as usize - ptr as usize }, + 88usize, + concat!( + "Offset of field: ", + stringify!(_IO_FILE), + "::", + stringify!(_IO_save_end) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr)._markers) as usize - ptr as usize }, + 96usize, + concat!( + "Offset of field: ", + stringify!(_IO_FILE), + "::", + stringify!(_markers) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr)._chain) as usize - ptr as usize }, + 104usize, + concat!( + "Offset of field: ", + stringify!(_IO_FILE), + "::", + stringify!(_chain) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr)._fileno) as usize - ptr as usize }, + 112usize, + concat!( + "Offset of field: ", + stringify!(_IO_FILE), + "::", + stringify!(_fileno) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr)._flags2) as usize - ptr as usize }, + 116usize, + concat!( + "Offset of field: ", + stringify!(_IO_FILE), + "::", + stringify!(_flags2) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr)._old_offset) as usize - ptr as usize }, + 120usize, + concat!( + "Offset of field: ", + stringify!(_IO_FILE), + "::", + stringify!(_old_offset) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr)._cur_column) as usize - ptr as usize }, + 128usize, + concat!( + "Offset of field: ", + stringify!(_IO_FILE), + "::", + stringify!(_cur_column) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr)._vtable_offset) as usize - ptr as usize }, + 130usize, + concat!( + "Offset of field: ", + stringify!(_IO_FILE), + "::", + stringify!(_vtable_offset) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr)._shortbuf) as usize - ptr as usize }, + 131usize, + concat!( + "Offset of field: ", + stringify!(_IO_FILE), + "::", + stringify!(_shortbuf) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr)._lock) as usize - ptr as usize }, + 136usize, + concat!( + "Offset of field: ", + stringify!(_IO_FILE), + "::", + stringify!(_lock) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr)._offset) as usize - ptr as usize }, + 144usize, + concat!( + "Offset of field: ", + stringify!(_IO_FILE), + "::", + stringify!(_offset) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr)._codecvt) as usize - ptr as usize }, + 152usize, + concat!( + "Offset of field: ", + stringify!(_IO_FILE), + "::", + stringify!(_codecvt) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr)._wide_data) as usize - ptr as usize }, + 160usize, + concat!( + "Offset of field: ", + stringify!(_IO_FILE), + "::", + stringify!(_wide_data) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr)._freeres_list) as usize - ptr as usize }, + 168usize, + concat!( + "Offset of field: ", + stringify!(_IO_FILE), + "::", + stringify!(_freeres_list) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr)._freeres_buf) as usize - ptr as usize }, + 176usize, + concat!( + "Offset of field: ", + stringify!(_IO_FILE), + "::", + stringify!(_freeres_buf) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).__pad5) as usize - ptr as usize }, + 184usize, + concat!( + "Offset of field: ", + stringify!(_IO_FILE), + "::", + stringify!(__pad5) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr)._mode) as usize - ptr as usize }, + 192usize, + concat!( + "Offset of field: ", + stringify!(_IO_FILE), + "::", + stringify!(_mode) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr)._unused2) as usize - ptr as usize }, + 196usize, + concat!( + "Offset of field: ", + stringify!(_IO_FILE), + "::", + stringify!(_unused2) + ) + ); +} +pub type cookie_read_function_t = ::std::option::Option< + unsafe extern "C" fn( + __cookie: *mut ::std::os::raw::c_void, + __buf: *mut ::std::os::raw::c_char, + __nbytes: usize, + ) -> __ssize_t, +>; +pub type cookie_write_function_t = ::std::option::Option< + unsafe extern "C" fn( + __cookie: *mut ::std::os::raw::c_void, + __buf: *const ::std::os::raw::c_char, + __nbytes: usize, + ) -> __ssize_t, +>; +pub type cookie_seek_function_t = ::std::option::Option< + unsafe extern "C" fn( + __cookie: *mut ::std::os::raw::c_void, + __pos: *mut __off64_t, + __w: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int, +>; +pub type cookie_close_function_t = ::std::option::Option< + unsafe extern "C" fn(__cookie: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int, +>; #[repr(C)] -#[derive(Debug, Copy)] -pub struct __sFILE { - pub _p: *mut ::std::os::raw::c_uchar, - pub _r: ::std::os::raw::c_int, - pub _w: ::std::os::raw::c_int, - pub _flags: ::std::os::raw::c_short, - pub _file: ::std::os::raw::c_short, - pub _bf: __sbuf, - pub _lbfsize: ::std::os::raw::c_int, - pub _cookie: *mut ::std::os::raw::c_void, - pub _close: ::std::option::Option ::std::os::raw::c_int>, - pub _read: ::std::option::Option ::std::os::raw::c_int>, - pub _seek: ::std::option::Option ::std::os::raw::c_longlong>, - pub _write: ::std::option::Option ::std::os::raw::c_int>, - pub _ub: __sbuf, - pub _extra: *mut __sFILEX, - pub _ur: ::std::os::raw::c_int, - pub _ubuf: [::std::os::raw::c_uchar; 3usize], - pub _nbuf: [::std::os::raw::c_uchar; 1usize], - pub _lb: __sbuf, - pub _blksize: ::std::os::raw::c_int, - pub _offset: fpos_t, +#[derive(Debug, Copy, Clone)] +pub struct _IO_cookie_io_functions_t { + pub read: cookie_read_function_t, + pub write: cookie_write_function_t, + pub seek: cookie_seek_function_t, + pub close: cookie_close_function_t, } #[test] -fn bindgen_test_layout___sFILE() { - assert_eq!(::std::mem::size_of::<__sFILE>() , 152usize); - assert_eq!(::std::mem::align_of::<__sFILE>() , 8usize); +fn bindgen_test_layout__IO_cookie_io_functions_t() { + const UNINIT: ::std::mem::MaybeUninit<_IO_cookie_io_functions_t> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::<_IO_cookie_io_functions_t>(), + 32usize, + concat!("Size of: ", stringify!(_IO_cookie_io_functions_t)) + ); + assert_eq!( + ::std::mem::align_of::<_IO_cookie_io_functions_t>(), + 8usize, + concat!("Alignment of ", stringify!(_IO_cookie_io_functions_t)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).read) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(_IO_cookie_io_functions_t), + "::", + stringify!(read) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).write) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(_IO_cookie_io_functions_t), + "::", + stringify!(write) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).seek) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(_IO_cookie_io_functions_t), + "::", + stringify!(seek) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).close) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(_IO_cookie_io_functions_t), + "::", + stringify!(close) + ) + ); +} +pub type cookie_io_functions_t = _IO_cookie_io_functions_t; +pub type va_list = __gnuc_va_list; +pub type off_t = __off_t; +pub type fpos_t = __fpos_t; +extern "C" { + pub static mut stdin: *mut FILE; +} +extern "C" { + pub static mut stdout: *mut FILE; +} +extern "C" { + pub static mut stderr: *mut FILE; +} +extern "C" { + pub fn remove(__filename: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn rename( + __old: *const ::std::os::raw::c_char, + __new: *const ::std::os::raw::c_char, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn renameat( + __oldfd: ::std::os::raw::c_int, + __old: *const ::std::os::raw::c_char, + __newfd: ::std::os::raw::c_int, + __new: *const ::std::os::raw::c_char, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn fclose(__stream: *mut FILE) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn tmpfile() -> *mut FILE; +} +extern "C" { + pub fn tmpnam(arg1: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn tmpnam_r(__s: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn tempnam( + __dir: *const ::std::os::raw::c_char, + __pfx: *const ::std::os::raw::c_char, + ) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn fflush(__stream: *mut FILE) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn fflush_unlocked(__stream: *mut FILE) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn fopen( + __filename: *const ::std::os::raw::c_char, + __modes: *const ::std::os::raw::c_char, + ) -> *mut FILE; +} +extern "C" { + pub fn freopen( + __filename: *const ::std::os::raw::c_char, + __modes: *const ::std::os::raw::c_char, + __stream: *mut FILE, + ) -> *mut FILE; +} +extern "C" { + pub fn fdopen(__fd: ::std::os::raw::c_int, __modes: *const ::std::os::raw::c_char) + -> *mut FILE; +} +extern "C" { + pub fn fopencookie( + __magic_cookie: *mut ::std::os::raw::c_void, + __modes: *const ::std::os::raw::c_char, + __io_funcs: cookie_io_functions_t, + ) -> *mut FILE; +} +extern "C" { + pub fn fmemopen( + __s: *mut ::std::os::raw::c_void, + __len: usize, + __modes: *const ::std::os::raw::c_char, + ) -> *mut FILE; +} +extern "C" { + pub fn open_memstream( + __bufloc: *mut *mut ::std::os::raw::c_char, + __sizeloc: *mut usize, + ) -> *mut FILE; +} +extern "C" { + pub fn setbuf(__stream: *mut FILE, __buf: *mut ::std::os::raw::c_char); +} +extern "C" { + pub fn setvbuf( + __stream: *mut FILE, + __buf: *mut ::std::os::raw::c_char, + __modes: ::std::os::raw::c_int, + __n: usize, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn setbuffer(__stream: *mut FILE, __buf: *mut ::std::os::raw::c_char, __size: usize); +} +extern "C" { + pub fn setlinebuf(__stream: *mut FILE); +} +extern "C" { + pub fn fprintf( + __stream: *mut FILE, + __format: *const ::std::os::raw::c_char, + ... + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn printf(__format: *const ::std::os::raw::c_char, ...) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn sprintf( + __s: *mut ::std::os::raw::c_char, + __format: *const ::std::os::raw::c_char, + ... + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn vfprintf( + __s: *mut FILE, + __format: *const ::std::os::raw::c_char, + __arg: *mut __va_list_tag, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn vprintf( + __format: *const ::std::os::raw::c_char, + __arg: *mut __va_list_tag, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn vsprintf( + __s: *mut ::std::os::raw::c_char, + __format: *const ::std::os::raw::c_char, + __arg: *mut __va_list_tag, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn snprintf( + __s: *mut ::std::os::raw::c_char, + __maxlen: ::std::os::raw::c_ulong, + __format: *const ::std::os::raw::c_char, + ... + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn vsnprintf( + __s: *mut ::std::os::raw::c_char, + __maxlen: ::std::os::raw::c_ulong, + __format: *const ::std::os::raw::c_char, + __arg: *mut __va_list_tag, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn vasprintf( + __ptr: *mut *mut ::std::os::raw::c_char, + __f: *const ::std::os::raw::c_char, + __arg: *mut __va_list_tag, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn __asprintf( + __ptr: *mut *mut ::std::os::raw::c_char, + __fmt: *const ::std::os::raw::c_char, + ... + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn asprintf( + __ptr: *mut *mut ::std::os::raw::c_char, + __fmt: *const ::std::os::raw::c_char, + ... + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn vdprintf( + __fd: ::std::os::raw::c_int, + __fmt: *const ::std::os::raw::c_char, + __arg: *mut __va_list_tag, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn dprintf( + __fd: ::std::os::raw::c_int, + __fmt: *const ::std::os::raw::c_char, + ... + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn fscanf( + __stream: *mut FILE, + __format: *const ::std::os::raw::c_char, + ... + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn scanf(__format: *const ::std::os::raw::c_char, ...) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn sscanf( + __s: *const ::std::os::raw::c_char, + __format: *const ::std::os::raw::c_char, + ... + ) -> ::std::os::raw::c_int; +} +pub type _Float32 = f32; +pub type _Float64 = f64; +pub type _Float32x = f64; +pub type _Float64x = u128; +extern "C" { + #[link_name = "\u{1}__isoc99_fscanf"] + pub fn fscanf1( + __stream: *mut FILE, + __format: *const ::std::os::raw::c_char, + ... + ) -> ::std::os::raw::c_int; +} +extern "C" { + #[link_name = "\u{1}__isoc99_scanf"] + pub fn scanf1(__format: *const ::std::os::raw::c_char, ...) -> ::std::os::raw::c_int; +} +extern "C" { + #[link_name = "\u{1}__isoc99_sscanf"] + pub fn sscanf1( + __s: *const ::std::os::raw::c_char, + __format: *const ::std::os::raw::c_char, + ... + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn vfscanf( + __s: *mut FILE, + __format: *const ::std::os::raw::c_char, + __arg: *mut __va_list_tag, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn vscanf( + __format: *const ::std::os::raw::c_char, + __arg: *mut __va_list_tag, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn vsscanf( + __s: *const ::std::os::raw::c_char, + __format: *const ::std::os::raw::c_char, + __arg: *mut __va_list_tag, + ) -> ::std::os::raw::c_int; +} +extern "C" { + #[link_name = "\u{1}__isoc99_vfscanf"] + pub fn vfscanf1( + __s: *mut FILE, + __format: *const ::std::os::raw::c_char, + __arg: *mut __va_list_tag, + ) -> ::std::os::raw::c_int; +} +extern "C" { + #[link_name = "\u{1}__isoc99_vscanf"] + pub fn vscanf1( + __format: *const ::std::os::raw::c_char, + __arg: *mut __va_list_tag, + ) -> ::std::os::raw::c_int; +} +extern "C" { + #[link_name = "\u{1}__isoc99_vsscanf"] + pub fn vsscanf1( + __s: *const ::std::os::raw::c_char, + __format: *const ::std::os::raw::c_char, + __arg: *mut __va_list_tag, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn fgetc(__stream: *mut FILE) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn getc(__stream: *mut FILE) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn getchar() -> ::std::os::raw::c_int; +} +extern "C" { + pub fn getc_unlocked(__stream: *mut FILE) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn getchar_unlocked() -> ::std::os::raw::c_int; +} +extern "C" { + pub fn fgetc_unlocked(__stream: *mut FILE) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn fputc(__c: ::std::os::raw::c_int, __stream: *mut FILE) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn putc(__c: ::std::os::raw::c_int, __stream: *mut FILE) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn putchar(__c: ::std::os::raw::c_int) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn fputc_unlocked(__c: ::std::os::raw::c_int, __stream: *mut FILE) + -> ::std::os::raw::c_int; +} +extern "C" { + pub fn putc_unlocked(__c: ::std::os::raw::c_int, __stream: *mut FILE) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn putchar_unlocked(__c: ::std::os::raw::c_int) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn getw(__stream: *mut FILE) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn putw(__w: ::std::os::raw::c_int, __stream: *mut FILE) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn fgets( + __s: *mut ::std::os::raw::c_char, + __n: ::std::os::raw::c_int, + __stream: *mut FILE, + ) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn __getdelim( + __lineptr: *mut *mut ::std::os::raw::c_char, + __n: *mut usize, + __delimiter: ::std::os::raw::c_int, + __stream: *mut FILE, + ) -> __ssize_t; +} +extern "C" { + pub fn getdelim( + __lineptr: *mut *mut ::std::os::raw::c_char, + __n: *mut usize, + __delimiter: ::std::os::raw::c_int, + __stream: *mut FILE, + ) -> __ssize_t; +} +extern "C" { + pub fn getline( + __lineptr: *mut *mut ::std::os::raw::c_char, + __n: *mut usize, + __stream: *mut FILE, + ) -> __ssize_t; +} +extern "C" { + pub fn fputs(__s: *const ::std::os::raw::c_char, __stream: *mut FILE) -> ::std::os::raw::c_int; } -impl Clone for __sFILE { - fn clone(&self) -> Self { *self } +extern "C" { + pub fn puts(__s: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ungetc(__c: ::std::os::raw::c_int, __stream: *mut FILE) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn fread( + __ptr: *mut ::std::os::raw::c_void, + __size: ::std::os::raw::c_ulong, + __n: ::std::os::raw::c_ulong, + __stream: *mut FILE, + ) -> ::std::os::raw::c_ulong; +} +extern "C" { + pub fn fwrite( + __ptr: *const ::std::os::raw::c_void, + __size: ::std::os::raw::c_ulong, + __n: ::std::os::raw::c_ulong, + __s: *mut FILE, + ) -> ::std::os::raw::c_ulong; +} +extern "C" { + pub fn fread_unlocked( + __ptr: *mut ::std::os::raw::c_void, + __size: usize, + __n: usize, + __stream: *mut FILE, + ) -> usize; +} +extern "C" { + pub fn fwrite_unlocked( + __ptr: *const ::std::os::raw::c_void, + __size: usize, + __n: usize, + __stream: *mut FILE, + ) -> usize; +} +extern "C" { + pub fn fseek( + __stream: *mut FILE, + __off: ::std::os::raw::c_long, + __whence: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ftell(__stream: *mut FILE) -> ::std::os::raw::c_long; +} +extern "C" { + pub fn rewind(__stream: *mut FILE); +} +extern "C" { + pub fn fseeko( + __stream: *mut FILE, + __off: __off_t, + __whence: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ftello(__stream: *mut FILE) -> __off_t; +} +extern "C" { + pub fn fgetpos(__stream: *mut FILE, __pos: *mut fpos_t) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn fsetpos(__stream: *mut FILE, __pos: *const fpos_t) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn clearerr(__stream: *mut FILE); +} +extern "C" { + pub fn feof(__stream: *mut FILE) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ferror(__stream: *mut FILE) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn clearerr_unlocked(__stream: *mut FILE); +} +extern "C" { + pub fn feof_unlocked(__stream: *mut FILE) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ferror_unlocked(__stream: *mut FILE) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn perror(__s: *const ::std::os::raw::c_char); +} +extern "C" { + pub fn fileno(__stream: *mut FILE) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn fileno_unlocked(__stream: *mut FILE) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn pclose(__stream: *mut FILE) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn popen( + __command: *const ::std::os::raw::c_char, + __modes: *const ::std::os::raw::c_char, + ) -> *mut FILE; +} +extern "C" { + pub fn ctermid(__s: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn flockfile(__stream: *mut FILE); +} +extern "C" { + pub fn ftrylockfile(__stream: *mut FILE) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn funlockfile(__stream: *mut FILE); +} +extern "C" { + pub fn __uflow(arg1: *mut FILE) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn __overflow(arg1: *mut FILE, arg2: ::std::os::raw::c_int) -> ::std::os::raw::c_int; } -pub type FILE = __sFILE; pub type Oid = ::std::os::raw::c_uint; -pub const CONNECTION_OK: _bindgen_ty_2 = _bindgen_ty_2::CONNECTION_OK; -pub const CONNECTION_BAD: _bindgen_ty_2 = _bindgen_ty_2::CONNECTION_BAD; -pub const CONNECTION_STARTED: _bindgen_ty_2 = - _bindgen_ty_2::CONNECTION_STARTED; -pub const CONNECTION_MADE: _bindgen_ty_2 = _bindgen_ty_2::CONNECTION_MADE; -pub const CONNECTION_AWAITING_RESPONSE: _bindgen_ty_2 = - _bindgen_ty_2::CONNECTION_AWAITING_RESPONSE; -pub const CONNECTION_AUTH_OK: _bindgen_ty_2 = - _bindgen_ty_2::CONNECTION_AUTH_OK; -pub const CONNECTION_SETENV: _bindgen_ty_2 = _bindgen_ty_2::CONNECTION_SETENV; -pub const CONNECTION_SSL_STARTUP: _bindgen_ty_2 = - _bindgen_ty_2::CONNECTION_SSL_STARTUP; -pub const CONNECTION_NEEDED: _bindgen_ty_2 = _bindgen_ty_2::CONNECTION_NEEDED; +pub type pg_int64 = ::std::os::raw::c_long; #[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum _bindgen_ty_2 { +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum ConnStatusType { CONNECTION_OK = 0, CONNECTION_BAD = 1, CONNECTION_STARTED = 2, @@ -125,43 +1321,24 @@ pub enum _bindgen_ty_2 { CONNECTION_SETENV = 6, CONNECTION_SSL_STARTUP = 7, CONNECTION_NEEDED = 8, + CONNECTION_CHECK_WRITABLE = 9, + CONNECTION_CONSUME = 10, + CONNECTION_GSS_STARTUP = 11, + CONNECTION_CHECK_TARGET = 12, + CONNECTION_CHECK_STANDBY = 13, } -pub use self::_bindgen_ty_2 as ConnStatusType; -pub const PGRES_POLLING_FAILED: _bindgen_ty_3 = - _bindgen_ty_3::PGRES_POLLING_FAILED; -pub const PGRES_POLLING_READING: _bindgen_ty_3 = - _bindgen_ty_3::PGRES_POLLING_READING; -pub const PGRES_POLLING_WRITING: _bindgen_ty_3 = - _bindgen_ty_3::PGRES_POLLING_WRITING; -pub const PGRES_POLLING_OK: _bindgen_ty_3 = _bindgen_ty_3::PGRES_POLLING_OK; -pub const PGRES_POLLING_ACTIVE: _bindgen_ty_3 = - _bindgen_ty_3::PGRES_POLLING_ACTIVE; #[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum _bindgen_ty_3 { +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum PostgresPollingStatusType { PGRES_POLLING_FAILED = 0, PGRES_POLLING_READING = 1, PGRES_POLLING_WRITING = 2, PGRES_POLLING_OK = 3, PGRES_POLLING_ACTIVE = 4, } -pub use self::_bindgen_ty_3 as PostgresPollingStatusType; -pub const PGRES_EMPTY_QUERY: _bindgen_ty_4 = _bindgen_ty_4::PGRES_EMPTY_QUERY; -pub const PGRES_COMMAND_OK: _bindgen_ty_4 = _bindgen_ty_4::PGRES_COMMAND_OK; -pub const PGRES_TUPLES_OK: _bindgen_ty_4 = _bindgen_ty_4::PGRES_TUPLES_OK; -pub const PGRES_COPY_OUT: _bindgen_ty_4 = _bindgen_ty_4::PGRES_COPY_OUT; -pub const PGRES_COPY_IN: _bindgen_ty_4 = _bindgen_ty_4::PGRES_COPY_IN; -pub const PGRES_BAD_RESPONSE: _bindgen_ty_4 = - _bindgen_ty_4::PGRES_BAD_RESPONSE; -pub const PGRES_NONFATAL_ERROR: _bindgen_ty_4 = - _bindgen_ty_4::PGRES_NONFATAL_ERROR; -pub const PGRES_FATAL_ERROR: _bindgen_ty_4 = _bindgen_ty_4::PGRES_FATAL_ERROR; -pub const PGRES_COPY_BOTH: _bindgen_ty_4 = _bindgen_ty_4::PGRES_COPY_BOTH; -pub const PGRES_SINGLE_TUPLE: _bindgen_ty_4 = - _bindgen_ty_4::PGRES_SINGLE_TUPLE; #[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum _bindgen_ty_4 { +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum ExecStatusType { PGRES_EMPTY_QUERY = 0, PGRES_COMMAND_OK = 1, PGRES_TUPLES_OK = 2, @@ -172,62 +1349,68 @@ pub enum _bindgen_ty_4 { PGRES_FATAL_ERROR = 7, PGRES_COPY_BOTH = 8, PGRES_SINGLE_TUPLE = 9, + PGRES_PIPELINE_SYNC = 10, + PGRES_PIPELINE_ABORTED = 11, } -pub use self::_bindgen_ty_4 as ExecStatusType; -pub const PQTRANS_IDLE: _bindgen_ty_5 = _bindgen_ty_5::PQTRANS_IDLE; -pub const PQTRANS_ACTIVE: _bindgen_ty_5 = _bindgen_ty_5::PQTRANS_ACTIVE; -pub const PQTRANS_INTRANS: _bindgen_ty_5 = _bindgen_ty_5::PQTRANS_INTRANS; -pub const PQTRANS_INERROR: _bindgen_ty_5 = _bindgen_ty_5::PQTRANS_INERROR; -pub const PQTRANS_UNKNOWN: _bindgen_ty_5 = _bindgen_ty_5::PQTRANS_UNKNOWN; #[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum _bindgen_ty_5 { +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum PGTransactionStatusType { PQTRANS_IDLE = 0, PQTRANS_ACTIVE = 1, PQTRANS_INTRANS = 2, PQTRANS_INERROR = 3, PQTRANS_UNKNOWN = 4, } -pub use self::_bindgen_ty_5 as PGTransactionStatusType; -pub const PQERRORS_TERSE: _bindgen_ty_6 = _bindgen_ty_6::PQERRORS_TERSE; -pub const PQERRORS_DEFAULT: _bindgen_ty_6 = _bindgen_ty_6::PQERRORS_DEFAULT; -pub const PQERRORS_VERBOSE: _bindgen_ty_6 = _bindgen_ty_6::PQERRORS_VERBOSE; #[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum _bindgen_ty_6 { +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum PGVerbosity { PQERRORS_TERSE = 0, PQERRORS_DEFAULT = 1, PQERRORS_VERBOSE = 2, + PQERRORS_SQLSTATE = 3, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum PGContextVisibility { + PQSHOW_CONTEXT_NEVER = 0, + PQSHOW_CONTEXT_ERRORS = 1, + PQSHOW_CONTEXT_ALWAYS = 2, } -pub use self::_bindgen_ty_6 as PGVerbosity; -pub const PQPING_OK: _bindgen_ty_7 = _bindgen_ty_7::PQPING_OK; -pub const PQPING_REJECT: _bindgen_ty_7 = _bindgen_ty_7::PQPING_REJECT; -pub const PQPING_NO_RESPONSE: _bindgen_ty_7 = - _bindgen_ty_7::PQPING_NO_RESPONSE; -pub const PQPING_NO_ATTEMPT: _bindgen_ty_7 = _bindgen_ty_7::PQPING_NO_ATTEMPT; #[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum _bindgen_ty_7 { +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum PGPing { PQPING_OK = 0, PQPING_REJECT = 1, PQPING_NO_RESPONSE = 2, PQPING_NO_ATTEMPT = 3, } -pub use self::_bindgen_ty_7 as PGPing; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum PGpipelineStatus { + PQ_PIPELINE_OFF = 0, + PQ_PIPELINE_ON = 1, + PQ_PIPELINE_ABORTED = 2, +} #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct pg_conn([u8; 0]); +pub struct pg_conn { + _unused: [u8; 0], +} pub type PGconn = pg_conn; #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct pg_result([u8; 0]); +pub struct pg_result { + _unused: [u8; 0], +} pub type PGresult = pg_result; #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct pg_cancel([u8; 0]); +pub struct pg_cancel { + _unused: [u8; 0], +} pub type PGcancel = pg_cancel; #[repr(C)] -#[derive(Debug, Copy)] +#[derive(Debug, Copy, Clone)] pub struct pgNotify { pub relname: *mut ::std::os::raw::c_char, pub be_pid: ::std::os::raw::c_int, @@ -236,25 +1419,69 @@ pub struct pgNotify { } #[test] fn bindgen_test_layout_pgNotify() { - assert_eq!(::std::mem::size_of::() , 32usize); - assert_eq!(::std::mem::align_of::() , 8usize); -} -impl Clone for pgNotify { - fn clone(&self) -> Self { *self } + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 32usize, + concat!("Size of: ", stringify!(pgNotify)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(pgNotify)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).relname) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(pgNotify), + "::", + stringify!(relname) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).be_pid) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(pgNotify), + "::", + stringify!(be_pid) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).extra) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(pgNotify), + "::", + stringify!(extra) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).next) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(pgNotify), + "::", + stringify!(next) + ) + ); } pub type PGnotify = pgNotify; -pub type PQnoticeReceiver = - ::std::option::Option; -pub type PQnoticeProcessor = - ::std::option::Option; +pub type PQnoticeReceiver = ::std::option::Option< + unsafe extern "C" fn(arg: *mut ::std::os::raw::c_void, res: *const PGresult), +>; +pub type PQnoticeProcessor = ::std::option::Option< + unsafe extern "C" fn(arg: *mut ::std::os::raw::c_void, message: *const ::std::os::raw::c_char), +>; pub type pqbool = ::std::os::raw::c_char; #[repr(C)] -#[derive(Debug, Copy)] +#[derive(Debug, Copy, Clone)] pub struct _PQprintOpt { pub header: pqbool, pub align: pqbool, @@ -269,15 +1496,122 @@ pub struct _PQprintOpt { } #[test] fn bindgen_test_layout__PQprintOpt() { - assert_eq!(::std::mem::size_of::<_PQprintOpt>() , 40usize); - assert_eq!(::std::mem::align_of::<_PQprintOpt>() , 8usize); -} -impl Clone for _PQprintOpt { - fn clone(&self) -> Self { *self } + const UNINIT: ::std::mem::MaybeUninit<_PQprintOpt> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::<_PQprintOpt>(), + 40usize, + concat!("Size of: ", stringify!(_PQprintOpt)) + ); + assert_eq!( + ::std::mem::align_of::<_PQprintOpt>(), + 8usize, + concat!("Alignment of ", stringify!(_PQprintOpt)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).header) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(_PQprintOpt), + "::", + stringify!(header) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).align) as usize - ptr as usize }, + 1usize, + concat!( + "Offset of field: ", + stringify!(_PQprintOpt), + "::", + stringify!(align) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).standard) as usize - ptr as usize }, + 2usize, + concat!( + "Offset of field: ", + stringify!(_PQprintOpt), + "::", + stringify!(standard) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).html3) as usize - ptr as usize }, + 3usize, + concat!( + "Offset of field: ", + stringify!(_PQprintOpt), + "::", + stringify!(html3) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).expanded) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(_PQprintOpt), + "::", + stringify!(expanded) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pager) as usize - ptr as usize }, + 5usize, + concat!( + "Offset of field: ", + stringify!(_PQprintOpt), + "::", + stringify!(pager) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).fieldSep) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(_PQprintOpt), + "::", + stringify!(fieldSep) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).tableOpt) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(_PQprintOpt), + "::", + stringify!(tableOpt) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).caption) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(_PQprintOpt), + "::", + stringify!(caption) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).fieldName) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(_PQprintOpt), + "::", + stringify!(fieldName) + ) + ); } pub type PQprintOpt = _PQprintOpt; #[repr(C)] -#[derive(Debug, Copy)] +#[derive(Debug, Copy, Clone)] pub struct _PQconninfoOption { pub keyword: *mut ::std::os::raw::c_char, pub envvar: *mut ::std::os::raw::c_char, @@ -289,47 +1623,186 @@ pub struct _PQconninfoOption { } #[test] fn bindgen_test_layout__PQconninfoOption() { - assert_eq!(::std::mem::size_of::<_PQconninfoOption>() , 56usize); - assert_eq!(::std::mem::align_of::<_PQconninfoOption>() , 8usize); -} -impl Clone for _PQconninfoOption { - fn clone(&self) -> Self { *self } + const UNINIT: ::std::mem::MaybeUninit<_PQconninfoOption> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::<_PQconninfoOption>(), + 56usize, + concat!("Size of: ", stringify!(_PQconninfoOption)) + ); + assert_eq!( + ::std::mem::align_of::<_PQconninfoOption>(), + 8usize, + concat!("Alignment of ", stringify!(_PQconninfoOption)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).keyword) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(_PQconninfoOption), + "::", + stringify!(keyword) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).envvar) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(_PQconninfoOption), + "::", + stringify!(envvar) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).compiled) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(_PQconninfoOption), + "::", + stringify!(compiled) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).val) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(_PQconninfoOption), + "::", + stringify!(val) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).label) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(_PQconninfoOption), + "::", + stringify!(label) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).dispchar) as usize - ptr as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(_PQconninfoOption), + "::", + stringify!(dispchar) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).dispsize) as usize - ptr as usize }, + 48usize, + concat!( + "Offset of field: ", + stringify!(_PQconninfoOption), + "::", + stringify!(dispsize) + ) + ); } pub type PQconninfoOption = _PQconninfoOption; #[repr(C)] -#[derive(Debug, Copy)] -pub struct _bindgen_ty_8 { +#[derive(Copy, Clone)] +pub struct PQArgBlock { pub len: ::std::os::raw::c_int, pub isint: ::std::os::raw::c_int, - pub u: _bindgen_ty_8__bindgen_ty_1, + pub u: PQArgBlock__bindgen_ty_1, } #[repr(C)] -#[derive(Debug, Copy)] -pub struct _bindgen_ty_8__bindgen_ty_1 { - pub ptr: __BindgenUnionField<*mut ::std::os::raw::c_int>, - pub integer: __BindgenUnionField<::std::os::raw::c_int>, - pub bindgen_union_field: u64, +#[derive(Copy, Clone)] +pub union PQArgBlock__bindgen_ty_1 { + pub ptr: *mut ::std::os::raw::c_int, + pub integer: ::std::os::raw::c_int, } #[test] -fn bindgen_test_layout__bindgen_ty_8__bindgen_ty_1() { - assert_eq!(::std::mem::size_of::<_bindgen_ty_8__bindgen_ty_1>() , 8usize); - assert_eq!(::std::mem::align_of::<_bindgen_ty_8__bindgen_ty_1>() , - 8usize); -} -impl Clone for _bindgen_ty_8__bindgen_ty_1 { - fn clone(&self) -> Self { *self } +fn bindgen_test_layout_PQArgBlock__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(PQArgBlock__bindgen_ty_1)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(PQArgBlock__bindgen_ty_1)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ptr) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(PQArgBlock__bindgen_ty_1), + "::", + stringify!(ptr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).integer) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(PQArgBlock__bindgen_ty_1), + "::", + stringify!(integer) + ) + ); } #[test] -fn bindgen_test_layout__bindgen_ty_8() { - assert_eq!(::std::mem::size_of::<_bindgen_ty_8>() , 16usize); - assert_eq!(::std::mem::align_of::<_bindgen_ty_8>() , 8usize); +fn bindgen_test_layout_PQArgBlock() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(PQArgBlock)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(PQArgBlock)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).len) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(PQArgBlock), + "::", + stringify!(len) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).isint) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(PQArgBlock), + "::", + stringify!(isint) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).u) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(PQArgBlock), + "::", + stringify!(u) + ) + ); } -impl Clone for _bindgen_ty_8 { - fn clone(&self) -> Self { *self } -} -pub type PQArgBlock = _bindgen_ty_8; #[repr(C)] -#[derive(Debug, Copy)] +#[derive(Debug, Copy, Clone)] pub struct pgresAttDesc { pub name: *mut ::std::os::raw::c_char, pub tableid: Oid, @@ -341,45 +1814,123 @@ pub struct pgresAttDesc { } #[test] fn bindgen_test_layout_pgresAttDesc() { - assert_eq!(::std::mem::size_of::() , 32usize); - assert_eq!(::std::mem::align_of::() , 8usize); -} -impl Clone for pgresAttDesc { - fn clone(&self) -> Self { *self } + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 32usize, + concat!("Size of: ", stringify!(pgresAttDesc)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(pgresAttDesc)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(pgresAttDesc), + "::", + stringify!(name) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).tableid) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(pgresAttDesc), + "::", + stringify!(tableid) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).columnid) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(pgresAttDesc), + "::", + stringify!(columnid) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).format) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(pgresAttDesc), + "::", + stringify!(format) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).typid) as usize - ptr as usize }, + 20usize, + concat!( + "Offset of field: ", + stringify!(pgresAttDesc), + "::", + stringify!(typid) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).typlen) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(pgresAttDesc), + "::", + stringify!(typlen) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).atttypmod) as usize - ptr as usize }, + 28usize, + concat!( + "Offset of field: ", + stringify!(pgresAttDesc), + "::", + stringify!(atttypmod) + ) + ); } pub type PGresAttDesc = pgresAttDesc; extern "C" { - pub fn PQconnectStart(conninfo: *const ::std::os::raw::c_char) - -> *mut PGconn; + pub fn PQconnectStart(conninfo: *const ::std::os::raw::c_char) -> *mut PGconn; } extern "C" { - pub fn PQconnectStartParams(keywords: - *const *const ::std::os::raw::c_char, - values: *const *const ::std::os::raw::c_char, - expand_dbname: ::std::os::raw::c_int) - -> *mut PGconn; + pub fn PQconnectStartParams( + keywords: *const *const ::std::os::raw::c_char, + values: *const *const ::std::os::raw::c_char, + expand_dbname: ::std::os::raw::c_int, + ) -> *mut PGconn; } extern "C" { pub fn PQconnectPoll(conn: *mut PGconn) -> PostgresPollingStatusType; } extern "C" { - pub fn PQconnectdb(conninfo: *const ::std::os::raw::c_char) - -> *mut PGconn; + pub fn PQconnectdb(conninfo: *const ::std::os::raw::c_char) -> *mut PGconn; } extern "C" { - pub fn PQconnectdbParams(keywords: *const *const ::std::os::raw::c_char, - values: *const *const ::std::os::raw::c_char, - expand_dbname: ::std::os::raw::c_int) - -> *mut PGconn; + pub fn PQconnectdbParams( + keywords: *const *const ::std::os::raw::c_char, + values: *const *const ::std::os::raw::c_char, + expand_dbname: ::std::os::raw::c_int, + ) -> *mut PGconn; } extern "C" { - pub fn PQsetdbLogin(pghost: *const ::std::os::raw::c_char, - pgport: *const ::std::os::raw::c_char, - pgoptions: *const ::std::os::raw::c_char, - pgtty: *const ::std::os::raw::c_char, - dbName: *const ::std::os::raw::c_char, - login: *const ::std::os::raw::c_char, - pwd: *const ::std::os::raw::c_char) -> *mut PGconn; + pub fn PQsetdbLogin( + pghost: *const ::std::os::raw::c_char, + pgport: *const ::std::os::raw::c_char, + pgoptions: *const ::std::os::raw::c_char, + pgtty: *const ::std::os::raw::c_char, + dbName: *const ::std::os::raw::c_char, + login: *const ::std::os::raw::c_char, + pwd: *const ::std::os::raw::c_char, + ) -> *mut PGconn; } extern "C" { pub fn PQfinish(conn: *mut PGconn); @@ -388,9 +1939,10 @@ extern "C" { pub fn PQconndefaults() -> *mut PQconninfoOption; } extern "C" { - pub fn PQconninfoParse(conninfo: *const ::std::os::raw::c_char, - errmsg: *mut *mut ::std::os::raw::c_char) - -> *mut PQconninfoOption; + pub fn PQconninfoParse( + conninfo: *const ::std::os::raw::c_char, + errmsg: *mut *mut ::std::os::raw::c_char, + ) -> *mut PQconninfoOption; } extern "C" { pub fn PQconninfo(conn: *mut PGconn) -> *mut PQconninfoOption; @@ -414,10 +1966,11 @@ extern "C" { pub fn PQfreeCancel(cancel: *mut PGcancel); } extern "C" { - pub fn PQcancel(cancel: *mut PGcancel, - errbuf: *mut ::std::os::raw::c_char, - errbufsize: ::std::os::raw::c_int) - -> ::std::os::raw::c_int; + pub fn PQcancel( + cancel: *mut PGcancel, + errbuf: *mut ::std::os::raw::c_char, + errbufsize: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; } extern "C" { pub fn PQrequestCancel(conn: *mut PGconn) -> ::std::os::raw::c_int; @@ -434,6 +1987,9 @@ extern "C" { extern "C" { pub fn PQhost(conn: *const PGconn) -> *mut ::std::os::raw::c_char; } +extern "C" { + pub fn PQhostaddr(conn: *const PGconn) -> *mut ::std::os::raw::c_char; +} extern "C" { pub fn PQport(conn: *const PGconn) -> *mut ::std::os::raw::c_char; } @@ -447,13 +2003,13 @@ extern "C" { pub fn PQstatus(conn: *const PGconn) -> ConnStatusType; } extern "C" { - pub fn PQtransactionStatus(conn: *const PGconn) - -> PGTransactionStatusType; + pub fn PQtransactionStatus(conn: *const PGconn) -> PGTransactionStatusType; } extern "C" { - pub fn PQparameterStatus(conn: *const PGconn, - paramName: *const ::std::os::raw::c_char) - -> *const ::std::os::raw::c_char; + pub fn PQparameterStatus( + conn: *const PGconn, + paramName: *const ::std::os::raw::c_char, + ) -> *const ::std::os::raw::c_char; } extern "C" { pub fn PQprotocolVersion(conn: *const PGconn) -> ::std::os::raw::c_int; @@ -471,37 +2027,43 @@ extern "C" { pub fn PQbackendPID(conn: *const PGconn) -> ::std::os::raw::c_int; } extern "C" { - pub fn PQconnectionNeedsPassword(conn: *const PGconn) - -> ::std::os::raw::c_int; + pub fn PQpipelineStatus(conn: *const PGconn) -> PGpipelineStatus; +} +extern "C" { + pub fn PQconnectionNeedsPassword(conn: *const PGconn) -> ::std::os::raw::c_int; } extern "C" { - pub fn PQconnectionUsedPassword(conn: *const PGconn) - -> ::std::os::raw::c_int; + pub fn PQconnectionUsedPassword(conn: *const PGconn) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn PQconnectionUsedGSSAPI(conn: *const PGconn) -> ::std::os::raw::c_int; } extern "C" { pub fn PQclientEncoding(conn: *const PGconn) -> ::std::os::raw::c_int; } extern "C" { - pub fn PQsetClientEncoding(conn: *mut PGconn, - encoding: *const ::std::os::raw::c_char) - -> ::std::os::raw::c_int; + pub fn PQsetClientEncoding( + conn: *mut PGconn, + encoding: *const ::std::os::raw::c_char, + ) -> ::std::os::raw::c_int; } extern "C" { pub fn PQsslInUse(conn: *mut PGconn) -> ::std::os::raw::c_int; } extern "C" { - pub fn PQsslStruct(conn: *mut PGconn, - struct_name: *const ::std::os::raw::c_char) - -> *mut ::std::os::raw::c_void; + pub fn PQsslStruct( + conn: *mut PGconn, + struct_name: *const ::std::os::raw::c_char, + ) -> *mut ::std::os::raw::c_void; } extern "C" { - pub fn PQsslAttribute(conn: *mut PGconn, - attribute_name: *const ::std::os::raw::c_char) - -> *const ::std::os::raw::c_char; + pub fn PQsslAttribute( + conn: *mut PGconn, + attribute_name: *const ::std::os::raw::c_char, + ) -> *const ::std::os::raw::c_char; } extern "C" { - pub fn PQsslAttributeNames(conn: *mut PGconn) - -> *const *const ::std::os::raw::c_char; + pub fn PQsslAttributeNames(conn: *mut PGconn) -> *const *const ::std::os::raw::c_char; } extern "C" { pub fn PQgetssl(conn: *mut PGconn) -> *mut ::std::os::raw::c_void; @@ -510,100 +2072,123 @@ extern "C" { pub fn PQinitSSL(do_init: ::std::os::raw::c_int); } extern "C" { - pub fn PQinitOpenSSL(do_ssl: ::std::os::raw::c_int, - do_crypto: ::std::os::raw::c_int); + pub fn PQinitOpenSSL(do_ssl: ::std::os::raw::c_int, do_crypto: ::std::os::raw::c_int); } extern "C" { - pub fn PQsetErrorVerbosity(conn: *mut PGconn, verbosity: PGVerbosity) - -> PGVerbosity; + pub fn PQgssEncInUse(conn: *mut PGconn) -> ::std::os::raw::c_int; } extern "C" { - pub fn PQtrace(conn: *mut PGconn, debug_port: *mut FILE); + pub fn PQgetgssctx(conn: *mut PGconn) -> *mut ::std::os::raw::c_void; } extern "C" { - pub fn PQuntrace(conn: *mut PGconn); + pub fn PQsetErrorVerbosity(conn: *mut PGconn, verbosity: PGVerbosity) -> PGVerbosity; +} +extern "C" { + pub fn PQsetErrorContextVisibility( + conn: *mut PGconn, + show_context: PGContextVisibility, + ) -> PGContextVisibility; } extern "C" { - pub fn PQsetNoticeReceiver(conn: *mut PGconn, proc_: PQnoticeReceiver, - arg: *mut ::std::os::raw::c_void) - -> PQnoticeReceiver; + pub fn PQsetNoticeReceiver( + conn: *mut PGconn, + proc_: PQnoticeReceiver, + arg: *mut ::std::os::raw::c_void, + ) -> PQnoticeReceiver; } extern "C" { - pub fn PQsetNoticeProcessor(conn: *mut PGconn, proc_: PQnoticeProcessor, - arg: *mut ::std::os::raw::c_void) - -> PQnoticeProcessor; + pub fn PQsetNoticeProcessor( + conn: *mut PGconn, + proc_: PQnoticeProcessor, + arg: *mut ::std::os::raw::c_void, + ) -> PQnoticeProcessor; } pub type pgthreadlock_t = - ::std::option::Option; + ::std::option::Option; extern "C" { pub fn PQregisterThreadLock(newhandler: pgthreadlock_t) -> pgthreadlock_t; } extern "C" { - pub fn PQexec(conn: *mut PGconn, query: *const ::std::os::raw::c_char) - -> *mut PGresult; + pub fn PQtrace(conn: *mut PGconn, debug_port: *mut FILE); +} +extern "C" { + pub fn PQuntrace(conn: *mut PGconn); +} +extern "C" { + pub fn PQsetTraceFlags(conn: *mut PGconn, flags: ::std::os::raw::c_int); } extern "C" { - pub fn PQexecParams(conn: *mut PGconn, - command: *const ::std::os::raw::c_char, - nParams: ::std::os::raw::c_int, - paramTypes: *const Oid, - paramValues: *const *const ::std::os::raw::c_char, - paramLengths: *const ::std::os::raw::c_int, - paramFormats: *const ::std::os::raw::c_int, - resultFormat: ::std::os::raw::c_int) -> *mut PGresult; + pub fn PQexec(conn: *mut PGconn, query: *const ::std::os::raw::c_char) -> *mut PGresult; } extern "C" { - pub fn PQprepare(conn: *mut PGconn, - stmtName: *const ::std::os::raw::c_char, - query: *const ::std::os::raw::c_char, - nParams: ::std::os::raw::c_int, paramTypes: *const Oid) - -> *mut PGresult; + pub fn PQexecParams( + conn: *mut PGconn, + command: *const ::std::os::raw::c_char, + nParams: ::std::os::raw::c_int, + paramTypes: *const Oid, + paramValues: *const *const ::std::os::raw::c_char, + paramLengths: *const ::std::os::raw::c_int, + paramFormats: *const ::std::os::raw::c_int, + resultFormat: ::std::os::raw::c_int, + ) -> *mut PGresult; } extern "C" { - pub fn PQexecPrepared(conn: *mut PGconn, - stmtName: *const ::std::os::raw::c_char, - nParams: ::std::os::raw::c_int, - paramValues: *const *const ::std::os::raw::c_char, - paramLengths: *const ::std::os::raw::c_int, - paramFormats: *const ::std::os::raw::c_int, - resultFormat: ::std::os::raw::c_int) - -> *mut PGresult; + pub fn PQprepare( + conn: *mut PGconn, + stmtName: *const ::std::os::raw::c_char, + query: *const ::std::os::raw::c_char, + nParams: ::std::os::raw::c_int, + paramTypes: *const Oid, + ) -> *mut PGresult; } extern "C" { - pub fn PQsendQuery(conn: *mut PGconn, - query: *const ::std::os::raw::c_char) - -> ::std::os::raw::c_int; + pub fn PQexecPrepared( + conn: *mut PGconn, + stmtName: *const ::std::os::raw::c_char, + nParams: ::std::os::raw::c_int, + paramValues: *const *const ::std::os::raw::c_char, + paramLengths: *const ::std::os::raw::c_int, + paramFormats: *const ::std::os::raw::c_int, + resultFormat: ::std::os::raw::c_int, + ) -> *mut PGresult; } extern "C" { - pub fn PQsendQueryParams(conn: *mut PGconn, - command: *const ::std::os::raw::c_char, - nParams: ::std::os::raw::c_int, - paramTypes: *const Oid, - paramValues: - *const *const ::std::os::raw::c_char, - paramLengths: *const ::std::os::raw::c_int, - paramFormats: *const ::std::os::raw::c_int, - resultFormat: ::std::os::raw::c_int) - -> ::std::os::raw::c_int; + pub fn PQsendQuery( + conn: *mut PGconn, + query: *const ::std::os::raw::c_char, + ) -> ::std::os::raw::c_int; } extern "C" { - pub fn PQsendPrepare(conn: *mut PGconn, - stmtName: *const ::std::os::raw::c_char, - query: *const ::std::os::raw::c_char, - nParams: ::std::os::raw::c_int, - paramTypes: *const Oid) -> ::std::os::raw::c_int; + pub fn PQsendQueryParams( + conn: *mut PGconn, + command: *const ::std::os::raw::c_char, + nParams: ::std::os::raw::c_int, + paramTypes: *const Oid, + paramValues: *const *const ::std::os::raw::c_char, + paramLengths: *const ::std::os::raw::c_int, + paramFormats: *const ::std::os::raw::c_int, + resultFormat: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; } extern "C" { - pub fn PQsendQueryPrepared(conn: *mut PGconn, - stmtName: *const ::std::os::raw::c_char, - nParams: ::std::os::raw::c_int, - paramValues: - *const *const ::std::os::raw::c_char, - paramLengths: *const ::std::os::raw::c_int, - paramFormats: *const ::std::os::raw::c_int, - resultFormat: ::std::os::raw::c_int) - -> ::std::os::raw::c_int; + pub fn PQsendPrepare( + conn: *mut PGconn, + stmtName: *const ::std::os::raw::c_char, + query: *const ::std::os::raw::c_char, + nParams: ::std::os::raw::c_int, + paramTypes: *const Oid, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn PQsendQueryPrepared( + conn: *mut PGconn, + stmtName: *const ::std::os::raw::c_char, + nParams: ::std::os::raw::c_int, + paramValues: *const *const ::std::os::raw::c_char, + paramLengths: *const ::std::os::raw::c_int, + paramFormats: *const ::std::os::raw::c_int, + resultFormat: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; } extern "C" { pub fn PQsetSingleRowMode(conn: *mut PGconn) -> ::std::os::raw::c_int; @@ -617,52 +2202,74 @@ extern "C" { extern "C" { pub fn PQconsumeInput(conn: *mut PGconn) -> ::std::os::raw::c_int; } +extern "C" { + pub fn PQenterPipelineMode(conn: *mut PGconn) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn PQexitPipelineMode(conn: *mut PGconn) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn PQpipelineSync(conn: *mut PGconn) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn PQsendFlushRequest(conn: *mut PGconn) -> ::std::os::raw::c_int; +} extern "C" { pub fn PQnotifies(conn: *mut PGconn) -> *mut PGnotify; } extern "C" { - pub fn PQputCopyData(conn: *mut PGconn, - buffer: *const ::std::os::raw::c_char, - nbytes: ::std::os::raw::c_int) - -> ::std::os::raw::c_int; + pub fn PQputCopyData( + conn: *mut PGconn, + buffer: *const ::std::os::raw::c_char, + nbytes: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; } extern "C" { - pub fn PQputCopyEnd(conn: *mut PGconn, - errormsg: *const ::std::os::raw::c_char) - -> ::std::os::raw::c_int; + pub fn PQputCopyEnd( + conn: *mut PGconn, + errormsg: *const ::std::os::raw::c_char, + ) -> ::std::os::raw::c_int; } extern "C" { - pub fn PQgetCopyData(conn: *mut PGconn, - buffer: *mut *mut ::std::os::raw::c_char, - async: ::std::os::raw::c_int) - -> ::std::os::raw::c_int; + pub fn PQgetCopyData( + conn: *mut PGconn, + buffer: *mut *mut ::std::os::raw::c_char, + async_: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; } extern "C" { - pub fn PQgetline(conn: *mut PGconn, string: *mut ::std::os::raw::c_char, - length: ::std::os::raw::c_int) -> ::std::os::raw::c_int; + pub fn PQgetline( + conn: *mut PGconn, + buffer: *mut ::std::os::raw::c_char, + length: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; } extern "C" { - pub fn PQputline(conn: *mut PGconn, string: *const ::std::os::raw::c_char) - -> ::std::os::raw::c_int; + pub fn PQputline( + conn: *mut PGconn, + string: *const ::std::os::raw::c_char, + ) -> ::std::os::raw::c_int; } extern "C" { - pub fn PQgetlineAsync(conn: *mut PGconn, - buffer: *mut ::std::os::raw::c_char, - bufsize: ::std::os::raw::c_int) - -> ::std::os::raw::c_int; + pub fn PQgetlineAsync( + conn: *mut PGconn, + buffer: *mut ::std::os::raw::c_char, + bufsize: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; } extern "C" { - pub fn PQputnbytes(conn: *mut PGconn, - buffer: *const ::std::os::raw::c_char, - nbytes: ::std::os::raw::c_int) - -> ::std::os::raw::c_int; + pub fn PQputnbytes( + conn: *mut PGconn, + buffer: *const ::std::os::raw::c_char, + nbytes: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; } extern "C" { pub fn PQendcopy(conn: *mut PGconn) -> ::std::os::raw::c_int; } extern "C" { pub fn PQsetnonblocking(conn: *mut PGconn, arg: ::std::os::raw::c_int) - -> ::std::os::raw::c_int; + -> ::std::os::raw::c_int; } extern "C" { pub fn PQisnonblocking(conn: *const PGconn) -> ::std::os::raw::c_int; @@ -674,19 +2281,25 @@ extern "C" { pub fn PQping(conninfo: *const ::std::os::raw::c_char) -> PGPing; } extern "C" { - pub fn PQpingParams(keywords: *const *const ::std::os::raw::c_char, - values: *const *const ::std::os::raw::c_char, - expand_dbname: ::std::os::raw::c_int) -> PGPing; + pub fn PQpingParams( + keywords: *const *const ::std::os::raw::c_char, + values: *const *const ::std::os::raw::c_char, + expand_dbname: ::std::os::raw::c_int, + ) -> PGPing; } extern "C" { pub fn PQflush(conn: *mut PGconn) -> ::std::os::raw::c_int; } extern "C" { - pub fn PQfn(conn: *mut PGconn, fnid: ::std::os::raw::c_int, - result_buf: *mut ::std::os::raw::c_int, - result_len: *mut ::std::os::raw::c_int, - result_is_int: ::std::os::raw::c_int, args: *const PQArgBlock, - nargs: ::std::os::raw::c_int) -> *mut PGresult; + pub fn PQfn( + conn: *mut PGconn, + fnid: ::std::os::raw::c_int, + result_buf: *mut ::std::os::raw::c_int, + result_len: *mut ::std::os::raw::c_int, + result_is_int: ::std::os::raw::c_int, + args: *const PQArgBlock, + nargs: ::std::os::raw::c_int, + ) -> *mut PGresult; } extern "C" { pub fn PQresultStatus(res: *const PGresult) -> ExecStatusType; @@ -695,13 +2308,20 @@ extern "C" { pub fn PQresStatus(status: ExecStatusType) -> *mut ::std::os::raw::c_char; } extern "C" { - pub fn PQresultErrorMessage(res: *const PGresult) - -> *mut ::std::os::raw::c_char; + pub fn PQresultErrorMessage(res: *const PGresult) -> *mut ::std::os::raw::c_char; } extern "C" { - pub fn PQresultErrorField(res: *const PGresult, - fieldcode: ::std::os::raw::c_int) - -> *mut ::std::os::raw::c_char; + pub fn PQresultVerboseErrorMessage( + res: *const PGresult, + verbosity: PGVerbosity, + show_context: PGContextVisibility, + ) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn PQresultErrorField( + res: *const PGresult, + fieldcode: ::std::os::raw::c_int, + ) -> *mut ::std::os::raw::c_char; } extern "C" { pub fn PQntuples(res: *const PGresult) -> ::std::os::raw::c_int; @@ -713,37 +2333,41 @@ extern "C" { pub fn PQbinaryTuples(res: *const PGresult) -> ::std::os::raw::c_int; } extern "C" { - pub fn PQfname(res: *const PGresult, field_num: ::std::os::raw::c_int) - -> *mut ::std::os::raw::c_char; + pub fn PQfname( + res: *const PGresult, + field_num: ::std::os::raw::c_int, + ) -> *mut ::std::os::raw::c_char; } extern "C" { - pub fn PQfnumber(res: *const PGresult, - field_name: *const ::std::os::raw::c_char) - -> ::std::os::raw::c_int; + pub fn PQfnumber( + res: *const PGresult, + field_name: *const ::std::os::raw::c_char, + ) -> ::std::os::raw::c_int; } extern "C" { - pub fn PQftable(res: *const PGresult, field_num: ::std::os::raw::c_int) - -> Oid; + pub fn PQftable(res: *const PGresult, field_num: ::std::os::raw::c_int) -> Oid; } extern "C" { - pub fn PQftablecol(res: *const PGresult, field_num: ::std::os::raw::c_int) - -> ::std::os::raw::c_int; + pub fn PQftablecol( + res: *const PGresult, + field_num: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; } extern "C" { - pub fn PQfformat(res: *const PGresult, field_num: ::std::os::raw::c_int) - -> ::std::os::raw::c_int; + pub fn PQfformat( + res: *const PGresult, + field_num: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; } extern "C" { - pub fn PQftype(res: *const PGresult, field_num: ::std::os::raw::c_int) - -> Oid; + pub fn PQftype(res: *const PGresult, field_num: ::std::os::raw::c_int) -> Oid; } extern "C" { pub fn PQfsize(res: *const PGresult, field_num: ::std::os::raw::c_int) - -> ::std::os::raw::c_int; + -> ::std::os::raw::c_int; } extern "C" { - pub fn PQfmod(res: *const PGresult, field_num: ::std::os::raw::c_int) - -> ::std::os::raw::c_int; + pub fn PQfmod(res: *const PGresult, field_num: ::std::os::raw::c_int) -> ::std::os::raw::c_int; } extern "C" { pub fn PQcmdStatus(res: *mut PGresult) -> *mut ::std::os::raw::c_char; @@ -758,46 +2382,55 @@ extern "C" { pub fn PQcmdTuples(res: *mut PGresult) -> *mut ::std::os::raw::c_char; } extern "C" { - pub fn PQgetvalue(res: *const PGresult, tup_num: ::std::os::raw::c_int, - field_num: ::std::os::raw::c_int) - -> *mut ::std::os::raw::c_char; + pub fn PQgetvalue( + res: *const PGresult, + tup_num: ::std::os::raw::c_int, + field_num: ::std::os::raw::c_int, + ) -> *mut ::std::os::raw::c_char; } extern "C" { - pub fn PQgetlength(res: *const PGresult, tup_num: ::std::os::raw::c_int, - field_num: ::std::os::raw::c_int) - -> ::std::os::raw::c_int; + pub fn PQgetlength( + res: *const PGresult, + tup_num: ::std::os::raw::c_int, + field_num: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; } extern "C" { - pub fn PQgetisnull(res: *const PGresult, tup_num: ::std::os::raw::c_int, - field_num: ::std::os::raw::c_int) - -> ::std::os::raw::c_int; + pub fn PQgetisnull( + res: *const PGresult, + tup_num: ::std::os::raw::c_int, + field_num: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; } extern "C" { pub fn PQnparams(res: *const PGresult) -> ::std::os::raw::c_int; } extern "C" { - pub fn PQparamtype(res: *const PGresult, param_num: ::std::os::raw::c_int) - -> Oid; + pub fn PQparamtype(res: *const PGresult, param_num: ::std::os::raw::c_int) -> Oid; } extern "C" { - pub fn PQdescribePrepared(conn: *mut PGconn, - stmt: *const ::std::os::raw::c_char) - -> *mut PGresult; + pub fn PQdescribePrepared( + conn: *mut PGconn, + stmt: *const ::std::os::raw::c_char, + ) -> *mut PGresult; } extern "C" { - pub fn PQdescribePortal(conn: *mut PGconn, - portal: *const ::std::os::raw::c_char) - -> *mut PGresult; + pub fn PQdescribePortal( + conn: *mut PGconn, + portal: *const ::std::os::raw::c_char, + ) -> *mut PGresult; } extern "C" { - pub fn PQsendDescribePrepared(conn: *mut PGconn, - stmt: *const ::std::os::raw::c_char) - -> ::std::os::raw::c_int; + pub fn PQsendDescribePrepared( + conn: *mut PGconn, + stmt: *const ::std::os::raw::c_char, + ) -> ::std::os::raw::c_int; } extern "C" { - pub fn PQsendDescribePortal(conn: *mut PGconn, - portal: *const ::std::os::raw::c_char) - -> ::std::os::raw::c_int; + pub fn PQsendDescribePortal( + conn: *mut PGconn, + portal: *const ::std::os::raw::c_char, + ) -> ::std::os::raw::c_int; } extern "C" { pub fn PQclear(res: *mut PGresult); @@ -806,100 +2439,322 @@ extern "C" { pub fn PQfreemem(ptr: *mut ::std::os::raw::c_void); } extern "C" { - pub fn PQmakeEmptyPGresult(conn: *mut PGconn, status: ExecStatusType) - -> *mut PGresult; + pub fn PQmakeEmptyPGresult(conn: *mut PGconn, status: ExecStatusType) -> *mut PGresult; +} +extern "C" { + pub fn PQcopyResult(src: *const PGresult, flags: ::std::os::raw::c_int) -> *mut PGresult; +} +extern "C" { + pub fn PQsetResultAttrs( + res: *mut PGresult, + numAttributes: ::std::os::raw::c_int, + attDescs: *mut PGresAttDesc, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn PQresultAlloc(res: *mut PGresult, nBytes: usize) -> *mut ::std::os::raw::c_void; +} +extern "C" { + pub fn PQresultMemorySize(res: *const PGresult) -> usize; +} +extern "C" { + pub fn PQsetvalue( + res: *mut PGresult, + tup_num: ::std::os::raw::c_int, + field_num: ::std::os::raw::c_int, + value: *mut ::std::os::raw::c_char, + len: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn PQescapeStringConn( + conn: *mut PGconn, + to: *mut ::std::os::raw::c_char, + from: *const ::std::os::raw::c_char, + length: usize, + error: *mut ::std::os::raw::c_int, + ) -> usize; +} +extern "C" { + pub fn PQescapeLiteral( + conn: *mut PGconn, + str_: *const ::std::os::raw::c_char, + len: usize, + ) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn PQescapeIdentifier( + conn: *mut PGconn, + str_: *const ::std::os::raw::c_char, + len: usize, + ) -> *mut ::std::os::raw::c_char; } extern "C" { - pub fn PQcopyResult(src: *const PGresult, flags: ::std::os::raw::c_int) - -> *mut PGresult; + pub fn PQescapeByteaConn( + conn: *mut PGconn, + from: *const ::std::os::raw::c_uchar, + from_length: usize, + to_length: *mut usize, + ) -> *mut ::std::os::raw::c_uchar; } extern "C" { - pub fn PQsetResultAttrs(res: *mut PGresult, - numAttributes: ::std::os::raw::c_int, - attDescs: *mut PGresAttDesc) - -> ::std::os::raw::c_int; + pub fn PQunescapeBytea( + strtext: *const ::std::os::raw::c_uchar, + retbuflen: *mut usize, + ) -> *mut ::std::os::raw::c_uchar; } extern "C" { - pub fn PQresultAlloc(res: *mut PGresult, nBytes: usize) - -> *mut ::std::os::raw::c_void; + pub fn PQescapeString( + to: *mut ::std::os::raw::c_char, + from: *const ::std::os::raw::c_char, + length: usize, + ) -> usize; } extern "C" { - pub fn PQsetvalue(res: *mut PGresult, tup_num: ::std::os::raw::c_int, - field_num: ::std::os::raw::c_int, - value: *mut ::std::os::raw::c_char, - len: ::std::os::raw::c_int) -> ::std::os::raw::c_int; + pub fn PQescapeBytea( + from: *const ::std::os::raw::c_uchar, + from_length: usize, + to_length: *mut usize, + ) -> *mut ::std::os::raw::c_uchar; } extern "C" { - pub fn PQescapeStringConn(conn: *mut PGconn, - to: *mut ::std::os::raw::c_char, - from: *const ::std::os::raw::c_char, - length: usize, - error: *mut ::std::os::raw::c_int) -> usize; + pub fn PQprint(fout: *mut FILE, res: *const PGresult, po: *const PQprintOpt); } extern "C" { - pub fn PQescapeLiteral(conn: *mut PGconn, - str: *const ::std::os::raw::c_char, len: usize) - -> *mut ::std::os::raw::c_char; + pub fn PQdisplayTuples( + res: *const PGresult, + fp: *mut FILE, + fillAlign: ::std::os::raw::c_int, + fieldSep: *const ::std::os::raw::c_char, + printHeader: ::std::os::raw::c_int, + quiet: ::std::os::raw::c_int, + ); } extern "C" { - pub fn PQescapeIdentifier(conn: *mut PGconn, - str: *const ::std::os::raw::c_char, len: usize) - -> *mut ::std::os::raw::c_char; + pub fn PQprintTuples( + res: *const PGresult, + fout: *mut FILE, + PrintAttNames: ::std::os::raw::c_int, + TerseOutput: ::std::os::raw::c_int, + colWidth: ::std::os::raw::c_int, + ); } extern "C" { - pub fn PQescapeByteaConn(conn: *mut PGconn, - from: *const ::std::os::raw::c_uchar, - from_length: usize, to_length: *mut usize) - -> *mut ::std::os::raw::c_uchar; + pub fn lo_open( + conn: *mut PGconn, + lobjId: Oid, + mode: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; } extern "C" { - pub fn PQunescapeBytea(strtext: *const ::std::os::raw::c_uchar, - retbuflen: *mut usize) - -> *mut ::std::os::raw::c_uchar; + pub fn lo_close(conn: *mut PGconn, fd: ::std::os::raw::c_int) -> ::std::os::raw::c_int; } extern "C" { - pub fn PQescapeString(to: *mut ::std::os::raw::c_char, - from: *const ::std::os::raw::c_char, length: usize) - -> usize; + pub fn lo_read( + conn: *mut PGconn, + fd: ::std::os::raw::c_int, + buf: *mut ::std::os::raw::c_char, + len: usize, + ) -> ::std::os::raw::c_int; } extern "C" { - pub fn PQescapeBytea(from: *const ::std::os::raw::c_uchar, - from_length: usize, to_length: *mut usize) - -> *mut ::std::os::raw::c_uchar; + pub fn lo_write( + conn: *mut PGconn, + fd: ::std::os::raw::c_int, + buf: *const ::std::os::raw::c_char, + len: usize, + ) -> ::std::os::raw::c_int; } extern "C" { - pub fn PQprint(fout: *mut FILE, res: *const PGresult, - ps: *const PQprintOpt); + pub fn lo_lseek( + conn: *mut PGconn, + fd: ::std::os::raw::c_int, + offset: ::std::os::raw::c_int, + whence: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; } extern "C" { - pub fn PQdisplayTuples(res: *const PGresult, fp: *mut FILE, - fillAlign: ::std::os::raw::c_int, - fieldSep: *const ::std::os::raw::c_char, - printHeader: ::std::os::raw::c_int, - quiet: ::std::os::raw::c_int); + pub fn lo_lseek64( + conn: *mut PGconn, + fd: ::std::os::raw::c_int, + offset: pg_int64, + whence: ::std::os::raw::c_int, + ) -> pg_int64; } extern "C" { - pub fn PQprintTuples(res: *const PGresult, fout: *mut FILE, - printAttName: ::std::os::raw::c_int, - terseOutput: ::std::os::raw::c_int, - width: ::std::os::raw::c_int); + pub fn lo_creat(conn: *mut PGconn, mode: ::std::os::raw::c_int) -> Oid; +} +extern "C" { + pub fn lo_create(conn: *mut PGconn, lobjId: Oid) -> Oid; +} +extern "C" { + pub fn lo_tell(conn: *mut PGconn, fd: ::std::os::raw::c_int) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn lo_tell64(conn: *mut PGconn, fd: ::std::os::raw::c_int) -> pg_int64; +} +extern "C" { + pub fn lo_truncate( + conn: *mut PGconn, + fd: ::std::os::raw::c_int, + len: usize, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn lo_truncate64( + conn: *mut PGconn, + fd: ::std::os::raw::c_int, + len: pg_int64, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn lo_unlink(conn: *mut PGconn, lobjId: Oid) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn lo_import(conn: *mut PGconn, filename: *const ::std::os::raw::c_char) -> Oid; +} +extern "C" { + pub fn lo_import_with_oid( + conn: *mut PGconn, + filename: *const ::std::os::raw::c_char, + lobjId: Oid, + ) -> Oid; +} +extern "C" { + pub fn lo_export( + conn: *mut PGconn, + lobjId: Oid, + filename: *const ::std::os::raw::c_char, + ) -> ::std::os::raw::c_int; } extern "C" { pub fn PQlibVersion() -> ::std::os::raw::c_int; } extern "C" { - pub fn PQmblen(s: *const ::std::os::raw::c_char, - encoding: ::std::os::raw::c_int) -> ::std::os::raw::c_int; + pub fn PQmblen( + s: *const ::std::os::raw::c_char, + encoding: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn PQmblenBounded( + s: *const ::std::os::raw::c_char, + encoding: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; } extern "C" { - pub fn PQdsplen(s: *const ::std::os::raw::c_char, - encoding: ::std::os::raw::c_int) -> ::std::os::raw::c_int; + pub fn PQdsplen( + s: *const ::std::os::raw::c_char, + encoding: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; } extern "C" { pub fn PQenv2encoding() -> ::std::os::raw::c_int; } extern "C" { - pub fn PQencryptPassword(passwd: *const ::std::os::raw::c_char, - user: *const ::std::os::raw::c_char) - -> *mut ::std::os::raw::c_char; + pub fn PQencryptPassword( + passwd: *const ::std::os::raw::c_char, + user: *const ::std::os::raw::c_char, + ) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn PQencryptPasswordConn( + conn: *mut PGconn, + passwd: *const ::std::os::raw::c_char, + user: *const ::std::os::raw::c_char, + algorithm: *const ::std::os::raw::c_char, + ) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn pg_char_to_encoding(name: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn pg_encoding_to_char(encoding: ::std::os::raw::c_int) -> *const ::std::os::raw::c_char; +} +extern "C" { + pub fn pg_valid_server_encoding_id(encoding: ::std::os::raw::c_int) -> ::std::os::raw::c_int; +} +pub type PQsslKeyPassHook_OpenSSL_type = ::std::option::Option< + unsafe extern "C" fn( + buf: *mut ::std::os::raw::c_char, + size: ::std::os::raw::c_int, + conn: *mut PGconn, + ) -> ::std::os::raw::c_int, +>; +extern "C" { + pub fn PQgetSSLKeyPassHook_OpenSSL() -> PQsslKeyPassHook_OpenSSL_type; +} +extern "C" { + pub fn PQsetSSLKeyPassHook_OpenSSL(hook: PQsslKeyPassHook_OpenSSL_type); +} +extern "C" { + pub fn PQdefaultSSLKeyPassHook_OpenSSL( + buf: *mut ::std::os::raw::c_char, + size: ::std::os::raw::c_int, + conn: *mut PGconn, + ) -> ::std::os::raw::c_int; +} +pub type __builtin_va_list = [__va_list_tag; 1usize]; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct __va_list_tag { + pub gp_offset: ::std::os::raw::c_uint, + pub fp_offset: ::std::os::raw::c_uint, + pub overflow_arg_area: *mut ::std::os::raw::c_void, + pub reg_save_area: *mut ::std::os::raw::c_void, +} +#[test] +fn bindgen_test_layout___va_list_tag() { + const UNINIT: ::std::mem::MaybeUninit<__va_list_tag> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::<__va_list_tag>(), + 24usize, + concat!("Size of: ", stringify!(__va_list_tag)) + ); + assert_eq!( + ::std::mem::align_of::<__va_list_tag>(), + 8usize, + concat!("Alignment of ", stringify!(__va_list_tag)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).gp_offset) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(__va_list_tag), + "::", + stringify!(gp_offset) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).fp_offset) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(__va_list_tag), + "::", + stringify!(fp_offset) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).overflow_arg_area) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(__va_list_tag), + "::", + stringify!(overflow_arg_area) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reg_save_area) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(__va_list_tag), + "::", + stringify!(reg_save_area) + ) + ); } diff --git a/src/lib.rs b/src/lib.rs index e2bf380..65f8ff3 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,5 +1,15 @@ #[cfg(feature = "bundled")] extern crate pq_src; +#[cfg(not(feature = "buildtime_bindgen"))] +#[allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] +#[cfg_attr(target_os = "windows", path = "windows_bindings.rs")] mod bindings; + +#[cfg(feature = "buildtime_bindgen")] +#[allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] +mod bindings { + include!(concat!(env!("OUT_DIR"), "/bindings.rs")); +} + pub use bindings::*; diff --git a/src/windows_bindings.rs b/src/windows_bindings.rs new file mode 100644 index 0000000..f51a74c --- /dev/null +++ b/src/windows_bindings.rs @@ -0,0 +1,3759 @@ +/* automatically generated by rust-bindgen 0.69.1 */ + +pub const __MINGW64_VERSION_MAJOR: u32 = 11; +pub const __MINGW64_VERSION_MINOR: u32 = 0; +pub const __MINGW64_VERSION_BUGFIX: u32 = 0; +pub const __MINGW64_VERSION_RC: u32 = 0; +pub const __MINGW64_VERSION_STATE: &[u8; 6] = b"alpha\0"; +pub const __MINGW32_MAJOR_VERSION: u32 = 3; +pub const __MINGW32_MINOR_VERSION: u32 = 11; +pub const _M_AMD64: u32 = 100; +pub const _M_X64: u32 = 100; +pub const __: u32 = 1; +pub const __MINGW_USE_UNDERSCORE_PREFIX: u32 = 0; +pub const __MINGW_HAVE_ANSI_C99_PRINTF: u32 = 1; +pub const __MINGW_HAVE_WIDE_C99_PRINTF: u32 = 1; +pub const __MINGW_HAVE_ANSI_C99_SCANF: u32 = 1; +pub const __MINGW_HAVE_WIDE_C99_SCANF: u32 = 1; +pub const __MINGW_SEC_WARN_STR : & [u8 ; 92] = b"This function or variable may be unsafe, use _CRT_SECURE_NO_WARNINGS to disable deprecation\0" ; +pub const __MINGW_MSVC2005_DEPREC_STR : & [u8 ; 117] = b"This POSIX function is deprecated beginning in Visual C++ 2005, use _CRT_NONSTDC_NO_DEPRECATE to disable deprecation\0" ; +pub const __MINGW_FORTIFY_LEVEL: u32 = 0; +pub const __MINGW_FORTIFY_VA_ARG: u32 = 0; +pub const _CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES: u32 = 0; +pub const _CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY: u32 = 0; +pub const _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES: u32 = 0; +pub const _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT: u32 = 0; +pub const _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY: u32 = 0; +pub const __USE_CRTIMP: u32 = 1; +pub const USE___UUIDOF: u32 = 0; +pub const __CRT__NO_INLINE: u32 = 1; +pub const __MSVCRT_VERSION__: u32 = 1792; +pub const _WIN32_WINNT: u32 = 2560; +pub const MINGW_HAS_SECURE_API: u32 = 1; +pub const __STDC_SECURE_LIB__: u32 = 200411; +pub const __GOT_SECURE_LIB__: u32 = 200411; +pub const MINGW_HAS_DDK_H: u32 = 1; +pub const _CRT_PACKING: u32 = 8; +pub const _SECURECRT_FILL_BUFFER_PATTERN: u32 = 253; +pub const _ARGMAX: u32 = 100; +pub const __USE_MINGW_ANSI_STDIO: u32 = 1; +pub const _CRT_INTERNAL_PRINTF_LEGACY_VSPRINTF_NULL_TERMINATION: u32 = 1; +pub const _CRT_INTERNAL_PRINTF_STANDARD_SNPRINTF_BEHAVIOR: u32 = 2; +pub const _CRT_INTERNAL_PRINTF_LEGACY_WIDE_SPECIFIERS: u32 = 4; +pub const _CRT_INTERNAL_PRINTF_LEGACY_MSVCRT_COMPATIBILITY: u32 = 8; +pub const _CRT_INTERNAL_PRINTF_LEGACY_THREE_DIGIT_EXPONENTS: u32 = 16; +pub const _CRT_INTERNAL_SCANF_SECURECRT: u32 = 1; +pub const _CRT_INTERNAL_SCANF_LEGACY_WIDE_SPECIFIERS: u32 = 2; +pub const _CRT_INTERNAL_SCANF_LEGACY_MSVCRT_COMPATIBILITY: u32 = 4; +pub const _CRT_INTERNAL_LOCAL_PRINTF_OPTIONS: u32 = 4; +pub const _CRT_INTERNAL_LOCAL_SCANF_OPTIONS: u32 = 2; +pub const BUFSIZ: u32 = 512; +pub const _NSTREAM_: u32 = 512; +pub const _IOB_ENTRIES: u32 = 20; +pub const EOF: i32 = -1; +pub const _P_tmpdir: &[u8; 2] = b"\\\0"; +pub const _wP_tmpdir: &[u8; 2] = b"\\\0"; +pub const SEEK_CUR: u32 = 1; +pub const SEEK_END: u32 = 2; +pub const SEEK_SET: u32 = 0; +pub const STDIN_FILENO: u32 = 0; +pub const STDOUT_FILENO: u32 = 1; +pub const STDERR_FILENO: u32 = 2; +pub const FILENAME_MAX: u32 = 260; +pub const FOPEN_MAX: u32 = 20; +pub const _SYS_OPEN: u32 = 20; +pub const TMP_MAX: u32 = 32767; +pub const _IOFBF: u32 = 0; +pub const _IOLBF: u32 = 64; +pub const _IONBF: u32 = 4; +pub const _IOREAD: u32 = 1; +pub const _IOWRT: u32 = 2; +pub const _IOMYBUF: u32 = 8; +pub const _IOEOF: u32 = 16; +pub const _IOERR: u32 = 32; +pub const _IOSTRG: u32 = 64; +pub const _IORW: u32 = 128; +pub const _TWO_DIGIT_EXPONENT: u32 = 1; +pub const P_tmpdir: &[u8; 2] = b"\\\0"; +pub const SYS_OPEN: u32 = 20; +pub const _P_WAIT: u32 = 0; +pub const _P_NOWAIT: u32 = 1; +pub const _OLD_P_OVERLAY: u32 = 2; +pub const _P_NOWAITO: u32 = 3; +pub const _P_DETACH: u32 = 4; +pub const _P_OVERLAY: u32 = 2; +pub const _WAIT_CHILD: u32 = 0; +pub const _WAIT_GRANDCHILD: u32 = 1; +pub const TMP_MAX_S: u32 = 32767; +pub const PG_DIAG_SEVERITY: u8 = 83u8; +pub const PG_DIAG_SEVERITY_NONLOCALIZED: u8 = 86u8; +pub const PG_DIAG_SQLSTATE: u8 = 67u8; +pub const PG_DIAG_MESSAGE_PRIMARY: u8 = 77u8; +pub const PG_DIAG_MESSAGE_DETAIL: u8 = 68u8; +pub const PG_DIAG_MESSAGE_HINT: u8 = 72u8; +pub const PG_DIAG_STATEMENT_POSITION: u8 = 80u8; +pub const PG_DIAG_INTERNAL_POSITION: u8 = 112u8; +pub const PG_DIAG_INTERNAL_QUERY: u8 = 113u8; +pub const PG_DIAG_CONTEXT: u8 = 87u8; +pub const PG_DIAG_SCHEMA_NAME: u8 = 115u8; +pub const PG_DIAG_TABLE_NAME: u8 = 116u8; +pub const PG_DIAG_COLUMN_NAME: u8 = 99u8; +pub const PG_DIAG_DATATYPE_NAME: u8 = 100u8; +pub const PG_DIAG_CONSTRAINT_NAME: u8 = 110u8; +pub const PG_DIAG_SOURCE_FILE: u8 = 70u8; +pub const PG_DIAG_SOURCE_LINE: u8 = 76u8; +pub const PG_DIAG_SOURCE_FUNCTION: u8 = 82u8; +pub const LIBPQ_HAS_PIPELINING: u32 = 1; +pub const LIBPQ_HAS_TRACE_FLAGS: u32 = 1; +pub const LIBPQ_HAS_SSL_LIBRARY_DETECTION: u32 = 1; +pub const PG_COPYRES_ATTRS: u32 = 1; +pub const PG_COPYRES_TUPLES: u32 = 2; +pub const PG_COPYRES_EVENTS: u32 = 4; +pub const PG_COPYRES_NOTICEHOOKS: u32 = 8; +pub const PQTRACE_SUPPRESS_TIMESTAMPS: u32 = 1; +pub const PQTRACE_REGRESS_MODE: u32 = 2; +pub const PQ_QUERY_PARAM_MAX_LIMIT: u32 = 65535; +pub const PQnoPasswordSupplied: &[u8; 35] = b"fe_sendauth: no password supplied\n\0"; +pub type __gnuc_va_list = __builtin_va_list; +pub type va_list = __gnuc_va_list; +extern "C" { + pub fn __mingw_get_crt_info() -> *const ::std::os::raw::c_char; +} +pub type rsize_t = usize; +pub type wchar_t = ::std::os::raw::c_ushort; +pub type wint_t = ::std::os::raw::c_ushort; +pub type wctype_t = ::std::os::raw::c_ushort; +pub type errno_t = ::std::os::raw::c_int; +pub type __time32_t = ::std::os::raw::c_long; +pub type __time64_t = ::std::os::raw::c_longlong; +pub type time_t = __time64_t; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct threadmbcinfostruct { + _unused: [u8; 0], +} +pub type pthreadlocinfo = *mut threadlocaleinfostruct; +pub type pthreadmbcinfo = *mut threadmbcinfostruct; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct __lc_time_data { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct localeinfo_struct { + pub locinfo: pthreadlocinfo, + pub mbcinfo: pthreadmbcinfo, +} +#[test] +fn bindgen_test_layout_localeinfo_struct() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(localeinfo_struct)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(localeinfo_struct)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).locinfo) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(localeinfo_struct), + "::", + stringify!(locinfo) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).mbcinfo) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(localeinfo_struct), + "::", + stringify!(mbcinfo) + ) + ); +} +pub type _locale_tstruct = localeinfo_struct; +pub type _locale_t = *mut localeinfo_struct; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct tagLC_ID { + pub wLanguage: ::std::os::raw::c_ushort, + pub wCountry: ::std::os::raw::c_ushort, + pub wCodePage: ::std::os::raw::c_ushort, +} +#[test] +fn bindgen_test_layout_tagLC_ID() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 6usize, + concat!("Size of: ", stringify!(tagLC_ID)) + ); + assert_eq!( + ::std::mem::align_of::(), + 2usize, + concat!("Alignment of ", stringify!(tagLC_ID)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).wLanguage) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(tagLC_ID), + "::", + stringify!(wLanguage) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).wCountry) as usize - ptr as usize }, + 2usize, + concat!( + "Offset of field: ", + stringify!(tagLC_ID), + "::", + stringify!(wCountry) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).wCodePage) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(tagLC_ID), + "::", + stringify!(wCodePage) + ) + ); +} +pub type LC_ID = tagLC_ID; +pub type LPLC_ID = *mut tagLC_ID; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct threadlocaleinfostruct { + pub refcount: ::std::os::raw::c_int, + pub lc_codepage: ::std::os::raw::c_uint, + pub lc_collate_cp: ::std::os::raw::c_uint, + pub lc_handle: [::std::os::raw::c_ulong; 6usize], + pub lc_id: [LC_ID; 6usize], + pub lc_category: [threadlocaleinfostruct__bindgen_ty_1; 6usize], + pub lc_clike: ::std::os::raw::c_int, + pub mb_cur_max: ::std::os::raw::c_int, + pub lconv_intl_refcount: *mut ::std::os::raw::c_int, + pub lconv_num_refcount: *mut ::std::os::raw::c_int, + pub lconv_mon_refcount: *mut ::std::os::raw::c_int, + pub lconv: *mut lconv, + pub ctype1_refcount: *mut ::std::os::raw::c_int, + pub ctype1: *mut ::std::os::raw::c_ushort, + pub pctype: *const ::std::os::raw::c_ushort, + pub pclmap: *const ::std::os::raw::c_uchar, + pub pcumap: *const ::std::os::raw::c_uchar, + pub lc_time_curr: *mut __lc_time_data, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct threadlocaleinfostruct__bindgen_ty_1 { + pub locale: *mut ::std::os::raw::c_char, + pub wlocale: *mut wchar_t, + pub refcount: *mut ::std::os::raw::c_int, + pub wrefcount: *mut ::std::os::raw::c_int, +} +#[test] +fn bindgen_test_layout_threadlocaleinfostruct__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 32usize, + concat!( + "Size of: ", + stringify!(threadlocaleinfostruct__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(threadlocaleinfostruct__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).locale) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(threadlocaleinfostruct__bindgen_ty_1), + "::", + stringify!(locale) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).wlocale) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(threadlocaleinfostruct__bindgen_ty_1), + "::", + stringify!(wlocale) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).refcount) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(threadlocaleinfostruct__bindgen_ty_1), + "::", + stringify!(refcount) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).wrefcount) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(threadlocaleinfostruct__bindgen_ty_1), + "::", + stringify!(wrefcount) + ) + ); +} +#[test] +fn bindgen_test_layout_threadlocaleinfostruct() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 352usize, + concat!("Size of: ", stringify!(threadlocaleinfostruct)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(threadlocaleinfostruct)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).refcount) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(threadlocaleinfostruct), + "::", + stringify!(refcount) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).lc_codepage) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(threadlocaleinfostruct), + "::", + stringify!(lc_codepage) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).lc_collate_cp) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(threadlocaleinfostruct), + "::", + stringify!(lc_collate_cp) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).lc_handle) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(threadlocaleinfostruct), + "::", + stringify!(lc_handle) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).lc_id) as usize - ptr as usize }, + 36usize, + concat!( + "Offset of field: ", + stringify!(threadlocaleinfostruct), + "::", + stringify!(lc_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).lc_category) as usize - ptr as usize }, + 72usize, + concat!( + "Offset of field: ", + stringify!(threadlocaleinfostruct), + "::", + stringify!(lc_category) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).lc_clike) as usize - ptr as usize }, + 264usize, + concat!( + "Offset of field: ", + stringify!(threadlocaleinfostruct), + "::", + stringify!(lc_clike) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).mb_cur_max) as usize - ptr as usize }, + 268usize, + concat!( + "Offset of field: ", + stringify!(threadlocaleinfostruct), + "::", + stringify!(mb_cur_max) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).lconv_intl_refcount) as usize - ptr as usize }, + 272usize, + concat!( + "Offset of field: ", + stringify!(threadlocaleinfostruct), + "::", + stringify!(lconv_intl_refcount) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).lconv_num_refcount) as usize - ptr as usize }, + 280usize, + concat!( + "Offset of field: ", + stringify!(threadlocaleinfostruct), + "::", + stringify!(lconv_num_refcount) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).lconv_mon_refcount) as usize - ptr as usize }, + 288usize, + concat!( + "Offset of field: ", + stringify!(threadlocaleinfostruct), + "::", + stringify!(lconv_mon_refcount) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).lconv) as usize - ptr as usize }, + 296usize, + concat!( + "Offset of field: ", + stringify!(threadlocaleinfostruct), + "::", + stringify!(lconv) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ctype1_refcount) as usize - ptr as usize }, + 304usize, + concat!( + "Offset of field: ", + stringify!(threadlocaleinfostruct), + "::", + stringify!(ctype1_refcount) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ctype1) as usize - ptr as usize }, + 312usize, + concat!( + "Offset of field: ", + stringify!(threadlocaleinfostruct), + "::", + stringify!(ctype1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pctype) as usize - ptr as usize }, + 320usize, + concat!( + "Offset of field: ", + stringify!(threadlocaleinfostruct), + "::", + stringify!(pctype) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pclmap) as usize - ptr as usize }, + 328usize, + concat!( + "Offset of field: ", + stringify!(threadlocaleinfostruct), + "::", + stringify!(pclmap) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pcumap) as usize - ptr as usize }, + 336usize, + concat!( + "Offset of field: ", + stringify!(threadlocaleinfostruct), + "::", + stringify!(pcumap) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).lc_time_curr) as usize - ptr as usize }, + 344usize, + concat!( + "Offset of field: ", + stringify!(threadlocaleinfostruct), + "::", + stringify!(lc_time_curr) + ) + ); +} +pub type threadlocinfo = threadlocaleinfostruct; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _iobuf { + pub _ptr: *mut ::std::os::raw::c_char, + pub _cnt: ::std::os::raw::c_int, + pub _base: *mut ::std::os::raw::c_char, + pub _flag: ::std::os::raw::c_int, + pub _file: ::std::os::raw::c_int, + pub _charbuf: ::std::os::raw::c_int, + pub _bufsiz: ::std::os::raw::c_int, + pub _tmpfname: *mut ::std::os::raw::c_char, +} +#[test] +fn bindgen_test_layout__iobuf() { + const UNINIT: ::std::mem::MaybeUninit<_iobuf> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::<_iobuf>(), + 48usize, + concat!("Size of: ", stringify!(_iobuf)) + ); + assert_eq!( + ::std::mem::align_of::<_iobuf>(), + 8usize, + concat!("Alignment of ", stringify!(_iobuf)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr)._ptr) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(_iobuf), + "::", + stringify!(_ptr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr)._cnt) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(_iobuf), + "::", + stringify!(_cnt) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr)._base) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(_iobuf), + "::", + stringify!(_base) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr)._flag) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(_iobuf), + "::", + stringify!(_flag) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr)._file) as usize - ptr as usize }, + 28usize, + concat!( + "Offset of field: ", + stringify!(_iobuf), + "::", + stringify!(_file) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr)._charbuf) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(_iobuf), + "::", + stringify!(_charbuf) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr)._bufsiz) as usize - ptr as usize }, + 36usize, + concat!( + "Offset of field: ", + stringify!(_iobuf), + "::", + stringify!(_bufsiz) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr)._tmpfname) as usize - ptr as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(_iobuf), + "::", + stringify!(_tmpfname) + ) + ); +} +pub type FILE = _iobuf; +pub type _off_t = ::std::os::raw::c_long; +pub type off32_t = ::std::os::raw::c_long; +pub type _off64_t = ::std::os::raw::c_longlong; +pub type off64_t = ::std::os::raw::c_longlong; +pub type off_t = off32_t; +extern "C" { + pub fn __acrt_iob_func(index: ::std::os::raw::c_uint) -> *mut FILE; +} +extern "C" { + pub fn __iob_func() -> *mut FILE; +} +pub type fpos_t = ::std::os::raw::c_longlong; +extern "C" { + pub fn __mingw_sscanf( + _Src: *const ::std::os::raw::c_char, + _Format: *const ::std::os::raw::c_char, + ... + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn __mingw_vsscanf( + _Str: *const ::std::os::raw::c_char, + Format: *const ::std::os::raw::c_char, + argp: va_list, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn __mingw_scanf(_Format: *const ::std::os::raw::c_char, ...) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn __mingw_vscanf( + Format: *const ::std::os::raw::c_char, + argp: va_list, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn __mingw_fscanf( + _File: *mut FILE, + _Format: *const ::std::os::raw::c_char, + ... + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn __mingw_vfscanf( + fp: *mut FILE, + Format: *const ::std::os::raw::c_char, + argp: va_list, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn __mingw_vsnprintf( + _DstBuf: *mut ::std::os::raw::c_char, + _MaxCount: usize, + _Format: *const ::std::os::raw::c_char, + _ArgList: va_list, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn __mingw_snprintf( + s: *mut ::std::os::raw::c_char, + n: usize, + format: *const ::std::os::raw::c_char, + ... + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn __mingw_printf(arg1: *const ::std::os::raw::c_char, ...) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn __mingw_vprintf( + arg1: *const ::std::os::raw::c_char, + arg2: va_list, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn __mingw_fprintf( + arg1: *mut FILE, + arg2: *const ::std::os::raw::c_char, + ... + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn __mingw_vfprintf( + arg1: *mut FILE, + arg2: *const ::std::os::raw::c_char, + arg3: va_list, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn __mingw_sprintf( + arg1: *mut ::std::os::raw::c_char, + arg2: *const ::std::os::raw::c_char, + ... + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn __mingw_vsprintf( + arg1: *mut ::std::os::raw::c_char, + arg2: *const ::std::os::raw::c_char, + arg3: va_list, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn __mingw_asprintf( + arg1: *mut *mut ::std::os::raw::c_char, + arg2: *const ::std::os::raw::c_char, + ... + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn __mingw_vasprintf( + arg1: *mut *mut ::std::os::raw::c_char, + arg2: *const ::std::os::raw::c_char, + arg3: va_list, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn __ms_sscanf( + _Src: *const ::std::os::raw::c_char, + _Format: *const ::std::os::raw::c_char, + ... + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn __ms_scanf(_Format: *const ::std::os::raw::c_char, ...) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn __ms_fscanf( + _File: *mut FILE, + _Format: *const ::std::os::raw::c_char, + ... + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn __ms_printf(arg1: *const ::std::os::raw::c_char, ...) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn __ms_vprintf( + arg1: *const ::std::os::raw::c_char, + arg2: va_list, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn __ms_fprintf( + arg1: *mut FILE, + arg2: *const ::std::os::raw::c_char, + ... + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn __ms_vfprintf( + arg1: *mut FILE, + arg2: *const ::std::os::raw::c_char, + arg3: va_list, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn __ms_sprintf( + arg1: *mut ::std::os::raw::c_char, + arg2: *const ::std::os::raw::c_char, + ... + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn __ms_vsprintf( + arg1: *mut ::std::os::raw::c_char, + arg2: *const ::std::os::raw::c_char, + arg3: va_list, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _filbuf(_File: *mut FILE) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _flsbuf(_Ch: ::std::os::raw::c_int, _File: *mut FILE) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _fsopen( + _Filename: *const ::std::os::raw::c_char, + _Mode: *const ::std::os::raw::c_char, + _ShFlag: ::std::os::raw::c_int, + ) -> *mut FILE; +} +extern "C" { + pub fn clearerr(_File: *mut FILE); +} +extern "C" { + pub fn fclose(_File: *mut FILE) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _fcloseall() -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _fdopen( + _FileHandle: ::std::os::raw::c_int, + _Mode: *const ::std::os::raw::c_char, + ) -> *mut FILE; +} +extern "C" { + pub fn feof(_File: *mut FILE) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ferror(_File: *mut FILE) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn fflush(_File: *mut FILE) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn fgetc(_File: *mut FILE) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _fgetchar() -> ::std::os::raw::c_int; +} +extern "C" { + pub fn fgetpos(_File: *mut FILE, _Pos: *mut fpos_t) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn fgetpos64(_File: *mut FILE, _Pos: *mut fpos_t) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn fgets( + _Buf: *mut ::std::os::raw::c_char, + _MaxCount: ::std::os::raw::c_int, + _File: *mut FILE, + ) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn _fileno(_File: *mut FILE) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _tempnam( + _DirName: *const ::std::os::raw::c_char, + _FilePrefix: *const ::std::os::raw::c_char, + ) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn _flushall() -> ::std::os::raw::c_int; +} +extern "C" { + pub fn fopen( + _Filename: *const ::std::os::raw::c_char, + _Mode: *const ::std::os::raw::c_char, + ) -> *mut FILE; +} +extern "C" { + pub fn fopen64( + filename: *const ::std::os::raw::c_char, + mode: *const ::std::os::raw::c_char, + ) -> *mut FILE; +} +extern "C" { + pub fn fputc(_Ch: ::std::os::raw::c_int, _File: *mut FILE) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _fputchar(_Ch: ::std::os::raw::c_int) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn fputs(_Str: *const ::std::os::raw::c_char, _File: *mut FILE) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn fread( + _DstBuf: *mut ::std::os::raw::c_void, + _ElementSize: ::std::os::raw::c_ulonglong, + _Count: ::std::os::raw::c_ulonglong, + _File: *mut FILE, + ) -> ::std::os::raw::c_ulonglong; +} +extern "C" { + pub fn freopen( + _Filename: *const ::std::os::raw::c_char, + _Mode: *const ::std::os::raw::c_char, + _File: *mut FILE, + ) -> *mut FILE; +} +extern "C" { + pub fn fsetpos(_File: *mut FILE, _Pos: *const fpos_t) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn fsetpos64(_File: *mut FILE, _Pos: *const fpos_t) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn fseek( + _File: *mut FILE, + _Offset: ::std::os::raw::c_long, + _Origin: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ftell(_File: *mut FILE) -> ::std::os::raw::c_long; +} +extern "C" { + pub fn _fseeki64( + _File: *mut FILE, + _Offset: ::std::os::raw::c_longlong, + _Origin: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _ftelli64(_File: *mut FILE) -> ::std::os::raw::c_longlong; +} +extern "C" { + pub fn fseeko64( + stream: *mut FILE, + offset: _off64_t, + whence: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn fseeko( + stream: *mut FILE, + offset: _off_t, + whence: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ftello(stream: *mut FILE) -> _off_t; +} +extern "C" { + pub fn ftello64(stream: *mut FILE) -> _off64_t; +} +extern "C" { + pub fn fwrite( + _Str: *const ::std::os::raw::c_void, + _Size: ::std::os::raw::c_ulonglong, + _Count: ::std::os::raw::c_ulonglong, + _File: *mut FILE, + ) -> ::std::os::raw::c_ulonglong; +} +extern "C" { + pub fn getc(_File: *mut FILE) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn getchar() -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _getmaxstdio() -> ::std::os::raw::c_int; +} +extern "C" { + pub fn gets(_Buffer: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn _getw(_File: *mut FILE) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn perror(_ErrMsg: *const ::std::os::raw::c_char); +} +extern "C" { + pub fn _pclose(_File: *mut FILE) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _popen( + _Command: *const ::std::os::raw::c_char, + _Mode: *const ::std::os::raw::c_char, + ) -> *mut FILE; +} +extern "C" { + pub fn putc(_Ch: ::std::os::raw::c_int, _File: *mut FILE) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn putchar(_Ch: ::std::os::raw::c_int) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn puts(_Str: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _putw(_Word: ::std::os::raw::c_int, _File: *mut FILE) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn remove(_Filename: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn rename( + _OldFilename: *const ::std::os::raw::c_char, + _NewFilename: *const ::std::os::raw::c_char, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _unlink(_Filename: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn unlink(_Filename: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn rewind(_File: *mut FILE); +} +extern "C" { + pub fn _rmtmp() -> ::std::os::raw::c_int; +} +extern "C" { + pub fn setbuf(_File: *mut FILE, _Buffer: *mut ::std::os::raw::c_char); +} +extern "C" { + pub fn _setmaxstdio(_Max: ::std::os::raw::c_int) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _set_output_format(_Format: ::std::os::raw::c_uint) -> ::std::os::raw::c_uint; +} +extern "C" { + pub fn _get_output_format() -> ::std::os::raw::c_uint; +} +extern "C" { + pub fn setvbuf( + _File: *mut FILE, + _Buf: *mut ::std::os::raw::c_char, + _Mode: ::std::os::raw::c_int, + _Size: usize, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _scprintf(_Format: *const ::std::os::raw::c_char, ...) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _snscanf( + _Src: *const ::std::os::raw::c_char, + _MaxCount: usize, + _Format: *const ::std::os::raw::c_char, + ... + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _vscprintf( + _Format: *const ::std::os::raw::c_char, + _ArgList: va_list, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn tmpfile() -> *mut FILE; +} +extern "C" { + pub fn tmpnam(_Buffer: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn ungetc(_Ch: ::std::os::raw::c_int, _File: *mut FILE) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _snprintf( + _Dest: *mut ::std::os::raw::c_char, + _Count: usize, + _Format: *const ::std::os::raw::c_char, + ... + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _vsnprintf( + _Dest: *mut ::std::os::raw::c_char, + _Count: usize, + _Format: *const ::std::os::raw::c_char, + _Args: va_list, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _set_printf_count_output(_Value: ::std::os::raw::c_int) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _get_printf_count_output() -> ::std::os::raw::c_int; +} +extern "C" { + pub fn __mingw_swscanf( + _Src: *const wchar_t, + _Format: *const wchar_t, + ... + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn __mingw_vswscanf( + _Str: *const wchar_t, + Format: *const wchar_t, + argp: va_list, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn __mingw_wscanf(_Format: *const wchar_t, ...) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn __mingw_vwscanf(Format: *const wchar_t, argp: va_list) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn __mingw_fwscanf(_File: *mut FILE, _Format: *const wchar_t, ...) + -> ::std::os::raw::c_int; +} +extern "C" { + pub fn __mingw_vfwscanf( + fp: *mut FILE, + Format: *const wchar_t, + argp: va_list, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn __mingw_fwprintf( + _File: *mut FILE, + _Format: *const wchar_t, + ... + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn __mingw_wprintf(_Format: *const wchar_t, ...) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn __mingw_vfwprintf( + _File: *mut FILE, + _Format: *const wchar_t, + _ArgList: va_list, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn __mingw_vwprintf(_Format: *const wchar_t, _ArgList: va_list) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn __mingw_snwprintf( + s: *mut wchar_t, + n: usize, + format: *const wchar_t, + ... + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn __mingw_vsnwprintf( + arg1: *mut wchar_t, + arg2: usize, + arg3: *const wchar_t, + arg4: va_list, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn __mingw_swprintf(arg1: *mut wchar_t, arg2: *const wchar_t, ...) + -> ::std::os::raw::c_int; +} +extern "C" { + pub fn __mingw_vswprintf( + arg1: *mut wchar_t, + arg2: *const wchar_t, + arg3: va_list, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn __ms_swscanf( + _Src: *const wchar_t, + _Format: *const wchar_t, + ... + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn __ms_wscanf(_Format: *const wchar_t, ...) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn __ms_fwscanf(_File: *mut FILE, _Format: *const wchar_t, ...) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn __ms_fwprintf(_File: *mut FILE, _Format: *const wchar_t, ...) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn __ms_wprintf(_Format: *const wchar_t, ...) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn __ms_vfwprintf( + _File: *mut FILE, + _Format: *const wchar_t, + _ArgList: va_list, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn __ms_vwprintf(_Format: *const wchar_t, _ArgList: va_list) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn __ms_swprintf(arg1: *mut wchar_t, arg2: *const wchar_t, ...) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn __ms_vswprintf( + arg1: *mut wchar_t, + arg2: *const wchar_t, + arg3: va_list, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _wfsopen( + _Filename: *const wchar_t, + _Mode: *const wchar_t, + _ShFlag: ::std::os::raw::c_int, + ) -> *mut FILE; +} +extern "C" { + pub fn fgetwc(_File: *mut FILE) -> wint_t; +} +extern "C" { + pub fn _fgetwchar() -> wint_t; +} +extern "C" { + pub fn fputwc(_Ch: wchar_t, _File: *mut FILE) -> wint_t; +} +extern "C" { + pub fn _fputwchar(_Ch: wchar_t) -> wint_t; +} +extern "C" { + pub fn getwc(_File: *mut FILE) -> wint_t; +} +extern "C" { + pub fn getwchar() -> wint_t; +} +extern "C" { + pub fn putwc(_Ch: wchar_t, _File: *mut FILE) -> wint_t; +} +extern "C" { + pub fn putwchar(_Ch: wchar_t) -> wint_t; +} +extern "C" { + pub fn ungetwc(_Ch: wint_t, _File: *mut FILE) -> wint_t; +} +extern "C" { + pub fn fgetws( + _Dst: *mut wchar_t, + _SizeInWords: ::std::os::raw::c_int, + _File: *mut FILE, + ) -> *mut wchar_t; +} +extern "C" { + pub fn fputws(_Str: *const wchar_t, _File: *mut FILE) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _getws(_String: *mut wchar_t) -> *mut wchar_t; +} +extern "C" { + pub fn _putws(_Str: *const wchar_t) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _scwprintf(_Format: *const wchar_t, ...) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _swprintf_c( + _DstBuf: *mut wchar_t, + _SizeInWords: usize, + _Format: *const wchar_t, + ... + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _vswprintf_c( + _DstBuf: *mut wchar_t, + _SizeInWords: usize, + _Format: *const wchar_t, + _ArgList: va_list, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _snwprintf( + _Dest: *mut wchar_t, + _Count: usize, + _Format: *const wchar_t, + ... + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _vsnwprintf( + _Dest: *mut wchar_t, + _Count: usize, + _Format: *const wchar_t, + _Args: va_list, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _vscwprintf(_Format: *const wchar_t, _ArgList: va_list) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _swprintf(_Dest: *mut wchar_t, _Format: *const wchar_t, ...) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _vswprintf( + _Dest: *mut wchar_t, + _Format: *const wchar_t, + _Args: va_list, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _wtempnam(_Directory: *const wchar_t, _FilePrefix: *const wchar_t) -> *mut wchar_t; +} +extern "C" { + pub fn _snwscanf( + _Src: *const wchar_t, + _MaxCount: usize, + _Format: *const wchar_t, + ... + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _wfdopen(_FileHandle: ::std::os::raw::c_int, _Mode: *const wchar_t) -> *mut FILE; +} +extern "C" { + pub fn _wfopen(_Filename: *const wchar_t, _Mode: *const wchar_t) -> *mut FILE; +} +extern "C" { + pub fn _wfreopen( + _Filename: *const wchar_t, + _Mode: *const wchar_t, + _OldFile: *mut FILE, + ) -> *mut FILE; +} +extern "C" { + pub fn _wperror(_ErrMsg: *const wchar_t); +} +extern "C" { + pub fn _wpopen(_Command: *const wchar_t, _Mode: *const wchar_t) -> *mut FILE; +} +extern "C" { + pub fn _wremove(_Filename: *const wchar_t) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _wtmpnam(_Buffer: *mut wchar_t) -> *mut wchar_t; +} +extern "C" { + pub fn _lock_file(_File: *mut FILE); +} +extern "C" { + pub fn _unlock_file(_File: *mut FILE); +} +extern "C" { + pub fn tempnam( + _Directory: *const ::std::os::raw::c_char, + _FilePrefix: *const ::std::os::raw::c_char, + ) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn fcloseall() -> ::std::os::raw::c_int; +} +extern "C" { + pub fn fdopen( + _FileHandle: ::std::os::raw::c_int, + _Format: *const ::std::os::raw::c_char, + ) -> *mut FILE; +} +extern "C" { + pub fn fgetchar() -> ::std::os::raw::c_int; +} +extern "C" { + pub fn fileno(_File: *mut FILE) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn flushall() -> ::std::os::raw::c_int; +} +extern "C" { + pub fn fputchar(_Ch: ::std::os::raw::c_int) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn getw(_File: *mut FILE) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn putw(_Ch: ::std::os::raw::c_int, _File: *mut FILE) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn rmtmp() -> ::std::os::raw::c_int; +} +extern "C" { + pub fn __mingw_str_wide_utf8( + wptr: *const wchar_t, + mbptr: *mut *mut ::std::os::raw::c_char, + buflen: *mut usize, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn __mingw_str_utf8_wide( + mbptr: *const ::std::os::raw::c_char, + wptr: *mut *mut wchar_t, + buflen: *mut usize, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn __mingw_str_free(ptr: *mut ::std::os::raw::c_void); +} +extern "C" { + pub fn _wspawnl( + _Mode: ::std::os::raw::c_int, + _Filename: *const wchar_t, + _ArgList: *const wchar_t, + ... + ) -> isize; +} +extern "C" { + pub fn _wspawnle( + _Mode: ::std::os::raw::c_int, + _Filename: *const wchar_t, + _ArgList: *const wchar_t, + ... + ) -> isize; +} +extern "C" { + pub fn _wspawnlp( + _Mode: ::std::os::raw::c_int, + _Filename: *const wchar_t, + _ArgList: *const wchar_t, + ... + ) -> isize; +} +extern "C" { + pub fn _wspawnlpe( + _Mode: ::std::os::raw::c_int, + _Filename: *const wchar_t, + _ArgList: *const wchar_t, + ... + ) -> isize; +} +extern "C" { + pub fn _wspawnv( + _Mode: ::std::os::raw::c_int, + _Filename: *const wchar_t, + _ArgList: *const *const wchar_t, + ) -> isize; +} +extern "C" { + pub fn _wspawnve( + _Mode: ::std::os::raw::c_int, + _Filename: *const wchar_t, + _ArgList: *const *const wchar_t, + _Env: *const *const wchar_t, + ) -> isize; +} +extern "C" { + pub fn _wspawnvp( + _Mode: ::std::os::raw::c_int, + _Filename: *const wchar_t, + _ArgList: *const *const wchar_t, + ) -> isize; +} +extern "C" { + pub fn _wspawnvpe( + _Mode: ::std::os::raw::c_int, + _Filename: *const wchar_t, + _ArgList: *const *const wchar_t, + _Env: *const *const wchar_t, + ) -> isize; +} +extern "C" { + pub fn _spawnv( + _Mode: ::std::os::raw::c_int, + _Filename: *const ::std::os::raw::c_char, + _ArgList: *const *const ::std::os::raw::c_char, + ) -> isize; +} +extern "C" { + pub fn _spawnve( + _Mode: ::std::os::raw::c_int, + _Filename: *const ::std::os::raw::c_char, + _ArgList: *const *const ::std::os::raw::c_char, + _Env: *const *const ::std::os::raw::c_char, + ) -> isize; +} +extern "C" { + pub fn _spawnvp( + _Mode: ::std::os::raw::c_int, + _Filename: *const ::std::os::raw::c_char, + _ArgList: *const *const ::std::os::raw::c_char, + ) -> isize; +} +extern "C" { + pub fn _spawnvpe( + _Mode: ::std::os::raw::c_int, + _Filename: *const ::std::os::raw::c_char, + _ArgList: *const *const ::std::os::raw::c_char, + _Env: *const *const ::std::os::raw::c_char, + ) -> isize; +} +extern "C" { + pub fn clearerr_s(_File: *mut FILE) -> errno_t; +} +extern "C" { + pub fn fread_s( + _DstBuf: *mut ::std::os::raw::c_void, + _DstSize: usize, + _ElementSize: usize, + _Count: usize, + _File: *mut FILE, + ) -> usize; +} +extern "C" { + pub fn fprintf_s( + _File: *mut FILE, + _Format: *const ::std::os::raw::c_char, + ... + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _fscanf_s_l( + _File: *mut FILE, + _Format: *const ::std::os::raw::c_char, + _Locale: _locale_t, + ... + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn fscanf_s( + _File: *mut FILE, + _Format: *const ::std::os::raw::c_char, + ... + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn printf_s(_Format: *const ::std::os::raw::c_char, ...) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _scanf_l( + _Format: *const ::std::os::raw::c_char, + _Locale: _locale_t, + ... + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _scanf_s_l( + _Format: *const ::std::os::raw::c_char, + _Locale: _locale_t, + ... + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn scanf_s(_Format: *const ::std::os::raw::c_char, ...) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _snprintf_c( + _DstBuf: *mut ::std::os::raw::c_char, + _MaxCount: usize, + _Format: *const ::std::os::raw::c_char, + ... + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _vsnprintf_c( + _DstBuf: *mut ::std::os::raw::c_char, + _MaxCount: usize, + _Format: *const ::std::os::raw::c_char, + _ArgList: va_list, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _fscanf_l( + _File: *mut FILE, + _Format: *const ::std::os::raw::c_char, + _Locale: _locale_t, + ... + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _sscanf_l( + _Src: *const ::std::os::raw::c_char, + _Format: *const ::std::os::raw::c_char, + _Locale: _locale_t, + ... + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _sscanf_s_l( + _Src: *const ::std::os::raw::c_char, + _Format: *const ::std::os::raw::c_char, + _Locale: _locale_t, + ... + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn sscanf_s( + _Src: *const ::std::os::raw::c_char, + _Format: *const ::std::os::raw::c_char, + ... + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _snscanf_s( + _Src: *const ::std::os::raw::c_char, + _MaxCount: usize, + _Format: *const ::std::os::raw::c_char, + ... + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _snscanf_l( + _Src: *const ::std::os::raw::c_char, + _MaxCount: usize, + _Format: *const ::std::os::raw::c_char, + _Locale: _locale_t, + ... + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _snscanf_s_l( + _Src: *const ::std::os::raw::c_char, + _MaxCount: usize, + _Format: *const ::std::os::raw::c_char, + _Locale: _locale_t, + ... + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn vfprintf_s( + _File: *mut FILE, + _Format: *const ::std::os::raw::c_char, + _ArgList: va_list, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn vprintf_s( + _Format: *const ::std::os::raw::c_char, + _ArgList: va_list, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn vsnprintf_s( + _DstBuf: *mut ::std::os::raw::c_char, + _DstSize: usize, + _MaxCount: usize, + _Format: *const ::std::os::raw::c_char, + _ArgList: va_list, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _vsnprintf_s( + _DstBuf: *mut ::std::os::raw::c_char, + _DstSize: usize, + _MaxCount: usize, + _Format: *const ::std::os::raw::c_char, + _ArgList: va_list, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn vsprintf_s( + _DstBuf: *mut ::std::os::raw::c_char, + _Size: usize, + _Format: *const ::std::os::raw::c_char, + _ArgList: va_list, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn sprintf_s( + _DstBuf: *mut ::std::os::raw::c_char, + _DstSize: usize, + _Format: *const ::std::os::raw::c_char, + ... + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _snprintf_s( + _DstBuf: *mut ::std::os::raw::c_char, + _DstSize: usize, + _MaxCount: usize, + _Format: *const ::std::os::raw::c_char, + ... + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _fprintf_p( + _File: *mut FILE, + _Format: *const ::std::os::raw::c_char, + ... + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _printf_p(_Format: *const ::std::os::raw::c_char, ...) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _sprintf_p( + _Dst: *mut ::std::os::raw::c_char, + _MaxCount: usize, + _Format: *const ::std::os::raw::c_char, + ... + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _vfprintf_p( + _File: *mut FILE, + _Format: *const ::std::os::raw::c_char, + _ArgList: va_list, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _vprintf_p( + _Format: *const ::std::os::raw::c_char, + _ArgList: va_list, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _vsprintf_p( + _Dst: *mut ::std::os::raw::c_char, + _MaxCount: usize, + _Format: *const ::std::os::raw::c_char, + _ArgList: va_list, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _scprintf_p(_Format: *const ::std::os::raw::c_char, ...) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _vscprintf_p( + _Format: *const ::std::os::raw::c_char, + _ArgList: va_list, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _printf_l( + _Format: *const ::std::os::raw::c_char, + _Locale: _locale_t, + ... + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _printf_p_l( + _Format: *const ::std::os::raw::c_char, + _Locale: _locale_t, + ... + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _vprintf_l( + _Format: *const ::std::os::raw::c_char, + _Locale: _locale_t, + _ArgList: va_list, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _vprintf_p_l( + _Format: *const ::std::os::raw::c_char, + _Locale: _locale_t, + _ArgList: va_list, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _fprintf_l( + _File: *mut FILE, + _Format: *const ::std::os::raw::c_char, + _Locale: _locale_t, + ... + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _fprintf_p_l( + _File: *mut FILE, + _Format: *const ::std::os::raw::c_char, + _Locale: _locale_t, + ... + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _vfprintf_l( + _File: *mut FILE, + _Format: *const ::std::os::raw::c_char, + _Locale: _locale_t, + _ArgList: va_list, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _vfprintf_p_l( + _File: *mut FILE, + _Format: *const ::std::os::raw::c_char, + _Locale: _locale_t, + _ArgList: va_list, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _sprintf_l( + _DstBuf: *mut ::std::os::raw::c_char, + _Format: *const ::std::os::raw::c_char, + _Locale: _locale_t, + ... + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _sprintf_p_l( + _DstBuf: *mut ::std::os::raw::c_char, + _MaxCount: usize, + _Format: *const ::std::os::raw::c_char, + _Locale: _locale_t, + ... + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _vsprintf_l( + _DstBuf: *mut ::std::os::raw::c_char, + _Format: *const ::std::os::raw::c_char, + arg1: _locale_t, + _ArgList: va_list, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _vsprintf_p_l( + _DstBuf: *mut ::std::os::raw::c_char, + _MaxCount: usize, + _Format: *const ::std::os::raw::c_char, + _Locale: _locale_t, + _ArgList: va_list, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _scprintf_l( + _Format: *const ::std::os::raw::c_char, + _Locale: _locale_t, + ... + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _scprintf_p_l( + _Format: *const ::std::os::raw::c_char, + _Locale: _locale_t, + ... + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _vscprintf_l( + _Format: *const ::std::os::raw::c_char, + _Locale: _locale_t, + _ArgList: va_list, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _vscprintf_p_l( + _Format: *const ::std::os::raw::c_char, + _Locale: _locale_t, + _ArgList: va_list, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _printf_s_l( + _Format: *const ::std::os::raw::c_char, + _Locale: _locale_t, + ... + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _vprintf_s_l( + _Format: *const ::std::os::raw::c_char, + _Locale: _locale_t, + _ArgList: va_list, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _fprintf_s_l( + _File: *mut FILE, + _Format: *const ::std::os::raw::c_char, + _Locale: _locale_t, + ... + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _vfprintf_s_l( + _File: *mut FILE, + _Format: *const ::std::os::raw::c_char, + _Locale: _locale_t, + _ArgList: va_list, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _sprintf_s_l( + _DstBuf: *mut ::std::os::raw::c_char, + _DstSize: usize, + _Format: *const ::std::os::raw::c_char, + _Locale: _locale_t, + ... + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _vsprintf_s_l( + _DstBuf: *mut ::std::os::raw::c_char, + _DstSize: usize, + _Format: *const ::std::os::raw::c_char, + _Locale: _locale_t, + _ArgList: va_list, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _snprintf_s_l( + _DstBuf: *mut ::std::os::raw::c_char, + _DstSize: usize, + _MaxCount: usize, + _Format: *const ::std::os::raw::c_char, + _Locale: _locale_t, + ... + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _vsnprintf_s_l( + _DstBuf: *mut ::std::os::raw::c_char, + _DstSize: usize, + _MaxCount: usize, + _Format: *const ::std::os::raw::c_char, + _Locale: _locale_t, + _ArgList: va_list, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _snprintf_l( + _DstBuf: *mut ::std::os::raw::c_char, + _MaxCount: usize, + _Format: *const ::std::os::raw::c_char, + _Locale: _locale_t, + ... + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _snprintf_c_l( + _DstBuf: *mut ::std::os::raw::c_char, + _MaxCount: usize, + _Format: *const ::std::os::raw::c_char, + _Locale: _locale_t, + ... + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _vsnprintf_l( + _DstBuf: *mut ::std::os::raw::c_char, + _MaxCount: usize, + _Format: *const ::std::os::raw::c_char, + _Locale: _locale_t, + _ArgList: va_list, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _vsnprintf_c_l( + _DstBuf: *mut ::std::os::raw::c_char, + _MaxCount: usize, + arg1: *const ::std::os::raw::c_char, + _Locale: _locale_t, + _ArgList: va_list, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn fopen_s( + _File: *mut *mut FILE, + _Filename: *const ::std::os::raw::c_char, + _Mode: *const ::std::os::raw::c_char, + ) -> errno_t; +} +extern "C" { + pub fn freopen_s( + _File: *mut *mut FILE, + _Filename: *const ::std::os::raw::c_char, + _Mode: *const ::std::os::raw::c_char, + _Stream: *mut FILE, + ) -> errno_t; +} +extern "C" { + pub fn gets_s(arg1: *mut ::std::os::raw::c_char, arg2: rsize_t) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn tmpfile_s(_File: *mut *mut FILE) -> errno_t; +} +extern "C" { + pub fn tmpnam_s(arg1: *mut ::std::os::raw::c_char, arg2: rsize_t) -> errno_t; +} +extern "C" { + pub fn _getws_s(_Str: *mut wchar_t, _SizeInWords: usize) -> *mut wchar_t; +} +extern "C" { + pub fn fwprintf_s(_File: *mut FILE, _Format: *const wchar_t, ...) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn wprintf_s(_Format: *const wchar_t, ...) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn vfwprintf_s( + _File: *mut FILE, + _Format: *const wchar_t, + _ArgList: va_list, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn vwprintf_s(_Format: *const wchar_t, _ArgList: va_list) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn vswprintf_s( + _Dst: *mut wchar_t, + _SizeInWords: usize, + _Format: *const wchar_t, + _ArgList: va_list, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn swprintf_s( + _Dst: *mut wchar_t, + _SizeInWords: usize, + _Format: *const wchar_t, + ... + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _vsnwprintf_s( + _DstBuf: *mut wchar_t, + _DstSizeInWords: usize, + _MaxCount: usize, + _Format: *const wchar_t, + _ArgList: va_list, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _snwprintf_s( + _DstBuf: *mut wchar_t, + _DstSizeInWords: usize, + _MaxCount: usize, + _Format: *const wchar_t, + ... + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _wprintf_s_l(_Format: *const wchar_t, _Locale: _locale_t, ...) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _vwprintf_s_l( + _Format: *const wchar_t, + _Locale: _locale_t, + _ArgList: va_list, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _fwprintf_s_l( + _File: *mut FILE, + _Format: *const wchar_t, + _Locale: _locale_t, + ... + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _vfwprintf_s_l( + _File: *mut FILE, + _Format: *const wchar_t, + _Locale: _locale_t, + _ArgList: va_list, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _swprintf_s_l( + _DstBuf: *mut wchar_t, + _DstSize: usize, + _Format: *const wchar_t, + _Locale: _locale_t, + ... + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _vswprintf_s_l( + _DstBuf: *mut wchar_t, + _DstSize: usize, + _Format: *const wchar_t, + _Locale: _locale_t, + _ArgList: va_list, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _snwprintf_s_l( + _DstBuf: *mut wchar_t, + _DstSize: usize, + _MaxCount: usize, + _Format: *const wchar_t, + _Locale: _locale_t, + ... + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _vsnwprintf_s_l( + _DstBuf: *mut wchar_t, + _DstSize: usize, + _MaxCount: usize, + _Format: *const wchar_t, + _Locale: _locale_t, + _ArgList: va_list, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _fwscanf_s_l( + _File: *mut FILE, + _Format: *const wchar_t, + _Locale: _locale_t, + ... + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn fwscanf_s(_File: *mut FILE, _Format: *const wchar_t, ...) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _swscanf_s_l( + _Src: *const wchar_t, + _Format: *const wchar_t, + _Locale: _locale_t, + ... + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn swscanf_s(_Src: *const wchar_t, _Format: *const wchar_t, ...) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _snwscanf_s( + _Src: *const wchar_t, + _MaxCount: usize, + _Format: *const wchar_t, + ... + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _snwscanf_s_l( + _Src: *const wchar_t, + _MaxCount: usize, + _Format: *const wchar_t, + _Locale: _locale_t, + ... + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _wscanf_s_l(_Format: *const wchar_t, _Locale: _locale_t, ...) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn wscanf_s(_Format: *const wchar_t, ...) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _wfopen_s( + _File: *mut *mut FILE, + _Filename: *const wchar_t, + _Mode: *const wchar_t, + ) -> errno_t; +} +extern "C" { + pub fn _wfreopen_s( + _File: *mut *mut FILE, + _Filename: *const wchar_t, + _Mode: *const wchar_t, + _OldFile: *mut FILE, + ) -> errno_t; +} +extern "C" { + pub fn _wtmpnam_s(_DstBuf: *mut wchar_t, _SizeInWords: usize) -> errno_t; +} +extern "C" { + pub fn _fwprintf_p(_File: *mut FILE, _Format: *const wchar_t, ...) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _wprintf_p(_Format: *const wchar_t, ...) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _vfwprintf_p( + _File: *mut FILE, + _Format: *const wchar_t, + _ArgList: va_list, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _vwprintf_p(_Format: *const wchar_t, _ArgList: va_list) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _swprintf_p( + _DstBuf: *mut wchar_t, + _MaxCount: usize, + _Format: *const wchar_t, + ... + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _vswprintf_p( + _DstBuf: *mut wchar_t, + _MaxCount: usize, + _Format: *const wchar_t, + _ArgList: va_list, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _scwprintf_p(_Format: *const wchar_t, ...) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _vscwprintf_p(_Format: *const wchar_t, _ArgList: va_list) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _wprintf_l(_Format: *const wchar_t, _Locale: _locale_t, ...) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _wprintf_p_l(_Format: *const wchar_t, _Locale: _locale_t, ...) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _vwprintf_l( + _Format: *const wchar_t, + _Locale: _locale_t, + _ArgList: va_list, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _vwprintf_p_l( + _Format: *const wchar_t, + _Locale: _locale_t, + _ArgList: va_list, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _fwprintf_l( + _File: *mut FILE, + _Format: *const wchar_t, + _Locale: _locale_t, + ... + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _fwprintf_p_l( + _File: *mut FILE, + _Format: *const wchar_t, + _Locale: _locale_t, + ... + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _vfwprintf_l( + _File: *mut FILE, + _Format: *const wchar_t, + _Locale: _locale_t, + _ArgList: va_list, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _vfwprintf_p_l( + _File: *mut FILE, + _Format: *const wchar_t, + _Locale: _locale_t, + _ArgList: va_list, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _swprintf_c_l( + _DstBuf: *mut wchar_t, + _MaxCount: usize, + _Format: *const wchar_t, + _Locale: _locale_t, + ... + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _swprintf_p_l( + _DstBuf: *mut wchar_t, + _MaxCount: usize, + _Format: *const wchar_t, + _Locale: _locale_t, + ... + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _vswprintf_c_l( + _DstBuf: *mut wchar_t, + _MaxCount: usize, + _Format: *const wchar_t, + _Locale: _locale_t, + _ArgList: va_list, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _vswprintf_p_l( + _DstBuf: *mut wchar_t, + _MaxCount: usize, + _Format: *const wchar_t, + _Locale: _locale_t, + _ArgList: va_list, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _scwprintf_l(_Format: *const wchar_t, _Locale: _locale_t, ...) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _scwprintf_p_l( + _Format: *const wchar_t, + _Locale: _locale_t, + ... + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _vscwprintf_p_l( + _Format: *const wchar_t, + _Locale: _locale_t, + _ArgList: va_list, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _snwprintf_l( + _DstBuf: *mut wchar_t, + _MaxCount: usize, + _Format: *const wchar_t, + _Locale: _locale_t, + ... + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _vsnwprintf_l( + _DstBuf: *mut wchar_t, + _MaxCount: usize, + _Format: *const wchar_t, + _Locale: _locale_t, + _ArgList: va_list, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn __swprintf_l( + _Dest: *mut wchar_t, + _Format: *const wchar_t, + _Plocinfo: _locale_t, + ... + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn __vswprintf_l( + _Dest: *mut wchar_t, + _Format: *const wchar_t, + _Plocinfo: _locale_t, + _Args: va_list, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _vscwprintf_l( + _Format: *const wchar_t, + _Locale: _locale_t, + _ArgList: va_list, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _fwscanf_l( + _File: *mut FILE, + _Format: *const wchar_t, + _Locale: _locale_t, + ... + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _swscanf_l( + _Src: *const wchar_t, + _Format: *const wchar_t, + _Locale: _locale_t, + ... + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _snwscanf_l( + _Src: *const wchar_t, + _MaxCount: usize, + _Format: *const wchar_t, + _Locale: _locale_t, + ... + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _wscanf_l(_Format: *const wchar_t, _Locale: _locale_t, ...) -> ::std::os::raw::c_int; +} +pub type Oid = ::std::os::raw::c_uint; +pub type pg_int64 = ::std::os::raw::c_long; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum ConnStatusType { + CONNECTION_OK = 0, + CONNECTION_BAD = 1, + CONNECTION_STARTED = 2, + CONNECTION_MADE = 3, + CONNECTION_AWAITING_RESPONSE = 4, + CONNECTION_AUTH_OK = 5, + CONNECTION_SETENV = 6, + CONNECTION_SSL_STARTUP = 7, + CONNECTION_NEEDED = 8, + CONNECTION_CHECK_WRITABLE = 9, + CONNECTION_CONSUME = 10, + CONNECTION_GSS_STARTUP = 11, + CONNECTION_CHECK_TARGET = 12, + CONNECTION_CHECK_STANDBY = 13, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum PostgresPollingStatusType { + PGRES_POLLING_FAILED = 0, + PGRES_POLLING_READING = 1, + PGRES_POLLING_WRITING = 2, + PGRES_POLLING_OK = 3, + PGRES_POLLING_ACTIVE = 4, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum ExecStatusType { + PGRES_EMPTY_QUERY = 0, + PGRES_COMMAND_OK = 1, + PGRES_TUPLES_OK = 2, + PGRES_COPY_OUT = 3, + PGRES_COPY_IN = 4, + PGRES_BAD_RESPONSE = 5, + PGRES_NONFATAL_ERROR = 6, + PGRES_FATAL_ERROR = 7, + PGRES_COPY_BOTH = 8, + PGRES_SINGLE_TUPLE = 9, + PGRES_PIPELINE_SYNC = 10, + PGRES_PIPELINE_ABORTED = 11, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum PGTransactionStatusType { + PQTRANS_IDLE = 0, + PQTRANS_ACTIVE = 1, + PQTRANS_INTRANS = 2, + PQTRANS_INERROR = 3, + PQTRANS_UNKNOWN = 4, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum PGVerbosity { + PQERRORS_TERSE = 0, + PQERRORS_DEFAULT = 1, + PQERRORS_VERBOSE = 2, + PQERRORS_SQLSTATE = 3, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum PGContextVisibility { + PQSHOW_CONTEXT_NEVER = 0, + PQSHOW_CONTEXT_ERRORS = 1, + PQSHOW_CONTEXT_ALWAYS = 2, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum PGPing { + PQPING_OK = 0, + PQPING_REJECT = 1, + PQPING_NO_RESPONSE = 2, + PQPING_NO_ATTEMPT = 3, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum PGpipelineStatus { + PQ_PIPELINE_OFF = 0, + PQ_PIPELINE_ON = 1, + PQ_PIPELINE_ABORTED = 2, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct pg_conn { + _unused: [u8; 0], +} +pub type PGconn = pg_conn; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct pg_result { + _unused: [u8; 0], +} +pub type PGresult = pg_result; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct pg_cancel { + _unused: [u8; 0], +} +pub type PGcancel = pg_cancel; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct pgNotify { + pub relname: *mut ::std::os::raw::c_char, + pub be_pid: ::std::os::raw::c_int, + pub extra: *mut ::std::os::raw::c_char, + pub next: *mut pgNotify, +} +#[test] +fn bindgen_test_layout_pgNotify() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 32usize, + concat!("Size of: ", stringify!(pgNotify)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(pgNotify)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).relname) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(pgNotify), + "::", + stringify!(relname) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).be_pid) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(pgNotify), + "::", + stringify!(be_pid) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).extra) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(pgNotify), + "::", + stringify!(extra) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).next) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(pgNotify), + "::", + stringify!(next) + ) + ); +} +pub type PGnotify = pgNotify; +pub type PQnoticeReceiver = ::std::option::Option< + unsafe extern "C" fn(arg: *mut ::std::os::raw::c_void, res: *const PGresult), +>; +pub type PQnoticeProcessor = ::std::option::Option< + unsafe extern "C" fn(arg: *mut ::std::os::raw::c_void, message: *const ::std::os::raw::c_char), +>; +pub type pqbool = ::std::os::raw::c_char; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _PQprintOpt { + pub header: pqbool, + pub align: pqbool, + pub standard: pqbool, + pub html3: pqbool, + pub expanded: pqbool, + pub pager: pqbool, + pub fieldSep: *mut ::std::os::raw::c_char, + pub tableOpt: *mut ::std::os::raw::c_char, + pub caption: *mut ::std::os::raw::c_char, + pub fieldName: *mut *mut ::std::os::raw::c_char, +} +#[test] +fn bindgen_test_layout__PQprintOpt() { + const UNINIT: ::std::mem::MaybeUninit<_PQprintOpt> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::<_PQprintOpt>(), + 40usize, + concat!("Size of: ", stringify!(_PQprintOpt)) + ); + assert_eq!( + ::std::mem::align_of::<_PQprintOpt>(), + 8usize, + concat!("Alignment of ", stringify!(_PQprintOpt)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).header) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(_PQprintOpt), + "::", + stringify!(header) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).align) as usize - ptr as usize }, + 1usize, + concat!( + "Offset of field: ", + stringify!(_PQprintOpt), + "::", + stringify!(align) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).standard) as usize - ptr as usize }, + 2usize, + concat!( + "Offset of field: ", + stringify!(_PQprintOpt), + "::", + stringify!(standard) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).html3) as usize - ptr as usize }, + 3usize, + concat!( + "Offset of field: ", + stringify!(_PQprintOpt), + "::", + stringify!(html3) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).expanded) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(_PQprintOpt), + "::", + stringify!(expanded) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pager) as usize - ptr as usize }, + 5usize, + concat!( + "Offset of field: ", + stringify!(_PQprintOpt), + "::", + stringify!(pager) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).fieldSep) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(_PQprintOpt), + "::", + stringify!(fieldSep) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).tableOpt) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(_PQprintOpt), + "::", + stringify!(tableOpt) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).caption) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(_PQprintOpt), + "::", + stringify!(caption) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).fieldName) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(_PQprintOpt), + "::", + stringify!(fieldName) + ) + ); +} +pub type PQprintOpt = _PQprintOpt; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _PQconninfoOption { + pub keyword: *mut ::std::os::raw::c_char, + pub envvar: *mut ::std::os::raw::c_char, + pub compiled: *mut ::std::os::raw::c_char, + pub val: *mut ::std::os::raw::c_char, + pub label: *mut ::std::os::raw::c_char, + pub dispchar: *mut ::std::os::raw::c_char, + pub dispsize: ::std::os::raw::c_int, +} +#[test] +fn bindgen_test_layout__PQconninfoOption() { + const UNINIT: ::std::mem::MaybeUninit<_PQconninfoOption> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::<_PQconninfoOption>(), + 56usize, + concat!("Size of: ", stringify!(_PQconninfoOption)) + ); + assert_eq!( + ::std::mem::align_of::<_PQconninfoOption>(), + 8usize, + concat!("Alignment of ", stringify!(_PQconninfoOption)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).keyword) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(_PQconninfoOption), + "::", + stringify!(keyword) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).envvar) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(_PQconninfoOption), + "::", + stringify!(envvar) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).compiled) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(_PQconninfoOption), + "::", + stringify!(compiled) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).val) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(_PQconninfoOption), + "::", + stringify!(val) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).label) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(_PQconninfoOption), + "::", + stringify!(label) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).dispchar) as usize - ptr as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(_PQconninfoOption), + "::", + stringify!(dispchar) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).dispsize) as usize - ptr as usize }, + 48usize, + concat!( + "Offset of field: ", + stringify!(_PQconninfoOption), + "::", + stringify!(dispsize) + ) + ); +} +pub type PQconninfoOption = _PQconninfoOption; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct PQArgBlock { + pub len: ::std::os::raw::c_int, + pub isint: ::std::os::raw::c_int, + pub u: PQArgBlock__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union PQArgBlock__bindgen_ty_1 { + pub ptr: *mut ::std::os::raw::c_int, + pub integer: ::std::os::raw::c_int, +} +#[test] +fn bindgen_test_layout_PQArgBlock__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(PQArgBlock__bindgen_ty_1)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(PQArgBlock__bindgen_ty_1)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ptr) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(PQArgBlock__bindgen_ty_1), + "::", + stringify!(ptr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).integer) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(PQArgBlock__bindgen_ty_1), + "::", + stringify!(integer) + ) + ); +} +#[test] +fn bindgen_test_layout_PQArgBlock() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(PQArgBlock)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(PQArgBlock)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).len) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(PQArgBlock), + "::", + stringify!(len) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).isint) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(PQArgBlock), + "::", + stringify!(isint) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).u) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(PQArgBlock), + "::", + stringify!(u) + ) + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct pgresAttDesc { + pub name: *mut ::std::os::raw::c_char, + pub tableid: Oid, + pub columnid: ::std::os::raw::c_int, + pub format: ::std::os::raw::c_int, + pub typid: Oid, + pub typlen: ::std::os::raw::c_int, + pub atttypmod: ::std::os::raw::c_int, +} +#[test] +fn bindgen_test_layout_pgresAttDesc() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 32usize, + concat!("Size of: ", stringify!(pgresAttDesc)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(pgresAttDesc)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(pgresAttDesc), + "::", + stringify!(name) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).tableid) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(pgresAttDesc), + "::", + stringify!(tableid) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).columnid) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(pgresAttDesc), + "::", + stringify!(columnid) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).format) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(pgresAttDesc), + "::", + stringify!(format) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).typid) as usize - ptr as usize }, + 20usize, + concat!( + "Offset of field: ", + stringify!(pgresAttDesc), + "::", + stringify!(typid) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).typlen) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(pgresAttDesc), + "::", + stringify!(typlen) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).atttypmod) as usize - ptr as usize }, + 28usize, + concat!( + "Offset of field: ", + stringify!(pgresAttDesc), + "::", + stringify!(atttypmod) + ) + ); +} +pub type PGresAttDesc = pgresAttDesc; +extern "C" { + pub fn PQconnectStart(conninfo: *const ::std::os::raw::c_char) -> *mut PGconn; +} +extern "C" { + pub fn PQconnectStartParams( + keywords: *const *const ::std::os::raw::c_char, + values: *const *const ::std::os::raw::c_char, + expand_dbname: ::std::os::raw::c_int, + ) -> *mut PGconn; +} +extern "C" { + pub fn PQconnectPoll(conn: *mut PGconn) -> PostgresPollingStatusType; +} +extern "C" { + pub fn PQconnectdb(conninfo: *const ::std::os::raw::c_char) -> *mut PGconn; +} +extern "C" { + pub fn PQconnectdbParams( + keywords: *const *const ::std::os::raw::c_char, + values: *const *const ::std::os::raw::c_char, + expand_dbname: ::std::os::raw::c_int, + ) -> *mut PGconn; +} +extern "C" { + pub fn PQsetdbLogin( + pghost: *const ::std::os::raw::c_char, + pgport: *const ::std::os::raw::c_char, + pgoptions: *const ::std::os::raw::c_char, + pgtty: *const ::std::os::raw::c_char, + dbName: *const ::std::os::raw::c_char, + login: *const ::std::os::raw::c_char, + pwd: *const ::std::os::raw::c_char, + ) -> *mut PGconn; +} +extern "C" { + pub fn PQfinish(conn: *mut PGconn); +} +extern "C" { + pub fn PQconndefaults() -> *mut PQconninfoOption; +} +extern "C" { + pub fn PQconninfoParse( + conninfo: *const ::std::os::raw::c_char, + errmsg: *mut *mut ::std::os::raw::c_char, + ) -> *mut PQconninfoOption; +} +extern "C" { + pub fn PQconninfo(conn: *mut PGconn) -> *mut PQconninfoOption; +} +extern "C" { + pub fn PQconninfoFree(connOptions: *mut PQconninfoOption); +} +extern "C" { + pub fn PQresetStart(conn: *mut PGconn) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn PQresetPoll(conn: *mut PGconn) -> PostgresPollingStatusType; +} +extern "C" { + pub fn PQreset(conn: *mut PGconn); +} +extern "C" { + pub fn PQgetCancel(conn: *mut PGconn) -> *mut PGcancel; +} +extern "C" { + pub fn PQfreeCancel(cancel: *mut PGcancel); +} +extern "C" { + pub fn PQcancel( + cancel: *mut PGcancel, + errbuf: *mut ::std::os::raw::c_char, + errbufsize: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn PQrequestCancel(conn: *mut PGconn) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn PQdb(conn: *const PGconn) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn PQuser(conn: *const PGconn) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn PQpass(conn: *const PGconn) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn PQhost(conn: *const PGconn) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn PQhostaddr(conn: *const PGconn) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn PQport(conn: *const PGconn) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn PQtty(conn: *const PGconn) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn PQoptions(conn: *const PGconn) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn PQstatus(conn: *const PGconn) -> ConnStatusType; +} +extern "C" { + pub fn PQtransactionStatus(conn: *const PGconn) -> PGTransactionStatusType; +} +extern "C" { + pub fn PQparameterStatus( + conn: *const PGconn, + paramName: *const ::std::os::raw::c_char, + ) -> *const ::std::os::raw::c_char; +} +extern "C" { + pub fn PQprotocolVersion(conn: *const PGconn) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn PQserverVersion(conn: *const PGconn) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn PQerrorMessage(conn: *const PGconn) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn PQsocket(conn: *const PGconn) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn PQbackendPID(conn: *const PGconn) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn PQpipelineStatus(conn: *const PGconn) -> PGpipelineStatus; +} +extern "C" { + pub fn PQconnectionNeedsPassword(conn: *const PGconn) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn PQconnectionUsedPassword(conn: *const PGconn) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn PQconnectionUsedGSSAPI(conn: *const PGconn) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn PQclientEncoding(conn: *const PGconn) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn PQsetClientEncoding( + conn: *mut PGconn, + encoding: *const ::std::os::raw::c_char, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn PQsslInUse(conn: *mut PGconn) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn PQsslStruct( + conn: *mut PGconn, + struct_name: *const ::std::os::raw::c_char, + ) -> *mut ::std::os::raw::c_void; +} +extern "C" { + pub fn PQsslAttribute( + conn: *mut PGconn, + attribute_name: *const ::std::os::raw::c_char, + ) -> *const ::std::os::raw::c_char; +} +extern "C" { + pub fn PQsslAttributeNames(conn: *mut PGconn) -> *const *const ::std::os::raw::c_char; +} +extern "C" { + pub fn PQgetssl(conn: *mut PGconn) -> *mut ::std::os::raw::c_void; +} +extern "C" { + pub fn PQinitSSL(do_init: ::std::os::raw::c_int); +} +extern "C" { + pub fn PQinitOpenSSL(do_ssl: ::std::os::raw::c_int, do_crypto: ::std::os::raw::c_int); +} +extern "C" { + pub fn PQgssEncInUse(conn: *mut PGconn) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn PQgetgssctx(conn: *mut PGconn) -> *mut ::std::os::raw::c_void; +} +extern "C" { + pub fn PQsetErrorVerbosity(conn: *mut PGconn, verbosity: PGVerbosity) -> PGVerbosity; +} +extern "C" { + pub fn PQsetErrorContextVisibility( + conn: *mut PGconn, + show_context: PGContextVisibility, + ) -> PGContextVisibility; +} +extern "C" { + pub fn PQsetNoticeReceiver( + conn: *mut PGconn, + proc_: PQnoticeReceiver, + arg: *mut ::std::os::raw::c_void, + ) -> PQnoticeReceiver; +} +extern "C" { + pub fn PQsetNoticeProcessor( + conn: *mut PGconn, + proc_: PQnoticeProcessor, + arg: *mut ::std::os::raw::c_void, + ) -> PQnoticeProcessor; +} +pub type pgthreadlock_t = + ::std::option::Option; +extern "C" { + pub fn PQregisterThreadLock(newhandler: pgthreadlock_t) -> pgthreadlock_t; +} +extern "C" { + pub fn PQtrace(conn: *mut PGconn, debug_port: *mut FILE); +} +extern "C" { + pub fn PQuntrace(conn: *mut PGconn); +} +extern "C" { + pub fn PQsetTraceFlags(conn: *mut PGconn, flags: ::std::os::raw::c_int); +} +extern "C" { + pub fn PQexec(conn: *mut PGconn, query: *const ::std::os::raw::c_char) -> *mut PGresult; +} +extern "C" { + pub fn PQexecParams( + conn: *mut PGconn, + command: *const ::std::os::raw::c_char, + nParams: ::std::os::raw::c_int, + paramTypes: *const Oid, + paramValues: *const *const ::std::os::raw::c_char, + paramLengths: *const ::std::os::raw::c_int, + paramFormats: *const ::std::os::raw::c_int, + resultFormat: ::std::os::raw::c_int, + ) -> *mut PGresult; +} +extern "C" { + pub fn PQprepare( + conn: *mut PGconn, + stmtName: *const ::std::os::raw::c_char, + query: *const ::std::os::raw::c_char, + nParams: ::std::os::raw::c_int, + paramTypes: *const Oid, + ) -> *mut PGresult; +} +extern "C" { + pub fn PQexecPrepared( + conn: *mut PGconn, + stmtName: *const ::std::os::raw::c_char, + nParams: ::std::os::raw::c_int, + paramValues: *const *const ::std::os::raw::c_char, + paramLengths: *const ::std::os::raw::c_int, + paramFormats: *const ::std::os::raw::c_int, + resultFormat: ::std::os::raw::c_int, + ) -> *mut PGresult; +} +extern "C" { + pub fn PQsendQuery( + conn: *mut PGconn, + query: *const ::std::os::raw::c_char, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn PQsendQueryParams( + conn: *mut PGconn, + command: *const ::std::os::raw::c_char, + nParams: ::std::os::raw::c_int, + paramTypes: *const Oid, + paramValues: *const *const ::std::os::raw::c_char, + paramLengths: *const ::std::os::raw::c_int, + paramFormats: *const ::std::os::raw::c_int, + resultFormat: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn PQsendPrepare( + conn: *mut PGconn, + stmtName: *const ::std::os::raw::c_char, + query: *const ::std::os::raw::c_char, + nParams: ::std::os::raw::c_int, + paramTypes: *const Oid, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn PQsendQueryPrepared( + conn: *mut PGconn, + stmtName: *const ::std::os::raw::c_char, + nParams: ::std::os::raw::c_int, + paramValues: *const *const ::std::os::raw::c_char, + paramLengths: *const ::std::os::raw::c_int, + paramFormats: *const ::std::os::raw::c_int, + resultFormat: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn PQsetSingleRowMode(conn: *mut PGconn) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn PQgetResult(conn: *mut PGconn) -> *mut PGresult; +} +extern "C" { + pub fn PQisBusy(conn: *mut PGconn) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn PQconsumeInput(conn: *mut PGconn) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn PQenterPipelineMode(conn: *mut PGconn) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn PQexitPipelineMode(conn: *mut PGconn) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn PQpipelineSync(conn: *mut PGconn) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn PQsendFlushRequest(conn: *mut PGconn) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn PQnotifies(conn: *mut PGconn) -> *mut PGnotify; +} +extern "C" { + pub fn PQputCopyData( + conn: *mut PGconn, + buffer: *const ::std::os::raw::c_char, + nbytes: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn PQputCopyEnd( + conn: *mut PGconn, + errormsg: *const ::std::os::raw::c_char, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn PQgetCopyData( + conn: *mut PGconn, + buffer: *mut *mut ::std::os::raw::c_char, + async_: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn PQgetline( + conn: *mut PGconn, + buffer: *mut ::std::os::raw::c_char, + length: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn PQputline( + conn: *mut PGconn, + string: *const ::std::os::raw::c_char, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn PQgetlineAsync( + conn: *mut PGconn, + buffer: *mut ::std::os::raw::c_char, + bufsize: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn PQputnbytes( + conn: *mut PGconn, + buffer: *const ::std::os::raw::c_char, + nbytes: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn PQendcopy(conn: *mut PGconn) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn PQsetnonblocking(conn: *mut PGconn, arg: ::std::os::raw::c_int) + -> ::std::os::raw::c_int; +} +extern "C" { + pub fn PQisnonblocking(conn: *const PGconn) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn PQisthreadsafe() -> ::std::os::raw::c_int; +} +extern "C" { + pub fn PQping(conninfo: *const ::std::os::raw::c_char) -> PGPing; +} +extern "C" { + pub fn PQpingParams( + keywords: *const *const ::std::os::raw::c_char, + values: *const *const ::std::os::raw::c_char, + expand_dbname: ::std::os::raw::c_int, + ) -> PGPing; +} +extern "C" { + pub fn PQflush(conn: *mut PGconn) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn PQfn( + conn: *mut PGconn, + fnid: ::std::os::raw::c_int, + result_buf: *mut ::std::os::raw::c_int, + result_len: *mut ::std::os::raw::c_int, + result_is_int: ::std::os::raw::c_int, + args: *const PQArgBlock, + nargs: ::std::os::raw::c_int, + ) -> *mut PGresult; +} +extern "C" { + pub fn PQresultStatus(res: *const PGresult) -> ExecStatusType; +} +extern "C" { + pub fn PQresStatus(status: ExecStatusType) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn PQresultErrorMessage(res: *const PGresult) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn PQresultVerboseErrorMessage( + res: *const PGresult, + verbosity: PGVerbosity, + show_context: PGContextVisibility, + ) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn PQresultErrorField( + res: *const PGresult, + fieldcode: ::std::os::raw::c_int, + ) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn PQntuples(res: *const PGresult) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn PQnfields(res: *const PGresult) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn PQbinaryTuples(res: *const PGresult) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn PQfname( + res: *const PGresult, + field_num: ::std::os::raw::c_int, + ) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn PQfnumber( + res: *const PGresult, + field_name: *const ::std::os::raw::c_char, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn PQftable(res: *const PGresult, field_num: ::std::os::raw::c_int) -> Oid; +} +extern "C" { + pub fn PQftablecol( + res: *const PGresult, + field_num: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn PQfformat( + res: *const PGresult, + field_num: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn PQftype(res: *const PGresult, field_num: ::std::os::raw::c_int) -> Oid; +} +extern "C" { + pub fn PQfsize(res: *const PGresult, field_num: ::std::os::raw::c_int) + -> ::std::os::raw::c_int; +} +extern "C" { + pub fn PQfmod(res: *const PGresult, field_num: ::std::os::raw::c_int) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn PQcmdStatus(res: *mut PGresult) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn PQoidStatus(res: *const PGresult) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn PQoidValue(res: *const PGresult) -> Oid; +} +extern "C" { + pub fn PQcmdTuples(res: *mut PGresult) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn PQgetvalue( + res: *const PGresult, + tup_num: ::std::os::raw::c_int, + field_num: ::std::os::raw::c_int, + ) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn PQgetlength( + res: *const PGresult, + tup_num: ::std::os::raw::c_int, + field_num: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn PQgetisnull( + res: *const PGresult, + tup_num: ::std::os::raw::c_int, + field_num: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn PQnparams(res: *const PGresult) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn PQparamtype(res: *const PGresult, param_num: ::std::os::raw::c_int) -> Oid; +} +extern "C" { + pub fn PQdescribePrepared( + conn: *mut PGconn, + stmt: *const ::std::os::raw::c_char, + ) -> *mut PGresult; +} +extern "C" { + pub fn PQdescribePortal( + conn: *mut PGconn, + portal: *const ::std::os::raw::c_char, + ) -> *mut PGresult; +} +extern "C" { + pub fn PQsendDescribePrepared( + conn: *mut PGconn, + stmt: *const ::std::os::raw::c_char, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn PQsendDescribePortal( + conn: *mut PGconn, + portal: *const ::std::os::raw::c_char, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn PQclear(res: *mut PGresult); +} +extern "C" { + pub fn PQfreemem(ptr: *mut ::std::os::raw::c_void); +} +extern "C" { + pub fn PQmakeEmptyPGresult(conn: *mut PGconn, status: ExecStatusType) -> *mut PGresult; +} +extern "C" { + pub fn PQcopyResult(src: *const PGresult, flags: ::std::os::raw::c_int) -> *mut PGresult; +} +extern "C" { + pub fn PQsetResultAttrs( + res: *mut PGresult, + numAttributes: ::std::os::raw::c_int, + attDescs: *mut PGresAttDesc, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn PQresultAlloc(res: *mut PGresult, nBytes: usize) -> *mut ::std::os::raw::c_void; +} +extern "C" { + pub fn PQresultMemorySize(res: *const PGresult) -> usize; +} +extern "C" { + pub fn PQsetvalue( + res: *mut PGresult, + tup_num: ::std::os::raw::c_int, + field_num: ::std::os::raw::c_int, + value: *mut ::std::os::raw::c_char, + len: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn PQescapeStringConn( + conn: *mut PGconn, + to: *mut ::std::os::raw::c_char, + from: *const ::std::os::raw::c_char, + length: usize, + error: *mut ::std::os::raw::c_int, + ) -> usize; +} +extern "C" { + pub fn PQescapeLiteral( + conn: *mut PGconn, + str_: *const ::std::os::raw::c_char, + len: usize, + ) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn PQescapeIdentifier( + conn: *mut PGconn, + str_: *const ::std::os::raw::c_char, + len: usize, + ) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn PQescapeByteaConn( + conn: *mut PGconn, + from: *const ::std::os::raw::c_uchar, + from_length: usize, + to_length: *mut usize, + ) -> *mut ::std::os::raw::c_uchar; +} +extern "C" { + pub fn PQunescapeBytea( + strtext: *const ::std::os::raw::c_uchar, + retbuflen: *mut usize, + ) -> *mut ::std::os::raw::c_uchar; +} +extern "C" { + pub fn PQescapeString( + to: *mut ::std::os::raw::c_char, + from: *const ::std::os::raw::c_char, + length: usize, + ) -> usize; +} +extern "C" { + pub fn PQescapeBytea( + from: *const ::std::os::raw::c_uchar, + from_length: usize, + to_length: *mut usize, + ) -> *mut ::std::os::raw::c_uchar; +} +extern "C" { + pub fn PQprint(fout: *mut FILE, res: *const PGresult, po: *const PQprintOpt); +} +extern "C" { + pub fn PQdisplayTuples( + res: *const PGresult, + fp: *mut FILE, + fillAlign: ::std::os::raw::c_int, + fieldSep: *const ::std::os::raw::c_char, + printHeader: ::std::os::raw::c_int, + quiet: ::std::os::raw::c_int, + ); +} +extern "C" { + pub fn PQprintTuples( + res: *const PGresult, + fout: *mut FILE, + PrintAttNames: ::std::os::raw::c_int, + TerseOutput: ::std::os::raw::c_int, + colWidth: ::std::os::raw::c_int, + ); +} +extern "C" { + pub fn lo_open( + conn: *mut PGconn, + lobjId: Oid, + mode: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn lo_close(conn: *mut PGconn, fd: ::std::os::raw::c_int) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn lo_read( + conn: *mut PGconn, + fd: ::std::os::raw::c_int, + buf: *mut ::std::os::raw::c_char, + len: usize, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn lo_write( + conn: *mut PGconn, + fd: ::std::os::raw::c_int, + buf: *const ::std::os::raw::c_char, + len: usize, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn lo_lseek( + conn: *mut PGconn, + fd: ::std::os::raw::c_int, + offset: ::std::os::raw::c_int, + whence: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn lo_lseek64( + conn: *mut PGconn, + fd: ::std::os::raw::c_int, + offset: pg_int64, + whence: ::std::os::raw::c_int, + ) -> pg_int64; +} +extern "C" { + pub fn lo_creat(conn: *mut PGconn, mode: ::std::os::raw::c_int) -> Oid; +} +extern "C" { + pub fn lo_create(conn: *mut PGconn, lobjId: Oid) -> Oid; +} +extern "C" { + pub fn lo_tell(conn: *mut PGconn, fd: ::std::os::raw::c_int) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn lo_tell64(conn: *mut PGconn, fd: ::std::os::raw::c_int) -> pg_int64; +} +extern "C" { + pub fn lo_truncate( + conn: *mut PGconn, + fd: ::std::os::raw::c_int, + len: usize, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn lo_truncate64( + conn: *mut PGconn, + fd: ::std::os::raw::c_int, + len: pg_int64, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn lo_unlink(conn: *mut PGconn, lobjId: Oid) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn lo_import(conn: *mut PGconn, filename: *const ::std::os::raw::c_char) -> Oid; +} +extern "C" { + pub fn lo_import_with_oid( + conn: *mut PGconn, + filename: *const ::std::os::raw::c_char, + lobjId: Oid, + ) -> Oid; +} +extern "C" { + pub fn lo_export( + conn: *mut PGconn, + lobjId: Oid, + filename: *const ::std::os::raw::c_char, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn PQlibVersion() -> ::std::os::raw::c_int; +} +extern "C" { + pub fn PQmblen( + s: *const ::std::os::raw::c_char, + encoding: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn PQmblenBounded( + s: *const ::std::os::raw::c_char, + encoding: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn PQdsplen( + s: *const ::std::os::raw::c_char, + encoding: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn PQenv2encoding() -> ::std::os::raw::c_int; +} +extern "C" { + pub fn PQencryptPassword( + passwd: *const ::std::os::raw::c_char, + user: *const ::std::os::raw::c_char, + ) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn PQencryptPasswordConn( + conn: *mut PGconn, + passwd: *const ::std::os::raw::c_char, + user: *const ::std::os::raw::c_char, + algorithm: *const ::std::os::raw::c_char, + ) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn pg_char_to_encoding(name: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn pg_encoding_to_char(encoding: ::std::os::raw::c_int) -> *const ::std::os::raw::c_char; +} +extern "C" { + pub fn pg_valid_server_encoding_id(encoding: ::std::os::raw::c_int) -> ::std::os::raw::c_int; +} +pub type PQsslKeyPassHook_OpenSSL_type = ::std::option::Option< + unsafe extern "C" fn( + buf: *mut ::std::os::raw::c_char, + size: ::std::os::raw::c_int, + conn: *mut PGconn, + ) -> ::std::os::raw::c_int, +>; +extern "C" { + pub fn PQgetSSLKeyPassHook_OpenSSL() -> PQsslKeyPassHook_OpenSSL_type; +} +extern "C" { + pub fn PQsetSSLKeyPassHook_OpenSSL(hook: PQsslKeyPassHook_OpenSSL_type); +} +extern "C" { + pub fn PQdefaultSSLKeyPassHook_OpenSSL( + buf: *mut ::std::os::raw::c_char, + size: ::std::os::raw::c_int, + conn: *mut PGconn, + ) -> ::std::os::raw::c_int; +} +pub type __builtin_va_list = *mut ::std::os::raw::c_char; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct lconv { + pub _address: u8, +} diff --git a/wrapper.h b/wrapper.h new file mode 100644 index 0000000..06a7350 --- /dev/null +++ b/wrapper.h @@ -0,0 +1 @@ +#include