<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/lib/libc/stdlib/getopt_long.c, branch releng/14.4</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=releng%2F14.4</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=releng%2F14.4'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2023-11-27T04:20:09Z</updated>
<entry>
<title>libc: Purge unneeded cdefs.h</title>
<updated>2023-11-27T04:20:09Z</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-11-01T22:43:37Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=4025b5b527c870cf095ac9531764f4e4d3feaec2'/>
<id>urn:sha1:4025b5b527c870cf095ac9531764f4e4d3feaec2</id>
<content type='text'>
These sys/cdefs.h are not needed. Purge them. They are mostly left-over
from the $FreeBSD$ removal. A few in libc are still required for macros
that cdefs.h defines. Keep those.

Sponsored by:		Netflix
Differential Revision:	https://reviews.freebsd.org/D42385

(cherry picked from commit 559a218c9b257775fb249b67945fe4a05b7a6b9f)
</content>
</entry>
<entry>
<title>Remove $FreeBSD$: one-line .c pattern</title>
<updated>2023-08-16T17:54:42Z</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-08-16T17:54:42Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=1d386b48a555f61cb7325543adbbb5c3f3407a66'/>
<id>urn:sha1:1d386b48a555f61cb7325543adbbb5c3f3407a66</id>
<content type='text'>
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
</content>
</entry>
<entry>
<title>getopt: Fix conversion from string-literal to non-const char *</title>
<updated>2021-01-19T21:23:25Z</updated>
<author>
<name>Alex Richardson</name>
<email>arichardson@FreeBSD.org</email>
</author>
<published>2021-01-19T11:35:04Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=0348c8fcfaa22d4f2bf548ad9c187c09ef90c533'/>
<id>urn:sha1:0348c8fcfaa22d4f2bf548ad9c187c09ef90c533</id>
<content type='text'>
Define a non-const static char EMSG[] = "" to avoid having to add
__DECONST() to all uses of EMSG. Also make current_dash a const char *
to fix this warning.
</content>
</entry>
<entry>
<title>getopt_long(3): fix case of malformed long opt</title>
<updated>2019-01-04T03:13:24Z</updated>
<author>
<name>Kyle Evans</name>
<email>kevans@FreeBSD.org</email>
</author>
<published>2019-01-04T03:13:24Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=253b638eabd53fe4a1f26dbffbc7387180cbdaa0'/>
<id>urn:sha1:253b638eabd53fe4a1f26dbffbc7387180cbdaa0</id>
<content type='text'>
When presented with an arg string like '-l-', getopt_long will successfully
parse out the 'l' short option, then proceed to match '--' against the first
longopts entry as it later does a strncmp with len=0. This latter bit is
arguably another bug in itself, but presumably not a practical issue as all
callers of parse_long_options are already doing the right thing (except this
one pointed out).

An opt string like '-l-' should be considered malformed and throw a bad
argument rather than behaving as if '--' were passed. It cannot possibly do
what the invoker expects, and it's probably the result of a typo (ls -l- a)
rather than any intent.

Reported by:	Tony Overfield &lt;toverfield@yahoo.com&gt;
Reviewed by:	imp
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D18616
</content>
</entry>
<entry>
<title>Merge intermediate OpenBSD v1.25 changes (almost identical to ours)</title>
<updated>2014-06-22T21:54:57Z</updated>
<author>
<name>Andrey A. Chernov</name>
<email>ache@FreeBSD.org</email>
</author>
<published>2014-06-22T21:54:57Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=298207c39a3d2cd109fe33ef7e668ec20be1758e'/>
<id>urn:sha1:298207c39a3d2cd109fe33ef7e668ec20be1758e</id>
<content type='text'>
to reduce diff and bump OpenBSD patch level to v1.26.

MFC after:      2 weeks
</content>
</entry>
<entry>
<title>getopt(3): recognize option:: as GNU extension for "optional options".</title>
<updated>2014-06-22T20:13:57Z</updated>
<author>
<name>Pedro F. Giffuni</name>
<email>pfg@FreeBSD.org</email>
</author>
<published>2014-06-22T20:13:57Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=6aa225165fe7ddb3a3f8fce85d554a324f0b73f3'/>
<id>urn:sha1:6aa225165fe7ddb3a3f8fce85d554a324f0b73f3</id>
<content type='text'>
Also ANSIfy a function declaration.

While here update the OpenBSD patch level in getopt_long.c as we
already have the corresponding change.

Obtained from:	NetBSD
MFC after:	2 weeks
</content>
</entry>
<entry>
<title>Switch from 4-clause to 2-clause BSD license. (OpenBSD r1.22)</title>
<updated>2012-06-11T22:25:20Z</updated>
<author>
<name>Xin LI</name>
<email>delphij@FreeBSD.org</email>
</author>
<published>2012-06-11T22:25:20Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=1b74dc4a8b5b1fa2395a83f110014436d8babacd'/>
<id>urn:sha1:1b74dc4a8b5b1fa2395a83f110014436d8babacd</id>
<content type='text'>
No functional change.

Obtained from:	NetBSD via OpenBSD
</content>
</entry>
<entry>
<title>Keep compatible parts in sync with OpenBSD v1.21, add some comments.</title>
<updated>2006-09-23T14:48:31Z</updated>
<author>
<name>Andrey A. Chernov</name>
<email>ache@FreeBSD.org</email>
</author>
<published>2006-09-23T14:48:31Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=d3ff3b5f2fd16fb4ce77203aa71a9740a80e8a5b'/>
<id>urn:sha1:d3ff3b5f2fd16fb4ce77203aa71a9740a80e8a5b</id>
<content type='text'>
No functional changes.
</content>
</entry>
<entry>
<title>Remove code #ifndef'ed in prev. commit to stay in sync with OpenBSD</title>
<updated>2006-09-22T18:59:03Z</updated>
<author>
<name>Andrey A. Chernov</name>
<email>ache@FreeBSD.org</email>
</author>
<published>2006-09-22T18:59:03Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=6843acf8acdc1bbaf31c1c006780afec788d8c98'/>
<id>urn:sha1:6843acf8acdc1bbaf31c1c006780afec788d8c98</id>
<content type='text'>
v1.21 which just do that.
</content>
</entry>
<entry>
<title>Be more GNU compatible:</title>
<updated>2006-09-22T17:01:38Z</updated>
<author>
<name>Andrey A. Chernov</name>
<email>ache@FreeBSD.org</email>
</author>
<published>2006-09-22T17:01:38Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=f27c7b4713a2861fc9cf73df609f6fae80664855'/>
<id>urn:sha1:f27c7b4713a2861fc9cf73df609f6fae80664855</id>
<content type='text'>
don't be greedy on the GNU "::" extension when arg separated by whitespace
and POSIX_CORRECTLY is set. From POSIX point of view this is unclear
situation, so minimal assumption looks right.
</content>
</entry>
</feed>
