]>
git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blob - include/platform_defs.h.in
2 * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of version 2 of the GNU General Public License as
6 * published by the Free Software Foundation.
8 * This program is distributed in the hope that it would be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12 * Further, this software is distributed without any warranty that it is
13 * free of the rightful claim of any third person regarding infringement
14 * or the like. Any license provided herein, whether implied or
15 * otherwise, applies only to this software file. Patent licenses, if
16 * any, provided herein do not apply to combinations of this program with
17 * other software, or any other product whatsoever.
19 * You should have received a copy of the GNU General Public License along
20 * with this program; if not, write the Free Software Foundation, Inc., 59
21 * Temple Place - Suite 330, Boston MA 02111-1307, USA.
23 * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
24 * Mountain View, CA 94043, or:
28 * For further information regarding this notice, see:
30 * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
34 #ifndef __XFS_PLATFORM_DEFS_H__
35 #define __XFS_PLATFORM_DEFS_H__
45 #include <sys/param.h>
46 #include <sys/types.h>
48 #if (__GLIBC__ < 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ <= 1))
49 # define constpp const char * const *
51 # define constpp char * const *
56 # define O_DIRECT 0x100000
60 typedef loff_t xfs_off_t
;
61 typedef __uint64_t xfs_ino_t
;
62 typedef __uint32_t xfs_dev_t
;
63 typedef __int64_t xfs_daddr_t
;
64 typedef char* xfs_caddr_t
;
66 /* long and pointer must be either 32 bit or 64 bit */
67 #undef HAVE_64BIT_LONG
68 #undef HAVE_32BIT_LONG
72 /* Check if __psint_t is set to something meaningful */
74 #ifndef HAVE___PSINT_T
75 # ifdef HAVE_32BIT_PTR
76 typedef int __psint_t
;
77 # elif defined HAVE_64BIT_PTR
78 # ifdef HAVE_64BIT_LONG
79 typedef long __psint_t
;
81 /* This is a very strange architecture, which has 64 bit pointers but
82 * not 64 bit longs. So, I'd just punt here and assume long long is Ok */
83 typedef long long __psint_t
;
86 # error Unknown pointer size
90 /* Check if __psunsigned_t is set to something meaningful */
91 #undef HAVE___PSUNSIGNED_T
92 #ifndef HAVE___PSUNSIGNED_T
93 # ifdef HAVE_32BIT_PTR
94 typedef unsigned int __psunsigned_t
;
95 # elif defined HAVE_64BIT_PTR
96 # ifdef HAVE_64BIT_LONG
97 typedef long __psunsigned_t
;
99 /* This is a very strange architecture, which has 64 bit pointers but
100 * not 64 bit longs. So, I'd just punt here and assume long long is Ok */
101 typedef unsigned long long __psunsigned_t
;
104 # error Unknown pointer size
109 # define ASSERT assert
111 # define ASSERT(EX) ((void) 0)
114 #endif /* __XFS_PLATFORM_DEFS_H__ */