.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
.\"
+.\" %%%LICENSE_START(VERBATIM)
.\" Permission is granted to make and distribute verbatim copies of this
.\" manual provided the copyright notice and this permission notice are
.\" preserved on all copies.
.\"
.\" Formatted or processed versions of this manual, if unaccompanied by
.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
.\"
.\" References consulted:
.\" Linux libc source code
.\" Modified Sat Jul 24 21:38:42 1993, Rik Faith (faith@cs.unc.edu)
.\" Modified Sun Dec 17 18:35:06 2000, Joseph S. Myers
.\"
-.TH ATOI 3 2007-07-26 "GNU" "Linux Programmer's Manual"
+.TH ATOI 3 2014-01-22 "GNU" "Linux Programmer's Manual"
.SH NAME
atoi, atol, atoll, atoq \- convert a string to an integer
.SH SYNOPSIS
.sp
.ad l
.BR atoll ():
-_BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE; or
+.RS 4
+_BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE ||
+_POSIX_C_SOURCE\ >=\ 200112L;
+.br
+or
.I cc\ -std=c99
-.ad b
+.RE
+.ad
.SH DESCRIPTION
The
.BR atoi ()
The behavior is the same as
.sp
.in +4n
-strtol(nptr, (char **) NULL, 10);
+strtol(nptr, NULL, 10);
.in
.sp
except that
.BR atoq ()
is an obsolete name for
.BR atoll ().
-.SH "RETURN VALUE"
+.SH RETURN VALUE
The converted value.
-.SH "CONFORMING TO"
+.SH ATTRIBUTES
+.SS Multithreading (see pthreads(7))
+The
+.BR atoi (),
+.BR atol (),
+and
+.BR atoll ()
+functions are thread-safe with exceptions.
+These functions can be safely used in multithreaded applications,
+as long as
+.BR setlocale (3)
+is not called to change the locale during their execution.
+.SH CONFORMING TO
SVr4, POSIX.1-2001, 4.3BSD, C99.
C89 and
POSIX.1-1996 include the functions
.BR atoll ()
function is present in glibc 2 since version 2.0.2, but
not in libc4 or libc5.
-.SH "SEE ALSO"
+.SH SEE ALSO
.BR atof (3),
.BR strtod (3),
.BR strtol (3),
.BR strtoul (3)
+.SH COLOPHON
+This page is part of release 3.68 of the Linux
+.I man-pages
+project.
+A description of the project,
+information about reporting bugs,
+and the latest version of this page,
+can be found at
+\%http://www.kernel.org/doc/man\-pages/.