* close one end of the socket pair (may be done in resolver thread);
* the other end (for reading) is always closed in the parent thread.
*/
-#ifndef USE_EVENTFD
+#ifndef HAVE_EVENTFD
if(tsd->sock_pair[1] != CURL_SOCKET_BAD) {
wakeup_close(tsd->sock_pair[1]);
}
else {
#ifndef CURL_DISABLE_SOCKETPAIR
if(tsd->sock_pair[1] != CURL_SOCKET_BAD) {
-#ifdef USE_EVENTFD
+#ifdef HAVE_EVENTFD
const uint64_t buf[1] = { 1 };
#else
const char buf[1] = { 1 };
and before cleanup */
if(multi->wakeup_pair[1] != CURL_SOCKET_BAD) {
while(1) {
-#ifdef USE_EVENTFD
+#ifdef HAVE_EVENTFD
/* eventfd has a stringent rule of requiring the 8-byte buffer when
calling write(2) on it */
const uint64_t buf[1] = { 1 };
#else
#ifdef ENABLE_WAKEUP
wakeup_close(multi->wakeup_pair[0]);
-#ifndef USE_EVENTFD
+#ifndef HAVE_EVENTFD
wakeup_close(multi->wakeup_pair[1]);
#endif
#endif
#include "curl_setup.h"
-#if defined(HAVE_EVENTFD) && \
- (defined(__x86_64__) || \
- defined(__aarch64__) || \
- defined(__ia64__) || \
- defined(__ppc64__) || \
- defined(__mips64) || \
- defined(__sparc64__) || \
- defined(__riscv_64e) || \
- defined(__s390x__))
-
-/* Use eventfd only with 64-bit CPU architectures because eventfd has a
- * stringent rule of requiring the 8-byte buffer when calling read(2) and
- * write(2) on it. In some rare cases, the C standard library implementation
- * on a 32-bit system might choose to define uint64_t as a 32-bit type for
- * various reasons (memory limitations, compatibility with older code),
- * which makes eventfd broken.
- */
-#define USE_EVENTFD 1
+#ifdef HAVE_EVENTFD
#define wakeup_write write
#define wakeup_read read
#include <curl/curl.h>
int Curl_pipe(curl_socket_t socks[2], bool nonblocking);
-#else /* !USE_EVENTFD && !HAVE_PIPE */
+#else /* !HAVE_EVENTFD && !HAVE_PIPE */
#define wakeup_write swrite
#define wakeup_read sread
#define wakeup_create(p,nb)\
Curl_socketpair(SOCKETPAIR_FAMILY, SOCKETPAIR_TYPE, 0, p, nb)
-#endif /* USE_EVENTFD */
+#endif /* HAVE_EVENTFD */
#ifndef CURL_DISABLE_SOCKETPAIR
#include <curl/curl.h>