Explicitly request literal mode after .Xr.
[netbsd-mini2440.git] / dist / tcpdump / machdep.c
blob4703e5e2fb00b782713de63304a76896fb37898e
1 /* $NetBSD: machdep.c,v 1.5 2007/07/24 11:53:40 drochner Exp $ */
3 /*
4 * Copyright (c) 1996, 1997
5 * The Regents of the University of California. All rights reserved.
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that: (1) source code distributions
9 * retain the above copyright notice and this paragraph in its entirety, (2)
10 * distributions including binary code include the above copyright notice and
11 * this paragraph in its entirety in the documentation or other materials
12 * provided with the distribution, and (3) all advertising materials mentioning
13 * features or use of this software display the following acknowledgement:
14 * ``This product includes software developed by the University of California,
15 * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
16 * the University nor the names of its contributors may be used to endorse
17 * or promote products derived from this software without specific prior
18 * written permission.
19 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
20 * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
21 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
24 #include <sys/cdefs.h>
25 #ifndef lint
26 #if 0
27 static const char rcsid[] _U_ =
28 "@(#) Header: /tcpdump/master/tcpdump/machdep.c,v 1.13 2003/12/15 03:53:21 guy Exp (LBL)";
29 #else
30 __RCSID("$NetBSD: machdep.c,v 1.5 2007/07/24 11:53:40 drochner Exp $");
31 #endif
32 #endif
34 #ifdef HAVE_CONFIG_H
35 #include "config.h"
36 #endif
39 * XXX - all we need, on platforms other than DEC OSF/1 (a/k/a Digital UNIX,
40 * a/k/a Tru64 UNIX), is "size_t", which is a standard C type; what do we
41 * need to do to get it defined? This is clearly wrong, as we shouldn't
42 * have to include UNIX or Windows system header files to get it.
44 #include <tcpdump-stdinc.h>
46 #ifndef HAVE___ATTRIBUTE__
47 #define __attribute__(x)
48 #endif /* HAVE___ATTRIBUTE__ */
50 #ifdef __osf__
51 #include <sys/sysinfo.h>
52 #include <sys/proc.h>
54 #if !defined(HAVE_SNPRINTF)
55 int snprintf(char *, size_t, const char *, ...)
56 __attribute__((format(printf, 3, 4)));
57 #endif /* !defined(HAVE_SNPRINTF) */
58 #endif /* __osf__ */
60 #include "machdep.h"
62 int
63 abort_on_misalignment(char *ebuf _U_, size_t ebufsiz _U_)
65 #ifdef __osf__
66 static int buf[2] = { SSIN_UACPROC, UAC_SIGBUS };
68 if (setsysinfo(SSI_NVPAIRS, (caddr_t)buf, 1, 0, 0) < 0) {
69 (void)snprintf(ebuf, ebufsiz, "setsysinfo: errno %d", errno);
70 return (-1);
72 #endif
73 return (0);