Changeset 9e7678d in rtems


Ignore:
Timestamp:
May 9, 2005, 1:12:45 PM (16 years ago)
Author:
Ralf Corsepius <ralf.corsepius@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
a9dd6de
Parents:
a7b4c36
Message:

Partial update from FreeBSD.

Location:
cpukit
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libcsupport/include/sys/cdefs.h

    ra7b4c36 r9e7678d  
    1414 *    notice, this list of conditions and the following disclaimer in the
    1515 *    documentation and/or other materials provided with the distribution.
    16  * 3. All advertising materials mentioning features or use of this software
    17  *    must display the following acknowledgement:
    18  *      This product includes software developed by the University of
    19  *      California, Berkeley and its contributors.
    2016 * 4. Neither the name of the University nor the names of its contributors
    2117 *    may be used to endorse or promote products derived from this software
     
    3531 *
    3632 *      @(#)cdefs.h     8.8 (Berkeley) 1/9/95
     33 * $FreeBSD: src/sys/sys/cdefs.h,v 1.87 2005/03/07 15:40:25 stefanf Exp $
     34 */
     35
     36/*
    3737 * $Id$
    3838 */
    39 
    4039#ifndef _SYS_CDEFS_H_
    4140#define _SYS_CDEFS_H_
     
    4342#if defined(__cplusplus)
    4443#define __BEGIN_DECLS   extern "C" {
    45 #define __END_DECLS     };
     44#define __END_DECLS     }
    4645#else
    4746#define __BEGIN_DECLS
  • cpukit/libnetworking/arpa/inet.h

    ra7b4c36 r9e7678d  
    6363/* External definitions for functions in inet(3), addr2ascii(3) */
    6464
    65 #include <sys/types.h>
    6665#include <sys/cdefs.h>
     66#include <rtems/bsdnet/_types.h>
     67
     68#define INET_ADDRSTRLEN         16
     69#define INET6_ADDRSTRLEN        46
    6770
    6871#ifndef _IN_ADDR_T_DECLARED
     
    7679#endif
    7780
    78 #if 0   /* RTEMS -- Why rename these? */
     81/*
     82 * XXX socklen_t is used by a POSIX.1-2001 interface, but not required by
     83 * POSIX.1-2001.
     84 */
     85#ifndef _SOCKLEN_T_DECLARED
     86typedef __socklen_t     socklen_t;
     87#define _SOCKLEN_T_DECLARED
     88#endif
     89
     90#ifndef _STRUCT_IN_ADDR_DECLARED
     91struct in_addr {
     92        in_addr_t s_addr;
     93};
     94#define _STRUCT_IN_ADDR_DECLARED
     95#endif
     96
     97#if !defined(__rtems__) /* RTEMS -- Why rename these? */
    7998/* XXX all new diversions!! argh!! */
     99#if __BSD_VISIBLE
    80100#define inet_addr       __inet_addr
    81101#define inet_aton       __inet_aton
     
    92112#define inet_nsap_addr  __inet_nsap_addr
    93113#define inet_nsap_ntoa  __inet_nsap_ntoa
    94 #endif
     114#endif /* __BSD_VISIBLE */
     115#endif /* __rtems__ */
    95116
    96117__BEGIN_DECLS
    97 int              ascii2addr __P((int, const char *, void *));
    98 char            *addr2ascii __P((int, const void *, int, char *));
    99 unsigned long    inet_addr __P((const char *));
    100 int              inet_aton __P((const char *, struct in_addr *));
    101 unsigned long    inet_lnaof __P((struct in_addr));
    102 struct in_addr   inet_makeaddr __P((u_long , u_long));
    103 char *           inet_neta __P((u_long, char *, size_t));
    104 unsigned long    inet_netof __P((struct in_addr));
    105 unsigned long    inet_network __P((const char *));
    106 char            *inet_net_ntop __P((int, const void *, int, char *, size_t));
    107 int              inet_net_pton __P((int, const char *, void *, size_t));
    108 char            *inet_ntoa __P((struct in_addr));
    109 int              inet_pton __P((int, const char *, void *));
    110 const char      *inet_ntop __P((int, const void *, char *, size_t));
    111 u_int            inet_nsap_addr __P((const char *, u_char *, int));
    112 char            *inet_nsap_ntoa __P((int, const u_char *, char *));
     118in_addr_t        inet_addr(const char *);
     119char            *inet_ntoa(struct in_addr);
     120const char      *inet_ntop(int, const void * __restrict, char * __restrict,
     121                    socklen_t);
     122int              inet_pton(int, const char * __restrict, void * __restrict);
     123
     124#if __BSD_VISIBLE
     125int              ascii2addr(int, const char *, void *);
     126char            *addr2ascii(int, const void *, int, char *);
     127int              inet_aton(const char *, struct in_addr *);
     128in_addr_t        inet_lnaof(struct in_addr);
     129struct in_addr   inet_makeaddr(in_addr_t, in_addr_t);
     130char *           inet_neta(in_addr_t, char *, size_t);
     131in_addr_t        inet_netof(struct in_addr);
     132in_addr_t        inet_network(const char *);
     133char            *inet_net_ntop(int, const void *, int, char *, size_t);
     134int              inet_net_pton(int, const char *, void *, size_t);
     135unsigned         inet_nsap_addr(const char *, unsigned char *, int);
     136char            *inet_nsap_ntoa(int, const unsigned char *, char *);
     137#endif /* __BSD_VISIBLE */
    113138__END_DECLS
    114139
  • cpukit/libnetworking/netinet/in.h

    ra7b4c36 r9e7678d  
    3838#define _NETINET_IN_H_
    3939
     40#include <rtems/bsdnet/_types.h>
    4041#include <machine/endian.h>
    4142
     
    5556
    5657#ifndef _SA_FAMILY_T_DECLARED
    57 typedef unsigned char           sa_family_t;
     58typedef __sa_family_t           sa_family_t;
    5859#define _SA_FAMILY_T_DECLARED
    5960#endif
  • cpukit/libnetworking/sys/socket.h

    ra7b4c36 r9e7678d  
    3939
    4040#include <sys/cdefs.h>
    41 #include <sys/types.h>
     41#include <rtems/bsdnet/_types.h>
    4242
    4343/*
     
    5050
    5151#ifndef _SA_FAMILY_T_DECLARED
    52 typedef unsigned char           sa_family_t;
     52typedef __sa_family_t   sa_family_t;
    5353#define _SA_FAMILY_T_DECLARED
    5454#endif
    5555
    5656#ifndef _SOCKLEN_T_DECLARED
    57 typedef int     socklen_t;
     57typedef __socklen_t     socklen_t;
    5858#define _SOCKLEN_T_DECLARED
    5959#endif
Note: See TracChangeset for help on using the changeset viewer.