/* Define to unsigned int if you dont have it */
#define _EVENT_socklen_t unsigned int
+/* Define to `int' if <sys/types.h> does not define. */
+#define _EVENT_ssize_t SSIZE_T
+
#endif
AC_TYPE_PID_T
AC_TYPE_SIZE_T
+AC_TYPE_SSIZE_T
AC_CHECK_TYPES([uint64_t, uint32_t, uint16_t, uint8_t], , ,
[#ifdef HAVE_STDINT_H
modify these values except with evbuffer_ptr_set.
*/
struct evbuffer_ptr {
- ssize_t pos;
+ ev_ssize_t pos;
/* Do not alter the values of fields. */
struct {
@see evbuffer_read()
*/
int evbuffer_write_atmost(struct evbuffer *buffer, evutil_socket_t fd,
- ssize_t howmuch);
+ ev_ssize_t howmuch);
/**
Read from a file descriptor and store the result in an evbuffer.
@return a pointer to the contigous memory areay
*/
-unsigned char *evbuffer_pullup(struct evbuffer *buf, ssize_t size);
+unsigned char *evbuffer_pullup(struct evbuffer *buf, ev_ssize_t size);
/**
Prepends data to the beginning of the evbuffer
on an error.
*/
typedef enum bufferevent_filter_result (*bufferevent_filter_cb)(
- struct evbuffer *src, struct evbuffer *dst, ssize_t dst_limit,
+ struct evbuffer *src, struct evbuffer *dst, ev_ssize_t dst_limit,
enum bufferevent_flush_mode mode, void *ctx);
/**
#define ev_uint8_t unsigned char
#endif
+#ifdef _EVENT_ssize_t
+#define ev_ssize_t _EVENT_ssize_t
+#else
+#define ev_ssize_t ssize_t
+#endif
+
#ifdef WIN32
/** A type wide enough to hold the output of "socket()" or "accept()". On
* Windows, this is an intptr_t; elsewhere, it is an int. */
#ifdef _EVENT___func__
#define __func__ _EVENT___func__
#endif
+#ifdef _EVENT_ssize_t
+#define ssize_t _EVENT_ssize_t
+#endif
/* A good no-op to use in macro definitions. */
#define _EVUTIL_NIL_STMT ((void)0)