[prev in list] [next in list] [prev in thread] [next in thread] 

List:       proftpd-committers
Subject:    [ProFTPD-committers] CVS: proftpd/modules mod_dso.c,1.14,1.15
From:       TJ Saunders <castaglia () users ! sourceforge ! net>
Date:       2008-05-12 17:22:06
Message-ID: E1Jvbiw-0001px-HN () sc8-pr-cvs1 ! sourceforge ! net
[Download RAW message or body]

Update of /cvsroot/proftp/proftpd/modules
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5862/modules

Modified Files:
	mod_dso.c 
Log Message:

Work around compiler warnings about "nested extern declaration of
lt_preloaded_symbols".  This was caused by the use of the
LTDL_SET_PRELOADED_SYBMOLS libtool macro.  Instead, use the code to which
the macro expands, and separate the code so that the declaration of
the lt_preloaded_symbols is in the proper scope.


Index: mod_dso.c
===================================================================
RCS file: /cvsroot/proftp/proftpd/modules/mod_dso.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- mod_dso.c	12 May 2008 17:11:41 -0000	1.14
+++ mod_dso.c	12 May 2008 17:22:04 -0000	1.15
@@ -599,6 +599,17 @@
 /* Initialization routines
  */
 
+/* We should be using the LTDL_SET_PRELOADED_SYMBOLS macro provided by
+ * the ltdl.h header.  However, doing so resulted in compiler warnings
+ * about "nested extern declaraction of lt_preloaded_symbols".  To
+ * work around these warnings, we will use the expanded version of the
+ * macro directly.
+ *
+ * By the way, it appears that this lt_preloaded_symbols list is defined
+ * at link-time by the libtool script.
+ */
+extern const lt_dlsymlist lt_preloaded_symbols[];
+
 static int dso_init(void) {
 #ifdef PR_USE_CTRLS
   register unsigned int i = 0;
@@ -608,7 +619,7 @@
   dso_pool = make_sub_pool(permanent_pool);
   pr_pool_tag(dso_pool, MOD_DSO_VERSION);
 
-  LTDL_SET_PRELOADED_SYMBOLS();
+  lt_dlpreload_default(lt_preloaded_symbols);
 
   /* Initialize libltdl. */
   if (lt_dlinit() < 0) {


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
ProFTPD Committers Mailing List
proftpd-committers@proftpd.org
https://lists.sourceforge.net/lists/listinfo/proftp-committers
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic