tcatch strdup, malloc, and friends - plan9port - [fork] Plan 9 from user space
(HTM) git clone git://src.adamsgaard.dk/plan9port
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit 22f3ae27019cc24faaac443b843a3683dd4aef67
(DIR) parent 65de82a30f67103eb9ec1cbc9ab62725b03e7423
(HTM) Author: rsc <devnull@localhost>
Date: Wed, 9 Jun 2004 14:25:42 +0000
catch strdup, malloc, and friends
Diffstat:
M include/libc.h | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
---
(DIR) diff --git a/include/libc.h b/include/libc.h
t@@ -40,8 +40,8 @@ extern int strcmp(char*, char*);
extern char* strcpy(char*, char*);
*/
extern char* strecpy(char*, char*, char*);
- /*
-extern char* strdup(char*);
+extern char* p9strdup(char*);
+/*
extern char* strncat(char*, char*, long);
extern char* strncpy(char*, char*, long);
extern int strncmp(char*, char*, long);
t@@ -128,6 +128,8 @@ extern void* malloctopoolblock(void*);
#define realloc p9realloc
#define calloc p9calloc
#define free p9free
+#undef strdup
+#define strdup p9strdup
#endif
/*