[hackers] [scc] [libc] Update stdlib.h from c99 standard text || Roberto E. Vargas Caballero

From: <git_AT_suckless.org>
Date: Fri, 17 Feb 2017 15:01:34 +0100 (CET)

commit 6442b309804938d003a83b2d1bd8cb42e972c7f5
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Fri Feb 17 14:37:04 2017 +0100
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
CommitDate: Fri Feb 17 14:37:04 2017 +0100

    [libc] Update stdlib.h from c99 standard text

diff --git a/libc/include/stdlib.h b/libc/include/stdlib.h
index 58ad666..da65547 100644
--- a/libc/include/stdlib.h
+++ b/libc/include/stdlib.h
_AT_@ -4,42 +4,46 @@
 
 #include <arch/stdlib.h>
 
-extern double atof(const char *ptr);
-extern int atoi(const char *s);
-extern long atol(const char *s);
-extern long long atoll(const char *s);
-
-extern float strtof(const char *s, char **end);
-extern double strtod(const char *s, char **end);
-extern long double strtold(const char *s, char **end);
-
-extern long strtol(const char *s, char **end, int base);
-extern long long strtoll(const char *s, char **end, int base);
-extern unsigned long stroul(const char *s, char **end, int base);
-extern unsigned long long stroull(const char *s, char **end, int base);
-
-extern void *calloc(size_t nitems, size_t size);
+extern double atof(const char *nptr);
+extern int atoi(const char *nptr);
+extern long int atol(const char *nptr);
+extern long long int atoll(const char *nptr);
+extern double strtod(const char * restrict nptr, char ** restrict endptr);
+extern float strtof(const char * restrict nptr, char ** restrict endptr);
+extern long double strtold(const char * restrict nptr, char ** restrict endptr);
+extern long int strtol(const char * restrict nptr, char ** restrict endptr, int base);
+extern long long int strtoll(const char * restrict nptr, char ** restrict endptr,
+ int base);
+extern unsigned long int strtoul(const char * restrict nptr, char ** restrict endptr,
+ int base);
+extern unsigned long long int strtoull(const char * restrict nptr,
+ char ** restrict endptr, int base);
+extern int rand(void);
+extern void srand(unsigned int seed);
+extern void *calloc(size_t nmemb, size_t size);
 extern void free(void *ptr);
+extern void *malloc(size_t size);
 extern void *realloc(void *ptr, size_t size);
-
 extern void abort(void);
 extern int atexit(void (*func)(void));
 extern void exit(int status);
+extern void _Exit(int status);
 extern char *getenv(const char *name);
-extern int system(const char *cmd);
-
-extern void *bsearch(const void *key,
- const void *base, size_t nitems, size_t size,
- int (*cmp)(const void *, const void *));
-extern void qsort(void *base, size_t nitems, size_t size,
- int (*cmp)(const void *, const void *));
-
-extern void abs(int x);
-/* div_t div(int num, int denom); */
-extern long labs(long int x);
-/* ldiv_t ldiv(long int number, long int denom); */
-
-extern int rand(void);
-extern void srand(unsigned seed);
+extern int system(const char *string);
+extern void *bsearch(const void *key, const void *base, size_t nmemb, size_t size,
+ int (*compar)(const void *, const void *));
+extern void qsort(void *base, size_t nmemb, size_t size,
+ int (*compar)(const void *, const void *));
+extern int abs(int j);
+extern long int labs(long int j);
+extern long long int llabs(long long int j);
+extern div_t div(int numer, int denom);
+extern ldiv_t ldiv(long int numer, long int denom);
+extern lldiv_t lldiv(long long int numer, long long int denom);
+extern int mblen(const char *s, size_t n);
+extern int mbtowc(wchar_t * restrict pwc, const char * restrict s, size_t n);
+extern int wctomb(char *s, wchar_t wchar);
+extern size_t mbstowcs(wchar_t * restrict pwcs, const char * restrict s, size_t n);
+extern size_t wcstombs(char * restrict s, const wchar_t * restrict pwcs, size_t n);
 
 #endif
Received on Fri Feb 17 2017 - 15:01:34 CET

This archive was generated by hypermail 2.3.0 : Fri Feb 17 2017 - 15:12:22 CET