]> code.citadel.org Git - citadel.git/commitdiff
1998-09-15 Nathan Bryant <bryant@cs.usm.maine.edu>
authorNathan Bryant <loanshark@uncensored.citadel.org>
Tue, 15 Sep 1998 21:16:59 +0000 (21:16 +0000)
committerNathan Bryant <loanshark@uncensored.citadel.org>
Tue, 15 Sep 1998 21:16:59 +0000 (21:16 +0000)
        * Makefile.in: remove support.o from serv_chat.so, add -fPIC to compile
          flags for serv_chat.o
        * dynloader.c: include "sysdep_decls.h", use RTLD_NOW not RTLD_LAZY
        * dynloader.h: prototype CtdlRegisterHook()
        * .cvsignore: added data

citadel/.cvsignore
citadel/ChangeLog
citadel/Makefile.in
citadel/dynloader.c
citadel/dynloader.h

index f85ce8cad916477f504bd10885a7b9449eda0815..1bef1e6a7676cb8e725902158a141eb2ab3d261b 100644 (file)
@@ -25,3 +25,4 @@ calllog
 citadel.control
 userlist
 citadel.log
+data
index 6df55359f593518addd148d24d78a9b451574e5c..ec45b69a9bddb024a2d8983fa269c390e46d4383 100644 (file)
@@ -1,3 +1,10 @@
+1998-09-15 Nathan Bryant <bryant@cs.usm.maine.edu>
+       * Makefile.in: remove support.o from serv_chat.so, add -fPIC to compile
+         flags for serv_chat.o
+       * dynloader.c: include "sysdep_decls.h", use RTLD_NOW not RTLD_LAZY
+       * dynloader.h: prototype CtdlRegisterHook()
+       * .cvsignore: added data
+
 Mon Sep 14 20:49:08 EDT 1998 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
        * Tried my hand at adding the ability for server extensions to
          register various types of "hooks" in addition to just adding
index 9c733ec66920a673468534ace203001bb3ac60c1..8000aeede1cb5c5477dfcc2c25635367fa02571c 100644 (file)
@@ -101,11 +101,11 @@ msgbase.o: msgbase.c citadel.h sysdep.h sysconfig.h ipcdef.h server.h
 locate_host.o: locate_host.c citadel.h sysdep.h sysconfig.h ipcdef.h server.h
        $(CC) $(CFLAGS) -D_REENTRANT -c locate_host.c
 
-$(MODDIR)/serv_chat.so: serv_chat.o support.o
-       $(CC) -shared -o $(MODDIR)/serv_chat.so serv_chat.o support.o
+$(MODDIR)/serv_chat.so: serv_chat.o
+       $(CC) -shared -o $(MODDIR)/serv_chat.so serv_chat.o
 
 serv_chat.o: serv_chat.c citadel.h sysdep.h sysconfig.h ipcdef.h server.h
-       $(CC) $(CFLAGS) -D_REENTRANT -c serv_chat.c
+       $(CC) $(CFLAGS) -D_REENTRANT -fPIC -c serv_chat.c
 
 housekeeping.o: housekeeping.c citadel.h sysdep.h sysconfig.h ipcdef.h server.h
        $(CC) $(CFLAGS) -D_REENTRANT -c housekeeping.c
index be34eb6993a2c4cf9f2e050606f01f971234bea3..f9ac2c5da4135ea770e7bf1015bd926c4a822da9 100644 (file)
@@ -18,6 +18,7 @@
 #include "dynloader.h"
 #include "citadel.h"
 #include "server.h"
+#include "sysdep_decls.h"
 
 symtab *global_symtab;
 
@@ -35,7 +36,7 @@ int DLoader_Exec_Cmd(char *cmdbuf)
       
    if (t_sym)
    {
-      if (!(fcn_handle = dlopen(t_sym->module_path, RTLD_LAZY)))
+      if (!(fcn_handle = dlopen(t_sym->module_path, RTLD_NOW)))
       {
          dl_error = dlerror();
          syslog(LOG_NOTICE, "WARNING: module %s failed to load", t_sym->module_path);
@@ -117,7 +118,7 @@ void DLoader_Init(char *pathname, symtab **my_symtab)
    
       filename = strdup(dptr->d_name);
       snprintf(pathbuf, 512, "%s/%s", pathname, filename);
-      if (!(fcn_handle = dlopen(pathbuf, RTLD_LAZY)))
+      if (!(fcn_handle = dlopen(pathbuf, RTLD_NOW)))
       {
          dl_error = dlerror();
          fprintf(stderr, "DLoader_Init dlopen failed (%s)", dl_error);
index fb36c3e1d65f8c07c7782514197f2b6c761cc774..db03102f16a5f670fa5fe7f83b4dba0cc1df6ea9 100644 (file)
@@ -18,3 +18,4 @@ typedef struct s_symtab
 void DLoader_Init(char *pathname, symtab **);
 int DLoader_Exec_Cmd(char *cmdbuf);
 void add_symbol(char *fcn_name, char *server_cmd, char *info_msg, symtab **);
+void CtdlRegisterHook(void *fcn_ptr, int fcn_type);