Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2000-02-17 22:38:33 +0300
committerChristopher Faylor <me@cgf.cx>2000-02-17 22:38:33 +0300
commit1fd5e000ace55b323124c7e556a7a864b972a5c4 (patch)
treedc4fcf1e5e22a040716ef92c496b8d94959b2baa /winsup/cygwin/include/sys/un.h
parent369d8a8fd5e887eca547bf34bccfdf755c9e5397 (diff)
import winsup-2000-02-17 snapshot
Diffstat (limited to 'winsup/cygwin/include/sys/un.h')
-rw-r--r--winsup/cygwin/include/sys/un.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/winsup/cygwin/include/sys/un.h b/winsup/cygwin/include/sys/un.h
new file mode 100644
index 000000000..6f49c7b06
--- /dev/null
+++ b/winsup/cygwin/include/sys/un.h
@@ -0,0 +1,16 @@
+#ifndef _SYS_UN_H
+#define _SYS_UN_H
+
+/* POSIX requires only at least 100 bytes */
+#define UNIX_PATH_LEN 108
+
+struct sockaddr_un {
+ unsigned short sun_family; /* address family AF_LOCAL/AF_UNIX */
+ char sun_path[UNIX_PATH_LEN]; /* 108 bytes of socket address */
+};
+
+/* Evaluates the actual length of `sockaddr_un' structure. */
+#define SUN_LEN(p) ((size_t)(((struct sockaddr_un *) NULL)->sun_path) \
+ + strlen ((p)->sun_path))
+
+#endif