diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-07-19 08:38:41 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-07-19 08:38:41 (GMT) |
commit | aefbc875acfc5e238b4d17ec233044a07cf23cca (patch) | |
tree | a6b0488c54ebcf2b52dcca77c69841a474323fff /compat/stdlib.h | |
parent | fb1fd5d59f34d2ac112093399fdd1487d8978981 (diff) | |
download | tcl-aefbc875acfc5e238b4d17ec233044a07cf23cca.zip tcl-aefbc875acfc5e238b4d17ec233044a07cf23cca.tar.gz tcl-aefbc875acfc5e238b4d17ec233044a07cf23cca.tar.bz2 |
Update compat/stdlib.h, prevent conflict with modern signature of those functions.
Diffstat (limited to 'compat/stdlib.h')
-rw-r--r-- | compat/stdlib.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/compat/stdlib.h b/compat/stdlib.h index 6900be3..2f7eaf4 100644 --- a/compat/stdlib.h +++ b/compat/stdlib.h @@ -5,7 +5,7 @@ * This file isn't complete in the ANSI-C sense; it only declares things * that are needed by Tcl. This file is needed even on many systems with * their own stdlib.h (e.g. SunOS) because not all stdlib.h files declare - * all the procedures needed here (such as strtod). + * all the procedures needed here (such as strtol/strtoul). * * Copyright (c) 1991 The Regents of the University of California. * Copyright (c) 1994-1998 Sun Microsystems, Inc. @@ -21,14 +21,18 @@ extern void abort(void); extern double atof(const char *string); extern int atoi(const char *string); extern long atol(const char *string); -extern char * calloc(unsigned int numElements, unsigned int size); +extern void * calloc(unsigned long numElements, unsigned long size); extern void exit(int status); -extern int free(char *blockPtr); +extern void free(void *blockPtr); extern char * getenv(const char *name); -extern char * malloc(unsigned int numBytes); -extern void qsort(void *base, int n, int size, int (*compar)( +extern void * malloc(unsigned long numBytes); +extern void qsort(void *base, unsigned long n, unsigned long size, int (*compar)( const void *element1, const void *element2)); -extern char * realloc(char *ptr, unsigned int numBytes); +extern void * realloc(void *ptr, unsigned long numBytes); +extern char * realpath(const char *path, char *resolved_path); +extern int mkstemps(char *templ, int suffixlen); +extern int mkstemp(char *templ); +extern char * mkdtemp(char *templ); extern long strtol(const char *string, char **endPtr, int base); extern unsigned long strtoul(const char *string, char **endPtr, int base); |