xref: /utopia/UTPA2-700.0.x/projects/tools/lint/mips-linux-gnu_include/bits/environments.h (revision 53ee8cc121a030b8d368113ac3e966b4705770ef)
1*53ee8cc1Swenshuai.xi /* Copyright (C) 1999, 2001, 2004 Free Software Foundation, Inc.
2*53ee8cc1Swenshuai.xi    This file is part of the GNU C Library.
3*53ee8cc1Swenshuai.xi 
4*53ee8cc1Swenshuai.xi    The GNU C Library is free software; you can redistribute it and/or
5*53ee8cc1Swenshuai.xi    modify it under the terms of the GNU Lesser General Public
6*53ee8cc1Swenshuai.xi    License as published by the Free Software Foundation; either
7*53ee8cc1Swenshuai.xi    version 2.1 of the License, or (at your option) any later version.
8*53ee8cc1Swenshuai.xi 
9*53ee8cc1Swenshuai.xi    The GNU C Library is distributed in the hope that it will be useful,
10*53ee8cc1Swenshuai.xi    but WITHOUT ANY WARRANTY; without even the implied warranty of
11*53ee8cc1Swenshuai.xi    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12*53ee8cc1Swenshuai.xi    Lesser General Public License for more details.
13*53ee8cc1Swenshuai.xi 
14*53ee8cc1Swenshuai.xi    You should have received a copy of the GNU Lesser General Public
15*53ee8cc1Swenshuai.xi    License along with the GNU C Library; if not, write to the Free
16*53ee8cc1Swenshuai.xi    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
17*53ee8cc1Swenshuai.xi    02111-1307 USA.  */
18*53ee8cc1Swenshuai.xi 
19*53ee8cc1Swenshuai.xi #ifndef _UNISTD_H
20*53ee8cc1Swenshuai.xi # error "Never include this file directly.  Use <unistd.h> instead"
21*53ee8cc1Swenshuai.xi #endif
22*53ee8cc1Swenshuai.xi 
23*53ee8cc1Swenshuai.xi #include <bits/wordsize.h>
24*53ee8cc1Swenshuai.xi 
25*53ee8cc1Swenshuai.xi /* This header should define the following symbols under the described
26*53ee8cc1Swenshuai.xi    situations.  A value `1' means that the model is always supported,
27*53ee8cc1Swenshuai.xi    `-1' means it is never supported.  Undefined means it cannot be
28*53ee8cc1Swenshuai.xi    statically decided.
29*53ee8cc1Swenshuai.xi 
30*53ee8cc1Swenshuai.xi    _POSIX_V6_ILP32_OFF32   32bit int, long, pointers, and off_t type
31*53ee8cc1Swenshuai.xi    _POSIX_V6_ILP32_OFFBIG  32bit int, long, and pointers and larger off_t type
32*53ee8cc1Swenshuai.xi 
33*53ee8cc1Swenshuai.xi    _POSIX_V6_LP64_OFF32	   64bit long and pointers and 32bit off_t type
34*53ee8cc1Swenshuai.xi    _POSIX_V6_LPBIG_OFFBIG  64bit long and pointers and large off_t type
35*53ee8cc1Swenshuai.xi 
36*53ee8cc1Swenshuai.xi    The macros _XBS5_ILP32_OFF32, _XBS5_ILP32_OFFBIG, _XBS5_LP64_OFF32, and
37*53ee8cc1Swenshuai.xi    _XBS5_LPBIG_OFFBIG were used in previous versions of the Unix standard
38*53ee8cc1Swenshuai.xi    and are available only for compatibility.
39*53ee8cc1Swenshuai.xi */
40*53ee8cc1Swenshuai.xi 
41*53ee8cc1Swenshuai.xi #if __WORDSIZE == 64
42*53ee8cc1Swenshuai.xi 
43*53ee8cc1Swenshuai.xi /* We can never provide environments with 32-bit wide pointers.  */
44*53ee8cc1Swenshuai.xi # define _POSIX_V6_ILP32_OFF32	-1
45*53ee8cc1Swenshuai.xi # define _POSIX_V6_ILP32_OFFBIG	-1
46*53ee8cc1Swenshuai.xi # define _XBS5_ILP32_OFF32	-1
47*53ee8cc1Swenshuai.xi # define _XBS5_ILP32_OFFBIG	-1
48*53ee8cc1Swenshuai.xi /* We also have no use (for now) for an environment with bigger pointers
49*53ee8cc1Swenshuai.xi    and offsets.  */
50*53ee8cc1Swenshuai.xi # define _POSIX_V6_LPBIG_OFFBIG	-1
51*53ee8cc1Swenshuai.xi # define _XBS5_LPBIG_OFFBIG	-1
52*53ee8cc1Swenshuai.xi 
53*53ee8cc1Swenshuai.xi /* By default we have 64-bit wide `long int', pointers and `off_t'.  */
54*53ee8cc1Swenshuai.xi # define _POSIX_V6_LP64_OFF64	1
55*53ee8cc1Swenshuai.xi # define _XBS5_LP64_OFF64	1
56*53ee8cc1Swenshuai.xi 
57*53ee8cc1Swenshuai.xi #else /* __WORDSIZE == 32 */
58*53ee8cc1Swenshuai.xi 
59*53ee8cc1Swenshuai.xi /* By default we have 32-bit wide `int', `long int', pointers and `off_t'
60*53ee8cc1Swenshuai.xi    and all platforms support LFS.  */
61*53ee8cc1Swenshuai.xi # define _POSIX_V6_ILP32_OFF32	1
62*53ee8cc1Swenshuai.xi # define _POSIX_V6_ILP32_OFFBIG	1
63*53ee8cc1Swenshuai.xi # define _XBS5_ILP32_OFF32	1
64*53ee8cc1Swenshuai.xi # define _XBS5_ILP32_OFFBIG	1
65*53ee8cc1Swenshuai.xi 
66*53ee8cc1Swenshuai.xi /* We optionally provide an environment with the above size but an 64-bit
67*53ee8cc1Swenshuai.xi    side `off_t'.  Therefore we don't define _XBS5_ILP32_OFFBIG.  */
68*53ee8cc1Swenshuai.xi 
69*53ee8cc1Swenshuai.xi /* We can never provide environments with 64-bit wide pointers.  */
70*53ee8cc1Swenshuai.xi # define _POSIX_V6_LP64_OFF64	-1
71*53ee8cc1Swenshuai.xi # define _POSIX_V6_LPBIG_OFFBIG	-1
72*53ee8cc1Swenshuai.xi # define _XBS5_LP64_OFF64	-1
73*53ee8cc1Swenshuai.xi # define _XBS5_LPBIG_OFFBIG	-1
74*53ee8cc1Swenshuai.xi 
75*53ee8cc1Swenshuai.xi /* CFLAGS.  */
76*53ee8cc1Swenshuai.xi #define __ILP32_OFFBIG_CFLAGS   "-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
77*53ee8cc1Swenshuai.xi 
78*53ee8cc1Swenshuai.xi #endif /* __WORDSIZE == 32 */
79