guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GUILE 1.6 CVS doesn't compile


From: Kevin Ryde
Subject: Re: GUILE 1.6 CVS doesn't compile
Date: Mon, 11 Jul 2005 10:10:43 +1000
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux)

Han-Wen Nienhuys <address@hidden> writes:
>
>   make check
>
> isn't complaining.

I think it works only because that preload array is empty.  There's a
terminating zero entry, so the fetch from there gives NULL, and
lt_dlpreload_default can tolerate NULL (it looks like NULL is what's
there if you never call lt_dlpreload_default at all).

If the array wasn't empty the fetch would be the address of the first
symbol name string, and interpreting that as structs would bomb.

I suppose the fix is to define the struct, perhaps per below.  Or
perhaps the lt_dlpreload_default call isn't needed at all if there's
no -dlopen or -dlpreopen in the link.

Index: guile-ltdl.h
===================================================================
RCS file: /cvsroot/guile/guile/guile-core/libguile-ltdl/guile-ltdl.h,v
retrieving revision 1.2.2.2
diff -u -r1.2.2.2 guile-ltdl.h
--- guile-ltdl.h        23 May 2005 20:15:31 -0000      1.2.2.2
+++ guile-ltdl.h        10 Jul 2005 23:58:57 -0000
@@ -27,8 +27,11 @@
 #define SCM_LTDL_H 1
 
 typedef struct scm_i_lt_dlhandle_struct *scm_lt_dlhandle;
-typedef struct scm_i_lt_dlsymlist_struct scm_lt_dlsymlist;
 typedef void * scm_lt_ptr;
+typedef struct scm_i_lt_dlsymlist_struct {
+  const char *name;
+  scm_lt_ptr address;
+} scm_lt_dlsymlist;
 
 void            scm_lt_dlpreload_default (const scm_lt_dlsymlist *preloads);
 int             scm_lt_dlinit (void);
Index: raw-ltdl.h
===================================================================
RCS file: /cvsroot/guile/guile/guile-core/libguile-ltdl/raw-ltdl.h,v
retrieving revision 1.2.2.2
diff -u -r1.2.2.2 raw-ltdl.h
--- raw-ltdl.h  23 May 2005 20:15:31 -0000      1.2.2.2
+++ raw-ltdl.h  10 Jul 2005 23:58:57 -0000
@@ -211,10 +211,7 @@
 
 /* A preopened symbol. Arrays of this type comprise the exported
    symbols for a dlpreopened module. */
-typedef struct SCM_INSERTED_DLSYMLIST_STRUCT_DECL {
-  const char *name;
-  lt_ptr      address;
-} lt_dlsymlist;
+typedef struct scm_i_lt_dlsymlist_struct lt_dlsymlist;
 
 SCMLTXT        int     lt_dlpreload    LT_PARAMS((const lt_dlsymlist 
*preloaded));
 SCMLTXT        int     lt_dlpreload_default

reply via email to

[Prev in Thread] Current Thread [Next in Thread]