Nick Mathewson
95e2455cdb
When including an -internal.h header outside the main tree, do so early
...
Some of our unit tests and sample code need functions and structures
defined in an -internal.h header. But that can freak out OpenSolaris,
where stdio.h wants to define _FILE_OFFSET_BITS unless it's already
defined, and then evconfig-internal.h defines it. Regular users
should never ever use our -internal.h headers, so the solution is
to make sure that if we're going to use them ourselves, we do so
before system headers.
2012-01-24 16:08:00 -05:00
Nick Mathewson
a86a0c0463
Merge remote-tracking branch 'origin/patches-2.0'
2012-01-16 14:47:05 -05:00
Nick Mathewson
7206e8cdd4
Suppress a gcc warning from ignoring fwrite return in http-sample.c
...
Found by Steve Snyder
2012-01-16 14:45:31 -05:00
Nick Mathewson
9ae6e5959d
Merge remote-tracking branch 'origin/patches-2.0'
...
Conflicts:
sample/dns-example.c
2011-11-14 11:45:17 -05:00
Gisle Vanem
a3f320e83d
Improve win32 behavior of dns-sample.c codex
2011-11-09 00:17:56 -05:00
Nick Mathewson
65c920c9f1
Merge remote-tracking branch 'origin/patches-2.0'
2011-09-25 07:41:29 -04:00
Nick Mathewson
7f82382a7d
Use _SOURCES, not _sources, in sample/Makefile.am
...
Found by Adrian Chadd
2011-09-25 07:39:00 -04:00
Nick Mathewson
2179d7359f
Merge remote-tracking branch 'origin/patches-2.0'
2011-09-16 09:47:14 -04:00
Sergey Avseyev
9ae061acca
le-proxy and regress depend on openssl directly
2011-09-16 09:42:01 -04:00
Harlan Stenn
1c63860758
Use pkg-config (if available) to handle OpenSSL.
2011-08-28 14:31:28 -04:00
Nick Mathewson
b260065ab6
Merge remote-tracking branch 'origin/patches-2.0'
2011-08-28 14:06:03 -04:00
Harlan Stenn
7c11e51e1a
Clean up some problems identified by Coverity.
2011-08-28 13:44:33 -04:00
Nick Mathewson
c629e18287
Merge remote-tracking branch 'origin/patches-2.0'
2011-07-15 10:20:58 -04:00
Nick Mathewson
4a5c82d617
Use AM_CPPFLAGS in sample/Makefile.am, not AM_CFLAGS
...
Reported by Dagobert Michelsen.
2011-07-15 10:20:01 -04:00
Nick Mathewson
9f560bfa11
Use "_WIN32", not WIN32: it's standard and we don't need to fake it
...
This patch was automatically generated with perl.
Based on a patch by Peter Rosin.
2011-05-25 20:03:15 -04:00
Peter Rosin
70be7d17e4
MSVC does not provide S_ISDIR, so provide it manually.
2011-05-25 19:44:06 -04:00
Peter Rosin
7b819f2d97
Libtool brings in the dependencies of libevent_openssl.la automatically
2011-05-04 16:18:51 -04:00
Peter Rosin
274dd0369a
libssl depends on libcrypto, not the other way around.
2011-05-04 16:18:46 -04:00
Sebastian Hahn
744c7456c7
Remote some dead code from dns-example.c
...
Found by Dave Heart
2011-04-23 02:20:59 +02:00
Sebastian Hahn
4bac793e3e
Be nice and "handle" error return values in sample code
...
Caught by clang's static analyzer
2011-04-23 02:04:58 +02:00
Nick Mathewson
2e9f665548
Fix a couple of memory leaks in samples/http-server.c. Found by Dave Hart.
2011-04-14 14:17:58 -04:00
Nick Mathewson
15b2408c9b
Use $(), not @@, for LIBEVENT_GC_SECTIONS
2011-02-22 16:13:49 -05:00
Dave Hart
0965c56356
Use the gcc -ffunction-segments feature to allow gc when linking with static libevent
2011-02-22 00:25:58 -05:00
Nick Mathewson
4eb281c8a9
FIX: comment internal headers used in sample code.
2011-02-22 00:24:57 -05:00
Nick Mathewson
eb692be9c8
NM: Fix sample/http-server ipv6 fixes
...
Fix 1: Use #include "../xyz" rather than #include <../xyz>
Fix 2: util-internal.h includes ipv6-internal.h, which in turn defines
a replacement AF_INET6 on platforms that don't have it. As such,
the AF_INET6 checks shouldn't be needed. (right?)
2011-02-22 00:24:57 -05:00
Harlan Stenn
bbf55150b6
Include util-internal.h as needed to build on platforms with no sockaddr_storage
2011-02-22 00:24:54 -05:00
Harlan Stenn
10c834c4df
Include arpa/inet.h as needed on HPUX
2011-02-22 00:24:36 -05:00
Nick Mathewson
22f4af6580
Remove end-of-line whitespace
2010-12-09 11:43:12 -05:00
Nick Mathewson
13fd242ddb
Fix win32 build of http-server.c with unicode enabled
2010-11-30 00:53:16 -05:00
Nick Mathewson
18d0327666
make http-server example code build on win32
2010-11-29 20:39:09 -05:00
Nick Mathewson
ad66dfd064
Fix http-server.c compilation on freebsd
2010-11-29 20:13:19 -05:00
Nick Mathewson
4881778c5c
Fix a misplaced ) in http_server.c
2010-11-26 13:28:48 -05:00
Nick Mathewson
4e794d5d39
Add a basic example of how to write a static HTTP server.
2010-11-26 12:58:22 -05:00
Nick Mathewson
7bcace2d54
Fix some irix compilation warnings spotted by Kevin Bowling
2010-11-22 21:02:34 -05:00
Nick Mathewson
ec347b9225
Move event-config.h to include/event2
...
This change means that all required include files are in event2, and
all files not in event2/* are optional.
2010-08-06 20:21:27 -04:00
Trond Norbye
13b912e4ac
Fixed compilation of sample/le-proxy.c on win32
2010-08-01 21:39:48 +02:00
Nick Mathewson
d89fdba424
Make sample/hello_world work on windows
...
We forgot to include the WSAStartup call in main().
Patch from an anonymous user on Sourceforge.
Fixes bug 3025354.
2010-07-05 12:28:22 -04:00
Nick Mathewson
2c2618d858
more whitespace normalization
2010-03-05 13:00:15 -05:00
Nick Mathewson
c7cf6f0049
Replace users of "int fd" with "evutil_socket_t fd" in portable code
...
Remeber, win32 has a socket type that's actually a handle, so if
there's a chance that code is run on win32, we can't use "int" as the
socket type.
This isn't a blind search-and-replace: sometimes an fd is really in
fact for a file, and not a socket at all.
2010-03-05 12:47:46 -05:00
Nick Mathewson
4faeaea90e
Clean up formatting: function/keyword spacing consistency.
...
- Keywords always have a space before a paren. Functions never do.
- No more than 3 blank lines in a row.
2010-02-19 03:39:50 -05:00
Nick Mathewson
e5bbd40ad7
Clean up formatting: use tabs, not 8-spaces, to indent.
2010-02-18 17:44:09 -05:00
Nick Mathewson
8fdf09c09d
Clean up formatting: Disallow space-before-tab.
2010-02-18 17:08:50 -05:00
Nick Mathewson
b72be50d7a
Add some headers to fix freebsd compilation
2010-02-18 13:52:04 -05:00
Brodie Thiesfield
000a33ec83
Make Libevent 1.4.12 build on win32 with Unicode enabled.
...
This patch fixes calls to the win32 api to explicitly call the char* versions
of the functions. This fixes build failures when libevent is built with the
UNICODE define.
2010-02-03 23:31:44 -05:00
Nick Mathewson
f4190bfb85
Update time-test.c to use event2
...
time-test.c wasn't crazy, but it used some old interfaces.
There are probably more cleanups and explanations to do beyond the
ones here.
2010-01-27 01:47:36 -05:00
Nick Mathewson
d60a1bd50c
Clarify status of example programs
...
(That is, add comments to say that dns-example and le-proxy are recent and
ugly; event-test is old and ugly.)
2010-01-27 01:46:41 -05:00
Nick Mathewson
becb9f9cd3
Add a new "hello world" sample program
2010-01-27 01:46:23 -05:00
Evan Jones
f6430ac1e3
Update sample/signal-test.c to use newer APIs and not leak.
2009-12-08 17:05:30 -05:00
Nick Mathewson
625a261a53
OpenBSD demands that sys/types.h be included before sys/socket.h
...
svn:r1539
2009-11-17 02:40:14 +00:00
Nick Mathewson
86f5742015
Add two implementations of getaddrinfo: one blocking and one nonblocking.
...
The entry points are evutil_getaddrinfo and evdns_getaddrinfo respectively.
There are fairly extensive unit tests.
I believe this code conforms to RFC3493 pretty closely, but there are
probably more issues. It should get tested on more platforms.
This code means we can dump the well-intentioned but weirdly-implemented
bufferevent_evdns and evutil_resolve code.
svn:r1537
2009-11-16 22:25:46 +00:00