Re: [Libevent-users] Libevent 2.0.1-alpha is released

2009-06-01 Thread James Mansion

Nick Mathewson wrote:

Good morning, evening, night, or afternoon!

The first alpha release in the long-promised Libevent 2.0 series 
is finally out.  You can download Libevent 2.0.1-alpha from

   http://monkey.org/~provos/libevent-2.0.1-alpha.tar.gz

  

I have a number of patches designed to make the build on Win32 smoother.
I have the regress application building, although it does not run reliably.

The biggest changes are in the rpcgen program - most of the others are 
minor.


Where should I send the patches?

I have a waf script that automates building the whole lot including 
doing the config
stage if anyone is interested.  Its not finalised (and I have yet to 
make it work on

UNIX) but it may help dev without fiddling with msdev projects all the time.

The result fails the same way as the msdev build when a debug build is used,
and fails in other ways when an optimised build is done.

What is the expectation for regress.exe --no-fork on Windows?  At the moment
it fails in test_edgetriggered because the 'fd' passed to write isn't 
appropriate.


I can't help feeling that the attempt to use raw UNIX-style APIs and fd 
abstraction
on Windows is likely to be fraught - its easy enough to create an 
abstraction that

works OK, but doing so using the raw UNIX abstractions seems to me likely to
end up fighting the differences between sockets, file handles, and fd as 
emulated by

C runtime on Windows.

It may be possible to bully it to work eventually, but its going to be 
very messy.


Is it really so unpalatable to break the API with the major version change?

James

___
Libevent-users mailing list
Libevent-users@monkey.org
http://monkeymail.org/mailman/listinfo/libevent-users


Re: [Libevent-users] Libevent 2.0.1-alpha is released

2009-05-22 Thread Nick Mathewson
On Fri, May 22, 2009 at 07:44:36PM +0100, James Mansion wrote:
 Nick Mathewson wrote:
 [...]
 So reading that message again, I guess I wasn't as explicit as I
 should have been.  Short version: yes, I think the next release will
 build okay with visual C.  But somebody besides me test out the code
 in the subversion repository to make sure there aren't any surprises.
 
 yrs,
   
 
 (Using: Visual Studio Express and Windows 7 SDK Beta, Vista Home Premium 
 32 bit)
 
 As of r1298.

Thanks!  I've fixed some of the stuff below, I hope.  See comments at
the bottom for some more stuff we should do that I will probably
need help with.

 -
 
 Build fails on ssize_t in args to evbuffer_reserve_space.
 
 If I search for ssize_t then I can see:
 
 #define _EVENT_ssize_t
 use of ssize_t
 use of SSIZE_T
 use of ev_ssize_t
 
 I added:
 
 #define ssize_t _EVENT_ssize_t
 
 #define ev_ssize_t _EVENT_ssize_t

I've changed the code to use ev_ssize_t thoughout, which should be
defined in include/event2/util.h.

 [...]
 time-test.c does not compile because event2\event_struct.h
 uses struct timeval.h and WinSock.h has not been included.
 
 I added:
 
 #ifdef WIN32
 #include winsock2.h
 #include windows.h
 #include io.h
 #endif
 
 to time-test.c, but the reality is that any file including
 event_struct.h will need to do this.  I suggest using a
 private type that is equivalent of including WinSock2.h
 into a base libevent header. This isn't likely to increase
 the dependencies of a Windows application that uses libevent.

A private type?  What kind of thing do you mean here?


 -
 
 signal-test.c and time-test.c use the C99 __func__.
 
 I added:
 
 #define __func__ __FUNCTION__
 
 in a Win32-specific block - I'm lazy, its compiler-specific
 really.

Fixed in svn.

 -
 
 Execution fails:
 
 C:\src\libevent\WIN32-Prjtime_test\debug\time_test
 [err] evsig_init: socketpair: Successful WSAStartup not yet performed 
 [WSANOTINITIALISED ]
 
 C:\src\libevent\WIN32-Prjsignal_test\debug\signal_test.exe
 [err] evsig_init: socketpair: Successful WSAStartup not yet performed 
 [WSANOTINITIALISED ]

Fixed these two too.

 event_test fails the same way though I don't get an error
 message when running from the command line (I do under the debugger,
 which is odd).

It looks like event_test is just plain broken on Windows.  Whoever
wrote it seems to have been under the impression that CreateFile
would give you something you can pass to select(), which isn't so.

(Yeah, we totally need new example code.  If anybody wants to write
some, that would be wonderful.)

OTHER QUESTIONS:

Q1:

It sounds like you're winding up with project files that are better
than the ones we have.  Is that so?  Should we ship yours instead?

(I'd try to reproduce your changes, but I always screw up Visual
Studio stuff whenever I touch it, and wind up making changes only to
the debug build, or adding absolute paths by mistake, or stuff like
that.)

Q2:

Were you able to compile regress.exe in test?  That's the one with the
actual serious regression tests that let us know whether Libevent is
working.  I don't know if there's a project for it.  Its sources on
win32 should be:

  regress.c
  regress.gen.c
  regress.gen.h
  regress.h
  regress_buffer.c
  regress_bufferevent.c
  regress_dns.c
  regress_et.c
  regress_http.c
  regress_iocp.c
  regress_main.c
  regress_minheap.c
  [NOT INCLUDED ON WIN32: regress_pthread.c]
  regress_rpc.c
  regress_util.c
  [NOT INCLUDED ON WIN32: regress_zlib.c]
  tinytest.c
  tinytest.h
  tinytest_macros.h

Q3:

There are a bunch of other new files in Libevent 2.0 that may not be
in the old project files.  On win32, the libevent_core library should
contain:

  WIN32-Code/win32.c
  buffer.c
  buffer_iocp.c
  bufferevent.c
  bufferevent_async.c
  bufferevent_filter.c
  bufferevent_pair.c
  bufferevent_sock.c
  event.c
  event_iocp.c
  evmap.c
  evthread_win32.c
  evutil.c
  listener.c
  log.c
  strlcpy.c

and the libevent_extra library should contain:

  event_tagging.c
  http.c
  evdns.c
  evrpc.c

(The libevent library is for backward compatibility, and should
contain all of the above.)

If any of these sources are missing from the appropriate project
files, they should be added in.

yrs,
-- 
Nick
___
Libevent-users mailing list
Libevent-users@monkey.org
http://monkeymail.org/mailman/listinfo/libevent-users


Re: [Libevent-users] Libevent 2.0.1-alpha is released

2009-05-19 Thread James Mansion

Nick Mathewson wrote:

Good morning, evening, night, or afternoon!

The first alpha release in the long-promised Libevent 2.0 series 
is finally out.  You can download Libevent 2.0.1-alpha from

   http://monkey.org/~provos/libevent-2.0.1-alpha.tar.gz
  
Is there any ambition that this can be built on Win32 at the moment?  I 
tried, thinking
I'd then build a script for waf, but it seems completely broken - shows 
signs that the

sources have been rearranged since the vstudio project was made, and more
worryingly the provided config file is called event_config.h and defines 
symbols
with names like _EVENT_*, while in Win32-Code there is a file called 
config.h

which does not have the _EVENT_ prefix.

James

___
Libevent-users mailing list
Libevent-users@monkey.org
http://monkeymail.org/mailman/listinfo/libevent-users


Re: [Libevent-users] Libevent 2.0.1-alpha is released

2009-05-19 Thread Nick Mathewson
On Tue, May 19, 2009 at 10:46:03PM +0100, James Mansion wrote:
 Nick Mathewson wrote:
 Good morning, evening, night, or afternoon!
 
 The first alpha release in the long-promised Libevent 2.0 series 
 is finally out.  You can download Libevent 2.0.1-alpha from
http://monkey.org/~provos/libevent-2.0.1-alpha.tar.gz
   
 Is there any ambition that this can be built on Win32 at the moment?

Yes.

With MinGW, it has built all along.

With respect to building it with Visual C, please see my message to
this very list from last Thursday:

  http://monkeymail.org/archives/libevent-users/2009-May/001650.html

You may want to read the rest of the thread too, for context.

There should be a 2.0.2-alpha sometime in the next week or two that
should build better for you.  If anybody wants to try it out before
then to make sure it builds for you, you can as always check it out
from svn with
   svn checkout 
https://levent.svn.sourceforge.net/svnroot/levent/trunk/libevent libevent

hth,
-- 
Nick
___
Libevent-users mailing list
Libevent-users@monkey.org
http://monkeymail.org/mailman/listinfo/libevent-users


Re: [Libevent-users] Libevent 2.0.1-alpha is released

2009-05-19 Thread Nick Mathewson
On Tue, May 19, 2009 at 06:03:18PM -0400, Nick Mathewson wrote:
 [...]
 With respect to building it with Visual C, please see my message to
 this very list from last Thursday:
 
   http://monkeymail.org/archives/libevent-users/2009-May/001650.html

So reading that message again, I guess I wasn't as explicit as I
should have been.  Short version: yes, I think the next release will
build okay with visual C.  But somebody besides me test out the code
in the subversion repository to make sure there aren't any surprises.

yrs,
-- 
Nick 
___
Libevent-users mailing list
Libevent-users@monkey.org
http://monkeymail.org/mailman/listinfo/libevent-users


Re: [Libevent-users] Libevent 2.0.1-alpha is released

2009-05-03 Thread Nick Mathewson
On Fri, Apr 24, 2009 at 10:32:46AM -0700, Dan Kegel wrote:
 On Sat, Apr 18, 2009 at 11:24 AM, Nick Mathewson ni...@freehaven.net wrote:
  Libevent 2.0 is intended to be backward compatible with the Libevent
  1.4 APIs[*]. ?Any program that worked with Libevent 1.4 should still
  work with Libevent 2.0, unless we screwed up. ?Please test your
  programs when you have a chance, so that if we _did_ screw up, we can
  notice soon.
 
  [*] Unless you were messing around with the internals of internal
  structures.
 
 Say, wouldn't this be a good time to remove the deprecated event_gotsig
 and event_sigcb interface?  Valgrind just complained about a
 thread race there on me, so I'm going to remove them from my
 local copy...

Good catch; done. 

-- 
Nick 
___
Libevent-users mailing list
Libevent-users@monkey.org
http://monkeymail.org/mailman/listinfo/libevent-users


[Libevent-users] Libevent 2.0.1-alpha is released

2009-04-18 Thread Nick Mathewson
Good morning, evening, night, or afternoon!

The first alpha release in the long-promised Libevent 2.0 series 
is finally out.  You can download Libevent 2.0.1-alpha from
   http://monkey.org/~provos/libevent-2.0.1-alpha.tar.gz

To make sure that you're getting the real Libevent source and no
other, you can fetch the GPG signature from 
   http://monkey.org/~provos/libevent-2.0.1-alpha.tar.gz.sig

This is an alpha release.  Libevent 2.0 is not finished.  There will
be bugs, and we make no promises about the stability of any APIs
introduced in this release.  When you find bugs, please let us know.

Libevent 2.0 is intended to be backward compatible with the Libevent
1.4 APIs[*].  Any program that worked with Libevent 1.4 should still
work with Libevent 2.0, unless we screwed up.  Please test your
programs when you have a chance, so that if we _did_ screw up, we can
notice soon.

[*] Unless you were messing around with the internals of internal
structures.  

The list of changes in 2.0 is too large to summarize concisely.  My
next email will describe what's there so far.

yrs,
-- 
Nick
___
Libevent-users mailing list
Libevent-users@monkey.org
http://monkeymail.org/mailman/listinfo/libevent-users