From 34e014ac7502357e599935c62c18cba564c451be Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 16 Dec 2002 20:40:59 +0000 Subject: [PATCH] 2002-12-15 Roland McGrath * configure.in: Don't check for putpmsg. * stream.c (sys_getpmsg, sys_putpmsg): Make these conditional on #ifdef SYS_*, rather than on HAVE_PUTPMSG. --- configure.in | 2 +- stream.c | 25 ++++++++++++++----------- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/configure.in b/configure.in index 34ef1bc9..e8cd279b 100644 --- a/configure.in +++ b/configure.in @@ -172,7 +172,7 @@ AC_STRUCT_T_OPTHDR if test x$OPSYS != xLINUX; then AC_CHECK_LIB(nsl, main) fi -AC_CHECK_FUNCS(sigaction strerror strsignal pread sys_siglist _sys_siglist getdents mctl putpmsg prctl sendmsg inet_ntop if_indextoname) +AC_CHECK_FUNCS(sigaction strerror strsignal pread sys_siglist _sys_siglist getdents mctl prctl sendmsg inet_ntop if_indextoname) AC_CHECK_HEADERS(sys/reg.h sys/filio.h sys/acl.h sys/asynch.h sys/door.h stropts.h sys/conf.h sys/stream.h sys/tihdr.h sys/tiuser.h sys/sysconfig.h asm/sigcontext.h ioctls.h sys/ioctl.h sys/ptrace.h termio.h linux/ptrace.h asm/reg.h linux/icmp.h linux/in6.h sys/uio.h sys/aio.h linux/netlink.h linux/if_packet.h poll.h sys/poll.h sys/vfs.h netinet/tcp.h netinet/udp.h asm/sysmips.h linux/utsname.h sys/nscsys.h) AC_DECL_SYS_ERRLIST AC_DECL_SYS_SIGLIST diff --git a/stream.c b/stream.c index c8a6beb3..e48e0fc6 100644 --- a/stream.c +++ b/stream.c @@ -29,6 +29,7 @@ */ #include "defs.h" +#include #ifdef HAVE_POLL_H #include @@ -177,8 +178,7 @@ struct tcb *tcp; return RVAL_HEX | RVAL_STR; } -#ifdef HAVE_PUTPMSG - +#if defined SYS_putpmsg || defined SYS_getpmsg static struct xlat pmsgflags[] = { #ifdef MSG_HIPRI { MSG_HIPRI, "MSG_HIPRI" }, @@ -191,7 +191,9 @@ static struct xlat pmsgflags[] = { #endif { 0, NULL }, }; +#endif +#ifdef SYS_putpmsg int sys_putpmsg(tcp) struct tcb *tcp; @@ -212,7 +214,9 @@ struct tcb *tcp; } return 0; } +#endif /* SYS_putpmsg */ +#ifdef SYS_getpmsg int sys_getpmsg(tcp) struct tcb *tcp; @@ -263,8 +267,8 @@ struct tcb *tcp; } return RVAL_HEX | RVAL_STR; } +#endif /* SYS_getpmsg */ -#endif /* HAVE_PUTPMSG */ #endif /* !FREEBSD */ @@ -556,7 +560,7 @@ struct tcb *tcp; long addr; int len; { - /* We don't know how to tell if TLI (socket) or XTI + /* We don't know how to tell if TLI (socket) or XTI optmgmt is being used yet, assume TLI. */ #if defined (HAVE_OPTHDR) print_sock_optmgmt (tcp, addr, len); @@ -668,8 +672,8 @@ int len; while (0) #define COMMA() \ - do { if (c++) tprintf (", "); } while (0) - + do { if (c++) tprintf (", "); } while (0) + #define STRUCT(struct, elem, print) \ do { \ @@ -692,7 +696,7 @@ int len; while (0) #define ADDR(struct, elem) STRUCT (struct, elem, printstr) - + switch (m.type) { #ifdef T_CONN_REQ case T_CONN_REQ: /* connect request */ @@ -909,7 +913,7 @@ int len; #undef ADDR #undef COMMA #undef STRUCT - + return 0; } @@ -1064,7 +1068,7 @@ int arg; return RVAL_STR + 1; } } - + return 1; } @@ -1287,7 +1291,6 @@ int code, arg; } } -#endif /* !linux && !FREEBSD */ +#endif /* !linux && !FREEBSD */ #endif /* HAVE_SYS_STREAM_H || linux || FREEBSD */ - -- 2.40.0