libtool-patches
[Top][All Lists]
Advanced

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

Re: MinGW status


From: Bob Friesenhahn
Subject: Re: MinGW status
Date: Sat, 2 Oct 2004 17:00:28 -0500 (CDT)

On Sat, 2 Oct 2004, Ralf Wildenhues wrote:

* Bob Friesenhahn wrote on Sat, Oct 02, 2004 at 09:51:57PM CEST:
This build script represents the current state of building CVS libltdl
under MinGW.  Symbols show up as unresolved.  For example 'lt__malloc'
is reported as unresolved, but nm shows that there is a '_lt__malloc'
symbol in lt_alloc.o.

Might I suggest you try the patch below?  As I have no MinGW available I
cannot try it myself, sorry.  It might need some adapting.

Adapting?  My foot!  The patch worked! :-))

*snip*
//scooby/bfriesen/src/gnu/libtool/libltdl/lt__private.h:121: warning: array
`lt__error_strings' assumed to have one element
*snip*

This is bad news indeed (but a different matter).  It essentially means
that we are breaking binary compatibility as soon as we add another
warning, right? (The array size is part of the ABI).  Very unfortunate.

At first glance it does not appear to be a problem since the interface is merely an array of string pointers and the index into the array should be generated by libltdl itself so the array index should always be in bounds. Am I wrong?

BTW, the #define hacks make us get away with the namespace w.r.t argz.h,
but not w.r.t slist.h.  I think that needs to be addressed, right?

Don't know. What I do know is that 'make' for libtool has now succeeded under MinGW.

As far as how libltdl's build goes, I do not like it at all that libltdl is unnecessary introducing another installed library. I don't see a need for it. I also don't like it that libltdl's Makefile.am is referencing Automake's internal variables.

We should be able to reference the necessary source file's in the loaders subdirectory so that no extra convenience library is necessary. This approach risks the possibility that Automake might demand that the dependent package include a `compile' script though. According to libtool's own documentation, this should work for Automake 1.4 and later.

Bob


Regards,
Ralf

2004-10-02  Ralf Wildenhues <address@hidden>

        * libltdl/argz_.h, libltdl/lt__alloc.h: export functions
        portably.


Index: libltdl/argz_.h
===================================================================
RCS file: /cvsroot/libtool/libtool/libltdl/argz_.h,v
retrieving revision 1.1
diff -u -r1.1 argz_.h
--- libltdl/argz_.h     22 Apr 2004 22:47:20 -0000      1.1
+++ libltdl/argz_.h     2 Oct 2004 21:09:07 -0000
@@ -35,20 +35,23 @@

#if defined(LTDL)
#  include "lt__glibc.h"
+#  include "lt_system.h"
+#else
+#  define LT_SCOPE
#endif

#if defined(_cplusplus)
extern "C" {
#endif

-error_t        argz_append     (char **pargz, size_t *pargz_len,
-                        const char *buf, size_t buf_len);
-error_t        argz_create_sep (const char *str, int delim,
-                        char **pargz, size_t *pargz_len);
-error_t        argz_insert     (char **pargz, size_t *pargz_len,
-                        char *before, const char *entry);
-char * argz_next       (char *argz, size_t argz_len, const char *entry);
-void   argz_stringify  (char *argz, size_t argz_len, int sep);
+LT_SCOPE error_t argz_append   (char **pargz, size_t *pargz_len,
+                                const char *buf, size_t buf_len);
+LT_SCOPE error_t argz_create_sep(const char *str, int delim,
+                                char **pargz, size_t *pargz_len);
+LT_SCOPE error_t argz_insert   (char **pargz, size_t *pargz_len,
+                                char *before, const char *entry);
+LT_SCOPE char *         argz_next      (char *argz, size_t argz_len, const 
char *entry);
+LT_SCOPE void   argz_stringify (char *argz, size_t argz_len, int sep);

#if defined(_cplusplus)
}
Index: libltdl/lt__alloc.h
===================================================================
RCS file: /cvsroot/libtool/libtool/libltdl/lt__alloc.h,v
retrieving revision 1.4
diff -u -r1.4 lt__alloc.h
--- libltdl/lt__alloc.h 15 Jul 2004 12:14:47 -0000      1.4
+++ libltdl/lt__alloc.h 2 Oct 2004 20:35:09 -0000
@@ -43,14 +43,14 @@
                                                        } LT_STMT_END

/* If set, this function is called when memory allocation has failed.  */
-extern void (*lt__alloc_die) (void);
+LT_SCOPE void (*lt__alloc_die) (void);

-void *lt__malloc (size_t n);
-void *lt__zalloc (size_t n);
-void *lt__realloc (void *mem, size_t n);
-void *lt__memdup (void const *mem, size_t n);
+LT_SCOPE void *lt__malloc (size_t n);
+LT_SCOPE void *lt__zalloc (size_t n);
+LT_SCOPE void *lt__realloc (void *mem, size_t n);
+LT_SCOPE void *lt__memdup (void const *mem, size_t n);

-char *lt__strdup (const char *string);
+LT_SCOPE char *lt__strdup (const char *string);

LT_END_C_DECLS




======================================
Bob Friesenhahn
address@hidden
http://www.simplesystems.org/users/bfriesen




reply via email to

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