# include <limits.h>
# ifdef _WIN32
+# define _WINSOCK_DEPRECATED_NO_WARNINGS 1
# include <io.h>
# include <winsock2.h>
# define CUPS_SOCAST (const char *)
# endif /* HAVE_GETIFADDRS */
# endif /* !_WIN32 */
-# ifdef HAVE_LIBZ
-# include <zlib.h>
-# endif /* HAVE_LIBZ */
-
/*
* C++ magic...
* for its IO and protocol management...
*/
-# if !defined(HAVE_SECBASEPRIV_H) && defined(HAVE_CSSMERRORSTRING) /* Declare prototype for function in that header... */
-extern const char *cssmErrorString(int error);
-# endif /* !HAVE_SECBASEPRIV_H && HAVE_CSSMERRORSTRING */
-# if !defined(HAVE_SECIDENTITYSEARCHPRIV_H) && defined(HAVE_SECIDENTITYSEARCHCREATEWITHPOLICY) /* Declare prototype for function in that header... */
-extern OSStatus SecIdentitySearchCreateWithPolicy(SecPolicyRef policy,
- CFStringRef idString, CSSM_KEYUSE keyUsage,
- CFTypeRef keychainOrArray,
- Boolean returnOnlyValidIdentities,
- SecIdentitySearchRef* searchRef);
-# endif /* !HAVE_SECIDENTITYSEARCHPRIV_H && HAVE_SECIDENTITYSEARCHCREATEWITHPOLICY */
-# if !defined(HAVE_SECPOLICYPRIV_H) && defined(HAVE_SECPOLICYSETVALUE) /* Declare prototype for function in that header... */
-extern OSStatus SecPolicySetValue(SecPolicyRef policyRef,
- const CSSM_DATA *value);
-# endif /* !HAVE_SECPOLICYPRIV_H && HAVE_SECPOLICYSETVALUE */
-
typedef SSLContextRef http_tls_t;
typedef CFArrayRef http_tls_credentials_t;
_http_mode_t mode; /* _HTTP_MODE_CLIENT or _HTTP_MODE_SERVER */
# ifdef HAVE_LIBZ
_http_coding_t coding; /* _HTTP_CODING_xxx */
- z_stream stream; /* (De)compression stream */
- Bytef *sbuffer; /* (De)compression buffer */
+ void *stream; /* (De)compression stream */
+ unsigned char *sbuffer; /* (De)compression buffer */
# endif /* HAVE_LIBZ */
/**** New in CUPS 2.2.9 ****/
# endif /* !HAVE_HSTRERROR */
-/*
- * Some OS's don't have getifaddrs() and freeifaddrs()...
- */
-
-# if !defined(_WIN32) && !defined(HAVE_GETIFADDRS)
-# ifdef ifa_dstaddr
-# undef ifa_dstaddr
-# endif /* ifa_dstaddr */
-# ifndef ifr_netmask
-# define ifr_netmask ifr_addr
-# endif /* !ifr_netmask */
-
-struct ifaddrs /**** Interface Structure ****/
-{
- struct ifaddrs *ifa_next; /* Next interface in list */
- char *ifa_name; /* Name of interface */
- unsigned int ifa_flags; /* Flags (up, point-to-point, etc.) */
- struct sockaddr *ifa_addr, /* Network address */
- *ifa_netmask; /* Address mask */
- union
- {
- struct sockaddr *ifu_broadaddr; /* Broadcast address of this interface. */
- struct sockaddr *ifu_dstaddr; /* Point-to-point destination address. */
- } ifa_ifu;
-
- void *ifa_data; /* Interface statistics */
-};
-
-# ifndef ifa_broadaddr
-# define ifa_broadaddr ifa_ifu.ifu_broadaddr
-# endif /* !ifa_broadaddr */
-# ifndef ifa_dstaddr
-# define ifa_dstaddr ifa_ifu.ifu_dstaddr
-# endif /* !ifa_dstaddr */
-
-extern int _cups_getifaddrs(struct ifaddrs **addrs);
-# define getifaddrs _cups_getifaddrs
-extern void _cups_freeifaddrs(struct ifaddrs *addrs);
-# define freeifaddrs _cups_freeifaddrs
-# endif /* !_WIN32 && !HAVE_GETIFADDRS */
-
-
/*
* Prototypes...
*/
-extern void _httpAddrSetPort(http_addr_t *addr, int port);
+extern void _httpAddrSetPort(http_addr_t *addr, int port) _CUPS_PRIVATE;
extern http_tls_credentials_t
- _httpCreateCredentials(cups_array_t *credentials);
+ _httpCreateCredentials(cups_array_t *credentials) _CUPS_PRIVATE;
extern char *_httpDecodeURI(char *dst, const char *src,
- size_t dstsize);
-extern void _httpDisconnect(http_t *http);
+ size_t dstsize) _CUPS_PRIVATE;
+extern void _httpDisconnect(http_t *http) _CUPS_PRIVATE;
extern char *_httpEncodeURI(char *dst, const char *src,
- size_t dstsize);
-extern void _httpFreeCredentials(http_tls_credentials_t credentials);
+ size_t dstsize) _CUPS_PRIVATE;
+extern void _httpFreeCredentials(http_tls_credentials_t credentials) _CUPS_PRIVATE;
extern const char *_httpResolveURI(const char *uri, char *resolved_uri,
size_t resolved_size, int options,
int (*cb)(void *context),
- void *context);
-extern int _httpSetDigestAuthString(http_t *http, const char *nonce, const char *method, const char *resource);
-extern const char *_httpStatus(cups_lang_t *lang, http_status_t status);
-extern void _httpTLSInitialize(void);
-extern size_t _httpTLSPending(http_t *http);
-extern int _httpTLSRead(http_t *http, char *buf, int len);
-extern int _httpTLSSetCredentials(http_t *http);
-extern void _httpTLSSetOptions(int options, int min_version, int max_version);
-extern int _httpTLSStart(http_t *http);
-extern void _httpTLSStop(http_t *http);
-extern int _httpTLSWrite(http_t *http, const char *buf, int len);
-extern int _httpUpdate(http_t *http, http_status_t *status);
-extern int _httpWait(http_t *http, int msec, int usessl);
+ void *context) _CUPS_PRIVATE;
+extern int _httpSetDigestAuthString(http_t *http, const char *nonce, const char *method, const char *resource) _CUPS_PRIVATE;
+extern const char *_httpStatus(cups_lang_t *lang, http_status_t status) _CUPS_PRIVATE;
+extern void _httpTLSInitialize(void) _CUPS_PRIVATE;
+extern size_t _httpTLSPending(http_t *http) _CUPS_PRIVATE;
+extern int _httpTLSRead(http_t *http, char *buf, int len) _CUPS_PRIVATE;
+extern void _httpTLSSetOptions(int options, int min_version, int max_version) _CUPS_PRIVATE;
+extern int _httpTLSStart(http_t *http) _CUPS_PRIVATE;
+extern void _httpTLSStop(http_t *http) _CUPS_PRIVATE;
+extern int _httpTLSWrite(http_t *http, const char *buf, int len) _CUPS_PRIVATE;
+extern int _httpUpdate(http_t *http, http_status_t *status) _CUPS_PRIVATE;
+extern int _httpWait(http_t *http, int msec, int usessl) _CUPS_PRIVATE;
/*