Hello Niels,
first of all, the program_invocation_name problem was indeed a bug in
uClibc. glibc sucks the variable in from libc.map, whereas uClibc doesn't
have support for program_invocation_name. The declaration in errno.h came
from the original glibc errno.h. In the current CVS this was removed by
the maintainer.
On 15 Oct 2001, Niels M�ller wrote:
> And thus, you're supposed to get a link error when compiling the test
> program above.
Indeed, very strange.
> The configure script should figure out whether or not you have it, and
> adapt the build to the situation. I still want to see what you get in
> your config.log (and if rerunning configure, you may have to delete an
> config.cache first, or the tests will be omitted).
I'll test this again tomorrow, because I have to downgrade uClibc to the
version from yesterday.
Attached you'll find my patch which lets you compile lsh-1.2.5 with both,
glibc and uClibc. With glibc there is still the problem with addprefix,
but if I remember correctly you had already found a solution for that.
Hope that helps, and thanks for your patience!
Robert
--
+--------------------------------------------------------+
| Dipl.-Ing. Robert Schwebel |
| Linux Solutions for Science and Industry |
| Braunschweiger Stra�e 79, 31134 Hildesheim, Germany |
| Phone: +49-5121-28619-0 Fax: +49-5121-28619-4 |
+--------------------------------------------------------+
diff --exclude=Makefile --exclude=Makefile.in --exclude=config.h.in
--exclude=configure --exclude=aclocal.m4 --exclude=stamp-h.in -r -u
lsh-1.2.5/configure.in lsh-1.2.5-rs/configure.in
--- lsh-1.2.5/configure.in Wed Sep 19 19:42:37 2001
+++ lsh-1.2.5-rs/configure.in Mon Oct 15 23:02:08 2001
@@ -353,7 +353,7 @@
AC_CHECK_LIB(crypt, crypt)
AC_CHECK_LIB(xnet, inet_addr)
-AC_CHECK_LIB(nsl, gethostbyname)
+AC_SEARCH_LIBS(gethostbyname, nsl)
AC_CHECK_LIB(socket, setsockopt)
dnl logwtmp is also in libutil
AC_CHECK_LIB(util, openpty)
diff --exclude=Makefile --exclude=Makefile.in --exclude=config.h.in
--exclude=configure --exclude=aclocal.m4 --exclude=stamp-h.in -r -u
lsh-1.2.5/src/argp/argp-fmtstream.c lsh-1.2.5-rs/src/argp/argp-fmtstream.c
--- lsh-1.2.5/src/argp/argp-fmtstream.c Tue Jan 2 22:07:12 2001
+++ lsh-1.2.5-rs/src/argp/argp-fmtstream.c Mon Oct 15 23:02:48 2001
@@ -45,6 +45,10 @@
# define __vsnprintf(s, l, f, a) _IO_vsnprintf (s, l, f, a)
#endif
+#ifndef _LIBC
+# define __vsnprintf(s, l, f, a) vsnprintf(s, l, f, a)
+#endif
+
#define INIT_BUF_SIZE 200
#define PRINTF_SIZE_GUESS 150
diff --exclude=Makefile --exclude=Makefile.in --exclude=config.h.in
--exclude=configure --exclude=aclocal.m4 --exclude=stamp-h.in -r -u
lsh-1.2.5/src/argp/argp-help.c lsh-1.2.5-rs/src/argp/argp-help.c
--- lsh-1.2.5/src/argp/argp-help.c Tue Jan 2 22:43:04 2001
+++ lsh-1.2.5-rs/src/argp/argp-help.c Mon Oct 15 23:03:21 2001
@@ -45,6 +45,10 @@
# endif
#endif
+#ifndef _LIBC
+#define __strcasecmp(i, j) strcasecmp(i, j)
+#endif
+
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
diff --exclude=Makefile --exclude=Makefile.in --exclude=config.h.in
--exclude=configure --exclude=aclocal.m4 --exclude=stamp-h.in -r -u
lsh-1.2.5/src/argp/argp-namefrob.h lsh-1.2.5-rs/src/argp/argp-namefrob.h
--- lsh-1.2.5/src/argp/argp-namefrob.h Sat Jan 6 01:15:21 2001
+++ lsh-1.2.5-rs/src/argp/argp-namefrob.h Mon Oct 15 23:04:00 2001
@@ -19,6 +19,7 @@
Boston, MA 02111-1307, USA. */
#if !_LIBC
+#ifndef weak_alias
/* This code is written for inclusion in gnu-libc, and uses names in the
namespace reserved for libc. If we're not compiling in libc, define those
names to be the normal ones instead. */
@@ -89,6 +90,7 @@
#undef __vsnprintf
#define __vsnprintf vsnprintf
+#endif /* !weak_alias */
#endif /* !_LIBC */
#ifndef __set_errno
diff --exclude=Makefile --exclude=Makefile.in --exclude=config.h.in
--exclude=configure --exclude=aclocal.m4 --exclude=stamp-h.in -r -u
lsh-1.2.5/src/argp/argp-parse.c lsh-1.2.5-rs/src/argp/argp-parse.c
--- lsh-1.2.5/src/argp/argp-parse.c Sun Feb 18 23:40:03 2001
+++ lsh-1.2.5-rs/src/argp/argp-parse.c Mon Oct 15 23:05:09 2001
@@ -66,6 +66,10 @@
#endif
#endif /* _LIBC */
+#ifndef _LIBC
+# define __sleep(t) sleep(t)
+#endif
+
#include "argp.h"
#include "argp-namefrob.h"
@@ -1271,6 +1275,9 @@
{
__argp_state_help (__state, stderr, ARGP_HELP_STD_USAGE);
}
+#ifdef weak_alias
+weak_alias (__argp_usage, argp_usage)
+#endif
int
__option_is_short (__const struct argp_option *__opt) __THROW