From: Ramsay Jones Date: Sat, 4 Dec 2010 18:57:30 +0000 (+0000) Subject: msvc: Fix build by adding missing INTMAX_MAX define X-Git-Tag: v1.7.4-rc0~32^2~1 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=1a3b5a3e5cfc00ca36bdbc07b3ffebcdfc9dd989;p=git.git msvc: Fix build by adding missing INTMAX_MAX define Commit c03c831 (do not depend on signed integer overflow, 05-10-2010) provokes an msvc build failure. The cause of the failure is a missing definition of the INTMAX_MAX constant, used in the new maximum_signed_value_of_type(a) macro, which would normally be defined in the C99 header file. In order the fix the compilation error, we add an appropriate definition of the INTMAX_MAX constant, along with INTMAX_MIN and UINTMAX_MAX, to an msvc compat header file. Signed-off-by: Ramsay Jones Acked-by: Erik Faye-Lund Signed-off-by: Junio C Hamano --- diff --git a/compat/vcbuild/include/unistd.h b/compat/vcbuild/include/unistd.h index 2a4f27686..b14fcf94d 100644 --- a/compat/vcbuild/include/unistd.h +++ b/compat/vcbuild/include/unistd.h @@ -45,6 +45,10 @@ typedef unsigned long long uintmax_t; typedef int64_t off64_t; +#define INTMAX_MIN _I64_MIN +#define INTMAX_MAX _I64_MAX +#define UINTMAX_MAX _UI64_MAX + #define STDOUT_FILENO 1 #define STDERR_FILENO 2