un.h (406d62731eff92f06723c04de94992d94a293145) un.h (75f727564c6335968600b22ffc11f9a24318bc14)
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE

--- 42 unchanged lines hidden (view full) ---

51/*
52 * Definitions for UNIX IPC domain.
53 */
54struct sockaddr_un {
55 sa_family_t sun_family; /* AF_UNIX */
56 char sun_path[108]; /* path name (gag) */
57};
58
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE

--- 42 unchanged lines hidden (view full) ---

51/*
52 * Definitions for UNIX IPC domain.
53 */
54struct sockaddr_un {
55 sa_family_t sun_family; /* AF_UNIX */
56 char sun_path[108]; /* path name (gag) */
57};
58
59#if (!defined(_XOPEN_SOURCE) && !defined(_POSIX_C_SOURCE)) || \
60 defined(__EXTENSIONS__)
59/*
60 * NOTE: If we ever go to BSD-style sun_len + sun_family, this macro needs to
61 * change.
62 *
61/*
62 * NOTE: If we ever go to BSD-style sun_len + sun_family, this macro needs to
63 * change.
64 *
63 * Also, include a strlen() prototype.
65 * Also, include a strlen() prototype, and we have to protect it w.r.t.
66 * UNIX{98,03}. And because there's strlen, we need size_t as well.
64 */
67 */
68#if !defined(_SIZE_T) || __cplusplus >= 199711L
69#define _SIZE_T
70#if defined(_LP64) || defined(_I32LPx)
71typedef ulong_t size_t; /* size of something in bytes */
72#else
73typedef uint_t size_t; /* (historical version) */
74#endif
75#endif /* _SIZE_T */
76
65extern size_t strlen(const char *);
77extern size_t strlen(const char *);
78
66#define SUN_LEN(su) (sizeof (sa_family_t) + strlen((su)->sun_path))
67
79#define SUN_LEN(su) (sizeof (sa_family_t) + strlen((su)->sun_path))
80
81#endif /* (!defined(_XOPEN_SOURCE) && !defined(_POSIX_C_SOURCE)) || ... */
82
68#ifdef _KERNEL
69int unp_discard();
70#endif
71
72#ifdef __cplusplus
73}
74#endif
75
76#endif /* _SYS_UN_H */
83#ifdef _KERNEL
84int unp_discard();
85#endif
86
87#ifdef __cplusplus
88}
89#endif
90
91#endif /* _SYS_UN_H */