NetBSD Problem Report #30391
From holger@jhweiss.de Wed Jun 1 14:16:41 2005
Return-Path: <holger@jhweiss.de>
Received: from einhorn.in-berlin.de (einhorn.in-berlin.de [192.109.42.8])
by narn.netbsd.org (Postfix) with ESMTP id 5BAEC63B104
for <gnats-bugs@gnats.NetBSD.org>; Wed, 1 Jun 2005 14:16:40 +0000 (UTC)
Message-Id: <20050601141620.20641.qmail@pandora.jhweiss.de>
Date: 1 Jun 2005 16:16:20 +0200
From: Holger Weiss <holger@jhweiss.de>
To: gnats-bugs@netbsd.org
Subject: build.sh fails in lib/libc/string/wcschr.c
X-Send-Pr-Version: 3.95
>Number: 30391
>Category: lib
>Synopsis: build.sh fails in lib/libc/string/wcschr.c
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: lib-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Jun 01 14:17:00 +0000 2005
>Closed-Date: Thu Jun 02 08:46:47 +0000 2005
>Last-Modified: Thu Jun 02 08:46:47 +0000 2005
>Originator: Holger Weiss
>Release: NetBSD 2.0_STABLE
>Organization:
Individual Network Berlin e.V.
>Environment:
System: NetBSD pandora.jhweiss.de 2.0_STABLE NetBSD 2.0_STABLE (PANDORA) #11: Sun May 1 05:27:23 CEST 2005 holger@pandora.jhweiss.de:/usr/build/obj/sys/arch/i386/compile/PANDORA i386
Architecture: i386
Machine: i386
>Description:
Compiling netbsd-2 source fails in lib/libc/string/wcschr.c,
revision 1.2.8.1 (pull-up of 1.3):
/usr/build/tools/bin/i386--netbsdelf-gcc -O2 -pipe -DALL_STATE -DUSG_COMPAT -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-sign-compare -Wno-traditional -Wno-uninitialized -Wreturn-type -Wswitch -Wshadow -Werror -D_LIBC -DLIBC_SCCS -DSYSLIBC_SCCS -D_REENTRANT -I/usr/src/lib/libc/include -DHESIOD -DINET6 -DNLS -DYP -D__DBINTERFACE_PRIVATE -DI18NMODULE_MAJOR=4 -I/usr/src/libexec/ld.elf_so -I/usr/src/lib/libc/dlfcn -DCITRUS_ICONV -DWITH_RUNE -I/usr/src/lib/libc -DRESOLVSORT -I. -DPOSIX_MISTAKE -DPORTMAP -DFLOATING_POINT -nostdinc -isystem /usr/build/dist/usr/include -c /usr/src/lib/libc/string/wcschr.c -o wcschr.o.tmp
/usr/src/lib/libc/string/wcschr.c: In function `wcschr':
/usr/src/lib/libc/string/wcschr.c:47: warning: implicit declaration of function `__UNCONST'
/usr/src/lib/libc/string/wcschr.c:47: warning: return makes pointer from integer without a cast
*** Failed target: wcschr.o
>How-To-Repeat:
cd /usr/src # netbsd-2 as of 2005-06-01
./build.sh -U distribution
>Fix:
Declaring __UNCONST as in lib/libc/stdio/vfprintf.c solves the
problem for me:
Index: wcschr.c
===================================================================
RCS file: /cvsroot/src/lib/libc/string/wcschr.c,v
retrieving revision 1.2.8.1
diff -u -r1.2.8.1 wcschr.c
--- wcschr.c 31 May 2005 21:13:11 -0000 1.2.8.1
+++ wcschr.c 1 Jun 2005 13:52:34 -0000
@@ -36,6 +36,18 @@
#include <assert.h>
#include <wchar.h>
+#ifdef lint
+static __inline void *__UNCONST __P((const void *));
+static __inline void *
+__UNCONST(const void *v)
+{
+ /* LINTED */
+ return (void *) v;
+}
+#else
+#define __UNCONST(v) (void *)(v)
+#endif
+
wchar_t *
wcschr(const wchar_t *p, wchar_t c)
{
>Release-Note:
>Audit-Trail:
From: Julian Coleman <jdc@coris.org.uk>
To: holger@jhweiss.de, gnats-bugs@netbsd.org
Cc:
Subject: Re: lib/30391: build.sh fails in lib/libc/string/wcschr.c
Date: Wed, 1 Jun 2005 15:42:39 +0100
> /usr/src/lib/libc/string/wcschr.c:47: warning: implicit declaration of function `__UNCONST'
This should be fixed by pullup 1967 [*] for sys/sys/cdefs.h.
J
[*] http://releng.netbsd.org/cgi-bin/req-2-0.cgi?show=1967
--
My other computer also runs NetBSD / Sailing at Newbiggin
http://www.netbsd.org/ / http://www.newbigginsailingclub.org/
From: Holger Weiss <holger@jhweiss.de>
To: Julian Coleman <jdc@coris.org.uk>, gnats-bugs@netbsd.org
Cc:
Subject: Re: lib/30391: build.sh fails in lib/libc/string/wcschr.c
Date: Wed, 1 Jun 2005 20:28:08 +0200
* Julian Coleman <jdc@coris.org.uk> [2005-06-01 15:42]:
> > /usr/src/lib/libc/string/wcschr.c:47: warning: implicit declaration of function `__UNCONST'
>
> This should be fixed by pullup 1967 [*] for sys/sys/cdefs.h.
Yes, that fixed compilation of wcschr.c. AFAICS the __UNCONST()
declaration should be removed from lib/libc/stdio/vfprintf.c then.
Index: vfprintf.c
===================================================================
RCS file: /cvsroot/src/lib/libc/stdio/vfprintf.c,v
retrieving revision 1.46
diff -u -r1.46 vfprintf.c
--- vfprintf.c 3 Mar 2004 11:19:05 -0000 1.46
+++ vfprintf.c 1 Jun 2005 16:00:40 -0000
@@ -152,19 +152,6 @@
#endif /* FLOATING_POINT */
-#ifdef lint
-static __inline void *__UNCONST __P((const void *));
-static __inline void *
-__UNCONST(v)
- const void *v;
-{
- /* LINTED */
- return (void *) v;
-}
-#else
-#define __UNCONST(v) (void *)(v)
-#endif
-
/*
* Macros for converting digits to letters and vice versa
*/
From: Julian Coleman <jdc@coris.org.uk>
To: holger@jhweiss.de, gnats-bugs@netbsd.org
Cc:
Subject: Re: lib/30391: build.sh fails in lib/libc/string/wcschr.c
Date: Wed, 1 Jun 2005 20:36:47 +0100
> > This should be fixed by pullup 1967 [*] for sys/sys/cdefs.h.
>
> Yes, that fixed compilation of wcschr.c. AFAICS the __UNCONST()
> declaration should be removed from lib/libc/stdio/vfprintf.c then.
I was a little quick off the mark. This has been done with pullup 1968.
Is it OK to close this PR now?
Thanks,
J
--
My other computer also runs NetBSD / Sailing at Newbiggin
http://www.netbsd.org/ / http://www.newbigginsailingclub.org/
From: Holger Weiss <holger@jhweiss.de>
To: Julian Coleman <jdc@coris.org.uk>, gnats-bugs@netbsd.org
Cc:
Subject: Re: lib/30391: build.sh fails in lib/libc/string/wcschr.c
Date: Thu, 2 Jun 2005 09:34:55 +0200
* Julian Coleman <jdc@coris.org.uk> [2005-06-01 20:36]:
> > > This should be fixed by pullup 1967 [*] for sys/sys/cdefs.h.
> >
> > Yes, that fixed compilation of wcschr.c. AFAICS the __UNCONST()
> > declaration should be removed from lib/libc/stdio/vfprintf.c then.
>
> I was a little quick off the mark. This has been done with pullup 1968.
> Is it OK to close this PR now?
Yes, thank you!
Holger
State-Changed-From-To: open->closed
State-Changed-By: jdc@netbsd.org
State-Changed-When: Thu, 02 Jun 2005 08:46:47 +0000
State-Changed-Why:
Fixed with pull ups 1967 and 1968.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.