fcntl_linux_arm.go 48 KB

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