From owner-freebsd-standards@FreeBSD.ORG Mon Oct 1 11:07:28 2012 Return-Path: Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C6B8D10656D9 for ; Mon, 1 Oct 2012 11:07:28 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id A998D8FC1C for ; Mon, 1 Oct 2012 11:07:28 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q91B7SWJ025109 for ; Mon, 1 Oct 2012 11:07:28 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q91B7SAB025107 for freebsd-standards@FreeBSD.org; Mon, 1 Oct 2012 11:07:28 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 1 Oct 2012 11:07:28 GMT Message-Id: <201210011107.q91B7SAB025107@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-standards@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-standards@FreeBSD.org X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Oct 2012 11:07:29 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o stand/171907 standards Rechtschreibfehler auf Ihrer Internetseite! o stand/170403 standards wrong ntohs expression type tickling clang o stand/170346 standards Changes to support waitid() and related stuff o stand/169697 standards syslogd(8) is not BOM aware o stand/166349 standards Support the assignment-allocation character for fscanf o stand/164787 standards dirfd() function not available when _POSIX_C_SOURCE is o kern/164674 standards [patch] [libc] vfprintf/vfwprintf return error (EOF) o o stand/162434 standards getaddrinfo: addrinfo.ai_family is an address family, o stand/154842 standards invalid request authenticator in the second and subseq o stand/150093 standards C++ std::locale support is broken o stand/130067 standards Wrong numeric limits in system headers? o stand/124860 standards flockfile(3) doesn't work when the memory has been exh o stand/121921 standards [patch] Add leap second support to at(1), atrun(8) o stand/116477 standards rm(1): rm behaves unexpectedly when using -r and relat o bin/116413 standards incorrect getconf(1) handling of unsigned constants gi o stand/116081 standards make does not work with the directive sinclude p stand/107561 standards [libc] [patch] [request] Missing SUS function tcgetsid o stand/100017 standards [Patch] Add fuser(1) functionality to fstat(1) a stand/86484 standards [patch] mkfifo(1) uses wrong permissions o stand/82654 standards C99 long double math functions are missing o stand/81287 standards [patch] fingerd(8) might send a line not ending in CRL a stand/80293 standards sysconf() does not support well-defined unistd values o stand/79056 standards [feature request] [atch] regex(3) regression tests o stand/70813 standards [patch] ls(1) not Posix compliant o stand/66357 standards make POSIX conformance problem ('sh -e' & '+' command- s kern/64875 standards [libc] [patch] [request] add a system call: fdatasync( o stand/56476 standards [patch] cd9660 unicode support simple hack o stand/54410 standards one-true-awk not POSIX compliant (no extended REs) o stand/46119 standards Priority problems for SCHED_OTHER using pthreads o stand/44365 standards [headers] [patch] [request] introduce ulong and unchar a stand/41576 standards ln(1): replacing old dir-symlinks a docs/26003 standards getgroups(2) lists NGROUPS_MAX but not syslimits.h s stand/24590 standards timezone function not compatible witn Single Unix Spec o stand/21519 standards sys/dir.h should be deprecated some more s bin/14925 standards getsubopt isn't poisonous enough 35 problems total. From owner-freebsd-standards@FreeBSD.ORG Mon Oct 1 15:50:02 2012 Return-Path: Delivered-To: freebsd-standards@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 99F731065686 for ; Mon, 1 Oct 2012 15:50:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 69FDE8FC1B for ; Mon, 1 Oct 2012 15:50:02 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q91Fo2B1087105 for ; Mon, 1 Oct 2012 15:50:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q91Fo25F087104; Mon, 1 Oct 2012 15:50:02 GMT (envelope-from gnats) Resent-Date: Mon, 1 Oct 2012 15:50:02 GMT Resent-Message-Id: <201210011550.q91Fo25F087104@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-standards@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Ed Maste Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 688C2106566C for ; Mon, 1 Oct 2012 15:45:16 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 539A38FC16 for ; Mon, 1 Oct 2012 15:45:16 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q91FjGSA086483 for ; Mon, 1 Oct 2012 15:45:16 GMT (envelope-from emaste@freefall.freebsd.org) Received: (from emaste@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q91FjGSc086482; Mon, 1 Oct 2012 15:45:16 GMT (envelope-from emaste) Message-Id: <201210011545.q91FjGSc086482@freefall.freebsd.org> Date: Mon, 1 Oct 2012 15:45:16 GMT From: Ed Maste To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: standards/172215: localeconv() grouping appears not to match POSIX X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Ed Maste List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Oct 2012 15:50:02 -0000 >Number: 172215 >Category: standards >Synopsis: localeconv() grouping appears not to match POSIX >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-standards >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Oct 01 15:50:02 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Ed Maste >Release: FreeBSD 9.0-STABLE i386 >Organization: FreeBSD >Environment: System: FreeBSD freefall.freebsd.org 9.0-STABLE FreeBSD 9.0-STABLE #6 r235139: Tue May 8 21:19:03 UTC 2012 simon@freefall.freebsd.org:/usr/obj/usr/src/sys/FREEFALL i386 >Description: I can find two references to the expected return from localeconv() for grouping / mon_grouping. First, the behaviour in SUSv2 http://pubs.opengroup.org/onlinepubs/007908799/xbd/locale.html matches what FreeBSD currently does -- { CHAR_MAX, '\0' }: The third column shows the equivalent string in the ISO C standard that would be used by the localeconv() function to accommodate this grouping mon_grouping Formatted Value ISO C String -1 123456789 "\177" In 1003.1 (2004) for POSIX Locale http://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap07.html it suggests that the return should be empty string: langinfo POSIX Locale localeconv() localedef Item Constant Value Value Value mon_grouping - N/A "" -1 This came up on the gnulib mailing list recently, which has a testcase for localeconv that contains #ifdef'd-out cases for l->grouping and l->mon_gropuing on FreeBSD. http://lists.gnu.org/archive/html/bug-gnulib/2012-08/msg00142.html >How-To-Repeat: >Fix: I suspect this could be accomplished with the following patch: Index: lib/libc/locale/fix_grouping.c =================================================================== --- fix_grouping.c (revision 240919) +++ fix_grouping.c (working copy) @@ -31,7 +31,7 @@ #include #include -static const char nogrouping[] = { CHAR_MAX, '\0' }; +static const char nogrouping[] = { '\0' }; /* * Internal helper used to convert grouping sequences from string >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-standards@FreeBSD.ORG Tue Oct 2 14:50:11 2012 Return-Path: Delivered-To: freebsd-standards@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 36DBD106566B for ; Tue, 2 Oct 2012 14:50:11 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id E9DDE8FC16 for ; Tue, 2 Oct 2012 14:50:10 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q92EoAfm063617 for ; Tue, 2 Oct 2012 14:50:10 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q92EoAFH063616; Tue, 2 Oct 2012 14:50:10 GMT (envelope-from gnats) Resent-Date: Tue, 2 Oct 2012 14:50:10 GMT Resent-Message-Id: <201210021450.q92EoAFH063616@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-standards@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Ed Maste Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id ABAE7106566B for ; Tue, 2 Oct 2012 14:41:44 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 965718FC08 for ; Tue, 2 Oct 2012 14:41:44 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q92Efi51062867 for ; Tue, 2 Oct 2012 14:41:44 GMT (envelope-from emaste@freefall.freebsd.org) Received: (from emaste@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q92EfiUo062866; Tue, 2 Oct 2012 14:41:44 GMT (envelope-from emaste) Message-Id: <201210021441.q92EfiUo062866@freefall.freebsd.org> Date: Tue, 2 Oct 2012 14:41:44 GMT From: Ed Maste To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: standards/172273: unsetenv(3) issue according to autoconf X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Ed Maste List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Oct 2012 14:50:11 -0000 >Number: 172273 >Category: standards >Synopsis: unsetenv(3) issue according to autoconf >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-standards >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Oct 02 14:50:10 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Ed Maste >Release: FreeBSD 9.1-PRERELEASE amd64 >Organization: FreeBSD >Environment: FreeBSD feynman 9.1-PRERELEASE FreeBSD 9.1-PRERELEASE #18 r240994M: Thu Sep 27 09:08:57 EDT 2012 emaste@feynman:/data2/emaste/obj/home/emaste/src/9/sys/TEST amd64 GNU autoconf's unsetenv test fails on 9.1 - see test case below. >Description: >How-To-Repeat: The autoconf test is reproduced below - the 'return 3' is the failing line #include #include extern char **environ; int main(int argc, char *argv[]) { char entry1[] = "a=1"; char entry2[] = "b=2"; char *env[] = { entry1, entry2, NULL }; if (putenv ((char *) "a=1")) return 1; if (putenv (entry2)) return 2; entry2[0] = 'a'; unsetenv ("a"); if (getenv ("a")) return 3; if (!unsetenv ("") || errno != EINVAL) return 4; entry2[0] = 'b'; environ = env; if (!getenv ("a")) return 5; entry2[0] = 'a'; unsetenv ("a"); if (getenv ("a")) return 6; return 0; } >Fix: >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-standards@FreeBSD.ORG Tue Oct 2 16:00:29 2012 Return-Path: Delivered-To: freebsd-standards@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 692401065673 for ; Tue, 2 Oct 2012 16:00:29 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 45F808FC12 for ; Tue, 2 Oct 2012 16:00:22 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q92G0M9C026074 for ; Tue, 2 Oct 2012 16:00:22 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q92G0MPb026073; Tue, 2 Oct 2012 16:00:22 GMT (envelope-from gnats) Resent-Date: Tue, 2 Oct 2012 16:00:22 GMT Resent-Message-Id: <201210021600.q92G0MPb026073@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-standards@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Ed Maste Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6AA921065670 for ; Tue, 2 Oct 2012 15:58:20 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 555348FC12 for ; Tue, 2 Oct 2012 15:58:20 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q92FwK9F026000 for ; Tue, 2 Oct 2012 15:58:20 GMT (envelope-from emaste@freefall.freebsd.org) Received: (from emaste@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q92FwKlb025999; Tue, 2 Oct 2012 15:58:20 GMT (envelope-from emaste) Message-Id: <201210021558.q92FwKlb025999@freefall.freebsd.org> Date: Tue, 2 Oct 2012 15:58:20 GMT From: Ed Maste To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: standards/172276: POSIX: {get, set}groups gidsetsize is u_int not int X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Ed Maste List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Oct 2012 16:00:29 -0000 >Number: 172276 >Category: standards >Synopsis: POSIX: {get,set}groups gidsetsize is u_int not int >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-standards >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Oct 02 16:00:21 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Ed Maste >Release: FreeBSD 9.0-STABLE i386 >Organization: ADARA Networks >Environment: System: FreeBSD freefall.freebsd.org 9.0-STABLE FreeBSD 9.0-STABLE #6 r235139: Tue May 8 21:19:03 UTC 2012 simon@freefall.freebsd.org:/usr/obj/usr/src/sys/FREEFALL i386 >Description: GNU Autoconf doesn't like our getgroups: On some platforms, this function fails to reject a negative count, even though that is less than the size that would be returned: >How-To-Repeat: Run gnulib autoconf, configure:54098: checking whether getgroups handles negative values http://pubs.opengroup.org/onlinepubs/9699919799/functions/getgroups.html >Fix: --- getsetgroups_arg.diff begins here --- Index: sys/kern/kern_prot.c =================================================================== --- sys/kern/kern_prot.c (revision 240919) +++ sys/kern/kern_prot.c (working copy) @@ -279,7 +279,7 @@ #ifndef _SYS_SYSPROTO_H_ struct getgroups_args { - u_int gidsetsize; + int gidsetsize; gid_t *gidset; }; #endif @@ -801,7 +801,7 @@ #ifndef _SYS_SYSPROTO_H_ struct setgroups_args { - u_int gidsetsize; + int gidsetsize; gid_t *gidset; }; #endif @@ -812,7 +812,7 @@ gid_t *groups = NULL; int error; - if (uap->gidsetsize > ngroups_max + 1) + if (uap->gidsetsize < 0 || uap->gidsetsize > ngroups_max + 1) return (EINVAL); groups = malloc(uap->gidsetsize * sizeof(gid_t), M_TEMP, M_WAITOK); error = copyin(uap->gidset, groups, uap->gidsetsize * sizeof(gid_t)); Index: sys/kern/systrace_args.c =================================================================== --- sys/kern/systrace_args.c (revision 240919) +++ sys/kern/systrace_args.c (working copy) @@ -491,7 +491,7 @@ /* getgroups */ case 79: { struct getgroups_args *p = params; - uarg[0] = p->gidsetsize; /* u_int */ + iarg[0] = p->gidsetsize; /* int */ uarg[1] = (intptr_t) p->gidset; /* gid_t * */ *n_args = 2; break; @@ -499,7 +499,7 @@ /* setgroups */ case 80: { struct setgroups_args *p = params; - uarg[0] = p->gidsetsize; /* u_int */ + iarg[0] = p->gidsetsize; /* int */ uarg[1] = (intptr_t) p->gidset; /* gid_t * */ *n_args = 2; break; Index: sys/kern/syscalls.master =================================================================== --- sys/kern/syscalls.master (revision 240919) +++ sys/kern/syscalls.master (working copy) @@ -183,9 +183,9 @@ 77 AUE_NULL OBSOL vlimit 78 AUE_MINCORE STD { int mincore(const void *addr, size_t len, \ char *vec); } -79 AUE_GETGROUPS STD { int getgroups(u_int gidsetsize, \ +79 AUE_GETGROUPS STD { int getgroups(int gidsetsize, \ gid_t *gidset); } -80 AUE_SETGROUPS STD { int setgroups(u_int gidsetsize, \ +80 AUE_SETGROUPS STD { int setgroups(int gidsetsize, \ gid_t *gidset); } 81 AUE_GETPGRP STD { int getpgrp(void); } 82 AUE_SETPGRP STD { int setpgid(int pid, int pgid); } Index: sys/compat/freebsd32/syscalls.master =================================================================== --- sys/compat/freebsd32/syscalls.master (revision 240919) +++ sys/compat/freebsd32/syscalls.master (working copy) @@ -181,9 +181,9 @@ 77 AUE_NULL OBSOL vlimit 78 AUE_MINCORE NOPROTO { int mincore(const void *addr, size_t len, \ char *vec); } -79 AUE_GETGROUPS NOPROTO { int getgroups(u_int gidsetsize, \ +79 AUE_GETGROUPS NOPROTO { int getgroups(int gidsetsize, \ gid_t *gidset); } -80 AUE_SETGROUPS NOPROTO { int setgroups(u_int gidsetsize, \ +80 AUE_SETGROUPS NOPROTO { int setgroups(int gidsetsize, \ gid_t *gidset); } 81 AUE_GETPGRP NOPROTO { int getpgrp(void); } 82 AUE_SETPGRP NOPROTO { int setpgid(int pid, int pgid); } --- getsetgroups_arg.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-standards@FreeBSD.ORG Tue Oct 2 16:10:17 2012 Return-Path: Delivered-To: freebsd-standards@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F2929106566C for ; Tue, 2 Oct 2012 16:10:16 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id C40D78FC0C for ; Tue, 2 Oct 2012 16:10:16 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q92GAG0g035283 for ; Tue, 2 Oct 2012 16:10:16 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q92GAG5t035278; Tue, 2 Oct 2012 16:10:16 GMT (envelope-from gnats) Date: Tue, 2 Oct 2012 16:10:16 GMT Message-Id: <201210021610.q92GAG5t035278@freefall.freebsd.org> To: freebsd-standards@FreeBSD.org From: Andrey Chernov Cc: Subject: Re: standards/172273: unsetenv(3) issue according to autoconf X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Andrey Chernov List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Oct 2012 16:10:17 -0000 The following reply was made to PR standards/172273; it has been noted by GNATS. From: Andrey Chernov To: Ed Maste Cc: FreeBSD-gnats-submit@FreeBSD.org Subject: Re: standards/172273: unsetenv(3) issue according to autoconf Date: Tue, 02 Oct 2012 20:08:31 +0400 This is a multi-part message in MIME format. --------------050703020706000604050704 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit On 02.10.2012 18:41, Ed Maste wrote: >> Number: 172273 >> Category: standards >> Synopsis: unsetenv(3) issue according to autoconf >> Confidential: no >> Severity: non-critical >> Priority: low >> Responsible: freebsd-standards >> State: open >> Quarter: >> Keywords: >> Date-Required: >> Class: sw-bug >> Submitter-Id: current-users >> Arrival-Date: Tue Oct 02 14:50:10 UTC 2012 >> Closed-Date: >> Last-Modified: >> Originator: Ed Maste >> Release: FreeBSD 9.1-PRERELEASE amd64 >> Organization: > FreeBSD >> Environment: > FreeBSD feynman 9.1-PRERELEASE FreeBSD 9.1-PRERELEASE #18 r240994M: Thu Sep 27 09:08:57 EDT 2012 emaste@feynman:/data2/emaste/obj/home/emaste/src/9/sys/TEST amd64 > > GNU autoconf's unsetenv test fails on 9.1 - see test case below. > > >> Description: >> How-To-Repeat: > > The autoconf test is reproduced below - the 'return 3' is the failing line > > > #include > #include > extern char **environ; > > int main(int argc, char *argv[]) > { > char entry1[] = "a=1"; > char entry2[] = "b=2"; > char *env[] = { entry1, entry2, NULL }; > if (putenv ((char *) "a=1")) return 1; > if (putenv (entry2)) return 2; > entry2[0] = 'a'; > unsetenv ("a"); > if (getenv ("a")) return 3; > if (!unsetenv ("") || errno != EINVAL) return 4; > entry2[0] = 'b'; > environ = env; > if (!getenv ("a")) return 5; > entry2[0] = 'a'; > unsetenv ("a"); > if (getenv ("a")) return 6; > return 0; > } > >> Fix: > Attached simple patch should fix this issue (failing on test 3). --------------050703020706000604050704 Content-Type: text/plain; charset=windows-1251; name="getenv.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="getenv.patch" --- getenv.c.bak 2012-10-02 20:01:33.000000000 +0400 +++ getenv.c 2012-10-02 20:03:33.000000000 +0400 @@ -675,7 +675,8 @@ /* Deactivate specified variable. */ envNdx = envVarsTotal - 1; - if (__findenv(name, nameLen, &envNdx, true) != NULL) { + /* Remove all occurences */ + while (__findenv(name, nameLen, &envNdx, true) != NULL) { envVars[envNdx].active = false; if (envVars[envNdx].putenv) __remove_putenv(envNdx); --------------050703020706000604050704-- From owner-freebsd-standards@FreeBSD.ORG Tue Oct 2 16:30:20 2012 Return-Path: Delivered-To: freebsd-standards@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 81410106566C for ; Tue, 2 Oct 2012 16:30:20 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 52D968FC08 for ; Tue, 2 Oct 2012 16:30:20 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q92GUKBm053593 for ; Tue, 2 Oct 2012 16:30:20 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q92GUKbD053586; Tue, 2 Oct 2012 16:30:20 GMT (envelope-from gnats) Date: Tue, 2 Oct 2012 16:30:20 GMT Message-Id: <201210021630.q92GUKbD053586@freefall.freebsd.org> To: freebsd-standards@FreeBSD.org From: Ed Maste Cc: Subject: Re: standards/172273: unsetenv(3) issue according to autoconf X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Ed Maste List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Oct 2012 16:30:20 -0000 The following reply was made to PR standards/172273; it has been noted by GNATS. From: Ed Maste To: Andrey Chernov Cc: FreeBSD-gnats-submit@freebsd.org Subject: Re: standards/172273: unsetenv(3) issue according to autoconf Date: Tue, 2 Oct 2012 12:29:24 -0400 > Attached simple patch should fix this issue (failing on test 3). Thanks, that fixes it. Your comment is missing a . and occurrences has two 'r's though. -Ed From owner-freebsd-standards@FreeBSD.ORG Tue Oct 2 16:30:25 2012 Return-Path: Delivered-To: freebsd-standards@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1B0901065670 for ; Tue, 2 Oct 2012 16:30:25 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 06B388FC16 for ; Tue, 2 Oct 2012 16:30:25 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q92GUOFT054151 for ; Tue, 2 Oct 2012 16:30:24 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q92GUOCJ054140; Tue, 2 Oct 2012 16:30:24 GMT (envelope-from gnats) Date: Tue, 2 Oct 2012 16:30:24 GMT Message-Id: <201210021630.q92GUOCJ054140@freefall.freebsd.org> To: freebsd-standards@FreeBSD.org From: Andrey Chernov Cc: Subject: Re: standards/172273: unsetenv(3) issue according to autoconf X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Andrey Chernov List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Oct 2012 16:30:25 -0000 The following reply was made to PR standards/172273; it has been noted by GNATS. From: Andrey Chernov To: Ed Maste Cc: FreeBSD-gnats-submit@FreeBSD.org Subject: Re: standards/172273: unsetenv(3) issue according to autoconf Date: Tue, 02 Oct 2012 20:29:33 +0400 This is a multi-part message in MIME format. --------------050507030501080408080306 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit On 02.10.2012 20:08, Andrey Chernov wrote: > Attached simple patch should fix this issue (failing on test 3). Oops, see more correct version attached. --------------050507030501080408080306 Content-Type: text/plain; charset=windows-1251; name="getenv.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="getenv.patch" --- getenv.c.old 2012-10-02 20:01:33.000000000 +0400 +++ getenv.c 2012-10-02 20:25:47.000000000 +0400 @@ -675,11 +675,13 @@ /* Deactivate specified variable. */ envNdx = envVarsTotal - 1; - if (__findenv(name, nameLen, &envNdx, true) != NULL) { + /* Remove all occurences */ + while (__findenv(name, nameLen, &envNdx, true) != NULL) { envVars[envNdx].active = false; if (envVars[envNdx].putenv) __remove_putenv(envNdx); __rebuild_environ(envActive - 1); + envNdx = envVarsTotal - 1; } return (0); --------------050507030501080408080306-- From owner-freebsd-standards@FreeBSD.ORG Tue Oct 2 18:28:14 2012 Return-Path: Delivered-To: freebsd-standards@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 607E7106566B; Tue, 2 Oct 2012 18:28:14 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 342298FC0C; Tue, 2 Oct 2012 18:28:14 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q92ISEPJ063835; Tue, 2 Oct 2012 18:28:14 GMT (envelope-from emaste@freefall.freebsd.org) Received: (from emaste@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q92ISEXY063831; Tue, 2 Oct 2012 18:28:14 GMT (envelope-from emaste) Date: Tue, 2 Oct 2012 18:28:14 GMT Message-Id: <201210021828.q92ISEXY063831@freefall.freebsd.org> To: emaste@FreeBSD.org, freebsd-standards@FreeBSD.org, freebsd-www@FreeBSD.org From: emaste@FreeBSD.org Cc: Subject: Re: www/171907: Rechtschreibfehler auf Ihrer Internetseite! X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Oct 2012 18:28:14 -0000 Synopsis: Rechtschreibfehler auf Ihrer Internetseite! Responsible-Changed-From-To: freebsd-standards->freebsd-www Responsible-Changed-By: emaste Responsible-Changed-When: Tue Oct 2 18:26:53 UTC 2012 Responsible-Changed-Why: Google translate suggests this documents a website typo. http://www.freebsd.org/cgi/query-pr.cgi?pr=171907