• Skip to content
  • Skip to link menu
KDE 4.3 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(S390X) - S390 64-bit */                                                                                  
00101 #if defined(__s390x__)                                                                                          
00102 #define WTF_PLATFORM_S390X 1                                                                                         
00103 #define WTF_PLATFORM_BIG_ENDIAN 1                                                                                    
00104 #endif                                                                                                          
00105                                                                                                                 
00106 /* PLATFORM(S390) - S390 32-bit */                                                                                   
00107 #if defined(__s390__)                                                                                           
00108 #define WTF_PLATFORM_S390 1                                                                                          
00109 #define WTF_PLATFORM_BIG_ENDIAN 1                                                                                    
00110 #endif                                                                                                          
00111 
00112 /* PLATFORM(PPC) */
00113 #if   defined(__ppc__)     \
00114    || defined(__PPC__)     \
00115    || defined(__powerpc__) \
00116    || defined(__powerpc)   \
00117    || defined(__POWERPC__) \
00118    || defined(_M_PPC)      \
00119    || defined(__PPC)
00120 #define WTF_PLATFORM_PPC 1
00121 #define WTF_PLATFORM_BIG_ENDIAN 1
00122 #endif
00123 
00124 /* PLATFORM(PPC64) */
00125 #if   defined(__ppc64__) \
00126    || defined(__PPC64__)
00127 #define WTF_PLATFORM_PPC64 1
00128 #define WTF_PLATFORM_BIG_ENDIAN 1
00129 #endif
00130 
00131 #if defined(arm)
00132 #define WTF_PLATFORM_ARM 1
00133 #if defined(__ARMEB__)
00134 #define WTF_PLATFORM_BIG_ENDIAN 1
00135 #elif !defined(__ARM_EABI__) && !defined(__ARMEB__)
00136 #define WTF_PLATFORM_MIDDLE_ENDIAN 1
00137 #endif
00138 #if !defined(__ARM_EABI__)
00139 #define WTF_PLATFORM_FORCE_PACK 1
00140 #endif
00141 #endif
00142 
00143 /* PLATFORM(X86) */
00144 #if   defined(__i386__) \
00145    || defined(i386)     \
00146    || defined(_M_IX86)  \
00147    || defined(_X86_)    \
00148    || defined(__THW_INTEL)
00149 #define WTF_PLATFORM_X86 1
00150 #endif
00151 
00152 /* PLATFORM(X86_64) */
00153 #if   defined(__x86_64__) \
00154    || defined(__ia64__)
00155 #define WTF_PLATFORM_X86_64 1
00156 #endif
00157 
00158 /* PLATFORM(SPARC) */
00159 #if defined(sparc)
00160 #define WTF_PLATFORM_SPARC 1
00161 #endif
00162 
00163 /* Compiler */
00164 
00165 /* COMPILER(CWP) */
00166 #if defined(__MWERKS__)
00167 #define WTF_COMPILER_CWP 1
00168 #endif
00169 
00170 /* COMPILER(MSVC) */
00171 #if defined(_MSC_VER)
00172 #define WTF_COMPILER_MSVC 1
00173 #endif
00174 
00175 /* COMPILER(GCC) */
00176 #if defined(__GNUC__)
00177 #define WTF_COMPILER_GCC 1
00178 #endif
00179 
00180 /* COMPILER(SUNPRO) */
00181 #if defined(__SUNPRO_CC)
00182 #define WTF_COMPILER_SUNPRO 1
00183 #endif
00184 
00185 /* COMPILER(BORLAND) */
00186 /* not really fully supported - is this relevant any more? */
00187 #if defined(__BORLANDC__)
00188 #define WTF_COMPILER_BORLAND 1
00189 #endif
00190 
00191 /* COMPILER(CYGWIN) */
00192 /* not really fully supported - is this relevant any more? */
00193 #if defined(__CYGWIN__)
00194 #define WTF_COMPILER_CYGWIN 1
00195 #endif
00196 
00197 /* multiple threads only supported on Mac for now */
00198 #if PLATFORM(MAC)
00199 #ifndef WTF_USE_MULTIPLE_THREADS
00200 #define WTF_USE_MULTIPLE_THREADS 1
00201 #endif
00202 #ifndef WTF_USE_BINDINGS
00203 #define WTF_USE_BINDINGS 1
00204 #endif
00205 #endif
00206 
00207 /* for Unicode, KDE uses Qt, everything else uses ICU */
00208 #if PLATFORM(KDE) || PLATFORM(QT)
00209 #define WTF_USE_QT4_UNICODE 1
00210 #elif PLATFORM(SYMBIAN)
00211 #define WTF_USE_SYMBIAN_UNICODE 1
00212 #else
00213 #define WTF_USE_ICU_UNICODE 1
00214 #endif
00215 
00216 #if PLATFORM(MAC)
00217 #define WTF_PLATFORM_CF 1
00218 #endif
00219 
00220 #if PLATFORM(WIN)
00221 #define WTF_USE_WININET 1
00222 #endif
00223 
00224 #if PLATFORM(GDK)
00225 #define WTF_USE_CURL 1
00226 #endif
00227 
00228 /* ENABLE macro defaults */
00229 
00230 #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
  • KPty
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.6.1
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