Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Oct 2014 12:02:41 +0400
From:      Andrey Chernov <ache@freebsd.org>
To:        Garrett Cooper <ngie@FreeBSD.org>, src-committers@freebsd.org,  svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r273024 - head/contrib/netbsd-tests/lib/libc/time
Message-ID:  <543B8721.1050906@freebsd.org>
In-Reply-To: <543B8162.9020607@freebsd.org>
References:  <201410130244.s9D2iama042530@svn.freebsd.org> <543B8162.9020607@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 13.10.2014 11:38, Andrey Chernov wrote:
> On 13.10.2014 6:44, Garrett Cooper wrote:
>> Author: ngie
>> Date: Mon Oct 13 02:44:35 2014
>> New Revision: 273024
>> URL: https://svnweb.freebsd.org/changeset/base/273024
>>
>> Log:
>>   Only test the return value in mktime_negyear
>>   
>>   Testing for the errno is an optional requirement according to POSIX, and
>>   FreeBSD doesn't document that errno would be set on failure with mktime
> 
> According to Base Specs, Issue 7, at least EOVERFLOW we don't support is
> not optional.
> 

Exact quote (I see absolutely no optionality of this):

RETURN VALUE
...
If the time since the Epoch cannot be represented, the function shall
return the value (time_t)−1 and set errno to indicate the error.

ERRORS
The mktime() function shall fail if:
[EOVERFLOW] The result cannot be represented.

-- 
http://ache.vniz.net/



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