rvthtool/cmake/macros/64BitTimeSupport.c
David Korth f321fe5e65 Initial import of RVT-H Tool.
This program will allow for managing Nintendo RVT-H Reader devkits,
including dumping existing images and installing new images.

The current version doesn't actually do anything. It's mostly a copy
of the infrastructure from rom-properties, with some changes. In
particular, we're using CMake's TARGET_COMPILE_FEATURES() instead of
manually detecting C99 support.
2018-01-15 06:58:54 -05:00

18 lines
461 B
C

/**
* 64-bit time_t test code.
* Reference: https://github.com/Benjamin-Dobell/Heimdall/blob/master/cmake/LargeFiles.c
*/
#include <stdint.h>
#include <time.h>
/** static_assert() macro copied from c++11-compat.h **/
#define static_assert(expr, msg) switch (0) { case 0: case (expr): ; }
int main(int argc, char *argv[])
{
static_assert(sizeof(time_t) == sizeof(int64_t), "time_t is the wrong size");
int64_t tm64;
time_t tm = time(&tm64);
return 0;
}