]> granicus.if.org Git - apache/commitdiff
Here they are, real working examples [well, perhaps working.]
authorWilliam A. Rowe Jr <wrowe@apache.org>
Tue, 3 Apr 2001 00:27:16 +0000 (00:27 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Tue, 3 Apr 2001 00:27:16 +0000 (00:27 +0000)
  [Ben Laurie, Will Rowe]

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

CHANGES
STATUS
modules/experimental/mod_generic_hook_export.c
modules/experimental/mod_generic_hook_export.dsp [new file with mode: 0644]
modules/experimental/mod_generic_hook_export.h
modules/experimental/mod_generic_hook_import.c
modules/experimental/mod_generic_hook_import.dsp [new file with mode: 0644]

diff --git a/CHANGES b/CHANGES
index a82c992817a5268c6c84c953a96f781ed0e1da3f..224ce81bd7f48e72baa9f312627ce096eeef3b11 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,8 @@
 Changes with Apache 2.0.16-dev
 
+  *) Make generic hooks to work, with mod_generic_hook_import/export
+     experimental modules.  [Ben Laurie, Will Rowe]
+
   *) Fix segfaults for configuration file syntax errors such as
      "<Directory>" followed by "</Directory" and
      "<Directory>" followed by "</Directoryz>".  [Jeff Trawick]
diff --git a/STATUS b/STATUS
index 979bc32274d6552758fa3ab11ba4cd230dfd52e8..513cd7f27bd801302f24221b5dfe9623112c5505 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -1,5 +1,5 @@
 APACHE 2.0 STATUS:                                             -*-text-*-
-Last modified at [$Date: 2001/04/02 22:07:35 $]
+Last modified at [$Date: 2001/04/03 00:27:08 $]
 
 Release:
 
@@ -24,13 +24,6 @@ RELEASE SHOWSTOPPERS:
 
     WARNING: ALWAYS check srclib/apr/STATUS and srclib/apr-util/STATUS
 
-    * Generic Hooks are absolutely wrong in linkage, they are declared as
-      exported from APU, but actually exported from modules.  This needs
-      heavy fixup, which Bill will do on the plane tommorow.  The actual
-      'Apache' declaration is in Apache's files, with the 'explicit linkage'
-      flavor in apr-util.  (Unless you folks will finally buckle and accept
-      the linkspec in hook declarations.  I'm not holding my breath.)
-
     * Root all file systems with <Directory /> for WIN32/OS2/NW permissions 
         Status: patch brought forward from 1.3.14
                 WIN32 and OS2 need review [William Rowe, Brian Harvard]
index fd7e28de1d05e65c8948d4c3526ca2b3b278b043..38ee86815d31347baeea1c2471072485d11d1e2d 100644 (file)
@@ -57,8 +57,8 @@
 #include "mod_generic_hook_export.h"
 #include "http_protocol.h"
 
-AP_IMPLEMENT_GENERIC_HOOK_RUN_ALL(int,generic_hook_test,(const char *szStr),
-                                 (szStr),OK,DECLINED)
+APR_IMPLEMENT_GENERIC_HOOK_RUN_ALL(ap,AP_MODULE,int,generic_hook_test,(const char *szStr),
+                                  (szStr),OK,DECLINED)
 
 static int ExportLogTransaction(request_rec *r)
 {
diff --git a/modules/experimental/mod_generic_hook_export.dsp b/modules/experimental/mod_generic_hook_export.dsp
new file mode 100644 (file)
index 0000000..711a041
--- /dev/null
@@ -0,0 +1,95 @@
+# Microsoft Developer Studio Project File - Name="mod_generic_hook_export" - 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_generic_hook_export - Win32 Release
+!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_generic_hook_export.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_generic_hook_export.mak" CFG="mod_generic_hook_export - Win32 Release"
+!MESSAGE 
+!MESSAGE Possible choices for configuration are:
+!MESSAGE 
+!MESSAGE "mod_generic_hook_export - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "mod_generic_hook_export - 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_generic_hook_export - 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 /I "..\..\include" /I "..\..\os\win32" /I "..\..\srclib\apr\include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fd"Release\mod_generic_hook_export" /FD /c
+# ADD BASE MTL /nologo /D "NDEBUG" /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x809 /d "NDEBUG"
+# ADD RSC /l 0x809 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib /nologo /subsystem:windows /dll /incremental:no /map /out:"Release/mod_generic_hook_export.so" /machine:I386
+# ADD LINK32 kernel32.lib /nologo /subsystem:windows /dll /incremental:no /map /out:"Release/mod_generic_hook_export.so" /machine:I386
+
+!ELSEIF  "$(CFG)" == "mod_generic_hook_export - 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 "..\..\os\win32" /I "..\..\srclib\apr\include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fd"Debug\mod_generic_hook_export" /FD /c
+# ADD BASE MTL /nologo /D "_DEBUG" /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x809 /d "_DEBUG"
+# ADD RSC /l 0x809 /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 /map /debug /out:"Debug/mod_generic_hook_export.so" /machine:I386
+# ADD LINK32 kernel32.lib /nologo /subsystem:windows /dll /incremental:no /map/debug /out:"Debug/mod_generic_hook_export.so" /machine:I386
+
+!ENDIF 
+
+# Begin Target
+
+# Name "mod_generic_hook_export - Win32 Release"
+# Name "mod_generic_hook_export - Win32 Debug"
+# Begin Source File
+
+SOURCE=.\mod_generic_hook_export.c
+# End Source File
+# End Target
+# End Project
index 0f17fbbe2d3c717917c78f810f52b31804440d75..a55d2f227cad55b5ae324d914984c9becb3cab25 100644 (file)
@@ -57,6 +57,6 @@
 
 #include "apr_generic_hook.h"
 
-AP_DECLARE_HOOK(int,generic_hook_test,(const char *))
+APR_DECLARE_EXTERNAL_HOOK(ap,AP_MODULE,int,generic_hook_test,(const char *))
 
 #endif /* def MOD_GENERIC_HOOK_EXPORT_H */
index cf060512eacb075284e0fda326c9df65c79cb643..f46fa44df5f39a101f6061b6f8bfb1e3f33859b7 100644 (file)
@@ -67,7 +67,7 @@ static int ImportGenericHookTestHook(const char *szStr)
 
 static void ImportRegisterHooks(apr_pool_t *p)
 {
-    APR_HOOK_GENERIC(generic_hook_test,ImportGenericHookTestHook,NULL,NULL,
+    APR_HOOK_GENERIC(ap,generic_hook_test,ImportGenericHookTestHook,NULL,NULL,
                    APR_HOOK_MIDDLE);
 }
 
diff --git a/modules/experimental/mod_generic_hook_import.dsp b/modules/experimental/mod_generic_hook_import.dsp
new file mode 100644 (file)
index 0000000..7806829
--- /dev/null
@@ -0,0 +1,95 @@
+# Microsoft Developer Studio Project File - Name="mod_generic_hook_import" - 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_generic_hook_import - Win32 Release
+!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_generic_hook_import.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_generic_hook_import.mak" CFG="mod_generic_hook_import - Win32 Release"
+!MESSAGE 
+!MESSAGE Possible choices for configuration are:
+!MESSAGE 
+!MESSAGE "mod_generic_hook_import - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "mod_generic_hook_import - 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_generic_hook_import - 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 /I "..\..\include" /I "..\..\os\win32" /I "..\..\srclib\apr\include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fd"Release\mod_generic_hook_import" /FD /c
+# ADD BASE MTL /nologo /D "NDEBUG" /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x809 /d "NDEBUG"
+# ADD RSC /l 0x809 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib /nologo /subsystem:windows /dll /incremental:no /map /out:"Release/mod_generic_hook_import.so" /machine:I386
+# ADD LINK32 kernel32.lib /nologo /subsystem:windows /dll /incremental:no /map /out:"Release/mod_generic_hook_import.so" /machine:I386
+
+!ELSEIF  "$(CFG)" == "mod_generic_hook_import - 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 "..\..\os\win32" /I "..\..\srclib\apr\include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fd"Debug\mod_generic_hook_import" /FD /c
+# ADD BASE MTL /nologo /D "_DEBUG" /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x809 /d "_DEBUG"
+# ADD RSC /l 0x809 /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 /map /debug /out:"Debug/mod_generic_hook_import.so" /machine:I386
+# ADD LINK32 kernel32.lib /nologo /subsystem:windows /dll /incremental:no /map/debug /out:"Debug/mod_generic_hook_import.so" /machine:I386
+
+!ENDIF 
+
+# Begin Target
+
+# Name "mod_generic_hook_import - Win32 Release"
+# Name "mod_generic_hook_import - Win32 Debug"
+# Begin Source File
+
+SOURCE=.\mod_generic_hook_import.c
+# End Source File
+# End Target
+# End Project