This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Tru64 UNIX V4.0F/V5.1] libobjc/sendmsg.c patch
- To: Rainer Orth <ro at TechFak dot Uni-Bielefeld dot DE>
- Subject: Re: [Tru64 UNIX V4.0F/V5.1] libobjc/sendmsg.c patch
- From: Ovidiu Predescu <ovidiu at cup dot hp dot com>
- Date: Fri, 23 Feb 2001 22:15:18 -0800
- Cc: gcc-patches at gcc dot gnu dot org
I applied it, thanks!
Ovidiu
On Fri, 23 Feb 2001 21:11:17 +0100 (MET), Rainer Orth <ro@TechFak.Uni-Bielefeld.DE> wrote:
> Bootstrapping gcc 3.0 20010221 (prerelease) failed on Tru64 UNIX V4.0F or
> V5.1 when building libobjc:
>
> /tmp/gcc/gcc/xgcc -B/tmp/gcc/gcc/ -B/vol/gcc/share/alpha-dec-osf4.0f/bin/ -B/vol/gcc/share/alpha-
> dec-osf4.0f/lib/ -isystem /vol/gcc/share/alpha-dec-osf4.0f/include -c -I. -I/vol/gnu/src/gcc/gcc-
> 3.0-branch/libobjc -g -mieee -DIN_GCC -DIN_TARGET_LIBS -I/vol/gnu/src/gcc/gcc-3.0-branch/libobjc/
> objc -I/vol/gnu/src/gcc/gcc-3.0-branch/libobjc/../gcc -I/vol/gnu/src/gcc/gcc-3.0-branch/libobjc/.
> ./gcc/config -I../../gcc -I/vol/gnu/src/gcc/gcc-3.0-branch/libobjc/../include /vol/gnu/src/gcc/gc
> c-3.0-branch/libobjc/sendmsg.c -DPIC -o .libs/sendmsg.o
> /vol/gnu/src/gcc/gcc-3.0-branch/libobjc/sendmsg.c: In function `__objc_forward':
> /vol/gnu/src/gcc/gcc-3.0-branch/libobjc/sendmsg.c:600: conflicting types for `strlen'
> /vol/gnu/src/gcc/gcc-3.0-branch/libobjc/sendmsg.c:600: warning: extern declaration of `strlen' do
> esn't match global one
>
> This happens because either the original <standards.h> or the fixinclude'd
> one define _NO_PROTO and _NONSTD_TYPES iff __GNUC__ && !__STDC__
> (!__STRICT_ANSI__ after fixincludes) are defined: this way, an unprototyped
> declaration of strlen() is used:
>
> extern unsigned int strlen();
>
> instead of
>
> extern size_t strlen __((const char *));
>
> Since strlen() is used without explicit prototype in many other C sources
> in libobjc, I just deleted it to avoid this conflict.
>
> Rainer
>
> -----------------------------------------------------------------------------
> Rainer Orth, Faculty of Technology, Bielefeld University
>
> Email: ro@TechFak.Uni-Bielefeld.DE
>
>
> Fri Feb 23 18:12:00 2001 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
>
> * sendmsg.c (__objc_forward): Delete strlen() declaration.
>
> Index: sendmsg.c
> ===================================================================
> RCS file: /cvs/gcc/egcs/libobjc/sendmsg.c,v
> retrieving revision 1.4
> diff -u -p -r1.4 sendmsg.c
> --- sendmsg.c 2001/01/12 00:30:53 1.4
> +++ sendmsg.c 2001/02/23 19:22:48
> @@ -597,7 +597,6 @@ __objc_forward (id object, SEL sel, argl
> /* The object doesn't recognize the method. Check for responding to
> error:. If it does then sent it. */
> {
> - size_t strlen (const char*);
> char msg[256 + strlen ((const char*)sel_get_name (sel))
> + strlen ((const char*)object->class_pointer->name)];
>
>