]> git.ipfire.org Git - thirdparty/gcc.git/blob - libphobos/libdruntime/core/sys/posix/sys/un.d
libphobos: Merge upstream druntime 94686651
[thirdparty/gcc.git] / libphobos / libdruntime / core / sys / posix / sys / un.d
1 /**
2 * D header file for POSIX.
3 *
4 * Copyright: Copyright Sean Kelly 2005 - 2009.
5 * License: $(HTTP www.boost.org/LICENSE_1_0.txt, Boost License 1.0).
6 * Authors: Sean Kelly
7 * Standards: The Open Group Base Specifications Issue 6, IEEE Std 1003.1, 2004 Edition
8 */
9
10 /* Copyright Sean Kelly 2005 - 2009.
11 * Distributed under the Boost Software License, Version 1.0.
12 * (See accompanying file LICENSE or copy at
13 * http://www.boost.org/LICENSE_1_0.txt)
14 */
15 module core.sys.posix.sys.un;
16
17 version (OSX)
18 version = Darwin;
19 else version (iOS)
20 version = Darwin;
21 else version (TVOS)
22 version = Darwin;
23 else version (WatchOS)
24 version = Darwin;
25
26 version (Posix):
27 extern(C):
28
29 public import core.sys.posix.sys.socket: sa_family_t;
30
31 //
32 // Required
33 //
34 /*
35 struct sockaddr_un
36 {
37 sa_family_t sun_family;
38 char sa_data[];
39 }
40
41 sa_family_t // From core.sys.posix.sys.socket
42 */
43
44 version (linux)
45 {
46 enum UNIX_PATH_MAX = 108;
47
48 struct sockaddr_un
49 {
50 sa_family_t sun_family;
51 byte[UNIX_PATH_MAX] sun_path;
52 }
53 }
54 else version (Darwin)
55 {
56 struct sockaddr_un
57 {
58 ubyte sun_len;
59 sa_family_t sun_family;
60 byte[104] sun_path;
61 }
62 }
63 else version (FreeBSD)
64 {
65 struct sockaddr_un
66 {
67 ubyte sun_len;
68 sa_family_t sun_family;
69 byte[104] sun_path;
70 }
71 }
72 else version (NetBSD)
73 {
74 struct sockaddr_un
75 {
76 ubyte sun_len;
77 sa_family_t sun_family;
78 byte[104] sun_path;
79 }
80 }
81 else version (OpenBSD)
82 {
83 struct sockaddr_un
84 {
85 ubyte sun_len;
86 sa_family_t sun_family;
87 byte[104] sun_path;
88 }
89 }
90 else version (DragonFlyBSD)
91 {
92 struct sockaddr_un
93 {
94 ubyte sun_len;
95 sa_family_t sun_family;
96 byte[104] sun_path;
97 }
98 }
99 else version (Solaris)
100 {
101 struct sockaddr_un
102 {
103 sa_family_t sun_family;
104 byte[108] sun_path;
105 }
106 }