1 /* PSPP - computes sample statistics.
2 Copyright (C) 1997-9, 2000 Free Software Foundation, Inc.
3 Written by Ben Pfaff <blp@gnu.org>.
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public License as
7 published by the Free Software Foundation; either version 2 of the
8 License, or (at your option) any later version.
10 This program is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
22 #ifdef STAT_MACROS_BROKEN
33 #endif /* STAT_MACROS_BROKEN. */
35 #if !defined(S_ISBLK) && defined(S_IFBLK)
36 #define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
38 #if !defined(S_ISCHR) && defined(S_IFCHR)
39 #define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
41 #if !defined(S_ISDIR) && defined(S_IFDIR)
42 #define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
44 #if !defined(S_ISREG) && defined(S_IFREG)
45 #define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
47 #if !defined(S_ISFIFO) && defined(S_IFIFO)
48 #define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
50 #if !defined(S_ISLNK) && defined(S_IFLNK)
51 #define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
53 #if !defined(S_ISSOCK) && defined(S_IFSOCK)
54 #define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK)
56 #if !defined(S_ISMPB) && defined(S_IFMPB) /* V7 */
57 #define S_ISMPB(m) (((m) & S_IFMT) == S_IFMPB)
58 #define S_ISMPC(m) (((m) & S_IFMT) == S_IFMPC)
60 #if !defined(S_ISNWK) && defined(S_IFNWK) /* HP/UX */
61 #define S_ISNWK(m) (((m) & S_IFMT) == S_IFNWK)
63 #if !defined(HAVE_MKFIFO)
64 #define mkfifo(path, mode) (mknod ((path), (mode) | S_IFIFO, 0))