Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Convert event-config.h macros to avoid reserved identifiers

C reserves all identifiers beginning with an underscore for system
use.  But we had been mangling our autoconf identifiers with the
prefix "_EVENT_" to avoid conflict with other programs.

Instead, we will now use the prefix "EVENT__".  With any luck, the
double-underscore will still hint "here be dragons" to anybody
tempted to think that event-config.h is a stable api.

This is an automatically generated patch.  The script that produced
it was made by running this script over config.h.in:

=====

#!/usr/bin/perl -w

# Run this on config.h.in

use strict;

my %macros = ();

while (<>) {
    if (/^# *undef +([A-Za-z0-9_]+)/) {
	$macros{$1} = 1;
    }
}

print "#!/usr/bin/perl -w -i -p\n\n";
for my $k (sort keys %macros) {
    print "s/(?<![A-Za-z0-9_])_EVENT_$k(?![A-Za-z0-9_])/EVENT__$k/g;\n";
}

== And the script that it generated was then run over all .c and .h files:
#!/usr/bin/perl -w -i -p

s/(?<![A-Za-z0-9_])_EVENT_DISABLE_DEBUG_MODE(?![A-Za-z0-9_])/EVENT__DISABLE_DEBUG_MODE/g;
s/(?<![A-Za-z0-9_])_EVENT_DISABLE_MM_REPLACEMENT(?![A-Za-z0-9_])/EVENT__DISABLE_MM_REPLACEMENT/g;
s/(?<![A-Za-z0-9_])_EVENT_DISABLE_THREAD_SUPPORT(?![A-Za-z0-9_])/EVENT__DISABLE_THREAD_SUPPORT/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_ACCEPT4(?![A-Za-z0-9_])/EVENT__HAVE_ACCEPT4/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_ARC4RANDOM(?![A-Za-z0-9_])/EVENT__HAVE_ARC4RANDOM/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_ARC4RANDOM_BUF(?![A-Za-z0-9_])/EVENT__HAVE_ARC4RANDOM_BUF/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_ARPA_INET_H(?![A-Za-z0-9_])/EVENT__HAVE_ARPA_INET_H/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_CLOCK_GETTIME(?![A-Za-z0-9_])/EVENT__HAVE_CLOCK_GETTIME/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_DECL_CTL_KERN(?![A-Za-z0-9_])/EVENT__HAVE_DECL_CTL_KERN/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_DECL_KERN_ARND(?![A-Za-z0-9_])/EVENT__HAVE_DECL_KERN_ARND/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_DECL_KERN_RANDOM(?![A-Za-z0-9_])/EVENT__HAVE_DECL_KERN_RANDOM/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_DECL_RANDOM_UUID(?![A-Za-z0-9_])/EVENT__HAVE_DECL_RANDOM_UUID/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_DEVPOLL(?![A-Za-z0-9_])/EVENT__HAVE_DEVPOLL/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_DLFCN_H(?![A-Za-z0-9_])/EVENT__HAVE_DLFCN_H/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_EPOLL(?![A-Za-z0-9_])/EVENT__HAVE_EPOLL/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_EPOLL_CREATE1(?![A-Za-z0-9_])/EVENT__HAVE_EPOLL_CREATE1/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_EPOLL_CTL(?![A-Za-z0-9_])/EVENT__HAVE_EPOLL_CTL/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_EVENTFD(?![A-Za-z0-9_])/EVENT__HAVE_EVENTFD/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_EVENT_PORTS(?![A-Za-z0-9_])/EVENT__HAVE_EVENT_PORTS/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_FCNTL(?![A-Za-z0-9_])/EVENT__HAVE_FCNTL/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_FCNTL_H(?![A-Za-z0-9_])/EVENT__HAVE_FCNTL_H/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_FD_MASK(?![A-Za-z0-9_])/EVENT__HAVE_FD_MASK/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_GETADDRINFO(?![A-Za-z0-9_])/EVENT__HAVE_GETADDRINFO/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_GETEGID(?![A-Za-z0-9_])/EVENT__HAVE_GETEGID/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_GETEUID(?![A-Za-z0-9_])/EVENT__HAVE_GETEUID/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_GETHOSTBYNAME_R(?![A-Za-z0-9_])/EVENT__HAVE_GETHOSTBYNAME_R/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_GETHOSTBYNAME_R_3_ARG(?![A-Za-z0-9_])/EVENT__HAVE_GETHOSTBYNAME_R_3_ARG/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_GETHOSTBYNAME_R_5_ARG(?![A-Za-z0-9_])/EVENT__HAVE_GETHOSTBYNAME_R_5_ARG/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_GETHOSTBYNAME_R_6_ARG(?![A-Za-z0-9_])/EVENT__HAVE_GETHOSTBYNAME_R_6_ARG/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_GETIFADDRS(?![A-Za-z0-9_])/EVENT__HAVE_GETIFADDRS/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_GETNAMEINFO(?![A-Za-z0-9_])/EVENT__HAVE_GETNAMEINFO/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_GETPROTOBYNUMBER(?![A-Za-z0-9_])/EVENT__HAVE_GETPROTOBYNUMBER/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_GETSERVBYNAME(?![A-Za-z0-9_])/EVENT__HAVE_GETSERVBYNAME/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_GETTIMEOFDAY(?![A-Za-z0-9_])/EVENT__HAVE_GETTIMEOFDAY/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_IFADDRS_H(?![A-Za-z0-9_])/EVENT__HAVE_IFADDRS_H/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_INET_ATON(?![A-Za-z0-9_])/EVENT__HAVE_INET_ATON/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_INET_NTOP(?![A-Za-z0-9_])/EVENT__HAVE_INET_NTOP/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_INET_PTON(?![A-Za-z0-9_])/EVENT__HAVE_INET_PTON/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_INTTYPES_H(?![A-Za-z0-9_])/EVENT__HAVE_INTTYPES_H/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_ISSETUGID(?![A-Za-z0-9_])/EVENT__HAVE_ISSETUGID/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_KQUEUE(?![A-Za-z0-9_])/EVENT__HAVE_KQUEUE/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_LIBZ(?![A-Za-z0-9_])/EVENT__HAVE_LIBZ/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_MEMORY_H(?![A-Za-z0-9_])/EVENT__HAVE_MEMORY_H/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_MMAP(?![A-Za-z0-9_])/EVENT__HAVE_MMAP/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_NANOSLEEP(?![A-Za-z0-9_])/EVENT__HAVE_NANOSLEEP/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_NETDB_H(?![A-Za-z0-9_])/EVENT__HAVE_NETDB_H/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_NETINET_IN6_H(?![A-Za-z0-9_])/EVENT__HAVE_NETINET_IN6_H/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_NETINET_IN_H(?![A-Za-z0-9_])/EVENT__HAVE_NETINET_IN_H/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_NETINET_TCP_H(?![A-Za-z0-9_])/EVENT__HAVE_NETINET_TCP_H/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_OPENSSL(?![A-Za-z0-9_])/EVENT__HAVE_OPENSSL/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_PIPE(?![A-Za-z0-9_])/EVENT__HAVE_PIPE/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_PIPE2(?![A-Za-z0-9_])/EVENT__HAVE_PIPE2/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_POLL(?![A-Za-z0-9_])/EVENT__HAVE_POLL/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_POLL_H(?![A-Za-z0-9_])/EVENT__HAVE_POLL_H/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_PORT_CREATE(?![A-Za-z0-9_])/EVENT__HAVE_PORT_CREATE/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_PORT_H(?![A-Za-z0-9_])/EVENT__HAVE_PORT_H/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_PTHREAD(?![A-Za-z0-9_])/EVENT__HAVE_PTHREAD/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_PTHREADS(?![A-Za-z0-9_])/EVENT__HAVE_PTHREADS/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_PUTENV(?![A-Za-z0-9_])/EVENT__HAVE_PUTENV/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_SA_FAMILY_T(?![A-Za-z0-9_])/EVENT__HAVE_SA_FAMILY_T/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_SELECT(?![A-Za-z0-9_])/EVENT__HAVE_SELECT/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_SENDFILE(?![A-Za-z0-9_])/EVENT__HAVE_SENDFILE/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_SETENV(?![A-Za-z0-9_])/EVENT__HAVE_SETENV/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_SETFD(?![A-Za-z0-9_])/EVENT__HAVE_SETFD/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_SETRLIMIT(?![A-Za-z0-9_])/EVENT__HAVE_SETRLIMIT/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_SIGACTION(?![A-Za-z0-9_])/EVENT__HAVE_SIGACTION/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_SIGNAL(?![A-Za-z0-9_])/EVENT__HAVE_SIGNAL/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_SPLICE(?![A-Za-z0-9_])/EVENT__HAVE_SPLICE/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_STDARG_H(?![A-Za-z0-9_])/EVENT__HAVE_STDARG_H/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_STDDEF_H(?![A-Za-z0-9_])/EVENT__HAVE_STDDEF_H/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_STDINT_H(?![A-Za-z0-9_])/EVENT__HAVE_STDINT_H/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_STDLIB_H(?![A-Za-z0-9_])/EVENT__HAVE_STDLIB_H/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_STRINGS_H(?![A-Za-z0-9_])/EVENT__HAVE_STRINGS_H/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_STRING_H(?![A-Za-z0-9_])/EVENT__HAVE_STRING_H/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_STRLCPY(?![A-Za-z0-9_])/EVENT__HAVE_STRLCPY/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_STRSEP(?![A-Za-z0-9_])/EVENT__HAVE_STRSEP/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_STRTOK_R(?![A-Za-z0-9_])/EVENT__HAVE_STRTOK_R/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_STRTOLL(?![A-Za-z0-9_])/EVENT__HAVE_STRTOLL/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_STRUCT_ADDRINFO(?![A-Za-z0-9_])/EVENT__HAVE_STRUCT_ADDRINFO/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_STRUCT_IN6_ADDR(?![A-Za-z0-9_])/EVENT__HAVE_STRUCT_IN6_ADDR/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_STRUCT_IN6_ADDR_S6_ADDR16(?![A-Za-z0-9_])/EVENT__HAVE_STRUCT_IN6_ADDR_S6_ADDR16/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_STRUCT_IN6_ADDR_S6_ADDR32(?![A-Za-z0-9_])/EVENT__HAVE_STRUCT_IN6_ADDR_S6_ADDR32/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_STRUCT_SOCKADDR_IN6(?![A-Za-z0-9_])/EVENT__HAVE_STRUCT_SOCKADDR_IN6/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_STRUCT_SOCKADDR_IN6_SIN6_LEN(?![A-Za-z0-9_])/EVENT__HAVE_STRUCT_SOCKADDR_IN6_SIN6_LEN/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_STRUCT_SOCKADDR_IN_SIN_LEN(?![A-Za-z0-9_])/EVENT__HAVE_STRUCT_SOCKADDR_IN_SIN_LEN/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_STRUCT_SOCKADDR_STORAGE(?![A-Za-z0-9_])/EVENT__HAVE_STRUCT_SOCKADDR_STORAGE/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY(?![A-Za-z0-9_])/EVENT__HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY(?![A-Za-z0-9_])/EVENT__HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_SYSCTL(?![A-Za-z0-9_])/EVENT__HAVE_SYSCTL/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_SYS_DEVPOLL_H(?![A-Za-z0-9_])/EVENT__HAVE_SYS_DEVPOLL_H/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_SYS_EPOLL_H(?![A-Za-z0-9_])/EVENT__HAVE_SYS_EPOLL_H/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_SYS_EVENTFD_H(?![A-Za-z0-9_])/EVENT__HAVE_SYS_EVENTFD_H/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_SYS_EVENT_H(?![A-Za-z0-9_])/EVENT__HAVE_SYS_EVENT_H/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_SYS_IOCTL_H(?![A-Za-z0-9_])/EVENT__HAVE_SYS_IOCTL_H/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_SYS_MMAN_H(?![A-Za-z0-9_])/EVENT__HAVE_SYS_MMAN_H/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_SYS_PARAM_H(?![A-Za-z0-9_])/EVENT__HAVE_SYS_PARAM_H/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_SYS_QUEUE_H(?![A-Za-z0-9_])/EVENT__HAVE_SYS_QUEUE_H/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_SYS_RESOURCE_H(?![A-Za-z0-9_])/EVENT__HAVE_SYS_RESOURCE_H/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_SYS_SELECT_H(?![A-Za-z0-9_])/EVENT__HAVE_SYS_SELECT_H/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_SYS_SENDFILE_H(?![A-Za-z0-9_])/EVENT__HAVE_SYS_SENDFILE_H/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_SYS_SOCKET_H(?![A-Za-z0-9_])/EVENT__HAVE_SYS_SOCKET_H/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_SYS_STAT_H(?![A-Za-z0-9_])/EVENT__HAVE_SYS_STAT_H/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_SYS_SYSCTL_H(?![A-Za-z0-9_])/EVENT__HAVE_SYS_SYSCTL_H/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_SYS_TIME_H(?![A-Za-z0-9_])/EVENT__HAVE_SYS_TIME_H/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_SYS_TYPES_H(?![A-Za-z0-9_])/EVENT__HAVE_SYS_TYPES_H/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_SYS_UIO_H(?![A-Za-z0-9_])/EVENT__HAVE_SYS_UIO_H/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_SYS_WAIT_H(?![A-Za-z0-9_])/EVENT__HAVE_SYS_WAIT_H/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_TAILQFOREACH(?![A-Za-z0-9_])/EVENT__HAVE_TAILQFOREACH/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_TIMERADD(?![A-Za-z0-9_])/EVENT__HAVE_TIMERADD/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_TIMERCLEAR(?![A-Za-z0-9_])/EVENT__HAVE_TIMERCLEAR/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_TIMERCMP(?![A-Za-z0-9_])/EVENT__HAVE_TIMERCMP/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_TIMERISSET(?![A-Za-z0-9_])/EVENT__HAVE_TIMERISSET/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_UINT16_T(?![A-Za-z0-9_])/EVENT__HAVE_UINT16_T/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_UINT32_T(?![A-Za-z0-9_])/EVENT__HAVE_UINT32_T/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_UINT64_T(?![A-Za-z0-9_])/EVENT__HAVE_UINT64_T/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_UINT8_T(?![A-Za-z0-9_])/EVENT__HAVE_UINT8_T/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_UINTPTR_T(?![A-Za-z0-9_])/EVENT__HAVE_UINTPTR_T/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_UNISTD_H(?![A-Za-z0-9_])/EVENT__HAVE_UNISTD_H/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_UNSETENV(?![A-Za-z0-9_])/EVENT__HAVE_UNSETENV/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_USLEEP(?![A-Za-z0-9_])/EVENT__HAVE_USLEEP/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_VASPRINTF(?![A-Za-z0-9_])/EVENT__HAVE_VASPRINTF/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_WORKING_KQUEUE(?![A-Za-z0-9_])/EVENT__HAVE_WORKING_KQUEUE/g;
s/(?<![A-Za-z0-9_])_EVENT_HAVE_ZLIB_H(?![A-Za-z0-9_])/EVENT__HAVE_ZLIB_H/g;
s/(?<![A-Za-z0-9_])_EVENT_LT_OBJDIR(?![A-Za-z0-9_])/EVENT__LT_OBJDIR/g;
s/(?<![A-Za-z0-9_])_EVENT_NO_MINUS_C_MINUS_O(?![A-Za-z0-9_])/EVENT__NO_MINUS_C_MINUS_O/g;
s/(?<![A-Za-z0-9_])_EVENT_NUMERIC_VERSION(?![A-Za-z0-9_])/EVENT__NUMERIC_VERSION/g;
s/(?<![A-Za-z0-9_])_EVENT_PACKAGE(?![A-Za-z0-9_])/EVENT__PACKAGE/g;
s/(?<![A-Za-z0-9_])_EVENT_PACKAGE_BUGREPORT(?![A-Za-z0-9_])/EVENT__PACKAGE_BUGREPORT/g;
s/(?<![A-Za-z0-9_])_EVENT_PACKAGE_NAME(?![A-Za-z0-9_])/EVENT__PACKAGE_NAME/g;
s/(?<![A-Za-z0-9_])_EVENT_PACKAGE_STRING(?![A-Za-z0-9_])/EVENT__PACKAGE_STRING/g;
s/(?<![A-Za-z0-9_])_EVENT_PACKAGE_TARNAME(?![A-Za-z0-9_])/EVENT__PACKAGE_TARNAME/g;
s/(?<![A-Za-z0-9_])_EVENT_PACKAGE_URL(?![A-Za-z0-9_])/EVENT__PACKAGE_URL/g;
s/(?<![A-Za-z0-9_])_EVENT_PACKAGE_VERSION(?![A-Za-z0-9_])/EVENT__PACKAGE_VERSION/g;
s/(?<![A-Za-z0-9_])_EVENT_PTHREAD_CREATE_JOINABLE(?![A-Za-z0-9_])/EVENT__PTHREAD_CREATE_JOINABLE/g;
s/(?<![A-Za-z0-9_])_EVENT_SIZEOF_INT(?![A-Za-z0-9_])/EVENT__SIZEOF_INT/g;
s/(?<![A-Za-z0-9_])_EVENT_SIZEOF_LONG(?![A-Za-z0-9_])/EVENT__SIZEOF_LONG/g;
s/(?<![A-Za-z0-9_])_EVENT_SIZEOF_LONG_LONG(?![A-Za-z0-9_])/EVENT__SIZEOF_LONG_LONG/g;
s/(?<![A-Za-z0-9_])_EVENT_SIZEOF_OFF_T(?![A-Za-z0-9_])/EVENT__SIZEOF_OFF_T/g;
s/(?<![A-Za-z0-9_])_EVENT_SIZEOF_PTHREAD_T(?![A-Za-z0-9_])/EVENT__SIZEOF_PTHREAD_T/g;
s/(?<![A-Za-z0-9_])_EVENT_SIZEOF_SHORT(?![A-Za-z0-9_])/EVENT__SIZEOF_SHORT/g;
s/(?<![A-Za-z0-9_])_EVENT_SIZEOF_SIZE_T(?![A-Za-z0-9_])/EVENT__SIZEOF_SIZE_T/g;
s/(?<![A-Za-z0-9_])_EVENT_SIZEOF_VOID_P(?![A-Za-z0-9_])/EVENT__SIZEOF_VOID_P/g;
s/(?<![A-Za-z0-9_])_EVENT_STDC_HEADERS(?![A-Za-z0-9_])/EVENT__STDC_HEADERS/g;
s/(?<![A-Za-z0-9_])_EVENT_TIME_WITH_SYS_TIME(?![A-Za-z0-9_])/EVENT__TIME_WITH_SYS_TIME/g;
s/(?<![A-Za-z0-9_])_EVENT_VERSION(?![A-Za-z0-9_])/EVENT__VERSION/g;
s/(?<![A-Za-z0-9_])_EVENT__ALL_SOURCE(?![A-Za-z0-9_])/EVENT___ALL_SOURCE/g;
s/(?<![A-Za-z0-9_])_EVENT__FILE_OFFSET_BITS(?![A-Za-z0-9_])/EVENT___FILE_OFFSET_BITS/g;
s/(?<![A-Za-z0-9_])_EVENT__GNU_SOURCE(?![A-Za-z0-9_])/EVENT___GNU_SOURCE/g;
s/(?<![A-Za-z0-9_])_EVENT__LARGE_FILES(?![A-Za-z0-9_])/EVENT___LARGE_FILES/g;
s/(?<![A-Za-z0-9_])_EVENT__MINIX(?![A-Za-z0-9_])/EVENT___MINIX/g;
s/(?<![A-Za-z0-9_])_EVENT__POSIX_1_SOURCE(?![A-Za-z0-9_])/EVENT___POSIX_1_SOURCE/g;
s/(?<![A-Za-z0-9_])_EVENT__POSIX_PTHREAD_SEMANTICS(?![A-Za-z0-9_])/EVENT___POSIX_PTHREAD_SEMANTICS/g;
s/(?<![A-Za-z0-9_])_EVENT__POSIX_SOURCE(?![A-Za-z0-9_])/EVENT___POSIX_SOURCE/g;
s/(?<![A-Za-z0-9_])_EVENT__TANDEM_SOURCE(?![A-Za-z0-9_])/EVENT___TANDEM_SOURCE/g;
s/(?<![A-Za-z0-9_])_EVENT___EXTENSIONS__(?![A-Za-z0-9_])/EVENT____EXTENSIONS__/g;
s/(?<![A-Za-z0-9_])_EVENT___func__(?![A-Za-z0-9_])/EVENT____func__/g;
s/(?<![A-Za-z0-9_])_EVENT_const(?![A-Za-z0-9_])/EVENT__const/g;
s/(?<![A-Za-z0-9_])_EVENT_inline(?![A-Za-z0-9_])/EVENT__inline/g;
s/(?<![A-Za-z0-9_])_EVENT_pid_t(?![A-Za-z0-9_])/EVENT__pid_t/g;
s/(?<![A-Za-z0-9_])_EVENT_size_t(?![A-Za-z0-9_])/EVENT__size_t/g;
s/(?<![A-Za-z0-9_])_EVENT_socklen_t(?![A-Za-z0-9_])/EVENT__socklen_t/g;
s/(?<![A-Za-z0-9_])_EVENT_ssize_t(?![A-Za-z0-9_])/EVENT__ssize_t/g;
  • Loading branch information...
commit 68120d9b000a3ad8e09388a66acf6d902136ae8b 1 parent 2958a5c
Nick Mathewson authored
Showing with 487 additions and 487 deletions.
  1. +114 −114 WIN32-Code/event2/event-config.h
  2. +5 −5 arc4random.c
  3. +19 −19 buffer.c
  4. +1 −1  bufferevent-internal.h
  5. +4 −4 bufferevent.c
  6. +3 −3 bufferevent_async.c
  7. +2 −2 bufferevent_filter.c
  8. +3 −3 bufferevent_openssl.c
  9. +6 −6 bufferevent_sock.c
  10. +3 −3 devpoll.c
  11. +5 −5 epoll.c
  12. +2 −2 evbuffer-internal.h
  13. +9 −9 evdns.c
  14. +4 −4 event-internal.h
  15. +36 −36 event.c
  16. +4 −4 event_tagging.c
  17. +1 −1  evmap.c
  18. +2 −2 evport.c
  19. +1 −1  evrpc.c
  20. +1 −1  evsignal-internal.h
  21. +4 −4 evthread-internal.h
  22. +1 −1  evthread.c
  23. +2 −2 evthread_pthread.c
  24. +38 −38 evutil.c
  25. +7 −7 evutil_rand.c
  26. +11 −11 http.c
  27. +3 −3 include/event.h
  28. +3 −3 include/event2/buffer.h
  29. +2 −2 include/event2/bufferevent.h
  30. +1 −1  include/event2/bufferevent_ssl.h
  31. +2 −2 include/event2/bufferevent_struct.h
  32. +2 −2 include/event2/dns_compat.h
  33. +2 −2 include/event2/dns_struct.h
  34. +5 −5 include/event2/event.h
  35. +2 −2 include/event2/event_compat.h
  36. +2 −2 include/event2/event_struct.h
  37. +2 −2 include/event2/http_compat.h
  38. +2 −2 include/event2/http_struct.h
  39. +2 −2 include/event2/tag.h
  40. +4 −4 include/event2/thread.h
  41. +54 −54 include/event2/util.h
  42. +4 −4 ipv6-internal.h
  43. +5 −5 kqueue.c
  44. +3 −3 listener.c
  45. +1 −1  log-internal.h
  46. +1 −1  mm-internal.h
  47. +4 −4 poll.c
  48. +1 −1  sample/dns-example.c
  49. +1 −1  sample/http-server.c
  50. +2 −2 sample/signal-test.c
  51. +1 −1  sample/time-test.c
  52. +5 −5 select.c
  53. +11 −11 signal.c
  54. +1 −1  strlcpy-internal.h
  55. +1 −1  strlcpy.c
  56. +2 −2 test/bench.c
  57. +2 −2 test/bench_cascade.c
  58. +9 −9 test/regress.c
  59. +4 −4 test/regress_buffer.c
  60. +3 −3 test/regress_bufferevent.c
  61. +5 −5 test/regress_dns.c
  62. +2 −2 test/regress_et.c
  63. +1 −1  test/regress_http.c
  64. +6 −6 test/regress_main.c
  65. +1 −1  test/regress_rpc.c
  66. +2 −2 test/regress_testutils.c
  67. +5 −5 test/regress_thread.c
  68. +4 −4 test/regress_util.c
  69. +2 −2 test/test-changelist.c
  70. +4 −4 test/test-eof.c
  71. +3 −3 test/test-fdleak.c
  72. +2 −2 test/test-init.c
  73. +1 −1  test/test-ratelim.c
  74. +4 −4 test/test-weof.c
  75. +8 −8 util-internal.h
View
228 WIN32-Code/event2/event-config.h
@@ -13,10 +13,10 @@
/* config.h.in. Generated from configure.in by autoheader. */
/* Define if libevent should not allow replacing the mm functions */
-/* #undef _EVENT_DISABLE_MM_REPLACEMENT */
+/* #undef EVENT__DISABLE_MM_REPLACEMENT */
/* Define if libevent should not be compiled with thread support */
-/* #undef _EVENT_DISABLE_THREAD_SUPPORT */
+/* #undef EVENT__DISABLE_THREAD_SUPPORT */
/* Define if clock_gettime is available in libc */
/* #undef _EVENT_DNS_USE_CPU_CLOCK_FOR_ID */
@@ -26,344 +26,344 @@
#define _EVENT_DNS_USE_FTIME_FOR_ID 1
/* Define to 1 if you have the <arpa/inet.h> header file. */
-/* #undef _EVENT_HAVE_ARPA_INET_H */
+/* #undef EVENT__HAVE_ARPA_INET_H */
/* Define to 1 if you have the `clock_gettime' function. */
-/* #undef _EVENT_HAVE_CLOCK_GETTIME */
+/* #undef EVENT__HAVE_CLOCK_GETTIME */
/* Define if /dev/poll is available */
-/* #undef _EVENT_HAVE_DEVPOLL */
+/* #undef EVENT__HAVE_DEVPOLL */
/* Define to 1 if you have the <dlfcn.h> header file. */
-/* #undef _EVENT_HAVE_DLFCN_H */
+/* #undef EVENT__HAVE_DLFCN_H */
/* Define if your system supports the epoll system calls */
-/* #undef _EVENT_HAVE_EPOLL */
+/* #undef EVENT__HAVE_EPOLL */
/* Define to 1 if you have the `epoll_ctl' function. */
-/* #undef _EVENT_HAVE_EPOLL_CTL */
+/* #undef EVENT__HAVE_EPOLL_CTL */
/* Define to 1 if you have the `eventfd' function. */
-/* #undef _EVENT_HAVE_EVENTFD */
+/* #undef EVENT__HAVE_EVENTFD */
/* Define if your system supports event ports */
-/* #undef _EVENT_HAVE_EVENT_PORTS */
+/* #undef EVENT__HAVE_EVENT_PORTS */
/* Define to 1 if you have the `fcntl' function. */
-/* #undef _EVENT_HAVE_FCNTL */
+/* #undef EVENT__HAVE_FCNTL */
/* Define to 1 if you have the <fcntl.h> header file. */
-#define _EVENT_HAVE_FCNTL_H 1
+#define EVENT__HAVE_FCNTL_H 1
/* Define to 1 if you have the `getaddrinfo' function. */
-#define _EVENT_HAVE_GETADDRINFO 1
+#define EVENT__HAVE_GETADDRINFO 1
/* Define to 1 if you have the `getnameinfo' function. */
-#define _EVENT_HAVE_GETNAMEINFO 1
+#define EVENT__HAVE_GETNAMEINFO 1
/* Define to 1 if you have the `getprotobynumber' function. */
-#define _EVENT_HAVE_GETPROTOBYNUMBER 1
+#define EVENT__HAVE_GETPROTOBYNUMBER 1
/* Define to 1 if you have the `getservbyname' function. */
-#define _EVENT_HAVE_GETSERVBYNAME 1
+#define EVENT__HAVE_GETSERVBYNAME 1
/* Define to 1 if you have the `gettimeofday' function. */
-/* #define _EVENT_HAVE_GETTIMEOFDAY 1 */
+/* #define EVENT__HAVE_GETTIMEOFDAY 1 */
/* Define to 1 if you have the `inet_aton' function. */
-/* #undef _EVENT_HAVE_INET_ATON */
+/* #undef EVENT__HAVE_INET_ATON */
/* Define to 1 if you have the `inet_ntop' function. */
-/* #undef _EVENT_HAVE_INET_NTOP */
+/* #undef EVENT__HAVE_INET_NTOP */
/* Define to 1 if you have the `inet_pton' function. */
-/* #undef _EVENT_HAVE_INET_PTON */
+/* #undef EVENT__HAVE_INET_PTON */
/* Define to 1 if you have the <inttypes.h> header file. */
-/* #define _EVENT_HAVE_INTTYPES_H 1 */
+/* #define EVENT__HAVE_INTTYPES_H 1 */
/* Define to 1 if you have the `kqueue' function. */
-/* #undef _EVENT_HAVE_KQUEUE */
+/* #undef EVENT__HAVE_KQUEUE */
/* Define if the system has zlib */
-/* #undef _EVENT_HAVE_LIBZ */
+/* #undef EVENT__HAVE_LIBZ */
/* Define to 1 if you have the <memory.h> header file. */
-#define _EVENT_HAVE_MEMORY_H 1
+#define EVENT__HAVE_MEMORY_H 1
/* Define to 1 if you have the `mmap' function. */
-/* #undef _EVENT_HAVE_MMAP */
+/* #undef EVENT__HAVE_MMAP */
/* Define to 1 if you have the <netinet/in6.h> header file. */
-/* #undef _EVENT_HAVE_NETINET_IN6_H */
+/* #undef EVENT__HAVE_NETINET_IN6_H */
/* Define to 1 if you have the <netinet/in.h> header file. */
-/* #undef _EVENT_HAVE_NETINET_IN_H */
+/* #undef EVENT__HAVE_NETINET_IN_H */
/* Define to 1 if you have the `pipe' function. */
-/* #undef _EVENT_HAVE_PIPE */
+/* #undef EVENT__HAVE_PIPE */
/* Define to 1 if you have the `poll' function. */
-/* #undef _EVENT_HAVE_POLL */
+/* #undef EVENT__HAVE_POLL */
/* Define to 1 if you have the <poll.h> header file. */
-/* #undef _EVENT_HAVE_POLL_H */
+/* #undef EVENT__HAVE_POLL_H */
/* Define to 1 if you have the `port_create' function. */
-/* #undef _EVENT_HAVE_PORT_CREATE */
+/* #undef EVENT__HAVE_PORT_CREATE */
/* Define to 1 if you have the <port.h> header file. */
-/* #undef _EVENT_HAVE_PORT_H */
+/* #undef EVENT__HAVE_PORT_H */
/* Define if you have POSIX threads libraries and header files. */
-/* #undef _EVENT_HAVE_PTHREAD */
+/* #undef EVENT__HAVE_PTHREAD */
/* Define if we have pthreads on this system */
-/* #undef _EVENT_HAVE_PTHREADS */
+/* #undef EVENT__HAVE_PTHREADS */
/* Define to 1 if the system has the type `sa_family_t'. */
-/* #undef _EVENT_HAVE_SA_FAMILY_T */
+/* #undef EVENT__HAVE_SA_FAMILY_T */
/* Define to 1 if you have the `select' function. */
-/* #undef _EVENT_HAVE_SELECT */
+/* #undef EVENT__HAVE_SELECT */
/* Define to 1 if you have the `sendfile' function. */
-/* #undef _EVENT_HAVE_SENDFILE */
+/* #undef EVENT__HAVE_SENDFILE */
/* Define if F_SETFD is defined in <fcntl.h> */
-/* #undef _EVENT_HAVE_SETFD */
+/* #undef EVENT__HAVE_SETFD */
/* Define to 1 if you have the `sigaction' function. */
-/* #undef _EVENT_HAVE_SIGACTION */
+/* #undef EVENT__HAVE_SIGACTION */
/* Define to 1 if you have the `signal' function. */
-#define _EVENT_HAVE_SIGNAL 1
+#define EVENT__HAVE_SIGNAL 1
/* Define to 1 if you have the `splice' function. */
-/* #undef _EVENT_HAVE_SPLICE */
+/* #undef EVENT__HAVE_SPLICE */
/* Define to 1 if you have the <stdarg.h> header file. */
-#define _EVENT_HAVE_STDARG_H 1
+#define EVENT__HAVE_STDARG_H 1
/* Define to 1 if you have the <stddef.h> header file. */
-#define _EVENT_HAVE_STDDEF_H 1
+#define EVENT__HAVE_STDDEF_H 1
/* Define to 1 if you have the <stdint.h> header file. */
-/* #define _EVENT_HAVE_STDINT_H 1 */
+/* #define EVENT__HAVE_STDINT_H 1 */
/* Define to 1 if you have the <stdlib.h> header file. */
-#define _EVENT_HAVE_STDLIB_H 1
+#define EVENT__HAVE_STDLIB_H 1
/* Define to 1 if you have the <strings.h> header file. */
-#define _EVENT_HAVE_STRINGS_H 1
+#define EVENT__HAVE_STRINGS_H 1
/* Define to 1 if you have the <string.h> header file. */
-#define _EVENT_HAVE_STRING_H 1
+#define EVENT__HAVE_STRING_H 1
/* Define to 1 if you have the `strlcpy' function. */
-/* #undef _EVENT_HAVE_STRLCPY */
+/* #undef EVENT__HAVE_STRLCPY */
/* Define to 1 if you have the `strsep' function. */
-/* #undef _EVENT_HAVE_STRSEP */
+/* #undef EVENT__HAVE_STRSEP */
/* Define to 1 if you have the `strtok_r' function. */
-/* #undef _EVENT_HAVE_STRTOK_R */
+/* #undef EVENT__HAVE_STRTOK_R */
/* Define to 1 if you have the `strtoll' function. */
-/* #define _EVENT_HAVE_STRTOLL 1 */
+/* #define EVENT__HAVE_STRTOLL 1 */
-#define _EVENT_HAVE_STRUCT_ADDRINFO 1
+#define EVENT__HAVE_STRUCT_ADDRINFO 1
/* Define to 1 if the system has the type `struct in6_addr'. */
-#define _EVENT_HAVE_STRUCT_IN6_ADDR 1
+#define EVENT__HAVE_STRUCT_IN6_ADDR 1
/* Define to 1 if `s6_addr16' is member of `struct in6_addr'. */
-#define _EVENT_HAVE_STRUCT_IN6_ADDR_S6_ADDR16 1
+#define EVENT__HAVE_STRUCT_IN6_ADDR_S6_ADDR16 1
/* Define to 1 if `s6_addr32' is member of `struct in6_addr'. */
-#define _EVENT_HAVE_STRUCT_IN6_ADDR_S6_ADDR32 1
+#define EVENT__HAVE_STRUCT_IN6_ADDR_S6_ADDR32 1
/* Define to 1 if the system has the type `struct sockaddr_in6'. */
-#define _EVENT_HAVE_STRUCT_SOCKADDR_IN6 1
+#define EVENT__HAVE_STRUCT_SOCKADDR_IN6 1
/* Define to 1 if `sin6_len' is member of `struct sockaddr_in6'. */
-/* #undef _EVENT_HAVE_STRUCT_SOCKADDR_IN6_SIN6_LEN */
+/* #undef EVENT__HAVE_STRUCT_SOCKADDR_IN6_SIN6_LEN */
/* Define to 1 if `sin_len' is member of `struct sockaddr_in'. */
-/* #undef _EVENT_HAVE_STRUCT_SOCKADDR_IN_SIN_LEN */
+/* #undef EVENT__HAVE_STRUCT_SOCKADDR_IN_SIN_LEN */
/* Define to 1 if the system has the type `struct sockaddr_storage'. */
-#define _EVENT_HAVE_STRUCT_SOCKADDR_STORAGE 1
+#define EVENT__HAVE_STRUCT_SOCKADDR_STORAGE 1
/* Define to 1 if you have the <sys/devpoll.h> header file. */
-/* #undef _EVENT_HAVE_SYS_DEVPOLL_H */
+/* #undef EVENT__HAVE_SYS_DEVPOLL_H */
/* Define to 1 if you have the <sys/epoll.h> header file. */
-/* #undef _EVENT_HAVE_SYS_EPOLL_H */
+/* #undef EVENT__HAVE_SYS_EPOLL_H */
/* Define to 1 if you have the <sys/eventfd.h> header file. */
-/* #undef _EVENT_HAVE_SYS_EVENTFD_H */
+/* #undef EVENT__HAVE_SYS_EVENTFD_H */
/* Define to 1 if you have the <sys/event.h> header file. */
-/* #undef _EVENT_HAVE_SYS_EVENT_H */
+/* #undef EVENT__HAVE_SYS_EVENT_H */
/* Define to 1 if you have the <sys/ioctl.h> header file. */
-/* #undef _EVENT_HAVE_SYS_IOCTL_H */
+/* #undef EVENT__HAVE_SYS_IOCTL_H */
/* Define to 1 if you have the <sys/mman.h> header file. */
-/* #undef _EVENT_HAVE_SYS_MMAN_H */
+/* #undef EVENT__HAVE_SYS_MMAN_H */
/* Define to 1 if you have the <sys/param.h> header file. */
-/* #define _EVENT_HAVE_SYS_PARAM_H 1 */
+/* #define EVENT__HAVE_SYS_PARAM_H 1 */
/* Define to 1 if you have the <sys/queue.h> header file. */
-/* #undef _EVENT_HAVE_SYS_QUEUE_H */
+/* #undef EVENT__HAVE_SYS_QUEUE_H */
/* Define to 1 if you have the <sys/select.h> header file. */
-/* #undef _EVENT_HAVE_SYS_SELECT_H */
+/* #undef EVENT__HAVE_SYS_SELECT_H */
/* Define to 1 if you have the <sys/sendfile.h> header file. */
-/* #undef _EVENT_HAVE_SYS_SENDFILE_H */
+/* #undef EVENT__HAVE_SYS_SENDFILE_H */
/* Define to 1 if you have the <sys/socket.h> header file. */
-/* #undef _EVENT_HAVE_SYS_SOCKET_H */
+/* #undef EVENT__HAVE_SYS_SOCKET_H */
/* Define to 1 if you have the <sys/stat.h> header file. */
-#define _EVENT_HAVE_SYS_STAT_H 1
+#define EVENT__HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/time.h> header file. */
-/* #define _EVENT_HAVE_SYS_TIME_H 1 */
+/* #define EVENT__HAVE_SYS_TIME_H 1 */
/* Define to 1 if you have the <sys/types.h> header file. */
-#define _EVENT_HAVE_SYS_TYPES_H 1
+#define EVENT__HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the <sys/uio.h> header file. */
-/* #undef _EVENT_HAVE_SYS_UIO_H */
+/* #undef EVENT__HAVE_SYS_UIO_H */
/* Define if TAILQ_FOREACH is defined in <sys/queue.h> */
-/* #undef _EVENT_HAVE_TAILQFOREACH */
+/* #undef EVENT__HAVE_TAILQFOREACH */
/* Define if timeradd is defined in <sys/time.h> */
-/* #undef _EVENT_HAVE_TIMERADD */
+/* #undef EVENT__HAVE_TIMERADD */
/* Define if timerclear is defined in <sys/time.h> */
-#define _EVENT_HAVE_TIMERCLEAR 1
+#define EVENT__HAVE_TIMERCLEAR 1
/* Define if timercmp is defined in <sys/time.h> */
-#define _EVENT_HAVE_TIMERCMP 1
+#define EVENT__HAVE_TIMERCMP 1
/* Define if timerisset is defined in <sys/time.h> */
-#define _EVENT_HAVE_TIMERISSET 1
+#define EVENT__HAVE_TIMERISSET 1
/* Define to 1 if the system has the type `uint16_t'. */
-/* #define _EVENT_HAVE_UINT16_T 1 */
+/* #define EVENT__HAVE_UINT16_T 1 */
/* Define to 1 if the system has the type `uint32_t'. */
-/* #define _EVENT_HAVE_UINT32_T 1 */
+/* #define EVENT__HAVE_UINT32_T 1 */
/* Define to 1 if the system has the type `uint64_t'. */
-/* #define _EVENT_HAVE_UINT64_T 1 */
+/* #define EVENT__HAVE_UINT64_T 1 */
/* Define to 1 if the system has the type `uint8_t'. */
-/* #define _EVENT_HAVE_UINT8_T 1 */
+/* #define EVENT__HAVE_UINT8_T 1 */
/* Define to 1 if you have the <unistd.h> header file. */
-/* #define _EVENT_HAVE_UNISTD_H 1 */
+/* #define EVENT__HAVE_UNISTD_H 1 */
/* Define to 1 if you have the `vasprintf' function. */
-/* #undef _EVENT_HAVE_VASPRINTF */
+/* #undef EVENT__HAVE_VASPRINTF */
/* Define if kqueue works correctly with pipes */
-/* #undef _EVENT_HAVE_WORKING_KQUEUE */
+/* #undef EVENT__HAVE_WORKING_KQUEUE */
/* Numeric representation of the version */
-#define _EVENT_NUMERIC_VERSION 0x02010001
+#define EVENT__NUMERIC_VERSION 0x02010001
/* Name of package */
-#define _EVENT_PACKAGE "libevent"
+#define EVENT__PACKAGE "libevent"
/* Define to the address where bug reports for this package should be sent. */
-#define _EVENT_PACKAGE_BUGREPORT ""
+#define EVENT__PACKAGE_BUGREPORT ""
/* Define to the full name of this package. */
-#define _EVENT_PACKAGE_NAME ""
+#define EVENT__PACKAGE_NAME ""
/* Define to the full name and version of this package. */
-#define _EVENT_PACKAGE_STRING ""
+#define EVENT__PACKAGE_STRING ""
/* Define to the one symbol short name of this package. */
-#define _EVENT_PACKAGE_TARNAME ""
+#define EVENT__PACKAGE_TARNAME ""
/* Define to the version of this package. */
-#define _EVENT_PACKAGE_VERSION ""
+#define EVENT__PACKAGE_VERSION ""
/* Define to necessary symbol if this constant uses a non-standard name on
your system. */
-/* #undef _EVENT_PTHREAD_CREATE_JOINABLE */
+/* #undef EVENT__PTHREAD_CREATE_JOINABLE */
/* The size of a `int', as computed by sizeof. */
-#define _EVENT_SIZEOF_INT 4
+#define EVENT__SIZEOF_INT 4
/* The size of a `long', as computed by sizeof. */
-#define _EVENT_SIZEOF_LONG 4
+#define EVENT__SIZEOF_LONG 4
/* The size of a `long long', as computed by sizeof. */
-#define _EVENT_SIZEOF_LONG_LONG 8
+#define EVENT__SIZEOF_LONG_LONG 8
/* The size of a `short', as computed by sizeof. */
-#define _EVENT_SIZEOF_SHORT 2
+#define EVENT__SIZEOF_SHORT 2
/* The size of `size_t', as computed by sizeof. */
#ifdef _WIN64
-#define _EVENT_SIZEOF_SIZE_T 8
+#define EVENT__SIZEOF_SIZE_T 8
#else
-#define _EVENT_SIZEOF_SIZE_T 4
+#define EVENT__SIZEOF_SIZE_T 4
#endif
/* The size of `void *', as computed by sizeof. */
#ifdef _WIN64
-#define _EVENT_SIZEOF_VOID_P 8
+#define EVENT__SIZEOF_VOID_P 8
#else
-#define _EVENT_SIZEOF_VOID_P 4
+#define EVENT__SIZEOF_VOID_P 4
#endif
/* Define to 1 if you have the ANSI C header files. */
-#define _EVENT_STDC_HEADERS 1
+#define EVENT__STDC_HEADERS 1
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
-#define _EVENT_TIME_WITH_SYS_TIME 1
+#define EVENT__TIME_WITH_SYS_TIME 1
/* Version number of package */
<<<<<<< HEAD
-#define _EVENT_VERSION "2.1.0-alpha-dev"
+#define EVENT__VERSION "2.1.0-alpha-dev"
||||||| merged common ancestors
-#define _EVENT_VERSION "2.0.16-stable-dev"
+#define EVENT__VERSION "2.0.16-stable-dev"
=======
-#define _EVENT_VERSION "2.0.17-stable"
+#define EVENT__VERSION "2.0.17-stable"
>>>>>>> origin/patches-2.0
/* Define to appropriate substitue if compiler doesnt have __func__ */
-#define _EVENT___func__ __FUNCTION__
+#define EVENT____func__ __FUNCTION__
/* Define to empty if `const' does not conform to ANSI C. */
-/* #undef _EVENT_const */
+/* #undef EVENT__const */
/* Define to `__inline__' or `__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. */
#ifndef _EVENT___cplusplus
-#define _EVENT_inline __inline
+#define EVENT__inline __inline
#endif
/* Define to `int' if <sys/types.h> does not define. */
-/* #undef _EVENT_pid_t */
+/* #undef EVENT__pid_t */
/* Define to `unsigned' if <sys/types.h> does not define. */
-/* #undef _EVENT_size_t */
+/* #undef EVENT__size_t */
/* Define to unsigned int if you dont have it */
-#define _EVENT_socklen_t unsigned int
+#define EVENT__socklen_t unsigned int
/* Define to `int' if <sys/types.h> does not define. */
-#define _EVENT_ssize_t SSIZE_T
+#define EVENT__ssize_t SSIZE_T
#endif
View
10 arc4random.c
@@ -59,7 +59,7 @@
#include <unistd.h>
#include <sys/param.h>
#include <sys/time.h>
-#ifdef _EVENT_HAVE_SYS_SYSCTL_H
+#ifdef EVENT__HAVE_SYS_SYSCTL_H
#include <sys/sysctl.h>
#endif
#endif
@@ -168,8 +168,8 @@ arc4_seed_win32(void)
}
#endif
-#if defined(_EVENT_HAVE_SYS_SYSCTL_H) && defined(_EVENT_HAVE_SYSCTL)
-#if _EVENT_HAVE_DECL_CTL_KERN && _EVENT_HAVE_DECL_KERN_RANDOM && _EVENT_HAVE_DECL_RANDOM_UUID
+#if defined(EVENT__HAVE_SYS_SYSCTL_H) && defined(EVENT__HAVE_SYSCTL)
+#if EVENT__HAVE_DECL_CTL_KERN && EVENT__HAVE_DECL_KERN_RANDOM && EVENT__HAVE_DECL_RANDOM_UUID
#define TRY_SEED_SYSCTL_LINUX
static int
arc4_seed_sysctl_linux(void)
@@ -206,7 +206,7 @@ arc4_seed_sysctl_linux(void)
}
#endif
-#if _EVENT_HAVE_DECL_CTL_KERN && _EVENT_HAVE_DECL_KERN_ARND
+#if EVENT__HAVE_DECL_CTL_KERN && EVENT__HAVE_DECL_KERN_ARND
#define TRY_SEED_SYSCTL_BSD
static int
arc4_seed_sysctl_bsd(void)
@@ -245,7 +245,7 @@ arc4_seed_sysctl_bsd(void)
return 0;
}
#endif
-#endif /* defined(_EVENT_HAVE_SYS_SYSCTL_H) */
+#endif /* defined(EVENT__HAVE_SYS_SYSCTL_H) */
#ifdef __linux__
#define TRY_SEED_PROC_SYS_KERNEL_RANDOM_UUID
View
38 buffer.c
@@ -34,7 +34,7 @@
#include <io.h>
#endif
-#ifdef _EVENT_HAVE_VASPRINTF
+#ifdef EVENT__HAVE_VASPRINTF
/* If we have vasprintf, we need to define _GNU_SOURCE before we include
* stdio.h. This comes from evconfig-private.h.
*/
@@ -42,30 +42,30 @@
#include <sys/types.h>
-#ifdef _EVENT_HAVE_SYS_TIME_H
+#ifdef EVENT__HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
-#ifdef _EVENT_HAVE_SYS_SOCKET_H
+#ifdef EVENT__HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
-#ifdef _EVENT_HAVE_SYS_UIO_H
+#ifdef EVENT__HAVE_SYS_UIO_H
#include <sys/uio.h>
#endif
-#ifdef _EVENT_HAVE_SYS_IOCTL_H
+#ifdef EVENT__HAVE_SYS_IOCTL_H
#include <sys/ioctl.h>
#endif
-#ifdef _EVENT_HAVE_SYS_MMAN_H
+#ifdef EVENT__HAVE_SYS_MMAN_H
#include <sys/mman.h>
#endif
-#ifdef _EVENT_HAVE_SYS_SENDFILE_H
+#ifdef EVENT__HAVE_SYS_SENDFILE_H
#include <sys/sendfile.h>
#endif
-#ifdef _EVENT_HAVE_SYS_STAT_H
+#ifdef EVENT__HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif
@@ -74,10 +74,10 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#ifdef _EVENT_HAVE_STDARG_H
+#ifdef EVENT__HAVE_STDARG_H
#include <stdarg.h>
#endif
-#ifdef _EVENT_HAVE_UNISTD_H
+#ifdef EVENT__HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <limits.h>
@@ -102,16 +102,16 @@
#endif
/* send file support */
-#if defined(_EVENT_HAVE_SYS_SENDFILE_H) && defined(_EVENT_HAVE_SENDFILE) && defined(__linux__)
+#if defined(EVENT__HAVE_SYS_SENDFILE_H) && defined(EVENT__HAVE_SENDFILE) && defined(__linux__)
#define USE_SENDFILE 1
#define SENDFILE_IS_LINUX 1
-#elif defined(_EVENT_HAVE_SENDFILE) && defined(__FreeBSD__)
+#elif defined(EVENT__HAVE_SENDFILE) && defined(__FreeBSD__)
#define USE_SENDFILE 1
#define SENDFILE_IS_FREEBSD 1
-#elif defined(_EVENT_HAVE_SENDFILE) && defined(__APPLE__)
+#elif defined(EVENT__HAVE_SENDFILE) && defined(__APPLE__)
#define USE_SENDFILE 1
#define SENDFILE_IS_MACOSX 1
-#elif defined(_EVENT_HAVE_SENDFILE) && defined(__sun__) && defined(__svr4__)
+#elif defined(EVENT__HAVE_SENDFILE) && defined(__sun__) && defined(__svr4__)
#define USE_SENDFILE 1
#define SENDFILE_IS_SOLARIS 1
#endif
@@ -413,7 +413,7 @@ evbuffer_defer_callbacks(struct evbuffer *buffer, struct event_base *base)
int
evbuffer_enable_locking(struct evbuffer *buf, void *lock)
{
-#ifdef _EVENT_DISABLE_THREAD_SUPPORT
+#ifdef EVENT__DISABLE_THREAD_SUPPORT
return -1;
#else
if (buf->lock)
@@ -2118,13 +2118,13 @@ evbuffer_expand(struct evbuffer *buf, size_t datlen)
* Reads data from a file descriptor into a buffer.
*/
-#if defined(_EVENT_HAVE_SYS_UIO_H) || defined(_WIN32)
+#if defined(EVENT__HAVE_SYS_UIO_H) || defined(_WIN32)
#define USE_IOVEC_IMPL
#endif
#ifdef USE_IOVEC_IMPL
-#ifdef _EVENT_HAVE_SYS_UIO_H
+#ifdef EVENT__HAVE_SYS_UIO_H
/* number of iovec we use for writev, fragmentation is going to determine
* how much we end up writing */
@@ -2938,7 +2938,7 @@ evbuffer_file_segment_materialize(struct evbuffer_file_segment *seg)
if (seg->contents)
return 0; /* already materialized */
-#if defined(_EVENT_HAVE_MMAP)
+#if defined(EVENT__HAVE_MMAP)
if (!(flags & EVBUF_FS_DISABLE_MMAP)) {
off_t offset_rounded = 0, offset_leftover = 0;
void *mapped;
@@ -3054,7 +3054,7 @@ evbuffer_file_segment_free(struct evbuffer_file_segment *seg)
if (seg->is_mapping) {
#ifdef _WIN32
CloseHandle(seg->mapping_handle);
-#elif defined (_EVENT_HAVE_MMAP)
+#elif defined (EVENT__HAVE_MMAP)
if (munmap(seg->mapping, seg->length) == -1)
event_warn("%s: munmap failed", __func__);
#endif
View
2  bufferevent-internal.h
@@ -384,7 +384,7 @@ int _bufferevent_generic_adj_timeouts(struct bufferevent *bev);
* bufferevent_private. */
#define BEV_UPCAST(b) EVUTIL_UPCAST((b), struct bufferevent_private, bev)
-#ifdef _EVENT_DISABLE_THREAD_SUPPORT
+#ifdef EVENT__DISABLE_THREAD_SUPPORT
#define BEV_LOCK(b) _EVUTIL_NIL_STMT
#define BEV_UNLOCK(b) _EVUTIL_NIL_STMT
#else
View
8 bufferevent.c
@@ -30,7 +30,7 @@
#include <sys/types.h>
-#ifdef _EVENT_HAVE_SYS_TIME_H
+#ifdef EVENT__HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
@@ -38,7 +38,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#ifdef _EVENT_HAVE_STDARG_H
+#ifdef EVENT__HAVE_STDARG_H
#include <stdarg.h>
#endif
@@ -307,7 +307,7 @@ bufferevent_init_common(struct bufferevent_private *bufev_private,
*/
bufev->enabled = EV_WRITE;
-#ifndef _EVENT_DISABLE_THREAD_SUPPORT
+#ifndef EVENT__DISABLE_THREAD_SUPPORT
if (options & BEV_OPT_THREADSAFE) {
if (bufferevent_enable_locking(bufev, NULL) < 0) {
/* cleanup */
@@ -718,7 +718,7 @@ bufferevent_incref(struct bufferevent *bufev)
int
bufferevent_enable_locking(struct bufferevent *bufev, void *lock)
{
-#ifdef _EVENT_DISABLE_THREAD_SUPPORT
+#ifdef EVENT__DISABLE_THREAD_SUPPORT
return -1;
#else
struct bufferevent *underlying;
View
6 bufferevent_async.c
@@ -29,7 +29,7 @@
#include "event2/event-config.h"
#include "evconfig-private.h"
-#ifdef _EVENT_HAVE_SYS_TIME_H
+#ifdef EVENT__HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
@@ -37,10 +37,10 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#ifdef _EVENT_HAVE_STDARG_H
+#ifdef EVENT__HAVE_STDARG_H
#include <stdarg.h>
#endif
-#ifdef _EVENT_HAVE_UNISTD_H
+#ifdef EVENT__HAVE_UNISTD_H
#include <unistd.h>
#endif
View
4 bufferevent_filter.c
@@ -32,7 +32,7 @@
#include "event2/event-config.h"
-#ifdef _EVENT_HAVE_SYS_TIME_H
+#ifdef EVENT__HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
@@ -40,7 +40,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#ifdef _EVENT_HAVE_STDARG_H
+#ifdef EVENT__HAVE_STDARG_H
#include <stdarg.h>
#endif
View
6 bufferevent_openssl.c
@@ -29,7 +29,7 @@
#include <sys/types.h>
-#ifdef _EVENT_HAVE_SYS_TIME_H
+#ifdef EVENT__HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
@@ -37,10 +37,10 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#ifdef _EVENT_HAVE_STDARG_H
+#ifdef EVENT__HAVE_STDARG_H
#include <stdarg.h>
#endif
-#ifdef _EVENT_HAVE_UNISTD_H
+#ifdef EVENT__HAVE_UNISTD_H
#include <unistd.h>
#endif
View
12 bufferevent_sock.c
@@ -31,7 +31,7 @@
#include <sys/types.h>
-#ifdef _EVENT_HAVE_SYS_TIME_H
+#ifdef EVENT__HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
@@ -39,10 +39,10 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#ifdef _EVENT_HAVE_STDARG_H
+#ifdef EVENT__HAVE_STDARG_H
#include <stdarg.h>
#endif
-#ifdef _EVENT_HAVE_UNISTD_H
+#ifdef EVENT__HAVE_UNISTD_H
#include <unistd.h>
#endif
@@ -51,13 +51,13 @@
#include <ws2tcpip.h>
#endif
-#ifdef _EVENT_HAVE_SYS_SOCKET_H
+#ifdef EVENT__HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
-#ifdef _EVENT_HAVE_NETINET_IN_H
+#ifdef EVENT__HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
-#ifdef _EVENT_HAVE_NETINET_IN6_H
+#ifdef EVENT__HAVE_NETINET_IN6_H
#include <netinet/in6.h>
#endif
View
6 devpoll.c
@@ -27,11 +27,11 @@
#include "event2/event-config.h"
#include "evconfig-private.h"
-#ifdef _EVENT_HAVE_DEVPOLL
+#ifdef EVENT__HAVE_DEVPOLL
#include <sys/types.h>
#include <sys/resource.h>
-#ifdef _EVENT_HAVE_SYS_TIME_H
+#ifdef EVENT__HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#include <sys/queue.h>
@@ -308,4 +308,4 @@ devpoll_dealloc(struct event_base *base)
mm_free(devpollop);
}
-#endif /* _EVENT_HAVE_DEVPOLL */
+#endif /* EVENT__HAVE_DEVPOLL */
View
10 epoll.c
@@ -27,12 +27,12 @@
#include "event2/event-config.h"
#include "evconfig-private.h"
-#ifdef _EVENT_HAVE_EPOLL
+#ifdef EVENT__HAVE_EPOLL
#include <stdint.h>
#include <sys/types.h>
#include <sys/resource.h>
-#ifdef _EVENT_HAVE_SYS_TIME_H
+#ifdef EVENT__HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#include <sys/queue.h>
@@ -44,7 +44,7 @@
#include <string.h>
#include <unistd.h>
#include <errno.h>
-#ifdef _EVENT_HAVE_FCNTL_H
+#ifdef EVENT__HAVE_FCNTL_H
#include <fcntl.h>
#endif
@@ -113,7 +113,7 @@ epoll_init(struct event_base *base)
int epfd = -1;
struct epollop *epollop;
-#ifdef _EVENT_HAVE_EPOLL_CREATE1
+#ifdef EVENT__HAVE_EPOLL_CREATE1
/* First, try the shiny new epoll_create1 interface, if we have it. */
epfd = epoll_create1(EPOLL_CLOEXEC);
#endif
@@ -590,4 +590,4 @@ epoll_dealloc(struct event_base *base)
mm_free(epollop);
}
-#endif /* _EVENT_HAVE_EPOLL */
+#endif /* EVENT__HAVE_EPOLL */
View
4 evbuffer-internal.h
@@ -50,7 +50,7 @@ extern "C" {
/* Minimum allocation for a chain. We define this so that we're burning no
* more than 5% of each allocation on overhead. It would be nice to lose even
* less space, though. */
-#if _EVENT_SIZEOF_VOID_P < 8
+#if EVENT__SIZEOF_VOID_P < 8
#define MIN_BUFFER_SIZE 512
#else
#define MIN_BUFFER_SIZE 1024
@@ -107,7 +107,7 @@ struct evbuffer {
* tried to invoke callbacks. */
size_t n_del_for_cb;
-#ifndef _EVENT_DISABLE_THREAD_SUPPORT
+#ifndef EVENT__DISABLE_THREAD_SUPPORT
/** A lock used to mediate access to this buffer. */
void *lock;
#endif
View
18 evdns.c
@@ -59,16 +59,16 @@
#include <string.h>
#include <fcntl.h>
-#ifdef _EVENT_HAVE_SYS_TIME_H
+#ifdef EVENT__HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
-#ifdef _EVENT_HAVE_STDINT_H
+#ifdef EVENT__HAVE_STDINT_H
#include <stdint.h>
#endif
#include <stdlib.h>
#include <string.h>
#include <errno.h>
-#ifdef _EVENT_HAVE_UNISTD_H
+#ifdef EVENT__HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <limits.h>
@@ -115,7 +115,7 @@
#include <arpa/inet.h>
#endif
-#ifdef _EVENT_HAVE_NETINET_IN6_H
+#ifdef EVENT__HAVE_NETINET_IN6_H
#include <netinet/in6.h>
#endif
@@ -253,7 +253,7 @@ struct evdns_server_port {
struct server_request *pending_replies;
struct event_base *event_base;
-#ifndef _EVENT_DISABLE_THREAD_SUPPORT
+#ifndef EVENT__DISABLE_THREAD_SUPPORT
void *lock;
#endif
};
@@ -355,7 +355,7 @@ struct evdns_base {
TAILQ_HEAD(hosts_list, hosts_entry) hostsdb;
-#ifndef _EVENT_DISABLE_THREAD_SUPPORT
+#ifndef EVENT__DISABLE_THREAD_SUPPORT
void *lock;
#endif
};
@@ -413,7 +413,7 @@ static void evdns_base_free_and_unlock(struct evdns_base *base, int fail_request
static int strtoint(const char *const str);
-#ifdef _EVENT_DISABLE_THREAD_SUPPORT
+#ifdef EVENT__DISABLE_THREAD_SUPPORT
#define EVDNS_LOCK(base) _EVUTIL_NIL_STMT
#define EVDNS_UNLOCK(base) _EVUTIL_NIL_STMT
#define ASSERT_LOCKED(base) _EVUTIL_NIL_STMT
@@ -2140,7 +2140,7 @@ evdns_server_request_get_requesting_addr(struct evdns_server_request *_req, stru
static void
evdns_request_timeout_callback(evutil_socket_t fd, short events, void *arg) {
struct request *const req = (struct request *) arg;
-#ifndef _EVENT_DISABLE_THREAD_SUPPORT
+#ifndef EVENT__DISABLE_THREAD_SUPPORT
struct evdns_base *base = req->base;
#endif
(void) fd;
@@ -3229,7 +3229,7 @@ evdns_resolv_set_defaults(struct evdns_base *base, int flags) {
if (flags & DNS_OPTION_NAMESERVERS) evdns_base_nameserver_ip_add(base,"127.0.0.1");
}
-#ifndef _EVENT_HAVE_STRTOK_R
+#ifndef EVENT__HAVE_STRTOK_R
static char *
strtok_r(char *s, const char *delim, char **state) {
char *cp, *start;
View
8 event-internal.h
@@ -162,7 +162,7 @@ struct event_changelist {
int changes_size;
};
-#ifndef _EVENT_DISABLE_DEBUG_MODE
+#ifndef EVENT__DISABLE_DEBUG_MODE
/* Global internal flag: set to one if debug mode is on. */
extern int _event_debug_mode_on;
#define EVENT_DEBUG_MODE_IS_ON() (_event_debug_mode_on)
@@ -243,7 +243,7 @@ struct event_base {
* too often. */
struct timeval tv_cache;
-#if defined(_EVENT_HAVE_CLOCK_GETTIME) && defined(CLOCK_MONOTONIC)
+#if defined(EVENT__HAVE_CLOCK_GETTIME) && defined(CLOCK_MONOTONIC)
/** Difference between internal time (maybe from clock_gettime) and
* gettimeofday. */
struct timeval tv_clock_diff;
@@ -251,7 +251,7 @@ struct event_base {
time_t last_updated_clock_diff;
#endif
-#ifndef _EVENT_DISABLE_THREAD_SUPPORT
+#ifndef EVENT__DISABLE_THREAD_SUPPORT
/* threading support */
/** The thread currently running the event_loop for this base */
unsigned long th_owner_id;
@@ -312,7 +312,7 @@ struct event_config {
};
/* Internal use only: Functions that might be missing from <sys/queue.h> */
-#if defined(_EVENT_HAVE_SYS_QUEUE_H) && !defined(_EVENT_HAVE_TAILQFOREACH)
+#if defined(EVENT__HAVE_SYS_QUEUE_H) && !defined(EVENT__HAVE_TAILQFOREACH)
#ifndef TAILQ_FIRST
#define TAILQ_FIRST(head) ((head)->tqh_first)
#endif
View
72 event.c
@@ -34,16 +34,16 @@
#undef WIN32_LEAN_AND_MEAN
#endif
#include <sys/types.h>
-#if !defined(_WIN32) && defined(_EVENT_HAVE_SYS_TIME_H)
+#if !defined(_WIN32) && defined(EVENT__HAVE_SYS_TIME_H)
#include <sys/time.h>
#endif
#include <sys/queue.h>
-#ifdef _EVENT_HAVE_SYS_SOCKET_H
+#ifdef EVENT__HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
#include <stdio.h>
#include <stdlib.h>
-#ifdef _EVENT_HAVE_UNISTD_H
+#ifdef EVENT__HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <ctype.h>
@@ -69,22 +69,22 @@
#include "ht-internal.h"
#include "util-internal.h"
-#ifdef _EVENT_HAVE_EVENT_PORTS
+#ifdef EVENT__HAVE_EVENT_PORTS
extern const struct eventop evportops;
#endif
-#ifdef _EVENT_HAVE_SELECT
+#ifdef EVENT__HAVE_SELECT
extern const struct eventop selectops;
#endif
-#ifdef _EVENT_HAVE_POLL
+#ifdef EVENT__HAVE_POLL
extern const struct eventop pollops;
#endif
-#ifdef _EVENT_HAVE_EPOLL
+#ifdef EVENT__HAVE_EPOLL
extern const struct eventop epollops;
#endif
-#ifdef _EVENT_HAVE_WORKING_KQUEUE
+#ifdef EVENT__HAVE_WORKING_KQUEUE
extern const struct eventop kqops;
#endif
-#ifdef _EVENT_HAVE_DEVPOLL
+#ifdef EVENT__HAVE_DEVPOLL
extern const struct eventop devpollops;
#endif
#ifdef _WIN32
@@ -93,22 +93,22 @@ extern const struct eventop win32ops;
/* Array of backends in order of preference. */
static const struct eventop *eventops[] = {
-#ifdef _EVENT_HAVE_EVENT_PORTS
+#ifdef EVENT__HAVE_EVENT_PORTS
&evportops,
#endif
-#ifdef _EVENT_HAVE_WORKING_KQUEUE
+#ifdef EVENT__HAVE_WORKING_KQUEUE
&kqops,
#endif
-#ifdef _EVENT_HAVE_EPOLL
+#ifdef EVENT__HAVE_EPOLL
&epollops,
#endif
-#ifdef _EVENT_HAVE_DEVPOLL
+#ifdef EVENT__HAVE_DEVPOLL
&devpollops,
#endif
-#ifdef _EVENT_HAVE_POLL
+#ifdef EVENT__HAVE_POLL
&pollops,
#endif
-#ifdef _EVENT_HAVE_SELECT
+#ifdef EVENT__HAVE_SELECT
&selectops,
#endif
#ifdef _WIN32
@@ -154,7 +154,7 @@ static int evthread_notify_base(struct event_base *base);
static void insert_common_timeout_inorder(struct common_timeout_list *ctl,
struct event *ev);
-#ifndef _EVENT_DISABLE_DEBUG_MODE
+#ifndef EVENT__DISABLE_DEBUG_MODE
/* These functions implement a hashtable of which 'struct event *' structures
* have been setup or added. We don't want to trust the content of the struct
* event itself, since we're trying to work through cases where an event gets
@@ -191,7 +191,7 @@ eq_debug_entry(const struct event_debug_entry *a,
int _event_debug_mode_on = 0;
/* Set if it's too late to enable event_debug_mode. */
static int event_debug_mode_too_late = 0;
-#ifndef _EVENT_DISABLE_THREAD_SUPPORT
+#ifndef EVENT__DISABLE_THREAD_SUPPORT
static void *_event_debug_map_lock = NULL;
#endif
static HT_HEAD(event_debug_map, event_debug_entry) global_debug_map =
@@ -335,7 +335,7 @@ HT_GENERATE(event_debug_map, event_debug_entry, node, hash_debug_entry,
static void
detect_monotonic(void)
{
-#if defined(_EVENT_HAVE_CLOCK_GETTIME) && defined(CLOCK_MONOTONIC)
+#if defined(EVENT__HAVE_CLOCK_GETTIME) && defined(CLOCK_MONOTONIC)
struct timespec ts;
static int use_monotonic_initialized = 0;
@@ -368,7 +368,7 @@ gettime(struct event_base *base, struct timeval *tp)
return (0);
}
-#if defined(_EVENT_HAVE_CLOCK_GETTIME) && defined(CLOCK_MONOTONIC)
+#if defined(EVENT__HAVE_CLOCK_GETTIME) && defined(CLOCK_MONOTONIC)
if (use_monotonic) {
struct timespec ts;
@@ -406,7 +406,7 @@ event_base_gettimeofday_cached(struct event_base *base, struct timeval *tv)
if (base->tv_cache.tv_sec == 0) {
r = evutil_gettimeofday(tv, NULL);
} else {
-#if defined(_EVENT_HAVE_CLOCK_GETTIME) && defined(CLOCK_MONOTONIC)
+#if defined(EVENT__HAVE_CLOCK_GETTIME) && defined(CLOCK_MONOTONIC)
evutil_timeradd(&base->tv_cache, &base->tv_clock_diff, tv);
#else
*tv = base->tv_cache;
@@ -539,7 +539,7 @@ event_base_get_deferred_cb_queue(struct event_base *base)
void
event_enable_debug_mode(void)
{
-#ifndef _EVENT_DISABLE_DEBUG_MODE
+#ifndef EVENT__DISABLE_DEBUG_MODE
if (_event_debug_mode_on)
event_errx(1, "%s was called twice!", __func__);
if (event_debug_mode_too_late)
@@ -576,7 +576,7 @@ event_base_new_with_config(const struct event_config *cfg)
struct event_base *base;
int should_check_environment;
-#ifndef _EVENT_DISABLE_DEBUG_MODE
+#ifndef EVENT__DISABLE_DEBUG_MODE
event_debug_mode_too_late = 1;
#endif
@@ -668,7 +668,7 @@ event_base_new_with_config(const struct event_config *cfg)
/* prepare for threading */
-#ifndef _EVENT_DISABLE_THREAD_SUPPORT
+#ifndef EVENT__DISABLE_THREAD_SUPPORT
if (EVTHREAD_LOCKING_ENABLED() &&
(!cfg || !(cfg->flags & EVENT_BASE_FLAG_NOLOCK))) {
int r;
@@ -1423,7 +1423,7 @@ event_process_active_single_queue(struct event_base *base,
ev->ev_res & EV_WRITE ? "EV_WRITE " : " ",
ev->ev_callback));
-#ifndef _EVENT_DISABLE_THREAD_SUPPORT
+#ifndef EVENT__DISABLE_THREAD_SUPPORT
base->current_event = ev;
base->current_event_waiters = 0;
#endif
@@ -1444,7 +1444,7 @@ event_process_active_single_queue(struct event_base *base,
}
EVBASE_ACQUIRE_LOCK(base, th_base_lock);
-#ifndef _EVENT_DISABLE_THREAD_SUPPORT
+#ifndef EVENT__DISABLE_THREAD_SUPPORT
base->current_event = NULL;
if (base->current_event_waiters) {
base->current_event_waiters = 0;
@@ -1684,7 +1684,7 @@ event_base_loop(struct event_base *base, int flags)
done = 0;
-#ifndef _EVENT_DISABLE_THREAD_SUPPORT
+#ifndef EVENT__DISABLE_THREAD_SUPPORT
base->th_owner_id = EVTHREAD_GET_ID();
#endif
@@ -1990,7 +1990,7 @@ event_pending(const struct event *ev, short event, struct timeval *tv)
if (tv != NULL && (flags & event & EV_TIMEOUT)) {
struct timeval tmp = ev->ev_timeout;
tmp.tv_usec &= MICROSECONDS_MASK;
-#if defined(_EVENT_HAVE_CLOCK_GETTIME) && defined(CLOCK_MONOTONIC)
+#if defined(EVENT__HAVE_CLOCK_GETTIME) && defined(CLOCK_MONOTONIC)
/* correctly remamp to real time */
evutil_timeradd(&ev->ev_base->tv_clock_diff, &tmp, tv);
#else
@@ -2174,7 +2174,7 @@ event_add_internal(struct event *ev, const struct timeval *tv,
* callback, and we are not the main thread, then we want to wait
* until the callback is done before we mess with the event, or else
* we can race on ev_ncalls and ev_pncalls below. */
-#ifndef _EVENT_DISABLE_THREAD_SUPPORT
+#ifndef EVENT__DISABLE_THREAD_SUPPORT
if (base->current_event == ev && (ev->ev_events & EV_SIGNAL)
&& !EVBASE_IN_THREAD(base)) {
++base->current_event_waiters;
@@ -2319,7 +2319,7 @@ event_del_internal(struct event *ev)
* when this function returns, it will be safe to free the
* user-supplied argument. */
base = ev->ev_base;
-#ifndef _EVENT_DISABLE_THREAD_SUPPORT
+#ifndef EVENT__DISABLE_THREAD_SUPPORT
if (base->current_event == ev && !EVBASE_IN_THREAD(base)) {
++base->current_event_waiters;
EVTHREAD_COND_WAIT(base->current_event_cond, base->th_base_lock);
@@ -2412,7 +2412,7 @@ event_active_nolock(struct event *ev, int res, short ncalls)
ev->ev_res = res;
if (ev->ev_events & EV_SIGNAL) {
-#ifndef _EVENT_DISABLE_THREAD_SUPPORT
+#ifndef EVENT__DISABLE_THREAD_SUPPORT
if (base->current_event == ev && !EVBASE_IN_THREAD(base)) {
++base->current_event_waiters;
EVTHREAD_COND_WAIT(base->current_event_cond, base->th_base_lock);
@@ -2776,13 +2776,13 @@ event_queue_insert_timeout(struct event_base *base, struct event *ev)
const char *
event_get_version(void)
{
- return (_EVENT_VERSION);
+ return (EVENT__VERSION);
}
ev_uint32_t
event_get_version_number(void)
{
- return (_EVENT_NUMERIC_VERSION);
+ return (EVENT__NUMERIC_VERSION);
}
/*
@@ -2796,7 +2796,7 @@ event_get_method(void)
return (current_base->evsel->name);
}
-#ifndef _EVENT_DISABLE_MM_REPLACEMENT
+#ifndef EVENT__DISABLE_MM_REPLACEMENT
static void *(*_mm_malloc_fn)(size_t sz) = NULL;
static void *(*_mm_realloc_fn)(void *p, size_t sz) = NULL;
static void (*_mm_free_fn)(void *p) = NULL;
@@ -3052,7 +3052,7 @@ dump_inserted_event_fn(struct event_base *base, struct event *e, void *arg)
struct timeval tv;
tv.tv_sec = e->ev_timeout.tv_sec;
tv.tv_usec = e->ev_timeout.tv_usec & MICROSECONDS_MASK;
-#if defined(_EVENT_HAVE_CLOCK_GETTIME) && defined(CLOCK_MONOTONIC)
+#if defined(EVENT__HAVE_CLOCK_GETTIME) && defined(CLOCK_MONOTONIC)
evutil_timeradd(&tv, &base->tv_clock_diff, &tv);
#endif
fprintf(output, " Timeout=%ld.%06d",
@@ -3114,11 +3114,11 @@ event_base_del_virtual(struct event_base *base)
EVBASE_RELEASE_LOCK(base, th_base_lock);
}
-#ifndef _EVENT_DISABLE_THREAD_SUPPORT
+#ifndef EVENT__DISABLE_THREAD_SUPPORT
int
event_global_setup_locks_(const int enable_locks)
{
-#ifndef _EVENT_DISABLE_DEBUG_MODE
+#ifndef EVENT__DISABLE_DEBUG_MODE
EVTHREAD_SETUP_GLOBAL_LOCK(_event_debug_map_lock, 0);
#endif
if (evsig_global_setup_locks_(enable_locks) < 0)
View
8 event_tagging.c
@@ -28,10 +28,10 @@
#include "event2/event-config.h"
#include "evconfig-private.h"
-#ifdef _EVENT_HAVE_SYS_TYPES_H
+#ifdef EVENT__HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
-#ifdef _EVENT_HAVE_SYS_PARAM_H
+#ifdef EVENT__HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
@@ -45,7 +45,7 @@
#endif
#include <sys/queue.h>
-#ifdef _EVENT_HAVE_SYS_TIME_H
+#ifdef EVENT__HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
@@ -56,7 +56,7 @@
#ifndef _WIN32
#include <syslog.h>
#endif
-#ifdef _EVENT_HAVE_UNISTD_H
+#ifdef EVENT__HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <limits.h>
View
2  evmap.c
@@ -33,7 +33,7 @@
#undef WIN32_LEAN_AND_MEAN
#endif
#include <sys/types.h>
-#if !defined(_WIN32) && defined(_EVENT_HAVE_SYS_TIME_H)
+#if !defined(_WIN32) && defined(EVENT__HAVE_SYS_TIME_H)
#include <sys/time.h>
#endif
#include <sys/queue.h>
View
4 evport.c
@@ -56,7 +56,7 @@
#include "event2/event-config.h"
#include "evconfig-private.h"
-#ifdef _EVENT_HAVE_EVENT_PORTS
+#ifdef EVENT__HAVE_EVENT_PORTS
#include <sys/time.h>
#include <sys/queue.h>
@@ -448,4 +448,4 @@ evport_dealloc(struct event_base *base)
mm_free(evpd);
}
-#endif /* _EVENT_HAVE_EVENT_PORTS */
+#endif /* EVENT__HAVE_EVENT_PORTS */
View
2  evrpc.c
@@ -38,7 +38,7 @@
#ifndef _WIN32
#include <sys/socket.h>
#endif
-#ifdef _EVENT_HAVE_SYS_TIME_H
+#ifdef EVENT__HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#include <sys/queue.h>
View
2  evsignal-internal.h
@@ -48,7 +48,7 @@ struct evsig_info {
/* Array of previous signal handler objects before Libevent started
* messing with them. Used to restore old signal handlers. */
-#ifdef _EVENT_HAVE_SIGACTION
+#ifdef EVENT__HAVE_SIGACTION
struct sigaction **sh_old;
#else
ev_sighandler_t **sh_old;
View
8 evthread-internal.h
@@ -46,7 +46,7 @@ struct event_base;
#define EVTHREAD_EXPOSE_STRUCTS
#endif
-#if ! defined(_EVENT_DISABLE_THREAD_SUPPORT) && defined(EVTHREAD_EXPOSE_STRUCTS)
+#if ! defined(EVENT__DISABLE_THREAD_SUPPORT) && defined(EVTHREAD_EXPOSE_STRUCTS)
/* Global function pointers to lock-related functions. NULL if locking isn't
enabled. */
extern struct evthread_lock_callbacks _evthread_lock_fns;
@@ -179,7 +179,7 @@ EVLOCK_TRY_LOCK(void *lock)
#define EVTHREAD_LOCKING_ENABLED() \
(_evthread_lock_fns.lock != NULL)
-#elif ! defined(_EVENT_DISABLE_THREAD_SUPPORT)
+#elif ! defined(EVENT__DISABLE_THREAD_SUPPORT)
unsigned long _evthreadimpl_get_id(void);
int _evthreadimpl_is_lock_debugging_enabled(void);
@@ -291,7 +291,7 @@ EVLOCK_TRY_LOCK(void *lock)
#define EVTHREAD_LOCKING_ENABLED() \
(_evthreadimpl_locking_enabled())
-#else /* _EVENT_DISABLE_THREAD_SUPPORT */
+#else /* EVENT__DISABLE_THREAD_SUPPORT */
#define EVTHREAD_GET_ID() 1
#define EVTHREAD_ALLOC_LOCK(lockvar, locktype) _EVUTIL_NIL_STMT
@@ -322,7 +322,7 @@ EVLOCK_TRY_LOCK(void *lock)
#endif
/* This code is shared between both lock impls */
-#if ! defined(_EVENT_DISABLE_THREAD_SUPPORT)
+#if ! defined(EVENT__DISABLE_THREAD_SUPPORT)
/** Helper: put lockvar1 and lockvar2 into pointerwise ascending order. */
#define _EVLOCK_SORTLOCKS(lockvar1, lockvar2) \
do { \
View
2  evthread.c
@@ -27,7 +27,7 @@
#include "event2/event-config.h"
#include "evconfig-private.h"
-#ifndef _EVENT_DISABLE_THREAD_SUPPORT
+#ifndef EVENT__DISABLE_THREAD_SUPPORT
#include "event2/thread.h"
View
4 evthread_pthread.c
@@ -87,13 +87,13 @@ evthread_posix_get_id(void)
{
union {
pthread_t thr;
-#if _EVENT_SIZEOF_PTHREAD_T > _EVENT_SIZEOF_LONG
+#if EVENT__SIZEOF_PTHREAD_T > EVENT__SIZEOF_LONG
ev_uint64_t id;
#else
unsigned long id;
#endif
} r;
-#if _EVENT_SIZEOF_PTHREAD_T < _EVENT_SIZEOF_LONG
+#if EVENT__SIZEOF_PTHREAD_T < EVENT__SIZEOF_LONG
memset(&r, 0, sizeof(r));
#endif
r.thr = pthread_self();
View
76 evutil.c
@@ -42,44 +42,44 @@
#endif
#include <sys/types.h>
-#ifdef _EVENT_HAVE_SYS_SOCKET_H
+#ifdef EVENT__HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
-#ifdef _EVENT_HAVE_UNISTD_H
+#ifdef EVENT__HAVE_UNISTD_H
#include <unistd.h>
#endif
-#ifdef _EVENT_HAVE_FCNTL_H
+#ifdef EVENT__HAVE_FCNTL_H
#include <fcntl.h>
#endif
-#ifdef _EVENT_HAVE_STDLIB_H
+#ifdef EVENT__HAVE_STDLIB_H
#include <stdlib.h>
#endif
#include <errno.h>
#include <limits.h>
#include <stdio.h>
#include <string.h>
-#ifdef _EVENT_HAVE_NETINET_IN_H
+#ifdef EVENT__HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
-#ifdef _EVENT_HAVE_NETINET_IN6_H
+#ifdef EVENT__HAVE_NETINET_IN6_H
#include <netinet/in6.h>
#endif
-#ifdef _EVENT_HAVE_NETINET_TCP_H
+#ifdef EVENT__HAVE_NETINET_TCP_H
#include <netinet/tcp.h>
#endif
-#ifdef _EVENT_HAVE_ARPA_INET_H
+#ifdef EVENT__HAVE_ARPA_INET_H
#include <arpa/inet.h>
#endif
-#if !defined(_EVENT_HAVE_NANOSLEEP) && !defined(EVENT_HAVE_USLEEP) && \
+#if !defined(EVENT__HAVE_NANOSLEEP) && !defined(EVENT_HAVE_USLEEP) && \
!defined(_WIN32)
#include <sys/select.h>
#endif
-#ifndef _EVENT_HAVE_GETTIMEOFDAY
+#ifndef EVENT__HAVE_GETTIMEOFDAY
#include <sys/timeb.h>
#include <time.h>
#endif
#include <sys/stat.h>
-#ifdef _EVENT_HAVE_IFADDRS_H
+#ifdef EVENT__HAVE_IFADDRS_H
#include <ifaddrs.h>
#endif
@@ -370,7 +370,7 @@ evutil_make_listen_socket_reuseable(evutil_socket_t sock)
int
evutil_make_tcp_listen_socket_deferred(evutil_socket_t sock)
{
-#if defined(_EVENT_HAVE_NETINET_TCP_H) && defined(TCP_DEFER_ACCEPT)
+#if defined(EVENT__HAVE_NETINET_TCP_H) && defined(TCP_DEFER_ACCEPT)
int one = 1;
/* TCP_DEFER_ACCEPT tells the kernel to call defer accept() only after data
@@ -384,7 +384,7 @@ evutil_make_tcp_listen_socket_deferred(evutil_socket_t sock)
int
evutil_make_socket_closeonexec(evutil_socket_t fd)
{
-#if !defined(_WIN32) && defined(_EVENT_HAVE_SETFD)
+#if !defined(_WIN32) && defined(EVENT__HAVE_SETFD)
int flags;
if ((flags = fcntl(fd, F_GETFD, NULL)) < 0) {
event_warn("fcntl(%d, F_GETFD)", fd);
@@ -405,7 +405,7 @@ evutil_make_socket_closeonexec(evutil_socket_t fd)
static int
evutil_fast_socket_closeonexec(evutil_socket_t fd)
{
-#if !defined(_WIN32) && defined(_EVENT_HAVE_SETFD)
+#if !defined(_WIN32) && defined(EVENT__HAVE_SETFD)
if (fcntl(fd, F_SETFD, FD_CLOEXEC) == -1) {
event_warn("fcntl(%d, F_SETFD)", fd);
return -1;
@@ -427,9 +427,9 @@ evutil_closesocket(evutil_socket_t sock)
ev_int64_t
evutil_strtoll(const char *s, char **endptr, int base)
{
-#ifdef _EVENT_HAVE_STRTOLL
+#ifdef EVENT__HAVE_STRTOLL
return (ev_int64_t)strtoll(s, endptr, base);
-#elif _EVENT_SIZEOF_LONG == 8
+#elif EVENT__SIZEOF_LONG == 8
return (ev_int64_t)strtol(s, endptr, base);
#elif defined(_WIN32) && defined(_MSC_VER) && _MSC_VER < 1300
/* XXXX on old versions of MS APIs, we only support base
@@ -449,7 +449,7 @@ evutil_strtoll(const char *s, char **endptr, int base)
return r;
#elif defined(_WIN32)
return (ev_int64_t) _strtoi64(s, endptr, base);
-#elif defined(_EVENT_SIZEOF_LONG_LONG) && _EVENT_SIZEOF_LONG_LONG == 8
+#elif defined(EVENT__SIZEOF_LONG_LONG) && EVENT__SIZEOF_LONG_LONG == 8
long long r;
int n;
if (base != 10 && base != 16)
@@ -484,7 +484,7 @@ evutil_strtoll(const char *s, char **endptr, int base)
#endif
}
-#ifndef _EVENT_HAVE_GETTIMEOFDAY
+#ifndef EVENT__HAVE_GETTIMEOFDAY
/* No gettimeofday; this must be windows. */
int
evutil_gettimeofday(struct timeval *tv, struct timezone *tz)
@@ -667,7 +667,7 @@ typedef ULONG (WINAPI *GetAdaptersAddresses_fn_t)(
static int
evutil_check_ifaddrs(void)
{
-#if defined(_EVENT_HAVE_GETIFADDRS)
+#if defined(EVENT__HAVE_GETIFADDRS)
/* Most free Unixy systems provide getifaddrs, which gives us a linked list
* of struct ifaddrs. */
struct ifaddrs *ifa = NULL;
@@ -898,7 +898,7 @@ evutil_parse_servname(const char *servname, const char *protocol,
int n = parse_numeric_servname(servname);
if (n>=0)
return n;
-#if defined(_EVENT_HAVE_GETSERVBYNAME) || defined(_WIN32)
+#if defined(EVENT__HAVE_GETSERVBYNAME) || defined(_WIN32)
if (!(hints->ai_flags & EVUTIL_AI_NUMERICSERV)) {
struct servent *ent = getservbyname(servname, protocol);
if (ent) {
@@ -926,7 +926,7 @@ evutil_unparse_protoname(int proto)
return "sctp";
#endif
default:
-#ifdef _EVENT_HAVE_GETPROTOBYNUMBER
+#ifdef EVENT__HAVE_GETPROTOBYNUMBER
{
struct protoent *ent = getprotobynumber(proto);
if (ent)
@@ -1095,7 +1095,7 @@ evutil_getaddrinfo_common(const char *nodename, const char *servname,
return EVUTIL_EAI_NEED_RESOLVE;
}
-#ifdef _EVENT_HAVE_GETADDRINFO
+#ifdef EVENT__HAVE_GETADDRINFO
#define USE_NATIVE_GETADDRINFO
#endif
@@ -1473,19 +1473,19 @@ evutil_getaddrinfo(const char *nodename, const char *servname,
err = 0;
/* Use any of the various gethostbyname_r variants as available. */
{
-#ifdef _EVENT_HAVE_GETHOSTBYNAME_R_6_ARG
+#ifdef EVENT__HAVE_GETHOSTBYNAME_R_6_ARG
/* This one is what glibc provides. */
char buf[2048];
struct hostent hostent;
int r;
r = gethostbyname_r(nodename, &hostent, buf, sizeof(buf), &ent,
&err);
-#elif defined(_EVENT_HAVE_GETHOSTBYNAME_R_5_ARG)
+#elif defined(EVENT__HAVE_GETHOSTBYNAME_R_5_ARG)
char buf[2048];
struct hostent hostent;
ent = gethostbyname_r(nodename, &hostent, buf, sizeof(buf),
&err);
-#elif defined(_EVENT_HAVE_GETHOSTBYNAME_R_3_ARG)
+#elif defined(EVENT__HAVE_GETHOSTBYNAME_R_3_ARG)
struct hostent_data data;
struct hostent hostent;
memset(&data, 0, sizeof(data));
@@ -1550,7 +1550,7 @@ evutil_getaddrinfo(const char *nodename, const char *servname,
void
evutil_freeaddrinfo(struct evutil_addrinfo *ai)
{
-#ifdef _EVENT_HAVE_GETADDRINFO
+#ifdef EVENT__HAVE_GETADDRINFO
if (!(ai->ai_flags & EVUTIL_AI_LIBEVENT_ALLOCATED)) {
freeaddrinfo(ai);
return;
@@ -1759,7 +1759,7 @@ evutil_vsnprintf(char *buf, size_t buflen, const char *format, va_list ap)
const char *
evutil_inet_ntop(int af, const void *src, char *dst, size_t len)
{
-#if defined(_EVENT_HAVE_INET_NTOP) && !defined(USE_INTERNAL_NTOP)
+#if defined(EVENT__HAVE_INET_NTOP) && !defined(USE_INTERNAL_NTOP)
return inet_ntop(af, src, dst, len);
#else
if (af == AF_INET) {
@@ -1855,7 +1855,7 @@ evutil_inet_ntop(int af, const void *src, char *dst, size_t len)
int
evutil_inet_pton(int af, const char *src, void *dst)
{
-#if defined(_EVENT_HAVE_INET_PTON) && !defined(USE_INTERNAL_PTON)
+#if defined(EVENT__HAVE_INET_PTON) && !defined(USE_INTERNAL_PTON)
return inet_pton(af, src, dst);
#else
if (af == AF_INET) {
@@ -2032,7 +2032,7 @@ evutil_parse_sockaddr_port(const char *ip_as_string, struct sockaddr *out, int *
{
struct sockaddr_in6 sin6;
memset(&sin6, 0, sizeof(sin6));
-#ifdef _EVENT_HAVE_STRUCT_SOCKADDR_IN6_SIN6_LEN
+#ifdef EVENT__HAVE_STRUCT_SOCKADDR_IN6_SIN6_LEN
sin6.sin6_len = sizeof(sin6);
#endif
sin6.sin6_family = AF_INET6;
@@ -2051,7 +2051,7 @@ evutil_parse_sockaddr_port(const char *ip_as_string, struct sockaddr *out, int *
{
struct sockaddr_in sin;
memset(&sin, 0, sizeof(sin));
-#ifdef _EVENT_HAVE_STRUCT_SOCKADDR_IN_SIN_LEN
+#ifdef EVENT__HAVE_STRUCT_SOCKADDR_IN_SIN_LEN
sin.sin_len = sizeof(sin);
#endif
sin.sin_family = AF_INET;
@@ -2247,15 +2247,15 @@ int evutil_ascii_strncasecmp(const char *s1, const char *s2, size_t n)
static int
evutil_issetugid(void)
{
-#ifdef _EVENT_HAVE_ISSETUGID
+#ifdef EVENT__HAVE_ISSETUGID
return issetugid();
#else
-#ifdef _EVENT_HAVE_GETEUID
+#ifdef EVENT__HAVE_GETEUID
if (getuid() != geteuid())
return 1;
#endif
-#ifdef _EVENT_HAVE_GETEGID
+#ifdef EVENT__HAVE_GETEGID
if (getgid() != getegid())
return 1;
#endif
@@ -2366,7 +2366,7 @@ evutil_usleep(const struct timeval *tv)
ts.tv_nsec = tv->tv_usec*1000;
nanosleep(&ts, NULL);
}
-#elif defined(_EVENT_HAVE_USLEEP)
+#elif defined(EVENT__HAVE_USLEEP)
/* Some systems don't like to usleep more than 999999 usec */
sleep(tv->tv_sec);
usleep(tv->tv_usec);
@@ -2426,7 +2426,7 @@ evutil_accept4(evutil_socket_t sockfd, struct sockaddr *addr,
ev_socklen_t *addrlen, int flags)
{
evutil_socket_t result;
-#if defined(_EVENT_HAVE_ACCEPT4) && defined(SOCK_CLOEXEC) && defined(SOCK_NONBLOCK)
+#if defined(EVENT__HAVE_ACCEPT4) && defined(SOCK_CLOEXEC) && defined(SOCK_NONBLOCK)
result = accept4(sockfd, addr, addrlen, flags);
if (result >= 0 || errno != EINVAL)
return result;
@@ -2466,11 +2466,11 @@ evutil_make_internal_pipe(evutil_socket_t fd[2])
or woken up and in the process of draining it.
*/
-#if defined(_EVENT_HAVE_PIPE2)
+#if defined(EVENT__HAVE_PIPE2)
if (pipe2(fd, O_NONBLOCK|O_CLOEXEC) == 0)
return 0;
#endif
-#if defined(_EVENT_HAVE_PIPE)
+#if defined(EVENT__HAVE_PIPE)
if (pipe(fd) == 0) {
if (evutil_fast_socket_nonblocking(fd[0]) < 0 ||
evutil_fast_socket_nonblocking(fd[1]) < 0 ||
@@ -2515,7 +2515,7 @@ evutil_make_internal_pipe(evutil_socket_t fd[2])
evutil_socket_t
evutil_eventfd(unsigned initval, int flags)
{
-#if defined(_EVENT_HAVE_EVENTFD) && defined(_EVENT_HAVE_SYS_EVENTFD_H)
+#if defined(EVENT__HAVE_EVENTFD) && defined(EVENT__HAVE_SYS_EVENTFD_H)
int r;
#if defined(EFD_CLOEXEC) && defined(EFD_NONBLOCK)
r = eventfd(initval, flags);
View
14 evutil_rand.c
@@ -40,7 +40,7 @@
#include "util-internal.h"
#include "evthread-internal.h"
-#ifdef _EVENT_HAVE_ARC4RANDOM
+#ifdef EVENT__HAVE_ARC4RANDOM
#include <stdlib.h>
#include <string.h>
int
@@ -59,7 +59,7 @@ evutil_secure_rng_global_setup_locks_(const int enable_locks)
static void
ev_arc4random_buf(void *buf, size_t n)
{
-#ifdef _EVENT_HAVE_ARC4RANDOM_BUF
+#ifdef EVENT__HAVE_ARC4RANDOM_BUF
return arc4random_buf(buf, n);
#else
unsigned char *b = buf;
@@ -84,15 +84,15 @@ ev_arc4random_buf(void *buf, size_t n)
#endif
}
-#else /* !_EVENT_HAVE_ARC4RANDOM { */
+#else /* !EVENT__HAVE_ARC4RANDOM { */
-#ifdef _EVENT_ssize_t
+#ifdef EVENT__ssize_t
#define ssize_t _EVENT_SSIZE_t
#endif
#define ARC4RANDOM_EXPORT static
#define _ARC4_LOCK() EVLOCK_LOCK(arc4rand_lock, 0)
#define _ARC4_UNLOCK() EVLOCK_UNLOCK(arc4rand_lock, 0)
-#ifndef _EVENT_DISABLE_THREAD_SUPPORT
+#ifndef EVENT__DISABLE_THREAD_SUPPORT
static void *arc4rand_lock;
#endif
@@ -103,7 +103,7 @@ static void *arc4rand_lock;
#include "./arc4random.c"
-#ifndef _EVENT_DISABLE_THREAD_SUPPORT
+#ifndef EVENT__DISABLE_THREAD_SUPPORT
int
evutil_secure_rng_global_setup_locks_(const int enable_locks)
{
@@ -131,7 +131,7 @@ ev_arc4random_buf(void *buf, size_t n)
arc4random_buf(buf, n);
}
-#endif /* } !_EVENT_HAVE_ARC4RANDOM */
+#endif /* } !EVENT__HAVE_ARC4RANDOM */
void
evutil_secure_rng_get_bytes(void *buf, size_t n)
View
22 http.c
@@ -28,14 +28,14 @@
#include "event2/event-config.h"
#include "evconfig-private.h"
-#ifdef _EVENT_HAVE_SYS_PARAM_H
+#ifdef EVENT__HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
-#ifdef _EVENT_HAVE_SYS_TYPES_H
+#ifdef EVENT__HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
-#ifdef _EVENT_HAVE_SYS_TIME_H
+#ifdef EVENT__HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_SYS_IOCCOM_H
@@ -54,13 +54,13 @@
#include <sys/queue.h>
-#ifdef _EVENT_HAVE_NETINET_IN_H
+#ifdef EVENT__HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
-#ifdef _EVENT_HAVE_ARPA_INET_H
+#ifdef EVENT__HAVE_ARPA_INET_H
#include <arpa/inet.h>
#endif
-#ifdef _EVENT_HAVE_NETDB_H
+#ifdef EVENT__HAVE_NETDB_H
#include <netdb.h>
#endif
@@ -77,10 +77,10 @@
#endif
#include <signal.h>
#include <time.h>
-#ifdef _EVENT_HAVE_UNISTD_H
+#ifdef EVENT__HAVE_UNISTD_H
#include <unistd.h>
#endif
-#ifdef _EVENT_HAVE_FCNTL_H
+#ifdef EVENT__HAVE_FCNTL_H
#include <fcntl.h>
#endif
@@ -102,7 +102,7 @@
#include "mm-internal.h"
#include "bufferevent-internal.h"
-#ifndef _EVENT_HAVE_GETNAMEINFO
+#ifndef EVENT__HAVE_GETNAMEINFO
#define NI_MAXSERV 32
#define NI_MAXHOST 1025
@@ -198,7 +198,7 @@ static int evhttp_decode_uri_internal(const char *uri, size_t length,
static int evhttp_find_vhost(struct evhttp *http, struct evhttp **outhttp,
const char *hostname);
-#ifndef _EVENT_HAVE_STRSEP
+#ifndef EVENT__HAVE_STRSEP
/* strsep replacement for platforms that lack it. Only works if
* del is one character long. */
static char *
@@ -3946,7 +3946,7 @@ name_from_addr(struct sockaddr *sa, ev_socklen_t salen,
char strport[NI_MAXSERV];
int ni_result;
-#ifdef _EVENT_HAVE_GETNAMEINFO
+#ifdef EVENT__HAVE_GETNAMEINFO
ni_result = getnameinfo(sa, salen,
ntop, sizeof(ntop), strport, sizeof(strport),
NI_NUMERICHOST|NI_NUMERICSERV);
View
6 include/event.h
@@ -42,13 +42,13 @@ extern "C" {
#endif
#include <event2/event-config.h>
-#ifdef _EVENT_HAVE_SYS_TYPES_H
+#ifdef EVENT__HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
-#ifdef _EVENT_HAVE_SYS_TIME_H
+#ifdef EVENT__HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
-#ifdef _EVENT_HAVE_STDINT_H
+#ifdef EVENT__HAVE_STDINT_H
#include <stdint.h>
#endif
#include <stdarg.h>
View
6 include/event2/buffer.h
@@ -78,10 +78,10 @@ extern "C" {
#include <event2/event-config.h>
#include <stdarg.h>
-#ifdef _EVENT_HAVE_SYS_TYPES_H
+#ifdef EVENT__HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
-#ifdef _EVENT_HAVE_SYS_UIO_H
+#ifdef EVENT__HAVE_SYS_UIO_H
#include <sys/uio.h>
#endif
#include <event2/util.h>
@@ -132,7 +132,7 @@ struct evbuffer_ptr {
@see evbuffer_reserve_space, evbuffer_commit_space, evbuffer_peek
*/
-#ifdef _EVENT_HAVE_SYS_UIO_H
+#ifdef EVENT__HAVE_SYS_UIO_H
#define evbuffer_iovec iovec
/* Internal use -- defined only if we are using the native struct iovec */
#define _EVBUFFER_IOVEC_IS_NATIVE
View
4 include/event2/bufferevent.h
@@ -79,10 +79,10 @@ extern "C" {
#endif
#include <event2/event-config.h>
-#ifdef _EVENT_HAVE_SYS_TYPES_H
+#ifdef EVENT__HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
-#ifdef _EVENT_HAVE_SYS_TIME_H
+#ifdef EVENT__HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
View
2  include/event2/bufferevent_ssl.h
@@ -52,7 +52,7 @@ enum bufferevent_ssl_state {
BUFFEREVENT_SSL_ACCEPTING = 2
};
-#if defined(_EVENT_HAVE_OPENSSL) || defined(_EVENT_IN_DOXYGEN)
+#if defined(EVENT__HAVE_OPENSSL) || defined(_EVENT_IN_DOXYGEN)
/**
Create a new SSL bufferevent to send its data over another bufferevent.
View
4 include/event2/bufferevent_struct.h