Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Nov 1999 12:22:34 -0500 (EST)
From:      Garrett Wollman <wollman@khavrinen.lcs.mit.edu>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   bin/14925: getsubopt isn't poisonous enough
Message-ID:  <199911161722.MAA12167@khavrinen.lcs.mit.edu>

next in thread | raw e-mail | index | archive | help

>Number:         14925
>Category:       bin
>Synopsis:       getsubopt isn't poisonous enough
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Nov 16 09:30:00 PST 1999
>Closed-Date:
>Last-Modified:
>Originator:     Garrett Wollman
>Release:        FreeBSD 4.0-CURRENT i386
>Organization:
MIT Laboratory for Computer Science
>Environment:

	-current sources as of today

>Description:

	The second argument to getsubopt(3) is declared as a `pointer
	to const pointer to char'.  Since the contents of the tokens
	array are typically string literals, and since getsubopt(3)
	doesn't make any attempt to change them, it would be better
	declared as `pointer to const pointer to const char' (`const
	char * const * tokens') so that code can be compiled with
	const string literals (`-Wwrite-strings').  This is
	unfortunately type-incompatible with existing programs, and
	SUSv2 codifies the bogus type.


>How-To-Repeat:

	man getsubopt	

>Fix:

	Complain to P1003 so that this mistake doesn't get carried
	over into the POSIX update.



>Release-Note:
>Audit-Trail:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199911161722.MAA12167>