1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/*
Portions Copyright 2019-2021 ZomboDB, LLC.
Portions Copyright 2021-2022 Technology Concepts & Design, Inc. <support@tcdi.com>

All rights reserved.

Use of this source code is governed by the MIT license that can be found in the LICENSE file.
*/

mod datum;
pub mod guard;
mod oids;
mod polyfill;
pub mod setjmp;
mod tupdesc;
mod utils;
// Various SqlTranslatable mappings for SQL generation
mod sql_translatable;

pub use datum::Datum;
// OnDrop(feature = "pg11"): remove this cfg if all supported versions of Postgres
// now include NullableDatum.
#[cfg(any(feature = "pg12", feature = "pg13", feature = "pg14"))]
pub use datum::NullableDatum;
pub use guard::*;
pub use oids::*;
pub use polyfill::*;
pub use tupdesc::*;
pub use utils::*;

#[cfg(target_os = "linux")]
extern "C" {
    #[link_name = "__sigsetjmp"]
    pub(crate) fn sigsetjmp(
        env: *mut crate::sigjmp_buf,
        savemask: std::os::raw::c_int,
    ) -> std::os::raw::c_int;
}

#[cfg(any(target_os = "macos", target_os = "freebsd", target_os = "openbsd"))]
extern "C" {
    pub(crate) fn sigsetjmp(
        env: *mut crate::sigjmp_buf,
        savemask: std::os::raw::c_int,
    ) -> std::os::raw::c_int;
}