Ah, weird. Trying again.

thanks.


 ---- On Sat, 21 Oct 2017 23:36:27 +0000 JonY via Mingw-w64-public 
<[email protected]> wrote ---- 
 > On 10/21/2017 10:35 PM, Tamar Christina wrote: 
 > > Hi All, 
 > >  
 > > This patch splits wassert and assert off into their own units 
 > > so they end up in different object files to give a bit more 
 > > freedom during linking. 
 > >  
 > > OK for master? 
 > >  
 >  
 > Looks like SF ate your patch. Try attaching as a .txt. 
 >  
 > ------------------------------------------------------------------------------
 >  
 > Check out the vibrant tech community on one of the world's most 
 > engaging tech sites, Slashdot.org! 
 > http://sdm.link/slashdot_______________________________________________ 
 > Mingw-w64-public mailing list 
 > [email protected] 
 > https://lists.sourceforge.net/lists/listinfo/mingw-w64-public 
 > 
>From 7714398581570fe3e66c59e096fa99c05d9375ba Mon Sep 17 00:00:00 2001
From: Tamar Christina <[email protected]>
Date: Sat, 21 Oct 2017 21:40:56 +0100
Subject: [PATCH] Split wassert.c into assert.c and wassert.c

This patch splits assert and wassert into their own files
to get them in different object files.

Doing this allows a bit more freedom during linking.

Signed-off-by: Tamar Christina <[email protected]>
---
 mingw-w64-crt/Makefile.in    |  2 +-
 mingw-w64-crt/misc/assert.c  | 31 +++++++++++++++++++++++++++++++
 mingw-w64-crt/misc/wassert.c | 19 -------------------
 3 files changed, 32 insertions(+), 20 deletions(-)
 create mode 100644 mingw-w64-crt/misc/assert.c

diff --git a/mingw-w64-crt/Makefile.in b/mingw-w64-crt/Makefile.in
index 20ab7835..bc3a2591 100644
--- a/mingw-w64-crt/Makefile.in
+++ b/mingw-w64-crt/Makefile.in
@@ -1856,7 +1856,7 @@ am__lib64_libmingwex_a_SOURCES_DIST = crt/dllentry.c 
crt/dllmain.c \
        misc/strtold.c misc/strtoumax.c misc/tdelete.c misc/tfind.c \
        misc/tsearch.c misc/twalk.c misc/uchar_c16rtomb.c \
        misc/uchar_c32rtomb.c misc/uchar_mbrtoc16.c \
-       misc/uchar_mbrtoc32.c misc/wassert.c misc/wcrtomb.c \
+       misc/uchar_mbrtoc32.c misc/assert.c misc/wassert.c misc/wcrtomb.c \
        misc/wcsnlen.c misc/wcstof.c misc/wcstoimax.c misc/wcstold.c \
        misc/wcstoumax.c misc/wctob.c misc/wctrans.c misc/wctype.c \
        misc/wdirent.c misc/winbs_uint64.c misc/winbs_ulong.c \
diff --git a/mingw-w64-crt/misc/assert.c b/mingw-w64-crt/misc/assert.c
new file mode 100644
index 00000000..a92ac942
--- /dev/null
+++ b/mingw-w64-crt/misc/assert.c
@@ -0,0 +1,31 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the mingw-w64 runtime package.
+ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ */
+#include <windows.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <wchar.h>
+#include <signal.h>
+
+void __cdecl _assert (const char *, const char *, unsigned);
+
+void __cdecl
+_assert (const char *_Message, const char *_File, unsigned _Line)
+{
+  wchar_t *m, *f;
+  int i;
+  m = (wchar_t *) malloc ((strlen (_Message) + 1) * sizeof (wchar_t));
+  f = (wchar_t *) malloc ((strlen (_File) + 1) * sizeof (wchar_t));
+  for (i = 0; _Message[i] != 0; i++)
+    m[i] = ((wchar_t) _Message[i]) & 0xff;
+  m[i] = 0;
+  for (i = 0; _File[i] != 0; i++)
+    f[i] = ((wchar_t) _File[i]) & 0xff;
+  f[i] = 0;
+  _wassert (m, f, _Line);
+  free (m);
+  free (f);
+}
+
diff --git a/mingw-w64-crt/misc/wassert.c b/mingw-w64-crt/misc/wassert.c
index 5b66fbde..e2875fcf 100644
--- a/mingw-w64-crt/misc/wassert.c
+++ b/mingw-w64-crt/misc/wassert.c
@@ -12,25 +12,6 @@
 extern int mingw_app_type;
 
 void __cdecl _wassert (const wchar_t *, const wchar_t *,unsigned);
-void __cdecl _assert (const char *, const char *, unsigned);
-
-void __cdecl
-_assert (const char *_Message, const char *_File, unsigned _Line)
-{
-  wchar_t *m, *f;
-  int i;
-  m = (wchar_t *) malloc ((strlen (_Message) + 1) * sizeof (wchar_t));
-  f = (wchar_t *) malloc ((strlen (_File) + 1) * sizeof (wchar_t));
-  for (i = 0; _Message[i] != 0; i++)
-    m[i] = ((wchar_t) _Message[i]) & 0xff;
-  m[i] = 0;
-  for (i = 0; _File[i] != 0; i++)
-    f[i] = ((wchar_t) _File[i]) & 0xff;
-  f[i] = 0;
-  _wassert (m, f, _Line);
-  free (m);
-  free (f);
-}
 
 void __cdecl
 _wassert (const wchar_t *_Message, const wchar_t *_File, unsigned _Line)
-- 
2.14.2

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to