![]() |
|
|||
File indexing completed on 2025-06-03 08:39:38
0001 /* lt_system.h -- system portability abstraction layer 0002 0003 Copyright (C) 2004, 2007, 2010-2019, 2021-2022 Free Software 0004 Foundation, Inc. 0005 Written by Gary V. Vaughan, 2004 0006 0007 NOTE: The canonical source of this file is maintained with the 0008 GNU Libtool package. Report bugs to bug-libtool@gnu.org. 0009 0010 GNU Libltdl is free software; you can redistribute it and/or 0011 modify it under the terms of the GNU Lesser General Public 0012 License as published by the Free Software Foundation; either 0013 version 2 of the License, or (at your option) any later version. 0014 0015 As a special exception to the GNU Lesser General Public License, 0016 if you distribute this file as part of a program or library that 0017 is built using GNU Libtool, you may include this file under the 0018 same distribution terms that you use for the rest of that program. 0019 0020 GNU Libltdl is distributed in the hope that it will be useful, 0021 but WITHOUT ANY WARRANTY; without even the implied warranty of 0022 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0023 GNU Lesser General Public License for more details. 0024 0025 You should have received a copy of the GNU Lesser General Public 0026 License along with GNU Libltdl; see the file COPYING.LIB. If not, a 0027 copy can be downloaded from http://www.gnu.org/licenses/lgpl.html, 0028 or obtained by writing to the Free Software Foundation, Inc., 0029 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 0030 */ 0031 0032 #if !defined LT_SYSTEM_H 0033 #define LT_SYSTEM_H 1 0034 0035 #include <stddef.h> 0036 #include <stdlib.h> 0037 #include <sys/types.h> 0038 0039 /* Some systems do not define EXIT_*, even with STDC_HEADERS. */ 0040 #if !defined EXIT_SUCCESS 0041 # define EXIT_SUCCESS 0 0042 #endif 0043 #if !defined EXIT_FAILURE 0044 # define EXIT_FAILURE 1 0045 #endif 0046 0047 /* Just pick a big number... */ 0048 #define LT_FILENAME_MAX 2048 0049 0050 0051 /* Saves on those hard to debug '\0' typos.... */ 0052 #define LT_EOS_CHAR '\0' 0053 0054 /* LTDL_BEGIN_C_DECLS should be used at the beginning of your declarations, 0055 so that C++ compilers don't mangle their names. Use LTDL_END_C_DECLS at 0056 the end of C declarations. */ 0057 #if defined __cplusplus 0058 # define LT_BEGIN_C_DECLS extern "C" { 0059 # define LT_END_C_DECLS } 0060 #else 0061 # define LT_BEGIN_C_DECLS /* empty */ 0062 # define LT_END_C_DECLS /* empty */ 0063 #endif 0064 0065 /* LT_STMT_START/END are used to create macros that expand to a 0066 a single compound statement in a portable way. */ 0067 #if defined __GNUC__ && !defined __STRICT_ANSI__ && !defined __cplusplus 0068 # define LT_STMT_START (void)( 0069 # define LT_STMT_END ) 0070 #else 0071 # if (defined sun || defined __sun__) 0072 # define LT_STMT_START if (1) 0073 # define LT_STMT_END else (void)0 0074 # else 0075 # define LT_STMT_START do 0076 # define LT_STMT_END while (0) 0077 # endif 0078 #endif 0079 0080 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 0081 #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE 0082 /* DATA imports from DLLs on WIN32 can't be const, because runtime 0083 relocations are performed -- see ld's documentation on pseudo-relocs. */ 0084 # define LT_DLSYM_CONST 0085 #elif defined __osf__ 0086 /* This system does not cope well with relocations in const data. */ 0087 # define LT_DLSYM_CONST 0088 #else 0089 # define LT_DLSYM_CONST const 0090 #endif 0091 0092 /* Canonicalise Windows and Cygwin recognition macros. 0093 To match the values set by recent Cygwin compilers, make sure that if 0094 __CYGWIN__ is defined (after canonicalisation), __WINDOWS__ is NOT! */ 0095 #if defined __CYGWIN32__ && !defined __CYGWIN__ 0096 # define __CYGWIN__ __CYGWIN32__ 0097 #endif 0098 #if defined __CYGWIN__ 0099 # if defined __WINDOWS__ 0100 # undef __WINDOWS__ 0101 # endif 0102 #elif defined _WIN32 0103 # define __WINDOWS__ _WIN32 0104 #elif defined WIN32 0105 # define __WINDOWS__ WIN32 0106 #endif 0107 #if defined __CYGWIN__ && defined __WINDOWS__ 0108 # undef __WINDOWS__ 0109 #endif 0110 0111 0112 /* DLL building support on win32 hosts; mostly to workaround their 0113 ridiculous implementation of data symbol exporting. */ 0114 #if !defined LT_SCOPE 0115 # if defined __WINDOWS__ || defined __CYGWIN__ 0116 # if defined DLL_EXPORT /* defined by libtool (if required) */ 0117 # define LT_SCOPE extern __declspec(dllexport) 0118 # endif 0119 # if defined LIBLTDL_DLL_IMPORT /* define if linking with this dll */ 0120 /* note: cygwin/mingw compilers can rely instead on auto-import */ 0121 # define LT_SCOPE extern __declspec(dllimport) 0122 # endif 0123 # endif 0124 # if !defined LT_SCOPE /* static linking or !__WINDOWS__ */ 0125 # define LT_SCOPE extern 0126 # endif 0127 #endif 0128 0129 #if defined __WINDOWS__ 0130 /* LT_DIRSEP_CHAR is accepted *in addition* to '/' as a directory 0131 separator when it is set. */ 0132 # define LT_DIRSEP_CHAR '\\' 0133 # define LT_PATHSEP_CHAR ';' 0134 #else 0135 # define LT_PATHSEP_CHAR ':' 0136 #endif 0137 0138 #if defined _MSC_VER /* Visual Studio */ 0139 # define R_OK 4 0140 #endif 0141 0142 /* fopen() mode flags for reading a text file */ 0143 #undef LT_READTEXT_MODE 0144 #if defined __WINDOWS__ || defined __CYGWIN__ 0145 # define LT_READTEXT_MODE "rt" 0146 #else 0147 # define LT_READTEXT_MODE "r" 0148 #endif 0149 0150 /* The extra indirection to the LT__STR and LT__CONC macros is required so 0151 that if the arguments to LT_STR() (or LT_CONC()) are themselves macros, 0152 they will be expanded before being quoted. */ 0153 #ifndef LT_STR 0154 # define LT__STR(arg) #arg 0155 # define LT_STR(arg) LT__STR(arg) 0156 #endif 0157 0158 #ifndef LT_CONC 0159 # define LT__CONC(a, b) a##b 0160 # define LT_CONC(a, b) LT__CONC(a, b) 0161 #endif 0162 #ifndef LT_CONC3 0163 # define LT__CONC3(a, b, c) a##b##c 0164 # define LT_CONC3(a, b, c) LT__CONC3(a, b, c) 0165 #endif 0166 0167 #endif /*!defined LT_SYSTEM_H*/
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
![]() ![]() |