VirtualBox

Ignore:
Timestamp:
Feb 4, 2007 12:25:57 PM (18 years ago)
Author:
vboxsync
Message:

Make it build and run on Mac OS X.

Location:
trunk/src/libs/xpcom18a4/nsprpub/pr/include/md
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/libs/xpcom18a4/nsprpub/pr/include/md/_darwin.cfg

    r1 r589  
    4242#define XP_UNIX
    4343#endif
     44
     45#ifndef DARWIN      /*bird*/
     46#define DARWIN      /*bird*/
     47#endif              /*bird*/
    4448
    4549#define PR_AF_INET6 30  /* same as AF_INET6 */
  • trunk/src/libs/xpcom18a4/nsprpub/pr/include/md/_darwin.h

    r1 r589  
    4343#include <sys/syscall.h>
    4444
     45#ifdef XP_MACOSX
     46#include <AvailabilityMacros.h>
     47#endif
     48
    4549#define PR_LINKER_ARCH  "darwin"
    4650#define _PR_SI_SYSNAME  "DARWIN"
    47 #ifdef i386
     51#ifdef __i386__
    4852#define _PR_SI_ARCHITECTURE "x86"
    49 #else
     53#elif defined(__ppc__)
    5054#define _PR_SI_ARCHITECTURE "ppc"
    5155#endif
     
    6266#define _PR_HAVE_SOCKADDR_LEN 
    6367#define _PR_STAT_HAS_ST_ATIMESPEC
    64 #define _PR_NO_LARGE_FILES
     68#define _PR_HAVE_LARGE_OFF_T
    6569#define PR_HAVE_SYSV_NAMED_SHARED_MEMORY
    6670
     
    7882 */
    7983#define _PR_GHBA_DISALLOW_V4MAPPED
     84#ifdef XP_MACOSX
     85#if !defined(MAC_OS_X_VERSION_10_3) || \
     86    MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_3
    8087/*
    8188 * socket(AF_INET6) fails with EPROTONOSUPPORT on Mac OS X 10.1.
    8289 * IPv6 under OS X 10.2 and below is not complete (see bug 222031).
    8390 */
    84 #if MACOS_DEPLOYMENT_TARGET < 100300
    8591#define _PR_INET6_PROBE
    86 #endif
     92#endif /* DT < 10.3 */
     93#if defined(MAC_OS_X_VERSION_10_2) && \
     94    MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_2
    8795/* Mac OS X 10.2 has inet_ntop and inet_pton. */
    88 #if MACOS_DEPLOYMENT_TARGET >= 100200
    8996#define _PR_HAVE_INET_NTOP
     97#endif /* DT >= 10.2 */
     98#endif /* XP_MACOSX */
     99#define _PR_IPV6_V6ONLY_PROBE
     100/* The IPV6_V6ONLY socket option is not defined on Mac OS X 10.1. */
     101#ifndef IPV6_V6ONLY
     102#define IPV6_V6ONLY 27
    90103#endif
    91104
     
    101114extern PRInt32 _PR_DarwinPPC_AtomicAdd(PRInt32 *ptr, PRInt32 val);
    102115#define _MD_ATOMIC_ADD(ptr, val)    _PR_DarwinPPC_AtomicAdd(ptr, val)
    103 #endif /* __ppc__ */
     116#elif defined(__i386__)
     117#define _PR_HAVE_ATOMIC_OPS
     118#define _MD_INIT_ATOMIC()
     119extern PRInt32 _PR_Darwin_x86_AtomicIncrement(PRInt32 *val);
     120#define _MD_ATOMIC_INCREMENT(val)   _PR_Darwin_x86_AtomicIncrement(val)
     121extern PRInt32 _PR_Darwin_x86_AtomicDecrement(PRInt32 *val);
     122#define _MD_ATOMIC_DECREMENT(val)   _PR_Darwin_x86_AtomicDecrement(val)
     123extern PRInt32 _PR_Darwin_x86_AtomicSet(PRInt32 *val, PRInt32 newval);
     124#define _MD_ATOMIC_SET(val, newval) _PR_Darwin_x86_AtomicSet(val, newval)
     125extern PRInt32 _PR_Darwin_x86_AtomicAdd(PRInt32 *ptr, PRInt32 val);
     126#define _MD_ATOMIC_ADD(ptr, val)    _PR_Darwin_x86_AtomicAdd(ptr, val)
     127#endif /* __i386__ */
    104128
    105129#define USE_SETJMP
  • trunk/src/libs/xpcom18a4/nsprpub/pr/include/md/_vbox.cfg

    r1 r589  
    2121 *
    2222 * Contributor(s):
     23 *  InnoTek
    2324 *
    2425 * Alternatively, the contents of this file may be used under the terms of
     
    3940#define nspr_vboxcfg___
    4041
    41 #ifndef __L4_XPCOM__
    42 # include <_linuxcfg.h>
     42#ifdef __DARWIN__
     43# include <md/_darwin.cfg>
     44#elif defined(__FREEBSD__)
     45# include <md/_freebsd.cfg>
     46#elif defined(__L4__)
     47# include <md/_l4v2.cfg>
     48#elif defined(__LINUX__)
     49# include <md/_linux.cfg>
     50#elif defined(__NETBSD__)
     51# include <md/_netbsd.cfg>
     52#elif defined(__OPENBSD__)
     53# include <md/_openbsd.cfg>
     54#elif defined(__SOLARIS__)
     55# include <md/_solaris.cfg>
    4356#else
    44 # include <_l4v2cfg.h>
     57# error "Define the correct platform identifier / Port me."
    4558#endif
    4659
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