stdlib: safeguard prototypes against user-defined macros

This commit is contained in:
Lephenixnoir 2021-05-19 10:12:41 +02:00
parent 36b4854137
commit e4c385d0df
No known key found for this signature in database
GPG key ID: 1BBA026E13FC0495

View file

@ -7,25 +7,25 @@
/* Dynamic memory management. */ /* Dynamic memory management. */
/* Allocate SIZE bytes of memory. */ /* Allocate SIZE bytes of memory. */
extern void *malloc(size_t size); extern void *malloc(size_t __size);
/* Allocate NMEMB elements of SIZE bytes each, all initialized to 0. */ /* Allocate NMEMB elements of SIZE bytes each, all initialized to 0. */
extern void *calloc(size_t nmemb, size_t size); extern void *calloc(size_t __nmemb, size_t __size);
/* /*
** Re-allocate the previously allocated block in PTR, making the new block ** Re-allocate the previously allocated block in PTR, making the new block
** SIZE bytes long. ** SIZE bytes long.
*/ */
extern void *realloc(void *ptr, size_t size); extern void *realloc(void *__ptr, size_t __size);
/* /*
** Re-allocate the previously allocated block in PTR, making the new block large ** Re-allocate the previously allocated block in PTR, making the new block large
** enough for NMEMB elements of SIZE bytes each. ** enough for NMEMB elements of SIZE bytes each.
*/ */
extern void *reallocarray(void *ptr, size_t nmemb, size_t size); extern void *reallocarray(void *__ptr, size_t __nmemb, size_t __size);
/* Free a block allocated by `malloc', `realloc' or `calloc'. */ /* Free a block allocated by `malloc', `realloc' or `calloc'. */
extern void free(void *ptr); extern void free(void *__ptr);
/* Integer arithmetic functions. */ /* Integer arithmetic functions. */