* 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.
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