NetBSD Problem Report #45258
From dholland@macaran.localdomain Tue Aug 16 01:25:14 2011
Return-Path: <dholland@macaran.localdomain>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by www.NetBSD.org (Postfix) with ESMTP id A1D6863B89A
for <gnats-bugs@gnats.NetBSD.org>; Tue, 16 Aug 2011 01:25:14 +0000 (UTC)
Message-Id: <20110816012609.25A806E1D9@macaran.localdomain>
Date: Mon, 15 Aug 2011 21:26:09 -0400 (EDT)
From: dholland@eecs.harvard.edu
Reply-To: dholland@eecs.harvard.edu
To: gnats-bugs@gnats.NetBSD.org
Subject: #include <string.h> -> <strings.h> -> <stdint.h>
X-Send-Pr-Version: 3.95
>Number: 45258
>Category: standards
>Synopsis: #include <string.h> -> <strings.h> -> <stdint.h>
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: standards-manager
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Aug 16 01:30:00 +0000 2011
>Closed-Date: Mon Aug 22 01:45:44 +0000 2011
>Last-Modified: Tue Oct 11 07:40:02 +0000 2011
>Originator: David A. Holland
>Release: NetBSD 5.99.55 (20110815)
>Organization:
>Environment:
System: NetBSD macaran 5.99.49 NetBSD 5.99.49 (MACARAN) #8: Mon Apr 11 19:54:18 EDT 2011 dholland@macaran:/usr/src/sys/arch/amd64/compile/MACARAN amd64
Architecture: x86_64
Machine: amd64
>Description:
#include <string.h>
leads to
#include <strings.h>
which then does
#include <stdint.h>
polluting the namespace of string.h in violation of applicable standards.
This screws up builds of 3rd-party software.
>How-To-Repeat:
#include <string.h>
>Fix:
Either remove <strings.h> from <string.h>, which is probably not a
viable proposition, or fix <strings.h> not to spew into the namespace.
>Release-Note:
>Audit-Trail:
From: "David A. Holland" <dholland@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/45258 CVS commit: pkgsrc/www/nvu
Date: Tue, 16 Aug 2011 01:31:00 +0000
Module Name: pkgsrc
Committed By: dholland
Date: Tue Aug 16 01:31:00 UTC 2011
Modified Files:
pkgsrc/www/nvu: distinfo
pkgsrc/www/nvu/patches:
patch-netwerk_protocol_http_src_nshttpconnectionmgr_cpp
Log Message:
Fix previous, which only worked on current because of PR 45258.
Addresses new problem appearing in PR 40206.
To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 pkgsrc/www/nvu/distinfo
cvs rdiff -u -r1.1 -r1.2 \
pkgsrc/www/nvu/patches/patch-netwerk_protocol_http_src_nshttpconnectionmgr_cpp
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: standards/45258: #include <string.h> -> <strings.h> -> <stdint.h>
Date: Tue, 16 Aug 2011 01:39:10 +0000
On Tue, Aug 16, 2011 at 01:30:00AM +0000, dholland@eecs.harvard.edu wrote:
> Either remove <strings.h> from <string.h>, which is probably not a
> viable proposition, or fix <strings.h> not to spew into the namespace.
This should do it, but I haven't tested for build fallout yet. There
will probably be some.
Any objections?
Index: strings.h
===================================================================
RCS file: /cvsroot/src/include/strings.h,v
retrieving revision 1.17
diff -u -r1.17 strings.h
--- strings.h 19 Aug 2009 04:22:53 -0000 1.17
+++ strings.h 16 Aug 2011 01:37:49 -0000
@@ -46,7 +46,7 @@
#include <sys/cdefs.h>
-#include <stdint.h>
+#include <machine/int_types.h>
__BEGIN_DECLS
int bcmp(const void *, const void *, size_t);
@@ -57,8 +57,8 @@
unsigned int popcount(unsigned int) __constfunc;
unsigned int popcountl(unsigned long) __constfunc;
unsigned int popcountll(unsigned long long) __constfunc;
-unsigned int popcount32(uint32_t) __constfunc;
-unsigned int popcount64(uint64_t) __constfunc;
+unsigned int popcount32(__uint32_t) __constfunc;
+unsigned int popcount64(__uint64_t) __constfunc;
char *rindex(const char *, int);
int strcasecmp(const char *, const char *);
int strncasecmp(const char *, const char *, size_t);
--
David A. Holland
dholland@netbsd.org
From: Klaus Klein <kleink@kleink.org>
To: gnats-bugs@NetBSD.org
Cc: netbsd-bugs@netbsd.org, dholland@eecs.harvard.edu
Subject: Re: standards/45258: #include <string.h> -> <strings.h> -> <stdint.h>
Date: Tue, 16 Aug 2011 09:38:18 +0200
On Tue, Aug 16, 2011 at 01:40:04AM +0000, David Holland wrote:
> The following reply was made to PR standards/45258; it has been noted by GNATS.
>
> From: David Holland <dholland-bugs@netbsd.org>
> To: gnats-bugs@NetBSD.org
> Cc:
> Subject: Re: standards/45258: #include <string.h> -> <strings.h> -> <stdint.h>
> Date: Tue, 16 Aug 2011 01:39:10 +0000
>
> On Tue, Aug 16, 2011 at 01:30:00AM +0000, dholland@eecs.harvard.edu wrote:
> > Either remove <strings.h> from <string.h>, which is probably not a
> > viable proposition, or fix <strings.h> not to spew into the namespace.
>
> This should do it, but I haven't tested for build fallout yet. There
> will probably be some.
>
> Any objections?
If that (fixing <strings.h>) does the trick, certainly not from me.
In that case I'd also suggest something like this (similar to the
printf(3) approach to varargs):
Index: popcount.3
===================================================================
RCS file: /cvsroot/src/lib/libc/string/popcount.3,v
retrieving revision 1.4
diff -u -r1.4 popcount.3
--- popcount.3 22 Jul 2009 07:07:27 -0000 1.4
+++ popcount.3 16 Aug 2011 07:31:01 -0000
@@ -27,7 +27,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd July 13, 2009
+.Dd August 16, 2011
.Dt POPCOUNT 3
.Os
.Sh NAME
@@ -47,6 +47,7 @@
.Fn popcountl "unsigned long value"
.Ft unsigned int
.Fn popcountll "unsigned long long value"
+.In stdint.h
.Ft unsigned int
.Fn popcount32 "uint32_t value"
.Ft unsigned int
- Klaus
From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: standards/45258: #include <string.h> -> <strings.h> -> <stdint.h>
Date: Sun, 21 Aug 2011 20:19:44 +0000
On Tue, Aug 16, 2011 at 07:45:02AM +0000, Klaus Klein wrote:
> > Any objections?
>
> If that (fixing <strings.h>) does the trick, certainly not from me.
> In that case I'd also suggest something like this (similar to the
> printf(3) approach to varargs):
> [snip]
Right, good point, will do.
--
David A. Holland
dholland@netbsd.org
From: "David A. Holland" <dholland@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/45258 CVS commit: src/include
Date: Mon, 22 Aug 2011 01:24:16 +0000
Module Name: src
Committed By: dholland
Date: Mon Aug 22 01:24:16 UTC 2011
Modified Files:
src/include: strings.h
Log Message:
Don't pollute the namespace with stdint.h. (This file is included from
string.h so it can't blithely do whatever it feels like.) PR 45258.
To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/include/strings.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: "David A. Holland" <dholland@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/45258 CVS commit: src/lib/libc/string
Date: Mon, 22 Aug 2011 01:36:04 +0000
Module Name: src
Committed By: dholland
Date: Mon Aug 22 01:36:04 UTC 2011
Modified Files:
src/lib/libc/string: popcount.3
Log Message:
Add patch from Klaus Klein in PR 45258 to note that popcount32/64
require <stdint.h>.
To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/lib/libc/string/popcount.3
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Mon, 22 Aug 2011 01:45:44 +0000
State-Changed-Why:
Fixed.
From: "David A. Holland" <dholland@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/45258 CVS commit: pkgsrc/x11/efltk
Date: Tue, 11 Oct 2011 00:29:41 +0000
Module Name: pkgsrc
Committed By: dholland
Date: Tue Oct 11 00:29:41 UTC 2011
Modified Files:
pkgsrc/x11/efltk: distinfo
pkgsrc/x11/efltk/patches: patch-efltk_Fl__Int__List_h
patch-efltk_db_Fl__Params_h patch-src_widgets_Fl__Calendar_cpp
patch-src_widgets_Fl__Input_cpp
patch-src_widgets_Fl__Text__Editor_cpp
Log Message:
PR 45258 strikes again. Really fix build this time.
To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 pkgsrc/x11/efltk/distinfo
cvs rdiff -u -r1.1 -r1.2 pkgsrc/x11/efltk/patches/patch-efltk_Fl__Int__List_h \
pkgsrc/x11/efltk/patches/patch-efltk_db_Fl__Params_h \
pkgsrc/x11/efltk/patches/patch-src_widgets_Fl__Calendar_cpp \
pkgsrc/x11/efltk/patches/patch-src_widgets_Fl__Input_cpp \
pkgsrc/x11/efltk/patches/patch-src_widgets_Fl__Text__Editor_cpp
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: "Matthias Scheler" <tron@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/45258 CVS commit: [pkgsrc-2011Q3] pkgsrc/x11/efltk
Date: Tue, 11 Oct 2011 07:35:50 +0000
Module Name: pkgsrc
Committed By: tron
Date: Tue Oct 11 07:35:50 UTC 2011
Modified Files:
pkgsrc/x11/efltk [pkgsrc-2011Q3]: Makefile distinfo
pkgsrc/x11/efltk/patches [pkgsrc-2011Q3]: patch-ah
patch-efltk_Fl__Int__List_h patch-efltk_db_Fl__Params_h
patch-src_widgets_Fl__Calendar_cpp patch-src_widgets_Fl__Input_cpp
patch-src_widgets_Fl__Text__Editor_cpp
Added Files:
pkgsrc/x11/efltk/patches [pkgsrc-2011Q3]: patch-configure_in
Log Message:
Pullup ticket #3546 - requested by dholland
x11/efltk: build fix
Revisions pulled up:
- x11/efltk/Makefile 1.22
- x11/efltk/distinfo 1.8-1.9
- x11/efltk/patches/patch-ah 1.3
- x11/efltk/patches/patch-configure_in 1.1
- x11/efltk/patches/patch-efltk_Fl__Int__List_h 1.2
- x11/efltk/patches/patch-efltk_db_Fl__Params_h 1.2
- x11/efltk/patches/patch-src_widgets_Fl__Calendar_cpp 1.2
- x11/efltk/patches/patch-src_widgets_Fl__Input_cpp 1.2
- x11/efltk/patches/patch-src_widgets_Fl__Text__Editor_cpp 1.2
---
Module Name: pkgsrc
Committed By: dholland
Date: Sun Oct 9 06:40:39 UTC 2011
Modified Files:
pkgsrc/x11/efltk: distinfo
pkgsrc/x11/efltk/patches: patch-ah
Added Files:
pkgsrc/x11/efltk/patches: patch-configure_in
Log Message:
Use pkg-config to find libXft, not xft-config, as xft-config has
disappeared from recent libXft. Fixes the native X build.
(XXX: will this break the build for really old libXft? Does this need
to learn to use both?)
---
Module Name: pkgsrc
Committed By: dholland
Date: Sun Oct 9 07:00:43 UTC 2011
Modified Files:
pkgsrc/x11/efltk: Makefile
Log Message:
Oops, forgot to add pkg-config to USE_TOOLS
---
Module Name: pkgsrc
Committed By: dholland
Date: Tue Oct 11 00:29:41 UTC 2011
Modified Files:
pkgsrc/x11/efltk: distinfo
pkgsrc/x11/efltk/patches: patch-efltk_Fl__Int__List_h
patch-efltk_db_Fl__Params_h patch-src_widgets_Fl__Calendar_cpp
patch-src_widgets_Fl__Input_cpp
patch-src_widgets_Fl__Text__Editor_cpp
Log Message:
PR 45258 strikes again. Really fix build this time.
To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.21.4.1 pkgsrc/x11/efltk/Makefile
cvs rdiff -u -r1.7 -r1.7.2.1 pkgsrc/x11/efltk/distinfo
cvs rdiff -u -r1.2 -r1.2.50.1 pkgsrc/x11/efltk/patches/patch-ah
cvs rdiff -u -r0 -r1.2.2.2 pkgsrc/x11/efltk/patches/patch-configure_in
cvs rdiff -u -r1.1 -r1.1.2.1 \
pkgsrc/x11/efltk/patches/patch-efltk_Fl__Int__List_h \
pkgsrc/x11/efltk/patches/patch-efltk_db_Fl__Params_h \
pkgsrc/x11/efltk/patches/patch-src_widgets_Fl__Calendar_cpp \
pkgsrc/x11/efltk/patches/patch-src_widgets_Fl__Input_cpp \
pkgsrc/x11/efltk/patches/patch-src_widgets_Fl__Text__Editor_cpp
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.