MSVC: use shipped headers instead of fallback definitions
VS2010 comes with stdint.h [1] VS2013 comes with inttypes.h [2] [1] https://stackoverflow.com/a/2628014/3906760 [2] https://blogs.msdn.microsoft.com/vcblog/2013/07/19/c99-library-support-in-visual-studio-2013/ Signed-off-by: Sven Strickroth <sven@cs-ware.de> Acked-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Acked-by: Sebastian Schuberth <sschuberth@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
dae26d30f4
commit
0ef60afdd4
@ -406,7 +406,7 @@ static inline void convert_slashes(char *path)
|
|||||||
int mingw_offset_1st_component(const char *path);
|
int mingw_offset_1st_component(const char *path);
|
||||||
#define offset_1st_component mingw_offset_1st_component
|
#define offset_1st_component mingw_offset_1st_component
|
||||||
#define PATH_SEP ';'
|
#define PATH_SEP ';'
|
||||||
#ifndef __MINGW64_VERSION_MAJOR
|
#if !defined(__MINGW64_VERSION_MAJOR) && (!defined(_MSC_VER) || _MSC_VER < 1800)
|
||||||
#define PRIuMAX "I64u"
|
#define PRIuMAX "I64u"
|
||||||
#define PRId64 "I64d"
|
#define PRId64 "I64d"
|
||||||
#else
|
#else
|
||||||
|
@ -45,11 +45,15 @@ typedef unsigned long long uintmax_t;
|
|||||||
|
|
||||||
typedef int64_t off64_t;
|
typedef int64_t off64_t;
|
||||||
|
|
||||||
|
#if !defined(_MSC_VER) || _MSC_VER < 1600
|
||||||
#define INTMAX_MIN _I64_MIN
|
#define INTMAX_MIN _I64_MIN
|
||||||
#define INTMAX_MAX _I64_MAX
|
#define INTMAX_MAX _I64_MAX
|
||||||
#define UINTMAX_MAX _UI64_MAX
|
#define UINTMAX_MAX _UI64_MAX
|
||||||
|
|
||||||
#define UINT32_MAX 0xffffffff /* 4294967295U */
|
#define UINT32_MAX 0xffffffff /* 4294967295U */
|
||||||
|
#else
|
||||||
|
#include <stdint.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#define STDIN_FILENO 0
|
#define STDIN_FILENO 0
|
||||||
#define STDOUT_FILENO 1
|
#define STDOUT_FILENO 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user