| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: common.h,v 1.19 2012/04/07 15:27:21 joerg Exp $ */ | | 1 | /* $NetBSD: common.h,v 1.20 2012/04/26 09:56:16 joerg Exp $ */ |
2 | /*- | | 2 | /*- |
3 | * Copyright (c) 1998-2004 Dag-Erling Coïdan Smørgrav | | 3 | * Copyright (c) 1998-2004 Dag-Erling Coïdan Smørgrav |
4 | * All rights reserved. | | 4 | * All rights reserved. |
5 | * | | 5 | * |
6 | * Redistribution and use in source and binary forms, with or without | | 6 | * Redistribution and use in source and binary forms, with or without |
7 | * modification, are permitted provided that the following conditions | | 7 | * modification, are permitted provided that the following conditions |
8 | * are met: | | 8 | * are met: |
9 | * 1. Redistributions of source code must retain the above copyright | | 9 | * 1. Redistributions of source code must retain the above copyright |
10 | * notice, this list of conditions and the following disclaimer | | 10 | * notice, this list of conditions and the following disclaimer |
11 | * in this position and unchanged. | | 11 | * in this position and unchanged. |
12 | * 2. Redistributions in binary form must reproduce the above copyright | | 12 | * 2. Redistributions in binary form must reproduce the above copyright |
13 | * notice, this list of conditions and the following disclaimer in the | | 13 | * notice, this list of conditions and the following disclaimer in the |
14 | * documentation and/or other materials provided with the distribution. | | 14 | * documentation and/or other materials provided with the distribution. |
| @@ -38,26 +38,28 @@ | | | @@ -38,26 +38,28 @@ |
38 | #define HTTP_DEFAULT_PROXY_PORT 3128 | | 38 | #define HTTP_DEFAULT_PROXY_PORT 3128 |
39 | | | 39 | |
40 | #ifdef WITH_SSL | | 40 | #ifdef WITH_SSL |
41 | #include <openssl/crypto.h> | | 41 | #include <openssl/crypto.h> |
42 | #include <openssl/x509.h> | | 42 | #include <openssl/x509.h> |
43 | #include <openssl/pem.h> | | 43 | #include <openssl/pem.h> |
44 | #include <openssl/ssl.h> | | 44 | #include <openssl/ssl.h> |
45 | #include <openssl/err.h> | | 45 | #include <openssl/err.h> |
46 | #endif | | 46 | #endif |
47 | | | 47 | |
48 | #if defined(__GNUC__) && __GNUC__ >= 3 | | 48 | #if defined(__GNUC__) && __GNUC__ >= 3 |
49 | #define LIBFETCH_PRINTFLIKE(fmtarg, firstvararg) \ | | 49 | #define LIBFETCH_PRINTFLIKE(fmtarg, firstvararg) \ |
50 | __attribute__((__format__ (__printf__, fmtarg, firstvararg))) | | 50 | __attribute__((__format__ (__printf__, fmtarg, firstvararg))) |
| | | 51 | #else |
| | | 52 | #define LIBFETCH_PRINTFLIKE(fmtarg, firstvararg) |
51 | #endif | | 53 | #endif |
52 | | | 54 | |
53 | #if !defined(__sun) && !defined(__hpux) && !defined(__INTERIX) && \ | | 55 | #if !defined(__sun) && !defined(__hpux) && !defined(__INTERIX) && \ |
54 | !defined(__digital__) && !defined(__linux) && !defined(__MINT__) && \ | | 56 | !defined(__digital__) && !defined(__linux) && !defined(__MINT__) && \ |
55 | !defined(__sgi) && !defined(__minix) | | 57 | !defined(__sgi) && !defined(__minix) |
56 | #define HAVE_SA_LEN | | 58 | #define HAVE_SA_LEN |
57 | #endif | | 59 | #endif |
58 | | | 60 | |
59 | /* Connection */ | | 61 | /* Connection */ |
60 | typedef struct fetchconn conn_t; | | 62 | typedef struct fetchconn conn_t; |
61 | | | 63 | |
62 | struct fetchconn { | | 64 | struct fetchconn { |
63 | int sd; /* socket descriptor */ | | 65 | int sd; /* socket descriptor */ |