fcntl_linux_386.go 45 KB

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