Hi,

I was getting a lot of "weak" unsupported while compiling on windows. At first, I thought it was a compiler thing (still using gcc 3.something) but it is not, it should be supported already. However, I found out that it is supported only with ELF targets and to my knowledge mingw has COFF. Thus it won't work anyway.

I propose this patch, may I commit it?
It makes at least go away the nasty warnings I was getting for any file. I suppose it wouldn't have worked anyway.

Index: Headers/GNUstepBase/GSBlocks.h
===================================================================
--- Headers/GNUstepBase/GSBlocks.h      (revisione 38932)
+++ Headers/GNUstepBase/GSBlocks.h      (copia locale)
@@ -117,9 +117,14 @@
  * by an application.
  */

+/* weak attributed supported only with ELF, MINGW is COFF */
+#ifndef __MINGW32__
+
 void *_Block_copy(void *) __attribute__((weak));
 void _Block_release(void *) __attribute__((weak));

+#endif /* __MINGW32__ */
+
 #ifdef __cplusplus
 }
 #endif

Riccardo

_______________________________________________
Gnustep-dev mailing list
Gnustep-dev@gnu.org
https://lists.gnu.org/mailman/listinfo/gnustep-dev

Reply via email to