time_windows_amd64.go 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422
  1. // Code generated by 'ccgo time\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 time\time_windows_amd64.go -pkgname time', DO NOT EDIT.
  2. package time
  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. CLK_TCK = 1000
  15. CLOCKS_PER_SEC = 1000
  16. CLOCK_MONOTONIC = 1
  17. CLOCK_PROCESS_CPUTIME_ID = 2
  18. CLOCK_REALTIME = 0
  19. CLOCK_THREAD_CPUTIME_ID = 3
  20. DUMMYSTRUCTNAME = 0
  21. DUMMYSTRUCTNAME1 = 0
  22. DUMMYSTRUCTNAME2 = 0
  23. DUMMYSTRUCTNAME3 = 0
  24. DUMMYSTRUCTNAME4 = 0
  25. DUMMYSTRUCTNAME5 = 0
  26. DUMMYUNIONNAME = 0
  27. DUMMYUNIONNAME1 = 0
  28. DUMMYUNIONNAME2 = 0
  29. DUMMYUNIONNAME3 = 0
  30. DUMMYUNIONNAME4 = 0
  31. DUMMYUNIONNAME5 = 0
  32. DUMMYUNIONNAME6 = 0
  33. DUMMYUNIONNAME7 = 0
  34. DUMMYUNIONNAME8 = 0
  35. DUMMYUNIONNAME9 = 0
  36. MINGW_DDK_H = 0
  37. MINGW_DDRAW_VERSION = 7
  38. MINGW_HAS_DDK_H = 1
  39. MINGW_HAS_DDRAW_H = 1
  40. MINGW_HAS_SECURE_API = 1
  41. MINGW_SDK_INIT = 0
  42. TIMER_ABSTIME = 1
  43. UNALIGNED = 0
  44. USE___UUIDOF = 0
  45. WIN32 = 1
  46. WIN64 = 1
  47. WINNT = 1
  48. WINPTHREAD_API = 0
  49. WIN_PTHREADS_TIME_H = 0
  50. X_AGLOBAL = 0
  51. X_ANONYMOUS_STRUCT = 0
  52. X_ANONYMOUS_UNION = 0
  53. X_ARGMAX = 100
  54. X_CLOCK_T_DEFINED = 0
  55. X_CONST_RETURN = 0
  56. X_CRTNOALIAS = 0
  57. X_CRTRESTRICT = 0
  58. X_CRT_ALTERNATIVE_IMPORTED = 0
  59. X_CRT_MANAGED_HEAP_DEPRECATE = 0
  60. X_CRT_PACKING = 8
  61. X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES = 0
  62. X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY = 0
  63. X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES = 0
  64. X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT = 0
  65. X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY = 0
  66. X_DLL = 0
  67. X_ERRCODE_DEFINED = 0
  68. X_FILE_OFFSET_BITS = 64
  69. X_INC_CRTDEFS = 0
  70. X_INC_CRTDEFS_MACRO = 0
  71. X_INC_MINGW_SECAPI = 0
  72. X_INC_VADEFS = 0
  73. X_INC_WTIME_INL = 0
  74. X_INC_WTIME_S_INL = 0
  75. X_INC__MINGW_H = 0
  76. X_INT128_DEFINED = 0
  77. X_INTEGRAL_MAX_BITS = 64
  78. X_INTPTR_T_DEFINED = 0
  79. X_MT = 0
  80. X_M_AMD64 = 100
  81. X_M_X64 = 100
  82. X_PGLOBAL = 0
  83. X_POSIX_CPUTIME = 200809
  84. X_POSIX_MONOTONIC_CLOCK = 200809
  85. X_POSIX_THREAD_CPUTIME = 200809
  86. X_POSIX_TIMERS = 200809
  87. X_PTRDIFF_T_ = 0
  88. X_PTRDIFF_T_DEFINED = 0
  89. X_REENTRANT = 1
  90. X_RSIZE_T_DEFINED = 0
  91. X_SECURECRT_FILL_BUFFER_PATTERN = 0xFD
  92. X_SIZE_T_DEFINED = 0
  93. X_SSIZE_T_DEFINED = 0
  94. X_TAGLC_ID_DEFINED = 0
  95. X_THREADLOCALEINFO = 0
  96. X_TIME32_T_DEFINED = 0
  97. X_TIME64_T_DEFINED = 0
  98. X_TIMEB_DEFINED = 0
  99. X_TIMEB_H_ = 0
  100. X_TIMEB_H_S = 0
  101. X_TIMESPEC_DEFINED = 0
  102. X_TIMEVAL_DEFINED = 0
  103. X_TIMEZONE_DEFINED = 0
  104. X_TIME_H_ = 0
  105. X_TIME_T_DEFINED = 0
  106. X_TM_DEFINED = 0
  107. X_UINTPTR_T_DEFINED = 0
  108. X_VA_LIST_DEFINED = 0
  109. X_W64 = 0
  110. X_WCHAR_T_DEFINED = 0
  111. X_WCTYPE_T_DEFINED = 0
  112. X_WIN32 = 1
  113. X_WIN32_WINNT = 0x502
  114. X_WIN64 = 1
  115. X_WINT_T = 0
  116. X_WTIME_DEFINED = 0
  117. )
  118. type Ptrdiff_t = int64 /* <builtin>:3:26 */
  119. type Size_t = uint64 /* <builtin>:9:23 */
  120. type Wchar_t = uint16 /* <builtin>:15:24 */
  121. type X__int128_t = struct {
  122. Flo int64
  123. Fhi int64
  124. } /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128
  125. type X__uint128_t = struct {
  126. Flo uint64
  127. Fhi uint64
  128. } /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128
  129. type X__builtin_va_list = uintptr /* <builtin>:46:14 */
  130. type X__float128 = float64 /* <builtin>:47:21 */
  131. type Va_list = X__builtin_va_list /* <builtin>:50:27 */
  132. // *
  133. // This file has no copyright assigned and is placed in the Public Domain.
  134. // This file is part of the mingw-w64 runtime package.
  135. // No warranty is given; refer to the file DISCLAIMER.PD within this package.
  136. // *
  137. // This file has no copyright assigned and is placed in the Public Domain.
  138. // This file is part of the mingw-w64 runtime package.
  139. // No warranty is given; refer to the file DISCLAIMER.PD within this package.
  140. // *
  141. // This file has no copyright assigned and is placed in the Public Domain.
  142. // This file is part of the mingw-w64 runtime package.
  143. // No warranty is given; refer to the file DISCLAIMER.PD within this package.
  144. // *
  145. // This file has no copyright assigned and is placed in the Public Domain.
  146. // This file is part of the mingw-w64 runtime package.
  147. // No warranty is given; refer to the file DISCLAIMER.PD within this package.
  148. // This macro holds an monotonic increasing value, which indicates
  149. // a specific fix/patch is present on trunk. This value isn't related to
  150. // minor/major version-macros. It is increased on demand, if a big
  151. // fix was applied to trunk. This macro gets just increased on trunk. For
  152. // other branches its value won't be modified.
  153. // mingw.org's version macros: these make gcc to define
  154. // MINGW32_SUPPORTS_MT_EH and to use the _CRT_MT global
  155. // and the __mingwthr_key_dtor() function from the MinGW
  156. // CRT in its private gthr-win32.h header.
  157. // Set VC specific compiler target macros.
  158. // MS does not prefix symbols by underscores for 64-bit.
  159. // As we have to support older gcc version, which are using underscores
  160. // as symbol prefix for x64, we have to check here for the user label
  161. // prefix defined by gcc.
  162. // Special case nameless struct/union.
  163. // MinGW-w64 has some additional C99 printf/scanf feature support.
  164. // So we add some helper macros to ease recognition of them.
  165. // *
  166. // This file has no copyright assigned and is placed in the Public Domain.
  167. // This file is part of the mingw-w64 runtime package.
  168. // No warranty is given; refer to the file DISCLAIMER.PD within this package.
  169. // http://msdn.microsoft.com/en-us/library/ms175759%28v=VS.100%29.aspx
  170. // Templates won't work in C, will break if secure API is not enabled, disabled
  171. // https://blogs.msdn.com/b/sdl/archive/2010/02/16/vc-2010-and-memcpy.aspx?Redirected=true
  172. // fallback on default implementation if we can't know the size of the destination
  173. // Include _cygwin.h if we're building a Cygwin application.
  174. // Target specific macro replacement for type "long". In the Windows API,
  175. // the type long is always 32 bit, even if the target is 64 bit (LLP64).
  176. // On 64 bit Cygwin, the type long is 64 bit (LP64). So, to get the right
  177. // sized definitions and declarations, all usage of type long in the Windows
  178. // headers have to be replaced by the below defined macro __LONG32.
  179. // C/C++ specific language defines.
  180. // Note the extern. This is needed to work around GCC's
  181. // limitations in handling dllimport attribute.
  182. // Attribute `nonnull' was valid as of gcc 3.3. We don't use GCC's
  183. // variadiac macro facility, because variadic macros cause syntax
  184. // errors with --traditional-cpp.
  185. // High byte is the major version, low byte is the minor.
  186. // *
  187. // This file has no copyright assigned and is placed in the Public Domain.
  188. // This file is part of the mingw-w64 runtime package.
  189. // No warranty is given; refer to the file DISCLAIMER.PD within this package.
  190. // *
  191. // This file has no copyright assigned and is placed in the Public Domain.
  192. // This file is part of the mingw-w64 runtime package.
  193. // No warranty is given; refer to the file DISCLAIMER.PD within this package.
  194. type X__gnuc_va_list = X__builtin_va_list /* vadefs.h:24:29 */
  195. type Ssize_t = int64 /* crtdefs.h:45:35 */
  196. type Rsize_t = Size_t /* crtdefs.h:52:16 */
  197. type Intptr_t = int64 /* crtdefs.h:62:35 */
  198. type Uintptr_t = uint64 /* crtdefs.h:75:44 */
  199. type Wint_t = uint16 /* crtdefs.h:106:24 */
  200. type Wctype_t = uint16 /* crtdefs.h:107:24 */
  201. type Errno_t = int32 /* crtdefs.h:113:13 */
  202. type X__time32_t = int32 /* crtdefs.h:118:14 */
  203. type X__time64_t = int64 /* crtdefs.h:123:35 */
  204. type Time_t = X__time64_t /* crtdefs.h:138:20 */
  205. type Threadlocaleinfostruct = struct {
  206. Frefcount int32
  207. Flc_codepage uint32
  208. Flc_collate_cp uint32
  209. Flc_handle [6]uint32
  210. Flc_id [6]LC_ID
  211. Flc_category [6]struct {
  212. Flocale uintptr
  213. Fwlocale uintptr
  214. Frefcount uintptr
  215. Fwrefcount uintptr
  216. }
  217. Flc_clike int32
  218. Fmb_cur_max int32
  219. Flconv_intl_refcount uintptr
  220. Flconv_num_refcount uintptr
  221. Flconv_mon_refcount uintptr
  222. Flconv uintptr
  223. Fctype1_refcount uintptr
  224. Fctype1 uintptr
  225. Fpctype uintptr
  226. Fpclmap uintptr
  227. Fpcumap uintptr
  228. Flc_time_curr uintptr
  229. } /* crtdefs.h:422:1 */
  230. type Pthreadlocinfo = uintptr /* crtdefs.h:424:39 */
  231. type Pthreadmbcinfo = uintptr /* crtdefs.h:425:36 */
  232. type Localeinfo_struct = struct {
  233. Flocinfo Pthreadlocinfo
  234. Fmbcinfo Pthreadmbcinfo
  235. } /* crtdefs.h:428:9 */
  236. type X_locale_tstruct = Localeinfo_struct /* crtdefs.h:431:3 */
  237. type X_locale_t = uintptr /* crtdefs.h:431:19 */
  238. type TagLC_ID = struct {
  239. FwLanguage uint16
  240. FwCountry uint16
  241. FwCodePage uint16
  242. } /* crtdefs.h:422:1 */
  243. type LC_ID = TagLC_ID /* crtdefs.h:439:3 */
  244. type LPLC_ID = uintptr /* crtdefs.h:439:9 */
  245. type Threadlocinfo = Threadlocaleinfostruct /* crtdefs.h:468:3 */
  246. type Clock_t = int32 /* time.h:60:16 */
  247. type Tm = struct {
  248. Ftm_sec int32
  249. Ftm_min int32
  250. Ftm_hour int32
  251. Ftm_mday int32
  252. Ftm_mon int32
  253. Ftm_year int32
  254. Ftm_wday int32
  255. Ftm_yday int32
  256. Ftm_isdst int32
  257. } /* time.h:97:3 */
  258. var Xdaylight int32 /* time.h:278:22: */
  259. var Xtimezone int32 /* time.h:281:23: */
  260. var Xtzname [2]uintptr /* time.h:282:23: */
  261. // *
  262. // This file has no copyright assigned and is placed in the Public Domain.
  263. // This file is part of the mingw-w64 runtime package.
  264. // No warranty is given; refer to the file DISCLAIMER.PD within this package.
  265. type Timeval = struct {
  266. Ftv_sec int32
  267. Ftv_usec int32
  268. } /* _timeval.h:10:1 */
  269. type Timezone = struct {
  270. Ftz_minuteswest int32
  271. Ftz_dsttime int32
  272. } /* time.h:290:1 */
  273. // Adding timespec definition.
  274. // *
  275. // This file has no copyright assigned and is placed in the Public Domain.
  276. // This file is part of the mingw-w64 runtime package.
  277. // No warranty is given; refer to the file DISCLAIMER.PD within this package.
  278. // *
  279. // This file has no copyright assigned and is placed in the Public Domain.
  280. // This file is part of the mingw-w64 runtime package.
  281. // No warranty is given; refer to the file DISCLAIMER.PD within this package.
  282. type X__timeb32 = struct {
  283. Ftime X__time32_t
  284. Fmillitm uint16
  285. Ftimezone int16
  286. Fdstflag int16
  287. F__ccgo_pad1 [2]byte
  288. } /* timeb.h:53:3 */
  289. type Timeb = struct {
  290. Ftime Time_t
  291. Fmillitm uint16
  292. Ftimezone int16
  293. Fdstflag int16
  294. F__ccgo_pad1 [2]byte
  295. } /* timeb.h:61:3 */
  296. type X__timeb64 = struct {
  297. Ftime X__time64_t
  298. Fmillitm uint16
  299. Ftimezone int16
  300. Fdstflag int16
  301. F__ccgo_pad1 [2]byte
  302. } /* timeb.h:69:3 */
  303. type Timespec = struct {
  304. Ftv_sec Time_t
  305. Ftv_nsec int32
  306. F__ccgo_pad1 [4]byte
  307. } /* timeb.h:90:1 */
  308. type Itimerspec = struct {
  309. Fit_interval struct {
  310. Ftv_sec Time_t
  311. Ftv_nsec int32
  312. F__ccgo_pad1 [4]byte
  313. }
  314. Fit_value struct {
  315. Ftv_sec Time_t
  316. Ftv_nsec int32
  317. F__ccgo_pad1 [4]byte
  318. }
  319. } /* timeb.h:95:1 */
  320. // POSIX 2008 says clock_gettime and timespec are defined in time.h header,
  321. // but other systems - like Linux, Solaris, etc - tend to declare such
  322. // recent extensions only if the following guards are met.
  323. //
  324. // Copyright (c) 2011-2016 mingw-w64 project
  325. //
  326. // Permission is hereby granted, free of charge, to any person obtaining a
  327. // copy of this software and associated documentation files (the "Software"),
  328. // to deal in the Software without restriction, including without limitation
  329. // the rights to use, copy, modify, merge, publish, distribute, sublicense,
  330. // and/or sell copies of the Software, and to permit persons to whom the
  331. // Software is furnished to do so, subject to the following conditions:
  332. //
  333. // The above copyright notice and this permission notice shall be included in
  334. // all copies or substantial portions of the Software.
  335. //
  336. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  337. // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  338. // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  339. // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  340. // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  341. // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  342. // DEALINGS IN THE SOFTWARE.
  343. // *
  344. // This file has no copyright assigned and is placed in the Public Domain.
  345. // This file is part of the mingw-w64 runtime package.
  346. // No warranty is given; refer to the file DISCLAIMER.PD within this package.
  347. // Posix timers are supported
  348. // Monotonic clocks are available.
  349. // CPU-time clocks are available.
  350. // Clock support in threads are available.
  351. type Clockid_t = int32 /* pthread_time.h:49:13 */
  352. var _ int8 /* gen.c:2:13: */