Resync
[CMakeLuaTailorHgBridge.git] / CMakeLua / Utilities / cmcurl-7.19.0 / lib / setup-os400.h
blob42e90288a41dd91ff6f93e9b5c8194c925580363
1 #ifndef __SETUP_OS400_H
2 #define __SETUP_OS400_H
3 /***************************************************************************
4 * _ _ ____ _
5 * Project ___| | | | _ \| |
6 * / __| | | | |_) | |
7 * | (__| |_| | _ <| |___
8 * \___|\___/|_| \_\_____|
10 * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
12 * This software is licensed as described in the file COPYING, which
13 * you should have received as part of this distribution. The terms
14 * are also available at http://curl.haxx.se/docs/copyright.html.
16 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
17 * copies of the Software, and permit persons to whom the Software is
18 * furnished to do so, under the terms of the COPYING file.
20 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
21 * KIND, either express or implied.
23 * $Id: setup-os400.h,v 1.1.1.1 2008-09-23 16:32:05 hoffman Exp $
24 ***************************************************************************/
27 /* OS/400 netdb.h does not define NI_MAXHOST. */
28 #define NI_MAXHOST 1025
30 /* OS/400 netdb.h does not define NI_MAXSERV. */
31 #define NI_MAXSERV 32
33 /* OS/400 does not define the ifr_dstaddr union member. */
34 #define ifr_dstaddr ifr_addr
36 /* No OS/400 header file defines u_int32_t. */
37 typedef unsigned long u_int32_t;
40 /* System API wrapper prototypes and definitions to support ASCII parameters. */
42 #include <sys/socket.h>
43 #include <netdb.h>
44 #include <qsossl.h>
45 #include <gssapi.h>
47 extern int Curl_getaddrinfo_a(const char * nodename, const char * servname,
48 const struct addrinfo * hints,
49 struct addrinfo * * res);
50 #define getaddrinfo Curl_getaddrinfo_a
53 extern int Curl_getnameinfo_a(const struct sockaddr * sa, socklen_t salen,
54 char * nodename, socklen_t nodenamelen,
55 char * servname, socklen_t servnamelen,
56 int flags);
57 #define getnameinfo Curl_getnameinfo_a
60 /* SSL wrappers. */
62 extern int Curl_inet_ntoa_r_a(struct in_addr internet_address,
63 char * output_buffer,
64 int output_buffer_length);
65 #define inet_ntoa_r Curl_inet_ntoa_r_a
68 extern int Curl_SSL_Init_Application_a(SSLInitApp * init_app);
69 #define SSL_Init_Application Curl_SSL_Init_Application_a
72 extern int Curl_SSL_Init_a(SSLInit * init);
73 #define SSL_Init Curl_SSL_Init_a
76 extern char * Curl_SSL_Strerror_a(int sslreturnvalue, SSLErrorMsg * serrmsgp);
77 #define SSL_Strerror Curl_SSL_Strerror_a
80 /* GSSAPI wrappers. */
82 extern OM_uint32 Curl_gss_import_name_a(OM_uint32 * minor_status,
83 gss_buffer_t in_name,
84 gss_OID in_name_type,
85 gss_name_t * out_name);
86 #define gss_import_name Curl_gss_import_name_a
89 extern OM_uint32 Curl_gss_display_status_a(OM_uint32 * minor_status,
90 OM_uint32 status_value,
91 int status_type, gss_OID mech_type,
92 gss_msg_ctx_t * message_context,
93 gss_buffer_t status_string);
94 #define gss_display_status Curl_gss_display_status_a
97 extern OM_uint32 Curl_gss_init_sec_context_a(OM_uint32 * minor_status,
98 gss_cred_id_t cred_handle,
99 gss_ctx_id_t * context_handle,
100 gss_name_t target_name,
101 gss_OID mech_type,
102 gss_flags_t req_flags,
103 OM_uint32 time_req,
104 gss_channel_bindings_t
105 input_chan_bindings,
106 gss_buffer_t input_token,
107 gss_OID * actual_mech_type,
108 gss_buffer_t output_token,
109 gss_flags_t * ret_flags,
110 OM_uint32 * time_rec);
111 #define gss_init_sec_context Curl_gss_init_sec_context_a
114 extern OM_uint32 Curl_gss_delete_sec_context_a(OM_uint32 * minor_status,
115 gss_ctx_id_t * context_handle,
116 gss_buffer_t output_token);
117 #define gss_delete_sec_context Curl_gss_delete_sec_context_a
119 /* LDAP wrappers. */
121 #define BerValue struct berval
123 #define ldap_url_parse ldap_url_parse_utf8
124 #define ldap_init Curl_ldap_init_a
125 #define ldap_simple_bind_s Curl_ldap_simple_bind_s_a
126 #define ldap_search_s Curl_ldap_search_s_a
127 #define ldap_get_values_len Curl_ldap_get_values_len_a
128 #define ldap_err2string Curl_ldap_err2string_a
129 #define ldap_get_dn Curl_ldap_get_dn_a
130 #define ldap_first_attribute Curl_ldap_first_attribute_a
131 #define ldap_next_attribute Curl_ldap_next_attribute_a
133 /* Some socket functions must be wrapped to process textual addresses
134 like AF_UNIX. */
136 extern int Curl_os400_connect(int sd, struct sockaddr * destaddr, int addrlen);
137 extern int Curl_os400_bind(int sd, struct sockaddr * localaddr, int addrlen);
138 extern int Curl_os400_sendto(int sd, char * buffer, int buflen, int flags,
139 struct sockaddr * dstaddr, int addrlen);
140 extern int Curl_os400_recvfrom(int sd, char * buffer, int buflen, int flags,
141 struct sockaddr * fromaddr, int * addrlen);
143 #define connect Curl_os400_connect
144 #define bind Curl_os400_bind
145 #define sendto Curl_os400_sendto
146 #define recvfrom Curl_os400_recvfrom
149 #endif /* __SETUP_OS400_H */