fcntl_linux_ppc64le.go 49 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107
  1. // Code generated by 'ccgo fcntl/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o fcntl/fcntl_linux_ppc64le.go -pkgname fcntl', DO NOT EDIT.
  2. package fcntl
  3. import (
  4. "math"
  5. "reflect"
  6. "sync/atomic"
  7. "unsafe"
  8. )
  9. var _ = math.Pi
  10. var _ reflect.Kind
  11. var _ atomic.Value
  12. var _ unsafe.Pointer
  13. const (
  14. AT_EACCESS = 0x200 // fcntl-linux.h:388:1:
  15. AT_FDCWD = -100 // fcntl-linux.h:371:1:
  16. AT_REMOVEDIR = 0x200 // fcntl-linux.h:375:1:
  17. AT_SYMLINK_FOLLOW = 0x400 // fcntl-linux.h:377:1:
  18. AT_SYMLINK_NOFOLLOW = 0x100 // fcntl-linux.h:374:1:
  19. FAPPEND = 1024 // fcntl-linux.h:304:1:
  20. FASYNC = 8192 // fcntl-linux.h:306:1:
  21. FD_CLOEXEC = 1 // fcntl-linux.h:219:1:
  22. FFSYNC = 1052672 // fcntl-linux.h:305:1:
  23. FNDELAY = 2048 // fcntl-linux.h:308:1:
  24. FNONBLOCK = 2048 // fcntl-linux.h:307:1:
  25. F_DUPFD = 0 // fcntl-linux.h:167:1:
  26. F_DUPFD_CLOEXEC = 1030 // fcntl-linux.h:214:1:
  27. F_EXLCK = 4 // fcntl-linux.h:231:1:
  28. F_GETFD = 1 // fcntl-linux.h:168:1:
  29. F_GETFL = 3 // fcntl-linux.h:170:1:
  30. F_GETLK = 12 // fcntl-linux.h:109:1:
  31. F_GETLK64 = 12 // fcntl-linux.h:115:1:
  32. F_GETOWN = 9 // fcntl-linux.h:180:1:
  33. F_LOCK = 1 // fcntl.h:238:1:
  34. F_OK = 0 // fcntl.h:131:1:
  35. F_RDLCK = 0 // fcntl-linux.h:223:1:
  36. F_SETFD = 2 // fcntl-linux.h:169:1:
  37. F_SETFL = 4 // fcntl-linux.h:171:1:
  38. F_SETLK = 13 // fcntl-linux.h:110:1:
  39. F_SETLK64 = 13 // fcntl-linux.h:116:1:
  40. F_SETLKW = 14 // fcntl-linux.h:111:1:
  41. F_SETLKW64 = 14 // fcntl-linux.h:117:1:
  42. F_SETOWN = 8 // fcntl-linux.h:179:1:
  43. F_SHLCK = 8 // fcntl-linux.h:232:1:
  44. F_TEST = 3 // fcntl.h:240:1:
  45. F_TLOCK = 2 // fcntl.h:239:1:
  46. F_ULOCK = 0 // fcntl.h:237:1:
  47. F_UNLCK = 2 // fcntl-linux.h:225:1:
  48. F_WRLCK = 1 // fcntl-linux.h:224:1:
  49. LOCK_EX = 2 // fcntl-linux.h:238:1:
  50. LOCK_NB = 4 // fcntl-linux.h:239:1:
  51. LOCK_SH = 1 // fcntl-linux.h:237:1:
  52. LOCK_UN = 8 // fcntl-linux.h:241:1:
  53. O_ACCMODE = 0003 // fcntl-linux.h:42:1:
  54. O_APPEND = 02000 // fcntl-linux.h:59:1:
  55. O_ASYNC = 020000 // fcntl-linux.h:72:1:
  56. O_CLOEXEC = 524288 // fcntl-linux.h:144:1:
  57. O_CREAT = 0100 // fcntl-linux.h:47:1:
  58. O_DIRECTORY = 16384 // fcntl-linux.h:142:1:
  59. O_DSYNC = 4096 // fcntl-linux.h:158:1:
  60. O_EXCL = 0200 // fcntl-linux.h:50:1:
  61. O_FSYNC = 1052672 // fcntl-linux.h:70:1:
  62. O_NDELAY = 2048 // fcntl-linux.h:65:1:
  63. O_NOCTTY = 0400 // fcntl-linux.h:53:1:
  64. O_NOFOLLOW = 32768 // fcntl-linux.h:143:1:
  65. O_NONBLOCK = 04000 // fcntl-linux.h:62:1:
  66. O_RDONLY = 00 // fcntl-linux.h:43:1:
  67. O_RDWR = 02 // fcntl-linux.h:45:1:
  68. O_RSYNC = 1052672 // fcntl-linux.h:162:1:
  69. O_SYNC = 04010000 // fcntl-linux.h:68:1:
  70. O_TRUNC = 01000 // fcntl-linux.h:56:1:
  71. O_WRONLY = 01 // fcntl-linux.h:44:1:
  72. POSIX_FADV_DONTNEED = 4 // fcntl-linux.h:321:1:
  73. POSIX_FADV_NOREUSE = 5 // fcntl-linux.h:322:1:
  74. POSIX_FADV_NORMAL = 0 // fcntl-linux.h:317:1:
  75. POSIX_FADV_RANDOM = 1 // fcntl-linux.h:318:1:
  76. POSIX_FADV_SEQUENTIAL = 2 // fcntl-linux.h:319:1:
  77. POSIX_FADV_WILLNEED = 3 // fcntl-linux.h:320:1:
  78. R_OK = 4 // fcntl.h:128:1:
  79. SEEK_CUR = 1 // fcntl.h:138:1:
  80. SEEK_END = 2 // fcntl.h:139:1:
  81. SEEK_SET = 0 // fcntl.h:137:1:
  82. S_IFBLK = 24576 // fcntl.h:83:1:
  83. S_IFCHR = 8192 // fcntl.h:82:1:
  84. S_IFDIR = 16384 // fcntl.h:81:1:
  85. S_IFIFO = 4096 // fcntl.h:86:1:
  86. S_IFLNK = 40960 // fcntl.h:89:1:
  87. S_IFMT = 61440 // fcntl.h:80:1:
  88. S_IFREG = 32768 // fcntl.h:84:1:
  89. S_IFSOCK = 49152 // fcntl.h:92:1:
  90. S_IRGRP = 32 // fcntl.h:111:1:
  91. S_IROTH = 4 // fcntl.h:117:1:
  92. S_IRUSR = 256 // fcntl.h:105:1:
  93. S_IRWXG = 56 // fcntl.h:115:1:
  94. S_IRWXO = 7 // fcntl.h:121:1:
  95. S_IRWXU = 448 // fcntl.h:109:1:
  96. S_ISGID = 1024 // fcntl.h:98:1:
  97. S_ISUID = 2048 // fcntl.h:97:1:
  98. S_ISVTX = 512 // fcntl.h:102:1:
  99. S_IWGRP = 16 // fcntl.h:112:1:
  100. S_IWOTH = 2 // fcntl.h:118:1:
  101. S_IWUSR = 128 // fcntl.h:106:1:
  102. S_IXGRP = 8 // fcntl.h:113:1:
  103. S_IXOTH = 1 // fcntl.h:119:1:
  104. S_IXUSR = 64 // fcntl.h:107:1:
  105. UTIME_NOW = 1073741823 // stat.h:271:1:
  106. UTIME_OMIT = 1073741822 // stat.h:272:1:
  107. W_OK = 2 // fcntl.h:129:1:
  108. X_OK = 1 // fcntl.h:130:1:
  109. X_ARCH_PPC = 1 // <predefined>:198:1:
  110. X_ARCH_PPC64 = 1 // <predefined>:402:1:
  111. X_ARCH_PPCGR = 1 // <predefined>:15:1:
  112. X_ARCH_PPCSQ = 1 // <predefined>:43:1:
  113. X_ARCH_PWR4 = 1 // <predefined>:381:1:
  114. X_ARCH_PWR5 = 1 // <predefined>:90:1:
  115. X_ARCH_PWR5X = 1 // <predefined>:137:1:
  116. X_ARCH_PWR6 = 1 // <predefined>:91:1:
  117. X_ARCH_PWR7 = 1 // <predefined>:92:1:
  118. X_ARCH_PWR8 = 1 // <predefined>:93:1:
  119. X_ATFILE_SOURCE = 1 // features.h:342:1:
  120. X_BITS_ENDIANNESS_H = 1 // endianness.h:2:1:
  121. X_BITS_ENDIAN_H = 1 // endian.h:20:1:
  122. X_BITS_STAT_H = 1 // stat.h:23:1:
  123. X_BITS_TIME64_H = 1 // time64.h:24:1:
  124. X_BITS_TYPESIZES_H = 1 // typesizes.h:24:1:
  125. X_BITS_TYPES_H = 1 // types.h:24:1:
  126. X_CALL_ELF = 2 // <predefined>:415:1:
  127. X_CALL_LINUX = 1 // <predefined>:123:1:
  128. X_DEFAULT_SOURCE = 1 // features.h:227:1:
  129. X_FCNTL_H = 1 // fcntl.h:23:1:
  130. X_FEATURES_H = 1 // features.h:19:1:
  131. X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
  132. X_LITTLE_ENDIAN = 1 // <predefined>:37:1:
  133. X_LP64 = 1 // <predefined>:335:1:
  134. X_MKNOD_VER = 1 // stat.h:41:1:
  135. X_MKNOD_VER_LINUX = 1 // stat.h:39:1:
  136. X_MKNOD_VER_SVR4 = 2 // stat.h:40:1:
  137. X_POSIX_C_SOURCE = 200809 // features.h:281:1:
  138. X_POSIX_SOURCE = 1 // features.h:279:1:
  139. X_STATBUF_ST_BLKSIZE = 0 // stat.h:237:1:
  140. X_STATBUF_ST_NSEC = 0 // stat.h:240:1:
  141. X_STATBUF_ST_RDEV = 0 // stat.h:238:1:
  142. X_STAT_VER = 1 // stat.h:35:1:
  143. X_STAT_VER_KERNEL = 1 // stat.h:29:1:
  144. X_STAT_VER_LINUX = 3 // stat.h:31:1:
  145. X_STAT_VER_LINUX_OLD = 1 // stat.h:28:1:
  146. X_STAT_VER_SVR4 = 2 // stat.h:30:1:
  147. X_STDC_PREDEF_H = 1 // <predefined>:203:1:
  148. X_STRUCT_TIMESPEC = 1 // struct_timespec.h:3:1:
  149. X_SYS_CDEFS_H = 1 // cdefs.h:19:1:
  150. Linux = 1 // <predefined>:263:1:
  151. Unix = 1 // <predefined>:222:1:
  152. )
  153. type Ptrdiff_t = int64 /* <builtin>:3:26 */
  154. type Size_t = uint64 /* <builtin>:9:23 */
  155. type Wchar_t = int32 /* <builtin>:15:24 */
  156. type X__int128_t = struct {
  157. Flo int64
  158. Fhi int64
  159. } /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128
  160. type X__uint128_t = struct {
  161. Flo uint64
  162. Fhi uint64
  163. } /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128
  164. type X__builtin_va_list = uintptr /* <builtin>:46:14 */
  165. type X__ieee128 = float64 /* <builtin>:47:21 */
  166. // Copyright (C) 1991-2020 Free Software Foundation, Inc.
  167. // This file is part of the GNU C Library.
  168. //
  169. // The GNU C Library is free software; you can redistribute it and/or
  170. // modify it under the terms of the GNU Lesser General Public
  171. // License as published by the Free Software Foundation; either
  172. // version 2.1 of the License, or (at your option) any later version.
  173. //
  174. // The GNU C Library is distributed in the hope that it will be useful,
  175. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  176. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  177. // Lesser General Public License for more details.
  178. //
  179. // You should have received a copy of the GNU Lesser General Public
  180. // License along with the GNU C Library; if not, see
  181. // <https://www.gnu.org/licenses/>.
  182. // POSIX Standard: 6.5 File Control Operations <fcntl.h>
  183. // Copyright (C) 1991-2020 Free Software Foundation, Inc.
  184. // This file is part of the GNU C Library.
  185. //
  186. // The GNU C Library is free software; you can redistribute it and/or
  187. // modify it under the terms of the GNU Lesser General Public
  188. // License as published by the Free Software Foundation; either
  189. // version 2.1 of the License, or (at your option) any later version.
  190. //
  191. // The GNU C Library is distributed in the hope that it will be useful,
  192. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  193. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  194. // Lesser General Public License for more details.
  195. //
  196. // You should have received a copy of the GNU Lesser General Public
  197. // License along with the GNU C Library; if not, see
  198. // <https://www.gnu.org/licenses/>.
  199. // These are defined by the user (or the compiler)
  200. // to specify the desired environment:
  201. //
  202. // __STRICT_ANSI__ ISO Standard C.
  203. // _ISOC99_SOURCE Extensions to ISO C89 from ISO C99.
  204. // _ISOC11_SOURCE Extensions to ISO C99 from ISO C11.
  205. // _ISOC2X_SOURCE Extensions to ISO C99 from ISO C2X.
  206. // __STDC_WANT_LIB_EXT2__
  207. // Extensions to ISO C99 from TR 27431-2:2010.
  208. // __STDC_WANT_IEC_60559_BFP_EXT__
  209. // Extensions to ISO C11 from TS 18661-1:2014.
  210. // __STDC_WANT_IEC_60559_FUNCS_EXT__
  211. // Extensions to ISO C11 from TS 18661-4:2015.
  212. // __STDC_WANT_IEC_60559_TYPES_EXT__
  213. // Extensions to ISO C11 from TS 18661-3:2015.
  214. //
  215. // _POSIX_SOURCE IEEE Std 1003.1.
  216. // _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2;
  217. // if >=199309L, add IEEE Std 1003.1b-1993;
  218. // if >=199506L, add IEEE Std 1003.1c-1995;
  219. // if >=200112L, all of IEEE 1003.1-2004
  220. // if >=200809L, all of IEEE 1003.1-2008
  221. // _XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if
  222. // Single Unix conformance is wanted, to 600 for the
  223. // sixth revision, to 700 for the seventh revision.
  224. // _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions.
  225. // _LARGEFILE_SOURCE Some more functions for correct standard I/O.
  226. // _LARGEFILE64_SOURCE Additional functionality from LFS for large files.
  227. // _FILE_OFFSET_BITS=N Select default filesystem interface.
  228. // _ATFILE_SOURCE Additional *at interfaces.
  229. // _GNU_SOURCE All of the above, plus GNU extensions.
  230. // _DEFAULT_SOURCE The default set of features (taking precedence over
  231. // __STRICT_ANSI__).
  232. //
  233. // _FORTIFY_SOURCE Add security hardening to many library functions.
  234. // Set to 1 or 2; 2 performs stricter checks than 1.
  235. //
  236. // _REENTRANT, _THREAD_SAFE
  237. // Obsolete; equivalent to _POSIX_C_SOURCE=199506L.
  238. //
  239. // The `-ansi' switch to the GNU C compiler, and standards conformance
  240. // options such as `-std=c99', define __STRICT_ANSI__. If none of
  241. // these are defined, or if _DEFAULT_SOURCE is defined, the default is
  242. // to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to
  243. // 200809L, as well as enabling miscellaneous functions from BSD and
  244. // SVID. If more than one of these are defined, they accumulate. For
  245. // example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together
  246. // give you ISO C, 1003.1, and 1003.2, but nothing else.
  247. //
  248. // These are defined by this file and are used by the
  249. // header files to decide what to declare or define:
  250. //
  251. // __GLIBC_USE (F) Define things from feature set F. This is defined
  252. // to 1 or 0; the subsequent macros are either defined
  253. // or undefined, and those tests should be moved to
  254. // __GLIBC_USE.
  255. // __USE_ISOC11 Define ISO C11 things.
  256. // __USE_ISOC99 Define ISO C99 things.
  257. // __USE_ISOC95 Define ISO C90 AMD1 (C95) things.
  258. // __USE_ISOCXX11 Define ISO C++11 things.
  259. // __USE_POSIX Define IEEE Std 1003.1 things.
  260. // __USE_POSIX2 Define IEEE Std 1003.2 things.
  261. // __USE_POSIX199309 Define IEEE Std 1003.1, and .1b things.
  262. // __USE_POSIX199506 Define IEEE Std 1003.1, .1b, .1c and .1i things.
  263. // __USE_XOPEN Define XPG things.
  264. // __USE_XOPEN_EXTENDED Define X/Open Unix things.
  265. // __USE_UNIX98 Define Single Unix V2 things.
  266. // __USE_XOPEN2K Define XPG6 things.
  267. // __USE_XOPEN2KXSI Define XPG6 XSI things.
  268. // __USE_XOPEN2K8 Define XPG7 things.
  269. // __USE_XOPEN2K8XSI Define XPG7 XSI things.
  270. // __USE_LARGEFILE Define correct standard I/O things.
  271. // __USE_LARGEFILE64 Define LFS things with separate names.
  272. // __USE_FILE_OFFSET64 Define 64bit interface as default.
  273. // __USE_MISC Define things from 4.3BSD or System V Unix.
  274. // __USE_ATFILE Define *at interfaces and AT_* constants for them.
  275. // __USE_GNU Define GNU extensions.
  276. // __USE_FORTIFY_LEVEL Additional security measures used, according to level.
  277. //
  278. // The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are
  279. // defined by this file unconditionally. `__GNU_LIBRARY__' is provided
  280. // only for compatibility. All new code should use the other symbols
  281. // to test for features.
  282. //
  283. // All macros listed above as possibly being defined by this file are
  284. // explicitly undefined if they are not explicitly defined.
  285. // Feature-test macros that are not defined by the user or compiler
  286. // but are implied by the other feature-test macros defined (or by the
  287. // lack of any definitions) are defined by the file.
  288. //
  289. // ISO C feature test macros depend on the definition of the macro
  290. // when an affected header is included, not when the first system
  291. // header is included, and so they are handled in
  292. // <bits/libc-header-start.h>, which does not have a multiple include
  293. // guard. Feature test macros that can be handled from the first
  294. // system header included are handled here.
  295. // Undefine everything, so we get a clean slate.
  296. // Suppress kernel-name space pollution unless user expressedly asks
  297. // for it.
  298. // Convenience macro to test the version of gcc.
  299. // Use like this:
  300. // #if __GNUC_PREREQ (2,8)
  301. // ... code requiring gcc 2.8 or later ...
  302. // #endif
  303. // Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was
  304. // added in 2.0.
  305. // Similarly for clang. Features added to GCC after version 4.2 may
  306. // or may not also be available in clang, and clang's definitions of
  307. // __GNUC(_MINOR)__ are fixed at 4 and 2 respectively. Not all such
  308. // features can be queried via __has_extension/__has_feature.
  309. // Whether to use feature set F.
  310. // _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for
  311. // _DEFAULT_SOURCE. If _DEFAULT_SOURCE is present we do not
  312. // issue a warning; the expectation is that the source is being
  313. // transitioned to use the new macro.
  314. // If _GNU_SOURCE was defined by the user, turn on all the other features.
  315. // If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined,
  316. // define _DEFAULT_SOURCE.
  317. // This is to enable the ISO C2X extension.
  318. // This is to enable the ISO C11 extension.
  319. // This is to enable the ISO C99 extension.
  320. // This is to enable the ISO C90 Amendment 1:1995 extension.
  321. // If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE
  322. // is defined, use POSIX.1-2008 (or another version depending on
  323. // _XOPEN_SOURCE).
  324. // Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be
  325. // defined in all multithreaded code. GNU libc has not required this
  326. // for many years. We now treat them as compatibility synonyms for
  327. // _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with
  328. // comprehensive support for multithreaded code. Using them never
  329. // lowers the selected level of POSIX conformance, only raises it.
  330. // The function 'gets' existed in C89, but is impossible to use
  331. // safely. It has been removed from ISO C11 and ISO C++14. Note: for
  332. // compatibility with various implementations of <cstdio>, this test
  333. // must consider only the value of __cplusplus when compiling C++.
  334. // GNU formerly extended the scanf functions with modified format
  335. // specifiers %as, %aS, and %a[...] that allocate a buffer for the
  336. // input using malloc. This extension conflicts with ISO C99, which
  337. // defines %a as a standalone format specifier that reads a floating-
  338. // point number; moreover, POSIX.1-2008 provides the same feature
  339. // using the modifier letter 'm' instead (%ms, %mS, %m[...]).
  340. //
  341. // We now follow C99 unless GNU extensions are active and the compiler
  342. // is specifically in C89 or C++98 mode (strict or not). For
  343. // instance, with GCC, -std=gnu11 will have C99-compliant scanf with
  344. // or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the
  345. // old extension.
  346. // Get definitions of __STDC_* predefined macros, if the compiler has
  347. // not preincluded this header automatically.
  348. // Copyright (C) 1991-2020 Free Software Foundation, Inc.
  349. // This file is part of the GNU C Library.
  350. //
  351. // The GNU C Library is free software; you can redistribute it and/or
  352. // modify it under the terms of the GNU Lesser General Public
  353. // License as published by the Free Software Foundation; either
  354. // version 2.1 of the License, or (at your option) any later version.
  355. //
  356. // The GNU C Library is distributed in the hope that it will be useful,
  357. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  358. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  359. // Lesser General Public License for more details.
  360. //
  361. // You should have received a copy of the GNU Lesser General Public
  362. // License along with the GNU C Library; if not, see
  363. // <https://www.gnu.org/licenses/>.
  364. // This macro indicates that the installed library is the GNU C Library.
  365. // For historic reasons the value now is 6 and this will stay from now
  366. // on. The use of this variable is deprecated. Use __GLIBC__ and
  367. // __GLIBC_MINOR__ now (see below) when you want to test for a specific
  368. // GNU C library version and use the values in <gnu/lib-names.h> to get
  369. // the sonames of the shared libraries.
  370. // Major and minor version number of the GNU C library package. Use
  371. // these macros to test for features in specific releases.
  372. // This is here only because every header file already includes this one.
  373. // Copyright (C) 1992-2020 Free Software Foundation, Inc.
  374. // This file is part of the GNU C Library.
  375. //
  376. // The GNU C Library is free software; you can redistribute it and/or
  377. // modify it under the terms of the GNU Lesser General Public
  378. // License as published by the Free Software Foundation; either
  379. // version 2.1 of the License, or (at your option) any later version.
  380. //
  381. // The GNU C Library is distributed in the hope that it will be useful,
  382. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  383. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  384. // Lesser General Public License for more details.
  385. //
  386. // You should have received a copy of the GNU Lesser General Public
  387. // License along with the GNU C Library; if not, see
  388. // <https://www.gnu.org/licenses/>.
  389. // We are almost always included from features.h.
  390. // The GNU libc does not support any K&R compilers or the traditional mode
  391. // of ISO C compilers anymore. Check for some of the combinations not
  392. // anymore supported.
  393. // Some user header file might have defined this before.
  394. // All functions, except those with callbacks or those that
  395. // synchronize memory, are leaf functions.
  396. // GCC can always grok prototypes. For C++ programs we add throw()
  397. // to help it optimize the function calls. But this works only with
  398. // gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions
  399. // as non-throwing using a function attribute since programs can use
  400. // the -fexceptions options for C code as well.
  401. // Compilers that are not clang may object to
  402. // #if defined __clang__ && __has_extension(...)
  403. // even though they do not need to evaluate the right-hand side of the &&.
  404. // These two macros are not used in glibc anymore. They are kept here
  405. // only because some other projects expect the macros to be defined.
  406. // For these things, GCC behaves the ANSI way normally,
  407. // and the non-ANSI way under -traditional.
  408. // This is not a typedef so `const __ptr_t' does the right thing.
  409. // C++ needs to know that types and declarations are C, not C++.
  410. // Fortify support.
  411. // Support for flexible arrays.
  412. // Headers that should use flexible arrays only if they're "real"
  413. // (e.g. only if they won't affect sizeof()) should test
  414. // #if __glibc_c99_flexarr_available.
  415. // __asm__ ("xyz") is used throughout the headers to rename functions
  416. // at the assembly language level. This is wrapped by the __REDIRECT
  417. // macro, in order to support compilers that can do this some other
  418. // way. When compilers don't support asm-names at all, we have to do
  419. // preprocessor tricks instead (which don't have exactly the right
  420. // semantics, but it's the best we can do).
  421. //
  422. // Example:
  423. // int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid);
  424. //
  425. // #elif __SOME_OTHER_COMPILER__
  426. //
  427. // # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias)
  428. // GCC has various useful declarations that can be made with the
  429. // `__attribute__' syntax. All of the ways we use this do fine if
  430. // they are omitted for compilers that don't understand it.
  431. // At some point during the gcc 2.96 development the `malloc' attribute
  432. // for functions was introduced. We don't want to use it unconditionally
  433. // (although this would be possible) since it generates warnings.
  434. // Tell the compiler which arguments to an allocation function
  435. // indicate the size of the allocation.
  436. // At some point during the gcc 2.96 development the `pure' attribute
  437. // for functions was introduced. We don't want to use it unconditionally
  438. // (although this would be possible) since it generates warnings.
  439. // This declaration tells the compiler that the value is constant.
  440. // At some point during the gcc 3.1 development the `used' attribute
  441. // for functions was introduced. We don't want to use it unconditionally
  442. // (although this would be possible) since it generates warnings.
  443. // Since version 3.2, gcc allows marking deprecated functions.
  444. // Since version 4.5, gcc also allows one to specify the message printed
  445. // when a deprecated function is used. clang claims to be gcc 4.2, but
  446. // may also support this feature.
  447. // At some point during the gcc 2.8 development the `format_arg' attribute
  448. // for functions was introduced. We don't want to use it unconditionally
  449. // (although this would be possible) since it generates warnings.
  450. // If several `format_arg' attributes are given for the same function, in
  451. // gcc-3.0 and older, all but the last one are ignored. In newer gccs,
  452. // all designated arguments are considered.
  453. // At some point during the gcc 2.97 development the `strfmon' format
  454. // attribute for functions was introduced. We don't want to use it
  455. // unconditionally (although this would be possible) since it
  456. // generates warnings.
  457. // The nonull function attribute allows to mark pointer parameters which
  458. // must not be NULL.
  459. // If fortification mode, we warn about unused results of certain
  460. // function calls which can lead to problems.
  461. // Forces a function to be always inlined.
  462. // The Linux kernel defines __always_inline in stddef.h (283d7573), and
  463. // it conflicts with this definition. Therefore undefine it first to
  464. // allow either header to be included first.
  465. // Associate error messages with the source location of the call site rather
  466. // than with the source location inside the function.
  467. // GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99
  468. // inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__
  469. // or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions
  470. // older than 4.3 may define these macros and still not guarantee GNU inlining
  471. // semantics.
  472. //
  473. // clang++ identifies itself as gcc-4.2, but has support for GNU inlining
  474. // semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and
  475. // __GNUC_GNU_INLINE__ macro definitions.
  476. // GCC 4.3 and above allow passing all anonymous arguments of an
  477. // __extern_always_inline function to some other vararg function.
  478. // It is possible to compile containing GCC extensions even if GCC is
  479. // run in pedantic mode if the uses are carefully marked using the
  480. // `__extension__' keyword. But this is not generally available before
  481. // version 2.8.
  482. // __restrict is known in EGCS 1.2 and above.
  483. // ISO C99 also allows to declare arrays as non-overlapping. The syntax is
  484. // array_name[restrict]
  485. // GCC 3.1 supports this.
  486. // Describes a char array whose address can safely be passed as the first
  487. // argument to strncpy and strncat, as the char array is not necessarily
  488. // a NUL-terminated string.
  489. // Undefine (also defined in libc-symbols.h).
  490. // Copies attributes from the declaration or type referenced by
  491. // the argument.
  492. // Determine the wordsize from the preprocessor defines.
  493. // Properties of long double type. ldbl-opt version.
  494. // Copyright (C) 2016-2020 Free Software Foundation, Inc.
  495. // This file is part of the GNU C Library.
  496. //
  497. // The GNU C Library is free software; you can redistribute it and/or
  498. // modify it under the terms of the GNU Lesser General Public
  499. // License published by the Free Software Foundation; either
  500. // version 2.1 of the License, or (at your option) any later version.
  501. //
  502. // The GNU C Library is distributed in the hope that it will be useful,
  503. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  504. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  505. // Lesser General Public License for more details.
  506. //
  507. // You should have received a copy of the GNU Lesser General Public
  508. // License along with the GNU C Library; if not, see
  509. // <https://www.gnu.org/licenses/>.
  510. // __glibc_macro_warning (MESSAGE) issues warning MESSAGE. This is
  511. // intended for use in preprocessor macros.
  512. //
  513. // Note: MESSAGE must be a _single_ string; concatenation of string
  514. // literals is not supported.
  515. // Generic selection (ISO C11) is a C-only feature, available in GCC
  516. // since version 4.9. Previous versions do not provide generic
  517. // selection, even though they might set __STDC_VERSION__ to 201112L,
  518. // when in -std=c11 mode. Thus, we must check for !defined __GNUC__
  519. // when testing __STDC_VERSION__ for generic selection support.
  520. // On the other hand, Clang also defines __GNUC__, so a clang-specific
  521. // check is required to enable the use of generic selection.
  522. // If we don't have __REDIRECT, prototypes will be missing if
  523. // __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64].
  524. // Decide whether we can define 'extern inline' functions in headers.
  525. // This is here only because every header file already includes this one.
  526. // Get the definitions of all the appropriate `__stub_FUNCTION' symbols.
  527. // <gnu/stubs.h> contains `#define __stub_FUNCTION' when FUNCTION is a stub
  528. // that will always return failure (and set errno to ENOSYS).
  529. // This file is automatically generated.
  530. // This file selects the right generated file of `__stub_FUNCTION' macros
  531. // based on the architecture being compiled for.
  532. // Determine the wordsize from the preprocessor defines.
  533. // This file is automatically generated.
  534. // It defines a symbol `__stub_FUNCTION' for each function
  535. // in the C library which is a stub, meaning it will fail
  536. // every time called, usually setting errno to ENOSYS.
  537. // This must be early so <bits/fcntl.h> can define types winningly.
  538. // Get __mode_t, __dev_t and __off_t .
  539. // bits/types.h -- definitions of __*_t types underlying *_t types.
  540. // Copyright (C) 2002-2020 Free Software Foundation, Inc.
  541. // This file is part of the GNU C Library.
  542. //
  543. // The GNU C Library is free software; you can redistribute it and/or
  544. // modify it under the terms of the GNU Lesser General Public
  545. // License as published by the Free Software Foundation; either
  546. // version 2.1 of the License, or (at your option) any later version.
  547. //
  548. // The GNU C Library is distributed in the hope that it will be useful,
  549. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  550. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  551. // Lesser General Public License for more details.
  552. //
  553. // You should have received a copy of the GNU Lesser General Public
  554. // License along with the GNU C Library; if not, see
  555. // <https://www.gnu.org/licenses/>.
  556. // Never include this file directly; use <sys/types.h> instead.
  557. // Copyright (C) 1991-2020 Free Software Foundation, Inc.
  558. // This file is part of the GNU C Library.
  559. //
  560. // The GNU C Library is free software; you can redistribute it and/or
  561. // modify it under the terms of the GNU Lesser General Public
  562. // License as published by the Free Software Foundation; either
  563. // version 2.1 of the License, or (at your option) any later version.
  564. //
  565. // The GNU C Library is distributed in the hope that it will be useful,
  566. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  567. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  568. // Lesser General Public License for more details.
  569. //
  570. // You should have received a copy of the GNU Lesser General Public
  571. // License along with the GNU C Library; if not, see
  572. // <https://www.gnu.org/licenses/>.
  573. // Determine the wordsize from the preprocessor defines.
  574. // Bit size of the time_t type at glibc build time, general case.
  575. // Copyright (C) 2018-2020 Free Software Foundation, Inc.
  576. // This file is part of the GNU C Library.
  577. //
  578. // The GNU C Library is free software; you can redistribute it and/or
  579. // modify it under the terms of the GNU Lesser General Public
  580. // License as published by the Free Software Foundation; either
  581. // version 2.1 of the License, or (at your option) any later version.
  582. //
  583. // The GNU C Library is distributed in the hope that it will be useful,
  584. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  585. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  586. // Lesser General Public License for more details.
  587. //
  588. // You should have received a copy of the GNU Lesser General Public
  589. // License along with the GNU C Library; if not, see
  590. // <https://www.gnu.org/licenses/>.
  591. // Determine the wordsize from the preprocessor defines.
  592. // Size in bits of the 'time_t' type of the default ABI.
  593. // Convenience types.
  594. type X__u_char = uint8 /* types.h:31:23 */
  595. type X__u_short = uint16 /* types.h:32:28 */
  596. type X__u_int = uint32 /* types.h:33:22 */
  597. type X__u_long = uint64 /* types.h:34:27 */
  598. // Fixed-size types, underlying types depend on word size and compiler.
  599. type X__int8_t = int8 /* types.h:37:21 */
  600. type X__uint8_t = uint8 /* types.h:38:23 */
  601. type X__int16_t = int16 /* types.h:39:26 */
  602. type X__uint16_t = uint16 /* types.h:40:28 */
  603. type X__int32_t = int32 /* types.h:41:20 */
  604. type X__uint32_t = uint32 /* types.h:42:22 */
  605. type X__int64_t = int64 /* types.h:44:25 */
  606. type X__uint64_t = uint64 /* types.h:45:27 */
  607. // Smallest types with at least a given width.
  608. type X__int_least8_t = X__int8_t /* types.h:52:18 */
  609. type X__uint_least8_t = X__uint8_t /* types.h:53:19 */
  610. type X__int_least16_t = X__int16_t /* types.h:54:19 */
  611. type X__uint_least16_t = X__uint16_t /* types.h:55:20 */
  612. type X__int_least32_t = X__int32_t /* types.h:56:19 */
  613. type X__uint_least32_t = X__uint32_t /* types.h:57:20 */
  614. type X__int_least64_t = X__int64_t /* types.h:58:19 */
  615. type X__uint_least64_t = X__uint64_t /* types.h:59:20 */
  616. // quad_t is also 64 bits.
  617. type X__quad_t = int64 /* types.h:63:18 */
  618. type X__u_quad_t = uint64 /* types.h:64:27 */
  619. // Largest integral types.
  620. type X__intmax_t = int64 /* types.h:72:18 */
  621. type X__uintmax_t = uint64 /* types.h:73:27 */
  622. // The machine-dependent file <bits/typesizes.h> defines __*_T_TYPE
  623. // macros for each of the OS types we define below. The definitions
  624. // of those macros must use the following macros for underlying types.
  625. // We define __S<SIZE>_TYPE and __U<SIZE>_TYPE for the signed and unsigned
  626. // variants of each of the following integer types on this machine.
  627. //
  628. // 16 -- "natural" 16-bit type (always short)
  629. // 32 -- "natural" 32-bit type (always int)
  630. // 64 -- "natural" 64-bit type (long or long long)
  631. // LONG32 -- 32-bit type, traditionally long
  632. // QUAD -- 64-bit type, traditionally long long
  633. // WORD -- natural type of __WORDSIZE bits (int or long)
  634. // LONGWORD -- type of __WORDSIZE bits, traditionally long
  635. //
  636. // We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the
  637. // conventional uses of `long' or `long long' type modifiers match the
  638. // types we define, even when a less-adorned type would be the same size.
  639. // This matters for (somewhat) portably writing printf/scanf formats for
  640. // these types, where using the appropriate l or ll format modifiers can
  641. // make the typedefs and the formats match up across all GNU platforms. If
  642. // we used `long' when it's 64 bits where `long long' is expected, then the
  643. // compiler would warn about the formats not matching the argument types,
  644. // and the programmer changing them to shut up the compiler would break the
  645. // program's portability.
  646. //
  647. // Here we assume what is presently the case in all the GCC configurations
  648. // we support: long long is always 64 bits, long is always word/address size,
  649. // and int is always 32 bits.
  650. // No need to mark the typedef with __extension__.
  651. // bits/typesizes.h -- underlying types for *_t. Generic version.
  652. // Copyright (C) 2002-2020 Free Software Foundation, Inc.
  653. // This file is part of the GNU C Library.
  654. //
  655. // The GNU C Library is free software; you can redistribute it and/or
  656. // modify it under the terms of the GNU Lesser General Public
  657. // License as published by the Free Software Foundation; either
  658. // version 2.1 of the License, or (at your option) any later version.
  659. //
  660. // The GNU C Library is distributed in the hope that it will be useful,
  661. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  662. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  663. // Lesser General Public License for more details.
  664. //
  665. // You should have received a copy of the GNU Lesser General Public
  666. // License along with the GNU C Library; if not, see
  667. // <https://www.gnu.org/licenses/>.
  668. // See <bits/types.h> for the meaning of these macros. This file exists so
  669. // that <bits/types.h> need not vary across different GNU platforms.
  670. // Tell the libc code that off_t and off64_t are actually the same type
  671. // for all ABI purposes, even if possibly expressed as different base types
  672. // for C type-checking purposes.
  673. // Same for ino_t and ino64_t.
  674. // And for rlim_t and rlim64_t.
  675. // And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t.
  676. // Number of descriptors that can fit in an `fd_set'.
  677. // bits/time64.h -- underlying types for __time64_t. Generic version.
  678. // Copyright (C) 2018-2020 Free Software Foundation, Inc.
  679. // This file is part of the GNU C Library.
  680. //
  681. // The GNU C Library is free software; you can redistribute it and/or
  682. // modify it under the terms of the GNU Lesser General Public
  683. // License as published by the Free Software Foundation; either
  684. // version 2.1 of the License, or (at your option) any later version.
  685. //
  686. // The GNU C Library is distributed in the hope that it will be useful,
  687. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  688. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  689. // Lesser General Public License for more details.
  690. //
  691. // You should have received a copy of the GNU Lesser General Public
  692. // License along with the GNU C Library; if not, see
  693. // <https://www.gnu.org/licenses/>.
  694. // Define __TIME64_T_TYPE so that it is always a 64-bit type.
  695. // If we already have 64-bit time type then use it.
  696. type X__dev_t = uint64 /* types.h:145:25 */ // Type of device numbers.
  697. type X__uid_t = uint32 /* types.h:146:25 */ // Type of user identifications.
  698. type X__gid_t = uint32 /* types.h:147:25 */ // Type of group identifications.
  699. type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers.
  700. type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS).
  701. type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks.
  702. type X__nlink_t = uint64 /* types.h:151:27 */ // Type of file link counts.
  703. type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets.
  704. type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS).
  705. type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications.
  706. type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs.
  707. type X__clock_t = int64 /* types.h:156:27 */ // Type of CPU usage counts.
  708. type X__rlim_t = uint64 /* types.h:157:26 */ // Type for resource measurement.
  709. type X__rlim64_t = uint64 /* types.h:158:28 */ // Type for resource measurement (LFS).
  710. type X__id_t = uint32 /* types.h:159:24 */ // General type for IDs.
  711. type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch.
  712. type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds.
  713. type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds.
  714. type X__daddr_t = int32 /* types.h:164:27 */ // The type of a disk address.
  715. type X__key_t = int32 /* types.h:165:25 */ // Type of an IPC key.
  716. // Clock ID used in clock and timer functions.
  717. type X__clockid_t = int32 /* types.h:168:29 */
  718. // Timer ID returned by `timer_create'.
  719. type X__timer_t = uintptr /* types.h:171:12 */
  720. // Type to represent block size.
  721. type X__blksize_t = int64 /* types.h:174:29 */
  722. // Types from the Large File Support interface.
  723. // Type to count number of disk blocks.
  724. type X__blkcnt_t = int64 /* types.h:179:28 */
  725. type X__blkcnt64_t = int64 /* types.h:180:30 */
  726. // Type to count file system blocks.
  727. type X__fsblkcnt_t = uint64 /* types.h:183:30 */
  728. type X__fsblkcnt64_t = uint64 /* types.h:184:32 */
  729. // Type to count file system nodes.
  730. type X__fsfilcnt_t = uint64 /* types.h:187:30 */
  731. type X__fsfilcnt64_t = uint64 /* types.h:188:32 */
  732. // Type of miscellaneous file system fields.
  733. type X__fsword_t = int64 /* types.h:191:28 */
  734. type X__ssize_t = int64 /* types.h:193:27 */ // Type of a byte count, or error.
  735. // Signed long type used in system calls.
  736. type X__syscall_slong_t = int64 /* types.h:196:33 */
  737. // Unsigned long type used in system calls.
  738. type X__syscall_ulong_t = uint64 /* types.h:198:33 */
  739. // These few don't really vary by system, they always correspond
  740. //
  741. // to one of the other defined types.
  742. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS).
  743. type X__caddr_t = uintptr /* types.h:203:14 */
  744. // Duplicates info from stdint.h but this is used in unistd.h.
  745. type X__intptr_t = int64 /* types.h:206:25 */
  746. // Duplicate info from sys/socket.h.
  747. type X__socklen_t = uint32 /* types.h:209:23 */
  748. // C99: An integer type that can be accessed as an atomic entity,
  749. //
  750. // even in the presence of asynchronous interrupts.
  751. // It is not currently necessary for this to be machine-specific.
  752. type X__sig_atomic_t = int32 /* types.h:214:13 */
  753. // Seconds since the Epoch, visible to user code when time_t is too
  754. // narrow only for consistency with the old way of widening too-narrow
  755. // types. User code should never use __time64_t.
  756. // Get the definitions of O_*, F_*, FD_*: all the
  757. // numbers and flag bits for `open', `fcntl', et al.
  758. // O_*, F_*, FD_* bit values for Linux/PowerPC.
  759. // Copyright (C) 1995-2020 Free Software Foundation, Inc.
  760. // This file is part of the GNU C Library.
  761. //
  762. // The GNU C Library is free software; you can redistribute it and/or
  763. // modify it under the terms of the GNU Lesser General Public
  764. // License as published by the Free Software Foundation; either
  765. // version 2.1 of the License, or (at your option) any later version.
  766. //
  767. // The GNU C Library is distributed in the hope that it will be useful,
  768. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  769. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  770. // Lesser General Public License for more details.
  771. //
  772. // You should have received a copy of the GNU Lesser General Public
  773. // License along with the GNU C Library; if not, see
  774. // <https://www.gnu.org/licenses/>.
  775. // Determine the wordsize from the preprocessor defines.
  776. // Not necessary, files are always with 64bit off_t.
  777. type Flock = struct {
  778. Fl_type int16
  779. Fl_whence int16
  780. F__ccgo_pad1 [4]byte
  781. Fl_start X__off64_t
  782. Fl_len X__off64_t
  783. Fl_pid X__pid_t
  784. F__ccgo_pad2 [4]byte
  785. } /* fcntl.h:36:1 */
  786. // Include generic Linux declarations.
  787. // O_*, F_*, FD_* bit values for Linux.
  788. // Copyright (C) 2001-2020 Free Software Foundation, Inc.
  789. // This file is part of the GNU C Library.
  790. //
  791. // The GNU C Library is free software; you can redistribute it and/or
  792. // modify it under the terms of the GNU Lesser General Public
  793. // License as published by the Free Software Foundation; either
  794. // version 2.1 of the License, or (at your option) any later version.
  795. //
  796. // The GNU C Library is distributed in the hope that it will be useful,
  797. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  798. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  799. // Lesser General Public License for more details.
  800. //
  801. // You should have received a copy of the GNU Lesser General Public
  802. // License along with the GNU C Library; if not, see
  803. // <https://www.gnu.org/licenses/>.
  804. // This file contains shared definitions between Linux architectures
  805. // and is included by <bits/fcntl.h> to declare them. The various
  806. // #ifndef cases allow the architecture specific file to define those
  807. // values with different values.
  808. //
  809. // A minimal <bits/fcntl.h> contains just:
  810. //
  811. // struct flock {...}
  812. // #ifdef __USE_LARGEFILE64
  813. // struct flock64 {...}
  814. // #endif
  815. // #include <bits/fcntl-linux.h>
  816. // open/fcntl.
  817. // open file description locks.
  818. //
  819. // Usually record locks held by a process are released on *any* close and are
  820. // not inherited across a fork.
  821. //
  822. // These cmd values will set locks that conflict with process-associated record
  823. // locks, but are "owned" by the opened file description, not the process.
  824. // This means that they are inherited across fork or clone with CLONE_FILES
  825. // like BSD (flock) locks, and they are only released automatically when the
  826. // last reference to the the file description against which they were acquired
  827. // is put.
  828. // For now, Linux has no separate synchronicity options for read
  829. // operations. We define O_RSYNC therefore as the same as O_SYNC
  830. // since this is a superset.
  831. // Values for the second argument to `fcntl'.
  832. // For F_[GET|SET]FD.
  833. // For posix fcntl() and `l_type' field of a `struct flock' for lockf().
  834. // For old implementation of BSD flock.
  835. // Operations for BSD flock, also used by the kernel implementation.
  836. // Define some more compatibility macros to be backward compatible with
  837. // BSD systems which did not managed to hide these kernel macros.
  838. // Advise to `posix_fadvise'.
  839. // Values for `*at' functions.
  840. // Detect if open needs mode as a third argument (or for openat as a fourth
  841. // argument).
  842. // POSIX.1-2001 specifies that these types are defined by <fcntl.h>.
  843. //
  844. // Earlier POSIX standards permitted any type ending in `_t' to be defined
  845. // by any POSIX header, so we don't conditionalize the definitions here.
  846. type Mode_t = X__mode_t /* fcntl.h:50:18 */
  847. type Off_t = X__off64_t /* fcntl.h:58:19 */
  848. type Pid_t = X__pid_t /* fcntl.h:69:17 */
  849. // For XPG all symbols from <sys/stat.h> should also be available.
  850. // NB: Include guard matches what <linux/time.h> uses.
  851. // bits/types.h -- definitions of __*_t types underlying *_t types.
  852. // Copyright (C) 2002-2020 Free Software Foundation, Inc.
  853. // This file is part of the GNU C Library.
  854. //
  855. // The GNU C Library is free software; you can redistribute it and/or
  856. // modify it under the terms of the GNU Lesser General Public
  857. // License as published by the Free Software Foundation; either
  858. // version 2.1 of the License, or (at your option) any later version.
  859. //
  860. // The GNU C Library is distributed in the hope that it will be useful,
  861. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  862. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  863. // Lesser General Public License for more details.
  864. //
  865. // You should have received a copy of the GNU Lesser General Public
  866. // License along with the GNU C Library; if not, see
  867. // <https://www.gnu.org/licenses/>.
  868. // Never include this file directly; use <sys/types.h> instead.
  869. // Endian macros for string.h functions
  870. // Copyright (C) 1992-2020 Free Software Foundation, Inc.
  871. // This file is part of the GNU C Library.
  872. //
  873. // The GNU C Library is free software; you can redistribute it and/or
  874. // modify it under the terms of the GNU Lesser General Public
  875. // License as published by the Free Software Foundation; either
  876. // version 2.1 of the License, or (at your option) any later version.
  877. //
  878. // The GNU C Library is distributed in the hope that it will be useful,
  879. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  880. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  881. // Lesser General Public License for more details.
  882. //
  883. // You should have received a copy of the GNU Lesser General Public
  884. // License along with the GNU C Library; if not, see
  885. // <http://www.gnu.org/licenses/>.
  886. // Definitions for byte order, according to significance of bytes,
  887. // from low addresses to high addresses. The value is what you get by
  888. // putting '4' in the most significant byte, '3' in the second most
  889. // significant byte, '2' in the second least significant byte, and '1'
  890. // in the least significant byte, and then writing down one digit for
  891. // each byte, starting with the byte at the lowest address at the left,
  892. // and proceeding to the byte with the highest address at the right.
  893. // This file defines `__BYTE_ORDER' for the particular machine.
  894. // PowerPC has selectable endianness.
  895. // Some machines may need to use a different endianness for floating point
  896. // values.
  897. // POSIX.1b structure for a time value. This is like a `struct timeval' but
  898. //
  899. // has nanoseconds instead of microseconds.
  900. type Timespec = struct {
  901. Ftv_sec X__time_t
  902. Ftv_nsec X__syscall_slong_t
  903. } /* struct_timespec.h:10:1 */
  904. // Copyright (C) 1992-2020 Free Software Foundation, Inc.
  905. // This file is part of the GNU C Library.
  906. //
  907. // The GNU C Library is free software; you can redistribute it and/or
  908. // modify it under the terms of the GNU Lesser General Public
  909. // License as published by the Free Software Foundation; either
  910. // version 2.1 of the License, or (at your option) any later version.
  911. //
  912. // The GNU C Library is distributed in the hope that it will be useful,
  913. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  914. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  915. // Lesser General Public License for more details.
  916. //
  917. // You should have received a copy of the GNU Lesser General Public
  918. // License along with the GNU C Library; if not, see
  919. // <https://www.gnu.org/licenses/>.
  920. // Determine the wordsize from the preprocessor defines.
  921. // Versions of the `struct stat' data structure.
  922. // Versions of the `xmknod' interface.
  923. type Stat = struct {
  924. Fst_dev X__dev_t
  925. Fst_ino X__ino64_t
  926. Fst_nlink X__nlink_t
  927. Fst_mode X__mode_t
  928. Fst_uid X__uid_t
  929. Fst_gid X__gid_t
  930. F__pad2 int32
  931. Fst_rdev X__dev_t
  932. Fst_size X__off64_t
  933. Fst_blksize X__blksize_t
  934. Fst_blocks X__blkcnt64_t
  935. Fst_atim struct {
  936. Ftv_sec X__time_t
  937. Ftv_nsec X__syscall_slong_t
  938. }
  939. Fst_mtim struct {
  940. Ftv_sec X__time_t
  941. Ftv_nsec X__syscall_slong_t
  942. }
  943. Fst_ctim struct {
  944. Ftv_sec X__time_t
  945. Ftv_nsec X__syscall_slong_t
  946. }
  947. F__glibc_reserved4 uint64
  948. F__glibc_reserved5 uint64
  949. F__glibc_reserved6 uint64
  950. } /* stat.h:141:1 */
  951. // Define some inlines helping to catch common problems.
  952. var _ uint8 /* gen.c:2:13: */