|
SCIMBridge 0.4.x
|
00001 /* lt_system.h -- system portability abstraction layer 00002 00003 Copyright (C) 2004, 2007 Free Software Foundation, Inc. 00004 Written by Gary V. Vaughan, 2004 00005 00006 NOTE: The canonical source of this file is maintained with the 00007 GNU Libtool package. Report bugs to bug-libtool@gnu.org. 00008 00009 GNU Libltdl is free software; you can redistribute it and/or 00010 modify it under the terms of the GNU Lesser General Public 00011 License as published by the Free Software Foundation; either 00012 version 2 of the License, or (at your option) any later version. 00013 00014 As a special exception to the GNU Lesser General Public License, 00015 if you distribute this file as part of a program or library that 00016 is built using GNU Libtool, you may include this file under the 00017 same distribution terms that you use for the rest of that program. 00018 00019 GNU Libltdl is distributed in the hope that it will be useful, 00020 but WITHOUT ANY WARRANTY; without even the implied warranty of 00021 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00022 GNU Lesser General Public License for more details. 00023 00024 You should have received a copy of the GNU Lesser General Public 00025 License along with GNU Libltdl; see the file COPYING.LIB. If not, a 00026 copy can be downloaded from http://www.gnu.org/licenses/lgpl.html, 00027 or obtained by writing to the Free Software Foundation, Inc., 00028 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00029 */ 00030 00031 #if !defined(LT_SYSTEM_H) 00032 #define LT_SYSTEM_H 1 00033 00034 #include <stddef.h> 00035 #include <stdlib.h> 00036 #include <sys/types.h> 00037 00038 /* Some systems do not define EXIT_*, even with STDC_HEADERS. */ 00039 #if !defined(EXIT_SUCCESS) 00040 # define EXIT_SUCCESS 0 00041 #endif 00042 #if !defined(EXIT_FAILURE) 00043 # define EXIT_FAILURE 1 00044 #endif 00045 00046 /* Just pick a big number... */ 00047 #define LT_FILENAME_MAX 2048 00048 00049 00050 /* Saves on those hard to debug '\0' typos.... */ 00051 #define LT_EOS_CHAR '\0' 00052 00053 /* LTDL_BEGIN_C_DECLS should be used at the beginning of your declarations, 00054 so that C++ compilers don't mangle their names. Use LTDL_END_C_DECLS at 00055 the end of C declarations. */ 00056 #if defined(__cplusplus) 00057 # define LT_BEGIN_C_DECLS extern "C" { 00058 # define LT_END_C_DECLS } 00059 #else 00060 # define LT_BEGIN_C_DECLS /* empty */ 00061 # define LT_END_C_DECLS /* empty */ 00062 #endif 00063 00064 /* LT_STMT_START/END are used to create macros which expand to a 00065 a single compound statement in a portable way. */ 00066 #if defined (__GNUC__) && !defined (__STRICT_ANSI__) && !defined (__cplusplus) 00067 # define LT_STMT_START (void)( 00068 # define LT_STMT_END ) 00069 #else 00070 # if (defined (sun) || defined (__sun__)) 00071 # define LT_STMT_START if (1) 00072 # define LT_STMT_END else (void)0 00073 # else 00074 # define LT_STMT_START do 00075 # define LT_STMT_END while (0) 00076 # endif 00077 #endif 00078 00079 /* Canonicalise Windows and Cygwin recognition macros. 00080 To match the values set by recent Cygwin compilers, make sure that if 00081 __CYGWIN__ is defined (after canonicalisation), __WINDOWS__ is NOT! */ 00082 #if defined(__CYGWIN32__) && !defined(__CYGWIN__) 00083 # define __CYGWIN__ __CYGWIN32__ 00084 #endif 00085 #if defined(__CYGWIN__) 00086 # if defined(__WINDOWS__) 00087 # undef __WINDOWS__ 00088 # endif 00089 #elif defined(_WIN32) 00090 # define __WINDOWS__ _WIN32 00091 #elif defined(WIN32) 00092 # define __WINDOWS__ WIN32 00093 #endif 00094 #if defined(__CYGWIN__) && defined(__WINDOWS__) 00095 # undef __WINDOWS__ 00096 #endif 00097 00098 00099 /* DLL building support on win32 hosts; mostly to workaround their 00100 ridiculous implementation of data symbol exporting. */ 00101 #if !defined(LT_SCOPE) 00102 # if defined(__WINDOWS__) || defined(__CYGWIN__) 00103 # if defined(DLL_EXPORT) /* defined by libtool (if required) */ 00104 # define LT_SCOPE extern __declspec(dllexport) 00105 # endif 00106 # if defined(LIBLTDL_DLL_IMPORT) /* define if linking with this dll */ 00107 /* note: cygwin/mingw compilers can rely instead on auto-import */ 00108 # define LT_SCOPE extern __declspec(dllimport) 00109 # endif 00110 # endif 00111 # if !defined(LT_SCOPE) /* static linking or !__WINDOWS__ */ 00112 # define LT_SCOPE extern 00113 # endif 00114 #endif 00115 00116 #if defined(__WINDOWS__) 00117 /* LT_DIRSEP_CHAR is accepted *in addition* to '/' as a directory 00118 separator when it is set. */ 00119 # define LT_DIRSEP_CHAR '\\' 00120 # define LT_PATHSEP_CHAR ';' 00121 #else 00122 # define LT_PATHSEP_CHAR ':' 00123 #endif 00124 00125 #if defined(_MSC_VER) /* Visual Studio */ 00126 # define R_OK 4 00127 #endif 00128 00129 /* fopen() mode flags for reading a text file */ 00130 #undef LT_READTEXT_MODE 00131 #if defined(__WINDOWS__) || defined(__CYGWIN__) 00132 # define LT_READTEXT_MODE "rt" 00133 #else 00134 # define LT_READTEXT_MODE "r" 00135 #endif 00136 00137 /* The extra indirection to the LT__STR and LT__CONC macros is required so 00138 that if the arguments to LT_STR() (or LT_CONC()) are themselves macros, 00139 they will be expanded before being quoted. */ 00140 #ifndef LT_STR 00141 # define LT__STR(arg) #arg 00142 # define LT_STR(arg) LT__STR(arg) 00143 #endif 00144 00145 #ifndef LT_CONC 00146 # define LT__CONC(a, b) a##b 00147 # define LT_CONC(a, b) LT__CONC(a, b) 00148 #endif 00149 #ifndef LT_CONC3 00150 # define LT__CONC3(a, b, c) a##b##c 00151 # define LT_CONC3(a, b, c) LT__CONC3(a, b, c) 00152 #endif 00153 00154 #endif
1.7.3