• Skip to content
  • Skip to link menu
KDE 4.1 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

WTF

Platform.h

Go to the documentation of this file.
00001 /* -*- mode: c++; c-basic-offset: 4 -*- */
00002 /*
00003  * Copyright (C) 2006 Apple Computer, Inc.  All rights reserved.
00004  *
00005  * Redistribution and use in source and binary forms, with or without
00006  * modification, are permitted provided that the following conditions
00007  * are met:
00008  * 1. Redistributions of source code must retain the above copyright
00009  *    notice, this list of conditions and the following disclaimer.
00010  * 2. Redistributions in binary form must reproduce the above copyright
00011  *    notice, this list of conditions and the following disclaimer in the
00012  *    documentation and/or other materials provided with the distribution.
00013  *
00014  * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
00015  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00016  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
00017  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
00018  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
00019  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
00020  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
00021  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
00022  * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
00023  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00024  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
00025  */
00026 
00027 #ifndef WTF_Platform_h
00028 #define WTF_Platform_h
00029 
00030 /* Force KDE build here in our tree... */
00031 #ifndef BUILDING_KDE__
00032 #define BUILDING_KDE__ 1
00033 #endif
00034 
00035 /* PLATFORM handles OS, operating environment, graphics API, and CPU */
00036 #define PLATFORM(WTF_FEATURE) (defined( WTF_PLATFORM_##WTF_FEATURE ) && WTF_PLATFORM_##WTF_FEATURE)
00037 #define COMPILER(WTF_FEATURE) (defined( WTF_COMPILER_##WTF_FEATURE ) && WTF_COMPILER_##WTF_FEATURE)
00038 #define HAVE(WTF_FEATURE) (defined( HAVE_##WTF_FEATURE ) && HAVE_##WTF_FEATURE)
00039 #define USE(WTF_FEATURE) (defined( WTF_USE_##WTF_FEATURE ) && WTF_USE_##WTF_FEATURE)
00040 #define ENABLE(WTF_FEATURE) (defined( ENABLE_##WTF_FEATURE ) && ENABLE_##WTF_FEATURE)
00041 
00042 /* Operating systems - low-level dependencies */
00043 
00044 /* PLATFORM(DARWIN) */
00045 /* Operating system level dependencies for Mac OS X / Darwin that should */
00046 /* be used regardless of operating environment */
00047 #ifdef __APPLE__
00048 #define WTF_PLATFORM_DARWIN 1
00049 #endif
00050 
00051 /* PLATFORM(WIN_OS) */
00052 /* Operating system level dependencies for Windows that should be used */
00053 /* regardless of operating environment */
00054 #if defined(WIN32) || defined(_WIN32)
00055 #define WTF_PLATFORM_WIN_OS 1
00056 #endif
00057 
00058 /* PLATFORM(UNIX) */
00059 /* Operating system level dependencies for Unix-like systems that */
00060 /* should be used regardless of operating environment */
00061 /* (includes PLATFORM(DARWIN)) */
00062 #if   defined(__APPLE__)   \
00063    || defined(unix)        \
00064    || defined(__unix)      \
00065    || defined(__unix__)    \
00066    || defined (__NetBSD__) \
00067    || defined(_AIX)
00068 #define WTF_PLATFORM_UNIX 1
00069 #endif
00070 
00071 /* PLATFORM(SOLARIS_OS) */
00072 /* Operating system level dependencies for Sun (Open)Solaris 10. */
00073 /* Studio 12 on Solaris defines __SunOS; gcc defines __sun__; */
00074 /* Both compilers define __sun and sun. */
00075 #if defined(__sun) || defined(sun)
00076 #define WTF_PLATFORM_SOLARIS_OS 1
00077 #endif
00078 
00079 /* Operating environments */
00080 
00081 /* I made the BUILDING_KDE__ macro up for the KDE build system to define */
00082 
00083 /* PLATFORM(KDE) */
00084 /* PLATFORM(MAC) */
00085 /* PLATFORM(WIN) */
00086 #if BUILDING_KDE__
00087 #define WTF_PLATFORM_KDE 1
00088 #elif PLATFORM(DARWIN)
00089 #define WTF_PLATFORM_MAC 1
00090 #elif PLATFORM(WIN_OS)
00091 #define WTF_PLATFORM_WIN 1
00092 #endif
00093 #if defined(BUILDING_GDK__)
00094 #define WTF_PLATFORM_GDK 1
00095 #endif
00096 
00097 
00098 /* CPU */
00099 
00100 /* PLATFORM(PPC) */
00101 #if   defined(__ppc__)     \
00102    || defined(__PPC__)     \
00103    || defined(__powerpc__) \
00104    || defined(__powerpc)   \
00105    || defined(__POWERPC__) \
00106    || defined(_M_PPC)      \
00107    || defined(__PPC)
00108 #define WTF_PLATFORM_PPC 1
00109 #define WTF_PLATFORM_BIG_ENDIAN 1
00110 #endif
00111 
00112 /* PLATFORM(PPC64) */
00113 #if   defined(__ppc64__) \
00114    || defined(__PPC64__)
00115 #define WTF_PLATFORM_PPC64 1
00116 #define WTF_PLATFORM_BIG_ENDIAN 1
00117 #endif
00118 
00119 #if defined(arm)
00120 #define WTF_PLATFORM_ARM 1
00121 #if defined(__ARMEB__)
00122 #define WTF_PLATFORM_BIG_ENDIAN 1
00123 #elif !defined(__ARM_EABI__) && !defined(__ARMEB__)
00124 #define WTF_PLATFORM_MIDDLE_ENDIAN 1
00125 #endif
00126 #if !defined(__ARM_EABI__)
00127 #define WTF_PLATFORM_FORCE_PACK 1
00128 #endif
00129 #endif
00130 
00131 /* PLATFORM(X86) */
00132 #if   defined(__i386__) \
00133    || defined(i386)     \
00134    || defined(_M_IX86)  \
00135    || defined(_X86_)    \
00136    || defined(__THW_INTEL)
00137 #define WTF_PLATFORM_X86 1
00138 #endif
00139 
00140 /* PLATFORM(X86_64) */
00141 #if   defined(__x86_64__) \
00142    || defined(__ia64__)
00143 #define WTF_PLATFORM_X86_64 1
00144 #endif
00145 
00146 /* PLATFORM(SPARC) */
00147 #if defined(sparc)
00148 #define WTF_PLATFORM_SPARC 1
00149 #endif
00150 
00151 /* Compiler */
00152 
00153 /* COMPILER(CWP) */
00154 #if defined(__MWERKS__)
00155 #define WTF_COMPILER_CWP 1
00156 #endif
00157 
00158 /* COMPILER(MSVC) */
00159 #if defined(_MSC_VER)
00160 #define WTF_COMPILER_MSVC 1
00161 #endif
00162 
00163 /* COMPILER(GCC) */
00164 #if defined(__GNUC__)
00165 #define WTF_COMPILER_GCC 1
00166 #endif
00167 
00168 /* COMPILER(SUNPRO) */
00169 #if defined(__SUNPRO_CC)
00170 #define WTF_COMPILER_SUNPRO 1
00171 #endif
00172 
00173 /* COMPILER(BORLAND) */
00174 /* not really fully supported - is this relevant any more? */
00175 #if defined(__BORLANDC__)
00176 #define WTF_COMPILER_BORLAND 1
00177 #endif
00178 
00179 /* COMPILER(CYGWIN) */
00180 /* not really fully supported - is this relevant any more? */
00181 #if defined(__CYGWIN__)
00182 #define WTF_COMPILER_CYGWIN 1
00183 #endif
00184 
00185 /* multiple threads only supported on Mac for now */
00186 #if PLATFORM(MAC)
00187 #ifndef WTF_USE_MULTIPLE_THREADS
00188 #define WTF_USE_MULTIPLE_THREADS 1
00189 #endif
00190 #ifndef WTF_USE_BINDINGS
00191 #define WTF_USE_BINDINGS 1
00192 #endif
00193 #endif
00194 
00195 /* for Unicode, KDE uses Qt, everything else uses ICU */
00196 #if PLATFORM(KDE) || PLATFORM(QT)
00197 #define WTF_USE_QT4_UNICODE 1
00198 #elif PLATFORM(SYMBIAN)
00199 #define WTF_USE_SYMBIAN_UNICODE 1
00200 #else
00201 #define WTF_USE_ICU_UNICODE 1
00202 #endif
00203 
00204 #if PLATFORM(MAC)
00205 #define WTF_PLATFORM_CF 1
00206 #endif
00207 
00208 #if PLATFORM(WIN)
00209 #define WTF_USE_WININET 1
00210 #endif
00211 
00212 #if PLATFORM(GDK)
00213 #define WTF_USE_CURL 1
00214 #endif
00215 
00216 /* ENABLE macro defaults */
00217 
00218 #endif /* WTF_Platform_h */

WTF

Skip menu "WTF"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • KIO
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal