summaryrefslogtreecommitdiff
path: root/src/common.h
diff options
context:
space:
mode:
authorAndreas Ericsson <ae@op5.se>2010-04-23 09:59:22 +0200
committerAndreas Ericsson <ae@op5.se>2010-04-23 09:59:22 +0200
commitfb799dfe77c7a1c9e2806c0021d659b5588d9105 (patch)
treeff02f4077fc8420d328c8b91c1f5b2e71a7c19c8 /src/common.h
parent100746511cc45c9f1ad6721c4ef5be49222fee4d (diff)
parent2cdc4544233b503a5aff7dd1baa4ba8743fef7ab (diff)
downloadlibgit2-fb799dfe77c7a1c9e2806c0021d659b5588d9105.tar.gz
Merge remote branch 'ramsay/dev'
* ramsay/dev: Add a pack index 'virtual function' to fetch an index entry Add a pack index 'virtual function' to search by file offset Change the interface of the pack index search function Add an 64-bit offset table index bounds check for v2 pack index Add a minimum size check when opening an v2 pack index file win32: Add separate MinGW and MSVC compatability header files Makefile: Add support for custom build options in config.mak file Fix some coding style issues
Diffstat (limited to 'src/common.h')
-rw-r--r--src/common.h43
1 files changed, 2 insertions, 41 deletions
diff --git a/src/common.h b/src/common.h
index ae3a1615a..ff87c872c 100644
--- a/src/common.h
+++ b/src/common.h
@@ -32,43 +32,13 @@
# include <io.h>
# include <direct.h>
# include <windows.h>
+# include "msvc-compat.h"
+# include "mingw-compat.h"
# define snprintf _snprintf
-# if defined(__DMC__)
-# if defined(_M_AMD64)
-# define SSIZE_T long long
-# else
-# define SSIZE_T int
-# endif
-# endif
-
typedef SSIZE_T ssize_t;
-# if defined(_MSC_VER)
-/* access() mode parameter #defines */
-# define F_OK 0 /* existence check */
-# define W_OK 2 /* write mode check */
-# define R_OK 4 /* read mode check */
-# endif
-
-#if defined(__MINGW32__)
-
-# define off_t off64_t
-# define lseek _lseeki64
-# define stat _stati64
-# define fstat _fstati64
-
-#elif defined(_MSC_VER)
-
-typedef __int64 off64_t;
-# define off_t off64_t
-# define lseek _lseeki64
-# define stat _stat64
-# define fstat _fstat64
-
-#endif
-
#else
# include <unistd.h>
@@ -84,13 +54,4 @@ typedef __int64 off64_t;
#define GIT_PATH_MAX 4096
-#ifndef GIT_HAVE_INTTYPES_H
-/* add some missing <stdint.h> typedef's */
-typedef long int32_t;
-typedef unsigned long uint32_t;
-
-typedef long long int64_t;
-typedef unsigned long long uint64_t;
-#endif
-
#endif /* INCLUDE_common_h__ */