]> granicus.if.org Git - apache/commitdiff
fix mod_status compilation on Win32 (stolen from mod_dav).
authorAndré Malo <nd@apache.org>
Tue, 22 Jul 2003 20:01:43 +0000 (20:01 +0000)
committerAndré Malo <nd@apache.org>
Tue, 22 Jul 2003 20:01:43 +0000 (20:01 +0000)
We should consider a rename of AP_*_HOOK_* to CORE_*_HOOK_* ;-)

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

modules/generators/mod_status.c
modules/generators/mod_status.dsp
modules/generators/mod_status.h

index 3aee4d98630fd205fd8ebacc17404555d5928b77..cb416d4b1d67b9f7c74c30b99135a5354a62ad63 100644 (file)
@@ -143,10 +143,10 @@ module AP_MODULE_DECLARE_DATA status_module;
 int server_limit, thread_limit;
 
 /* Implement 'ap_run_status_hook'. */
-AP_IMPLEMENT_OPTIONAL_HOOK_RUN_ALL(int,status_hook,
-                                   (request_rec *r, int flags),
-                                   (r, flags),
-                                   OK, DECLINED)
+APR_IMPLEMENT_OPTIONAL_HOOK_RUN_ALL(ap, STATUS, int, status_hook,
+                                    (request_rec *r, int flags),
+                                    (r, flags),
+                                    OK, DECLINED)
 
 /*
  * command-related code. This is here to prevent use of ExtendedStatus
index 7a47527de85bcd4ac46a6f7e9080298d4716b440..b9d1f2a3e52ee10b3f6d301b18de31515315d027 100644 (file)
@@ -42,8 +42,8 @@ RSC=rc.exe
 # 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 /Zi /O2 /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fd"Release\mod_status_src" /FD /c
+# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "STATUS_DECLARE_EXPORT" /FD /c
+# ADD CPP /nologo /MD /W3 /Zi /O2 /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "STATUS_DECLARE_EXPORT" /Fd"Release\mod_status_src" /FD /c
 # ADD BASE MTL /nologo /D "NDEBUG" /win32
 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
 # ADD BASE RSC /l 0x409 /d "NDEBUG"
@@ -68,8 +68,8 @@ LINK32=link.exe
 # 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" /Fd"Debug\mod_status_src" /FD /c
+# ADD BASE CPP /nologo /MDd /W3 /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "STATUS_DECLARE_EXPORT" /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 "STATUS_DECLARE_EXPORT" /Fd"Debug\mod_status_src" /FD /c
 # ADD BASE MTL /nologo /D "_DEBUG" /win32
 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
 # ADD BASE RSC /l 0x409 /d "_DEBUG"
index 6dd8f05eb5ac381f15ff454448dd2aa01071f8bd..c828efbad7b06e3708280e5d6535949e82790584 100644 (file)
 #define AP_STATUS_NOTABLE  (0x2)  /* HTML report without tables */
 #define AP_STATUS_EXTENDED (0x4)  /* detailed report */
 
+#if !defined(WIN32)
+#define STATUS_DECLARE(type)            type
+#define STATUS_DECLARE_NONSTD(type)     type
+#define STATUS_DECLARE_DATA
+#elif defined(STATUS_DECLARE_STATIC)
+#define STATUS_DECLARE(type)            type __stdcall
+#define STATUS_DECLARE_NONSTD(type)     type
+#define STATUS_DECLARE_DATA
+#elif defined(STATUS_DECLARE_EXPORT)
+#define STATUS_DECLARE(type)            __declspec(dllexport) type __stdcall
+#define STATUS_DECLARE_NONSTD(type)     __declspec(dllexport) type
+#define STATUS_DECLARE_DATA             __declspec(dllexport)
+#else
+#define STATUS_DECLARE(type)            __declspec(dllimport) type __stdcall
+#define STATUS_DECLARE_NONSTD(type)     __declspec(dllimport) type
+#define STATUS_DECLARE_DATA             __declspec(dllimport)
+#endif
+
 /* Optional hooks which can insert extra content into the mod_status
  * output.  FLAGS will be set to the bitwise OR of any of the
  * AP_STATUS_* flags.
@@ -69,6 +87,6 @@
  * Implementations of this hook should generate content using
  * functions in the ap_rputs/ap_rprintf family; each hook should
  * return OK or DECLINED. */
-AP_DECLARE_HOOK(int, status_hook, (request_rec *r, int flags))
-
+APR_DECLARE_EXTERNAL_HOOK(ap, STATUS, int, status_hook,
+                          (request_rec *r, int flags))
 #endif