NetBSD Problem Report #51287
From www@NetBSD.org Mon Jun 27 14:34:53 2016
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
by mollari.NetBSD.org (Postfix) with ESMTPS id 13E267A488
for <gnats-bugs@gnats.NetBSD.org>; Mon, 27 Jun 2016 14:34:53 +0000 (UTC)
Message-Id: <20160627143452.2242E7AAA4@mollari.NetBSD.org>
Date: Mon, 27 Jun 2016 14:34:52 +0000 (UTC)
From: nolden@kde.org
Reply-To: nolden@kde.org
To: gnats-bugs@NetBSD.org
Subject: posix_fallocate() needs <unistd.h> instead of <fcntl.h>
X-Send-Pr-Version: www-1.0
>Number: 51287
>Category: standards
>Synopsis: posix_fallocate() needs <unistd.h> instead of <fcntl.h>
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: dholland
>State: closed
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Mon Jun 27 14:35:00 +0000 2016
>Closed-Date: Thu Jun 30 15:31:43 +0000 2016
>Last-Modified: Fri Jul 01 16:05:01 +0000 2016
>Originator: Ralf Nolden
>Release: 7.0.1
>Organization:
KDE
>Environment:
NetBSD 7.0.1 amd64
>Description:
posix_fallocate() as declared in http://pubs.opengroup.org/onlinepubs/009695399/functions/posix_fallocate.html
is supposed to require <fcntl.h> as the include, however, NetBSD uses <unistd.h> which is non-standard behavior.
http://netbsd.gw.com/cgi-bin/man-cgi?posix_fallocate++NetBSD-current
>How-To-Repeat:
The conifgure check for posix_fallocate in Qt 5 (5.6) is used to detect the support of the function for native use in the bundled sqlite code, however the check failed although the fnctl.h file was included. Investigation showed that the function is declared in the wrong include file.
>Fix:
move the declaration to fnctl.h to be standards-compliant
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: lib-bug-people->standards-manager
Responsible-Changed-By: wiz@NetBSD.org
Responsible-Changed-When: Mon, 27 Jun 2016 14:49:56 +0000
Responsible-Changed-Why:
standards issue
Responsible-Changed-From-To: standards-manager->dholland
Responsible-Changed-By: dholland@NetBSD.org
Responsible-Changed-When: Tue, 28 Jun 2016 16:32:36 +0000
Responsible-Changed-Why:
my fault
From: "David A. Holland" <dholland@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/51287 CVS commit: src
Date: Thu, 30 Jun 2016 15:29:20 +0000
Module Name: src
Committed By: dholland
Date: Thu Jun 30 15:29:20 UTC 2016
Modified Files:
src/include: unistd.h
src/lib/libc/sys: fdiscard.2 posix_fallocate.c
src/sys/sys: fcntl.h
Log Message:
PR 51287 Ralf Nolden: posix_fallocate belongs in <fcntl.h>
To generate a diff of this commit:
cvs rdiff -u -r1.146 -r1.147 src/include/unistd.h
cvs rdiff -u -r1.3 -r1.4 src/lib/libc/sys/fdiscard.2
cvs rdiff -u -r1.1 -r1.2 src/lib/libc/sys/posix_fallocate.c
cvs rdiff -u -r1.46 -r1.47 src/sys/sys/fcntl.h
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: Thu, 30 Jun 2016 15:31:43 +0000
State-Changed-Why:
fixed in HEAD
From: Ralf Nolden <nolden@kde.org>
To: gnats-bugs@netbsd.org
Cc: dholland@netbsd.org, gnats-admin@netbsd.org, netbsd-bugs@netbsd.org
Subject: Re: PR/51287 CVS commit: src
Date: Thu, 30 Jun 2016 22:35:24 +0200
Thanks for patching this - question:
a) can it be fixed in 7.0.2 already as the function got introduced with 7.0
anyway ?
b) it should be checked if it gets correctly picked up by the sqlite port now.
Qt uses a copy of it, that's how I found out to use it and that there's things
going wrong.
Thanks.
Am Donnerstag, 30. Juni 2016, 15:30:01 schrieb David A. Holland:
> The following reply was made to PR standards/51287; it has been noted by
> GNATS.
>
> From: "David A. Holland" <dholland@netbsd.org>
> To: gnats-bugs@gnats.NetBSD.org
> Cc:
> Subject: PR/51287 CVS commit: src
> Date: Thu, 30 Jun 2016 15:29:20 +0000
>
> Module Name: src
> Committed By: dholland
> Date: Thu Jun 30 15:29:20 UTC 2016
>
> Modified Files:
> src/include: unistd.h
> src/lib/libc/sys: fdiscard.2 posix_fallocate.c
> src/sys/sys: fcntl.h
>
> Log Message:
> PR 51287 Ralf Nolden: posix_fallocate belongs in <fcntl.h>
>
>
> To generate a diff of this commit:
> cvs rdiff -u -r1.146 -r1.147 src/include/unistd.h
> cvs rdiff -u -r1.3 -r1.4 src/lib/libc/sys/fdiscard.2
> cvs rdiff -u -r1.1 -r1.2 src/lib/libc/sys/posix_fallocate.c
> cvs rdiff -u -r1.46 -r1.47 src/sys/sys/fcntl.h
>
> Please note that diffs are not public domain; they are subject to the
> copyright notices on the relevant files.
--
Kind regards,
Ralf Nolden
From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: PR/51287 CVS commit: src
Date: Fri, 1 Jul 2016 16:00:49 +0000
On Thu, Jun 30, 2016 at 08:40:01PM +0000, Ralf Nolden wrote:
> Thanks for patching this - question:
>
> a) can it be fixed in 7.0.2 already as the function got introduced with 7.0
> anyway ?
The teeny releases only take critical fixes, so probably not. I could
ask for it to be pulled up to the -7 branch so it'll be in 7.1 when/if
that appears, but:
> b) it should be checked if it gets correctly picked up by the
> sqlite port now. Qt uses a copy of it, that's how I found out to
> use it and that there's things going wrong.
...you may not want it to, as while the system call is there the
backend implementation for FFS isn't.
--
David A. Holland
dholland@netbsd.org
>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-2014
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.