[parisc-linux] glibc problem
John David Anglin
dave@hiauly1.hia.nrc.ca
Thu, 26 Oct 2000 16:21:32 -0400 (EDT)
> I did upgrade to latest glibc from the cvs and tried I still get the same
> error. Actually I restarted from scratch starting from binutils. I have
> seen some warning while I built gcc. The smallpart of gcc warnings are as
> follows:
>
> Gcc warnings:
>
> prototypes -pedantic -Wno-long-long -DHAVE_CONFIG_H -I.
> -I/opt/hp/gcc/gcc -I/opt/hp/gcc/gcc/config -I/opt/hp/gcc/gcc/../include
> /opt/hp/gcc/gcc/explow.c
> /usr/include/bits/string2.h: In function `__stpcpy_small':
> In file included from /usr/include/string.h:346,
> from /opt/hp/gcc/gcc/system.h:176,
> from /opt/hp/gcc/gcc/explow.c:24:
> /usr/include/bits/string2.h:611: warning: pointer targets in return differ
> in signedness
I think the enclosed patch to bits/string2.h may fix your gcc warnings.
Doubt this is your real problem.
Dave
--
J. David Anglin dave.anglin@nrc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6605)
2000-09-22 J. David Anglin <dave@hiauly1.hia.nrc.ca>
* string.h (__stpcpy_small): Correct return type.
(strnlen): Correct return type in conditional expression.
--- string2.h.orig Tue Sep 5 08:22:56 2000
+++ string2.h Fri Sep 22 15:22:27 2000
@@ -608,7 +608,7 @@
__u = __extension__ ((void *) __u + 3);
break;
}
- return &__u->__uc;
+ return (char *) __u;
}
# else
# define __stpcpy_args(src) \
@@ -1025,7 +1025,7 @@
strnlen (__const char *__string, size_t __maxlen)
{
__const char *__end = (__const char *) memchr (__string, '\0', __maxlen);
- return __end ? __end - __string : __maxlen;
+ return __end ? (size_t) (__end - __string) : __maxlen;
}
# endif
#endif