Email List: Xaustin-group-lX
[All Lists]

XSH ERN 250 (was: Minutes of the August 14th 2008 teleconference)

To: austin-group-l@xxxxxxxxxxxxx
Subject: XSH ERN 250 (was: Minutes of the August 14th 2008 teleconference)
From: Geoff Clare <gwc@xxxxxxxxxxxxx>
Date: Mon, 1 Sep 2008 10:47:21 +0100
References: <1218787608.8714.2.camel@xxxxxx>
Andrew Josey <ajosey@xxxxxx> wrote, on 15 Aug 2008:
>
> Minutes of the 14 August 2008 Teleconference     Austin-438 Page 1 of 1
> Submitted by Andrew Josey, The Open Group.             August 15 , 2008

> XSH ERN 250 setlocale Accept as marked 
> 
> Send this down the interps track.
> The standard states the requirements for setlocale() , and
> conforming implementations must conform to this. However, concerns have
> been raised about this which are being referred to the sponsor.
> (Target for TC1)
> 
>  Change line 41265f to
> 
>    [...] The application shall not modify the string returned.  The
>    returned string pointer might be invalidated or the string content
>    overwritten by a subsequent call to setlocale().

In my previous reply to the minutes I suggested some minor changes
to (the later parts of) this aardvark.  However, it has since occurred
to me that the above change would create a conflict with the C Standard.
C99 states:

    "The pointer to string returned by the setlocale function is such
    that a subsequent call with that string value and its associated
    category will restore that part of the program's locale. The
    string pointed to shall not be modified by the program, but may be
    overwritten by a subsequent call to the setlocale function."

It only allows the string to be overwritten by a subsequent call; it
does not allow the pointer to be invalidated.

Therefore I believe this issue should be raised with the C committee
before we apply any change to POSIX.

-- 
Geoff Clare <g.clare@xxxxxx>
The Open Group, Thames Tower, Station Road, Reading, RG1 1LX, England

<Prev in Thread] Current Thread [Next in Thread>