libg722_1
0.0.1
|
00001 /* lt_system.h -- system portability abstraction layer 00002 00003 Copyright (C) 2004, 2007, 2010 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 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 00080 #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) 00081 /* DATA imports from DLLs on WIN32 con't be const, because runtime 00082 relocations are performed -- see ld's documentation on pseudo-relocs. */ 00083 # define LT_DLSYM_CONST 00084 #elif defined(__osf__) 00085 /* This system does not cope well with relocations in const data. */ 00086 # define LT_DLSYM_CONST 00087 #else 00088 # define LT_DLSYM_CONST const 00089 #endif 00090 00091 /* Canonicalise Windows and Cygwin recognition macros. 00092 To match the values set by recent Cygwin compilers, make sure that if 00093 __CYGWIN__ is defined (after canonicalisation), __WINDOWS__ is NOT! */ 00094 #if defined(__CYGWIN32__) && !defined(__CYGWIN__) 00095 # define __CYGWIN__ __CYGWIN32__ 00096 #endif 00097 #if defined(__CYGWIN__) 00098 # if defined(__WINDOWS__) 00099 # undef __WINDOWS__ 00100 # endif 00101 #elif defined(_WIN32) 00102 # define __WINDOWS__ _WIN32 00103 #elif defined(WIN32) 00104 # define __WINDOWS__ WIN32 00105 #endif 00106 #if defined(__CYGWIN__) && defined(__WINDOWS__) 00107 # undef __WINDOWS__ 00108 #endif 00109 00110 00111 /* DLL building support on win32 hosts; mostly to workaround their 00112 ridiculous implementation of data symbol exporting. */ 00113 #if !defined(LT_SCOPE) 00114 # if defined(__WINDOWS__) || defined(__CYGWIN__) 00115 # if defined(DLL_EXPORT) /* defined by libtool (if required) */ 00116 # define LT_SCOPE extern __declspec(dllexport) 00117 # endif 00118 # if defined(LIBLTDL_DLL_IMPORT) /* define if linking with this dll */ 00119 /* note: cygwin/mingw compilers can rely instead on auto-import */ 00120 # define LT_SCOPE extern __declspec(dllimport) 00121 # endif 00122 # endif 00123 # if !defined(LT_SCOPE) /* static linking or !__WINDOWS__ */ 00124 # define LT_SCOPE extern 00125 # endif 00126 #endif 00127 00128 #if defined(__WINDOWS__) 00129 /* LT_DIRSEP_CHAR is accepted *in addition* to '/' as a directory 00130 separator when it is set. */ 00131 # define LT_DIRSEP_CHAR '\\' 00132 # define LT_PATHSEP_CHAR ';' 00133 #else 00134 # define LT_PATHSEP_CHAR ':' 00135 #endif 00136 00137 #if defined(_MSC_VER) /* Visual Studio */ 00138 # define R_OK 4 00139 #endif 00140 00141 /* fopen() mode flags for reading a text file */ 00142 #undef LT_READTEXT_MODE 00143 #if defined(__WINDOWS__) || defined(__CYGWIN__) 00144 # define LT_READTEXT_MODE "rt" 00145 #else 00146 # define LT_READTEXT_MODE "r" 00147 #endif 00148 00149 /* The extra indirection to the LT__STR and LT__CONC macros is required so 00150 that if the arguments to LT_STR() (or LT_CONC()) are themselves macros, 00151 they will be expanded before being quoted. */ 00152 #ifndef LT_STR 00153 # define LT__STR(arg) #arg 00154 # define LT_STR(arg) LT__STR(arg) 00155 #endif 00156 00157 #ifndef LT_CONC 00158 # define LT__CONC(a, b) a##b 00159 # define LT_CONC(a, b) LT__CONC(a, b) 00160 #endif 00161 #ifndef LT_CONC3 00162 # define LT__CONC3(a, b, c) a##b##c 00163 # define LT_CONC3(a, b, c) LT__CONC3(a, b, c) 00164 #endif 00165 00166 #endif /*!defined(LT_SYSTEM_H)*/