]>
git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blob - include/platform_defs.h.in
2 * Copyright (c) 2000-2005 Silicon Graphics, Inc.
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public License
7 * as published by the Free Software Foundation.
9 * This program is distributed in the hope that it would be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with this program; if not, write the Free Software Foundation,
16 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 #ifndef __XFS_PLATFORM_DEFS_H__
21 #define __XFS_PLATFORM_DEFS_H__
35 #include <sys/types.h>
40 typedef struct filldir filldir_t
;
42 /* long and pointer must be either 32 bit or 64 bit */
45 #define BITS_PER_LONG (SIZEOF_LONG * CHAR_BIT)
47 /* Check whether to define umode_t ourselves. */
49 typedef unsigned short umode_t
;
52 /* Define if you want gettext (I18N) support */
56 # define _(x) gettext(x)
61 # define textdomain(d) do { } while (0)
62 # define bindtextdomain(d,dir) do { } while (0)
66 #define IRIX_DEV_BITSMAJOR 14
67 #define IRIX_DEV_BITSMINOR 18
68 #define IRIX_DEV_MAXMAJ 0x1ff
69 #define IRIX_DEV_MAXMIN 0x3ffff
70 #define IRIX_DEV_MAJOR(dev) ((int)(((unsigned)(dev) >> IRIX_DEV_BITSMINOR) \
72 #define IRIX_DEV_MINOR(dev) ((int)((dev) & IRIX_DEV_MAXMIN))
73 #define IRIX_MKDEV(major,minor) ((xfs_dev_t)(((major) << IRIX_DEV_BITSMINOR) \
74 | (minor&IRIX_DEV_MAXMIN)))
75 #define IRIX_DEV_TO_KDEVT(dev) makedev(IRIX_DEV_MAJOR(dev),IRIX_DEV_MINOR(dev))
78 #define min(a,b) (((a)<(b))?(a):(b))
79 #define max(a,b) (((a)>(b))?(a):(b))
87 # define ASSERT(EX) assert(EX)
89 # define ASSERT(EX) ((void) 0)
92 #endif /* __XFS_PLATFORM_DEFS_H__ */