Page MenuHomePhabricator

ecore_con: fix compilation on Windows
AbandonedPublic

Authored by jpeg on Oct 19 2016, 7:27 AM.

Details

Summary

Mingw doesn't supply EAI_SYSTEM.
This commit only fixes build. There are still many warnings when compiling this
module. Looks like it doesn't takes Windows into account and probably is broken.

Diff Detail

Repository
rEFL core/efl
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 2652
Build 2717: arc lint + arc unit
an.kroitor updated this revision to Diff 10003.Oct 19 2016, 7:27 AM
an.kroitor retitled this revision from to ecore_con: fix compilation on Windows.
an.kroitor updated this object.
an.kroitor edited the test plan for this revision. (Show Details)
an.kroitor added reviewers: cedric, raster, Hermet, NikaWhite.
barbieri requested changes to this revision.Oct 20 2016, 6:32 AM
barbieri edited edge metadata.

Change to a single #ifndef and avoid spreading many ifdef in the code.

src/lib/ecore_con/ecore_con.c
3443

my personal preference for these cases is to define EAI_SYSTEM to something else, be the samas as in Linux or 0, as it's not going to match.

c
#ifndef EAI_SYSTEM
#define EAI_SYSTEM -11 /* same as other systems */
#endif

Looking at other projects, some do this, others define to a negative constant such as event2/util.h uses -911, vlc uses -12...

This revision now requires changes to proceed.Oct 20 2016, 6:32 AM
an.kroitor updated this revision to Diff 10007.Oct 20 2016, 7:06 AM
an.kroitor edited edge metadata.

Changes requested by @barbieri

barbieri accepted this revision.Oct 20 2016, 7:32 AM
barbieri edited edge metadata.

LGTM!

This revision is now accepted and ready to land.Oct 20 2016, 7:32 AM
vtorri added a subscriber: vtorri.Oct 21 2016, 8:54 AM

it's not good, actually

what's not good? If windows doesn't define that number, that case will never be reached... then it's the same of #ifdef, without making code horrible.

because you didn't even look at the getaddrinfo() description on windows and see that :

  1. these error code should no be used but their WSA equivalent should (ok, cosmetic here, but maybe the API will change later),
  2. the error code of getaddrinfo() are positive on windows, while there are negative on linux
  3. mingw-w64 is making life easier for porting application so it defines some of the EAI_* numerical values, but if one day we want compilation with vc++, or if other people use another cross compilation toolchain, boom

better using EAI_SYSTEM only if it is defined, rather than giving it a random value if not defined

Gustavo, as i've already told you, the correct fix is to have a layer in (maybe) eina that adds a cross-platform way to use net functions. Lots of work, ok, but it's the safest

@vtorri thanks for the advice, check GIT head to see that I tried to improve the situation on windows by handling all the code like == SOCKET_ERROR and == INVALID_SOCKET, using getsockopt() and setsockopt() types from Windows documentation and so on.

However, for the particular case of EAI_SYSTEM I see no issue with that random number *give that it doesn't match any of existing windows code*. If it's negative or not, doesn't matter... given that it will never match and existing code.

Let's avoid #ifdef whenever possible, as those make the code unreadable and harder to maintain... We already have lots of them due options missing in some systems, so for these easy to avoid error handling cases, please avoid them.

the code in git is still wrong in several places (SOCKET type, close, ...)

barbieri added a subscriber: q66.Oct 22 2016, 5:26 PM

@vtorri thanks for your insights, check rEFLcddbce89007c, it does:

  • #define SOCKET int on non-Windows and always use SOCKET as type;
  • #define closesocket(fd) close(fd) on non-Windows and always use closesocket() as per Windows documentation.

What is pending, need some advice from @cedric and @q66 on what to do:

  • Efl.Loop.Fd is all about integers... so there is no way to inherit it and return a SOCKET for stuff such as efl_loop_fd_get(), which is used as the Eo wrapper around ecore_main_fd_handler_add() used by old code in ecore_con.c Should we bother? Things like Efl.Net.Dialer.Tcp and Efl.Net.Dialer.Udp are subclasses of Efl.Loop.Fd. Likewise Efl.Net.Server.Fd is based on that.
  • There is no way to #ifdef the .eo, then I cannot use per-system signature in efl_net_server_fd.eo methods client_add() and client_reject(). I'd have to create a typedef @extern Efl_Socket and define that in our .h but I'm not sure how bindings would handle that (although this is a protected method, meant for subclasses to override the behavior).

Last but not least, looking at ecore_con.c with old code I see many issues such as close(svr->fd)... so I wonder how that worked before. :-(

cedric edited edge metadata.Nov 1 2016, 10:59 AM

Shouldn't this patch be closed now ?

Hermet edited edge metadata.Nov 8 2016, 8:11 PM

Ping?

could someone from windows confirm it's not broken anymore? the latest GIT looks sane to me, using recommended closesocket(), comparison with INVALID_SOCKET, proper errno on windows and should have all the defines in place.

can't compile on Windows here, still the same error:

../src/lib/eina/eina_thread.h:287:3: error: second operand to the conditional operator is of type 'void', but the third operand is neither a throw-expression nor of type 'void'

In D4357#73619, @vtorri wrote:

can't compile on Windows here, still the same error:

../src/lib/eina/eina_thread.h:287:3: error: second operand to the conditional operator is of type 'void', but the third operand is neither a throw-expression nor of type 'void'

@vtorri this is a bug in the pthread.h from your windows library. Did you report this to them?

In GNU Libc the macro pair push/pop has two implementations:

  • C: uses a do { + } wile(0) with a cleanup attribute on the variable if __USE_GNU or sigsetjmp otherwise...
  • C++: uses a class __pthread_cleanup_class to do the cleanup.

If you could paste your pthread.h or where the macros are define, we could try to offer a solution. For comparison, glibc says:

typedef struct
{
  struct
  {
    __jmp_buf __cancel_jmp_buf;
    int __mask_was_saved;
  } __cancel_jmp_buf[1];
  void *__pad[4];
} __pthread_unwind_buf_t __attribute__ ((__aligned__));

/* No special attributes by default.  */
#ifndef __cleanup_fct_attribute
# define __cleanup_fct_attribute
#endif


/* Structure to hold the cleanup handler information.  */
struct __pthread_cleanup_frame
{
  void (*__cancel_routine) (void *);
  void *__cancel_arg;
  int __do_it;
  int __cancel_type;
};

#if defined __GNUC__ && defined __EXCEPTIONS
# ifdef __cplusplus
/* Class to handle cancellation handler invocation.  */
class __pthread_cleanup_class
{
  void (*__cancel_routine) (void *);
  void *__cancel_arg;
  int __do_it;
  int __cancel_type;

 public:
  __pthread_cleanup_class (void (*__fct) (void *), void *__arg)
    : __cancel_routine (__fct), __cancel_arg (__arg), __do_it (1) { }
  ~__pthread_cleanup_class () { if (__do_it) __cancel_routine (__cancel_arg); }
  void __setdoit (int __newval) { __do_it = __newval; }
  void __defer () { pthread_setcanceltype (PTHREAD_CANCEL_DEFERRED,
					   &__cancel_type); }
  void __restore () const { pthread_setcanceltype (__cancel_type, 0); }
};

/* Install a cleanup handler: ROUTINE will be called with arguments ARG
   when the thread is canceled or calls pthread_exit.  ROUTINE will also
   be called with arguments ARG when the matching pthread_cleanup_pop
   is executed with non-zero EXECUTE argument.

   pthread_cleanup_push and pthread_cleanup_pop are macros and must always
   be used in matching pairs at the same nesting level of braces.  */
#  define pthread_cleanup_push(routine, arg) \
  do {									      \
    __pthread_cleanup_class __clframe (routine, arg)

/* Remove a cleanup handler installed by the matching pthread_cleanup_push.
   If EXECUTE is non-zero, the handler function is called. */
#  define pthread_cleanup_pop(execute) \
    __clframe.__setdoit (execute);					      \
  } while (0)

#  ifdef __USE_GNU
/* Install a cleanup handler as pthread_cleanup_push does, but also
   saves the current cancellation type and sets it to deferred
   cancellation.  */
#   define pthread_cleanup_push_defer_np(routine, arg) \
  do {									      \
    __pthread_cleanup_class __clframe (routine, arg);			      \
    __clframe.__defer ()

/* Remove a cleanup handler as pthread_cleanup_pop does, but also
   restores the cancellation type that was in effect when the matching
   pthread_cleanup_push_defer was called.  */
#   define pthread_cleanup_pop_restore_np(execute) \
    __clframe.__restore ();						      \
    __clframe.__setdoit (execute);					      \
  } while (0)
#  endif
# else
/* Function called to call the cleanup handler.  As an extern inline
   function the compiler is free to decide inlining the change when
   needed or fall back on the copy which must exist somewhere
   else.  */
__extern_inline void
__pthread_cleanup_routine (struct __pthread_cleanup_frame *__frame)
{
  if (__frame->__do_it)
    __frame->__cancel_routine (__frame->__cancel_arg);
}

/* Install a cleanup handler: ROUTINE will be called with arguments ARG
   when the thread is canceled or calls pthread_exit.  ROUTINE will also
   be called with arguments ARG when the matching pthread_cleanup_pop
   is executed with non-zero EXECUTE argument.

   pthread_cleanup_push and pthread_cleanup_pop are macros and must always
   be used in matching pairs at the same nesting level of braces.  */
#  define pthread_cleanup_push(routine, arg) \
  do {									      \
    struct __pthread_cleanup_frame __clframe				      \
      __attribute__ ((__cleanup__ (__pthread_cleanup_routine)))		      \
      = { .__cancel_routine = (routine), .__cancel_arg = (arg),	 	      \
	  .__do_it = 1 };

/* Remove a cleanup handler installed by the matching pthread_cleanup_push.
   If EXECUTE is non-zero, the handler function is called. */
#  define pthread_cleanup_pop(execute) \
    __clframe.__do_it = (execute);					      \
  } while (0)

#  ifdef __USE_GNU
/* Install a cleanup handler as pthread_cleanup_push does, but also
   saves the current cancellation type and sets it to deferred
   cancellation.  */
#   define pthread_cleanup_push_defer_np(routine, arg) \
  do {									      \
    struct __pthread_cleanup_frame __clframe				      \
      __attribute__ ((__cleanup__ (__pthread_cleanup_routine)))		      \
      = { .__cancel_routine = (routine), .__cancel_arg = (arg),		      \
	  .__do_it = 1 };						      \
    (void) pthread_setcanceltype (PTHREAD_CANCEL_DEFERRED,		      \
				  &__clframe.__cancel_type)

/* Remove a cleanup handler as pthread_cleanup_pop does, but also
   restores the cancellation type that was in effect when the matching
   pthread_cleanup_push_defer was called.  */
#   define pthread_cleanup_pop_restore_np(execute) \
    (void) pthread_setcanceltype (__clframe.__cancel_type, NULL);	      \
    __clframe.__do_it = (execute);					      \
  } while (0)
#  endif
# endif
#else
/* Install a cleanup handler: ROUTINE will be called with arguments ARG
   when the thread is canceled or calls pthread_exit.  ROUTINE will also
   be called with arguments ARG when the matching pthread_cleanup_pop
   is executed with non-zero EXECUTE argument.

   pthread_cleanup_push and pthread_cleanup_pop are macros and must always
   be used in matching pairs at the same nesting level of braces.  */
# define pthread_cleanup_push(routine, arg) \
  do {									      \
    __pthread_unwind_buf_t __cancel_buf;				      \
    void (*__cancel_routine) (void *) = (routine);			      \
    void *__cancel_arg = (arg);						      \
    int __not_first_call = __sigsetjmp ((struct __jmp_buf_tag *) (void *)     \
					__cancel_buf.__cancel_jmp_buf, 0);    \
    if (__glibc_unlikely (__not_first_call))				      \
      {									      \
	__cancel_routine (__cancel_arg);				      \
	__pthread_unwind_next (&__cancel_buf);				      \
	/* NOTREACHED */						      \
      }									      \
									      \
    __pthread_register_cancel (&__cancel_buf);				      \
    do {
extern void __pthread_register_cancel (__pthread_unwind_buf_t *__buf)
     __cleanup_fct_attribute;

/* Remove a cleanup handler installed by the matching pthread_cleanup_push.
   If EXECUTE is non-zero, the handler function is called. */
# define pthread_cleanup_pop(execute) \
      do { } while (0);/* Empty to allow label before pthread_cleanup_pop.  */\
    } while (0);							      \
    __pthread_unregister_cancel (&__cancel_buf);			      \
    if (execute)							      \
      __cancel_routine (__cancel_arg);					      \
  } while (0)
extern void __pthread_unregister_cancel (__pthread_unwind_buf_t *__buf)
  __cleanup_fct_attribute;

# ifdef __USE_GNU
/* Install a cleanup handler as pthread_cleanup_push does, but also
   saves the current cancellation type and sets it to deferred
   cancellation.  */
#  define pthread_cleanup_push_defer_np(routine, arg) \
  do {									      \
    __pthread_unwind_buf_t __cancel_buf;				      \
    void (*__cancel_routine) (void *) = (routine);			      \
    void *__cancel_arg = (arg);						      \
    int __not_first_call = __sigsetjmp ((struct __jmp_buf_tag *) (void *)     \
					__cancel_buf.__cancel_jmp_buf, 0);    \
    if (__glibc_unlikely (__not_first_call))				      \
      {									      \
	__cancel_routine (__cancel_arg);				      \
	__pthread_unwind_next (&__cancel_buf);				      \
	/* NOTREACHED */						      \
      }									      \
									      \
    __pthread_register_cancel_defer (&__cancel_buf);			      \
    do {
extern void __pthread_register_cancel_defer (__pthread_unwind_buf_t *__buf)
     __cleanup_fct_attribute;

/* Remove a cleanup handler as pthread_cleanup_pop does, but also
   restores the cancellation type that was in effect when the matching
   pthread_cleanup_push_defer was called.  */
#  define pthread_cleanup_pop_restore_np(execute) \
      do { } while (0);/* Empty to allow label before pthread_cleanup_pop.  */\
    } while (0);							      \
    __pthread_unregister_cancel_restore (&__cancel_buf);		      \
    if (execute)							      \
      __cancel_routine (__cancel_arg);					      \
  } while (0)
extern void __pthread_unregister_cancel_restore (__pthread_unwind_buf_t *__buf)
  __cleanup_fct_attribute;
# endif

/* Internal interface to initiate cleanup.  */
extern void __pthread_unwind_next (__pthread_unwind_buf_t *__buf)
     __cleanup_fct_attribute __attribute__ ((__noreturn__))
# ifndef SHARED
     __attribute__ ((__weak__))
# endif
     ;
#endif

/* Function used in the macros.  */
struct __jmp_buf_tag;
extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask) __THROWNL;
#define pthread_cleanup_pop(E)\
    (*pthread_getclean() = _pthread_cup.next, (E?_pthread_cup.func((pthread_once_t *)_pthread_cup.arg):0));}

@vtorri without much context I'd say your message:

../src/lib/eina/eina_thread.h:287:3: error: second operand to the conditional operator is of type 'void', but the third operand is neither a throw-expression nor of type 'void'

Refers to:

(E?_pthread_cup.func((pthread_once_t *)_pthread_cup.arg):0)

Indeed the cleanup function is of type void, then condition ? void : 0 would cause an error and I wonder how that code is supposed to work. Could you report a bug to them?

raster edited edge metadata.Nov 9 2016, 3:26 PM

i'm just going to repeat here what i've said before... i dislike this pthread cancellable stuff. it's got portability problems. find another way to do it or to "work sufficiently" e.g. by just leaving pending lookups in spare threads until they fail/timeout and have other threads take over the job from maybe a pool ... or something. :(

@raster from what I see it's portable, if not with a pthread wrapper, at least with native windows API. Also doable in other systems.

Then I'd like to try this for a bit more, if a real showstopper appears then I'm committed to rework everything to be single threaded or do nasty threading polling for cancellation (which brings other problems on its own).

Not sure if you checked it, but compare the code of SOCKS in ecore_con_socks and the one in efl_net... it's much simpler and direct match to algorithms/protocol you find on Wikipedia and the likes. It is what most people will do as they do not get main loop or have the skills to convert them to async/corroutine. IOW it is doing what our users will do, like it or not... in Tizen you see that kind of code on almost all apps :-/

In D4357#73621, @vtorri wrote:
#define pthread_cleanup_pop(E)\
    (*pthread_getclean() = _pthread_cup.next, (E?_pthread_cup.func((pthread_once_t *)_pthread_cup.arg):0));}

You can bypass this error by adding cast to (void)

#define pthread_cleanup_pop(E)\
    (*pthread_getclean() = _pthread_cup.next, (E?_pthread_cup.func((pthread_once_t *)_pthread_cup.arg):(void)0));}

could someone from windows confirm it's not broken anymore? the latest GIT looks sane to me, using recommended closesocket(), comparison with INVALID_SOCKET, proper errno on windows and should have all the defines in place.

  CC       lib/ecore_con/lib_ecore_con_libecore_con_la-ecore_con.lo
lib/ecore_con/ecore_con.c:41:23: fatal error: sys/ioctl.h: No such file or directory
 #include <sys/ioctl.h>
                       ^
compilation terminated.

And if I disable that header on Windows

#ifdef HAVE_EVIL
# include <Evil.h>
#else
#include <sys/ioctl.h>
#endif

I get ton of warnings and some errors:

  CC       lib/ecore_con/lib_ecore_con_libecore_con_la-ecore_con.lo
lib/ecore_con/ecore_con.c: In function ‘_efl_network_server_efl_object_destructor’:
lib/ecore_con/ecore_con.c:1410:11: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
    if (svr->fd >= 0)
           ^
lib/ecore_con/ecore_con.c: In function ‘_efl_network_client_efl_object_destructor’:
lib/ecore_con/ecore_con.c:1473:10: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
    if (cl->fd >= 0)
          ^
lib/ecore_con/ecore_con.c: In function ‘_ecore_con_svr_tcp_handler’:
lib/ecore_con/ecore_con.c:2166:10: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
    if (cl->fd >= 0) close(cl->fd);
          ^
lib/ecore_con/ecore_con.c: In function ‘efl_net_socket4’:
lib/ecore_con/ecore_con.c:3420:19: warning: format ‘%d’ expects argument of type ‘int’, but argument 7 has type ‘SOCKET’ [-Wformat=]
                   ERR("fcntl(%d, F_SETFD, FD_CLOEXEC): %s", fd, strerror(errno));
                   ^
lib/ecore_con/ecore_con.c: In function ‘_efl_net_ip_resolve_async_run’:
lib/ecore_con/ecore_con.c:3463:30: error: ‘EAI_SYSTEM’ undeclared (first use in this function)
         if ((d->gai_error == EAI_SYSTEM) && (errno == EINTR)) continue;
                              ^
lib/ecore_con/ecore_con.c:3463:30: note: each undeclared identifier is reported only once for each function it appears in
lib/ecore_con/ecore_con.c: In function ‘_efl_net_connect_async_run’:
lib/ecore_con/ecore_con.c:3568:60: error: invalid application of ‘sizeof’ to incomplete type ‘struct sockaddr_un’
    char buf[INET6_ADDRSTRLEN + sizeof("[]:65536") + sizeof(struct sockaddr_un)] = "";
                                                            ^
lib/ecore_con/ecore_con.c:3568:9: warning: unused variable ‘buf’ [-Wunused-variable]
    char buf[INET6_ADDRSTRLEN + sizeof("[]:65536") + sizeof(struct sockaddr_un)] = "";
         ^
lib/ecore_con/ecore_con.c: In function ‘_efl_net_connect_async_end’:
lib/ecore_con/ecore_con.c:3641:14: warning: format ‘%d’ expects argument of type ‘int’, but argument 7 has type ‘SOCKET’ [-Wformat=]
              ERR("fcntl(%d, F_GETFD): %s", d->sockfd, eina_error_msg_get(d->error));
              ^
lib/ecore_con/ecore_con.c:3651:19: warning: format ‘%d’ expects argument of type ‘int’, but argument 7 has type ‘SOCKET’ [-Wformat=]
                   ERR("fcntl(%d, F_SETFD, %#x): %s", d->sockfd, flags, eina_error_msg_get(d->error));
                   ^
lib/ecore_con/ecore_con.c: In function ‘_efl_net_ip_connect’:
lib/ecore_con/ecore_con.c:3779:16: warning: format ‘%d’ expects argument of type ‘int’, but argument 7 has type ‘SOCKET’ [-Wformat=]
                DBG("connect fd=%d to %s", fd, buf);
                ^
lib/ecore_con/ecore_con.c:3785:14: warning: format ‘%d’ expects argument of type ‘int’, but argument 7 has type ‘SOCKET’ [-Wformat=]
              DBG("connected fd=%d to %s", fd, buf);
              ^
lib/ecore_con/ecore_con.c:3791:14: warning: format ‘%d’ expects argument of type ‘int’, but argument 7 has type ‘SOCKET’ [-Wformat=]
              DBG("couldn't connect fd=%d to %s: %s", fd, buf, eina_error_msg_get(ret));
              ^
lib/ecore_con/ecore_con.c: In function ‘_efl_net_ip_resolve_and_connect’:
lib/ecore_con/ecore_con.c:3807:18: error: ‘AI_ADDRCONFIG’ undeclared (first use in this function)
      .ai_flags = AI_ADDRCONFIG | AI_V4MAPPED,
                  ^
lib/ecore_con/ecore_con.c:3816:38: error: ‘EAI_SYSTEM’ undeclared (first use in this function)
    while ((r == EAI_AGAIN) || ((r == EAI_SYSTEM) && (errno == EINTR)));
                                      ^
lib/ecore_con/ecore_con.c:3823:9: warning: overflow in implicit constant conversion [-Woverflow]
         *sockfd = INVALID_SOCKET;
         ^
lib/ecore_con/ecore_con.c: In function ‘_efl_net_ip_connect_async_run_direct’:
lib/ecore_con/ecore_con.c:3853:4: warning: passing argument 5 of ‘_efl_net_ip_resolve_and_connect’ from incompatible pointer type [enabled by default]
    d->error = _efl_net_ip_resolve_and_connect(host, port, d->type, d->protocol, &d->sockfd, &d->addr, &d->addrlen);
    ^
lib/ecore_con/ecore_con.c:3800:1: note: expected ‘int *’ but argument is of type ‘SOCKET *’
 _efl_net_ip_resolve_and_connect(const char *host, const char *port, int type, int protocol, int *sockfd, struct sockaddr *addr, socklen_t *p_addrlen)
 ^
lib/ecore_con/ecore_con.c: In function ‘_efl_net_ip_connect_async_run_socks4_try’:
lib/ecore_con/ecore_con.c:3928:105: warning: passing argument 5 of ‘_efl_net_ip_resolve_and_connect’ from incompatible pointer type [enabled by default]
    err = _efl_net_ip_resolve_and_connect(proxy_host, proxy_port, SOCK_STREAM, IPPROTO_TCP, &fd, (struct sockaddr *)&proxy_addr, &proxy_addrlen);
                                                                                                         ^
lib/ecore_con/ecore_con.c:3800:1: note: expected ‘int *’ but argument is of type ‘SOCKET *’
 _efl_net_ip_resolve_and_connect(const char *host, const char *port, int type, int protocol, int *sockfd, struct sockaddr *addr, socklen_t *p_addrlen)
 ^
lib/ecore_con/ecore_con.c:3940:11: warning: format ‘%d’ expects argument of type ‘int’, but argument 9 has type ‘SOCKET’ [-Wformat=]
           DBG("resolved address='%s' to %s. Connect using fd=%d socks4://%s:%s", d->address, buf, fd, proxy_host, proxy_port);
           ^
lib/ecore_con/ecore_con.c:3946:4: warning: passing argument 2 of ‘send’ from incompatible pointer type [enabled by default]
    s = send(fd, request, request_len, MSG_NOSIGNAL);
    ^
In file included from /usr/share/mingw-w64/include/ws2tcpip.h:11:0,
                 from lib/ecore_con/ecore_con.c:34:
/usr/share/mingw-w64/include/winsock2.h:997:34: note: expected ‘const char *’ but argument is of type ‘struct Efl_Net_Socks4_Request *’
   WINSOCK_API_LINKAGE int WSAAPI send(SOCKET s,const char *buf,int len,int flags);
                                  ^
lib/ecore_con/ecore_con.c:3950:11: warning: format ‘%d’ expects argument of type ‘int’, but argument 8 has type ‘SOCKET’ [-Wformat=]
           DBG("couldn't request connection to host=%s fd=%d socks4://%s:%s: %s", buf, fd, proxy_host, proxy_port, eina_error_msg_get(efl_net_socket_error_get()));
           ^
lib/ecore_con/ecore_con.c:3957:9: warning: passing argument 2 of ‘recv’ from incompatible pointer type [enabled by default]
         s = recv(fd, &reply, sizeof(reply), MSG_NOSIGNAL);
         ^
In file included from /usr/share/mingw-w64/include/ws2tcpip.h:11:0,
                 from lib/ecore_con/ecore_con.c:34:
/usr/share/mingw-w64/include/winsock2.h:992:34: note: expected ‘char *’ but argument is of type ‘struct Efl_Net_Socks4_Reply *’
   WINSOCK_API_LINKAGE int WSAAPI recv(SOCKET s,char *buf,int len,int flags);
                                  ^
lib/ecore_con/ecore_con.c:3961:16: warning: format ‘%d’ expects argument of type ‘int’, but argument 8 has type ‘SOCKET’ [-Wformat=]
                DBG("couldn't recv reply of connection to host=%s fd=%d socks4://%s:%s: %s", buf, fd, proxy_host, proxy_port, eina_error_msg_get(efl_net_socket_error_get()));
                ^
lib/ecore_con/ecore_con.c:3968:16: warning: format ‘%d’ expects argument of type ‘int’, but argument 8 has type ‘SOCKET’ [-Wformat=]
                DBG("rejected connection to host=%s fd=%d socks4://%s:%s: reason=%#x", buf, fd, proxy_host, proxy_port, reply.status);
                ^
lib/ecore_con/ecore_con.c:3976:19: warning: format ‘%d’ expects argument of type ‘int’, but argument 8 has type ‘SOCKET’ [-Wformat=]
                   DBG("connected to host=%s fd=%d socks4://%s:%s", buf, fd, proxy_host, proxy_port);
                   ^
lib/ecore_con/ecore_con.c: In function ‘_efl_net_ip_connect_async_run_socks4’:
lib/ecore_con/ecore_con.c:3994:18: error: ‘AI_ADDRCONFIG’ undeclared (first use in this function)
      .ai_flags = AI_ADDRCONFIG | AI_V4MAPPED,
                  ^
lib/ecore_con/ecore_con.c:4028:38: error: ‘EAI_SYSTEM’ undeclared (first use in this function)
    while ((r == EAI_AGAIN) || ((r == EAI_SYSTEM) && (errno == EINTR)));
                                      ^
lib/ecore_con/ecore_con.c: In function ‘_efl_net_ip_connect_async_run_socks4a’:
lib/ecore_con/ecore_con.c:4082:18: error: ‘AI_ADDRCONFIG’ undeclared (first use in this function)
      .ai_flags = AI_ADDRCONFIG | AI_V4MAPPED,
                  ^
lib/ecore_con/ecore_con.c:4114:105: warning: passing argument 5 of ‘_efl_net_ip_resolve_and_connect’ from incompatible pointer type [enabled by default]
    err = _efl_net_ip_resolve_and_connect(proxy_host, proxy_port, SOCK_STREAM, IPPROTO_TCP, &fd, (struct sockaddr *)&proxy_addr, &proxy_addrlen);
                                                                                                         ^
lib/ecore_con/ecore_con.c:3800:1: note: expected ‘int *’ but argument is of type ‘SOCKET *’
 _efl_net_ip_resolve_and_connect(const char *host, const char *port, int type, int protocol, int *sockfd, struct sockaddr *addr, socklen_t *p_addrlen)
 ^
lib/ecore_con/ecore_con.c:4122:4: warning: format ‘%d’ expects argument of type ‘int’, but argument 7 has type ‘SOCKET’ [-Wformat=]
    DBG("connected fd=%d to socks4a://%s", fd, proxy);
    ^
lib/ecore_con/ecore_con.c:4128:38: error: ‘EAI_SYSTEM’ undeclared (first use in this function)
    while ((r == EAI_AGAIN) || ((r == EAI_SYSTEM) && (errno == EINTR)));
                                      ^
lib/ecore_con/ecore_con.c:4167:19: warning: passing argument 2 of ‘send’ from incompatible pointer type [enabled by default]
                   s = send(fd, request, request_len, MSG_NOSIGNAL);
                   ^
In file included from /usr/share/mingw-w64/include/ws2tcpip.h:11:0,
                 from lib/ecore_con/ecore_con.c:34:
/usr/share/mingw-w64/include/winsock2.h:997:34: note: expected ‘const char *’ but argument is of type ‘struct Efl_Net_Socks4_Request *’
   WINSOCK_API_LINKAGE int WSAAPI send(SOCKET s,const char *buf,int len,int flags);
                                  ^
lib/ecore_con/ecore_con.c:4178:24: warning: passing argument 2 of ‘recv’ from incompatible pointer type [enabled by default]
                        s = recv(fd, &reply, sizeof(reply), MSG_NOSIGNAL);
                        ^
In file included from /usr/share/mingw-w64/include/ws2tcpip.h:11:0,
                 from lib/ecore_con/ecore_con.c:34:
/usr/share/mingw-w64/include/winsock2.h:992:34: note: expected ‘char *’ but argument is of type ‘struct Efl_Net_Socks4_Reply *’
   WINSOCK_API_LINKAGE int WSAAPI recv(SOCKET s,char *buf,int len,int flags);
                                  ^
In file included from ../src/lib/eina/eina_inline_lock_posix.x:35:0,
                 from ../src/lib/eina/eina_lock.h:100,
                 from ../src/lib/eina/Eina.h:255,
                 from ../src/lib/ecore/Ecore.h:304,
                 from lib/ecore_con/ecore_con.c:43:
lib/ecore_con/ecore_con.c:4207:38: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    EINA_THREAD_CLEANUP_POP(d->sockfd == -1); /* we need fd only on success */
                                      ^
/opt/windows_64/include/pthread.h:215:48: note: in definition of macro ‘pthread_cleanup_pop’
     (*pthread_getclean() = _pthread_cup.next, (E?_pthread_cup.func((pthread_once_t *)_pthread_cup.arg):(void)0));}
                                                ^
lib/ecore_con/ecore_con.c:4207:4: note: in expansion of macro ‘EINA_THREAD_CLEANUP_POP’
    EINA_THREAD_CLEANUP_POP(d->sockfd == -1); /* we need fd only on success */
    ^
lib/ecore_con/ecore_con.c: In function ‘_efl_net_ip_connect_async_run_socks5_auth_user_pass’:
lib/ecore_con/ecore_con.c:4401:11: warning: format ‘%d’ expects argument of type ‘int’, but argument 7 has type ‘SOCKET’ [-Wformat=]
           DBG("couldn't send user-password authentication to fd=%d %s://%s:%s: %s", fd, proxy_protocol, proxy_host, proxy_port, eina_error_msg_get(efl_net_socket_error_get()));
           ^
lib/ecore_con/ecore_con.c:4409:9: warning: passing argument 2 of ‘recv’ from incompatible pointer type [enabled by default]
         s = recv(fd, &reply, sizeof(reply), MSG_NOSIGNAL);
         ^
In file included from /usr/share/mingw-w64/include/ws2tcpip.h:11:0,
                 from lib/ecore_con/ecore_con.c:34:
/usr/share/mingw-w64/include/winsock2.h:992:34: note: expected ‘char *’ but argument is of type ‘uint8_t (*)[2]’
   WINSOCK_API_LINKAGE int WSAAPI recv(SOCKET s,char *buf,int len,int flags);
                                  ^
lib/ecore_con/ecore_con.c:4413:16: warning: format ‘%d’ expects argument of type ‘int’, but argument 7 has type ‘SOCKET’ [-Wformat=]
                DBG("couldn't recv user-password authentication reply from fd=%d %s://%s:%s: %s", fd, proxy_protocol, proxy_host, proxy_port, eina_error_msg_get(efl_net_socket_error_get()));
                ^
lib/ecore_con/ecore_con.c:4423:17: warning: format ‘%d’ expects argument of type ‘int’, but argument 8 has type ‘SOCKET’ [-Wformat=]
                 DBG("successfully authenticated user=%s with proxy fd=%d %s://%s:%s", user, fd, proxy_protocol, proxy_host, proxy_port);
                 ^
lib/ecore_con/ecore_con.c: In function ‘_efl_net_ip_connect_async_run_socks5_try’:
lib/ecore_con/ecore_con.c:4450:105: warning: passing argument 5 of ‘_efl_net_ip_resolve_and_connect’ from incompatible pointer type [enabled by default]
    err = _efl_net_ip_resolve_and_connect(proxy_host, proxy_port, SOCK_STREAM, IPPROTO_TCP, &fd, (struct sockaddr *)&proxy_addr, &proxy_addrlen);
                                                                                                         ^
lib/ecore_con/ecore_con.c:3800:1: note: expected ‘int *’ but argument is of type ‘SOCKET *’
 _efl_net_ip_resolve_and_connect(const char *host, const char *port, int type, int protocol, int *sockfd, struct sockaddr *addr, socklen_t *p_addrlen)
 ^
lib/ecore_con/ecore_con.c:4462:11: warning: format ‘%d’ expects argument of type ‘int’, but argument 9 has type ‘SOCKET’ [-Wformat=]
           DBG("resolved address='%s' to %s. Connect using fd=%d socks5://%s:%s", d->address, buf, fd, proxy_host, proxy_port);
           ^
lib/ecore_con/ecore_con.c:4465:4: warning: passing argument 2 of ‘send’ from incompatible pointer type [enabled by default]
    s = send(fd, &greeting, sizeof(greeting), MSG_NOSIGNAL);
    ^
In file included from /usr/share/mingw-w64/include/ws2tcpip.h:11:0,
                 from lib/ecore_con/ecore_con.c:34:
/usr/share/mingw-w64/include/winsock2.h:997:34: note: expected ‘const char *’ but argument is of type ‘struct Efl_Net_Socks5_Greeting *’
   WINSOCK_API_LINKAGE int WSAAPI send(SOCKET s,const char *buf,int len,int flags);
                                  ^
lib/ecore_con/ecore_con.c:4469:11: warning: format ‘%d’ expects argument of type ‘int’, but argument 8 has type ‘SOCKET’ [-Wformat=]
           DBG("couldn't request connection to host=%s fd=%d socks5://%s:%s: %s", buf, fd, proxy_host, proxy_port, eina_error_msg_get(efl_net_socket_error_get()));
           ^
lib/ecore_con/ecore_con.c:4476:9: warning: passing argument 2 of ‘recv’ from incompatible pointer type [enabled by default]
         s = recv(fd, &greeting_reply, sizeof(greeting_reply), MSG_NOSIGNAL);
         ^
In file included from /usr/share/mingw-w64/include/ws2tcpip.h:11:0,
                 from lib/ecore_con/ecore_con.c:34:
/usr/share/mingw-w64/include/winsock2.h:992:34: note: expected ‘char *’ but argument is of type ‘struct Efl_Net_Socks5_Greeting_Reply *’
   WINSOCK_API_LINKAGE int WSAAPI recv(SOCKET s,char *buf,int len,int flags);
                                  ^
lib/ecore_con/ecore_con.c:4480:16: warning: format ‘%d’ expects argument of type ‘int’, but argument 8 has type ‘SOCKET’ [-Wformat=]
                DBG("couldn't recv greeting reply of connection to host=%s fd=%d socks5://%s:%s: %s", buf, fd, proxy_host, proxy_port, eina_error_msg_get(efl_net_socket_error_get()));
                ^
lib/ecore_con/ecore_con.c:4487:16: warning: format ‘%d’ expects argument of type ‘int’, but argument 9 has type ‘SOCKET’ [-Wformat=]
                DBG("proxy server rejected authentication %#x trying connection to host=%s fd=%d socks5://%s:%s", greeting.auths[0], buf, fd, proxy_host, proxy_port);
                ^
lib/ecore_con/ecore_con.c:4505:29: warning: passing argument 2 of ‘send’ from incompatible pointer type [enabled by default]
                             s = send(fd, request, request_len, MSG_NOSIGNAL);
                             ^
In file included from /usr/share/mingw-w64/include/ws2tcpip.h:11:0,
                 from lib/ecore_con/ecore_con.c:34:
/usr/share/mingw-w64/include/winsock2.h:997:34: note: expected ‘const char *’ but argument is of type ‘struct Efl_Net_Socks5_Request *’
   WINSOCK_API_LINKAGE int WSAAPI send(SOCKET s,const char *buf,int len,int flags);
                                  ^
lib/ecore_con/ecore_con.c:4509:36: warning: format ‘%d’ expects argument of type ‘int’, but argument 8 has type ‘SOCKET’ [-Wformat=]
                                    DBG("couldn't request connection to host=%s fd=%d socks5://%s:%s: %s", buf, fd, proxy_host, proxy_port, eina_error_msg_get(efl_net_socket_error_get()));
                                    ^
lib/ecore_con/ecore_con.c:4516:34: warning: passing argument 2 of ‘recv’ from incompatible pointer type [enabled by default]
                                  s = recv(fd, &reply, sizeof(reply), MSG_NOSIGNAL);
                                  ^
In file included from /usr/share/mingw-w64/include/ws2tcpip.h:11:0,
                 from lib/ecore_con/ecore_con.c:34:
/usr/share/mingw-w64/include/winsock2.h:992:34: note: expected ‘char *’ but argument is of type ‘struct Efl_Net_Socks5_Reply_Ipv4 *’
   WINSOCK_API_LINKAGE int WSAAPI recv(SOCKET s,char *buf,int len,int flags);
                                  ^
lib/ecore_con/ecore_con.c:4520:41: warning: format ‘%d’ expects argument of type ‘int’, but argument 8 has type ‘SOCKET’ [-Wformat=]
                                         DBG("couldn't recv reply of connection to host=%s fd=%d socks5://%s:%s: %s", buf, fd, proxy_host, proxy_port, eina_error_msg_get(efl_net_socket_error_get()));
                                         ^
lib/ecore_con/ecore_con.c:4527:41: warning: format ‘%d’ expects argument of type ‘int’, but argument 8 has type ‘SOCKET’ [-Wformat=]
                                         DBG("rejected IPv4 connection to host=%s fd=%d socks5://%s:%s: reason=%#x", buf, fd, proxy_host, proxy_port, reply.base.status);
                                         ^
lib/ecore_con/ecore_con.c:4535:44: warning: format ‘%d’ expects argument of type ‘int’, but argument 8 has type ‘SOCKET’ [-Wformat=]
                                            DBG("connected IPv4 to host=%s fd=%d socks5://%s:%s", buf, fd, proxy_host, proxy_port);
                                            ^
lib/ecore_con/ecore_con.c:4542:34: warning: passing argument 2 of ‘recv’ from incompatible pointer type [enabled by default]
                                  s = recv(fd, &reply, sizeof(reply), MSG_NOSIGNAL);
                                  ^
In file included from /usr/share/mingw-w64/include/ws2tcpip.h:11:0,
                 from lib/ecore_con/ecore_con.c:34:
/usr/share/mingw-w64/include/winsock2.h:992:34: note: expected ‘char *’ but argument is of type ‘struct Efl_Net_Socks5_Reply_Ipv6 *’
   WINSOCK_API_LINKAGE int WSAAPI recv(SOCKET s,char *buf,int len,int flags);
                                  ^
lib/ecore_con/ecore_con.c:4546:41: warning: format ‘%d’ expects argument of type ‘int’, but argument 8 has type ‘SOCKET’ [-Wformat=]
                                         DBG("couldn't recv reply of connection to host=%s fd=%d socks5://%s:%s: %s", buf, fd, proxy_host, proxy_port, eina_error_msg_get(efl_net_socket_error_get()));
                                         ^
lib/ecore_con/ecore_con.c:4553:41: warning: format ‘%d’ expects argument of type ‘int’, but argument 8 has type ‘SOCKET’ [-Wformat=]
                                         DBG("rejected IPv6 connection to host=%s fd=%d socks5://%s:%s: reason=%#x", buf, fd, proxy_host, proxy_port, reply.base.status);
                                         ^
lib/ecore_con/ecore_con.c:4561:44: warning: format ‘%d’ expects argument of type ‘int’, but argument 8 has type ‘SOCKET’ [-Wformat=]
                                            DBG("connected IPv6 to host=%s fd=%d socks5://%s:%s", buf, fd, proxy_host, proxy_port);
                                            ^
lib/ecore_con/ecore_con.c: In function ‘_efl_net_ip_connect_async_run_socks5’:
lib/ecore_con/ecore_con.c:4585:18: error: ‘AI_ADDRCONFIG’ undeclared (first use in this function)
      .ai_flags = AI_ADDRCONFIG | AI_V4MAPPED,
                  ^
lib/ecore_con/ecore_con.c:4616:38: error: ‘EAI_SYSTEM’ undeclared (first use in this function)
    while ((r == EAI_AGAIN) || ((r == EAI_SYSTEM) && (errno == EINTR)));
                                      ^
lib/ecore_con/ecore_con.c: In function ‘_efl_net_ip_connect_async_run_socks5h’:
lib/ecore_con/ecore_con.c:4683:105: warning: passing argument 5 of ‘_efl_net_ip_resolve_and_connect’ from incompatible pointer type [enabled by default]
    err = _efl_net_ip_resolve_and_connect(proxy_host, proxy_port, SOCK_STREAM, IPPROTO_TCP, &fd, (struct sockaddr *)&proxy_addr, &proxy_addrlen);
                                                                                                         ^
lib/ecore_con/ecore_con.c:3800:1: note: expected ‘int *’ but argument is of type ‘SOCKET *’
 _efl_net_ip_resolve_and_connect(const char *host, const char *port, int type, int protocol, int *sockfd, struct sockaddr *addr, socklen_t *p_addrlen)
 ^
lib/ecore_con/ecore_con.c:4691:4: warning: format ‘%d’ expects argument of type ‘int’, but argument 7 has type ‘SOCKET’ [-Wformat=]
    DBG("connected fd=%d to socks5h://%s", fd, proxy);
    ^
lib/ecore_con/ecore_con.c:4694:4: warning: passing argument 2 of ‘send’ from incompatible pointer type [enabled by default]
    s = send(fd, &greeting, sizeof(greeting), MSG_NOSIGNAL);
    ^
In file included from /usr/share/mingw-w64/include/ws2tcpip.h:11:0,
                 from lib/ecore_con/ecore_con.c:34:
/usr/share/mingw-w64/include/winsock2.h:997:34: note: expected ‘const char *’ but argument is of type ‘struct Efl_Net_Socks5_Greeting *’
   WINSOCK_API_LINKAGE int WSAAPI send(SOCKET s,const char *buf,int len,int flags);
                                  ^
lib/ecore_con/ecore_con.c:4698:11: warning: format ‘%d’ expects argument of type ‘int’, but argument 9 has type ‘SOCKET’ [-Wformat=]
           DBG("couldn't request connection to host=%s:%s fd=%d socks5h://%s:%s: %s", host, port, fd, proxy_host, proxy_port, eina_error_msg_get(efl_net_socket_error_get()));
           ^
lib/ecore_con/ecore_con.c:4705:9: warning: passing argument 2 of ‘recv’ from incompatible pointer type [enabled by default]
         s = recv(fd, &greeting_reply, sizeof(greeting_reply), MSG_NOSIGNAL);
         ^
In file included from /usr/share/mingw-w64/include/ws2tcpip.h:11:0,
                 from lib/ecore_con/ecore_con.c:34:
/usr/share/mingw-w64/include/winsock2.h:992:34: note: expected ‘char *’ but argument is of type ‘struct Efl_Net_Socks5_Greeting_Reply *’
   WINSOCK_API_LINKAGE int WSAAPI recv(SOCKET s,char *buf,int len,int flags);
                                  ^
lib/ecore_con/ecore_con.c:4709:16: warning: format ‘%d’ expects argument of type ‘int’, but argument 9 has type ‘SOCKET’ [-Wformat=]
                DBG("couldn't recv greeting reply of connection to host=%s:%s fd=%d socks5h://%s:%s: %s", host, port, fd, proxy_host, proxy_port, eina_error_msg_get(efl_net_socket_error_get()));
                ^
lib/ecore_con/ecore_con.c:4716:16: warning: format ‘%d’ expects argument of type ‘int’, but argument 10 has type ‘SOCKET’ [-Wformat=]
                DBG("proxy server rejected authentication %#x trying connection to host=%s:%s fd=%d socks5h://%s:%s", greeting.auths[0], host, port, fd, proxy_host, proxy_port);
                ^
lib/ecore_con/ecore_con.c:4731:38: error: ‘AI_ADDRCONFIG’ undeclared (first use in this function)
                          .ai_flags = AI_ADDRCONFIG | AI_V4MAPPED,
                                      ^
lib/ecore_con/ecore_con.c:4739:58: error: ‘EAI_SYSTEM’ undeclared (first use in this function)
                        while ((r == EAI_AGAIN) || ((r == EAI_SYSTEM) && (errno == EINTR)));
                                                          ^
lib/ecore_con/ecore_con.c:4770:39: warning: passing argument 2 of ‘send’ from incompatible pointer type [enabled by default]
                                       s = send(fd, request, request_len, MSG_NOSIGNAL);
                                       ^
In file included from /usr/share/mingw-w64/include/ws2tcpip.h:11:0,
                 from lib/ecore_con/ecore_con.c:34:
/usr/share/mingw-w64/include/winsock2.h:997:34: note: expected ‘const char *’ but argument is of type ‘struct Efl_Net_Socks5_Request *’
   WINSOCK_API_LINKAGE int WSAAPI send(SOCKET s,const char *buf,int len,int flags);
                                  ^
lib/ecore_con/ecore_con.c:4774:46: warning: format ‘%d’ expects argument of type ‘int’, but argument 9 has type ‘SOCKET’ [-Wformat=]
                                              DBG("couldn't request connection to host=%s:%s fd=%d socks5h://%s:%s: %s", host, port, fd, proxy_host, proxy_port, eina_error_msg_get(efl_net_socket_error_get()));
                                              ^
lib/ecore_con/ecore_con.c:4782:44: warning: passing argument 2 of ‘recv’ from incompatible pointer type [enabled by default]
                                            s = recv(fd, &reply, sizeof(reply), MSG_NOSIGNAL);
                                            ^
In file included from /usr/share/mingw-w64/include/ws2tcpip.h:11:0,
                 from lib/ecore_con/ecore_con.c:34:
/usr/share/mingw-w64/include/winsock2.h:992:34: note: expected ‘char *’ but argument is of type ‘struct Efl_Net_Socks5_Reply *’
   WINSOCK_API_LINKAGE int WSAAPI recv(SOCKET s,char *buf,int len,int flags);
                                  ^
lib/ecore_con/ecore_con.c:4786:51: warning: format ‘%d’ expects argument of type ‘int’, but argument 9 has type ‘SOCKET’ [-Wformat=]
                                                   DBG("couldn't recv reply of connection to host=%s:%s fd=%d socks5h://%s:%s: %s", host, port, fd, proxy_host, proxy_port, eina_error_msg_get(efl_net_socket_error_get()));
                                                   ^
lib/ecore_con/ecore_con.c:4793:51: warning: format ‘%d’ expects argument of type ‘int’, but argument 9 has type ‘SOCKET’ [-Wformat=]
                                                   DBG("rejected connection to host=%s:%s fd=%d socks5h://%s:%s: reason=%#x", host, port, fd, proxy_host, proxy_port, reply.status);
                                                   ^
lib/ecore_con/ecore_con.c:4798:54: warning: passing argument 2 of ‘recv’ from incompatible pointer type [enabled by default]
                                                      s = recv(fd, &ipv4, sizeof(ipv4), MSG_NOSIGNAL);
                                                      ^
In file included from /usr/share/mingw-w64/include/ws2tcpip.h:11:0,
                 from lib/ecore_con/ecore_con.c:34:
/usr/share/mingw-w64/include/winsock2.h:992:34: note: expected ‘char *’ but argument is of type ‘struct Efl_Net_Socks5_Address_Ipv4 *’
   WINSOCK_API_LINKAGE int WSAAPI recv(SOCKET s,char *buf,int len,int flags);
                                  ^
lib/ecore_con/ecore_con.c:4802:61: warning: format ‘%d’ expects argument of type ‘int’, but argument 9 has type ‘SOCKET’ [-Wformat=]
                                                             DBG("couldn't recv ipv4 of connection to host=%s:%s fd=%d socks5h://%s:%s: %s", host, port, fd, proxy_host, proxy_port, eina_error_msg_get(efl_net_socket_error_get()));
                                                             ^
lib/ecore_con/ecore_con.c:4814:59: warning: format ‘%d’ expects argument of type ‘int’, but argument 9 has type ‘SOCKET’ [-Wformat=]
                                                           DBG("connected IPv4 to host=%s:%s fd=%d socks5h://%s:%s", host, port, fd, proxy_host, proxy_port);
                                                           ^
lib/ecore_con/ecore_con.c:4821:54: warning: passing argument 2 of ‘recv’ from incompatible pointer type [enabled by default]
                                                      s = recv(fd, &ipv6, sizeof(ipv6), MSG_NOSIGNAL);
                                                      ^
In file included from /usr/share/mingw-w64/include/ws2tcpip.h:11:0,
                 from lib/ecore_con/ecore_con.c:34:
/usr/share/mingw-w64/include/winsock2.h:992:34: note: expected ‘char *’ but argument is of type ‘struct Efl_Net_Socks5_Address_Ipv6 *’
   WINSOCK_API_LINKAGE int WSAAPI recv(SOCKET s,char *buf,int len,int flags);
                                  ^
lib/ecore_con/ecore_con.c:4825:61: warning: format ‘%d’ expects argument of type ‘int’, but argument 9 has type ‘SOCKET’ [-Wformat=]
                                                             DBG("couldn't recv ipv6 of connection to host=%s:%s fd=%d socks5h://%s:%s: %s", host, port, fd, proxy_host, proxy_port, eina_error_msg_get(efl_net_socket_error_get()));
                                                             ^
lib/ecore_con/ecore_con.c:4837:59: warning: format ‘%d’ expects argument of type ‘int’, but argument 9 has type ‘SOCKET’ [-Wformat=]
                                                           DBG("connected IPv6 to host=%s:%s fd=%d socks5h://%s:%s", host, port, fd, proxy_host, proxy_port);
                                                           ^
lib/ecore_con/ecore_con.c:4843:54: warning: format ‘%d’ expects argument of type ‘int’, but argument 9 has type ‘SOCKET’ [-Wformat=]
                                                      DBG("couldn't resolve host %s:%s fd=%d socks5h://%s:%s",  host, port, fd, proxy_host, proxy_port);
                                                      ^
In file included from ../src/lib/eina/eina_inline_lock_posix.x:35:0,
                 from ../src/lib/eina/eina_lock.h:100,
                 from ../src/lib/eina/Eina.h:255,
                 from ../src/lib/ecore/Ecore.h:304,
                 from lib/ecore_con/ecore_con.c:43:
lib/ecore_con/ecore_con.c:4858:38: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    EINA_THREAD_CLEANUP_POP(d->sockfd == -1); /* we need fd only on success */
                                      ^
/opt/windows_64/include/pthread.h:215:48: note: in definition of macro ‘pthread_cleanup_pop’
     (*pthread_getclean() = _pthread_cup.next, (E?_pthread_cup.func((pthread_once_t *)_pthread_cup.arg):(void)0));}
                                                ^
lib/ecore_con/ecore_con.c:4858:4: note: in expansion of macro ‘EINA_THREAD_CLEANUP_POP’
    EINA_THREAD_CLEANUP_POP(d->sockfd == -1); /* we need fd only on success */
    ^
lib/ecore_con/ecore_con.c: In function ‘_efl_net_ip_connect_async_end’:
lib/ecore_con/ecore_con.c:5045:14: warning: format ‘%d’ expects argument of type ‘int’, but argument 7 has type ‘SOCKET’ [-Wformat=]
              ERR("fcntl(%d, F_GETFD): %s", d->sockfd, strerror(errno));
              ^
lib/ecore_con/ecore_con.c:5055:19: warning: format ‘%d’ expects argument of type ‘int’, but argument 7 has type ‘SOCKET’ [-Wformat=]
                   ERR("fcntl(%d, F_SETFD, %#x): %s", d->sockfd, flags, strerror(errno));
                   ^
lib/ecore_con/ecore_con.c: In function ‘efl_net_multicast_join’:
lib/ecore_con/ecore_con.c:5268:9: warning: passing argument 4 of ‘setsockopt’ from incompatible pointer type [enabled by default]
         if (setsockopt(fd, IPPROTO_IP, IP_ADD_MEMBERSHIP, &mreq, sizeof(mreq)) == 0)
         ^
In file included from /usr/share/mingw-w64/include/ws2tcpip.h:11:0,
                 from lib/ecore_con/ecore_con.c:34:
/usr/share/mingw-w64/include/winsock2.h:999:34: note: expected ‘const char *’ but argument is of type ‘struct ip_mreq *’
   WINSOCK_API_LINKAGE int WSAAPI setsockopt(SOCKET s,int level,int optname,const char *optval,int optlen);
                                  ^
lib/ecore_con/ecore_con.c:5279:9: warning: passing argument 4 of ‘setsockopt’ from incompatible pointer type [enabled by default]
         if (setsockopt(fd, IPPROTO_IPV6, IPV6_JOIN_GROUP, &mreq, sizeof(mreq)) == 0)
         ^
In file included from /usr/share/mingw-w64/include/ws2tcpip.h:11:0,
                 from lib/ecore_con/ecore_con.c:34:
/usr/share/mingw-w64/include/winsock2.h:999:34: note: expected ‘const char *’ but argument is of type ‘struct ipv6_mreq *’
   WINSOCK_API_LINKAGE int WSAAPI setsockopt(SOCKET s,int level,int optname,const char *optval,int optlen);
                                  ^
lib/ecore_con/ecore_con.c: In function ‘efl_net_multicast_leave’:
lib/ecore_con/ecore_con.c:5304:9: warning: passing argument 4 of ‘setsockopt’ from incompatible pointer type [enabled by default]
         if (setsockopt(fd, IPPROTO_IP, IP_DROP_MEMBERSHIP, &mreq, sizeof(mreq)) == 0)
         ^
In file included from /usr/share/mingw-w64/include/ws2tcpip.h:11:0,
                 from lib/ecore_con/ecore_con.c:34:
/usr/share/mingw-w64/include/winsock2.h:999:34: note: expected ‘const char *’ but argument is of type ‘struct ip_mreq *’
   WINSOCK_API_LINKAGE int WSAAPI setsockopt(SOCKET s,int level,int optname,const char *optval,int optlen);
                                  ^
lib/ecore_con/ecore_con.c:5315:9: warning: passing argument 4 of ‘setsockopt’ from incompatible pointer type [enabled by default]
         if (setsockopt(fd, IPPROTO_IPV6, IPV6_LEAVE_GROUP, &mreq, sizeof(mreq)) == 0)
         ^
In file included from /usr/share/mingw-w64/include/ws2tcpip.h:11:0,
                 from lib/ecore_con/ecore_con.c:34:
/usr/share/mingw-w64/include/winsock2.h:999:34: note: expected ‘const char *’ but argument is of type ‘struct ipv6_mreq *’
   WINSOCK_API_LINKAGE int WSAAPI setsockopt(SOCKET s,int level,int optname,const char *optval,int optlen);
                                  ^
lib/ecore_con/ecore_con.c: In function ‘efl_net_multicast_ttl_set’:
lib/ecore_con/ecore_con.c:5338:4: warning: passing argument 4 of ‘setsockopt’ from incompatible pointer type [enabled by default]
    if (setsockopt(fd, level, opt, &value, sizeof(value)) == 0)
    ^
In file included from /usr/share/mingw-w64/include/ws2tcpip.h:11:0,
                 from lib/ecore_con/ecore_con.c:34:
/usr/share/mingw-w64/include/winsock2.h:999:34: note: expected ‘const char *’ but argument is of type ‘DWORD *’
   WINSOCK_API_LINKAGE int WSAAPI setsockopt(SOCKET s,int level,int optname,const char *optval,int optlen);
                                  ^
lib/ecore_con/ecore_con.c: In function ‘efl_net_multicast_ttl_get’:
lib/ecore_con/ecore_con.c:5357:4: warning: passing argument 4 of ‘getsockopt’ from incompatible pointer type [enabled by default]
    if (getsockopt(fd, level, opt, &value, &valuelen) == 0)
    ^
In file included from /usr/share/mingw-w64/include/ws2tcpip.h:11:0,
                 from lib/ecore_con/ecore_con.c:34:
/usr/share/mingw-w64/include/winsock2.h:980:34: note: expected ‘char *’ but argument is of type ‘DWORD *’
   WINSOCK_API_LINKAGE int WSAAPI getsockopt(SOCKET s,int level,int optname,char *optval,int *optlen);
                                  ^
lib/ecore_con/ecore_con.c: In function ‘efl_net_multicast_loopback_set’:
lib/ecore_con/ecore_con.c:5377:4: warning: passing argument 4 of ‘setsockopt’ from incompatible pointer type [enabled by default]
    if (setsockopt(fd, level, opt, &value, sizeof(value)) == 0)
    ^
In file included from /usr/share/mingw-w64/include/ws2tcpip.h:11:0,
                 from lib/ecore_con/ecore_con.c:34:
/usr/share/mingw-w64/include/winsock2.h:999:34: note: expected ‘const char *’ but argument is of type ‘DWORD *’
   WINSOCK_API_LINKAGE int WSAAPI setsockopt(SOCKET s,int level,int optname,const char *optval,int optlen);
                                  ^
lib/ecore_con/ecore_con.c: In function ‘efl_net_multicast_loopback_get’:
lib/ecore_con/ecore_con.c:5396:4: warning: passing argument 4 of ‘getsockopt’ from incompatible pointer type [enabled by default]
    if (getsockopt(fd, level, opt, &value, &valuelen) == 0)
    ^
In file included from /usr/share/mingw-w64/include/ws2tcpip.h:11:0,
                 from lib/ecore_con/ecore_con.c:34:
/usr/share/mingw-w64/include/winsock2.h:980:34: note: expected ‘char *’ but argument is of type ‘DWORD *’
   WINSOCK_API_LINKAGE int WSAAPI getsockopt(SOCKET s,int level,int optname,char *optval,int *optlen);
                                  ^
Makefile:30610: recipe for target 'lib/ecore_con/lib_ecore_con_libecore_con_la-ecore_con.lo' failed
#ifdef HAVE_EVIL
# include <Evil.h>
#else
#include <sys/ioctl.h>
#endif

use instead the detection of sys/ioctl.h (add it in configure.ac) instead of checking OS support.

an.kroitor added a comment.EditedNov 10 2016, 4:41 AM

@vtorri I don't know for what sys/ioctl.h is used here. Mingw doesn't provides it. Anyway removing this file from source on Windows doesn't help and build fails.

@barbieri do you need some additional logs or info?

I'll fix efl_net_code, thanks for the log. But as I've said before, it was already broken in all ecore_con and efl_network, which are not my code at all.

It's nasty that recv/send take "char*" instead of "void*"... will require stupid casts :-/

hi all,

latest git HEAD (rEFL371a3332efe86596531af90104b4fad45df87c2c) should fix all of the warnings and errors, If I missed something let me know.

Thank you :)
can't check how it works because of problems with "edje_external/elementary/elm_calendar" linking.
But ecore_con/efl_net compilation now passes without errors. There are some warnings left. If you are interested here is ecore_con-related part of my build log:

  CC       lib/ecore_con/lib_ecore_con_libecore_con_la-ecore_con.lo
lib/ecore_con/ecore_con.c: In function ‘_efl_network_server_efl_object_destructor’:
lib/ecore_con/ecore_con.c:1412:11: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
    if (svr->fd >= 0)
           ^
lib/ecore_con/ecore_con.c: In function ‘_efl_network_client_efl_object_destructor’:
lib/ecore_con/ecore_con.c:1475:10: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
    if (cl->fd >= 0)
          ^
lib/ecore_con/ecore_con.c: In function ‘_ecore_con_svr_tcp_handler’:
lib/ecore_con/ecore_con.c:2168:10: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
    if (cl->fd >= 0) close(cl->fd);
          ^
lib/ecore_con/ecore_con.c: In function ‘efl_net_socket4’:
lib/ecore_con/ecore_con.c:3422:19: warning: format ‘%d’ expects argument of type ‘int’, but argument 7 has type ‘SOCKET’ [-Wformat=]
                   ERR("fcntl(%d, F_SETFD, FD_CLOEXEC): %s", fd, strerror(errno));
                   ^
lib/ecore_con/ecore_con.c: In function ‘_efl_net_connect_async_run’:
lib/ecore_con/ecore_con.c:3608:4: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 7 has type ‘SOCKET’ [-Wformat=]
    DBG("connecting fd=" SOCKET_FMT " to %s", d->sockfd, buf);
    ^
lib/ecore_con/ecore_con.c:3621:9: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 7 has type ‘SOCKET’ [-Wformat=]
         DBG("connect(" SOCKET_FMT ", %s) failed: %s", fd, buf, eina_error_msg_get(d->error));
         ^
lib/ecore_con/ecore_con.c:3625:4: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 7 has type ‘SOCKET’ [-Wformat=]
    DBG("connected fd=" SOCKET_FMT " to %s", d->sockfd, buf);
    ^
lib/ecore_con/ecore_con.c: In function ‘_efl_net_connect_async_end’:
lib/ecore_con/ecore_con.c:3647:14: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 7 has type ‘SOCKET’ [-Wformat=]
              ERR("fcntl(" SOCKET_FMT ", F_GETFD): %s", d->sockfd, eina_error_msg_get(d->error));
              ^
lib/ecore_con/ecore_con.c:3657:19: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 7 has type ‘SOCKET’ [-Wformat=]
                   ERR("fcntl(" SOCKET_FMT ", F_SETFD, %#x): %s", d->sockfd, flags, eina_error_msg_get(d->error));
                   ^
lib/ecore_con/ecore_con.c: In function ‘_efl_net_ip_connect’:
lib/ecore_con/ecore_con.c:3785:16: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 7 has type ‘SOCKET’ [-Wformat=]
                DBG("connect fd=" SOCKET_FMT " to %s", fd, buf);
                ^
lib/ecore_con/ecore_con.c:3791:14: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 7 has type ‘SOCKET’ [-Wformat=]
              DBG("connected fd=" SOCKET_FMT " to %s", fd, buf);
              ^
lib/ecore_con/ecore_con.c:3797:14: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 7 has type ‘SOCKET’ [-Wformat=]
              DBG("couldn't connect fd=" SOCKET_FMT " to %s: %s", fd, buf, eina_error_msg_get(ret));
              ^
lib/ecore_con/ecore_con.c: In function ‘_efl_net_ip_connect_async_run_socks4_try’:
lib/ecore_con/ecore_con.c:3946:11: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 9 has type ‘SOCKET’ [-Wformat=]
           DBG("resolved address='%s' to %s. Connect using fd=" SOCKET_FMT " socks4://%s:%s", d->address, buf, fd, proxy_host, proxy_port);
           ^
lib/ecore_con/ecore_con.c:3956:11: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 8 has type ‘SOCKET’ [-Wformat=]
           DBG("couldn't request connection to host=%s fd=" SOCKET_FMT " socks4://%s:%s: %s", buf, fd, proxy_host, proxy_port, eina_error_msg_get(efl_net_socket_error_get()));
           ^
lib/ecore_con/ecore_con.c:3967:16: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 8 has type ‘SOCKET’ [-Wformat=]
                DBG("couldn't recv reply of connection to host=%s fd=" SOCKET_FMT " socks4://%s:%s: %s", buf, fd, proxy_host, proxy_port, eina_error_msg_get(efl_net_socket_error_get()));
                ^
lib/ecore_con/ecore_con.c:3974:16: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 8 has type ‘SOCKET’ [-Wformat=]
                DBG("rejected connection to host=%s fd=" SOCKET_FMT " socks4://%s:%s: reason=%#x", buf, fd, proxy_host, proxy_port, reply.status);
                ^
lib/ecore_con/ecore_con.c:3982:19: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 8 has type ‘SOCKET’ [-Wformat=]
                   DBG("connected to host=%s fd=" SOCKET_FMT " socks4://%s:%s", buf, fd, proxy_host, proxy_port);
                   ^
lib/ecore_con/ecore_con.c: In function ‘_efl_net_ip_connect_async_run_socks4a’:
lib/ecore_con/ecore_con.c:4128:4: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 7 has type ‘SOCKET’ [-Wformat=]
    DBG("connected fd=" SOCKET_FMT " to socks4a://%s", fd, proxy);
    ^
lib/ecore_con/ecore_con.c: In function ‘_efl_net_ip_connect_async_run_socks5_auth_user_pass’:
lib/ecore_con/ecore_con.c:4407:11: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 7 has type ‘SOCKET’ [-Wformat=]
           DBG("couldn't send user-password authentication to fd=" SOCKET_FMT " %s://%s:%s: %s", fd, proxy_protocol, proxy_host, proxy_port, eina_error_msg_get(efl_net_socket_error_get()));
           ^
lib/ecore_con/ecore_con.c:4419:16: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 7 has type ‘SOCKET’ [-Wformat=]
                DBG("couldn't recv user-password authentication reply from fd=" SOCKET_FMT " %s://%s:%s: %s", fd, proxy_protocol, proxy_host, proxy_port, eina_error_msg_get(efl_net_socket_error_get()));
                ^
lib/ecore_con/ecore_con.c:4429:17: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 8 has type ‘SOCKET’ [-Wformat=]
                 DBG("successfully authenticated user=%s with proxy fd=" SOCKET_FMT " %s://%s:%s", user, fd, proxy_protocol, proxy_host, proxy_port);
                 ^
lib/ecore_con/ecore_con.c: In function ‘_efl_net_ip_connect_async_run_socks5_try’:
lib/ecore_con/ecore_con.c:4468:11: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 9 has type ‘SOCKET’ [-Wformat=]
           DBG("resolved address='%s' to %s. Connect using fd=" SOCKET_FMT " socks5://%s:%s", d->address, buf, fd, proxy_host, proxy_port);
           ^
lib/ecore_con/ecore_con.c:4475:11: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 8 has type ‘SOCKET’ [-Wformat=]
           DBG("couldn't request connection to host=%s fd=" SOCKET_FMT " socks5://%s:%s: %s", buf, fd, proxy_host, proxy_port, eina_error_msg_get(efl_net_socket_error_get()));
           ^
lib/ecore_con/ecore_con.c:4486:16: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 8 has type ‘SOCKET’ [-Wformat=]
                DBG("couldn't recv greeting reply of connection to host=%s fd=" SOCKET_FMT " socks5://%s:%s: %s", buf, fd, proxy_host, proxy_port, eina_error_msg_get(efl_net_socket_error_get()));
                ^
lib/ecore_con/ecore_con.c:4493:16: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 9 has type ‘SOCKET’ [-Wformat=]
                DBG("proxy server rejected authentication %#x trying connection to host=%s fd=" SOCKET_FMT " socks5://%s:%s", greeting.auths[0], buf, fd, proxy_host, proxy_port);
                ^
lib/ecore_con/ecore_con.c:4515:36: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 8 has type ‘SOCKET’ [-Wformat=]
                                    DBG("couldn't request connection to host=%s fd=" SOCKET_FMT " socks5://%s:%s: %s", buf, fd, proxy_host, proxy_port, eina_error_msg_get(efl_net_socket_error_get()));
                                    ^
lib/ecore_con/ecore_con.c:4526:41: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 8 has type ‘SOCKET’ [-Wformat=]
                                         DBG("couldn't recv reply of connection to host=%s fd=" SOCKET_FMT " socks5://%s:%s: %s", buf, fd, proxy_host, proxy_port, eina_error_msg_get(efl_net_socket_error_get()));
                                         ^
lib/ecore_con/ecore_con.c:4533:41: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 8 has type ‘SOCKET’ [-Wformat=]
                                         DBG("rejected IPv4 connection to host=%s fd=" SOCKET_FMT " socks5://%s:%s: reason=%#x", buf, fd, proxy_host, proxy_port, reply.base.status);
                                         ^
lib/ecore_con/ecore_con.c:4541:44: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 8 has type ‘SOCKET’ [-Wformat=]
                                            DBG("connected IPv4 to host=%s fd=" SOCKET_FMT " socks5://%s:%s", buf, fd, proxy_host, proxy_port);
                                            ^
lib/ecore_con/ecore_con.c:4552:41: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 8 has type ‘SOCKET’ [-Wformat=]
                                         DBG("couldn't recv reply of connection to host=%s fd=" SOCKET_FMT " socks5://%s:%s: %s", buf, fd, proxy_host, proxy_port, eina_error_msg_get(efl_net_socket_error_get()));
                                         ^
lib/ecore_con/ecore_con.c:4559:41: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 8 has type ‘SOCKET’ [-Wformat=]
                                         DBG("rejected IPv6 connection to host=%s fd=" SOCKET_FMT " socks5://%s:%s: reason=%#x", buf, fd, proxy_host, proxy_port, reply.base.status);
                                         ^
lib/ecore_con/ecore_con.c:4567:44: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 8 has type ‘SOCKET’ [-Wformat=]
                                            DBG("connected IPv6 to host=%s fd=" SOCKET_FMT " socks5://%s:%s", buf, fd, proxy_host, proxy_port);
                                            ^
lib/ecore_con/ecore_con.c: In function ‘_efl_net_ip_connect_async_run_socks5h’:
lib/ecore_con/ecore_con.c:4697:4: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 7 has type ‘SOCKET’ [-Wformat=]
    DBG("connected fd=" SOCKET_FMT " to socks5h://%s", fd, proxy);
    ^
lib/ecore_con/ecore_con.c:4704:11: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 9 has type ‘SOCKET’ [-Wformat=]
           DBG("couldn't request connection to host=%s:%s fd=" SOCKET_FMT " socks5h://%s:%s: %s", host, port, fd, proxy_host, proxy_port, eina_error_msg_get(efl_net_socket_error_get()));
           ^
lib/ecore_con/ecore_con.c:4715:16: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 9 has type ‘SOCKET’ [-Wformat=]
                DBG("couldn't recv greeting reply of connection to host=%s:%s fd=" SOCKET_FMT " socks5h://%s:%s: %s", host, port, fd, proxy_host, proxy_port, eina_error_msg_get(efl_net_socket_error_get()));
                ^
lib/ecore_con/ecore_con.c:4722:16: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 10 has type ‘SOCKET’ [-Wformat=]
                DBG("proxy server rejected authentication %#x trying connection to host=%s:%s fd=" SOCKET_FMT " socks5h://%s:%s", greeting.auths[0], host, port, fd, proxy_host, proxy_port);
                ^
lib/ecore_con/ecore_con.c:4780:46: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 9 has type ‘SOCKET’ [-Wformat=]
                                              DBG("couldn't request connection to host=%s:%s fd=" SOCKET_FMT " socks5h://%s:%s: %s", host, port, fd, proxy_host, proxy_port, eina_error_msg_get(efl_net_socket_error_get()));
                                              ^
lib/ecore_con/ecore_con.c:4792:51: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 9 has type ‘SOCKET’ [-Wformat=]
                                                   DBG("couldn't recv reply of connection to host=%s:%s fd=" SOCKET_FMT " socks5h://%s:%s: %s", host, port, fd, proxy_host, proxy_port, eina_error_msg_get(efl_net_socket_error_get()));
                                                   ^
lib/ecore_con/ecore_con.c:4799:51: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 9 has type ‘SOCKET’ [-Wformat=]
                                                   DBG("rejected connection to host=%s:%s fd=" SOCKET_FMT " socks5h://%s:%s: reason=%#x", host, port, fd, proxy_host, proxy_port, reply.status);
                                                   ^
lib/ecore_con/ecore_con.c:4808:61: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 9 has type ‘SOCKET’ [-Wformat=]
                                                             DBG("couldn't recv ipv4 of connection to host=%s:%s fd=" SOCKET_FMT " socks5h://%s:%s: %s", host, port, fd, proxy_host, proxy_port, eina_error_msg_get(efl_net_socket_error_get()));
                                                             ^
lib/ecore_con/ecore_con.c:4820:59: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 9 has type ‘SOCKET’ [-Wformat=]
                                                           DBG("connected IPv4 to host=%s:%s fd=" SOCKET_FMT " socks5h://%s:%s", host, port, fd, proxy_host, proxy_port);
                                                           ^
lib/ecore_con/ecore_con.c:4831:61: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 9 has type ‘SOCKET’ [-Wformat=]
                                                             DBG("couldn't recv ipv6 of connection to host=%s:%s fd=" SOCKET_FMT " socks5h://%s:%s: %s", host, port, fd, proxy_host, proxy_port, eina_error_msg_get(efl_net_socket_error_get()));
                                                             ^
lib/ecore_con/ecore_con.c:4843:59: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 9 has type ‘SOCKET’ [-Wformat=]
                                                           DBG("connected IPv6 to host=%s:%s fd=" SOCKET_FMT " socks5h://%s:%s", host, port, fd, proxy_host, proxy_port);
                                                           ^
lib/ecore_con/ecore_con.c:4849:54: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 9 has type ‘SOCKET’ [-Wformat=]
                                                      DBG("couldn't resolve host %s:%s fd=" SOCKET_FMT " socks5h://%s:%s",  host, port, fd, proxy_host, proxy_port);
                                                      ^
lib/ecore_con/ecore_con.c: In function ‘_efl_net_ip_connect_async_end’:
lib/ecore_con/ecore_con.c:5051:14: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 7 has type ‘SOCKET’ [-Wformat=]
              ERR("fcntl(" SOCKET_FMT ", F_GETFD): %s", d->sockfd, strerror(errno));
              ^
lib/ecore_con/ecore_con.c:5061:19: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 7 has type ‘SOCKET’ [-Wformat=]
                   ERR("fcntl(" SOCKET_FMT ", F_SETFD, %#x): %s", d->sockfd, flags, strerror(errno));
                   ^
lib/ecore_con/ecore_con.c: In function ‘_ecore_con_svr_udp_handler’:
lib/ecore_con/ecore_con.c:2401:31: warning: ‘num’ may be used uninitialized in this function [-Wmaybe-uninitialized]
    ecore_con_event_client_data(obj, buf, num, EINA_TRUE);
                               ^
  CC       lib/ecore_con/lib_ecore_con_libecore_con_la-ecore_con_eet.lo
  CC       lib/ecore_con/lib_ecore_con_libecore_con_la-ecore_con_socks.lo
lib/ecore_con/ecore_con_socks.c: In function ‘_ecore_con_socks_read_v4’:
lib/ecore_con/ecore_con_socks.c:270:9: warning: pointer targets in passing argument 2 of ‘evil_inet_ntop’ differ in signedness [-Wpointer-sign]
         if (!inet_ntop(AF_INET, &data[4], naddr, sizeof(naddr))) goto error;
         ^
In file included from ../src/lib/evil/Evil.h:113:0,
                 from lib/ecore_con/ecore_con_socks.c:42:
../src/lib/evil/evil_inet.h:130:18: note: expected ‘const char *’ but argument is of type ‘const unsigned char *’
 EAPI const char *evil_inet_ntop(int af, const char *src, void *dst, size_t size);
                  ^
  CC       lib/ecore_con/lib_ecore_con_libecore_con_la-ecore_con_ssl.lo
  CC       lib/ecore_con/lib_ecore_con_libecore_con_la-ecore_con_url.lo
  CC       lib/ecore_con/lib_ecore_con_libecore_con_la-ecore_con_url_curl.lo
  CC       static_libs/http-parser/lib_ecore_con_libecore_con_la-http_parser.lo
  CC       lib/ecore_con/lib_ecore_con_libecore_con_la-ecore_con_info.lo
  CC       lib/ecore_con/lib_ecore_con_libecore_con_la-efl_net_socket.lo
  CC       lib/ecore_con/lib_ecore_con_libecore_con_la-efl_net_socket_fd.lo
lib/ecore_con/efl_net_socket_fd.c: In function ‘_efl_net_socket_fd_efl_loop_fd_fd_set’:
lib/ecore_con/efl_net_socket_fd.c:139:11: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 7 has type ‘SOCKET’ [-Wformat=]
           ERR("getsockname(" SOCKET_FMT "): %s", fd, eina_error_msg_get(efl_net_socket_error_get()));
           ^
  CC       lib/ecore_con/lib_ecore_con_libecore_con_la-efl_net_socket_tcp.lo
lib/ecore_con/efl_net_socket_tcp.c: In function ‘_efl_net_socket_tcp_efl_loop_fd_fd_set’:
lib/ecore_con/efl_net_socket_tcp.c:68:11: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 7 has type ‘SOCKET’ [-Wformat=]
           ERR("getsockname(" SOCKET_FMT "): %s", fd, eina_error_msg_get(efl_net_socket_error_get()));
           ^
lib/ecore_con/efl_net_socket_tcp.c:78:11: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 7 has type ‘SOCKET’ [-Wformat=]
           ERR("getpeername(" SOCKET_FMT "): %s", fd, eina_error_msg_get(efl_net_socket_error_get()));
           ^
lib/ecore_con/efl_net_socket_tcp.c: In function ‘_efl_net_socket_tcp_keep_alive_set’:
lib/ecore_con/efl_net_socket_tcp.c:107:9: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 7 has type ‘SOCKET’ [-Wformat=]
         ERR("setsockopt(" SOCKET_FMT ", SOL_SOCKET, SO_KEEPALIVE, %d): %s",
         ^
lib/ecore_con/efl_net_socket_tcp.c:107:9: warning: format ‘%d’ expects argument of type ‘int’, but argument 8 has type ‘DWORD’ [-Wformat=]
lib/ecore_con/efl_net_socket_tcp.c: In function ‘_efl_net_socket_tcp_keep_alive_get’:
lib/ecore_con/efl_net_socket_tcp.c:137:9: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 7 has type ‘SOCKET’ [-Wformat=]
         ERR("getsockopt(" SOCKET_FMT ", SOL_SOCKET, SO_KEEPALIVE): %s",
         ^
lib/ecore_con/efl_net_socket_tcp.c: In function ‘_efl_net_socket_tcp_no_delay_set’:
lib/ecore_con/efl_net_socket_tcp.c:165:9: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 7 has type ‘SOCKET’ [-Wformat=]
         ERR("setsockopt(" SOCKET_FMT ", IPPROTO_TCP, TCP_NODELAY, %d): %s",
         ^
lib/ecore_con/efl_net_socket_tcp.c: In function ‘_efl_net_socket_tcp_no_delay_get’:
lib/ecore_con/efl_net_socket_tcp.c:195:9: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 7 has type ‘SOCKET’ [-Wformat=]
         ERR("getsockopt(" SOCKET_FMT ", IPPROTO_TCP, TCP_NODELAY): %s",
         ^
lib/ecore_con/efl_net_socket_tcp.c: In function ‘_efl_net_socket_tcp_cork_set’:
lib/ecore_con/efl_net_socket_tcp.c:239:9: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 7 has type ‘SOCKET’ [-Wformat=]
         ERR("setsockopt(" SOCKET_FMT ", IPPROTO_TCP, 0x%x, %d): %s",
         ^
lib/ecore_con/efl_net_socket_tcp.c: In function ‘_efl_net_socket_tcp_cork_get’:
lib/ecore_con/efl_net_socket_tcp.c:272:9: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 7 has type ‘SOCKET’ [-Wformat=]
         ERR("getsockopt(" SOCKET_FMT ", IPPROTO_TCP, 0x%x): %s",
         ^
  CC       lib/ecore_con/lib_ecore_con_libecore_con_la-efl_net_socket_udp.lo
lib/ecore_con/efl_net_socket_udp.c: In function ‘_efl_net_socket_udp_efl_loop_fd_fd_set’:
lib/ecore_con/efl_net_socket_udp.c:201:6: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 7 has type ‘SOCKET’ [-Wformat=]
      ERR("getsockname(" SOCKET_FMT "): %s", fd, eina_error_msg_get(efl_net_socket_error_get()));
      ^
lib/ecore_con/efl_net_socket_udp.c: In function ‘_efl_net_socket_udp_cork_set’:
lib/ecore_con/efl_net_socket_udp.c:251:9: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 7 has type ‘SOCKET’ [-Wformat=]
         ERR("setsockopt(" SOCKET_FMT ", IPPROTO_UDP, 0x%x, %d): %s",
         ^
lib/ecore_con/efl_net_socket_udp.c: In function ‘_efl_net_socket_udp_cork_get’:
lib/ecore_con/efl_net_socket_udp.c:284:9: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 7 has type ‘SOCKET’ [-Wformat=]
         ERR("getsockopt(" SOCKET_FMT ", IPPROTO_UDP, 0x%x): %s",
         ^
lib/ecore_con/efl_net_socket_udp.c: In function ‘_efl_net_socket_udp_dont_route_set’:
lib/ecore_con/efl_net_socket_udp.c:311:9: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 7 has type ‘SOCKET’ [-Wformat=]
         ERR("setsockopt(" SOCKET_FMT ", SOL_SOCKET, SO_DONTROUTE, %u): %s", fd, dont_route, eina_error_msg_get(err));
         ^
lib/ecore_con/efl_net_socket_udp.c: In function ‘_efl_net_socket_udp_dont_route_get’:
lib/ecore_con/efl_net_socket_udp.c:339:9: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 7 has type ‘SOCKET’ [-Wformat=]
         ERR("getsockopt(" SOCKET_FMT ", SOL_SOCKET, SO_DONTROUTE): %s", fd, eina_error_msg_get(err));
         ^
lib/ecore_con/efl_net_socket_udp.c: In function ‘_efl_net_socket_udp_reuse_address_set’:
lib/ecore_con/efl_net_socket_udp.c:363:9: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 7 has type ‘SOCKET’ [-Wformat=]
         ERR("setsockopt(" SOCKET_FMT ", SOL_SOCKET, SO_REUSEADDR, %d): %s",
         ^
lib/ecore_con/efl_net_socket_udp.c: In function ‘_efl_net_socket_udp_reuse_address_get’:
lib/ecore_con/efl_net_socket_udp.c:388:9: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 7 has type ‘SOCKET’ [-Wformat=]
         ERR("getsockopt(" SOCKET_FMT ", SOL_SOCKET, SO_REUSEADDR): %s",
         ^
lib/ecore_con/efl_net_socket_udp.c: In function ‘_efl_net_socket_udp_reuse_port_set’:
lib/ecore_con/efl_net_socket_udp.c:398:40: warning: unused parameter ‘o’ [-Wunused-parameter]
 _efl_net_socket_udp_reuse_port_set(Eo *o, Efl_Net_Socket_Udp_Data *pd, Eina_Bool reuse_port)
                                        ^
lib/ecore_con/efl_net_socket_udp.c: In function ‘_efl_net_socket_udp_reuse_port_get’:
lib/ecore_con/efl_net_socket_udp.c:426:40: warning: unused parameter ‘o’ [-Wunused-parameter]
 _efl_net_socket_udp_reuse_port_get(Eo *o, Efl_Net_Socket_Udp_Data *pd)
                                        ^
  CC       lib/ecore_con/lib_ecore_con_libecore_con_la-efl_net_dialer.lo
  CC       lib/ecore_con/lib_ecore_con_libecore_con_la-efl_net_dialer_tcp.lo
  CC       lib/ecore_con/lib_ecore_con_libecore_con_la-efl_net_dialer_udp.lo
lib/ecore_con/efl_net_dialer_udp.c: In function ‘_efl_net_dialer_udp_resolved_bind’:
lib/ecore_con/efl_net_dialer_udp.c:135:16: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 7 has type ‘SOCKET’ [-Wformat=]
                DBG("enabled SO_BROADCAST for socket=" SOCKET_FMT, fd);
                ^
lib/ecore_con/efl_net_dialer_udp.c:137:16: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 7 has type ‘SOCKET’ [-Wformat=]
                WRN("could not enable SO_BROADCAST for socket=" SOCKET_FMT ": %s", fd, eina_error_msg_get(efl_net_socket_error_get()));
                ^
lib/ecore_con/efl_net_dialer_udp.c:151:19: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 8 has type ‘SOCKET’ [-Wformat=]
                   DBG("joined multicast group %s socket=" SOCKET_FMT, buf, fd);
                   ^
lib/ecore_con/efl_net_dialer_udp.c:157:19: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 8 has type ‘SOCKET’ [-Wformat=]
                   ERR("could not join multicast group %s socket=" SOCKET_FMT ": %s", buf, fd, eina_error_msg_get(err));
                   ^
  CC       lib/ecore_con/lib_ecore_con_libecore_con_la-efl_net_dialer_http.lo
lib/ecore_con/efl_net_dialer_http.c: In function ‘_efl_net_dialer_http_curlm_event_fd’:
lib/ecore_con/efl_net_dialer_http.c:497:6: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 8 has type ‘SOCKET’ [-Wformat=]
      ERR("socket action %#x fd=" SOCKET_FMT " failed: %s", flags, fd, curl_multi_strerror(r));
      ^
lib/ecore_con/efl_net_dialer_http.c: In function ‘_efl_net_dialer_http_curlm_socket_manage’:
lib/ecore_con/efl_net_dialer_http.c:543:4: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 9 has type ‘curl_socket_t’ [-Wformat=]
    DBG("dialer=%p fdhandler=%p, fd=" SOCKET_FMT ", curl_easy=%p, flags=%#x",
    ^
lib/ecore_con/efl_net_dialer_http.c: In function ‘_efl_net_dialer_http_socket_open’:
lib/ecore_con/efl_net_dialer_http.c:1116:6: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 10 has type ‘SOCKET’ [-Wformat=]
      DBG("socket(%d, %d, %d) = " SOCKET_FMT,
      ^
lib/ecore_con/efl_net_dialer_http.c: In function ‘_efl_net_dialer_http_efl_io_writer_write’:
lib/ecore_con/efl_net_dialer_http.c:1644:9: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 8 has type ‘SOCKET’ [-Wformat=]
         ERR("dialer=%p could not trigger socket=" SOCKET_FMT " (fdhandler=%p) action: %s",
         ^
  CC       lib/ecore_con/lib_ecore_con_libecore_con_la-efl_net_dialer_websocket.lo
  CC       lib/ecore_con/lib_ecore_con_libecore_con_la-efl_net_server.lo
  CC       lib/ecore_con/lib_ecore_con_libecore_con_la-efl_net_server_fd.lo
lib/ecore_con/efl_net_server_fd.c: In function ‘efl_net_accept4’:
lib/ecore_con/efl_net_server_fd.c:56:14: warning: format ‘%d’ expects argument of type ‘int’, but argument 7 has type ‘SOCKET’ [-Wformat=]
              ERR("fcntl(%d, F_SETFD, FD_CLOEXEC): %s", client, strerror(errno));
              ^
lib/ecore_con/efl_net_server_fd.c: In function ‘_efl_net_server_fd_close_on_exec_set’:
lib/ecore_con/efl_net_server_fd.c:275:9: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 7 has type ‘SOCKET’ [-Wformat=]
         ERR("fcntl(" SOCKET_FMT ", F_GETFD): %s", fd, strerror(errno));
         ^
lib/ecore_con/efl_net_server_fd.c:285:9: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 7 has type ‘SOCKET’ [-Wformat=]
         ERR("fcntl(" SOCKET_FMT ", F_SETFD, %#x): %s", fd, flags, strerror(errno));
         ^
lib/ecore_con/efl_net_server_fd.c: In function ‘_efl_net_server_fd_close_on_exec_get’:
lib/ecore_con/efl_net_server_fd.c:310:9: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 7 has type ‘SOCKET’ [-Wformat=]
         ERR("fcntl(" SOCKET_FMT ", F_GETFD): %s", fd, strerror(errno));
         ^
lib/ecore_con/efl_net_server_fd.c: In function ‘_efl_net_server_fd_reuse_address_set’:
lib/ecore_con/efl_net_server_fd.c:334:9: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 7 has type ‘SOCKET’ [-Wformat=]
         ERR("setsockopt(" SOCKET_FMT ", SOL_SOCKET, SO_REUSEADDR, %d): %s",
         ^
lib/ecore_con/efl_net_server_fd.c: In function ‘_efl_net_server_fd_reuse_address_get’:
lib/ecore_con/efl_net_server_fd.c:359:9: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 7 has type ‘SOCKET’ [-Wformat=]
         ERR("getsockopt(" SOCKET_FMT ", SOL_SOCKET, SO_REUSEADDR): %s",
         ^
lib/ecore_con/efl_net_server_fd.c: In function ‘_efl_net_server_fd_reuse_port_set’:
lib/ecore_con/efl_net_server_fd.c:369:39: warning: unused parameter ‘o’ [-Wunused-parameter]
 _efl_net_server_fd_reuse_port_set(Eo *o, Efl_Net_Server_Fd_Data *pd, Eina_Bool reuse_port)
                                       ^
lib/ecore_con/efl_net_server_fd.c: In function ‘_efl_net_server_fd_reuse_port_get’:
lib/ecore_con/efl_net_server_fd.c:397:39: warning: unused parameter ‘o’ [-Wunused-parameter]
 _efl_net_server_fd_reuse_port_get(Eo *o, Efl_Net_Server_Fd_Data *pd)
                                       ^
lib/ecore_con/efl_net_server_fd.c: In function ‘_efl_net_server_fd_process_incoming_data’:
lib/ecore_con/efl_net_server_fd.c:462:9: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 7 has type ‘SOCKET’ [-Wformat=]
         ERR("accept(" SOCKET_FMT "): %s", fd, eina_error_msg_get(err));
         ^
  CC       lib/ecore_con/lib_ecore_con_libecore_con_la-efl_net_server_tcp.lo
lib/ecore_con/efl_net_server_tcp.c: In function ‘_efl_net_server_tcp_resolved_bind’:
lib/ecore_con/efl_net_server_tcp.c:94:9: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 7 has type ‘SOCKET’ [-Wformat=]
         DBG("bind(" SOCKET_FMT ", %s): %s", fd, buf, eina_error_msg_get(err));
         ^
lib/ecore_con/efl_net_server_tcp.c:102:9: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 7 has type ‘SOCKET’ [-Wformat=]
         DBG("listen(" SOCKET_FMT "): %s", fd, eina_error_msg_get(err));
         ^
lib/ecore_con/efl_net_server_tcp.c:109:9: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 7 has type ‘SOCKET’ [-Wformat=]
         ERR("getsockname(" SOCKET_FMT "): %s", fd, eina_error_msg_get(err));
         ^
lib/ecore_con/efl_net_server_tcp.c:115:4: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 7 has type ‘SOCKET’ [-Wformat=]
    DBG("fd=" SOCKET_FMT " serving at %s", fd, buf);
    ^
lib/ecore_con/efl_net_server_tcp.c: In function ‘_efl_net_server_tcp_efl_net_server_fd_client_add’:
lib/ecore_con/efl_net_server_tcp.c:273:9: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 7 has type ‘long long unsigned int’ [-Wformat=]
         ERR("could not create client object fd=" SOCKET_FMT, (SOCKET)client_fd);
         ^
lib/ecore_con/efl_net_server_tcp.c: In function ‘_efl_net_server_tcp_efl_net_server_fd_client_reject’:
lib/ecore_con/efl_net_server_tcp.c:298:6: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 7 has type ‘long long unsigned int’ [-Wformat=]
      ERR("getpeername(" SOCKET_FMT "): %s", (SOCKET)client_fd, eina_error_msg_get(efl_net_socket_error_get()));
      ^
lib/ecore_con/efl_net_server_tcp.c: In function ‘_efl_net_server_tcp_ipv6_only_set’:
lib/ecore_con/efl_net_server_tcp.c:327:9: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 7 has type ‘SOCKET’ [-Wformat=]
         ERR("could not set socket=" SOCKET_FMT " IPV6_V6ONLY=%d: %s", fd, value, eina_error_msg_get(efl_net_socket_error_get()));
         ^
lib/ecore_con/efl_net_server_tcp.c:327:9: warning: format ‘%d’ expects argument of type ‘int’, but argument 8 has type ‘DWORD’ [-Wformat=]
lib/ecore_con/efl_net_server_tcp.c: In function ‘_efl_net_server_tcp_ipv6_only_get’:
lib/ecore_con/efl_net_server_tcp.c:352:9: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 7 has type ‘SOCKET’ [-Wformat=]
         WRN("getsockopt(" SOCKET_FMT ", IPPROTO_IPV6, IPV6_V6ONLY): %s", fd, eina_error_msg_get(efl_net_socket_error_get()));
         ^
  CC       lib/ecore_con/lib_ecore_con_libecore_con_la-efl_net_server_udp.lo
lib/ecore_con/efl_net_server_udp.c: In function ‘_efl_net_server_udp_resolved_bind’:
lib/ecore_con/efl_net_server_udp.c:127:9: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 7 has type ‘SOCKET’ [-Wformat=]
         DBG("bind(" SOCKET_FMT ", %s): %s", fd, buf, eina_error_msg_get(err));
         ^
lib/ecore_con/efl_net_server_udp.c:134:9: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 7 has type ‘SOCKET’ [-Wformat=]
         ERR("getsockname(" SOCKET_FMT "): %s", fd, eina_error_msg_get(err));
         ^
lib/ecore_con/efl_net_server_udp.c:140:4: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 7 has type ‘SOCKET’ [-Wformat=]
    DBG("fd=" SOCKET_FMT " serving at %s", fd, buf);
    ^
lib/ecore_con/efl_net_server_udp.c: In function ‘_efl_net_server_udp_efl_net_server_fd_process_incoming_data’:
lib/ecore_con/efl_net_server_udp.c:325:9: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 7 has type ‘SOCKET’ [-Wformat=]
         ERR("recvfrom(" SOCKET_FMT ", %p, %zu, 0, %p, %d): %s", fd, buf, buflen, &addr, addrlen, eina_error_msg_get(err));
         ^
lib/ecore_con/efl_net_server_udp.c: In function ‘_efl_net_server_udp_ipv6_only_set’:
lib/ecore_con/efl_net_server_udp.c:418:9: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 7 has type ‘SOCKET’ [-Wformat=]
         ERR("could not set socket=" SOCKET_FMT " IPV6_V6ONLY=%d: %s", fd, value, eina_error_msg_get(efl_net_socket_error_get()));
         ^
lib/ecore_con/efl_net_server_udp.c:418:9: warning: format ‘%d’ expects argument of type ‘int’, but argument 8 has type ‘DWORD’ [-Wformat=]
lib/ecore_con/efl_net_server_udp.c: In function ‘_efl_net_server_udp_ipv6_only_get’:
lib/ecore_con/efl_net_server_udp.c:443:9: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 7 has type ‘SOCKET’ [-Wformat=]
         WRN("getsockopt(" SOCKET_FMT ", IPPROTO_IPV6, IPV6_V6ONLY): %s", fd, eina_error_msg_get(efl_net_socket_error_get()));
         ^
lib/ecore_con/efl_net_server_udp.c: In function ‘_efl_net_server_udp_dont_route_set’:
lib/ecore_con/efl_net_server_udp.c:471:9: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 7 has type ‘SOCKET’ [-Wformat=]
         ERR("setsockopt(" SOCKET_FMT ", SOL_SOCKET, SO_DONTROUTE, %u): %s", fd, dont_route, eina_error_msg_get(err));
         ^
lib/ecore_con/efl_net_server_udp.c: In function ‘_efl_net_server_udp_dont_route_get’:
lib/ecore_con/efl_net_server_udp.c:499:9: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 7 has type ‘SOCKET’ [-Wformat=]
         ERR("getsockopt(" SOCKET_FMT ", SOL_SOCKET, SO_DONTROUTE): %s", fd, eina_error_msg_get(err));
         ^
  CC       lib/ecore_con/lib_ecore_con_libecore_con_la-efl_net_server_udp_client.lo
  CC       lib/ecore_con/lib_ecore_con_libecore_con_la-efl_net_socket_ssl.lo
  CC       lib/ecore_con/lib_ecore_con_libecore_con_la-efl_net_ssl_context.lo
  CC       lib/ecore_con/lib_ecore_con_libecore_con_la-efl_net_dialer_ssl.lo
  CC       lib/ecore_con/lib_ecore_con_libecore_con_la-efl_net_server_ssl.lo
  CC       lib/ecore_con/lib_ecore_con_libecore_con_la-efl_net-connman.lo
  CC       lib/ecore_con/lib_ecore_con_libecore_con_la-efl_net_control_access_point-connman.lo
  CC       lib/ecore_con/lib_ecore_con_libecore_con_la-efl_net_control_technology-connman.lo
  CC       lib/ecore_con/lib_ecore_con_libecore_con_la-efl_net_control-connman.lo
  CC       lib/ecore_con/lib_ecore_con_libecore_con_la-efl_net_session-connman.lo
  CC       lib/ecore_con/lib_ecore_con_libecore_con_la-ecore_con_local_win32.lo
lib/ecore_con/ecore_con_local_win32.c: In function ‘ecore_con_local_connect’:
lib/ecore_con/ecore_con_local_win32.c:541:2: warning: #warning "I am pretty sure cb_done should be used." [-Wcpp]
 #warning "I am pretty sure cb_done should be used."
  ^
lib/ecore_con/ecore_con_local_win32.c:538:37: warning: unused parameter ‘cb_done’ [-Wunused-parameter]
                         Eina_Bool (*cb_done)(void *data,
                                     ^

it fails if gnutls is used

@an.kroitor weird, AFAIU SOCKET is typedef to u_int which is typedef to unsigned int.. why SOCKET_FMT as "%u" is causing the warning:

lib/ecore_con/ecore_con.c: In function ‘_efl_net_connect_async_run’:
lib/ecore_con/ecore_con.c:3608:4: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 7 has type ‘SOCKET’ [-Wformat=]
    DBG("connecting fd=" SOCKET_FMT " to %s", d->sockfd, buf);
    ^

Could you check what's the actual expansion of SOCKET? Maybe it's unsigned long? You can try to check if that would work changing ecore_con_private.h:402 where #define SOCKET_FMT "%u" to "%lu"

i don't know what you did but on Windows SOCKET is of the same size than a pointer

In D4357#74099, @vtorri wrote:

i don't know what you did but on Windows SOCKET is of the same size than a pointer

I did nothing on Windows other than #define SOCKET_FMT "%u" as I understood typedef u_int SOCKET and typedef unsigned int u_int (http://research.microsoft.com/en-us/um/redmond/projects/invisible/include/winsock.h.htm) means that's the correct format for that type.

I use that macro (SOCKET_FMT) so on UNIX I use %d, while using something else on Windows.

See https://phab.enlightenment.org/diffusion/EFL/browse/master/src/lib/ecore_con/ecore_con_private.h

In D4357#74097, @vtorri wrote:

it fails if gnutls is used

log plz?

In D4357#74099, @vtorri wrote:

i don't know what you did but on Windows SOCKET is of the same size than a pointer

I did nothing on Windows other than #define SOCKET_FMT "%u" as I understood typedef u_int SOCKET and typedef unsigned int u_int (http://research.microsoft.com/en-us/um/redmond/projects/invisible/include/winsock.h.htm) means that's the correct format for that type.

no... you have found the type of SOCKET for the version 1.1 of winsock, while we are using the version 2...

In D4357#74097, @vtorri wrote:

it fails if gnutls is used

log plz?

E:\Documents\MSYS2\home\vtorri\gitroot\efl\src/lib/ecore_con/efl_net_ssl_ctx-gnutls.c:134: undefined reference to `gnutls_certificate_set_x509_trust_dir'

@an.kroitor pushed a commit with %lu, try GIT master to see if that fixes the warnings.

@vtorri http://man7.org/linux/man-pages/man3/gnutls_certificate_set_x509_trust_dir.3.html says it exists since 3.3.6 which was released on 2014-07-23, kinda of dated, no?

@vtorri http://man7.org/linux/man-pages/man3/gnutls_certificate_set_x509_trust_dir.3.html says it exists since 3.3.6 which was released on 2014-07-23, kinda of dated, no?

win-builds 1.5 installs version 3.2.21

your SOCKET_FMT is wrong and you should use _WIN64

In D4357#74113, @vtorri wrote:

your SOCKET_FMT is wrong and you should use _WIN64

Is SOCKET typedef dependent on _WIN32 or _WIN64? Or it's always long unsigned and that type depends on _WIN32 and _WIN64 for its actual size?

In D4357#74113, @vtorri wrote:

your SOCKET_FMT is wrong and you should use _WIN64

Is SOCKET typedef dependent on _WIN32 or _WIN64? Or it's always long unsigned and that type depends on _WIN32 and _WIN64 for its actual size?

i said its size is the size of a pointer (it's a uintptr_t). long is 32 bits long on windows so your FMT is not correct. you should have done something like :

#ifdef _WIN64

define FMT "%u"

#elif defined _WIN32

define FMT "%llu"

#else...

stupid markup

barbieri added a comment.EditedNov 18 2016, 12:55 PM

@an.kroitor if current GIT prints warning about SOCKET_FMT, could you try to add what @vtorri said:

ecore_con_private.h
// around line 402 of ecore_con_private.h
#ifdef _WIN64
#define SOCKET_FMT "%llu"
#elif defined _WIN32
#define SOCKET_FMT "%u"
#endif

(last edit should be right, first was reversed)

oups i did a small mistake ; switch %u and %llu, %llu is for win64

This comment was removed by vtorri.

in configure.ac :

efl_net_control_backend=none

the variable should be uppercase

  CC       lib/ecore_con/lib_ecore_con_libecore_con_la-efl_net_server_tcp.lo
lib/ecore_con/efl_net_server_tcp.c: In function '_efl_net_server_tcp_ipv6_only_set':
lib/ecore_con/efl_net_server_tcp.c:327:9: warning: format '%d' expects argument of type 'int', but argument 8 has type 'DWORD' [-Wformat=]
         ERR("could not set socket=" SOCKET_FMT " IPV6_V6ONLY=%d: %s", fd, value, eina_error_msg_get(efl_net_socket_error_get()));
         ^
  CC       lib/ecore_con/lib_ecore_con_libecore_con_la-efl_net_server_udp.lo
lib/ecore_con/efl_net_server_udp.c: In function '_efl_net_server_udp_ipv6_only_set':
lib/ecore_con/efl_net_server_udp.c:418:9: warning: format '%d' expects argument of type 'int', but argument 8 has type 'DWORD' [-Wformat=]
         ERR("could not set socket=" SOCKET_FMT " IPV6_V6ONLY=%d: %s", fd, value, eina_error_msg_get(efl_net_socket_error_get()));
         ^

and

lib/ecore_con/efl_net_socket_tcp.c: In function '_efl_net_socket_tcp_keep_alive_set':
lib/ecore_con/efl_net_socket_tcp.c:107:9: warning: format '%d' expects argument of type 'int', but argument 8 has type 'DWORD' [-Wformat=]
         ERR("setsockopt(" SOCKET_FMT ", SOL_SOCKET, SO_KEEPALIVE, %d): %s",
         ^

cast value to (int).

Also, no more warnings for compilation on 32 bits (not tested 64 bits yet) with :

#ifdef _WIN64
# define SOCKET_FMT "%llu"
#elif defined _WIN32
# define SOCKET_FMT "%u"
#else
# define closesocket(fd) close(fd)
# define SOCKET int
# define SOCKET_FMT "%d"
#endif
In D4357#74132, @vtorri wrote:

in configure.ac :

efl_net_control_backend=none

the variable should be uppercase

Jean fixed that one

In D4357#74133, @vtorri wrote:

Also, no more warnings for compilation on 32 bits (not tested 64 bits yet) with :

#ifdef _WIN64
# define SOCKET_FMT "%llu"
#elif defined _WIN32
# define SOCKET_FMT "%u"
#else
# define closesocket(fd) close(fd)
# define SOCKET int
# define SOCKET_FMT "%d"
#endif

This fixes most ecore_con warnings on 64

Only few left:

  CC       lib/ecore_con/lib_ecore_con_libecore_con_la-ecore_con_alloc.lo
  CC       lib/ecore_con/lib_ecore_con_libecore_con_la-ecore_con.lo
lib/ecore_con/ecore_con.c: In function ‘_ecore_con_svr_udp_handler’:
lib/ecore_con/ecore_con.c:2401:31: warning: ‘num’ may be used uninitialized in this function [-Wmaybe-uninitialized]
    ecore_con_event_client_data(obj, buf, num, EINA_TRUE);
                               ^
  CC       lib/ecore_con/lib_ecore_con_libecore_con_la-ecore_con_socks.lo
lib/ecore_con/ecore_con_socks.c: In function ‘_ecore_con_socks_read_v4’:
lib/ecore_con/ecore_con_socks.c:270:9: warning: pointer targets in passing argument 2 of ‘evil_inet_ntop’ differ in signedness [-Wpointer-sign]
         if (!inet_ntop(AF_INET, &data[4], naddr, sizeof(naddr))) goto error;
         ^
In file included from ../src/lib/evil/Evil.h:113:0,
                 from lib/ecore_con/ecore_con_socks.c:42:
../src/lib/evil/evil_inet.h:130:18: note: expected ‘const char *’ but argument is of type ‘const unsigned char *’
 EAPI const char *evil_inet_ntop(int af, const char *src, void *dst, size_t size);
                  ^
  CC       lib/ecore_con/lib_ecore_con_libecore_con_la-ecore_con_ssl.lo
  CC       lib/ecore_con/lib_ecore_con_libecore_con_la-ecore_con_url.lo
  CC       lib/ecore_con/lib_ecore_con_libecore_con_la-ecore_con_url_curl.lo
  CC       lib/ecore_con/lib_ecore_con_libecore_con_la-ecore_con_info.lo
  CC       lib/ecore_con/lib_ecore_con_libecore_con_la-efl_net_socket.lo
  CC       lib/ecore_con/lib_ecore_con_libecore_con_la-efl_net_socket_fd.lo
  CC       lib/ecore_con/lib_ecore_con_libecore_con_la-efl_net_socket_tcp.lo
lib/ecore_con/efl_net_socket_tcp.c: In function ‘_efl_net_socket_tcp_keep_alive_set’:
lib/ecore_con/efl_net_socket_tcp.c:107:9: warning: format ‘%d’ expects argument of type ‘int’, but argument 8 has type ‘DWORD’ [-Wformat=]
         ERR("setsockopt(" SOCKET_FMT ", SOL_SOCKET, SO_KEEPALIVE, %d): %s",
         ^
  CC       lib/ecore_con/lib_ecore_con_libecore_con_la-efl_net_socket_udp.lo
  CC       lib/ecore_con/lib_ecore_con_libecore_con_la-efl_net_dialer.lo
  CC       lib/ecore_con/lib_ecore_con_libecore_con_la-efl_net_dialer_tcp.lo
  CC       lib/ecore_con/lib_ecore_con_libecore_con_la-efl_net_dialer_udp.lo
  CC       lib/ecore_con/lib_ecore_con_libecore_con_la-efl_net_dialer_http.lo
  CC       lib/ecore_con/lib_ecore_con_libecore_con_la-efl_net_dialer_websocket.lo
  CC       lib/ecore_con/lib_ecore_con_libecore_con_la-efl_net_server.lo
  CC       lib/ecore_con/lib_ecore_con_libecore_con_la-efl_net_server_fd.lo
lib/ecore_con/efl_net_server_fd.c: In function ‘efl_net_accept4’:
lib/ecore_con/efl_net_server_fd.c:56:14: warning: format ‘%d’ expects argument of type ‘int’, but argument 7 has type ‘SOCKET’ [-Wformat=]
              ERR("fcntl(%d, F_SETFD, FD_CLOEXEC): %s", client, strerror(errno));
              ^
  CC       lib/ecore_con/lib_ecore_con_libecore_con_la-efl_net_server_tcp.lo
lib/ecore_con/efl_net_server_tcp.c: In function ‘_efl_net_server_tcp_ipv6_only_set’:
lib/ecore_con/efl_net_server_tcp.c:327:9: warning: format ‘%d’ expects argument of type ‘int’, but argument 8 has type ‘DWORD’ [-Wformat=]
         ERR("could not set socket=" SOCKET_FMT " IPV6_V6ONLY=%d: %s", fd, value, eina_error_msg_get(efl_net_socket_error_get()));
         ^
  CC       lib/ecore_con/lib_ecore_con_libecore_con_la-efl_net_server_udp.lo
lib/ecore_con/efl_net_server_udp.c: In function ‘_efl_net_server_udp_ipv6_only_set’:
lib/ecore_con/efl_net_server_udp.c:418:9: warning: format ‘%d’ expects argument of type ‘int’, but argument 8 has type ‘DWORD’ [-Wformat=]
         ERR("could not set socket=" SOCKET_FMT " IPV6_V6ONLY=%d: %s", fd, value, eina_error_msg_get(efl_net_socket_error_get()));
         ^
  CC       lib/ecore_con/lib_ecore_con_libecore_con_la-efl_net_server_udp_client.lo
  CC       lib/ecore_con/lib_ecore_con_libecore_con_la-efl_net_socket_ssl.lo
  CC       lib/ecore_con/lib_ecore_con_libecore_con_la-efl_net_ssl_context.lo
  CC       lib/ecore_con/lib_ecore_con_libecore_con_la-efl_net_dialer_ssl.lo
  CC       lib/ecore_con/lib_ecore_con_libecore_con_la-efl_net_server_ssl.lo
  CC       lib/ecore_con/lib_ecore_con_libecore_con_la-efl_net_control_access_point-none.lo
  CC       lib/ecore_con/lib_ecore_con_libecore_con_la-efl_net_control_technology-none.lo
  CC       lib/ecore_con/lib_ecore_con_libecore_con_la-efl_net_control-none.lo
  CC       lib/ecore_con/lib_ecore_con_libecore_con_la-efl_net_session-none.lo
  CC       lib/ecore_con/lib_ecore_con_libecore_con_la-ecore_con_local_win32.lo
lib/ecore_con/ecore_con_local_win32.c: In function ‘ecore_con_local_connect’:
lib/ecore_con/ecore_con_local_win32.c:541:2: warning: #warning "I am pretty sure cb_done should be used." [-Wcpp]
 #warning "I am pretty sure cb_done should be used."
  ^
lib/ecore_con/ecore_con_local_win32.c:538:37: warning: unused parameter ‘cb_done’ [-Wunused-parameter]
                         Eina_Bool (*cb_done)(void *data,
                                     ^
  CCLD     lib/ecore_con/libecore_con.la
jpeg added a comment.Jun 8 2017, 1:27 AM

See b322a3ae53827cb880cec8d8f234f685dce6a179
EAI_SYSTEM is defined as 254. I guess we can drop this patch?

what's wrong with doing the define if the symbol wasn't defined?

jpeg added a comment.Jun 8 2017, 8:04 PM

what's wrong with doing the define if the symbol wasn't defined?

Nothing. I was under the impression that this patch is not required anymore since there is another ifndef define in ecore_con_private.h

What's the status of this patch ?

i guess it's not needed anymore

jpeg commandeered this revision.Aug 30 2017, 10:27 PM
jpeg added a reviewer: an.kroitor.

Dropping this.

jpeg abandoned this revision.Aug 30 2017, 10:27 PM