diff options
author | Stef Walter <stef@thewalter.net> | 2004-04-03 23:00:48 +0000 |
---|---|---|
committer | Stef Walter <stef@thewalter.net> | 2004-04-03 23:00:48 +0000 |
commit | 7a80b56ff1da9ea7ff0b7817213f5c9d09644a65 (patch) | |
tree | 35723506b64a4ebd23017f87845faa4e5d8c9286 /src/compat.c | |
parent | abcb5c9321f31df3f84f0b07bfe61bbd1d594042 (diff) |
Fixes for windows.
Diffstat (limited to 'src/compat.c')
-rw-r--r-- | src/compat.c | 44 |
1 files changed, 1 insertions, 43 deletions
diff --git a/src/compat.c b/src/compat.c index 171f551..013675f 100644 --- a/src/compat.c +++ b/src/compat.c @@ -87,20 +87,7 @@ int getopt(int nargc, char* const* nargv, const char* ostr) return (-1); } - if (place[1] && *++place == '-') #include <sys/types.h> - - void *malloc (); - - /* Allocate an N-byte block of memory from the heap. - If N is zero, allocate a 1-byte block. */ - - void * - rpl_malloc (size_t n) - { - if (n == 0) - n = 1; - return malloc (n); - }/* found "--" */ + if (place[1] && *++place == '-') /* found "--" */ { ++optind; place = EMSG; @@ -151,20 +138,6 @@ int getopt(int nargc, char* const* nargv, const char* ostr) return (optopt); /* dump back option letter */ } #endif - #include <sys/types.h> - - void *malloc (); - - /* Allocate an N-byte block of memory from the heap. - If N is zero, allocate a 1-byte block. */ - - void * - rpl_malloc (size_t n) - { - if (n == 0) - n = 1; - return malloc (n); - } #ifndef HAVE_ERR_H @@ -413,18 +386,3 @@ char* itoa(int val, char* out, int radix) return out; } #endif - -#if HAVE_MALLOC == 0 -#undef malloc - -/* Allocate an N-byte block of memory from the heap. - If N is zero, allocate a 1-byte block. */ - -void* rpl_malloc (size_t n) -{ - if (n == 0) - n = 1; - return malloc (n); -} - -#endif |