From owner-freebsd-standards@FreeBSD.ORG Sun Feb 22 08:20:11 2004 Return-Path: Delivered-To: freebsd-standards@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B9A4816A4CF for ; Sun, 22 Feb 2004 08:20:11 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id B214A43D1F for ; Sun, 22 Feb 2004 08:20:11 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) i1MGKBbv001590 for ; Sun, 22 Feb 2004 08:20:11 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.10/8.12.10/Submit) id i1MGKBRH001589; Sun, 22 Feb 2004 08:20:11 -0800 (PST) (envelope-from gnats) Date: Sun, 22 Feb 2004 08:20:11 -0800 (PST) Message-Id: <200402221620.i1MGKBRH001589@freefall.freebsd.org> To: freebsd-standards@FreeBSD.org From: Marius Strobl Subject: Re: standards/63173: Patch to add getopt_long_only(3) to libc X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Marius Strobl List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Feb 2004 16:20:11 -0000 The following reply was made to PR standards/63173; it has been noted by GNATS. From: Marius Strobl To: Andrey Chernov Cc: FreeBSD-gnats-submit@FreeBSD.ORG, ru@FreeBSD.ORG Subject: Re: standards/63173: Patch to add getopt_long_only(3) to libc Date: Sun, 22 Feb 2004 17:12:41 +0100 On Sat, Feb 21, 2004 at 09:48:14PM +0300, Andrey Chernov wrote: > On Sat, Feb 21, 2004 at 04:57:06PM +0100, Marius Strobl wrote: > > after applying the patch still doesn't implement getopt(3) and > > therefore replace src/lib/libc/stdlib/getopt.c, i.e. it doesn't > > define REPLACE_GETOPT, yet. This is something that should be taken > > into consideration for FreeBSD 6 (regardless if the patch is applied > > or not). > > Please always consider POSIX as superceeded standard against GNU/Linux. > > It means your patch for header is wrong. If POSIX says that getopt() must > be declared in , it is only place where is must be declared, and > not in etc. If you need its declaration in non-standard header > , must be included, as was done before your patch. > Also please remove all getopt()-related redeclarations from Well, that's exactly the point where I got confused as e.g. according to the Single UNIX Specification Version 2 getsubopt(3) should live in stdlib.h, yet on FreeBSD it's primarily in unistd.h with a second declaration in stdlib.h. :) The intention of the way it's done in OpenBSD and the patch is to declare getopt(3) etc. unconditionally as done by the GNU getopt.h and not in specific namespaces (like __XSI_VISIBLE etc.). However, I don't feel strongly about it either way. I put up a new patch keeping getopt.h the way it was at: ftp://ftp.zeist.de/pub/patches/src_getopt_long_only.diff2 Thanks for having a look at this!