globus_common  17.9
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
globus_types.h
Go to the documentation of this file.
1 
9 #if !defined(GLOBUS_TYPES_H)
10 #define GLOBUS_TYPES_H 1
11 
12 #include "globus_config.h"
13 
14 #include <stdlib.h>
15 #include <stdint.h>
16 
17 #if (!defined(_WIN32)) || (defined(__CYGWIN__) || defined(__MINGW32__))
18 #include <sys/types.h>
19 #endif
20 
21 #if defined(_WIN32) && !defined(__CYGWIN__)
22 #include <winsock2.h>
23 #include <ws2tcpip.h>
24 #else
25 #include <sys/socket.h>
26 #endif
27 
33 typedef size_t globus_size_t;
34 
35 #if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__MINGW32__)
36 
41 typedef long globus_ssize_t;
42 #else
43 typedef ssize_t globus_ssize_t;
44 #endif
45 
53 typedef socklen_t globus_socklen_t;
54 
55 #if defined(_WIN32)
56 /* The ordering of the fields must match those in WSABUF */
57 struct iovec
58 {
59  unsigned long iov_len; /* Length in bytes. */
60  char * iov_base; /* Starting address. */
61 };
62 #endif
63 
70 typedef unsigned char globus_byte_t;
71 
78 typedef int globus_bool_t;
79 
84 typedef uint32_t globus_result_t;
85 typedef int64_t globus_off_t;
86 #define GLOBUS_OFF_T_FORMAT PRId64
87 
92 #define GLOBUS_TRUE 1
93 
97 #define GLOBUS_FALSE 0
98 
104 #define GLOBUS_NULL NULL
105 
111 #define GLOBUS_SUCCESS 0
112 
118 #define GLOBUS_FAILURE -1
119 
120 #endif /* GLOBUS_TYPES_H */
Globus Platform Configuration.
int globus_bool_t
Boolean type.
Definition: globus_types.h:78
socklen_t globus_socklen_t
Size of a socket length parameter.
Definition: globus_types.h:53
size_t globus_size_t
Standard size of memory objectThe globus_size_t is the size of a memory object. It is identical to si...
Definition: globus_types.h:33
unsigned char globus_byte_t
Unsigned byte datatypeThis is used for byte-addressable arrays of arbitrary data which is not subject...
Definition: globus_types.h:70
uint32_t globus_result_t
Definition: globus_types.h:84