1*565d668cSAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*565d668cSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*565d668cSAndrew Rist * or more contributor license agreements. See the NOTICE file 5*565d668cSAndrew Rist * distributed with this work for additional information 6*565d668cSAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*565d668cSAndrew Rist * to you under the Apache License, Version 2.0 (the 8*565d668cSAndrew Rist * "License"); you may not use this file except in compliance 9*565d668cSAndrew Rist * with the License. You may obtain a copy of the License at 10*565d668cSAndrew Rist * 11*565d668cSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*565d668cSAndrew Rist * 13*565d668cSAndrew Rist * Unless required by applicable law or agreed to in writing, 14*565d668cSAndrew Rist * software distributed under the License is distributed on an 15*565d668cSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*565d668cSAndrew Rist * KIND, either express or implied. See the License for the 17*565d668cSAndrew Rist * specific language governing permissions and limitations 18*565d668cSAndrew Rist * under the License. 19*565d668cSAndrew Rist * 20*565d668cSAndrew Rist *************************************************************/ 21*565d668cSAndrew Rist 22*565d668cSAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir #ifndef _RTL_MACRO_HXX 25cdf0e10cSrcweir #define _RTL_MACRO_HXX 26cdf0e10cSrcweir 27cdf0e10cSrcweir #include <rtl/bootstrap.h> 28cdf0e10cSrcweir #include <rtl/ustring.hxx> 29cdf0e10cSrcweir #include <osl/endian.h> 30cdf0e10cSrcweir 31cdf0e10cSrcweir #if defined WIN32 32cdf0e10cSrcweir #define THIS_OS "Windows" 33cdf0e10cSrcweir #elif defined OS2 34cdf0e10cSrcweir #define THIS_OS "OS2" 35cdf0e10cSrcweir #elif defined SOLARIS 36cdf0e10cSrcweir #define THIS_OS "Solaris" 37cdf0e10cSrcweir #elif defined LINUX 38cdf0e10cSrcweir #ifdef __FreeBSD_kernel__ 39cdf0e10cSrcweir #define THIS_OS "kFreeBSD" 40cdf0e10cSrcweir #else 41cdf0e10cSrcweir #define THIS_OS "Linux" 42cdf0e10cSrcweir #endif 43cdf0e10cSrcweir #elif defined MACOSX 44cdf0e10cSrcweir #define THIS_OS "MacOSX" 45cdf0e10cSrcweir #elif defined NETBSD 46cdf0e10cSrcweir #define THIS_OS "NetBSD" 47cdf0e10cSrcweir #elif defined FREEBSD 48cdf0e10cSrcweir #define THIS_OS "FreeBSD" 49cdf0e10cSrcweir #endif 50cdf0e10cSrcweir 51cdf0e10cSrcweir #if ! defined THIS_OS 52cdf0e10cSrcweir #error "unknown OS -- insert your OS identifier above" 53cdf0e10cSrcweir this is inserted for the case that the preprocessor ignores error 54cdf0e10cSrcweir #endif 55cdf0e10cSrcweir 56cdf0e10cSrcweir #if defined X86_64 57cdf0e10cSrcweir # define THIS_ARCH "X86_64" 58cdf0e10cSrcweir #elif defined INTEL 59cdf0e10cSrcweir # define THIS_ARCH "x86" 60cdf0e10cSrcweir #elif defined POWERPC64 61cdf0e10cSrcweir # define THIS_ARCH "PowerPC_64" 62cdf0e10cSrcweir #elif defined POWERPC 63cdf0e10cSrcweir # define THIS_ARCH "PowerPC" 64cdf0e10cSrcweir #elif defined S390X 65cdf0e10cSrcweir # define THIS_ARCH "S390x" 66cdf0e10cSrcweir #elif defined S390 67cdf0e10cSrcweir # define THIS_ARCH "S390" 68cdf0e10cSrcweir #elif defined SPARC 69cdf0e10cSrcweir #if defined IS_LP64 70cdf0e10cSrcweir # define THIS_ARCH "SPARC64" 71cdf0e10cSrcweir #else 72cdf0e10cSrcweir # define THIS_ARCH "SPARC" 73cdf0e10cSrcweir #endif 74cdf0e10cSrcweir #elif defined MIPS 75cdf0e10cSrcweir # ifdef OSL_BIGENDIAN 76cdf0e10cSrcweir # define THIS_ARCH "MIPS_EB" 77cdf0e10cSrcweir # else 78cdf0e10cSrcweir # define THIS_ARCH "MIPS_EL" 79cdf0e10cSrcweir # endif 80cdf0e10cSrcweir #elif defined ARM 81cdf0e10cSrcweir # ifdef __ARM_EABI__ 82cdf0e10cSrcweir # define THIS_ARCH "ARM_EABI" 83cdf0e10cSrcweir # else 84cdf0e10cSrcweir # define THIS_ARCH "ARM_OABI" 85cdf0e10cSrcweir # endif 86cdf0e10cSrcweir #elif defined IA64 87cdf0e10cSrcweir # define THIS_ARCH "IA64" 88cdf0e10cSrcweir #elif defined M68K 89cdf0e10cSrcweir # define THIS_ARCH "M68K" 90cdf0e10cSrcweir #elif defined HPPA 91cdf0e10cSrcweir # define THIS_ARCH "HPPA" 92cdf0e10cSrcweir #elif defined AXP 93cdf0e10cSrcweir # define THIS_ARCH "ALPHA" 94cdf0e10cSrcweir #endif 95cdf0e10cSrcweir 96cdf0e10cSrcweir #if ! defined THIS_ARCH 97cdf0e10cSrcweir #error "unknown ARCH -- insert your ARCH identifier above" 98cdf0e10cSrcweir this is inserted for the case that the preprocessor ignores error 99cdf0e10cSrcweir #endif 100cdf0e10cSrcweir 101cdf0e10cSrcweir #endif 102cdf0e10cSrcweir 103cdf0e10cSrcweir 104cdf0e10cSrcweir 105cdf0e10cSrcweir 106cdf0e10cSrcweir 107