tai_u64.c (253B)
1 /* ISC license. */ 2 3 #include <skalibs/bsdsnowflake.h> 4 #include <errno.h> 5 #include <skalibs/uint64.h> 6 #include <skalibs/tai.h> 7 8 int tai_u64 (tai *t, uint64_t u) 9 { 10 if (u & ((uint64_t)1 << 63)) return (errno = EOVERFLOW, 0) ; 11 t->x = u ; 12 return 1 ; 13 }