mirror of
https://github.com/apache/httpd.git
synced 2025-08-03 16:33:59 +00:00
Some Windows tweaks from William Rowe...
Submitted by: William Rowe git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85034 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@ -39,12 +39,10 @@
|
||||
* that one of these matches the original address.
|
||||
*/
|
||||
|
||||
#include "ap_config.h"
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "apr.h"
|
||||
#include <ctype.h>
|
||||
|
||||
#if !defined(MPE) && !defined(BEOS)
|
||||
#if !defined(MPE) && !defined(BEOS) && !defined(WIN32)
|
||||
#include <arpa/inet.h>
|
||||
#endif
|
||||
|
||||
@ -279,6 +277,14 @@ int main (int argc, char *argv[])
|
||||
char *bar, hoststring[MAXDNAME + 1], line[MAXLINE], *statfile;
|
||||
int i, check;
|
||||
|
||||
#ifdef WIN32
|
||||
/* If we apr'ify this code, ap_create_pool/ap_destroy_pool
|
||||
* should perform the WSAStartup/WSACleanup for us.
|
||||
*/
|
||||
WSADATA wsaData;
|
||||
WSAStartup(0x101, &wsaData);
|
||||
#endif
|
||||
|
||||
check = 0;
|
||||
statfile = NULL;
|
||||
for (i = 1; i < argc; i++) {
|
||||
@ -298,7 +304,6 @@ int main (int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
for (i = 0; i < BUCKETS; i++)
|
||||
nscache[i] = NULL;
|
||||
for (i = 0; i < MAX_ERR + 2; i++)
|
||||
@ -334,6 +339,10 @@ int main (int argc, char *argv[])
|
||||
puts(hoststring);
|
||||
}
|
||||
|
||||
#ifdef WIN32
|
||||
WSACleanup();
|
||||
#endif
|
||||
|
||||
if (statfile != NULL) {
|
||||
FILE *fp;
|
||||
fp = fopen(statfile, "w");
|
||||
|
Reference in New Issue
Block a user