7089790: integrate bsd-port changes

Co-authored-by: Greg Lewis <glewis@eyesbeyond.com>
Co-authored-by: Jung-uk Kim <jkim@freebsd.org>
Co-authored-by: Christos Zoulas <christos@zoulas.com>
Co-authored-by: Landon Fuller <landonf@plausible.coop>
Co-authored-by: The FreeBSD Foundation <board@freebsdfoundation.org>
Co-authored-by: Michael Franz <mvfranz@gmail.com>
Co-authored-by: Roger Hoover <rhoover@apple.com>
Co-authored-by: Alexander Strange <astrange@apple.com>
Reviewed-by: kvn, twisti, jrose
This commit is contained in:
Kurt Miller 2011-09-25 16:03:29 -07:00 committed by Tom Rodriguez
parent 52f0eccb24
commit 95c56a472b
291 changed files with 26162 additions and 145 deletions

View file

@ -76,15 +76,28 @@
# include <sys/procfs.h>
# endif
#ifdef LINUX
#if defined(LINUX) || defined(_ALLBSD_SOURCE)
#ifndef __STDC_LIMIT_MACROS
#define __STDC_LIMIT_MACROS
#endif // __STDC_LIMIT_MACROS
#include <inttypes.h>
#include <signal.h>
#ifndef __OpenBSD__
#include <ucontext.h>
#endif
#ifdef __APPLE__
#include <AvailabilityMacros.h>
#if (MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_4)
// Mac OS X 10.4 defines EFL_AC and EFL_ID,
// which conflict with hotspot variable names.
//
// This has been fixed in Mac OS X 10.5.
#undef EFL_AC
#undef EFL_ID
#endif
#endif
#include <sys/time.h>
#endif // LINUX
#endif // LINUX || _ALLBSD_SOURCE
// 4810578: varargs unsafe on 32-bit integer/64-bit pointer architectures
// When __cplusplus is defined, NULL is defined as 0 (32-bit constant) in
@ -120,7 +133,7 @@
// pointer is stored as integer value. On some platforms, sizeof(intptr_t) >
// sizeof(void*), so here we want something which is integer type, but has the
// same size as a pointer.
#ifdef LINUX
#ifdef __GNUC__
#ifdef _LP64
#define NULL_WORD 0L
#else
@ -132,7 +145,7 @@
#define NULL_WORD NULL
#endif
#ifndef LINUX
#if !defined(LINUX) && !defined(_ALLBSD_SOURCE)
// Compiler-specific primitive types
typedef unsigned short uint16_t;
#ifndef _UINT32_T
@ -152,7 +165,7 @@ typedef unsigned int uintptr_t;
// prior definition of intptr_t, and add "&& !defined(XXX)" above.
#endif // _SYS_INT_TYPES_H
#endif // !LINUX
#endif // !LINUX && !_ALLBSD_SOURCE
// Additional Java basic types
@ -244,7 +257,9 @@ inline int g_isnan(float f) { return isnanf(f); }
inline int g_isnan(float f) { return isnand(f); }
#endif
inline int g_isnan(double f) { return isnand(f); }
#elif LINUX
#elif defined(__APPLE__)
inline int g_isnan(double f) { return isnan(f); }
#elif defined(LINUX) || defined(_ALLBSD_SOURCE)
inline int g_isnan(float f) { return isnanf(f); }
inline int g_isnan(double f) { return isnan(f); }
#else