diff --git a/BUILD b/BUILD new file mode 100644 index 0000000..11d2ad0 --- /dev/null +++ b/BUILD @@ -0,0 +1,12 @@ +# -*- mode: gn -*- +package(default_visibility = ["//visibility:public"]) + +cc_library( + name = "frozen", + srcs = [ + "frozen.c", + ], + hdrs = [ + "frozen.h", + ], +) diff --git a/frozen.c b/frozen.c index b614128..4b5e279 100644 --- a/frozen.c +++ b/frozen.c @@ -47,18 +47,22 @@ typedef unsigned _int64 uint64_t; #endif #define PRId64 "I64d" #define PRIu64 "I64u" +#if !defined(SIZE_T_FMT) #if _MSC_VER >= 1310 #define SIZE_T_FMT "Iu" #else #define SIZE_T_FMT "u" #endif +#endif #else /* _WIN32 */ /* wants this for C++ */ #ifndef __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS #endif #include +#if !defined(SIZE_T_FMT) #define SIZE_T_FMT "zu" +#endif #endif /* _WIN32 */ #define INT64_FMT PRId64