mirror of
https://github.com/libevent/libevent.git
synced 2025-01-09 00:56:20 +08:00
Merge branch '21_largefile_support'
This commit is contained in:
commit
5760efb1b6
@ -172,6 +172,8 @@ fi
|
||||
AC_SUBST(EV_LIB_WS32)
|
||||
AC_SUBST(EV_LIB_GDI)
|
||||
|
||||
AC_SYS_LARGEFILE
|
||||
|
||||
LIBEVENT_OPENSSL
|
||||
|
||||
dnl Checks for header files.
|
||||
@ -542,6 +544,7 @@ AC_CHECK_SIZEOF(int)
|
||||
AC_CHECK_SIZEOF(short)
|
||||
AC_CHECK_SIZEOF(size_t)
|
||||
AC_CHECK_SIZEOF(void *)
|
||||
AC_CHECK_SIZEOF(off_t)
|
||||
|
||||
AC_CHECK_TYPES([struct in6_addr, struct sockaddr_in6, sa_family_t, struct addrinfo, struct sockaddr_storage], , ,
|
||||
[#define _GNU_SOURCE
|
||||
|
@ -24,6 +24,11 @@
|
||||
# undef __EXTENSIONS__
|
||||
#endif
|
||||
|
||||
/* Number of bits in a file offset, on hosts where this is settable. */
|
||||
#undef _FILE_OFFSET_BITS
|
||||
/* Define for large files, on AIX-style hosts. */
|
||||
#undef _LARGE_FILES
|
||||
|
||||
/* Define to 1 if on MINIX. */
|
||||
#ifndef _MINIX
|
||||
#undef _MINIX
|
||||
|
@ -193,8 +193,21 @@ extern "C" {
|
||||
#define ev_ssize_t ssize_t
|
||||
#endif
|
||||
|
||||
/* Note that we define ev_off_t based on the compile-time size of off_t that
|
||||
* we used to build Libevent, and not based on the current size of off_t.
|
||||
* (For example, we don't define ev_off_t to off_t.). We do this because
|
||||
* some systems let you build your software with different off_t sizes
|
||||
* at runtime, and so putting in any dependency on off_t would risk API
|
||||
* mismatch.
|
||||
*/
|
||||
#ifdef _WIN32
|
||||
#define ev_off_t ev_int64_t
|
||||
#elif _EVENT_SIZEOF_OFF_T == 8
|
||||
#define ev_off_t ev_int64_t
|
||||
#elif _EVENT_SIZEOF_OFF_T == 4
|
||||
#define ev_off_t ev_int32_t
|
||||
#elif defined(_EVENT_IN_DOXYGEN)
|
||||
#define ev_off_t ...
|
||||
#else
|
||||
#define ev_off_t off_t
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user