[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [Libevent-users] Patch for mingw64 (64-bit windows)



On Fri, Dec 18, 2009 at 04:53:41PM -0500, Patrick Galbraith wrote:
 [...]
> @@ -11,6 +11,6 @@
>  Requires:
>  Conflicts:
>  Libs: -L${libdir} -levent
> -Libs.private: 
> +Libs.private: -lws2_32 
>  Cflags: -I${includedir}

Hm.  Is there some way to do this conditionally?  We only want to link
against -lws2_32 when we're on Windows.


> Only in libevent-2.0.3-alpha.win64: libtool
> diff -ur libevent-2.0.3-alpha/log.c libevent-2.0.3-alpha.win64/log.c
> --- libevent-2.0.3-alpha/log.c	2009-11-07 13:12:14 -0500
> +++ libevent-2.0.3-alpha.win64/log.c	2009-12-11 17:55:27 -0500
> @@ -101,7 +101,7 @@
>  }
>  
>  void
> -event_sock_err(int eval, evutil_socket_t sock, const char *fmt, ...)
> +event_sock_err(int eval, int sock, const char *fmt, ...)

I've changed both instances to be evutil_socket_t (rather than int.)
Thanks!


>  {
>  	va_list ap;
>  	int err = evutil_socket_geterror(sock);
> Only in libevent-2.0.3-alpha.win64/sample: Makefile
> diff -ur libevent-2.0.3-alpha/select.c libevent-2.0.3-alpha.win64/select.c
> --- libevent-2.0.3-alpha/select.c	2009-11-07 13:12:14 -0500
> +++ libevent-2.0.3-alpha.win64/select.c	2009-12-11 18:07:06 -0500
> @@ -168,7 +168,11 @@
>  	event_debug(("%s: select reports %d", __func__, res));
>  
>  	check_selectop(sop);
> +#ifndef WIN32
>  	i = random() % (nfds+1);
> +#else
> +	i = rand() % (nfds+1);
> +#endif

Hang on, what's going on here?  select.c isn't even supposed to get
built on windows; it only works for a posix-style bitfield-based
select().  The windows version is in win32select.c (or
WIN32-Code/win32.c in older versions of Libevent).

Is there a problem in the build process that is making select.c get
built on mingw64?

yrs,
-- 
Nick 
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users    in the body.