globus_types.h

Go to the documentation of this file.
00001 /*
00002  * Copyright 1999-2006 University of Chicago
00003  * 
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  * 
00008  * http://www.apache.org/licenses/LICENSE-2.0
00009  * 
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 
00024 #if !defined(GLOBUS_TYPES_H)
00025 #define GLOBUS_TYPES_H 1
00026 
00027 #include "globus_config.h"
00028 
00029 #include <stdlib.h>
00030 #include <stdint.h>
00031 
00032 #if (!defined(_WIN32)) || (defined(__CYGWIN__) || defined(__MINGW32__))
00033 #include <sys/types.h>
00034 #endif
00035 
00036 #if defined(_WIN32) && !defined(__CYGWIN__)
00037 #include <winsock2.h>
00038 #include <ws2tcpip.h>
00039 #else
00040 #include <sys/socket.h>
00041 #endif
00042 
00048 typedef size_t                                      globus_size_t;
00049 
00050 #if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__MINGW32__)
00051 
00056 typedef long                                        globus_ssize_t;
00057 #else
00058 typedef ssize_t                                     globus_ssize_t;
00059 #endif
00060 
00068 typedef socklen_t                                   globus_socklen_t;
00069 
00070 #if defined(_WIN32)
00071 /* The ordering of the fields must match those in WSABUF */
00072 struct  iovec  
00073 {
00074     unsigned long      iov_len;  /* Length in bytes.  */
00075     char *             iov_base;  /* Starting address.  */
00076 };
00077 #endif 
00078 
00085 typedef unsigned char                                   globus_byte_t;
00086 
00093 typedef int                                             globus_bool_t;
00094 
00099 typedef uint32_t                                        globus_result_t;
00100 typedef int64_t                                         globus_off_t;
00101 #define GLOBUS_OFF_T_FORMAT                             PRId64
00102 
00107 #define GLOBUS_TRUE    1
00108 
00112 #define GLOBUS_FALSE   0
00113 
00119 #define GLOBUS_NULL    NULL
00120 
00126 #define GLOBUS_SUCCESS 0
00127 
00133 #define GLOBUS_FAILURE  -1
00134 
00135 #endif  /* GLOBUS_TYPES_H */

Generated on 17 Mar 2017 for globus_common by  doxygen 1.4.7