summaryrefslogtreecommitdiff
path: root/include/stdlib.h
diff options
context:
space:
mode:
authorPedro F. Giffuni <pfg@FreeBSD.org>2015-04-06 01:39:16 +0000
committerPedro F. Giffuni <pfg@FreeBSD.org>2015-04-06 01:39:16 +0000
commit153cbcd6579a5c285e7f384c09211b081bb800c4 (patch)
treebfe8c34c1990c129daa869d6fab191672ea7ec14 /include/stdlib.h
parenta1c1feb511ea04fec55420931d1733576819ff2b (diff)
Notes
Diffstat (limited to 'include/stdlib.h')
-rw-r--r--include/stdlib.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/include/stdlib.h b/include/stdlib.h
index 666949518a36..95db1b3ce37d 100644
--- a/include/stdlib.h
+++ b/include/stdlib.h
@@ -87,21 +87,22 @@ int atoi(const char *);
long atol(const char *);
void *bsearch(const void *, const void *, size_t,
size_t, int (*)(const void *, const void *));
-void *calloc(size_t, size_t) __malloc_like;
+void *calloc(size_t, size_t) __malloc_like __result_use_check
+ __alloc_size(1) __alloc_size(2);
div_t div(int, int) __pure2;
_Noreturn void exit(int);
void free(void *);
char *getenv(const char *);
long labs(long) __pure2;
ldiv_t ldiv(long, long) __pure2;
-void *malloc(size_t) __malloc_like;
+void *malloc(size_t) __malloc_like __result_use_check __alloc_size(1);
int mblen(const char *, size_t);
size_t mbstowcs(wchar_t * __restrict , const char * __restrict, size_t);
int mbtowc(wchar_t * __restrict, const char * __restrict, size_t);
void qsort(void *, size_t, size_t,
int (*)(const void *, const void *));
int rand(void);
-void *realloc(void *, size_t);
+void *realloc(void *, size_t) __result_use_check __alloc_size(2);
void srand(unsigned);
double strtod(const char * __restrict, char ** __restrict);
float strtof(const char * __restrict, char ** __restrict);
@@ -155,7 +156,7 @@ _Noreturn void _Exit(int);
* If we're in a mode greater than C99, expose C11 functions.
*/
#if __ISO_C_VISIBLE >= 2011 || __cplusplus >= 201103L
-void * aligned_alloc(size_t, size_t) __malloc_like;
+void * aligned_alloc(size_t, size_t) __malloc_like __alloc_size(2);
int at_quick_exit(void (*)(void));
_Noreturn void
quick_exit(int);
@@ -170,7 +171,8 @@ char *realpath(const char * __restrict, char * __restrict);
int rand_r(unsigned *); /* (TSF) */
#endif
#if __POSIX_VISIBLE >= 200112
-int posix_memalign(void **, size_t, size_t); /* (ADV) */
+int posix_memalign(void **, size_t, size_t) __nonnull(1)
+ __alloc_size(3); /* (ADV) */
int setenv(const char *, const char *, int);
int unsetenv(const char *);
#endif
@@ -301,7 +303,7 @@ void qsort_r(void *, size_t, size_t, void *,
int (*)(void *, const void *, const void *));
int radixsort(const unsigned char **, int, const unsigned char *,
unsigned);
-void *reallocf(void *, size_t);
+void *reallocf(void *, size_t) __result_use_check __alloc_size(2);
int rpmatch(const char *);
void setprogname(const char *);
int sradixsort(const unsigned char **, int, const unsigned char *,