summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/git2/deprecated.h2
-rw-r--r--include/git2/types.h22
2 files changed, 5 insertions, 19 deletions
diff --git a/include/git2/deprecated.h b/include/git2/deprecated.h
index ac1ad1a63..b2f91b9d0 100644
--- a/include/git2/deprecated.h
+++ b/include/git2/deprecated.h
@@ -308,6 +308,8 @@ GIT_EXTERN(int) git_index_add_frombuffer(
#define GIT_OBJ_OFS_DELTA GIT_OBJECT_OFS_DELTA
#define GIT_OBJ_REF_DELTA GIT_OBJECT_REF_DELTA
+typedef git_object_size_t git_off_t;
+
/**
* Get the size in bytes for the structure which
* acts as an in-memory representation of any given
diff --git a/include/git2/types.h b/include/git2/types.h
index ade0c7d32..0de579615 100644
--- a/include/git2/types.h
+++ b/include/git2/types.h
@@ -36,31 +36,15 @@ GIT_BEGIN_DECL
#include <stdint.h>
#endif
+/** Time in seconds from the Unix epoch */
#if defined(_MSC_VER)
-
-typedef __int64 git_off_t;
typedef __time64_t git_time_t;
-
#elif defined(__MINGW32__)
-
-typedef off64_t git_off_t;
typedef __time64_t git_time_t;
-
#elif defined(__HAIKU__)
-
-typedef __haiku_std_int64 git_off_t;
typedef __haiku_std_int64 git_time_t;
-
-#else /* POSIX */
-
-/*
- * Note: Can't use off_t since if a client program includes <sys/types.h>
- * before us (directly or indirectly), they'll get 32 bit off_t in their client
- * app, even though /we/ define _FILE_OFFSET_BITS=64.
- */
-typedef int64_t git_off_t;
-typedef int64_t git_time_t; /**< time in seconds from epoch */
-
+#else
+typedef int64_t git_time_t;
#endif
/** The maximum size of an object */