summaryrefslogtreecommitdiff
path: root/winsup/cygserver/woutsup.h
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygserver/woutsup.h')
-rw-r--r--winsup/cygserver/woutsup.h34
1 files changed, 1 insertions, 33 deletions
diff --git a/winsup/cygserver/woutsup.h b/winsup/cygserver/woutsup.h
index e93a2586c3d..e66a694ad18 100644
--- a/winsup/cygserver/woutsup.h
+++ b/winsup/cygserver/woutsup.h
@@ -107,36 +107,4 @@ extern "C" void __cygserver__printf (const char *, const char *, ...);
#define thread_printf __noop_printf
#endif
-/*****************************************************************************/
-
-/* Temporary hack to get around the thread-unsafe new/delete in cygwin
- * gcc 2.95.3. This should all be binned at the first opportunity,
- * e.g. gcc 3.1 or sooner.
- *
- * The trick here is to do contruction via malloc(3) and then the
- * placement new operator, and destruction via an explicit call to the
- * destructor and then free(3).
- */
-
-#include <new.h>
-#include <stdlib.h>
-
-#define safe_new0(T) (new (malloc (sizeof (T))) T)
-
-#ifdef NEW_MACRO_VARARGS
-
-#define safe_new(T, ...) \
- (new (malloc (sizeof (T))) T (__VA_ARGS__))
-
-#else /* !NEW_MACRO_VARARGS */
-
-#define safe_new(T, args...) \
- (new (malloc (sizeof (T))) T (## args))
-
-#endif /* !NEW_MACRO_VARARGS */
-
-#define safe_delete(T, O) \
-{ \
- (O)->~ ## T (); \
- free (O); \
-}
+#include "safe_memory.h"