|
Home About Us A-Z Index Search * Contact Us Register Login Press ShopThe Open Brand -- Problem Reporting and Interpretations System |
Problem Report 0515 Details
Show help | Quick Search | Submit a Test Suite Support Request | Click here to view your privileges
This page provides all information on Problem Report 0515.
Report 0515 Actions
Problem Report Number 0515 Submitter's Classification Test Suite problem State Resolved Resolution Rejected (REJ) Problem Resolution ID REJ.X.0134 Raised 1996-11-12 08:00 Updated 2003-03-13 08:00 Published null Product Standard Internationalised System Calls and Libraries Extended (UNIX 95) Certification Program The Open Brand certification program Test Suite VSX4 version 4.3.5 Test Identification ANSI.os/genuts/strtol_X 8 Problem Summary PG4R.135 On page 623 of the Systems Interfaces and Headers Issue 4, Version 2 it states, "Upon successful completion strtol() returns the converted value, if any. If no conversion could be performed, 0 is retu... Problem Text
On page 623 of the Systems Interfaces and Headers Issue 4, Version 2
it states, "Upon successful completion strtol() returns the converted
value, if any. If no conversion could be performed, 0 is
returned and errno may be set to [EINVAL]".
.sp
Since the word "may" is used, an implementation should not
have to set errno to EINVAL to be conforming.
This test should not fail if errno is not set to EINVAL
when the base is 37.Test Output
strtol(10) with base 37:
expected: return value 0, errno EINVAL
or: return value 37
actual: return value 0, errno 0(NO ERROR)Review Information
Review Type TSMA Review Start Date null Completed null Status Complete Review Recommendation No Resolution Given Review Response
According to X/Open resolution VWG/034/111292 there are two separate EINVAL
conditions for strtol(), one for "no conversion could be performed" and one
for "the value of base is not supported". The former was omitted from
the ERRORS section in XSH4 for strtol() but still applies because of the
description elsewhere in the text. (It was included in the ERRORS section
for strtoul().)
Therefore the text quoted by the submitter, "If no conversion could be
performed, 0 is returned and errno may be set to [EINVAL]", relates to
the "no conversion" EINVAL error. It does not relate to the "base is not
supported" EINVAL error, and so this should be treated in the same way as
other error conditions where the text "may fail" is used without further
qualification. That is: if the implementation detects the "base is not
supported" condition, strtol() must return zero and set errno to EINVAL;
if the implementation does not detect the condition, strtol() must return
a successful result (or a different error condition). As can be seen
from the test output, the test allows either of these two behaviours, but
correctly rejects a return value of zero with errno not set to EINVAL.
It is recommended that this request be refused.
Review Type SA Review Start Date null Completed null Status Complete Review Resolution Rejected (REJ) Review Conclusion
This waiver request is refused.
Problem Reporting System Options:
- View Report 0515
- List All PRs
- Search Reports
- Email the System Administrator
- View the The Open Brand Interpretations Database User Manual
Contact the Certification Authority