* cygwin.din: Export reallocf.

* malloc_wrapper.cc( reallocf): New function.
	* posix.sgml: Add reallocf to BSD section.
	* include/cygwin/version.h: Bump API minor number.
	* libc/fts.c: Remove erroneous reallocf definition.
This commit is contained in:
Corinna Vinschen
2009-02-16 20:22:38 +00:00
parent de5c20c2de
commit c6b9747e04
6 changed files with 23 additions and 2 deletions

View File

@ -84,6 +84,17 @@ realloc (void *p, size_t size)
return res;
}
/* BSD extension: Same as realloc, just if it fails to allocate new memory,
it frees the incoming pointer. */
extern "C" void *
reallocf (void *p, size_t size)
{
void *res = realloc (p, size);
if (!res && p)
free (p);
return res;
}
extern "C" void *
calloc (size_t nmemb, size_t size)
{