]> granicus.if.org Git - strace/commitdiff
2002-12-15 Roland McGrath <roland@redhat.com>
authorRoland McGrath <roland@redhat.com>
Mon, 16 Dec 2002 20:40:59 +0000 (20:40 +0000)
committerRoland McGrath <roland@redhat.com>
Mon, 16 Dec 2002 20:40:59 +0000 (20:40 +0000)
* 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
stream.c

index 34ef1bc9e4c9412156481e0bf0080e321d1140aa..e8cd279bec7b9e2ea541c6bd8551b2d7c9af92b2 100644 (file)
@@ -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
index c8a6beb3eb5e5a2425d79d6596d27630d14c15a1..e48e0fc63ee822b8d916498458a84dc7578067c3 100644 (file)
--- a/stream.c
+++ b/stream.c
@@ -29,6 +29,7 @@
  */
 
 #include "defs.h"
+#include <sys/syscall.h>
 
 #ifdef HAVE_POLL_H
 #include <poll.h>
@@ -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 */
-