Blame bits/environments.h

Packit 6c4009
/* Copyright (C) 1999-2018 Free Software Foundation, Inc.
Packit 6c4009
   This file is part of the GNU C Library.
Packit 6c4009
Packit 6c4009
   The GNU C Library is free software; you can redistribute it and/or
Packit 6c4009
   modify it under the terms of the GNU Lesser General Public
Packit 6c4009
   License as published by the Free Software Foundation; either
Packit 6c4009
   version 2.1 of the License, or (at your option) any later version.
Packit 6c4009
Packit 6c4009
   The GNU C Library is distributed in the hope that it will be useful,
Packit 6c4009
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 6c4009
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit 6c4009
   Lesser General Public License for more details.
Packit 6c4009
Packit 6c4009
   You should have received a copy of the GNU Lesser General Public
Packit 6c4009
   License along with the GNU C Library; if not, see
Packit 6c4009
   <http://www.gnu.org/licenses/>.  */
Packit 6c4009
Packit 6c4009
#ifndef _UNISTD_H
Packit 6c4009
# error "Never include this file directly.  Use <unistd.h> instead"
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
#include <bits/wordsize.h>
Packit 6c4009
Packit 6c4009
/* This header should define the following symbols under the described
Packit 6c4009
   situations.  A value `1' means that the model is always supported,
Packit 6c4009
   `-1' means it is never supported.  Undefined means it cannot be
Packit 6c4009
   statically decided.
Packit 6c4009
Packit 6c4009
   _POSIX_V7_ILP32_OFF32   32bit int, long, pointers, and off_t type
Packit 6c4009
   _POSIX_V7_ILP32_OFFBIG  32bit int, long, and pointers and larger off_t type
Packit 6c4009
Packit 6c4009
   _POSIX_V7_LP64_OFF32	   64bit long and pointers and 32bit off_t type
Packit 6c4009
   _POSIX_V7_LPBIG_OFFBIG  64bit long and pointers and large off_t type
Packit 6c4009
Packit 6c4009
   The macros _POSIX_V6_ILP32_OFF32, _POSIX_V6_ILP32_OFFBIG,
Packit 6c4009
   _POSIX_V6_LP64_OFF32, _POSIX_V6_LPBIG_OFFBIG, _XBS5_ILP32_OFF32,
Packit 6c4009
   _XBS5_ILP32_OFFBIG, _XBS5_LP64_OFF32, and _XBS5_LPBIG_OFFBIG were
Packit 6c4009
   used in previous versions of the Unix standard and are available
Packit 6c4009
   only for compatibility.
Packit 6c4009
*/
Packit 6c4009
Packit 6c4009
#if __WORDSIZE == 64
Packit 6c4009
Packit 6c4009
/* We can never provide environments with 32-bit wide pointers.  */
Packit 6c4009
# define _POSIX_V7_ILP32_OFF32	-1
Packit 6c4009
# define _POSIX_V7_ILP32_OFFBIG	-1
Packit 6c4009
# define _POSIX_V6_ILP32_OFF32	-1
Packit 6c4009
# define _POSIX_V6_ILP32_OFFBIG	-1
Packit 6c4009
# define _XBS5_ILP32_OFF32	-1
Packit 6c4009
# define _XBS5_ILP32_OFFBIG	-1
Packit 6c4009
/* We also have no use (for now) for an environment with bigger pointers
Packit 6c4009
   and offsets.  */
Packit 6c4009
# define _POSIX_V7_LPBIG_OFFBIG	-1
Packit 6c4009
# define _POSIX_V6_LPBIG_OFFBIG	-1
Packit 6c4009
# define _XBS5_LPBIG_OFFBIG	-1
Packit 6c4009
Packit 6c4009
/* By default we have 64-bit wide `long int', pointers and `off_t'.  */
Packit 6c4009
# define _POSIX_V7_LP64_OFF64	1
Packit 6c4009
# define _POSIX_V6_LP64_OFF64	1
Packit 6c4009
# define _XBS5_LP64_OFF64	1
Packit 6c4009
Packit 6c4009
#else /* __WORDSIZE == 32 */
Packit 6c4009
Packit 6c4009
/* By default we have 32-bit wide `int', `long int', pointers and `off_t'
Packit 6c4009
   and all platforms support LFS.  */
Packit 6c4009
# define _POSIX_V7_ILP32_OFF32	1
Packit 6c4009
# define _POSIX_V7_ILP32_OFFBIG	1
Packit 6c4009
# define _POSIX_V6_ILP32_OFF32	1
Packit 6c4009
# define _POSIX_V6_ILP32_OFFBIG	1
Packit 6c4009
# define _XBS5_ILP32_OFF32	1
Packit 6c4009
# define _XBS5_ILP32_OFFBIG	1
Packit 6c4009
Packit 6c4009
/* We optionally provide an environment with the above size but an 64-bit
Packit 6c4009
   side `off_t'.  Therefore we don't define _POSIX_V7_ILP32_OFFBIG.  */
Packit 6c4009
Packit 6c4009
/* We can never provide environments with 64-bit wide pointers.  */
Packit 6c4009
# define _POSIX_V7_LP64_OFF64	-1
Packit 6c4009
# define _POSIX_V7_LPBIG_OFFBIG	-1
Packit 6c4009
# define _POSIX_V6_LP64_OFF64	-1
Packit 6c4009
# define _POSIX_V6_LPBIG_OFFBIG	-1
Packit 6c4009
# define _XBS5_LP64_OFF64	-1
Packit 6c4009
# define _XBS5_LPBIG_OFFBIG	-1
Packit 6c4009
Packit 6c4009
/* CFLAGS.  */
Packit 6c4009
#define __ILP32_OFFBIG_CFLAGS   "-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
Packit 6c4009
Packit 6c4009
#endif /* __WORDSIZE == 32 */