diff options
| -rw-r--r-- | src/lib/libc/stdlib/strtol.3 | 12 | ||||
| -rw-r--r-- | src/lib/libc/stdlib/strtoul.3 | 10 |
2 files changed, 17 insertions, 5 deletions
diff --git a/src/lib/libc/stdlib/strtol.3 b/src/lib/libc/stdlib/strtol.3 index 74361671ff..4eb767885b 100644 --- a/src/lib/libc/stdlib/strtol.3 +++ b/src/lib/libc/stdlib/strtol.3 | |||
| @@ -29,9 +29,9 @@ | |||
| 29 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 29 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
| 30 | .\" SUCH DAMAGE. | 30 | .\" SUCH DAMAGE. |
| 31 | .\" | 31 | .\" |
| 32 | .\" $OpenBSD: strtol.3,v 1.17 2007/05/31 19:19:31 jmc Exp $ | 32 | .\" $OpenBSD: strtol.3,v 1.18 2007/06/29 18:54:37 millert Exp $ |
| 33 | .\" | 33 | .\" |
| 34 | .Dd $Mdocdate: May 31 2007 $ | 34 | .Dd $Mdocdate: June 29 2007 $ |
| 35 | .Dt STRTOL 3 | 35 | .Dt STRTOL 3 |
| 36 | .Os | 36 | .Os |
| 37 | .Sh NAME | 37 | .Sh NAME |
| @@ -151,8 +151,14 @@ The | |||
| 151 | .Fn strtoimax , | 151 | .Fn strtoimax , |
| 152 | and | 152 | and |
| 153 | .Fn strtoq | 153 | .Fn strtoq |
| 154 | functions returns the result of the conversion, | 154 | functions return the result of the conversion, |
| 155 | unless the value would underflow or overflow. | 155 | unless the value would underflow or overflow. |
| 156 | If no conversion could be performed, 0 is returned; | ||
| 157 | the global variable | ||
| 158 | .Va errno | ||
| 159 | is also set to | ||
| 160 | .Er EINVAL, | ||
| 161 | though this is not portable across all platforms. | ||
| 156 | If overflow or underflow occurs, | 162 | If overflow or underflow occurs, |
| 157 | .Va errno | 163 | .Va errno |
| 158 | is set to | 164 | is set to |
diff --git a/src/lib/libc/stdlib/strtoul.3 b/src/lib/libc/stdlib/strtoul.3 index 4e7fb641bc..30a09aa289 100644 --- a/src/lib/libc/stdlib/strtoul.3 +++ b/src/lib/libc/stdlib/strtoul.3 | |||
| @@ -29,9 +29,9 @@ | |||
| 29 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 29 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
| 30 | .\" SUCH DAMAGE. | 30 | .\" SUCH DAMAGE. |
| 31 | .\" | 31 | .\" |
| 32 | .\" $OpenBSD: strtoul.3,v 1.17 2007/05/31 19:19:32 jmc Exp $ | 32 | .\" $OpenBSD: strtoul.3,v 1.18 2007/06/29 18:54:37 millert Exp $ |
| 33 | .\" | 33 | .\" |
| 34 | .Dd $Mdocdate: May 31 2007 $ | 34 | .Dd $Mdocdate: June 29 2007 $ |
| 35 | .Dt STRTOUL 3 | 35 | .Dt STRTOUL 3 |
| 36 | .Os | 36 | .Os |
| 37 | .Sh NAME | 37 | .Sh NAME |
| @@ -175,6 +175,12 @@ and the global variable | |||
| 175 | .Va errno | 175 | .Va errno |
| 176 | is set to | 176 | is set to |
| 177 | .Er ERANGE . | 177 | .Er ERANGE . |
| 178 | If no conversion could be performed, 0 is returned; | ||
| 179 | the global variable | ||
| 180 | .Va errno | ||
| 181 | is also set to | ||
| 182 | .Er EINVAL, | ||
| 183 | though this is not portable across all platforms. | ||
| 178 | .Pp | 184 | .Pp |
| 179 | There is no way to determine if | 185 | There is no way to determine if |
| 180 | .Fn strtoul | 186 | .Fn strtoul |
