aboutsummaryrefslogtreecommitdiff
path: root/Win32Build/mingw/CHANGES-libevent
blob: e723d9755f6da013c65650e264a2f703f84d3bb5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
Changes related to compilation under MinGW/any sane win32 gcc
=============================================================

* event.c
- If gcc include "WIN32-Code/misc.h" instead of "misc.h"

* WIN32-Code/misc.h
- Add struct prototypes for timeval and timezone

* buffer.c
- changed type of "i" from "u_int" to "unsigned int". My MinGW wasn't 
  recognizing it. (u_int is normally typedef'ed to unsigned int, right?)

* evbuffer.c
- removed incorrect win32 error checking, see bufferevent_writecb().
  (this needs to be fixed by anyone planning to use evbuffer on win32)

* log.c
- If gcc include "WIN32-Code/misc.h" instead of "misc.h" 

* WIN32-Code/misc.c
- if gcc, include "misc.h"
- added newline at end of file to shut up gcc

* WIN32-Code/win32.c
- Altered the prototypes of win32_*() so their argument types didn't conflict
  with the function definitions.
- Casted types of win32_* to void inside win32ops so that it didn't conflict
  with the definition of eventops (gcc doesn't like this)
- Altered prototype of signal_handler to be static since definition is static
  (why wasn't it like this before)
- Casted the second argument of signal() to be void*, some reason my MinGW 
  doesn't have sighandler_t typedef'ed.

* configure.in
- some code to check if we are compiling for WIN32. 
  
* Makefile.am
- if BUILD_WIN32 is defined, include WIN32-Code/misc.c and
  WIN32-Code/win32.c as source files.
- if WIN32, do not build test stuff. (not windows friendly)
- if WIN32, explicitly link to ws2_32.dll
  
Notes
-----
- We assume that if __GNUC__ is undefined we are building with MSVC
- If the user wishes to build a dll, they are on their own, the syntax is 
  compiler specific. 
- Getting this warning from libtool, no idea why
  "libtool: link: warning: undefined symbols not allowed in i686-pc-mingw32
   shared libraries"

  
Changes related to "custom eventops"
====================================

* configure.in
- add argument --enable-custom-eventops, sets USE_CUSTOM_EVENTOPS in config.h
- add argument --enable-custom-code, sets USE_CUSTOM_CODE in Makefile

* Makefile.am
- if USE_CUSTOM_CODE, include custom/custom.c as a source file.
  (I can't think of a way to pass a string to Makefile.am, so I'm stuck naming
   the new source file custom.c. It just seems simpler this way, but I'm open 
   to suggestions)
   
* event.c
- if USE_CUSTOM_EVENTOPS, use eventops as defined in custom-eventops.h

Notes
-----
Just in case it isn't completely obvious, the goal of "custom eventops" is to
allow the user to include their own event processing system without requiring a 
fork. This is accomplished through two parts. Firstly, by allowing the user to 
redefine eventops. (for example, the user may wish to use epoll() exclusively). 
Secondly, by allowing the user to include their own code to support a private
eventop (note, this may not be necessary, as the user may choose to include 
already defined eventop's.