]> git.proxmox.com Git - rustc.git/blob - vendor/libc/src/unix/uclibc/align.rs
New upstream version 1.40.0+dfsg1
[rustc.git] / vendor / libc / src / unix / uclibc / align.rs
1 macro_rules! expand_align {
2 () => {
3 s! {
4 #[cfg_attr(any(target_pointer_width = "32",
5 target_arch = "x86_64",
6 target_arch = "powerpc64",
7 target_arch = "mips64",
8 target_arch = "s390x",
9 target_arch = "sparc64"),
10 repr(align(4)))]
11 #[cfg_attr(not(any(target_pointer_width = "32",
12 target_arch = "x86_64",
13 target_arch = "powerpc64",
14 target_arch = "mips64",
15 target_arch = "s390x",
16 target_arch = "sparc64")),
17 repr(align(8)))]
18 pub struct pthread_mutexattr_t {
19 size: [u8; ::__SIZEOF_PTHREAD_MUTEXATTR_T],
20 }
21
22 #[repr(align(4))]
23 pub struct pthread_condattr_t {
24 size: [u8; ::__SIZEOF_PTHREAD_CONDATTR_T],
25 }
26 }
27
28 s_no_extra_traits! {
29 #[repr(align(8))]
30 #[allow(missing_debug_implementations)]
31 pub struct pthread_cond_t {
32 size: [u8; ::__SIZEOF_PTHREAD_COND_T],
33 }
34
35 #[cfg_attr(all(target_pointer_width = "32",
36 any(target_arch = "mips",
37 target_arch = "arm",
38 target_arch = "powerpc")),
39 repr(align(4)))]
40 #[cfg_attr(any(target_pointer_width = "64",
41 not(any(target_arch = "mips",
42 target_arch = "arm",
43 target_arch = "powerpc"))),
44 repr(align(8)))]
45 #[allow(missing_debug_implementations)]
46 pub struct pthread_mutex_t {
47 size: [u8; ::__SIZEOF_PTHREAD_MUTEX_T],
48 }
49
50 #[cfg_attr(all(target_pointer_width = "32",
51 any(target_arch = "mips",
52 target_arch = "arm",
53 target_arch = "powerpc")),
54 repr(align(4)))]
55 #[cfg_attr(any(target_pointer_width = "64",
56 not(any(target_arch = "mips",
57 target_arch = "arm",
58 target_arch = "powerpc"))),
59 repr(align(8)))]
60 #[allow(missing_debug_implementations)]
61 pub struct pthread_rwlock_t {
62 size: [u8; ::__SIZEOF_PTHREAD_RWLOCK_T],
63 }
64 }
65 };
66 }