From b47c5b45e789bbf63e170b52268726c5478be9ee Mon Sep 17 00:00:00 2001 From: Jeff Trawick Date: Fri, 28 Apr 2000 01:37:42 +0000 Subject: [PATCH] Build ab on Win32. 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 | 12 +++++++ support/ab.c | 15 ++++---- support/ab.dsp | 93 ++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 113 insertions(+), 7 deletions(-) create mode 100644 support/ab.dsp diff --git a/Apache.dsw b/Apache.dsw index e53c79da09..8147ba7ba2 100644 --- a/Apache.dsw +++ b/Apache.dsw @@ -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> diff --git a/support/ab.c b/support/ab.c index d70d0a664f..ae8029ad90 100644 --- a/support/ab.c +++ b/support/ab.c @@ -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("

\n"); - printf(" This is ApacheBench, Version %s <%s> apache-2.0
\n", VERSION, "$Revision: 1.9 $"); + printf(" This is ApacheBench, Version %s <%s> apache-2.0
\n", VERSION, "$Revision: 1.10 $"); 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

\n"); diff --git a/support/ab.dsp b/support/ab.dsp new file mode 100644 index 0000000000..d99141d598 --- /dev/null +++ b/support/ab.dsp @@ -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 -- 2.40.0