summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorrobert <robert@FreeBSD.org>2002-08-15 09:25:04 +0000
committerrobert <robert@FreeBSD.org>2002-08-15 09:25:04 +0000
commit043ed1f5818681c934c1f781e5c12082c79b771c (patch)
treeb37b20746e471ae334376a361c54543969e8e35f /include
parentef527f85f2070c1b71c9b8a28ed1d2b937e93ef0 (diff)
downloadFreeBSD-src-043ed1f5818681c934c1f781e5c12082c79b771c.zip
FreeBSD-src-043ed1f5818681c934c1f781e5c12082c79b771c.tar.gz
- Add the 'restrict' qualifier to the function prototypes and
definitions of the functions that convert strings to numbers and are defined by IEEE Std 1003-1.2001. - Use ANSI-C function definitions for all of the functions mentioned above plus strtouq and strtoq. - Update the prototypes in the manual pages.
Diffstat (limited to 'include')
-rw-r--r--include/inttypes.h4
-rw-r--r--include/stdlib.h10
2 files changed, 7 insertions, 7 deletions
diff --git a/include/inttypes.h b/include/inttypes.h
index cd59bed..d2b86dd 100644
--- a/include/inttypes.h
+++ b/include/inttypes.h
@@ -48,9 +48,9 @@ __BEGIN_DECLS
intmax_t imaxabs(intmax_t) __pure2;
imaxdiv_t imaxdiv(intmax_t, intmax_t) __pure2;
+intmax_t strtoimax(const char *__restrict, char **__restrict, int);
+uintmax_t strtoumax(const char *__restrict, char **__restrict, int);
/* XXX: The following functions are missing the restrict type qualifier. */
-intmax_t strtoimax(const char *, char **, int);
-uintmax_t strtoumax(const char *, char **, int);
intmax_t wcstoimax(const wchar_t *, wchar_t **, int);
uintmax_t wcstoumax(const wchar_t *, wchar_t **, int);
__END_DECLS
diff --git a/include/stdlib.h b/include/stdlib.h
index f22f1e1..c3c3cc0 100644
--- a/include/stdlib.h
+++ b/include/stdlib.h
@@ -114,10 +114,10 @@ void qsort(void *, size_t, size_t,
int rand(void);
void *realloc(void *, size_t);
void srand(unsigned);
-double strtod(const char *, char **);
-long strtol(const char *, char **, int);
+double strtod(const char *__restrict, char **__restrict);
+long strtol(const char *__restrict, char **__restrict, int);
unsigned long
- strtoul(const char *, char **, int);
+ strtoul(const char *__restrict, char **__restrict, int);
int system(const char *);
int mblen(const char *, size_t);
@@ -198,13 +198,13 @@ void srandomdev(void);
#ifdef __LONG_LONG_SUPPORTED
/* LONGLONG */
long long
- strtoll(const char *, char **, int);
+ strtoll(const char *__restrict, char **__restrict, int);
#endif
__int64_t strtoq(const char *, char **, int);
#ifdef __LONG_LONG_SUPPORTED
/* LONGLONG */
unsigned long long
- strtoull(const char *, char **, int);
+ strtoull(const char *__restrict, char **__restrict, int);
#endif
__uint64_t
strtouq(const char *, char **, int);
OpenPOWER on IntegriCloud