Changeset 7d017b5 in rtems-libbsd


Ignore:
Timestamp:
Sep 11, 2012, 9:05:36 PM (9 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.11, 5, 5-freebsd-12, 6-freebsd-12, freebsd-9.3, master
Children:
ea3f3a3
Parents:
c6a5ede
Message:

local/port_before.h: Make more like FreeBSD version

File:
1 edited

Legend:

Unmodified
Added
Removed
  • freebsd-userspace/local/port_before.h

    rc6a5ede r7d017b5  
    33#include <freebsd/sys/_types.h>
    44
     5/*********************************************************************
     6 *  These are also defined in the FreeBSD version of this file.
     7 *********************************************************************/
     8
     9#define _LIBC      1
    510/*
    6  * Some of the code needs to know it is being built inside libc.
     11 * This is defined in the FreeBSD source but we have no code yet which
     12 * relies upon it.
    713 */
    8 #define _LIBC 1
    9 
    10 /*
    11  *  lib/libc/resolv/res_send.c needs this defined.
    12  */
     14/* #define DO_PTHREADS     1 */
    1315#define USE_KQUEUE 1
    1416
    15 /*
    16  *  lib/libc/resolv/res_send.c also needs this defined.
    17  */
    1817#define ISC_SOCKLEN_T   socklen_t
     18#define ISC_FORMAT_PRINTF(fmt, args) \
     19        __attribute__((__format__(__printf__, fmt, args)))
     20#define DE_CONST(konst, var) \
     21        do { \
     22                union { const void *k; void *v; } _u; \
     23                _u.k = konst; \
     24                var = _u.v; \
     25        } while (0)
    1926
    20 /*
    21 #ifndef _bsd_off_t
    22 #define _bsd_off_t off_t
    23 #endif
    24 */
     27#define UNUSED(x) (x) = (x)
    2528
     29
     30/*********************************************************************
     31 *  FROM HERE DOWN, THESE ARE NOT IN THE FreeBSD VERSION!!!
     32 *********************************************************************/
    2633#ifndef __ssize_t
    2734#define __ssize_t ssize_t
    2835#endif
    2936
    30 /*
    31  * lib/libc/net/getservent.c needs _ALIGNBYTES and there seems to be no
    32  * clean way to get it from the FreeBSD kernel code.
    33  *
    34  * Duplicated from freebsd/sys/param.h
    35  */
    36 #ifndef _ALIGNBYTES
    37 #define _ALIGNBYTES     (sizeof(long) - 1)
    38 #endif
    39 
     37#include <freebsd/machine/_align.h>
Note: See TracChangeset for help on using the changeset viewer.