Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:55:12

0001 /*
0002  * This File is part of Davix, The IO library for HTTP based protocols
0003  * Copyright (C) CERN 2013
0004  * Author: Adrien Devresse <adrien.devresse@cern.ch>
0005  *
0006  * This library is free software; you can redistribute it and/or
0007  * modify it under the terms of the GNU Lesser General Public
0008  * License as published by the Free Software Foundation; either
0009  * version 2.1 of the License, or (at your option) any later version.
0010  *
0011  * This library is distributed in the hope that it will be useful,
0012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0014  * Lesser General Public License for more details.
0015  *
0016  * You should have received a copy of the GNU Lesser General Public
0017  * License along with this library; if not, write to the Free Software
0018  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
0019  *
0020 */
0021 
0022 #ifndef DAVIX_CONFIG
0023 #define DAVIX_CONFIG
0024 
0025 #include <functional>
0026 
0027 #ifndef __DAVIX_INSIDE__
0028 #error "Only davix.hpp should be included."
0029 #endif
0030 
0031 //
0032 // export
0033 //
0034 #ifndef DAVIX_EXPORT
0035 #define DAVIX_EXPORT __attribute__((visibility("default")))
0036 #endif
0037 
0038 
0039 //
0040 // detect GCC
0041 //
0042 #if (defined(__GNUC__) || defined(__GNUG__)) && !(defined(__clang__) || defined(__INTEL_COMPILER))
0043 #   ifndef __DAVIX_COMPILER_GCC
0044 #       define __DAVIX_COMPILER_GCC
0045 #   endif
0046 #endif
0047 
0048 //
0049 // detect CXX11 support
0050 //
0051 #if ( (__cplusplus > 199711L) \
0052      || (defined (DAVIX_FORCE_CXX11)) \
0053      || (defined __GXX_EXPERIMENTAL_CXX0X__) )
0054 #   ifndef __DAVIX_CX11_SUPPORT
0055 #       define __DAVIX_CX11_SUPPORT
0056 #   endif
0057 #endif
0058 
0059 //
0060 // detect TR1 support
0061 //
0062 #if ( (defined DAVIX_FORCE_TR1) \
0063       || (defined __DAVIX_COMPILER_GCC) \
0064       || (defined HAVE_TR1_SUPPORT))
0065 #   ifndef __DAVIX_TR1_SUPPORT
0066 #       define __DAVIX_TR1_SUPPORT
0067 #endif
0068 
0069 #endif
0070 
0071 
0072 //
0073 // include tr1 namespace
0074 //
0075 
0076 #if (!(defined __DAVIX_CX11_SUPPORT) \
0077     && (defined __DAVIX_TR1_SUPPORT))
0078 #       include <tr1/functional>
0079 #       include <tr1/memory>
0080 
0081 namespace std{
0082     using namespace std::tr1;
0083 }
0084 
0085 #endif
0086 
0087 //
0088 // enable STD_FUNCTION_DECL
0089 //
0090 #if ((defined __DAVIX_CX11_SUPPORT) \
0091     || (defined __DAVIX_TR1_SUPPORT) \
0092     || (defined HAVE_STD_FUNCTION))
0093 #   ifndef __DAVIX_HAS_STD_FUNCTION
0094 #       define __DAVIX_HAS_STD_FUNCTION
0095 #   endif
0096 #endif
0097 
0098 //
0099 // davix preproc facilities
0100 //
0101 #undef DAVIX_C_DECL_BEGIN
0102 #undef DAVIX_C_DECL_END
0103 #ifdef __cplusplus
0104 #define DAVIX_C_DECL_BEGIN \
0105         extern "C" {
0106 #define DAVIX_C_DECL_END }
0107 #else
0108 #define DAVIX_C_DECL_BEGIN  // void
0109 #define DAVIX_C_DECL_END    // void
0110 #endif
0111 
0112 
0113 //
0114 // compat 32 bits
0115 #if  (( __WORDSIZE == 32 ) \
0116         || ( SIZE_MAX ==  (4294967295U) )) \
0117      && !(defined __DAVIX_COMPAT_32) \
0118      && !(defined __NO_DAVIX_COMPAT_32)
0119 #define __DAVIX_COMPAT_32
0120 #endif
0121 
0122 
0123 //
0124 // deprecated
0125 #undef DEPRECATED
0126 #ifdef __GNUC__
0127 #define DEPRECATED(func) func __attribute__ ((deprecated))
0128 #else
0129 #define DEPRECATED(func) func
0130 #endif
0131 
0132 #endif // DAVIX_TYPES_HPP