Grid Community Toolkit  6.2.1653033972 (tag: v6.2.20220524)
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
globus_types.h
Go to the documentation of this file.
1 /*
2  * Copyright 1999-2006 University of Chicago
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
24 #if !defined(GLOBUS_TYPES_H)
25 #define GLOBUS_TYPES_H 1
26 
27 #include "globus_config.h"
28 
29 #include <stdlib.h>
30 #include <stdint.h>
31 
32 #if (!defined(_WIN32)) || (defined(__CYGWIN__) || defined(__MINGW32__))
33 #include <sys/types.h>
34 #endif
35 
36 #if defined(_WIN32) && !defined(__CYGWIN__)
37 #include <winsock2.h>
38 #include <ws2tcpip.h>
39 #else
40 #include <sys/socket.h>
41 #endif
42 
48 typedef size_t globus_size_t;
49 
50 #if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__MINGW32__)
51 
56 typedef long globus_ssize_t;
57 #else
58 typedef ssize_t globus_ssize_t;
59 #endif
60 
68 typedef socklen_t globus_socklen_t;
69 
70 #if defined(_WIN32)
71 /* The ordering of the fields must match those in WSABUF */
72 struct iovec
73 {
74  unsigned long iov_len; /* Length in bytes. */
75  char * iov_base; /* Starting address. */
76 };
77 #endif
78 
85 typedef unsigned char globus_byte_t;
86 
93 typedef int globus_bool_t;
94 
99 typedef uint32_t globus_result_t;
100 typedef int64_t globus_off_t;
101 #define GLOBUS_OFF_T_FORMAT PRId64
102 
107 #define GLOBUS_TRUE 1
108 
112 #define GLOBUS_FALSE 0
113 
119 #define GLOBUS_NULL NULL
120 
126 #define GLOBUS_SUCCESS 0
127 
133 #define GLOBUS_FAILURE -1
134 
135 #endif /* GLOBUS_TYPES_H */
Globus Platform Configuration.
int globus_bool_t
Boolean type.
Definition: globus_types.h:93
socklen_t globus_socklen_t
Size of a socket length parameter.
Definition: globus_types.h:68
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:48
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:85
uint32_t globus_result_t
Definition: globus_types.h:99