CLEANUP: build: rename some build macros to use the USE_* ones
We still have quite a number of build macros which are mapped 1:1 to a
USE_something setting in the makefile but which have a different name.
This patch cleans this up by renaming them to use the USE_something
one, allowing to clean up the makefile and make it more obvious when
reading the code what build option needs to be added.
The following renames were done :
ENABLE_POLL -> USE_POLL
ENABLE_EPOLL -> USE_EPOLL
ENABLE_KQUEUE -> USE_KQUEUE
ENABLE_EVPORTS -> USE_EVPORTS
TPROXY -> USE_TPROXY
NETFILTER -> USE_NETFILTER
NEED_CRYPT_H -> USE_CRYPT_H
CONFIG_HAP_CRYPT -> USE_LIBCRYPT
CONFIG_HAP_NS -> DUSE_NS
CONFIG_HAP_LINUX_SPLICE -> USE_LINUX_SPLICE
CONFIG_HAP_LINUX_TPROXY -> USE_LINUX_TPROXY
CONFIG_HAP_LINUX_VSYSCALL -> USE_LINUX_VSYSCALL
diff --git a/src/fd.c b/src/fd.c
index d924155..d87dddc 100644
--- a/src/fd.c
+++ b/src/fd.c
@@ -151,7 +151,7 @@
#include <sys/types.h>
#include <sys/resource.h>
-#if defined(ENABLE_POLL)
+#if defined(USE_POLL)
#include <poll.h>
#include <errno.h>
#endif
@@ -477,7 +477,7 @@
closefrom(start);
}
-#elif defined(ENABLE_POLL)
+#elif defined(USE_POLL)
/* This is a portable implementation of closefrom(). It closes all open file
* descriptors starting at <start> and above. It relies on the fact that poll()
* will return POLLNVAL for each invalid (hence close) file descriptor passed
@@ -534,7 +534,7 @@
}
}
-#else // defined(ENABLE_POLL)
+#else // defined(USE_POLL)
/* This is a portable implementation of closefrom(). It closes all open file
* descriptors starting at <start> and above. This is a naive version for use
@@ -556,7 +556,7 @@
while (start < nbfds)
close(start++);
}
-#endif // defined(ENABLE_POLL)
+#endif // defined(USE_POLL)
/* disable the specified poller */
void disable_poller(const char *poller_name)