From 71d01ae185d95888e3908cce5dba99890e970931 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Thu, 12 Sep 2019 20:35:46 -0700 Subject: All HAVE_* macros should be tested with #if, not #ifdef. * configure: In several config tests, test HAVE_SUPERLONG_T, HAVE_LONGLONG_T and HAVE_SYS_WAIT with #if. * lib.c: Test HAVE_GETENVIRONMENTSTRINGS with #if. * lib.h: Test HAVE_DOUBLE_INTPTR_T with #if. * mpi/mpi.c: Likewise. * mpi/mpi.h: Likewise. * socket.c: Test HAVE_GETADDRINFO with #if in three places. * stream.c: Test HAVE_SYS_WAIT and HAVE_SOCKETS with #if. --- stream.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'stream.c') diff --git a/stream.c b/stream.c index 5e0073ed..a57f9280 100644 --- a/stream.c +++ b/stream.c @@ -1271,7 +1271,7 @@ static val pipe_close(val stream, val throw_on_error) lit("unable to obtain status of command ~s: ~d/~s"), stream, num(errno), string_utf8(strerror(errno)), nao); } else { -#ifdef HAVE_SYS_WAIT +#if HAVE_SYS_WAIT if (throw_on_error) { if (WIFSIGNALED(status)) { int termsig = WTERMSIG(status); @@ -4749,7 +4749,7 @@ void stream_init(void) reg_fun(intern(lit("stream-set-prop"), user_package), func_n3(stream_set_prop)); reg_fun(intern(lit("stream-get-prop"), user_package), func_n2(stream_get_prop)); reg_fun(intern(lit("fileno"), user_package), func_n1(stream_fd)); -#ifdef HAVE_SOCKETS +#if HAVE_SOCKETS reg_fun(intern(lit("sock-family"), user_package), func_n1(sock_family)); reg_fun(intern(lit("sock-type"), user_package), func_n1(sock_type)); reg_fun(intern(lit("sock-peer"), user_package), func_n1(sock_peer)); -- cgit v1.2.3