summaryrefslogtreecommitdiff
path: root/ext/date/lib/timelib_structs.h
diff options
context:
space:
mode:
Diffstat (limited to 'ext/date/lib/timelib_structs.h')
-rw-r--r--ext/date/lib/timelib_structs.h22
1 files changed, 20 insertions, 2 deletions
diff --git a/ext/date/lib/timelib_structs.h b/ext/date/lib/timelib_structs.h
index 5033321356..d34e33d8a5 100644
--- a/ext/date/lib/timelib_structs.h
+++ b/ext/date/lib/timelib_structs.h
@@ -37,6 +37,24 @@
#include <strings.h>
#endif
+#if defined(__X86_64__) || defined(__LP64__) || defined(_LP64) || defined(_WIN64)
+typedef int64_t timelib_long;
+typedef uint64_t timelib_ulong;
+# define TIMELIB_LONG_MAX INT64_MAX
+# define TIMELIB_LONG_MIN INT64_MIN
+# define TIMELIB_ULONG_MAX UINT64_MAX
+# define TIMELIB_LONG_FMT "%" PRId64
+# define TIMELIB_ULONG_FMT "%" PRIu64
+#else
+typedef int32_t timelib_long;
+typedef uint32_t timelib_ulong;
+# define TIMELIB_LONG_MAX INT32_MAX
+# define TIMELIB_LONG_MIN INT32_MIN
+# define TIMELIB_ULONG_MAX UINT32_MAX
+# define TIMELIB_LONG_FMT "%" PRId32
+# define TIMELIB_ULONG_FMT "%" PRIu32
+#endif
+
#if defined(_MSC_VER)
typedef uint64_t timelib_ull;
typedef int64_t timelib_sll;
@@ -155,10 +173,10 @@ typedef struct timelib_error_message {
} timelib_error_message;
typedef struct timelib_error_container {
- int warning_count;
+ struct timelib_error_message *error_messages;
struct timelib_error_message *warning_messages;
int error_count;
- struct timelib_error_message *error_messages;
+ int warning_count;
} timelib_error_container;
typedef struct _timelib_tz_lookup_table {