Index: Source/wtf/CPU.h |
diff --git a/Source/wtf/Platform.h b/Source/wtf/CPU.h |
similarity index 61% |
copy from Source/wtf/Platform.h |
copy to Source/wtf/CPU.h |
index f7f2c8fb8fc36f6306b2be774a9dc8c5fd55be86..817c3f9e5345cf7276922ed1c89b924e26f0fe57 100644 |
--- a/Source/wtf/Platform.h |
+++ b/Source/wtf/CPU.h |
@@ -2,6 +2,7 @@ |
* Copyright (C) 2006, 2007, 2008, 2009, 2013 Apple Inc. All rights reserved. |
* Copyright (C) 2007-2009 Torch Mobile, Inc. |
* Copyright (C) 2010, 2011 Research In Motion Limited. All rights reserved. |
+ * Copyright (C) 2013, Samsung Electronics. All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
@@ -25,30 +26,13 @@ |
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
-#ifndef WTF_Platform_h |
-#define WTF_Platform_h |
+#ifndef WTF_CPU_h |
+#define WTF_CPU_h |
-/* Include compiler specific macros */ |
#include <wtf/Compiler.h> |
-/* ==== Platform adaptation macros: these describe properties of the target environment. ==== */ |
- |
/* CPU() - the target CPU architecture */ |
#define CPU(WTF_FEATURE) (defined WTF_CPU_##WTF_FEATURE && WTF_CPU_##WTF_FEATURE) |
-/* HAVE() - specific system features (headers, functions or similar) that are present or not */ |
-#define HAVE(WTF_FEATURE) (defined HAVE_##WTF_FEATURE && HAVE_##WTF_FEATURE) |
-/* OS() - underlying operating system; only to be used for mandated low-level services like |
- virtual memory, not to choose a GUI toolkit */ |
-#define OS(WTF_FEATURE) (defined WTF_OS_##WTF_FEATURE && WTF_OS_##WTF_FEATURE) |
- |
- |
-/* ==== Policy decision macros: these define policy choices for a particular port. ==== */ |
- |
-/* USE() - use a particular third-party library or optional OS service */ |
-#define USE(WTF_FEATURE) (defined WTF_USE_##WTF_FEATURE && WTF_USE_##WTF_FEATURE) |
-/* ENABLE() - turn on a specific feature of WebKit */ |
-#define ENABLE(WTF_FEATURE) (defined ENABLE_##WTF_FEATURE && ENABLE_##WTF_FEATURE) |
- |
/* ==== CPU() - the target CPU architecture ==== */ |
@@ -267,163 +251,4 @@ |
#endif /* ARM */ |
-/* ==== OS() - underlying operating system; only to be used for mandated low-level services like |
- virtual memory, not to choose a GUI toolkit ==== */ |
- |
-/* OS(ANDROID) - Android */ |
-#ifdef ANDROID |
-#define WTF_OS_ANDROID 1 |
-#endif |
- |
-/* OS(AIX) - AIX */ |
-#ifdef _AIX |
-#define WTF_OS_AIX 1 |
-#endif |
- |
-/* OS(DARWIN) - Any Darwin-based OS, including Mac OS X and iPhone OS */ |
-#ifdef __APPLE__ |
-#define WTF_OS_DARWIN 1 |
- |
-#include <Availability.h> |
-#include <AvailabilityMacros.h> |
-#include <TargetConditionals.h> |
-#endif |
- |
-/* OS(FREEBSD) - FreeBSD */ |
-#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__FreeBSD_kernel__) |
-#define WTF_OS_FREEBSD 1 |
-#endif |
- |
-/* OS(HURD) - GNU/Hurd */ |
-#ifdef __GNU__ |
-#define WTF_OS_HURD 1 |
-#endif |
- |
-/* OS(LINUX) - Linux */ |
-#ifdef __linux__ |
-#define WTF_OS_LINUX 1 |
-#endif |
- |
-/* OS(NETBSD) - NetBSD */ |
-#if defined(__NetBSD__) |
-#define WTF_OS_NETBSD 1 |
-#endif |
- |
-/* OS(OPENBSD) - OpenBSD */ |
-#ifdef __OpenBSD__ |
-#define WTF_OS_OPENBSD 1 |
-#endif |
- |
-/* OS(SOLARIS) - Solaris */ |
-#if defined(sun) || defined(__sun) |
-#define WTF_OS_SOLARIS 1 |
-#endif |
- |
-/* OS(WINDOWS) - Any version of Windows */ |
-#if defined(WIN32) || defined(_WIN32) |
-#define WTF_OS_WINDOWS 1 |
-#endif |
- |
-/* OS(UNIX) - Any Unix-like system */ |
-#if OS(AIX) \ |
- || OS(ANDROID) \ |
- || OS(DARWIN) \ |
- || OS(FREEBSD) \ |
- || OS(HURD) \ |
- || OS(LINUX) \ |
- || OS(NETBSD) \ |
- || OS(OPENBSD) \ |
- || OS(SOLARIS) \ |
- || defined(unix) \ |
- || defined(__unix) \ |
- || defined(__unix__) |
-#define WTF_OS_UNIX 1 |
-#endif |
- |
-/* Operating environments */ |
- |
-#if OS(ANDROID) |
-#define WTF_USE_LOW_QUALITY_IMAGE_INTERPOLATION 1 |
-#define WTF_USE_LOW_QUALITY_IMAGE_NO_JPEG_DITHERING 1 |
-#define WTF_USE_LOW_QUALITY_IMAGE_NO_JPEG_FANCY_UPSAMPLING 1 |
-#else |
-#define WTF_USE_ICCJPEG 1 |
-#define WTF_USE_QCMSLIB 1 |
-#endif |
- |
-#if OS(DARWIN) |
-#define WTF_USE_CF 1 |
- |
-/* We can't override the global operator new and delete on OS(DARWIN) because |
- * some object are allocated by WebKit and deallocated by the embedder. */ |
-#else /* !OS(DARWIN) */ |
-/* On non-OS(DARWIN), the "system malloc" is actually TCMalloc anyway, so there's |
- * no need to use WebKit's copy of TCMalloc. */ |
-#define WTF_USE_SYSTEM_MALLOC 1 |
-#endif /* OS(DARWIN) */ |
- |
-#if OS(DARWIN) |
-#define ENABLE_PURGEABLE_MEMORY 1 |
-#endif /* OS(DARWIN) */ |
- |
-#if !defined(HAVE_ACCESSIBILITY) |
-#if !OS(ANDROID) |
-#define HAVE_ACCESSIBILITY 1 |
-#endif |
-#endif /* !defined(HAVE_ACCESSIBILITY) */ |
- |
-#if OS(UNIX) |
-#define HAVE_ERRNO_H 1 |
-#define HAVE_MMAP 1 |
-#define HAVE_SIGNAL_H 1 |
-#define HAVE_STRINGS_H 1 |
-#define HAVE_SYS_TIME_H 1 |
-#define WTF_USE_PTHREADS 1 |
-#endif /* OS(UNIX) */ |
- |
-#if (OS(FREEBSD) || OS(OPENBSD)) && !defined(__GLIBC__) |
-#define HAVE_PTHREAD_NP_H 1 |
-#endif |
- |
-#if !defined(HAVE_VASPRINTF) |
-#if !COMPILER(MSVC) && !COMPILER(MINGW) |
-#define HAVE_VASPRINTF 1 |
-#endif |
-#endif |
- |
-#if !defined(HAVE_STRNSTR) |
-#if OS(DARWIN) || (OS(FREEBSD) && !defined(__GLIBC__)) |
-#define HAVE_STRNSTR 1 |
-#endif |
-#endif |
- |
-#if !OS(WINDOWS) && !OS(SOLARIS) && !OS(ANDROID) |
-#define HAVE_TM_GMTOFF 1 |
-#define HAVE_TM_ZONE 1 |
-#define HAVE_TIMEGM 1 |
-#endif |
- |
-#if OS(DARWIN) |
-#define HAVE_SYS_TIMEB_H 1 |
-#define HAVE_DISPATCH_H 1 |
-#define HAVE_MADV_FREE 1 |
-#define HAVE_PTHREAD_SETNAME_NP 1 |
-#define HAVE_MADV_FREE_REUSE 1 |
-#endif /* OS(DARWIN) */ |
- |
-#if OS(WINDOWS) |
-#define HAVE_SYS_TIMEB_H 1 |
-#define HAVE_ALIGNED_MALLOC 1 |
-#define HAVE_ISDEBUGGERPRESENT 1 |
-#define HAVE_VIRTUALALLOC 1 |
-#endif |
- |
-#if !defined(ENABLE_THREADING_LIBDISPATCH) && HAVE(DISPATCH_H) |
-#define ENABLE_THREADING_LIBDISPATCH 1 |
-#elif !defined(ENABLE_THREADING_OPENMP) && defined(_OPENMP) |
-#define ENABLE_THREADING_OPENMP 1 |
-#elif !defined(THREADING_GENERIC) |
-#define ENABLE_THREADING_GENERIC 1 |
-#endif |
- |
-#endif /* WTF_Platform_h */ |
+#endif /* WTF_CPU_h */ |