natdb_sys/lib.rs
1//! Raw FFI bindings to [LMDB](https://www.symas.com/lmdb), compiled from the
2//! vendored upstream sources in `lmdb/` (provenance in `lmdb/VENDORED.md`).
3//!
4//! The declarations in `bindings.rs` are generated by bindgen from
5//! `lmdb/lmdb.h` and committed, so building this crate does not need libclang.
6//! Enable the `bindgen` feature to regenerate them after updating the vendored
7//! sources. For a safe API, use the `natdb` crate.
8
9#![allow(non_camel_case_types, non_upper_case_globals)]
10
11/// Unix permissions for creating files (`mdb_mode_t` in `lmdb.h`).
12#[cfg(unix)]
13pub type mdb_mode_t = ::libc::mode_t;
14/// Dummy permissions type on Windows, where LMDB ignores the mode (`mdb_mode_t` in `lmdb.h`).
15#[cfg(windows)]
16pub type mdb_mode_t = ::libc::c_int;
17
18/// An OS file handle: a file descriptor on Unix (`mdb_filehandle_t` in `lmdb.h`).
19#[cfg(unix)]
20pub type mdb_filehandle_t = ::libc::c_int;
21/// An OS file handle: an opaque `HANDLE` on Windows (`mdb_filehandle_t` in `lmdb.h`).
22#[cfg(windows)]
23pub type mdb_filehandle_t = *mut ::libc::c_void;
24
25include!("bindings.rs");