Re: standards/129196: Inconsistent errno in strtol()

View: New views
2 Messages — Rating Filter:   Alert me  

Re: standards/129196: Inconsistent errno in strtol()

by Gavin Atkinson-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Synopsis: Inconsistent errno in strtol()

Responsible-Changed-From-To: freebsd-doc->freebsd-standards
Responsible-Changed-By: gavin
Responsible-Changed-When: Wed Aug 12 15:50:32 UTC 2009
Responsible-Changed-Why:
I think this looks more like somethign for -standards than -doc

http://www.freebsd.org/cgi/query-pr.cgi?pr=129196
_______________________________________________
freebsd-standards@... mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-standards
To unsubscribe, send any mail to "freebsd-standards-unsubscribe@..."

Parent Message unknown Re: standards/129196: Inconsistent errno in strtol()

by Jilles Tjoelker :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

The following reply was made to PR standards/129196; it has been noted by GNATS.

From: Jilles Tjoelker <jilles@...>
To: bug-followup@..., shurd@...
Cc:  
Subject: Re: standards/129196: Inconsistent errno in strtol()
Date: Wed, 12 Aug 2009 20:45:25 +0200

 The behaviour seems fine to me.
 
 POSIX.1-2008 on
 http://www.opengroup.org/onlinepubs/9699919799/functions/strtol.html
 allows errno=EINVAL if no conversion could be performed (but the proper
 way to check this is via endptr).
 
 Common sense suggests that strtol("0", NULL, 0) be successful and return
 0, and in fact that is the case ("0" is an octal constant).
 
 "0x" should be interpreted as a subject sequence "0" followed by
 unrecognized sequence "x".
 
 --
 Jilles Tjoelker
_______________________________________________
freebsd-standards@... mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-standards
To unsubscribe, send any mail to "freebsd-standards-unsubscribe@..."