* doc/lispref/variables.texi (File Local Variables): Fix last change
[emacs.git] / lib / sys_types.in.h
blob747371644df6b0e6c7b55d66fa50be38e1af567e
1 /* Provide a more complete sys/types.h.
3 Copyright (C) 2011-2018 Free Software Foundation, Inc.
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 3, or (at your option)
8 any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, see <https://www.gnu.org/licenses/>. */
18 #if __GNUC__ >= 3
19 @PRAGMA_SYSTEM_HEADER@
20 #endif
21 @PRAGMA_COLUMNS@
23 #ifndef _@GUARD_PREFIX@_SYS_TYPES_H
25 /* The include_next requires a split double-inclusion guard. */
26 # define _GL_INCLUDING_SYS_TYPES_H
27 #@INCLUDE_NEXT@ @NEXT_SYS_TYPES_H@
28 # undef _GL_INCLUDING_SYS_TYPES_H
30 #ifndef _@GUARD_PREFIX@_SYS_TYPES_H
31 #define _@GUARD_PREFIX@_SYS_TYPES_H
33 /* Override off_t if Large File Support is requested on native Windows. */
34 #if @WINDOWS_64_BIT_OFF_T@
35 /* Same as int64_t in <stdint.h>. */
36 # if defined _MSC_VER
37 # define off_t __int64
38 # else
39 # define off_t long long int
40 # endif
41 /* Indicator, for gnulib internal purposes. */
42 # define _GL_WINDOWS_64_BIT_OFF_T 1
43 #endif
45 /* Override dev_t and ino_t if distinguishable inodes support is requested
46 on native Windows. */
47 #if @WINDOWS_STAT_INODES@
49 # if @WINDOWS_STAT_INODES@ == 2
50 /* Experimental, not useful in Windows 10. */
52 /* Define dev_t to a 64-bit type. */
53 # if !defined GNULIB_defined_dev_t
54 typedef unsigned long long int rpl_dev_t;
55 # undef dev_t
56 # define dev_t rpl_dev_t
57 # define GNULIB_defined_dev_t 1
58 # endif
60 /* Define ino_t to a 128-bit type. */
61 # if !defined GNULIB_defined_ino_t
62 /* MSVC does not have a 128-bit integer type.
63 GCC has a 128-bit integer type __int128, but only on 64-bit targets. */
64 typedef struct { unsigned long long int _gl_ino[2]; } rpl_ino_t;
65 # undef ino_t
66 # define ino_t rpl_ino_t
67 # define GNULIB_defined_ino_t 1
68 # endif
70 # else /* @WINDOWS_STAT_INODES@ == 1 */
72 /* Define ino_t to a 64-bit type. */
73 # if !defined GNULIB_defined_ino_t
74 typedef unsigned long long int rpl_ino_t;
75 # undef ino_t
76 # define ino_t rpl_ino_t
77 # define GNULIB_defined_ino_t 1
78 # endif
80 # endif
82 /* Indicator, for gnulib internal purposes. */
83 # define _GL_WINDOWS_STAT_INODES @WINDOWS_STAT_INODES@
85 #endif
87 /* MSVC 9 defines size_t in <stddef.h>, not in <sys/types.h>. */
88 /* But avoid namespace pollution on glibc systems. */
89 #if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) \
90 && ! defined __GLIBC__
91 # include <stddef.h>
92 #endif
94 #endif /* _@GUARD_PREFIX@_SYS_TYPES_H */
95 #endif /* _@GUARD_PREFIX@_SYS_TYPES_H */