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#if HAVE_ENDIAN_H
41# include <endian.h>
42#elif HAVE_SYS_ENDIAN_H
43# include <sys/endian.h>
44#endif
45#include <fcntl.h>
46#include <stddef.h>
47#include <stdlib.h>
48#include <string.h>
49#include <unistd.h>
50#include <sys/param.h>
51#include <sys/types.h>
52
53#if (__GLIBC__ <= 2) && (__GLIBC_MINOR__ <= 1)
54# define constpp const char * const *
55#else
56# define constpp char * const *
57#endif
58
59typedef loff_t xfs_off_t;
60typedef uint64_t xfs_ino_t;
61typedef uint32_t xfs_dev_t;
62typedef int64_t xfs_daddr_t;
63typedef char* xfs_caddr_t;
64
65/* long and pointer must be either 32 bit or 64 bit */
66/* #undef HAVE_64BIT_LONG */
67#define HAVE_32BIT_LONG 1
68#define HAVE_32BIT_PTR 1
69/* #undef HAVE_64BIT_PTR */
70
71/* Check if __psint_t is set to something meaningful */
72/* #undef HAVE___PSINT_T */
73#ifndef HAVE___PSINT_T
74# ifdef HAVE_32BIT_PTR
75typedef int __psint_t;
76# elif defined HAVE_64BIT_PTR
77# ifdef HAVE_64BIT_LONG
78typedef long __psint_t;
79# else
80/* This is a very strange architecture, which has 64 bit pointers but
81 * not 64 bit longs. So, I'd just punt here and assume long long is Ok */
82typedef long long __psint_t;
83# endif
84# else
85# error Unknown pointer size
86# endif
87#endif
88
89/* Check if __psunsigned_t is set to something meaningful */
90/* #undef HAVE___PSUNSIGNED_T */
91#ifndef HAVE___PSUNSIGNED_T
92# ifdef HAVE_32BIT_PTR
93typedef unsigned int __psunsigned_t;
94# elif defined HAVE_64BIT_PTR
95# ifdef HAVE_64BIT_LONG
96typedef long __psunsigned_t;
97# else
98/* This is a very strange architecture, which has 64 bit pointers but
99 * not 64 bit longs. So, I'd just punt here and assume long long is Ok */
100typedef unsigned long long __psunsigned_t;
101# endif
102# else
103# error Unknown pointer size
104# endif
105#endif
106
107#ifdef DEBUG
108# define ASSERT assert
109#else
110# define ASSERT(EX) ((void) 0)
111#endif
112
113#endif /* __XFS_PLATFORM_DEFS_H__ */
unsigned int __psunsigned_t
Definition platform_defs.h:93
int __psint_t
Definition platform_defs.h:75
uint32_t xfs_dev_t
Definition platform_defs.h:61
char * xfs_caddr_t
Definition platform_defs.h:63
loff_t xfs_off_t
Definition platform_defs.h:59
int64_t xfs_daddr_t
Definition platform_defs.h:62
uint64_t xfs_ino_t
Definition platform_defs.h:60