bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

FreeBSD getopt failure (was: Solaris 10 nanosleep link failure)


From: Eric Blake
Subject: FreeBSD getopt failure (was: Solaris 10 nanosleep link failure)
Date: Tue, 1 Dec 2009 17:26:50 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Jim Meyering <jim <at> meyering.net> writes:

> BTW, I just saw this go by while testing on freebsd8:
> 
>     ...
>     Abort trap (core dumped)
>     FAIL: test-getopt

Which line number?  Or better yet, a full backtrace, since test-getopt calls 
some lines in a loop.

Right now, getopt.m4 only filters out a bug that appears in OpenBSD and cygwin 
(I know, because I just reported it to the cygwin folks, and dug up the latest 
getopt_long sources in all three BSD camps[1]; by inspection, both NetBSD and 
FreeBSD appear to handle leading '-' in the same manner as glibc, and only 
OpenBSD failed).  But I didn't closely audit the FreeBSD sources to see if 
there was some other discrepancy from glibc behavior (I did, however, notice at 
least one harmless discrepancy: glibc caches getenv("POSIXLY_CORRECT") until 
the next time optind==0, whereas FreeBSD does getenv() on every getopt_long 
invocation; I think it is harmless because it is unlikely that anyone would 
call {un,}setenv to change POSIXLY_CORRECT in the middle of a single loop of 
argc/argv parsing while still having any expectation of sane results).

[1] http://cygwin.com/ml/cygwin-developers/2009-12/msg00001.html

-- 
Eric Blake






reply via email to

[Prev in Thread] Current Thread [Next in Thread]