]> git.ipfire.org Git - thirdparty/gcc.git/blame - libphobos/libdruntime/core/sys/posix/sys/un.d
libphobos: Merge upstream druntime 94686651
[thirdparty/gcc.git] / libphobos / libdruntime / core / sys / posix / sys / un.d
CommitLineData
b4c522fa
IB
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 */
15module core.sys.posix.sys.un;
16
17version (OSX)
18 version = Darwin;
19else version (iOS)
20 version = Darwin;
21else version (TVOS)
22 version = Darwin;
23else version (WatchOS)
24 version = Darwin;
25
26version (Posix):
27extern(C):
28
29public import core.sys.posix.sys.socket: sa_family_t;
30
31//
32// Required
33//
34/*
35struct sockaddr_un
36{
37 sa_family_t sun_family;
38 char sa_data[];
39}
40
41sa_family_t // From core.sys.posix.sys.socket
42*/
43
44version (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}
54else 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}
63else 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}
72else 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}
0234a917
IB
81else 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}
b4c522fa
IB
90else 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}
99else version (Solaris)
100{
101 struct sockaddr_un
102 {
103 sa_family_t sun_family;
104 byte[108] sun_path;
105 }
106}