*BSD News Article 51810


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!simtel!news.sprintlink.net!cs.utexas.edu!howland.reston.ans.net!xlink.net!news.dfn.de!gs.dfn.de!fauern!news.tu-chemnitz.de!irz401!uriah.heep!not-for-mail
From: j@uriah.heep.sax.de (J Wunsch)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: freebsd getopt / compiling glibc
Date: 27 Sep 1995 23:33:29 +0100
Organization: Private FreeBSD site, Dresden.
Lines: 16
Message-ID: <44cjfp$pks@uriah.heep.sax.de>
References: <44abde$4bu@NNTP.MsState.Edu>
NNTP-Posting-Host: uriah.heep.sax.de
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit

David Simmons <simmons@aris.com> wrote:
>The getopt() function in the c library that comes with FreeBSD appears
>to be lacking functionality.  For instance, I have a program which
>uses the getopt() function to parse arguments, and a command line
>like "foo -s filename" will work, while "foo filename -s" will fail.
>Under Linux, both possibilities work equally well.

Then Linux is broken wrt. Posix.

Posix mandates "-s filename", and it allows for "-sfilename", but
deprecates the latter.  "filename -s" is not allowed in Posix terms.
-- 
cheers, J"org

joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/
Never trust an operating system you don't have sources for. ;-)