00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef S3_MACROS_H
00025 #define S3_MACROS_H
00026
00027
00028 #ifndef NONCONST_MUTEXP
00029 #define NONCONST_MUTEXP(x) ( const_cast<pthread_mutex_t*>(x) )
00030 #endif
00031
00032
00042 #ifndef CONST_OVERRIDE_THIS
00043 #define CONST_OVERRIDE_THIS(x) const_cast<x*>(this)->
00044 #endif
00045
00046
00047 #ifdef S3_VERBOSE_DEBUG
00048 #define S3FC_DBG(x) x ;
00049 #define S3FC_DBG_(x) std::cerr << x << std::endl << std::flush;
00050 #define S3FC_DBG2_(x,y) std::cerr << x << ": " << y << std::endl << std::flush;
00051 #else
00052 #define S3FC_DBG(x)
00053 #define S3FC_DBG_(x)
00054 #define S3FC_DBG2_(x,y)
00055 #endif
00056
00057
00058
00059
00060
00062 #ifndef S3_DEBUG_LEVEL
00063 #define S3_DEBUG_LEVEL (5)
00064 #endif
00065
00071 #ifdef S3_VERBOSE_DEBUG
00072 #define S3FC_DBGL(x, l) if (l >= S3_DEBUG_LEVEL) x
00073 #else
00074 #define S3FC_DBGL(x, l)
00075 #endif
00076
00077 #ifdef __GNUC__
00078 #define S3_ATTR_NOCHECK_MEMORY_USAGE __attribute__ ((no_check_memory_usage))
00079 #else
00080 #define S3_ATTR_NOCHECK_MEMORY_USAGE
00081 #endif
00082
00083
00084
00085
00086 #ifndef _WIN32
00087 #ifndef INVALID_SOCKET
00088 #define INVALID_SOCKET ((int) -1)
00089 #endif
00090 #endif
00091
00092 const char* s3fc_get_version();
00093
00094
00095 #endif // S3_MACROS_H