From 8ff0cd70c6b9f9a20628fccbe7e1492070f9a8b2 Mon Sep 17 00:00:00 2001 From: Xu Meng Date: Mon, 15 Jul 2019 23:58:25 -0500 Subject: [PATCH] ibmi: support Makefile build for IBM i libuv can only be compiled using node-gyp on IBM i. This commit allows it compiled with autoconf & automake. PR-URL: https://github.com/libuv/libuv/pull/2379 Reviewed-By: Ben Noordhuis Reviewed-By: Colin Ihrig Reviewed-By: Richard Lau --- Makefile.am | 19 +++++++++++++++++++ configure.ac | 1 + 2 files changed, 20 insertions(+) diff --git a/Makefile.am b/Makefile.am index 9154c888..6b11c934 100644 --- a/Makefile.am +++ b/Makefile.am @@ -324,6 +324,12 @@ test_run_tests_CFLAGS += -D_ALL_SOURCE \ -D_LINUX_SOURCE_COMPAT endif +if OS400 +test_run_tests_CFLAGS += -D_ALL_SOURCE \ + -D_XOPEN_SOURCE=500 \ + -D_LINUX_SOURCE_COMPAT +endif + if HAIKU test_run_tests_CFLAGS += -D_BSD_SOURCE endif @@ -364,6 +370,19 @@ uvinclude_HEADERS += include/uv/aix.h libuv_la_SOURCES += src/unix/aix.c src/unix/aix-common.c endif +if OS400 +libuv_la_CFLAGS += -D_ALL_SOURCE \ + -D_XOPEN_SOURCE=500 \ + -D_LINUX_SOURCE_COMPAT \ + -D_THREAD_SAFE +uvinclude_HEADERS += include/uv/posix.h +libuv_la_SOURCES += src/unix/aix-common.c \ + src/unix/ibmi.c \ + src/unix/posix-poll.c \ + src/unix/no-fsevents.c \ + src/unix/no-proctitle.c +endif + if ANDROID uvinclude_HEADERS += include/uv/android-ifaddrs.h libuv_la_SOURCES += src/unix/android-ifaddrs.c \ diff --git a/configure.ac b/configure.ac index 52aaddcf..c4c0c80a 100644 --- a/configure.ac +++ b/configure.ac @@ -63,6 +63,7 @@ AM_CONDITIONAL([MSYS], [AS_CASE([$host_os],[msys*], [true], [false]) AM_CONDITIONAL([NETBSD], [AS_CASE([$host_os],[netbsd*], [true], [false])]) AM_CONDITIONAL([OPENBSD], [AS_CASE([$host_os],[openbsd*], [true], [false])]) AM_CONDITIONAL([OS390], [AS_CASE([$host_os],[openedition*], [true], [false])]) +AM_CONDITIONAL([OS400], [AS_CASE([$host_os],[os400], [true], [false])]) AM_CONDITIONAL([SUNOS], [AS_CASE([$host_os],[solaris*], [true], [false])]) AM_CONDITIONAL([WINNT], [AS_CASE([$host_os],[mingw*], [true], [false])]) AS_CASE([$host_os],[mingw*], [