summaryrefslogtreecommitdiffstats
path: root/gl/sys_types.in.h
diff options
context:
space:
mode:
Diffstat (limited to 'gl/sys_types.in.h')
-rw-r--r--gl/sys_types.in.h77
1 files changed, 66 insertions, 11 deletions
diff --git a/gl/sys_types.in.h b/gl/sys_types.in.h
index d7da356..2079d72 100644
--- a/gl/sys_types.in.h
+++ b/gl/sys_types.in.h
@@ -1,29 +1,42 @@
1/* Provide a more complete sys/types.h. 1/* Provide a more complete sys/types.h.
2 2
3 Copyright (C) 2011-2013 Free Software Foundation, Inc. 3 Copyright (C) 2011-2021 Free Software Foundation, Inc.
4 4
5 This program is free software; you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by 6 it under the terms of the GNU Lesser General Public License as
7 the Free Software Foundation; either version 3, or (at your option) 7 published by the Free Software Foundation; either version 2.1 of the
8 any later version. 8 License, or (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This file is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details. 13 GNU Lesser General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU Lesser General Public License
16 along with this program; if not, see <http://www.gnu.org/licenses/>. */ 16 along with this program. If not, see <https://www.gnu.org/licenses/>. */
17 17
18#if __GNUC__ >= 3 18#if __GNUC__ >= 3
19@PRAGMA_SYSTEM_HEADER@ 19@PRAGMA_SYSTEM_HEADER@
20#endif 20#endif
21@PRAGMA_COLUMNS@ 21@PRAGMA_COLUMNS@
22 22
23#if defined _WIN32 && !defined __CYGWIN__ \
24 && (defined __need_off_t || defined __need___off64_t \
25 || defined __need_ssize_t || defined __need_time_t)
26
27/* Special invocation convention inside mingw header files. */
28
29#@INCLUDE_NEXT@ @NEXT_SYS_TYPES_H@
30
31#else
32/* Normal invocation convention. */
33
23#ifndef _@GUARD_PREFIX@_SYS_TYPES_H 34#ifndef _@GUARD_PREFIX@_SYS_TYPES_H
24 35
25/* The include_next requires a split double-inclusion guard. */ 36/* The include_next requires a split double-inclusion guard. */
37# define _GL_INCLUDING_SYS_TYPES_H
26#@INCLUDE_NEXT@ @NEXT_SYS_TYPES_H@ 38#@INCLUDE_NEXT@ @NEXT_SYS_TYPES_H@
39# undef _GL_INCLUDING_SYS_TYPES_H
27 40
28#ifndef _@GUARD_PREFIX@_SYS_TYPES_H 41#ifndef _@GUARD_PREFIX@_SYS_TYPES_H
29#define _@GUARD_PREFIX@_SYS_TYPES_H 42#define _@GUARD_PREFIX@_SYS_TYPES_H
@@ -40,12 +53,54 @@
40# define _GL_WINDOWS_64_BIT_OFF_T 1 53# define _GL_WINDOWS_64_BIT_OFF_T 1
41#endif 54#endif
42 55
56/* Override dev_t and ino_t if distinguishable inodes support is requested
57 on native Windows. */
58#if @WINDOWS_STAT_INODES@
59
60# if @WINDOWS_STAT_INODES@ == 2
61/* Experimental, not useful in Windows 10. */
62
63/* Define dev_t to a 64-bit type. */
64# if !defined GNULIB_defined_dev_t
65typedef unsigned long long int rpl_dev_t;
66# undef dev_t
67# define dev_t rpl_dev_t
68# define GNULIB_defined_dev_t 1
69# endif
70
71/* Define ino_t to a 128-bit type. */
72# if !defined GNULIB_defined_ino_t
73/* MSVC does not have a 128-bit integer type.
74 GCC has a 128-bit integer type __int128, but only on 64-bit targets. */
75typedef struct { unsigned long long int _gl_ino[2]; } rpl_ino_t;
76# undef ino_t
77# define ino_t rpl_ino_t
78# define GNULIB_defined_ino_t 1
79# endif
80
81# else /* @WINDOWS_STAT_INODES@ == 1 */
82
83/* Define ino_t to a 64-bit type. */
84# if !defined GNULIB_defined_ino_t
85typedef unsigned long long int rpl_ino_t;
86# undef ino_t
87# define ino_t rpl_ino_t
88# define GNULIB_defined_ino_t 1
89# endif
90
91# endif
92
93/* Indicator, for gnulib internal purposes. */
94# define _GL_WINDOWS_STAT_INODES @WINDOWS_STAT_INODES@
95
96#endif
97
43/* MSVC 9 defines size_t in <stddef.h>, not in <sys/types.h>. */ 98/* MSVC 9 defines size_t in <stddef.h>, not in <sys/types.h>. */
44/* But avoid namespace pollution on glibc systems. */ 99/* But avoid namespace pollution on glibc systems. */
45#if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) \ 100#if (defined _WIN32 && ! defined __CYGWIN__) && ! defined __GLIBC__
46 && ! defined __GLIBC__
47# include <stddef.h> 101# include <stddef.h>
48#endif 102#endif
49 103
50#endif /* _@GUARD_PREFIX@_SYS_TYPES_H */ 104#endif /* _@GUARD_PREFIX@_SYS_TYPES_H */
51#endif /* _@GUARD_PREFIX@_SYS_TYPES_H */ 105#endif /* _@GUARD_PREFIX@_SYS_TYPES_H */
106#endif /* __need_XXX */