libtool-patches
[Top][All Lists]
Advanced

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

FYI: put slist in ltdl namespace


From: Ralf Wildenhues
Subject: FYI: put slist in ltdl namespace
Date: Mon, 10 Jan 2005 19:50:06 +0100
User-agent: Mutt/1.4.1i

* Bob Friesenhahn wrote on Mon, Jan 10, 2005 at 05:42:35PM CET:
> On Mon, 10 Jan 2005, Gary V. Vaughan wrote:
> >
> >By that definition, since strl* are not designed for use by libltdl clients
> >(as evidenced by being declared in an uninstall lt__strl.h header), they
> >should be using symbols with a 'lt__' prefix.  Technically the slist and
> >argz filenames should also be 'lt__' prefixed, but doing that would make
> >it harder to use them outside libtool.
> 
> The slist and argz functions should not be used by anything but 
> libltdl.  Why would anyone want to use libtool internal implementation 
> functions?  The mere existence of useful code does not mean that it 
> should be used.  Sometimes redundancy is a good thing.  Libltdl needs 
> to be very clear about functions it intends to provide and make it 
> obvious which functions are off-limits for libltdl users to access.

I basically agree with this (as these functions are small enough;
what's more, though, I don't think we should lock ourselves into these).

I changed the patch as follows and committed to HEAD and branch-2-0.

Regards,
Ralf

        * libltdl/libltdl/lt__glibc.h: Move all exported slist
        symbols into the lt__* namespace.
        * libltdl/libltdl/lt__private.h, libltdl/libltdl/slist.h:
        Adjust includes.

Index: libltdl/libltdl/lt__glibc.h
===================================================================
RCS file: /cvsroot/libtool/libtool/libltdl/libltdl/lt__glibc.h,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 lt__glibc.h
--- libltdl/libltdl/lt__glibc.h 23 Nov 2004 12:47:19 -0000      1.1.2.1
+++ libltdl/libltdl/lt__glibc.h 10 Jan 2005 17:20:41 -0000
@@ -53,4 +53,20 @@
 
 #include <argz.h>
 
+# define slist_concat  lt__slist_concat
+# define slist_cons    lt__slist_cons
+# define slist_delete  lt__slist_delete
+# define slist_remove  lt__slist_remove
+# define slist_reverse lt__slist_reverse
+# define slist_sort    lt__slist_sort
+# define slist_tail    lt__slist_tail
+# define slist_nth     lt__slist_nth
+# define slist_find    lt__slist_find
+# define slist_length  lt__slist_length
+# define slist_foreach lt__slist_foreach
+# define slist_box     lt__slist_box
+# define slist_unbox   lt__slist_unbox
+
+#include <slist.h>
+
 #endif /*!defined(LT__GLIBC_H)*/
Index: libltdl/libltdl/lt__private.h
===================================================================
RCS file: /cvsroot/libtool/libtool/libltdl/libltdl/lt__private.h,v
retrieving revision 1.1.2.2
diff -u -r1.1.2.2 lt__private.h
--- libltdl/libltdl/lt__private.h       21 Dec 2004 22:19:19 -0000      1.1.2.2
+++ libltdl/libltdl/lt__private.h       10 Jan 2005 17:20:41 -0000
@@ -59,7 +59,6 @@
 #include "lt__dirent.h"
 #include "lt__strl.h"
 #include "lt__glibc.h"
-#include "slist.h"
 
 /* ...and all exported interfaces.  */
 #include "ltdl.h"
Index: libltdl/libltdl/slist.h
===================================================================
RCS file: /cvsroot/libtool/libtool/libltdl/libltdl/slist.h,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 slist.h
--- libltdl/libltdl/slist.h     23 Nov 2004 12:47:19 -0000      1.1.2.1
+++ libltdl/libltdl/slist.h     10 Jan 2005 17:20:41 -0000
@@ -41,6 +41,7 @@
 #define SLIST_H 1
 
 #if defined(LTDL)
+#  include <libltdl/lt__glibc.h>
 #  include <libltdl/lt_system.h>
 #else
 #  define LT_SCOPE




reply via email to

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