23 #if !defined(GLOBUS_COMMON_INCLUDE_H)
24 #define GLOBUS_COMMON_INCLUDE_H 1
28 #if defined(_WIN32) && !defined(__CYGWIN__)
34 #define GlobusFuncName(func) static const char * _globus_func_name \
35 __attribute__((__unused__)) = #func
37 #define GlobusFuncName(func) static const char * _globus_func_name = #func
40 extern const char * _globus_func_name;
42 #define _GCSL(s) globus_common_i18n_get_string(GLOBUS_COMMON_MODULE,\
53 #include <sys/types.h>
58 #include <sys/param.h>
63 # include <winsock2.h>
66 # include <sys/timeb.h>
72 # include <netinet/in.h>
73 # include <sys/socket.h>
96 extern int inet_pton(
int af,
const char *src,
void *dst);
107 void globus_dump_stack();
108 #define GLOBUS_DUMP_STACK() globus_dump_stack()
110 #define GLOBUS_DUMP_STACK()
113 #if defined(BUILD_DEBUG)
114 # define globus_assert(assertion) \
118 fprintf(stderr, "Assertion " #assertion \
119 " failed in file %s at line %d\n", \
120 __FILE__, __LINE__); \
121 GLOBUS_DUMP_STACK(); \
126 # define globus_assert_string(assertion, string) \
130 fprintf(stderr, "Assertion " #assertion \
131 " failed in file %s at line %d: %s", \
132 __FILE__, __LINE__, string); \
133 GLOBUS_DUMP_STACK(); \
138 # define globus_assert(assertion)
139 # define globus_assert_string(assertion, string)
142 #define GLOBUS_MAX(V1,V2) (((V1) > (V2)) ? (V1) : (V2))
143 #define GLOBUS_MIN(V1,V2) (((V1) < (V2)) ? (V1) : (V2))
145 #ifndef EXTERN_C_BEGIN
147 #define EXTERN_C_BEGIN extern "C" {
148 #define EXTERN_C_END }
150 #define EXTERN_C_BEGIN
158 #define EWOULDBLOCK EAGAIN
161 #define ETIMEDOUT WSAETIMEDOUT
164 #define EINPROGRESS WSAEINPROGRESS
168 #include <inttypes.h>
171 #if defined(_WIN32) && !defined(__USE_MINGW_ANSI_STDIO)
172 # define vsnprintf _vsnprintf
175 #ifndef MAXHOSTNAMELEN
176 #define MAXHOSTNAMELEN 64
Globus Platform Configuration.