]> granicus.if.org Git - apache/commitdiff
Build ab on Win32.
authorJeff Trawick <trawick@apache.org>
Fri, 28 Apr 2000 01:37:42 +0000 (01:37 +0000)
committerJeff Trawick <trawick@apache.org>
Fri, 28 Apr 2000 01:37:42 +0000 (01:37 +0000)
Fix some minor ab APR-ization issues.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85068 13f79535-47bb-0310-9956-ffa450edef68

Apache.dsw
support/ab.c
support/ab.dsp [new file with mode: 0644]

index e53c79da09abbcdb49c8bd875e9c10cb5082d2cf..8147ba7ba22ea5ecf582a356b9d5478ab1ce2fd4 100644 (file)
@@ -324,6 +324,18 @@ Package=<4>
 
 ###############################################################################
 
+Project: "ab"=".\support\ab.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
 Project: "ap"=".\ap\ap.dsp" - Package Owner=<4>
 
 Package=<5>
index d70d0a664f7b279a1df55bcbb0a029fe9ae982f0..ae8029ad9022ddfea92f45e4b597b6f803e82232 100644 (file)
@@ -465,6 +465,8 @@ static void output_html_results(void)
 
 static void start_connect(struct connection *c)
 {
+    ap_status_t rv;
+
     c->read = 0;
     c->bread = 0;
     c->keepalive = 0;
@@ -478,16 +480,15 @@ static void start_connect(struct connection *c)
         err("Port:");
     }
     c->start = ap_now();
-    if (ap_connect(c->aprsock, hostname) != APR_SUCCESS) {
-        if (errno == APR_EINPROGRESS) {
+    if ((rv = ap_connect(c->aprsock, hostname)) != APR_SUCCESS) {
+        if (ap_canonical_error(rv) == APR_EINPROGRESS) {
             c->state = STATE_CONNECTING;
             ap_add_poll_socket(readbits, c->aprsock, APR_POLLOUT);
             return;
         }
         else {
-            /* we done't have to close the socket.  If we have an error this
-             * bad, ap_connect will destroy it for us.
-             */
+            ap_remove_poll_socket(readbits, c->aprsock);
+            ap_close_socket(c->aprsock);
             err_conn++;
             if (bad++ > 10) {
                 err("\nTest aborted after 10 failures\n\n");
@@ -839,14 +840,14 @@ static void test(void)
 static void copyright(void)
 {
     if (!use_html) {
-        printf("This is ApacheBench, Version %s\n", VERSION " <$Revision: 1.9 $> apache-2.0");
+        printf("This is ApacheBench, Version %s\n", VERSION " <$Revision: 1.10 $> apache-2.0");
         printf("Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/\n");
         printf("Copyright (c) 1998-2000 The Apache Software Foundation, http://www.apache.org/\n");
         printf("\n");
     }
     else {
         printf("<p>\n");
-        printf(" This is ApacheBench, Version %s <i>&lt;%s&gt;</i> apache-2.0<br>\n", VERSION, "$Revision: 1.9 $");
+        printf(" This is ApacheBench, Version %s <i>&lt;%s&gt;</i> apache-2.0<br>\n", VERSION, "$Revision: 1.10 $");
         printf(" Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/<br>\n");
         printf(" Copyright (c) 1998-2000 The Apache Software Foundation, http://www.apache.org/<br>\n");
         printf("</p>\n<p>\n");
diff --git a/support/ab.dsp b/support/ab.dsp
new file mode 100644 (file)
index 0000000..d99141d
--- /dev/null
@@ -0,0 +1,93 @@
+# Microsoft Developer Studio Project File - Name="ab" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 5.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=ab - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE 
+!MESSAGE NMAKE /f "ab.mak".
+!MESSAGE 
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE 
+!MESSAGE NMAKE /f "ab.mak" CFG="ab - Win32 Debug"
+!MESSAGE 
+!MESSAGE Possible choices for configuration are:
+!MESSAGE 
+!MESSAGE "ab - Win32 Release" (based on\
+ "Win32 (x86) Console Application")
+!MESSAGE "ab - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE 
+
+# Begin Project
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF  "$(CFG)" == "ab - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "ab"
+# PROP BASE Intermediate_Dir "ab"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir ""
+# PROP Intermediate_Dir ""
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /out:"release/ab.exe"
+# SUBTRACT LINK32 /pdb:none
+
+!ELSEIF  "$(CFG)" == "ab - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "ab0"
+# PROP BASE Intermediate_Dir "ab0"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir ""
+# PROP Intermediate_Dir ""
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\lib\apr\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"debug/ab.exe" /pdbtype:sept
+
+!ENDIF 
+
+# Begin Target
+
+# Name "ab - Win32 Release"
+# Name "ab - Win32 Debug"
+# Begin Source File
+
+SOURCE=.\ab.c
+# End Source File
+# End Target
+# End Project