* 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

@ -1,3 +1,11 @@
2009-02-16 Corinna Vinschen <corinna@vinschen.de>
* 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.
2009-02-16 Corinna Vinschen <corinna@vinschen.de>
* cygwin.din: Export wcstoimax, wcstoumax.

View File

@ -1197,6 +1197,7 @@ readv SIGFE
_readv = readv SIGFE
realloc SIGFE
_realloc = realloc SIGFE
reallocf SIGFE
realpath SIGFE
recv = cygwin_recv SIGFE
recvfrom = cygwin_recvfrom SIGFE

View File

@ -346,12 +346,13 @@ details. */
195: Export wcstod, wcstof.
196: Export wcsnlen.
197: Export wcstoimax, wcstoumax.
198: Export reallocf.
*/
/* Note that we forgot to bump the api for ualarm, strtoll, strtoull */
#define CYGWIN_VERSION_API_MAJOR 0
#define CYGWIN_VERSION_API_MINOR 197
#define CYGWIN_VERSION_API_MINOR 198
/* There is also a compatibity version number associated with the
shared memory regions. It is incremented when incompatible

View File

@ -44,7 +44,6 @@ static char sccsid[] = "@(#)fts.c 8.6 (Berkeley) 8/14/94";
#define __FBSDID(x)
#define _open open
#define _close close
#define reallocf realloc
#endif
#include <sys/cdefs.h>
__FBSDID("$FreeBSD: /repoman/r/ncvs/src/lib/libc/gen/fts.c,v 1.27 2004/06/08 06:23:23 das Exp $");

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)
{

View File

@ -912,6 +912,7 @@ also IEEE Std 1003.1-2008 (POSIX.1-2008).</para>
openpty
rcmd
rcmd_af
reallocf
res_close
res_init
res_mkquery