1 // Take a look at the license at the top of the repository in the LICENSE file.
2 
3 #[allow(unused_imports)]
4 use libc::{c_char, c_int, c_ushort, c_void};
5 
6 #[cfg(unix)]
7 pub use libc::passwd;
8 
9 #[cfg(all(not(unix), feature = "dox"))]
10 #[repr(C)]
11 pub struct passwd {
12     pw_name: *mut c_char,
13     pw_passwd: *mut c_char,
14     pw_uid: u32,
15     pw_gid: u32,
16     pw_gecos: *mut c_char,
17     pw_dir: *mut c_char,
18     pw_shell: *mut c_char,
19 }
20 
21 #[cfg(windows)]
22 pub type GPid = *mut c_void;
23 
24 #[cfg(not(windows))]
25 pub type GPid = c_int;
26 
27 #[repr(C)]
28 #[derive(Copy, Clone)]
29 #[cfg(all(windows, target_arch = "x86_64"))]
30 pub struct GPollFD {
31     pub fd: i64,
32     pub events: c_ushort,
33     pub revents: c_ushort,
34 }
35 
36 #[repr(C)]
37 #[derive(Copy, Clone)]
38 #[cfg(not(all(windows, target_arch = "x86_64")))]
39 pub struct GPollFD {
40     pub fd: c_int,
41     pub events: c_ushort,
42     pub revents: c_ushort,
43 }
44 
45 #[cfg(target_family = "windows")]
46 pub use self::win32::*;
47 
48 #[cfg(target_family = "windows")]
49 mod win32 {
50     use crate::gpointer;
51     use libc::c_char;
52 
53     extern "C" {
g_win32_get_package_installation_directory_of_module( hmodule: gpointer, ) -> *mut c_char54         pub fn g_win32_get_package_installation_directory_of_module(
55             hmodule: gpointer,
56         ) -> *mut c_char;
57     }
58 }
59