From: Stefan Fritsch Date: Thu, 25 Nov 2010 22:27:17 +0000 (+0000) Subject: Fix some Windows build issues X-Git-Tag: 2.3.10~196 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cf0e2c3a46d366053770ef00cba5405d2ebcc18a;p=thirdparty%2Fapache%2Fhttpd.git Fix some Windows build issues git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1039204 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/include/http_config.h b/include/http_config.h index 66f73bac7c8..6c09410e209 100644 --- a/include/http_config.h +++ b/include/http_config.h @@ -1259,7 +1259,7 @@ AP_DECLARE_HOOK(void,optional_fn_retrieve,(void)) * @param data The address of the pointer * @return APR_SUCCESS */ -AP_DECLARE(apr_status_t) ap_pool_cleanup_set_null(void *data); +AP_DECLARE_NONSTD(apr_status_t) ap_pool_cleanup_set_null(void *data); #ifdef __cplusplus } diff --git a/libhttpd.dsp b/libhttpd.dsp index 13a5b1da59a..11cf9ec0198 100644 --- a/libhttpd.dsp +++ b/libhttpd.dsp @@ -97,6 +97,41 @@ PostBuild_Desc=Embed .manifest PostBuild_Cmds=if exist $(TargetPath).manifest mt.exe -manifest $(TargetPath).manifest -outputresource:$(TargetPath);2 # End Special Build Tool +!ELSEIF "$(CFG)" == "libhttpd - Win32 Lexical" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /O2 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "AP_DECLARE_EXPORT" /FD /c +# ADD CPP /nologo /MD /W3 /O2 /Oy- /Zi /I "./include" /I "./srclib/apr/include" /I "./srclib/apr-util/include" /I "./srclib/pcre" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "AP_DECLARE_EXPORT" /Fd"Release\libhttpd_cl" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /fo"Release/libhttpd.res" /i "./include" /i "./srclib/apr/include" /d "NDEBUG" /d BIN_NAME="libhttpd.dll" /d LONG_NAME="Apache HTTP Server Core" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib advapi32.lib ws2_32.lib mswsock.lib /nologo /subsystem:windows /dll +# ADD LINK32 pcre.lib kernel32.lib user32.lib advapi32.lib ws2_32.lib mswsock.lib "Release\buildmark.obj" /nologo /subsystem:windows /dll /debug /libpath:"./srclib/pcre" /base:@"os\win32\BaseAddr.ref",libhttpd.dll /opt:ref +# Begin Special Build Tool +TargetPath=.\Release\libhttpd.dll +SOURCE="$(InputPath)" +PreLink_Desc=Compiling buildmark +PreLink_Cmds=cl.exe /nologo /MD /W3 /O2 /Oy- /Zi /I "./include" /I "./srclib/apr/include" /I "./srclib/apr-util/include" /I "./srclib/pcre" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "AP_DECLARE_EXPORT" /Fd"Release\libhttpd" /FD /c server\buildmark.c /Fo"Release\buildmark.obj" +PostBuild_Desc=Embed .manifest +PostBuild_Cmds=if exist $(TargetPath).manifest mt.exe -manifest $(TargetPath).manifest -outputresource:$(TargetPath);2 +# End Special Build Tool + + !ENDIF # Begin Target @@ -479,7 +514,27 @@ SOURCE=.\include\util_ebcdic.h # End Source File # Begin Source File -SOURCE=.\server\util_expr.c +SOURCE=.\server\util_expr_private.h +# End Source File +# Begin Source File + +SOURCE=.\server\util_expr_eval.c +# End Source File +# Begin Source File + +SOURCE=.\server\util_expr_scan.h +# End Source File +# Begin Source File + +SOURCE=.\server\util_expr_scan.c +# End Source File +# Begin Source File + +SOURCE=.\server\util_expr_parse.h +# End Source File +# Begin Source File + +SOURCE=.\server\util_expr_parse.c # End Source File # Begin Source File @@ -651,9 +706,82 @@ InputPath=.\server\gen_test_char.exe # End Custom Build +!ELSEIF "$(CFG)" == "libhttpd - Win32 Lexical" + +# PROP Ignore_Default_Tool 1 +USERDEP__GEN_T=".\include\os.h" +# Begin Custom Build - Generating test_char.h from gen_test_char.exe +InputPath=.\server\gen_test_char.exe + +".\server\test_char.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + .\server\gen_test_char.exe >.\server\test_char.h + +# End Custom Build + !ENDIF # End Source File +# Begin Group "Generated Files" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=.\server\util_expr_parse.y + +!IF "$(CFG)" == "libhttpd - Win32 Release" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "libhttpd - Win32 Debug" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "libhttpd - Win32 Lexical" + +# PROP Ignore_Default_Tool 1 +# Begin Custom Build - Generating util_expr_parse.c/.h from util_expr_parse.y +InputPath=.\server\util_expr_parse.y + +BuildCmds= \ + bison -pap_expr_yy --defines=.\server\util_expr_parse.h -o .\server\util_expr_parse.c .\server\util_expr_parse.y + +".\server\util_expr_parse.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) + +".\server\util_expr_parse.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) +# End Custom Build + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\server\util_expr_scan.l + +!IF "$(CFG)" == "libhttpd - Win32 Release" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "libhttpd - Win32 Debug" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "libhttpd - Win32 Lexical" + +# PROP Ignore_Default_Tool 1 +# Begin Custom Build - Generating util_expr_scan.c from util_expr_scan.l +InputPath=.\server\util_expr_scan.l + +".\server\util_expr_scan.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + flex -Pap_expr_yy -o .\server\util_expr_scan.c .\server\util_expr_scan.l + +# End Custom Build + +!ENDIF + +# End Source File +# End Group # Begin Source File SOURCE=.\build\win32\httpd.rc diff --git a/modules/ssl/mod_ssl.dsp b/modules/ssl/mod_ssl.dsp index d7ab3fca6f4..6d738fe2e3a 100644 --- a/modules/ssl/mod_ssl.dsp +++ b/modules/ssl/mod_ssl.dsp @@ -19,7 +19,6 @@ CFG=mod_ssl - Win32 Release !MESSAGE !MESSAGE "mod_ssl - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE "mod_ssl - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "mod_ssl - Win32 Lexical" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE # Begin Project @@ -94,45 +93,12 @@ PostBuild_Desc=Embed .manifest PostBuild_Cmds=if exist $(TargetPath).manifest mt.exe -manifest $(TargetPath).manifest -outputresource:$(TargetPath);2 # End Special Build Tool -!ELSEIF "$(CFG)" == "mod_ssl - Win32 Lexical" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c -# ADD CPP /nologo /MD /W3 /O2 /Oy- /Zi /I "../../include" /I "../generators" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /I "../../srclib/openssl/inc32" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "WIN32_LEAN_AND_MEAN" /D "NO_IDEA" /D "NO_RC5" /D "NO_MDC2" /D "OPENSSL_NO_IDEA" /D "OPENSSL_NO_RC5" /D "OPENSSL_NO_MDC2" /D "HAVE_OPENSSL" /D "HAVE_SSL_SET_STATE" /D "HAVE_OPENSSL_ENGINE_H" /D "HAVE_ENGINE_INIT" /D "HAVE_ENGINE_LOAD_BUILTIN_ENGINES" /Fd"Release\mod_ssl_src" /FD /c -# ADD BASE MTL /nologo /D "NDEBUG" /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /fo"Release/mod_ssl.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_ssl.so" /d LONG_NAME="proxy_ssl_module for Apache" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib /nologo /subsystem:windows /dll /out:".\Release\mod_ssl.so" /base:@..\..\os\win32\BaseAddr.ref,mod_ssl.so -# ADD LINK32 kernel32.lib user32.lib wsock32.lib ws2_32.lib advapi32.lib gdi32.lib libeay32.lib ssleay32.lib /nologo /subsystem:windows /dll /incremental:no /debug /out:".\Release\mod_ssl.so" /libpath:"../../srclib/openssl/out32dll" /libpath:"../../srclib/openssl/out32" /base:@..\..\os\win32\BaseAddr.ref,mod_ssl.so /opt:ref -# Begin Special Build Tool -TargetPath=.\Release\mod_ssl.so -SOURCE="$(InputPath)" -PostBuild_Desc=Embed .manifest -PostBuild_Cmds=if exist $(TargetPath).manifest mt.exe -manifest $(TargetPath).manifest -outputresource:$(TargetPath);2 -# End Special Build Tool - !ENDIF # Begin Target # Name "mod_ssl - Win32 Release" # Name "mod_ssl - Win32 Debug" -# Name "mod_ssl - Win32 Lexical" # Begin Group "Source Files" # PROP Default_Filter "*.c" @@ -182,22 +148,6 @@ SOURCE=.\ssl_engine_vars.c # End Source File # Begin Source File -SOURCE=.\ssl_expr.c -# End Source File -# Begin Source File - -SOURCE=.\ssl_expr_eval.c -# End Source File -# Begin Source File - -SOURCE=.\ssl_expr_parse.c -# End Source File -# Begin Source File - -SOURCE=.\ssl_expr_scan.c -# End Source File -# Begin Source File - SOURCE=.\ssl_engine_ocsp.c # End Source File # Begin Source File @@ -230,18 +180,10 @@ SOURCE=.\mod_ssl.h # End Source File # Begin Source File -SOURCE=.\ssl_expr.h -# End Source File -# Begin Source File - SOURCE=.\ssl_private.h # End Source File # Begin Source File -SOURCE=.\ssl_expr_parse.h -# End Source File -# Begin Source File - SOURCE=.\ssl_toolkit_compat.h # End Source File # Begin Source File @@ -251,73 +193,6 @@ SOURCE=.\ssl_util_ssl.h # Begin Source File SOURCE=.\ssl_util_table.h -# End Source File -# End Group -# Begin Group "Generated Files" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=.\ssl_expr_parse.y - -!IF "$(CFG)" == "mod_ssl - Win32 Release" - -# PROP Exclude_From_Build 1 - -!ELSEIF "$(CFG)" == "mod_ssl - Win32 Debug" - -# PROP Exclude_From_Build 1 - -!ELSEIF "$(CFG)" == "mod_ssl - Win32 Lexical" - -# PROP Ignore_Default_Tool 1 -# Begin Custom Build - Generating ssl_expr_parse.c/.h from ssl_expr_parse.y -InputPath=.\ssl_expr_parse.y - -BuildCmds= \ - bison -y -d ssl_expr_parse.y \ - sed -e "s;yy;ssl_expr_yy;g" -e "/#if defined(c_plusplus) || defined(__cplusplus)/,/#endif/d" ssl_expr_parse.c \ - del y.tab.c \ - sed -e "s;yy;ssl_expr_yy;g" ssl_expr_parse.h \ - del y.tab.h - -"ssl_expr_parse.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"ssl_expr_parse.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) -# End Custom Build - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=.\ssl_expr_scan.l - -!IF "$(CFG)" == "mod_ssl - Win32 Release" - -# PROP Exclude_From_Build 1 - -!ELSEIF "$(CFG)" == "mod_ssl - Win32 Debug" - -# PROP Exclude_From_Build 1 - -!ELSEIF "$(CFG)" == "mod_ssl - Win32 Lexical" - -# PROP Ignore_Default_Tool 1 -# Begin Custom Build - Generating ssl_expr_scan.c from ssl_expr_scan.l -InputPath=.\ssl_expr_scan.l - -"ssl_expr_scan.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - flex -Pssl_expr_yy -s -B ssl_expr_scan.l - sed -e "/$$Header:/d" ssl_expr_scan.c - del lex.ssl_expr_yy.c - -# End Custom Build - -!ENDIF - # End Source File # End Group # Begin Source File diff --git a/server/util.c b/server/util.c index bafa68a4e42..3c6630c67b0 100644 --- a/server/util.c +++ b/server/util.c @@ -2249,7 +2249,7 @@ AP_DECLARE(int) ap_request_has_body(request_rec *r) return has_body; } -AP_DECLARE(apr_status_t) ap_pool_cleanup_set_null(void *data_) +AP_DECLARE_NONSTD(apr_status_t) ap_pool_cleanup_set_null(void *data_) { void **ptr = (void **)data_; *ptr = NULL; diff --git a/server/util_expr_parse.c b/server/util_expr_parse.c index e1b656ca351..59f7aec542b 100644 --- a/server/util_expr_parse.c +++ b/server/util_expr_parse.c @@ -111,7 +111,7 @@ enum yytokentype { T_TRUE = 258, T_FALSE = 259, - ERROR = 260, + T_ERROR = 260, T_DIGIT = 261, T_ID = 262, T_STRING = 263, @@ -502,8 +502,8 @@ static const yytype_uint8 yyrline[] = First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = { - "$end", "error", "$undefined", "T_TRUE", "T_FALSE", "ERROR", "T_DIGIT", - "T_ID", "T_STRING", "T_REGEX", "T_REGEX_I", "T_REGEX_BACKREF", + "$end", "error", "$undefined", "T_TRUE", "T_FALSE", "T_ERROR", + "T_DIGIT", "T_ID", "T_STRING", "T_REGEX", "T_REGEX_I", "T_REGEX_BACKREF", "T_OP_UNARY", "T_OP_BINARY", "T_STR_BEGIN", "T_STR_END", "T_VAR_BEGIN", "T_VAR_END", "T_OP_EQ", "T_OP_NE", "T_OP_LT", "T_OP_LE", "T_OP_GT", "T_OP_GE", "T_OP_REG", "T_OP_NRE", "T_OP_IN", "T_OP_STR_EQ", diff --git a/server/util_expr_parse.h b/server/util_expr_parse.h index f0f3431cb40..b75076db3fe 100644 --- a/server/util_expr_parse.h +++ b/server/util_expr_parse.h @@ -41,7 +41,7 @@ enum yytokentype { T_TRUE = 258, T_FALSE = 259, - ERROR = 260, + T_ERROR = 260, T_DIGIT = 261, T_ID = 262, T_STRING = 263, diff --git a/server/util_expr_parse.y b/server/util_expr_parse.y index 568597f7cab..38102587184 100644 --- a/server/util_expr_parse.y +++ b/server/util_expr_parse.y @@ -41,7 +41,7 @@ %token T_TRUE %token T_FALSE -%token ERROR +%token T_ERROR %token T_DIGIT %token T_ID @@ -107,7 +107,7 @@ int ap_expr_yylex(YYSTYPE *lvalp, void *scanner); %% root : expr { ctx->expr = $1; } - | ERROR { YYABORT; } + | T_ERROR { YYABORT; } ; expr : T_TRUE { $$ = ap_expr_make(op_True, NULL, NULL, ctx); } diff --git a/server/util_expr_scan.c b/server/util_expr_scan.c index a366134d87e..d7b1483cea9 100644 --- a/server/util_expr_scan.c +++ b/server/util_expr_scan.c @@ -599,7 +599,7 @@ static yyconst flex_int16_t yy_chk[319] = #define YY_EXTRA_TYPE ap_expr_parse_ctx* -#define PERROR(msg) yyextra->error2 = msg ; return ERROR; +#define PERROR(msg) yyextra->error2 = msg ; return T_ERROR; #define str_ptr (yyextra->scan_ptr) #define str_buf (yyextra->scan_buf) diff --git a/server/util_expr_scan.l b/server/util_expr_scan.l index 79bdbc16f90..6ca4afe9ed8 100644 --- a/server/util_expr_scan.l +++ b/server/util_expr_scan.l @@ -60,7 +60,7 @@ #define YY_EXTRA_TYPE ap_expr_parse_ctx* -#define PERROR(msg) yyextra->error2 = msg ; return ERROR; +#define PERROR(msg) yyextra->error2 = msg ; return T_ERROR; #define str_ptr (yyextra->scan_ptr) #define str_buf (yyextra->scan_buf)