* malloc_wrapper.cc: Change 'use_internal_malloc' to 'use_internal' throughout.

(export_malloc_called): Delete.
(internal_malloc_determined): New variable.
(malloc_init): Control calculation of internal/external malloc based on
'internal_malloc_determined'.  Use import_address() to determine if malloc in
user_data is ours or not.
* miscfuncs.cc (thread_wrapper): Make static.
(__import_address): Define new function.
* miscfuncs.h (import_address): New define.
(__import_address): Declare new function.
This commit is contained in:
Christopher Faylor
2013-01-20 22:59:58 +00:00
parent 1471537a8f
commit 4713b1b294
4 changed files with 51 additions and 32 deletions

View File

@ -1,7 +1,7 @@
/* miscfuncs.h: main Cygwin header file.
Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Red Hat, Inc.
Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
2007, 2008, 2009, 2010, 2011, 2012, 2013 Red Hat, Inc.
This file is part of Cygwin.
@ -26,6 +26,9 @@ BOOL WINAPI WritePipeOverlapped (HANDLE h, LPCVOID buf, DWORD len,
extern "C" void yield ();
#define import_address(x) __import_address ((void *)(x))
void * __stdcall __attribute__ ((regparm (1))) __import_address (void *);
void backslashify (const char *, char *, bool);
void slashify (const char *, char *, bool);
#define isslash(c) ((c) == '/')