libparted 3.6
Loading...
Searching...
No Matches
platform_defs.h
Go to the documentation of this file.
1/* include/platform_defs.h. Generated automatically by configure. */
2/*
3 * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of version 3 of the GNU General Public License as
7 * published by the Free Software Foundation.
8 *
9 * This program is distributed in the hope that it would be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12 *
13 * Further, this software is distributed without any warranty that it is
14 * free of the rightful claim of any third person regarding infringement
15 * or the like. Any license provided herein, whether implied or
16 * otherwise, applies only to this software file. Patent licenses, if
17 * any, provided herein do not apply to combinations of this program with
18 * other software, or any other product whatsoever.
19 *
20 * You should have received a copy of the GNU General Public License along
21 * with this program. If not, see <http://www.gnu.org/licenses/>.
22 *
23 * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
24 * Mountain View, CA 94043, or:
25 *
26 * http://www.sgi.com
27 *
28 * For further information regarding this notice, see:
29 *
30 * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
31 *
32 * @configure_input@
33 */
34#ifndef __XFS_PLATFORM_DEFS_H__
35#define __XFS_PLATFORM_DEFS_H__
36
37#include <stdio.h>
38#include <stdarg.h>
39#include <assert.h>
40#include <endian.h>
41#include <fcntl.h>
42#include <stddef.h>
43#include <stdlib.h>
44#include <string.h>
45#include <unistd.h>
46#include <sys/param.h>
47#include <sys/types.h>
48
49#if (__GLIBC__ <= 2) && (__GLIBC_MINOR__ <= 1)
50# define constpp const char * const *
51#else
52# define constpp char * const *
53#endif
54
55typedef loff_t xfs_off_t;
56typedef uint64_t xfs_ino_t;
57typedef uint32_t xfs_dev_t;
58typedef int64_t xfs_daddr_t;
59typedef char* xfs_caddr_t;
60
61/* long and pointer must be either 32 bit or 64 bit */
62/* #undef HAVE_64BIT_LONG */
63#define HAVE_32BIT_LONG 1
64#define HAVE_32BIT_PTR 1
65/* #undef HAVE_64BIT_PTR */
66
67/* Check if __psint_t is set to something meaningful */
68/* #undef HAVE___PSINT_T */
69#ifndef HAVE___PSINT_T
70# ifdef HAVE_32BIT_PTR
71typedef int __psint_t;
72# elif defined HAVE_64BIT_PTR
73# ifdef HAVE_64BIT_LONG
74typedef long __psint_t;
75# else
76/* This is a very strange architecture, which has 64 bit pointers but
77 * not 64 bit longs. So, I'd just punt here and assume long long is Ok */
78typedef long long __psint_t;
79# endif
80# else
81# error Unknown pointer size
82# endif
83#endif
84
85/* Check if __psunsigned_t is set to something meaningful */
86/* #undef HAVE___PSUNSIGNED_T */
87#ifndef HAVE___PSUNSIGNED_T
88# ifdef HAVE_32BIT_PTR
89typedef unsigned int __psunsigned_t;
90# elif defined HAVE_64BIT_PTR
91# ifdef HAVE_64BIT_LONG
92typedef long __psunsigned_t;
93# else
94/* This is a very strange architecture, which has 64 bit pointers but
95 * not 64 bit longs. So, I'd just punt here and assume long long is Ok */
96typedef unsigned long long __psunsigned_t;
97# endif
98# else
99# error Unknown pointer size
100# endif
101#endif
102
103#ifdef DEBUG
104# define ASSERT assert
105#else
106# define ASSERT(EX) ((void) 0)
107#endif
108
109#endif /* __XFS_PLATFORM_DEFS_H__ */
unsigned int __psunsigned_t
Definition: platform_defs.h:89
int __psint_t
Definition: platform_defs.h:71
uint32_t xfs_dev_t
Definition: platform_defs.h:57
char * xfs_caddr_t
Definition: platform_defs.h:59
loff_t xfs_off_t
Definition: platform_defs.h:55
int64_t xfs_daddr_t
Definition: platform_defs.h:58
uint64_t xfs_ino_t
Definition: platform_defs.h:56