Changeset 344


Ignore:
Timestamp:
Jul 10, 2003, 6:43:51 PM (22 years ago)
Author:
bird
Message:

#427: FreeBSD 5.1 level.

Location:
trunk/src/emx/include/sys
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/emx/include/sys/types.h

    • Property cvs2svn:cvs-rev changed from 1.5 to 1.6
    r343 r344  
    1 /* sys/types.h (emx+gcc) */
    2 
    3 #ifndef _SYS_TYPES_H
     1/*-
     2 * Copyright (c) 1982, 1986, 1991, 1993, 1994
     3 *      The Regents of the University of California.  All rights reserved.
     4 * (c) UNIX System Laboratories, Inc.
     5 * All or some portions of this file are derived from material licensed
     6 * to the University of California by American Telephone and Telegraph
     7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with
     8 * the permission of UNIX System Laboratories, Inc.
     9 *
     10 * Redistribution and use in source and binary forms, with or without
     11 * modification, are permitted provided that the following conditions
     12 * are met:
     13 * 1. Redistributions of source code must retain the above copyright
     14 *    notice, this list of conditions and the following disclaimer.
     15 * 2. Redistributions in binary form must reproduce the above copyright
     16 *    notice, this list of conditions and the following disclaimer in the
     17 *    documentation and/or other materials provided with the distribution.
     18 * 3. All advertising materials mentioning features or use of this software
     19 *    must display the following acknowledgement:
     20 *      This product includes software developed by the University of
     21 *      California, Berkeley and its contributors.
     22 * 4. Neither the name of the University nor the names of its contributors
     23 *    may be used to endorse or promote products derived from this software
     24 *    without specific prior written permission.
     25 *
     26 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
     27 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     28 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     29 * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
     30 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     36 * SUCH DAMAGE.
     37 *
     38 *      @(#)types.h     8.6 (Berkeley) 2/19/95
     39 * $FreeBSD: src/sys/sys/types.h,v 1.83 2003/03/28 15:27:30 mike Exp $
     40 *
     41 * @@level      FreeBSD 5.1
     42 * @@changed    bird: Some EMX defines and a bit of toolkit pollution.
     43 */
     44
     45#ifndef _SYS_TYPES_H_
     46#define _SYS_TYPES_H_
    447#define _SYS_TYPES_H
    548
    6 /* freebsd/toolkit compatibility */
    749#include <sys/cdefs.h>
    8 #include <sys/inttypes.h> /* includes machine/ansi.h */
    9 #include <machine/types.h>
     50
     51/* Machine type dependent parameters. */
    1052#include <machine/endian.h>
    11 
    12 #if !defined (_SIZE_T)
    13 #define _SIZE_T
    14 typedef unsigned long size_t;
    15 #undef  _BSD_SIZE_T_
    16 #endif
    17 
    18 #if !defined (_SSIZE_T)
    19 #define _SSIZE_T
    20 typedef int ssize_t;
    21 #undef  _BSD_SSIZE_T_
    22 #endif
    23 
    24 #if !defined (_TIME_T)
    25 #define _TIME_T
    26 typedef unsigned long time_t;
    27 #undef  _BSD_TIME_T_
    28 #endif
    29 
    30 #if !defined (_INO_T)
    31 #define _INO_T
    32 typedef int ino_t;
    33 #undef  _BSD_INO_T_
    34 #endif
    35 
    36 #if !defined (_DEV_T)
    37 #define _DEV_T
    38 typedef int dev_t;
    39 #undef  _BSD_DEV_T_
    40 #endif
    41 
    42 #if !defined (_OFF_T)
    43 #define _OFF_T
    44 typedef long off_t;
    45 #undef  _BSD_OFF_T_
    46 #endif
    47 
    48 #if !defined (_MODE_T)
    49 #define _MODE_T
    50 typedef int mode_t;
    51 #undef  _BSD_MODE_T_
    52 #endif
    53 
    54 #if !defined (_NLINK_T)
    55 #define _NLINK_T
    56 typedef int nlink_t;
    57 #undef  _BSD_NLINK_T_
    58 #endif
    59 
    60 #if !defined (_UID_T)
    61 #define _UID_T
    62 typedef int uid_t;
    63 #undef  _BSD_UID_T_
    64 #endif
    65 
    66 #if !defined (_PID_T)
    67 #define _PID_T
    68 typedef int pid_t;
    69 #undef  _BSD_PID_T_
    70 #endif
    71 
    72 #if !defined (_GID_T)
    73 #define _GID_T
    74 typedef int gid_t;
    75 #undef  _BSD_GID_T_
    76 #endif
    77 
     53#include <sys/_types.h>
     54
     55/*#if __BSD_VISIBLE */                  /* bird: emx */
     56#if !defined (_POSIX_SOURCE) || __BSD_VISIBLE /* bird: emx */
     57typedef unsigned char   u_char;
     58typedef unsigned short  u_short;
     59typedef unsigned int    u_int;
     60typedef unsigned long   u_long;
     61typedef unsigned short  ushort;         /* Sys V compatibility */
     62typedef unsigned int    uint;           /* Sys V compatibility */
     63#endif
     64
     65/*
     66 * XXX POSIX sized integrals that should appear only in <sys/stdint.h>.
     67 */
     68#ifndef _INT8_T_DECLARED
     69typedef __int8_t        int8_t;
     70#define _INT8_T_DECLARED
     71#endif
     72
     73#ifndef _INT16_T_DECLARED
     74typedef __int16_t       int16_t;
     75#define _INT16_T_DECLARED
     76#endif
     77
     78#ifndef _INT32_T_DECLARED
     79typedef __int32_t       int32_t;
     80#define _INT32_T_DECLARED
     81#endif
     82
     83#ifndef _INT64_T_DECLARED
     84typedef __int64_t       int64_t;
     85#define _INT64_T_DECLARED
     86#endif
     87
     88#ifndef _UINT8_T_DECLARED
     89typedef __uint8_t       uint8_t;
     90#define _UINT8_T_DECLARED
     91#endif
     92
     93#ifndef _UINT16_T_DECLARED
     94typedef __uint16_t      uint16_t;
     95#define _UINT16_T_DECLARED
     96#endif
     97
     98#ifndef _UINT32_T_DECLARED
     99typedef __uint32_t      uint32_t;
     100#define _UINT32_T_DECLARED
     101#endif
     102
     103#ifndef _UINT64_T_DECLARED
     104typedef __uint64_t      uint64_t;
     105#define _UINT64_T_DECLARED
     106#endif
     107
     108#ifndef _INTPTR_T_DECLARED
     109typedef __intptr_t      intptr_t;
     110typedef __uintptr_t     uintptr_t;
     111#define _INTPTR_T_DECLARED
     112#endif
     113
     114typedef __uint8_t       u_int8_t;       /* unsigned integrals (deprecated) */
     115typedef __uint16_t      u_int16_t;
     116typedef __uint32_t      u_int32_t;
     117typedef __uint64_t      u_int64_t;
     118
     119typedef __uint64_t      u_quad_t;       /* quads (deprecated) */
     120typedef __int64_t       quad_t;
     121typedef quad_t *        qaddr_t;
     122
     123typedef char *          caddr_t;        /* core address */
     124typedef __const char *  c_caddr_t;      /* core address, pointer to const */
     125typedef __volatile char *v_caddr_t;     /* core address, pointer to volatile */
     126
     127#if !defined(_CLOCK_T_DECLARED) && !defined(_CLOCK_T) /* bird: emx */
     128typedef __clock_t       clock_t;
     129#define _CLOCK_T_DECLARED
     130#define _CLOCK_T                        /* bird: emx */
     131#endif
     132
     133#ifndef _CLOCKID_T_DECLARED
     134typedef __clockid_t     clockid_t;
     135#define _CLOCKID_T_DECLARED
     136#endif
     137
     138typedef __critical_t    critical_t;     /* Critical section value */
     139typedef __int64_t       daddr_t;        /* disk address */
     140
     141#ifndef _DEV_T_DECLARED
     142typedef __dev_t         dev_t;          /* device number or struct cdev */
     143#define _DEV_T_DECLARED
     144#endif
     145
     146#ifndef _FFLAGS_T_DECLARED
     147typedef __fflags_t      fflags_t;       /* file flags */
     148#define _FFLAGS_T_DECLARED
     149#endif
     150
     151typedef __uint32_t      fixpt_t;        /* fixed point number */
     152
     153#ifndef _FSBLKCNT_T_DECLARED            /* for statvfs() */
     154typedef __fsblkcnt_t    fsblkcnt_t;
     155typedef __fsfilcnt_t    fsfilcnt_t;
     156#define _FSBLKCNT_T_DECLARED
     157#endif
     158
     159#if !defined(_GID_T_DECLARED) && !defined(_GID_T) /* bird: emx */
     160typedef __gid_t         gid_t;          /* group id */
     161#define _GID_T_DECLARED
     162#define _GID_T                          /* bird: emx */
     163#endif
     164
     165#ifndef _IN_ADDR_T_DECLARED
     166typedef __uint32_t      in_addr_t;      /* base type for internet address */
     167#define _IN_ADDR_T_DECLARED
     168#endif
     169
     170#ifndef _IN_PORT_T_DECLARED
     171typedef __uint16_t      in_port_t;
     172#define _IN_PORT_T_DECLARED
     173#endif
     174
     175#ifndef _ID_T_DECLARED
     176typedef __id_t          id_t;           /* can hold a uid_t or pid_t */
     177#define _ID_T_DECLARED
     178#endif
     179
     180#ifndef _INO_T_DECLARED
     181typedef __ino_t         ino_t;          /* inode number */
     182#define _INO_T_DECLARED
     183#endif
     184
     185#ifndef _KEY_T_DECLARED
     186typedef __key_t         key_t;          /* IPC key (for Sys V IPC) */
     187#define _KEY_T_DECLARED
     188#endif
     189
     190#ifndef _MODE_T_DECLARED
     191typedef __mode_t        mode_t;         /* permissions */
     192#define _MODE_T_DECLARED
     193#endif
     194
     195#ifndef _NLINK_T_DECLARED
     196typedef __nlink_t       nlink_t;        /* link count */
     197#define _NLINK_T_DECLARED
     198#endif
     199
     200#if !defined(_OFF_T_DECLARED) && !defined(_OFF_T) /* bird:emx */
     201typedef __off_t         off_t;          /* file offset */
     202#define _OFF_T_DECLARED
     203#define _OFF_T                          /* bird: emx */
     204#endif
     205
     206#if !defined(_PID_T_DECLARED) && !defined(_PID_T) /* bird:emx */
     207typedef __pid_t         pid_t;          /* process id */
     208#define _PID_T_DECLARED
     209#define _PID_T                          /* bird: emx */
     210#endif
     211
     212typedef __register_t    register_t;
     213
     214#ifndef _RLIM_T_DECLARED
     215typedef __rlim_t        rlim_t;         /* resource limit */
     216#define _RLIM_T_DECLARED
     217#endif
     218
     219typedef __segsz_t       segsz_t;        /* segment size (in pages) */
     220
     221#if !defined(_SIZE_T_DECLARED) && !defined(_SIZE_T) /* bird: emx */
     222typedef __size_t        size_t;
     223#define _SIZE_T_DECLARED
     224#define _SIZE_T                         /* bird: emx */
     225#endif
     226
     227#if !defined(_SSIZE_T_DECLARED) && !defined(_SSIZE_T) /* bird: emx */
     228typedef __ssize_t       ssize_t;
     229#define _SSIZE_T_DECLARED
     230#define _SSIZE_T                        /* bird: emx */
     231#endif
     232
     233#ifndef _SUSECONDS_T_DECLARED
     234typedef __suseconds_t   suseconds_t;    /* microseconds (signed) */
     235#define _SUSECONDS_T_DECLARED
     236#endif
     237
     238#if !defined(_TIME_T_DECLARED) && !defined(_TIME_T) /* bird: emx */
     239typedef __time_t        time_t;
     240#define _TIME_T_DECLARED
     241#define _TIME_T                         /* bird: emx */
     242#endif
     243
     244#ifndef _TIMER_T_DECLARED
     245typedef __timer_t       timer_t;
     246#define _TIMER_T_DECLARED
     247#endif
     248
     249typedef __u_register_t  u_register_t;
     250typedef __udev_t        udev_t;         /* device number */
     251
     252#if !defined(_UID_T_DECLARED) && !defined(_UID_T)  /* bird: emx */
     253typedef __uid_t         uid_t;          /* user id */
     254#define _UID_T_DECLARED
     255#define _UID_T                          /* bird: emx */
     256#endif
     257
     258#ifndef _USECONDS_T_DECLARED
     259typedef __useconds_t    useconds_t;     /* microseconds (unsigned) */
     260#define _USECONDS_T_DECLARED
     261#endif
     262
     263typedef __vm_offset_t   vm_offset_t;
     264typedef __vm_ooffset_t  vm_ooffset_t;
     265typedef __vm_paddr_t    vm_paddr_t;
     266typedef __vm_pindex_t   vm_pindex_t;
     267typedef __vm_size_t     vm_size_t;
     268
     269#ifdef _KERNEL
     270typedef int             boolean_t;
     271typedef __intfptr_t     intfptr_t;
     272
     273/*-
     274 * XXX this is fixed width for historical reasons.  It should have had type
     275 * __int_fast32_t.  Fixed-width types should not be used unless binary
     276 * compatibility is essential.  Least-width types should be used even less
     277 * since they provide smaller benefits.
     278 * XXX should be MD.
     279 * XXX this is bogus in -current, but still used for spl*().
     280 */
     281typedef __uint32_t      intrmask_t;     /* Interrupt mask (spl, xxx_imask...) */
     282
     283typedef __uintfptr_t    uintfptr_t;
     284typedef __uint64_t      uoff_t;
     285typedef struct vm_page  *vm_page_t;
     286
     287#define offsetof(type, field) __offsetof(type, field)
     288
     289#endif /* !_KERNEL */
     290
     291/*
     292 * The following are all things that really shouldn't exist in this header,
     293 * since its purpose is to provide typedefs, not miscellaneous doodads.
     294 */
     295/*#if __BSD_VISIBLE */                  /* bird: emx */
     296#if !defined (_POSIX_SOURCE) || __BSD_VISIBLE /* bird: emx */
     297
     298#include <sys/select.h>
     299
     300#ifndef _KERNEL
     301/*
     302 * minor() gives a cookie instead of an index since we don't want to
     303 * change the meanings of bits 0-15 or waste time and space shifting
     304 * bits 16-31 for devices that don't use them.
     305 */
     306#define major(x)        ((int)(((u_int)(x) >> 8)&0xff)) /* major number */
     307#define minor(x)        ((int)((x)&0xffff00ff))         /* minor number */
     308#define makedev(x,y)    ((dev_t)(((x) << 8) | (y)))     /* create dev_t */
     309#endif /* !_KERNEL */
     310
     311/*
     312 * These declarations belong elsewhere, but are repeated here and in
     313 * <stdio.h> to give broken programs a better chance of working with
     314 * 64-bit off_t's.
     315 */
     316#ifndef _KERNEL
     317__BEGIN_DECLS
     318#ifndef _FTRUNCATE_DECLARED
     319#define _FTRUNCATE_DECLARED
     320int      ftruncate(int, off_t);
     321#endif
     322#ifndef _LSEEK_DECLARED
     323#define _LSEEK_DECLARED
     324off_t    lseek(int, off_t, int);
     325#endif
     326#if 0                                   /* bird: emx */
     327#ifndef _MMAP_DECLARED
     328#define _MMAP_DECLARED
     329void *   mmap(void *, size_t, int, int, int, off_t);
     330#endif
     331#endif                                  /* bird: emx */
     332#ifndef _TRUNCATE_DECLARED
     333#define _TRUNCATE_DECLARED
     334int      truncate(const char *, off_t);
     335#endif
     336__END_DECLS
     337#endif /* !_KERNEL */
     338
     339#endif /* __BSD_VISIBLE */
     340
     341
     342/* bird: OS/2 Toolkit Pollution. */
    78343#if !defined (_POSIX_SOURCE)
    79 
    80 #if !defined (FD_SETSIZE)
    81 #define FD_SETSIZE 256
    82 #elif FD_SETSIZE < 256
    83 #error FD_SETSIZE must be at least 256
    84 #endif
    85 
    86 #ifndef _howmany
    87 #define _howmany(a,b)       (((a) + ((b) - 1)) / (b))
    88 #endif
    89 #if defined(TCPV40HDRS) && !defined(howmany)
    90 #define howmany(a,b)        (((a) + ((b) - 1)) / (b))
    91 #endif
    92 
    93 #if !defined (_FD_SET_T)
    94 #define _FD_SET_T
    95 /** The base type for the select file descriptor bitmap. */
    96 typedef unsigned long   __fd_mask;
    97 /** Number of bits in a byte. */
    98 #define NBBY        8
    99 /** Number of bits in a byte. */
    100 #define _NFDBITS    (sizeof(__fd_mask) * 8)     /* bits per mask */
    101 /** Select set. */
    102 typedef struct fd_set
    103 {
    104     __fd_mask   __fds_bits[_howmany(FD_SETSIZE, _NFDBITS)];
    105 } fd_set;
    106 
    107 #if defined(__BSD_VISIBLE) || defined(TCPV40HDRS)
    108 typedef __fd_mask   fd_mask;
    109 #define fds_bits    __fds_bits
    110 #define NFDBITS     _NFDBITS
    111 #endif
    112 
    113 #endif
    114 
    115 #ifndef FD_SET
    116 /** Set a bit in the select file descriptor bitmap. */
    117 #define FD_SET(n,s)    ((s)->__fds_bits[(n)/_NFDBITS] |=  (1L << ((n) & (_NFDBITS - 1))))
    118 /** Clear a bit in the select file descriptor bitmap. */
    119 #define FD_CLR(n,s)    ((s)->__fds_bits[(n)/_NFDBITS] &= ~(1L << ((n) & (_NFDBITS - 1))))
    120 /** Test if a bit in the select file descriptor bitmap is set. */
    121 #define FD_ISSET(n,s)  ((s)->__fds_bits[(n)/_NFDBITS] &   (1L << ((n) & (_NFDBITS - 1))))
    122 /** Initialize the select file descriptor bitmap clearing all bits. */
    123 #define FD_ZERO(s)     (void)memset(s, 0, sizeof(*(s)))
    124 #if __BSD_VISIBLE
    125 /** Copy a select file descriptor bitmap. */
    126 #define FD_COPY(src,trg) (void)(*(trg) = *(src))
    127 #endif
    128 #endif /* !FD_SET */
    129 
    130 #endif /* !_POSIX_SOURCE */
    131 
    132 #if !defined (_POSIX_SOURCE)
    133 
    134 typedef unsigned char u_char;
    135 typedef unsigned short u_short;
    136 typedef unsigned u_int;
    137 typedef unsigned long u_long;
    138 typedef char *caddr_t;
    139 
    140 /* toolkit pollution */
    141344#ifdef __32BIT__
    142345typedef int             long_int;       /* 32-bit compilers */
     
    144347typedef long int        long_int;       /* 16-bit compilers */
    145348#endif
    146 
    147349#endif /* not _POSIX_SOURCE */
    148350
    149 typedef __uint8_t       u_int8_t;
    150 typedef __uint16_t      u_int16_t;
    151 typedef __uint32_t      u_int32_t;
    152 typedef __uint64_t      u_int64_t;
    153 
    154 #endif /* not _SYS_TYPES_H */
     351#endif /* not _SYS_TYPES_H_ */
  • trunk/src/emx/include/sys/un.h

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r343 r344  
    1 /* Copyright (c)1996 by Holger Veit
    2  * May be freely used with EMX
    3  * Modified 2003 by bird
     1/*
     2 * Copyright (c) 1982, 1986, 1993
     3 *      The Regents of the University of California.  All rights reserved.
     4 *
     5 * Redistribution and use in source and binary forms, with or without
     6 * modification, are permitted provided that the following conditions
     7 * are met:
     8 * 1. Redistributions of source code must retain the above copyright
     9 *    notice, this list of conditions and the following disclaimer.
     10 * 2. Redistributions in binary form must reproduce the above copyright
     11 *    notice, this list of conditions and the following disclaimer in the
     12 *    documentation and/or other materials provided with the distribution.
     13 * 3. All advertising materials mentioning features or use of this software
     14 *    must display the following acknowledgement:
     15 *      This product includes software developed by the University of
     16 *      California, Berkeley and its contributors.
     17 * 4. Neither the name of the University nor the names of its contributors
     18 *    may be used to endorse or promote products derived from this software
     19 *    without specific prior written permission.
     20 *
     21 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
     22 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     24 * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
     25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     31 * SUCH DAMAGE.
     32 *
     33 *      @(#)un.h        8.3 (Berkeley) 2/19/95
     34 * $FreeBSD: src/sys/sys/un.h,v 1.25 2002/08/21 16:20:01 mike Exp $
     35 *
     36 * @@level      FreeBSD 5.1
     37 * @@changed    bird: TCPV40HDRS and hid LOCAL_PEERCRED.
    438 */
    539
     
    741#define _SYS_UN_H_
    842
    9 /** Definitions for UNIX IPC domain. */
    10 struct  sockaddr_un {
    11 #ifdef TCPV40HDRS
    12         u_short sun_family;     /* socket family: AF_UNIX */
     43#include <sys/cdefs.h>
     44#include <sys/_types.h>
     45
     46#ifndef _SA_FAMILY_T_DECLARED
     47typedef __sa_family_t   sa_family_t;
     48#define _SA_FAMILY_T_DECLARED
     49#endif
     50
     51/*
     52 * Definitions for UNIX IPC domain.
     53 */
     54struct sockaddr_un {
     55#ifdef TCPV40HDRS                       /* bird: old tcpip header mode */
     56        u_short sun_family;             /* socket family: AF_UNIX */
    1357#else
    14         u_char  sun_len;        /* sockaddr len including null */
    15         u_char  sun_family;     /* AF_UNIX */
     58        unsigned char   sun_len;        /* sockaddr len including null */
     59        sa_family_t     sun_family;     /* AF_UNIX */
    1660#endif
    17         char    sun_path[108];  /* path name (not used) */
     61        char    sun_path[104];          /* path name (gag) */
    1862};
    1963
    20 #ifndef TCPV40HDRS
    21 /* actual length of an initialized sockaddr_un */
    22 #define SUN_LEN(su) (sizeof(*(su)) - sizeof((su)->sun_path) + strlen((su)->sun_path))
     64#if __BSD_VISIBLE
     65
     66#if 0                                   /* bird: don't expose unsupported stuff. */
     67/* Socket options. */
     68#define LOCAL_PEERCRED          0x001           /* retrieve peer credentails */
    2369#endif
    2470
     71#ifdef _KERNEL
     72struct mbuf;
     73struct socket;
     74struct sockopt;
     75
     76int     uipc_ctloutput(struct socket *so, struct sockopt *sopt);
     77int     uipc_usrreq(struct socket *so, int req, struct mbuf *m,
     78                struct mbuf *nam, struct mbuf *control);
     79int     unp_connect2(struct socket *so, struct socket *so2);
     80void    unp_dispose(struct mbuf *m);
     81int     unp_externalize(struct mbuf *mbuf, struct mbuf **controlp);
     82void    unp_init(void);
     83extern  struct pr_usrreqs uipc_usrreqs;
     84
     85#else /* !_KERNEL */
     86
     87/* actual length of an initialized sockaddr_un */
     88#define SUN_LEN(su) \
     89        (sizeof(*(su)) - sizeof((su)->sun_path) + strlen((su)->sun_path))
     90
     91#endif /* _KERNEL */
     92
     93#endif /* __BSD_VISIBLE */
     94
    2595#endif /* !_SYS_UN_H_ */
Note: See TracChangeset for help on using the changeset viewer.