| OLD | NEW |
| 1 /* $Id: evdns.c 6979 2006-08-04 18:31:13Z nickm $ */ | 1 /* $Id: evdns.c 6979 2006-08-04 18:31:13Z nickm $ */ |
| 2 | 2 |
| 3 /* The original version of this module was written by Adam Langley; for | 3 /* The original version of this module was written by Adam Langley; for |
| 4 * a history of modifications, check out the subversion logs. | 4 * a history of modifications, check out the subversion logs. |
| 5 * | 5 * |
| 6 * When editing this module, try to keep it re-mergeable by Adam. Don't | 6 * When editing this module, try to keep it re-mergeable by Adam. Don't |
| 7 * reformat the whitespace, add Tor dependencies, or so on. | 7 * reformat the whitespace, add Tor dependencies, or so on. |
| 8 * | 8 * |
| 9 * TODO: | 9 * TODO: |
| 10 * - Support IPv6 and PTR records. | 10 * - Support IPv6 and PTR records. |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 #include <stdio.h> | 127 #include <stdio.h> |
| 128 | 128 |
| 129 #undef MIN | 129 #undef MIN |
| 130 #define MIN(a,b) ((a)<(b)?(a):(b)) | 130 #define MIN(a,b) ((a)<(b)?(a):(b)) |
| 131 | 131 |
| 132 #ifdef __USE_ISOC99B | 132 #ifdef __USE_ISOC99B |
| 133 /* libevent doesn't work without this */ | 133 /* libevent doesn't work without this */ |
| 134 typedef ev_uint8_t u_char; | 134 typedef ev_uint8_t u_char; |
| 135 typedef unsigned int uint; | 135 typedef unsigned int uint; |
| 136 #endif | 136 #endif |
| 137 #include <event.h> | 137 #include "event.h" |
| 138 | 138 |
| 139 #define u64 ev_uint64_t | 139 #define u64 ev_uint64_t |
| 140 #define u32 ev_uint32_t | 140 #define u32 ev_uint32_t |
| 141 #define u16 ev_uint16_t | 141 #define u16 ev_uint16_t |
| 142 #define u8 ev_uint8_t | 142 #define u8 ev_uint8_t |
| 143 | 143 |
| 144 #ifdef WIN32 | 144 #ifdef WIN32 |
| 145 #define open _open | 145 #define open _open |
| 146 #define read _read | 146 #define read _read |
| 147 #define close _close | 147 #define close _close |
| (...skipping 3031 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3179 } else { | 3179 } else { |
| 3180 fprintf(stderr, "resolving (fwd) %s...\n",v[idx]); | 3180 fprintf(stderr, "resolving (fwd) %s...\n",v[idx]); |
| 3181 evdns_resolve_ipv4(v[idx], 0, main_callback, v[idx]); | 3181 evdns_resolve_ipv4(v[idx], 0, main_callback, v[idx]); |
| 3182 } | 3182 } |
| 3183 } | 3183 } |
| 3184 fflush(stdout); | 3184 fflush(stdout); |
| 3185 event_dispatch(); | 3185 event_dispatch(); |
| 3186 return 0; | 3186 return 0; |
| 3187 } | 3187 } |
| 3188 #endif | 3188 #endif |
| OLD | NEW |