--- configure.orig Sat Sep 15 00:32:30 2007 +++ configure Sat Sep 15 00:31:47 2007 @@ -19927,7 +19927,7 @@ #define HAVE_LIBSOCKET 1 _ACEOF - LIBS="-lsocket $LIBS" + LIBS="-lsocket -lnsl -lresolv $LIBS" fi --- configure.in.bak 2007-05-04 13:46:45.000000000 -0700 +++ configure.in 2007-05-04 14:06:13.000000000 -0700 @@ -35,6 +35,8 @@ dnl Checks for libraries. AC_CHECK_LIB(socket, socket) +AC_CHECK_LIB(resolv, inet_aton) +AC_CHECK_LIB(nsl, inet_ntoa) dnl Checks for header files. AC_HEADER_STDC --- event.h.bak 2007-05-04 13:46:45.000000000 -0700 +++ event.h 2007-05-04 13:46:45.000000000 -0700 @@ -299,39 +299,39 @@ void evtag_init(void); -void evtag_marshal(struct evbuffer *evbuf, u_int8_t tag, const void *data, - u_int32_t len); +void evtag_marshal(struct evbuffer *evbuf, unsigned char tag, const void *data, + unsigned int len); -void encode_int(struct evbuffer *evbuf, u_int32_t number); +void encode_int(struct evbuffer *evbuf, unsigned int number); -void evtag_marshal_int(struct evbuffer *evbuf, u_int8_t tag, - u_int32_t integer); +void evtag_marshal_int(struct evbuffer *evbuf, unsigned char tag, + unsigned int integer); -void evtag_marshal_string(struct evbuffer *buf, u_int8_t tag, +void evtag_marshal_string(struct evbuffer *buf, unsigned char tag, const char *string); -void evtag_marshal_timeval(struct evbuffer *evbuf, u_int8_t tag, +void evtag_marshal_timeval(struct evbuffer *evbuf, unsigned char tag, struct timeval *tv); void evtag_test(void); -int evtag_unmarshal(struct evbuffer *src, u_int8_t *ptag, +int evtag_unmarshal(struct evbuffer *src, unsigned char *ptag, struct evbuffer *dst); -int evtag_peek(struct evbuffer *evbuf, u_int8_t *ptag); -int evtag_peek_length(struct evbuffer *evbuf, u_int32_t *plength); -int evtag_payload_length(struct evbuffer *evbuf, u_int32_t *plength); +int evtag_peek(struct evbuffer *evbuf, unsigned char *ptag); +int evtag_peek_length(struct evbuffer *evbuf, unsigned int *plength); +int evtag_payload_length(struct evbuffer *evbuf, unsigned int *plength); int evtag_consume(struct evbuffer *evbuf); -int evtag_unmarshal_int(struct evbuffer *evbuf, u_int8_t need_tag, - u_int32_t *pinteger); +int evtag_unmarshal_int(struct evbuffer *evbuf, unsigned char need_tag, + unsigned int *pinteger); -int evtag_unmarshal_fixed(struct evbuffer *src, u_int8_t need_tag, void *data, +int evtag_unmarshal_fixed(struct evbuffer *src, unsigned char need_tag, void *data, size_t len); -int evtag_unmarshal_string(struct evbuffer *evbuf, u_int8_t need_tag, +int evtag_unmarshal_string(struct evbuffer *evbuf, unsigned char need_tag, char **pstring); -int evtag_unmarshal_timeval(struct evbuffer *evbuf, u_int8_t need_tag, +int evtag_unmarshal_timeval(struct evbuffer *evbuf, unsigned char need_tag, struct timeval *ptv); #ifdef __cplusplus --- test/regress.c.bak 2007-05-04 13:46:45.000000000 -0700 +++ test/regress.c 2007-05-04 13:46:45.000000000 -0700 @@ -673,7 +673,7 @@ cleanup_test(); } -int decode_int(u_int32_t *pnumber, struct evbuffer *evbuf); +int decode_int(unsigned int *pnumber, struct evbuffer *evbuf); void read_once_cb(int fd, short event, void *arg) @@ -724,10 +724,10 @@ evtag_int_test(void) { struct evbuffer *tmp = evbuffer_new(); - u_int32_t integers[TEST_MAX_INT] = { + unsigned int integers[TEST_MAX_INT] = { 0xaf0, 0x1000, 0x1, 0xdeadbeef, 0x00, 0xbef000 }; - u_int32_t integer; + unsigned int integer; int i; for (i = 0; i < TEST_MAX_INT; i++) { --- test/regress.gen.c.bak 2007-05-04 13:46:45.000000000 -0700 +++ test/regress.gen.c 2007-05-04 13:46:45.000000000 -0700 @@ -273,7 +273,7 @@ int msg_unmarshal(struct msg *tmp, struct evbuffer *evbuf) { - u_int8_t tag; + unsigned char tag; while (EVBUFFER_LENGTH(evbuf) > 0) { if (evtag_peek(evbuf, &tag) == -1) return (-1); @@ -357,9 +357,9 @@ } int -evtag_unmarshal_msg(struct evbuffer *evbuf, u_int8_t need_tag, struct msg *msg) +evtag_unmarshal_msg(struct evbuffer *evbuf, unsigned char need_tag, struct msg *msg) { - u_int8_t tag; + unsigned char tag; int res = -1; struct evbuffer *tmp = evbuffer_new(); @@ -378,7 +378,7 @@ } void -evtag_marshal_msg(struct evbuffer *evbuf, u_int8_t tag, const struct msg *msg) +evtag_marshal_msg(struct evbuffer *evbuf, unsigned char tag, const struct msg *msg) { struct evbuffer *_buf = evbuffer_new(); assert(_buf != NULL); @@ -489,7 +489,7 @@ int kill_unmarshal(struct kill *tmp, struct evbuffer *evbuf) { - u_int8_t tag; + unsigned char tag; while (EVBUFFER_LENGTH(evbuf) > 0) { if (evtag_peek(evbuf, &tag) == -1) return (-1); @@ -538,9 +538,9 @@ } int -evtag_unmarshal_kill(struct evbuffer *evbuf, u_int8_t need_tag, struct kill *msg) +evtag_unmarshal_kill(struct evbuffer *evbuf, unsigned char need_tag, struct kill *msg) { - u_int8_t tag; + unsigned char tag; int res = -1; struct evbuffer *tmp = evbuffer_new(); @@ -559,7 +559,7 @@ } void -evtag_marshal_kill(struct evbuffer *evbuf, u_int8_t tag, const struct kill *msg) +evtag_marshal_kill(struct evbuffer *evbuf, unsigned char tag, const struct kill *msg) { struct evbuffer *_buf = evbuffer_new(); assert(_buf != NULL); @@ -636,7 +636,7 @@ int run_unmarshal(struct run *tmp, struct evbuffer *evbuf) { - u_int8_t tag; + unsigned char tag; while (EVBUFFER_LENGTH(evbuf) > 0) { if (evtag_peek(evbuf, &tag) == -1) return (-1); @@ -672,9 +672,9 @@ } int -evtag_unmarshal_run(struct evbuffer *evbuf, u_int8_t need_tag, struct run *msg) +evtag_unmarshal_run(struct evbuffer *evbuf, unsigned char need_tag, struct run *msg) { - u_int8_t tag; + unsigned char tag; int res = -1; struct evbuffer *tmp = evbuffer_new(); @@ -693,7 +693,7 @@ } void -evtag_marshal_run(struct evbuffer *evbuf, u_int8_t tag, const struct run *msg) +evtag_marshal_run(struct evbuffer *evbuf, unsigned char tag, const struct run *msg) { struct evbuffer *_buf = evbuffer_new(); assert(_buf != NULL); --- test/regress.gen.h.bak 2007-05-04 13:46:45.000000000 -0700 +++ test/regress.gen.h 2007-05-04 13:46:45.000000000 -0700 @@ -41,10 +41,10 @@ int (*run_get)(struct msg *, int, struct run **); struct run *(*run_add)(struct msg *); - u_int8_t from_name_set; - u_int8_t to_name_set; - u_int8_t kill_set; - u_int8_t run_set; + unsigned char from_name_set; + unsigned char to_name_set; + unsigned char kill_set; + unsigned char run_set; }; struct msg *msg_new(); @@ -53,8 +53,8 @@ void msg_marshal(struct evbuffer *, const struct msg *); int msg_unmarshal(struct msg *, struct evbuffer *); int msg_complete(struct msg *); -void evtag_marshal_msg(struct evbuffer *, u_int8_t, const struct msg *); -int evtag_unmarshal_msg(struct evbuffer *, u_int8_t, struct msg *); +void evtag_marshal_msg(struct evbuffer *, unsigned char, const struct msg *); +int evtag_unmarshal_msg(struct evbuffer *, unsigned char, struct msg *); int msg_from_name_assign(struct msg *, const char *); int msg_from_name_get(struct msg *, char * *); int msg_to_name_assign(struct msg *, const char *); @@ -82,8 +82,8 @@ int (*action_assign)(struct kill *, const char *); int (*action_get)(struct kill *, char * *); - u_int8_t weapon_set; - u_int8_t action_set; + unsigned char weapon_set; + unsigned char action_set; }; struct kill *kill_new(); @@ -92,8 +92,8 @@ void kill_marshal(struct evbuffer *, const struct kill *); int kill_unmarshal(struct kill *, struct evbuffer *); int kill_complete(struct kill *); -void evtag_marshal_kill(struct evbuffer *, u_int8_t, const struct kill *); -int evtag_unmarshal_kill(struct evbuffer *, u_int8_t, struct kill *); +void evtag_marshal_kill(struct evbuffer *, unsigned char, const struct kill *); +int evtag_unmarshal_kill(struct evbuffer *, unsigned char, struct kill *); int kill_weapon_assign(struct kill *, const char *); int kill_weapon_get(struct kill *, char * *); int kill_action_assign(struct kill *, const char *); @@ -112,7 +112,7 @@ int (*how_assign)(struct run *, const char *); int (*how_get)(struct run *, char * *); - u_int8_t how_set; + unsigned char how_set; }; struct run *run_new(); @@ -121,8 +121,8 @@ void run_marshal(struct evbuffer *, const struct run *); int run_unmarshal(struct run *, struct evbuffer *); int run_complete(struct run *); -void evtag_marshal_run(struct evbuffer *, u_int8_t, const struct run *); -int evtag_unmarshal_run(struct evbuffer *, u_int8_t, struct run *); +void evtag_marshal_run(struct evbuffer *, unsigned char, const struct run *); +int evtag_unmarshal_run(struct evbuffer *, unsigned char, struct run *); int run_how_assign(struct run *, const char *); int run_how_get(struct run *, char * *);