configure.ac: add automake conditional "LINUX"

This commit is contained in:
Max Kellermann 2018-08-22 16:08:07 +02:00
parent 98eed1f5ab
commit fe2f7a3e5a
5 changed files with 8 additions and 12 deletions

View File

@ -617,12 +617,16 @@ libsystem_a_SOURCES = \
src/system/UniqueFileDescriptor.hxx \
src/system/Open.cxx src/system/Open.hxx \
src/system/EventPipe.cxx src/system/EventPipe.hxx \
src/system/EventFD.cxx src/system/EventFD.hxx \
src/system/SignalFD.cxx src/system/SignalFD.hxx \
src/system/EpollFD.cxx src/system/EpollFD.hxx \
src/system/PeriodClock.hxx \
src/system/Clock.cxx src/system/Clock.hxx
if LINUX
libsystem_a_SOURCES += \
src/system/EventFD.cxx src/system/EventFD.hxx \
src/system/SignalFD.cxx src/system/SignalFD.hxx \
src/system/EpollFD.cxx src/system/EpollFD.hxx
endif
# Event loop library
libevent_a_SOURCES = \

View File

@ -138,6 +138,7 @@ haiku*)
;;
esac
AM_CONDITIONAL([LINUX], [test x$host_is_linux = xyes])
AM_CONDITIONAL([ANDROID], [test x$host_is_android = xyes])
AM_CONDITIONAL([HAVE_WINDOWS], [test x$host_is_windows = xyes])

View File

@ -28,7 +28,6 @@
*/
#include "config.h"
#ifdef USE_EPOLL
#include "EpollFD.hxx"
#include "Error.hxx"
@ -38,5 +37,3 @@ EpollFD::EpollFD()
if (!fd.IsDefined())
throw MakeErrno("epoll_create1() failed");
}
#endif /* USE_EPOLL */

View File

@ -28,7 +28,6 @@
*/
#include "config.h"
#ifdef __linux__
#include "EventFD.hxx"
#include "system/Error.hxx"
#include "util/Compiler.h"
@ -60,5 +59,3 @@ EventFD::Write() noexcept
gcc_unused ssize_t nbytes =
fd.Write(&value, sizeof(value));
}
#endif /* USE_EVENTFD */

View File

@ -28,7 +28,6 @@
*/
#include "config.h"
#ifdef __linux__
#include "SignalFD.hxx"
#include "Error.hxx"
@ -52,5 +51,3 @@ SignalFD::Read() noexcept
? info.ssi_signo
: -1;
}
#endif /* __linux__ */