42 Commits

Author SHA1 Message Date
Nick Mathewson
545a61145c Fix even more win64 warnings: buffer, event_tagging, http, evdns, evrpc 2010-11-01 14:13:33 -04:00
Nick Mathewson
f2763fa864 add limits.h to event_tagging.c so opensolaris will build 2010-10-14 13:16:00 -04:00
Nick Mathewson
9c8db0f804 Fix all warnings in the main codebase flagged by -Wsigned-compare
Remember, the code
   int is_less_than(int a, unsigned b) {
      return a < b;
   }
is buggy, since the C integer promotion rules basically turn it into
   int is_less_than(int a, unsigned b) {
      return ((unsigned)a) < b;
   }
and we really want something closer to
   int is_less_than(int a, unsigned b) {
      return a < 0 || ((unsigned)a) < b;
   }
.

Suggested by an example from Ralph Castain
2010-09-23 22:45:55 -04: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
Nick Mathewson
17efc1cdfa Update all our copyright notices to say "2010" 2010-03-04 01:38:48 -05:00
Nick Mathewson
cdf58009fc Change an OOM err to a warn in event_tagging.c
svn:r1524
2009-11-09 19:37:21 +00:00
Nick Mathewson
784b8773a4 We do not work any more without an event-config.h; stop pretending that it is meaningful to check for HAVE_CONFIG_H
svn:r1516
2009-11-06 21:46:57 +00:00
Nick Mathewson
5b3fb5bfa5 More documentation and unit tests for event_tagging.
svn:r1476
2009-10-29 16:35:20 +00:00
Nick Mathewson
e8400a43ca Rename encode_int(64) to avoid polluting the global namespace.
They're now called evtag_encode_int(64).  The old names are available
as macros in event2/tag_compat.h.

Also, add unit tests for encode/decode_int64.

svn:r1365
2009-07-20 14:55:35 +00:00
Nick Mathewson
e865eb938c More msvc build tweaks.
svn:r1262
2009-05-01 00:54:14 +00:00
Nick Mathewson
a8f6d961eb Actually stop using EVBUFFER_LENGTH/DATA, and move them to buffer_compat.h
svn:r1183
2009-04-17 06:56:09 +00:00
Nick Mathewson
b85b710cf5 Update copyright statements to reflect the facts that:
a) this is 2009
b) niels and nick have been comaintainers for a while
c) saying "all rights reserved" when you then go on to explicitly
   disclaim some rights is sheer cargo-cultism.

svn:r1065
2009-01-27 22:34:36 +00:00
Nick Mathewson
8889a77039 Replace all use of config.h with event-config.h.
svn:r1064
2009-01-27 22:30:46 +00:00
Nick Mathewson
9993137cbb Remove all trailing whitespace in all the source files.
svn:r1063
2009-01-27 21:10:31 +00:00
Nick Mathewson
169321c9e6 Rename four internal headers to follow the -internal.h convention.
svn:r1000
2009-01-13 20:26:37 +00:00
Niels Provos
99a1063e73 support 64-bit integers in rpc structs
svn:r856
2008-06-21 02:21:25 +00:00
Nick Mathewson
49868b618a r15316@tombo: nickm | 2008-04-24 20:58:36 -0400
Rename internal memory management functions from event_malloc() etc to mm_malloc() etc.


svn:r725
2008-04-25 01:18:08 +00:00
Nick Mathewson
a404bf9877 r15245@tombo: nickm | 2008-04-18 09:27:50 -0400
Oops; use libevent-internal type instead of uint32_t.


svn:r722
2008-04-18 13:28:00 +00:00
Nick Mathewson
8d2a61605b r15242@tombo: nickm | 2008-04-18 09:24:44 -0400
Make tagging code thread-safe, and fix a bug in encode_int_internal


svn:r721
2008-04-18 13:25:05 +00:00
Nick Mathewson
0ac73078ed r15193@tombo: nickm | 2008-04-16 16:00:35 -0400
Split event.h into several new headers in include/event2.  event.h is now just a wrapper that includes all the subheaders.


svn:r711
2008-04-16 20:01:51 +00:00
Niels Provos
5c70ea4c9d improved code for evbuffer; avoids memcpy
svn:r674
2008-02-28 02:47:43 +00:00
Nick Mathewson
11230f7e16 r18145@catbus: nickm | 2008-02-18 15:02:20 -0500
Stop using deprecated autoconf code to set integer types; detect actual files to include more thoroughly.   This should make us work on solaris 9 again.  This should be a backport candidate, if it works.  Also, make all libevent code use ev_uint32_t etc, rather than uint_32_t.


svn:r649
2008-02-18 20:04:01 +00:00
Nick Mathewson
d80c1c3689 r17185@catbus: nickm | 2007-12-16 14:33:40 -0500
Fix compilation with --enable-gcc-warnings enabled.


svn:r599
2007-12-16 19:34:09 +00:00
Niels Provos
ffd606cd6d prefix {encode,decode}_tag functions with evtag to avoid collisions
svn:r587
2007-12-13 06:14:18 +00:00
Niels Provos
ba48719946 support for 32-bit tag numbers in rpc structures
svn:r583
2007-12-12 04:39:42 +00:00
Nick Mathewson
7eb250e9c5 r14939@tombo: nickm | 2007-11-25 11:59:26 -0500
New function event_set_mem_functions to replace internal calls to malloc, free, etc with a user-supplied functions.


svn:r541
2007-11-25 17:14:19 +00:00
Nick Mathewson
4e1ec3e05e Make all the C files in the libraries compile under MSVC 2005 Express. There are still a few warnings, and probably some subtle issues, but it's better than nothing.
svn:r499
2007-11-07 21:01:26 +00:00
Niels Provos
2026b21598 remove last vestiges of RBTREE
svn:r470
2007-11-03 23:53:49 +00:00
Niels Provos
7b7742fce7 optimize by removing a variable
svn:r433
2007-09-16 02:26:37 +00:00
Nick Mathewson
35983cd60f r14618@catbus: nickm | 2007-08-16 17:11:47 -0400
In ANSI C, int func() is a function with unspecified arguments, whereas int func(void) is a function that takes no arguments.  Using int func() to mean a function with no arguments is a C++ism, so let's not use or generate it.


svn:r395
2007-08-16 21:12:53 +00:00
Niels Provos
753ffa563b convert u_int8_t types to uint8_t types
svn:r368
2007-06-30 19:08:46 +00:00
Niels Provos
f0ff792afa fixes from Joerg Sonnenberger:
http.c is a violation of the ctype(3) interface and an unused function.

test/regress_http.c are incorrect format strings.

test/regress.c uses raise(3) from signal.h.

evdns.c: evdns_error_strings is unused. The GET* macros can eat the
semicolon from the expression. pos is passed in as off_t, so just pass
that down. When assigning negativ values to unsigned variables, an
explicit cast is considered good style.


svn:r367
2007-06-30 18:58:34 +00:00
Niels Provos
aa5c806888 make it compile on solaris; from Andrei Nigmatulin
svn:r366
2007-06-16 03:23:15 +00:00
Niels Provos
b5d2f9a255 rolling back r339: evconfig.h does not work
svn:r341
2007-03-01 06:25:18 +00:00
Niels Provos
127c260bb7 make evconfig.h available as installed header file; not
really ideal but good enough for me; from Nick Mathewson


svn:r339
2007-02-28 04:02:29 +00:00
Niels Provos
f86cead099 remove artifical 16-bit restriction on evrpc entries
svn:r337
2007-02-24 08:33:07 +00:00
Niels Provos
868f10e7c9 mingw fixes from Nick
svn:r271
2006-11-22 01:21:10 +00:00
Niels Provos
c4836d1053 make sure that the rpc callback receives an unmarshaled payload;
make sure that the rpc reply contains a good rpc structure, too.


svn:r258
2006-11-17 06:06:17 +00:00
Niels Provos
94af961f36 get rid of err.h
svn:r218
2006-07-18 06:35:48 +00:00
Niels Provos
50f7aaef6b make it compile on mac os x
svn:r183
2005-09-09 06:56:12 +00:00
Niels Provos
32acc283c8 a few more bug fixes
svn:r177
2005-08-27 06:29:52 +00:00
Niels Provos
c4e60994a2 including the tagging code that is required by event_rpcgen.py; test the
new functionality.


svn:r172
2005-08-22 01:34:34 +00:00