From: William A. Rowe Jr Date: Fri, 16 Dec 2005 20:38:12 +0000 (+0000) Subject: Backport Win32 build fixes for mod_dbd and mod_authn_dbd X-Git-Tag: 2.2.1~178 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dc245c29909ff76e52bfb1ff5b125e6d7e52628f;p=thirdparty%2Fapache%2Fhttpd.git Backport Win32 build fixes for mod_dbd and mod_authn_dbd http://people.apache.org/~colm/httpd-2.2.0-dbd-win32.patch Submitted by: colm Reviewed by: pquerna, niq, wrowe git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@357224 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/Apache.dsw b/Apache.dsw index c99e624567c..84a00b131ae 100644 --- a/Apache.dsw +++ b/Apache.dsw @@ -81,6 +81,9 @@ Package=<4> Project_Dep_Name mod_authn_anon End Project Dependency Begin Project Dependency + Project_Dep_Name mod_authn_dbd + End Project Dependency + Begin Project Dependency Project_Dep_Name mod_authn_dbm End Project Dependency Begin Project Dependency @@ -126,6 +129,9 @@ Package=<4> Project_Dep_Name mod_dav_fs End Project Dependency Begin Project Dependency + Project_Dep_Name mod_dbd + End Project Dependency + Begin Project Dependency Project_Dep_Name mod_dir End Project Dependency Begin Project Dependency @@ -747,6 +753,33 @@ Package=<4> ############################################################################### +Project: "mod_authn_dbd"=.\modules\aaa\mod_authn_dbd.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name libapr + End Project Dependency + Begin Project Dependency + Project_Dep_Name libaprutil + End Project Dependency + Begin Project Dependency + Project_Dep_Name libhttpd + End Project Dependency + Begin Project Dependency + Project_Dep_Name mod_auth_basic + End Project Dependency + Begin Project Dependency + Project_Dep_Name mod_dbd + End Project Dependency +}}} + +############################################################################### + Project: "mod_authn_dbm"=.\modules\aaa\mod_authn_dbm.dsp - Package Owner=<4> Package=<5> @@ -1110,6 +1143,27 @@ Package=<4> ############################################################################### +Project: "mod_dbd"=.\modules\database\mod_dbd.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name libapr + End Project Dependency + Begin Project Dependency + Project_Dep_Name libaprutil + End Project Dependency + Begin Project Dependency + Project_Dep_Name libhttpd + End Project Dependency +}}} + +############################################################################### + Project: "mod_deflate"=.\modules\filters\mod_deflate.dsp - Package Owner=<4> Package=<5> diff --git a/Makefile.win b/Makefile.win index c656b6ea905..2a4049b8e43 100644 --- a/Makefile.win +++ b/Makefile.win @@ -216,6 +216,7 @@ _build: $(MAKE) $(MAKEOPT) -f mod_auth_basic.mak CFG="mod_auth_basic - Win32 $(LONG)" RECURSE=0 $(CTARGET) $(MAKE) $(MAKEOPT) -f mod_auth_digest.mak CFG="mod_auth_digest - Win32 $(LONG)" RECURSE=0 $(CTARGET) $(MAKE) $(MAKEOPT) -f mod_authn_anon.mak CFG="mod_authn_anon - Win32 $(LONG)" RECURSE=0 $(CTARGET) + $(MAKE) $(MAKEOPT) -f mod_authn_dbd.mak CFG="mod_authn_dbd - Win32 $(LONG)" RECURSE=0 $(CTARGET) $(MAKE) $(MAKEOPT) -f mod_authn_dbm.mak CFG="mod_authn_dbm - Win32 $(LONG)" RECURSE=0 $(CTARGET) $(MAKE) $(MAKEOPT) -f mod_authn_default.mak CFG="mod_authn_default - Win32 $(LONG)" RECURSE=0 $(CTARGET) $(MAKE) $(MAKEOPT) -f mod_authn_file.mak CFG="mod_authn_file - Win32 $(LONG)" RECURSE=0 $(CTARGET) @@ -235,6 +236,9 @@ _build: $(MAKE) $(MAKEOPT) -f mod_mem_cache.mak CFG="mod_mem_cache - Win32 $(LONG)" RECURSE=0 $(CTARGET) $(MAKE) $(MAKEOPT) -f mod_disk_cache.mak CFG="mod_disk_cache - Win32 $(LONG)" RECURSE=0 $(CTARGET) cd ..\.. + cd modules\database + $(MAKE) $(MAKEOPT) -f mod_dbd.mak CFG="mod_dbd - Win32 $(LONG)" RECURSE=0 $(CTARGET) + cd ..\.. cd modules\dav\main $(MAKE) $(MAKEOPT) -f mod_dav.mak CFG="mod_dav - Win32 $(LONG)" RECURSE=0 $(CTARGET) cd ..\..\.. @@ -382,6 +386,7 @@ _copybin: copy modules\aaa\$(LONG)\mod_auth_basic.$(src_so) "$(inst_so)" <.y copy modules\aaa\$(LONG)\mod_auth_digest.$(src_so) "$(inst_so)" <.y copy modules\aaa\$(LONG)\mod_authn_anon.$(src_so) "$(inst_so)" <.y + copy modules\aaa\$(LONG)\mod_authn_dbd.$(src_so) "$(inst_so)" <.y copy modules\aaa\$(LONG)\mod_authn_dbm.$(src_so) "$(inst_so)" <.y copy modules\aaa\$(LONG)\mod_authn_default.$(src_so) "$(inst_so)" <.y copy modules\aaa\$(LONG)\mod_authn_file.$(src_so) "$(inst_so)" <.y @@ -396,6 +401,7 @@ _copybin: copy modules\cache\$(LONG)\mod_file_cache.$(src_so) "$(inst_so)" <.y copy modules\cache\$(LONG)\mod_mem_cache.$(src_so) "$(inst_so)" <.y copy modules\cache\$(LONG)\mod_disk_cache.$(src_so) "$(inst_so)" <.y + copy modules\database\$(LONG)\mod_dbd.$(src_so) "$(inst_so)" <.y copy modules\dav\fs\$(LONG)\mod_dav_fs.$(src_so) "$(inst_so)" <.y copy modules\dav\main\$(LONG)\mod_dav.$(src_so) "$(inst_so)" <.y copy modules\debug\$(LONG)\mod_bucketeer.$(src_so) "$(inst_so)" <.y diff --git a/STATUS b/STATUS index 98be9b0b4a9..237c966efe2 100644 --- a/STATUS +++ b/STATUS @@ -76,9 +76,6 @@ RELEASE SHOWSTOPPERS: PATCHES ACCEPTED TO BACKPORT FROM TRUNK: [ start all new proposals below, under PATCHES PROPOSED. ] - * Backport Win32 build fixes for mod_dbd and mod_authn_dbd - http://people.apache.org/~colm/httpd-2.2.0-dbd-win32.patch - +1: colm, pquerna, niq PATCHES PROPOSED TO BACKPORT FROM TRUNK: diff --git a/modules/aaa/mod_authn_dbd.dsp b/modules/aaa/mod_authn_dbd.dsp new file mode 100644 index 00000000000..d7ffe51a0d1 --- /dev/null +++ b/modules/aaa/mod_authn_dbd.dsp @@ -0,0 +1,132 @@ +# Microsoft Developer Studio Project File - Name="mod_authn_dbd" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 + +CFG=mod_authn_dbd - 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 "mod_authn_dbd.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 "mod_authn_dbd.mak" CFG="mod_authn_dbd - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "mod_authn_dbd - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "mod_authn_dbd - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "mod_authn_dbd - Win32 Release" + +# 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 "../../srclib/apr/include" /I "../../srclib/apr-util/include" /I ../database /D DBD_DECLARE_EXPORT /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fd"Release\mod_authn_dbd_src" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o /win32 "NUL" +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o /win32 "NUL" +# 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 /nologo /subsystem:windows /dll /machine:I386 /out:"Release/mod_authn_dbd.so" /base:@..\..\os\win32\BaseAddr.ref,mod_authn_dbd.so +# ADD LINK32 kernel32.lib /nologo /subsystem:windows /dll /incremental:no /debug /machine:I386 /out:"Release/mod_authn_dbd.so" /base:@..\..\os\win32\BaseAddr.ref,mod_authn_dbd.so /opt:ref + +!ELSEIF "$(CFG)" == "mod_authn_dbd - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FD /c +# ADD CPP /nologo /MDd /W3 /GX /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /I ../database /D DBD_DECLARE_EXPORT /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fd"Debug\mod_authn_dbd_src" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o /win32 "NUL" +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o /win32 "NUL" +# 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 /nologo /subsystem:windows /dll /incremental:no /debug /machine:I386 /out:"Debug/mod_authn_dbd.so" /base:@..\..\os\win32\BaseAddr.ref,mod_authn_dbd.so +# ADD LINK32 kernel32.lib /nologo /subsystem:windows /dll /incremental:no /debug /machine:I386 /out:"Debug/mod_authn_dbd.so" /base:@..\..\os\win32\BaseAddr.ref,mod_authn_dbd.so + +!ENDIF + +# Begin Target + +# Name "mod_authn_dbd - Win32 Release" +# Name "mod_authn_dbd - Win32 Debug" +# Begin Source File + +SOURCE=..\database\mod_dbd.h +# End Source File +# Begin Source File + +SOURCE=.\mod_authn_dbd.c +# End Source File +# Begin Source File + +SOURCE=.\mod_authn_dbd.rc +# End Source File +# Begin Source File + +SOURCE=..\..\build\win32\win32ver.awk + +!IF "$(CFG)" == "mod_authn_dbd - Win32 Release" + +# PROP Ignore_Default_Tool 1 +# Begin Custom Build - Creating Version Resource +InputPath=..\..\build\win32\win32ver.awk + +".\mod_authn_dbd.rc" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + awk -f ../../build/win32/win32ver.awk mod_authn_dbd.so "auth_basic_module for Apache" ../../include/ap_release.h > .\mod_authn_dbd.rc + +# End Custom Build + +!ELSEIF "$(CFG)" == "mod_authn_dbd - Win32 Debug" + +# PROP Ignore_Default_Tool 1 +# Begin Custom Build - Creating Version Resource +InputPath=..\..\build\win32\win32ver.awk + +".\mod_authn_dbd.rc" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + awk -f ../../build/win32/win32ver.awk mod_authn_dbd.so "auth_basic_module for Apache" ../../include/ap_release.h > .\mod_authn_dbd.rc + +# End Custom Build + +!ENDIF + +# End Source File +# End Target +# End Project diff --git a/modules/database/mod_dbd.c b/modules/database/mod_dbd.c index 678d36ee63a..2cab60a687d 100644 --- a/modules/database/mod_dbd.c +++ b/modules/database/mod_dbd.c @@ -119,7 +119,7 @@ static const char *dbd_param(cmd_parms *cmd, void *cfg, const char *val) } return NULL; } -AP_DECLARE(void) ap_dbd_prepare(server_rec *s, const char *query, +DBD_DECLARE_NONSTD(void) ap_dbd_prepare(server_rec *s, const char *query, const char *label) { svr_cfg *svr = ap_get_module_config(s->module_config, &dbd_module); @@ -300,7 +300,7 @@ static apr_status_t dbd_setup(apr_pool_t *pool, server_rec *s) - open acquires a connection from the pool (opens one if necessary) - close releases it back in to the pool */ -AP_DECLARE(void) ap_dbd_close(server_rec *s, ap_dbd_t *sql) +DBD_DECLARE_NONSTD(void) ap_dbd_close(server_rec *s, ap_dbd_t *sql) { svr_cfg *svr = ap_get_module_config(s->module_config, &dbd_module); if (!svr->persist) { @@ -319,7 +319,7 @@ static apr_status_t dbd_close(void *CONN) } #define arec ((ap_dbd_t*)rec) #if APR_HAS_THREADS -AP_DECLARE(ap_dbd_t*) ap_dbd_open(apr_pool_t *pool, server_rec *s) +DBD_DECLARE_NONSTD(ap_dbd_t*) ap_dbd_open(apr_pool_t *pool, server_rec *s) { void *rec = NULL; svr_cfg *svr = ap_get_module_config(s->module_config, &dbd_module); @@ -356,7 +356,7 @@ AP_DECLARE(ap_dbd_t*) ap_dbd_open(apr_pool_t *pool, server_rec *s) return arec; } #else -AP_DECLARE(ap_dbd_t*) ap_dbd_open(apr_pool_t *pool, server_rec *s) +DBD_DECLARE_NONSTD(ap_dbd_t*) ap_dbd_open(apr_pool_t *pool, server_rec *s) { apr_status_t rv = APR_SUCCESS; const char *errmsg; @@ -405,7 +405,7 @@ static apr_status_t dbd_release(void *REQ) apr_reslist_release(req->dbpool, req->conn); return APR_SUCCESS; } -AP_DECLARE(ap_dbd_t *) ap_dbd_acquire(request_rec *r) +DBD_DECLARE_NONSTD(ap_dbd_t *) ap_dbd_acquire(request_rec *r) { svr_cfg *svr; dbd_pool_rec *req = ap_get_module_config(r->request_config, &dbd_module); @@ -428,7 +428,7 @@ AP_DECLARE(ap_dbd_t *) ap_dbd_acquire(request_rec *r) } return req->conn; } -AP_DECLARE(ap_dbd_t *) ap_dbd_cacquire(conn_rec *c) +DBD_DECLARE_NONSTD(ap_dbd_t *) ap_dbd_cacquire(conn_rec *c) { svr_cfg *svr; dbd_pool_rec *req = ap_get_module_config(c->conn_config, &dbd_module); @@ -452,7 +452,7 @@ AP_DECLARE(ap_dbd_t *) ap_dbd_cacquire(conn_rec *c) return req->conn; } #else -AP_DECLARE(ap_dbd_t *) ap_dbd_acquire(request_rec *r) +DBD_DECLARE_NONSTD(ap_dbd_t *) ap_dbd_acquire(request_rec *r) { svr_cfg *svr; ap_dbd_t *ret = ap_get_module_config(r->request_config, &dbd_module); @@ -470,7 +470,7 @@ AP_DECLARE(ap_dbd_t *) ap_dbd_acquire(request_rec *r) } return ret; } -AP_DECLARE(ap_dbd_t *) ap_dbd_cacquire(conn_rec *c) +DBD_DECLARE_NONSTD(ap_dbd_t *) ap_dbd_cacquire(conn_rec *c) { svr_cfg *svr; ap_dbd_t *ret = ap_get_module_config(c->conn_config, &dbd_module); diff --git a/modules/database/mod_dbd.dsp b/modules/database/mod_dbd.dsp new file mode 100644 index 00000000000..b4575597ac8 --- /dev/null +++ b/modules/database/mod_dbd.dsp @@ -0,0 +1,132 @@ +# Microsoft Developer Studio Project File - Name="mod_dbd" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 + +CFG=mod_dbd - 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 "mod_dbd.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 "mod_dbd.mak" CFG="mod_dbd - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "mod_dbd - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "mod_dbd - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "mod_dbd - Win32 Release" + +# 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 "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "DBD_DECLARE_EXPORT" /Fd"Release\mod_dbd_src" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o /win32 "NUL" +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o /win32 "NUL" +# 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 /nologo /subsystem:windows /dll /machine:I386 /out:"Release/mod_dbd.so" /base:@..\..\os\win32\BaseAddr.ref,mod_dbd.so +# ADD LINK32 kernel32.lib /nologo /subsystem:windows /dll /incremental:no /debug /machine:I386 /out:"Release/mod_dbd.so" /base:@..\..\os\win32\BaseAddr.ref,mod_dbd.so /opt:ref + +!ELSEIF "$(CFG)" == "mod_dbd - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FD /c +# ADD CPP /nologo /MDd /W3 /GX /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "DBD_DECLARE_EXPORT" /Fd"Debug\mod_dbd_src" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o /win32 "NUL" +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o /win32 "NUL" +# 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 /nologo /subsystem:windows /dll /incremental:no /debug /machine:I386 /out:"Debug/mod_dbd.so" /base:@..\..\os\win32\BaseAddr.ref,mod_dbd.so +# ADD LINK32 kernel32.lib /nologo /subsystem:windows /dll /incremental:no /debug /machine:I386 /out:"Debug/mod_dbd.so" /base:@..\..\os\win32\BaseAddr.ref,mod_dbd.so + +!ENDIF + +# Begin Target + +# Name "mod_dbd - Win32 Release" +# Name "mod_dbd - Win32 Debug" +# Begin Source File + +SOURCE=.\mod_dbd.h +# End Source File +# Begin Source File + +SOURCE=.\mod_dbd.c +# End Source File +# Begin Source File + +SOURCE=.\mod_dbd.rc +# End Source File +# Begin Source File + +SOURCE=..\..\build\win32\win32ver.awk + +!IF "$(CFG)" == "mod_dbd - Win32 Release" + +# PROP Ignore_Default_Tool 1 +# Begin Custom Build - Creating Version Resource +InputPath=..\..\build\win32\win32ver.awk + +".\mod_dbd.rc" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + awk -f ../../build/win32/win32ver.awk mod_dbd.so "dbd_module for Apache" ../../include/ap_release.h > .\mod_dbd.rc + +# End Custom Build + +!ELSEIF "$(CFG)" == "mod_dbd - Win32 Debug" + +# PROP Ignore_Default_Tool 1 +# Begin Custom Build - Creating Version Resource +InputPath=..\..\build\win32\win32ver.awk + +".\mod_dbd.rc" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + awk -f ../../build/win32/win32ver.awk mod_dbd.so "dbd_module for Apache" ../../include/ap_release.h > .\mod_dbd.rc + +# End Custom Build + +!ENDIF + +# End Source File +# End Target +# End Project diff --git a/modules/database/mod_dbd.h b/modules/database/mod_dbd.h index 83f2535d1c8..d2ba3b30e6c 100644 --- a/modules/database/mod_dbd.h +++ b/modules/database/mod_dbd.h @@ -32,6 +32,27 @@ #ifndef DBD_H #define DBD_H +/* Create a set of DBD_DECLARE(type), DBD_DECLARE_NONSTD(type) and + * DBD_DECLARE_DATA with appropriate export and import tags for the platform + */ +#if !defined(WIN32) +#define DBD_DECLARE(type) type +#define DBD_DECLARE_NONSTD(type) type +#define DBD_DECLARE_DATA +#elif defined(DBD_DECLARE_STATIC) +#define DBD_DECLARE(type) type __stdcall +#define DBD_DECLARE_NONSTD(type) type +#define DBD_DECLARE_DATA +#elif defined(DBD_DECLARE_EXPORT) +#define DBD_DECLARE(type) __declspec(dllexport) type __stdcall +#define DBD_DECLARE_NONSTD(type) __declspec(dllexport) type +#define DBD_DECLARE_DATA __declspec(dllexport) +#else +#define DBD_DECLARE(type) __declspec(dllimport) type __stdcall +#define DBD_DECLARE_NONSTD(type) __declspec(dllimport) type +#define DBD_DECLARE_DATA __declspec(dllimport) +#endif + #include #include #include @@ -47,28 +68,28 @@ typedef struct { /* acquire a connection that MUST be explicitly closed. * Returns NULL on error */ -AP_DECLARE(ap_dbd_t*) ap_dbd_open(apr_pool_t*, server_rec*); +DBD_DECLARE_NONSTD(ap_dbd_t*) ap_dbd_open(apr_pool_t*, server_rec*); /* release a connection acquired with ap_dbd_open */ -AP_DECLARE(void) ap_dbd_close(server_rec*, ap_dbd_t*); +DBD_DECLARE_NONSTD(void) ap_dbd_close(server_rec*, ap_dbd_t*); /* acquire a connection that will have the lifetime of a request * and MUST NOT be explicitly closed. Return NULL on error. * This is the preferred function for most applications. */ -AP_DECLARE(ap_dbd_t*) ap_dbd_acquire(request_rec*); +DBD_DECLARE_NONSTD(ap_dbd_t*) ap_dbd_acquire(request_rec*); /* acquire a connection that will have the lifetime of a connection * and MUST NOT be explicitly closed. Return NULL on error. * This is the preferred function for most applications. */ -AP_DECLARE(ap_dbd_t*) ap_dbd_cacquire(conn_rec*); +DBD_DECLARE_NONSTD(ap_dbd_t*) ap_dbd_cacquire(conn_rec*); /* Prepare a statement for use by a client module during * the server startup/configuration phase. Can't be called * after the server has created its children (use apr_dbd_*). */ -AP_DECLARE(void) ap_dbd_prepare(server_rec*, const char*, const char*); +DBD_DECLARE_NONSTD(void) ap_dbd_prepare(server_rec*, const char*, const char*); /* Also export them as optional functions for modules that prefer it */ APR_DECLARE_OPTIONAL_FN(ap_dbd_t*, ap_dbd_open, (apr_pool_t*, server_rec*));