]> git.ipfire.org Git - thirdparty/glibc.git/blame - bits/environments.h
Update copyright dates with scripts/update-copyrights.
[thirdparty/glibc.git] / bits / environments.h
CommitLineData
f7a9f785 1/* Copyright (C) 1999-2016 Free Software Foundation, Inc.
b9b49b44
UD
2 This file is part of the GNU C Library.
3
4 The GNU C Library is free software; you can redistribute it and/or
41bdb6e2
AJ
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
b9b49b44
UD
8
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
41bdb6e2 12 Lesser General Public License for more details.
b9b49b44 13
41bdb6e2 14 You should have received a copy of the GNU Lesser General Public
59ba27a6
PE
15 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
b9b49b44
UD
17
18#ifndef _UNISTD_H
19# error "Never include this file directly. Use <unistd.h> instead"
20#endif
21
1c25bcac
UD
22#include <bits/wordsize.h>
23
b9b49b44
UD
24/* This header should define the following symbols under the described
25 situations. A value `1' means that the model is always supported,
26 `-1' means it is never supported. Undefined means it cannot be
27 statically decided.
28
26b62243
UD
29 _POSIX_V7_ILP32_OFF32 32bit int, long, pointers, and off_t type
30 _POSIX_V7_ILP32_OFFBIG 32bit int, long, and pointers and larger off_t type
b9b49b44 31
26b62243
UD
32 _POSIX_V7_LP64_OFF32 64bit long and pointers and 32bit off_t type
33 _POSIX_V7_LPBIG_OFFBIG 64bit long and pointers and large off_t type
d20f21a2 34
26b62243
UD
35 The macros _POSIX_V6_ILP32_OFF32, _POSIX_V6_ILP32_OFFBIG,
36 _POSIX_V6_LP64_OFF32, _POSIX_V6_LPBIG_OFFBIG, _XBS5_ILP32_OFF32,
37 _XBS5_ILP32_OFFBIG, _XBS5_LP64_OFF32, and _XBS5_LPBIG_OFFBIG were
38 used in previous versions of the Unix standard and are available
39 only for compatibility.
b9b49b44
UD
40*/
41
1c25bcac
UD
42#if __WORDSIZE == 64
43
44/* We can never provide environments with 32-bit wide pointers. */
26b62243
UD
45# define _POSIX_V7_ILP32_OFF32 -1
46# define _POSIX_V7_ILP32_OFFBIG -1
d20f21a2
UD
47# define _POSIX_V6_ILP32_OFF32 -1
48# define _POSIX_V6_ILP32_OFFBIG -1
1c25bcac
UD
49# define _XBS5_ILP32_OFF32 -1
50# define _XBS5_ILP32_OFFBIG -1
d95f7853
UD
51/* We also have no use (for now) for an environment with bigger pointers
52 and offsets. */
26b62243 53# define _POSIX_V7_LPBIG_OFFBIG -1
d95f7853
UD
54# define _POSIX_V6_LPBIG_OFFBIG -1
55# define _XBS5_LPBIG_OFFBIG -1
1c25bcac
UD
56
57/* By default we have 64-bit wide `long int', pointers and `off_t'. */
26b62243 58# define _POSIX_V7_LP64_OFF64 1
fc2083cc 59# define _POSIX_V6_LP64_OFF64 1
fc2083cc 60# define _XBS5_LP64_OFF64 1
1c25bcac
UD
61
62#else /* __WORDSIZE == 32 */
63
d20f21a2
UD
64/* By default we have 32-bit wide `int', `long int', pointers and `off_t'
65 and all platforms support LFS. */
26b62243
UD
66# define _POSIX_V7_ILP32_OFF32 1
67# define _POSIX_V7_ILP32_OFFBIG 1
d20f21a2
UD
68# define _POSIX_V6_ILP32_OFF32 1
69# define _POSIX_V6_ILP32_OFFBIG 1
1c25bcac 70# define _XBS5_ILP32_OFF32 1
d20f21a2 71# define _XBS5_ILP32_OFFBIG 1
1c25bcac
UD
72
73/* We optionally provide an environment with the above size but an 64-bit
26b62243 74 side `off_t'. Therefore we don't define _POSIX_V7_ILP32_OFFBIG. */
1c25bcac
UD
75
76/* We can never provide environments with 64-bit wide pointers. */
26b62243
UD
77# define _POSIX_V7_LP64_OFF64 -1
78# define _POSIX_V7_LPBIG_OFFBIG -1
d20f21a2
UD
79# define _POSIX_V6_LP64_OFF64 -1
80# define _POSIX_V6_LPBIG_OFFBIG -1
1c25bcac
UD
81# define _XBS5_LP64_OFF64 -1
82# define _XBS5_LPBIG_OFFBIG -1
83
28f367c4
UD
84/* CFLAGS. */
85#define __ILP32_OFFBIG_CFLAGS "-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
86
1c25bcac 87#endif /* __WORDSIZE == 32 */