1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 #ifndef _SAL_CONFIG_H_ 25 #define _SAL_CONFIG_H_ 26 27 #ifdef __cplusplus 28 extern "C" { 29 #endif 30 31 #ifdef __cplusplus 32 } 33 #endif 34 35 #ifndef INCLUDED_STDLIB_H 36 #include <stdlib.h> 37 #define INCLUDED_STDLIB_H 38 #endif 39 40 #ifdef WIN32 41 #define SAL_W32 42 #define SAL_DLLEXTENSION ".dll" 43 #define SAL_PRGEXTENSION ".exe" 44 #define SAL_PATHSEPARATOR ';' 45 #define SAL_PATHDELIMITER '\\' 46 #define SAL_CONFIGFILE( name ) name ".ini" 47 #define SAL_SYSCONFIGFILE( name ) name ".ini" 48 49 #ifdef _MSC_VER 50 51 #ifndef _USE_MATH_DEFINES 52 #define _USE_MATH_DEFINES // needed by Visual C++ for math constants 53 #endif 54 55 /* warnings ought to be disabled using /wd:n option of msvc.net compiler */ 56 #if _MSC_VER < 1300 57 /* no performance warning: int to bool */ 58 #pragma warning( disable : 4800 ) 59 60 /* No warning for: C++ Exception Specification ignored */ 61 #pragma warning( disable : 4290 ) 62 63 #if OSL_DEBUG_LEVEL > 0 64 /* No warning for: identifier was truncated to '255' characters in the browser information */ 65 #pragma warning( disable : 4786 ) 66 #endif 67 #endif /* defined _MSC_VER < 1300 */ 68 69 #endif /* defined _MSC_VER */ 70 71 /* Provide ISO C99 compatible versions of snprint and vsnprintf */ 72 #ifdef __MINGW32__ 73 #define _SNPRINTF_DLLIMPORT 74 #endif 75 #ifndef _SNPRINTF_H 76 #include <systools/win32/snprintf.h> 77 #endif 78 79 #endif /* defined WIN32 */ 80 81 /* BR: 16bit fuer Borland-Compiler */ 82 #ifdef __BORLANDC__ 83 #define SAL_W16 84 #define SAL_DLLEXTENSION ".dll" 85 #endif 86 /* BR: 16bit fuer Borland-Compiler */ 87 88 #ifdef OS2 89 #define SAL_OS2 90 #define SAL_DLLEXTENSION ".dll" 91 #define SAL_PRGEXTENSION ".exe" 92 #define SAL_PATHSEPARATOR ';' 93 #define SAL_PATHDELIMITER '/' 94 #define SAL_CONFIGFILE( name ) name ".ini" 95 #define SAL_SYSCONFIGFILE( name ) name ".ini" 96 #endif 97 98 #if defined(SOLARIS) || defined(LINUX) || defined(NETBSD) || defined(FREEBSD) || defined(SCO) 99 #define SAL_UNX 100 #define SAL_DLLEXTENSION ".so" 101 #define SAL_DLLPREFIX "lib" 102 #define SAL_PRGEXTENSION ".bin" 103 #define SAL_PATHSEPARATOR ':' 104 #define SAL_PATHDELIMITER '/' 105 #define SAL_CONFIGFILE( name ) name "rc" 106 #define SAL_SYSCONFIGFILE( name ) "." name "rc" 107 #endif 108 109 #ifdef MACOSX 110 #define SAL_UNX 111 #define SAL_DLLEXTENSION ".dylib" 112 #define SAL_DLLPREFIX "lib" 113 #define SAL_PRGEXTENSION ".bin" 114 #define SAL_PATHSEPARATOR ':' 115 #define SAL_PATHDELIMITER '/' 116 #define SAL_CONFIGFILE( name ) name "rc" 117 #define SAL_SYSCONFIGFILE( name ) "." name "rc" 118 #endif 119 120 #ifdef HPUX 121 #define SAL_UNX 122 #define SAL_DLLEXTENSION ".sl" 123 #define SAL_DLLPREFIX "lib" 124 #define SAL_PRGEXTENSION ".bin" 125 #define SAL_CONFIGFILE( name ) name "rc" 126 #define SAL_SYSCONFIGFILE( name ) "." name "rc" 127 #endif 128 129 #ifdef sun 130 #undef sun 131 #define sun sun 132 #endif 133 134 /* This is to work around a gcc 3.3 error that fixing actually breaks other 135 * compilers. This will create a dummy variable specifically for gcc 3.3 that 136 * allows it to compile and not break the others. Other compilers may follow 137 * with this eror later. */ 138 #if defined __GNUC__ 139 #if ((__GNUC__ == 3) && (__GNUC_MINOR__ > 2)) 140 # define SAL_ISO_CONST const 141 #else 142 # define SAL_ISO_CONST 143 #endif 144 #endif 145 146 #endif /*_SAL_CONFIG_H_ */ 147 148 149