VirtualBox

Changeset 23525 in vbox for trunk/include/iprt


Ignore:
Timestamp:
Oct 3, 2009 5:50:45 PM (15 years ago)
Author:
vboxsync
Message:

Runtime/FreeBSD: Don't use R3 headers in the kernel driver

Location:
trunk/include/iprt
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/alloca.h

    r11403 r23525  
    3939 */
    4040#if defined(IN_RING0) \
    41  && (defined(RT_OS_DARWIN) || defined(RT_OS_LINUX) || defined(RT_OS_SOLARIS))
     41 && (defined(RT_OS_DARWIN) || defined(RT_OS_LINUX) || defined(RT_OS_SOLARIS) || defined(RT_OS_FREEBSD))
    4242/* ASSUMES GNU C */
    4343# define alloca(cb) __builtin_alloca(cb)
  • trunk/include/iprt/stdarg.h

    r8245 r23525  
    3131#define ___iprt_stdarg_h
    3232
    33 #ifndef IPRT_NO_CRT
     33#if    !defined(IPRT_NO_CRT) \
     34    && !(defined(RT_OS_FREEBSD) && defined(_KERNEL))
     35
    3436# include <stdarg.h>
     37#elif defined(RT_OS_FREEBSD) && defined(_KERNEL)
     38# include <machine/stdarg.h>
    3539#else
    3640# include <iprt/types.h>
  • trunk/include/iprt/stdint.h

    r22655 r23525  
    3838 */
    3939#if !(defined(RT_OS_LINUX) && defined(__KERNEL__))  \
     40  && !(defined(RT_OS_FREEBSD) && defined(_KERNEL)) \
    4041  && !defined(_MSC_VER) \
    4142  && !defined(__IBMC__) \
     
    6566#  define UINT32_C(Value)   (Value ## U)
    6667# endif /* 64-bit darwin kludge. */
     68
     69#elif defined(RT_OS_FREEBSD) && defined(_KERNEL) \
     70
     71# ifndef __STDC_CONSTANT_MACROS
     72#  define __STDC_CONSTANT_MACROS
     73# endif
     74# ifndef __STDC_LIMIT_MACROS
     75#  define __STDC_LIMIT_MACROS
     76# endif
     77# include <sys/stdint.h>
    6778
    6879#else /* No system stdint.h */
  • trunk/include/iprt/string.h

    r23507 r23525  
    3838# include <linux/string.h>
    3939#elif defined(RT_OS_FREEBSD) && defined(_KERNEL)
    40   /*
    41    * Kludge for the FreeBSD kernel:
    42    *  Some of the string.h stuff clashes with sys/libkern.h, so just wrap
    43    *  it up while including string.h to keep things quiet. It's nothing
    44    *  important that's clashing, after all.
    45    */
    46 # define strdup strdup_string_h
    47 # include <string.h>
    48 # undef strdup
     40# include <sys/libkern.h>
    4941#elif defined(RT_OS_SOLARIS) && defined(_KERNEL)
    5042  /*
     
    6557 * IPRT instead of the operating environment.
    6658 */
    67 #if defined(RT_OS_DARWIN) && defined(KERNEL)
     59#if    (defined(RT_OS_DARWIN) && defined(KERNEL)) \
     60    || (defined(RT_OS_FREEBSD) && defined(_KERNEL))
    6861RT_C_DECLS_BEGIN
    6962void *memchr(const void *pv, int ch, size_t cb);
  • trunk/include/iprt/types.h

    r23481 r23525  
    5959#   undef offsetof
    6060#  endif
    61 #  include <stddef.h>
     61#  include <sys/stddef.h>
    6262#  ifndef _SYS_TYPES_H_
    6363#   undef offsetof
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette