> Hi,
> 
> Here are some remarks about building gnustep-base on windows(mingw-w64):
> 
> $>./configure --prefix=/GNUstep --enable-libffi
> --with-default-config=/GNUstep/GNUstep.conf
> ...
> checking for socklen_t... no
> ...
> 
> 
> That's not true since socklen_t is defined as int in header
<ws2tcpip.h>.
> Unfortunately I dont' know autotools very well so I cannot provide any
> patch
> but basically configure should be adapted to include this header when
> testing on
> mingw platforms.
> 
> result is we have lots of warnings like :
> 
> NSFileHandle+GNUstepBase.m: In function '-[NSFileHandle(GNUstepBase)
> initAsServerAtAddress:service:protocol:]':
> NSFileHandle+GNUstepBase.m:176: warning: pointer targets in passing
> argument 3 of 'getsockname' differ in signedness
>
c:/developer/mingw-ng/mingw32/lib/gcc/../../i686-w64-mingw32/include/winsock2.h:1300:
> note: expected 'int *' but argument is of type 'unsigned int *'
> NSFileHandle+GNUstepBase.m: In function '-[NSFileHandle(GNUstepBase)
> socketAddress]':
> NSFileHandle+GNUstepBase.m:205: warning: pointer targets in passing
> argument 3 of 'getsockname' differ in signedness
>
c:/developer/mingw-ng/mingw32/lib/gcc/../../i686-w64-mingw32/include/winsock2.h:1300:
> note: expected 'int *' but argument is of type 'unsigned int *'
> So the workaround is to manually edit
> Headers/Additions/GNUstepBase/config.h
> #define HAVE_SOCKLEN_T 1
> 
> 
> You also need to change the variable type in
> Source/Additions/NSFileHandle+GNUstepBase.m
> from unsigned int to socklen_t
> 
> -unsigned int         size = sizeof(sin);
> +socklen_t            size = sizeof(sin);
> 
> 
> Then I got an error in Tools/gdomap.c:
> 
> gdomap.c:4599: error: 'uint32_t' undeclared (first use in this function)
> 
> So same fix as before I have included <stdint.h> in  __MINGW32__ section
> 
> #ifdef __MINGW32__
> +#include <stdint.h>
> ...
> 
> Another remark, I was curious to test a dlfcn implementation on win32
> http://code.google.com/p/dlfcn-win32/
> 
> so after running configure again, dlfcn.h is well detected however
> during linking -ldl is not added to command line so I get undefined
> references:
> 
> Creating library file: ./obj/libgnustep-base.dll.a
> obj/libgnustep-base.obj/objc-load.m.o: In function `_objc_dynamic_link':
>
C:\Developer\Mingw-NG\home\Vincent\build_GNUstep\gnustep-base\Source/dynamic-load.h:65:
> undefined reference to `dlopen'
> obj/libgnustep-base.obj/objc-load.m.o: In function
`_objc_dynamic_error':
>
C:\Developer\Mingw-NG\home\Vincent\build_GNUstep\gnustep-base\Source/dynamic-load.h:94:
> undefined reference to `dlerror'
> collect2: ld returned 1 exit status
> 
> 
> And my final issue is about Install directory because everything is
> installed in /GNUstep/Local ...
> but I want it to be in /GNUstep/System.
> HOW CAN I CHANGE THAT ?
> 
> For my next remarks I will try to post patch instead of writing emails

See attachment
Index: Source/Additions/NSFileHandle+GNUstepBase.m
===================================================================
--- Source/Additions/NSFileHandle+GNUstepBase.m	(revision 29981)
+++ Source/Additions/NSFileHandle+GNUstepBase.m	(working copy)
@@ -130,7 +130,7 @@
 #endif
   int    net;
   struct sockaddr_in    sin;
-  unsigned int		size = sizeof(sin);
+  socklen_t		size = sizeof(sin);
 
   if (getAddr(a, s, p, &sin) == NO)
     {
Index: Tools/gdomap.c
===================================================================
--- Tools/gdomap.c	(revision 29981)
+++ Tools/gdomap.c	(working copy)
@@ -43,6 +43,7 @@
 #include <ctype.h>		/* for strchr() */
 #include <fcntl.h>
 #ifdef __MINGW32__
+#include <stdint.h>
 #include <winsock2.h>
 #include <ws2tcpip.h>
 #include <wininet.h>
_______________________________________________
Gnustep-dev mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gnustep-dev

Reply via email to