From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sven Strickroth Subject: [PATCH 2/2] MSVC: VS2013 comes with inttypes.h Date: Tue, 29 Mar 2016 18:27:00 +0200 Message-ID: <56FAACD4.9080504@cs-ware.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit To: Git List , Junio C Hamano , Sebastian Schuberth , blees@dcon.de X-From: git-owner@vger.kernel.org Tue Mar 29 18:27:23 2016 Return-path: Envelope-to: gcvg-git-2@plane.gmane.org Received: from vger.kernel.org ([209.132.180.67]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1akwU5-0006kD-Tz for gcvg-git-2@plane.gmane.org; Tue, 29 Mar 2016 18:27:14 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757325AbcC2Q1J (ORCPT ); Tue, 29 Mar 2016 12:27:09 -0400 Received: from srv1.79p.de ([213.239.234.118]:50237 "EHLO srv1.79p.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752643AbcC2Q1I (ORCPT ); Tue, 29 Mar 2016 12:27:08 -0400 X-Virus-Scanned: Debian amavisd-new at srv1.79p.de Received: from [IPv6:2003:88:6f26:c00:d0ba:9b5:8751:68b6] (p200300886F260C00D0BA09B5875168B6.dip0.t-ipconnect.de [IPv6:2003:88:6f26:c00:d0ba:9b5:8751:68b6]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: sven@cs-ware.de) by srv1.79p.de (Postfix) with ESMTPSA id A60E92249F2; Tue, 29 Mar 2016 18:27:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=cs-ware.de; s=mail2015b; t=1459268824; bh=UVNKWzkwcoHIytlYgYgkXVGOis7oYmk9PmolZUHrbAI=; h=From:Subject:To:Date; b=jxzYYf5GBP1yh9B5Gm5R9qsZsCWBJq5pLnpNRdwFpDOfAa8blQwO2Z8B1gmsw26PG ttE1bHiY33DM7f7kclzq11lvhPg6TeInB+szbu7AScGZX6k0Zn/Cvtkj6dSQbVC3n/ +Sb+rqGE/z8Pgb3iPrdXfxWg+7TnF+u+E3GTxK8xBNCn3ta/lgSCdTb4NFCjvybJnU G5fOoSrLLN1oRM+yeopJ0vEGG03u80PezuQKYA0jpdOpP4oFdGz7x6Qc26gMszuGoX Y+MtBahUfxrkM1hV5AjBzcV03bs0bc+vGUAMjLR5C033PQ1nEmqNx8y9C9Ma8ig5Ds SscV90GBNMdhA== User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: Reduce the number of defines which need to be managed within vanilal git. Signed-off-by: Sven Strickroth --- compat/mingw.h | 2 +- compat/vcbuild/include/unistd.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/compat/mingw.h b/compat/mingw.h index 6b6d695..5d7f0dd 100644 --- a/compat/mingw.h +++ b/compat/mingw.h @@ -415,7 +415,7 @@ int mingw_offset_1st_component(const char *path); extern void build_libgit_environment(void); extern const char *program_data_config(void); #define git_program_data_config program_data_config -#ifndef __MINGW64_VERSION_MAJOR +#if !defined(__MINGW64_VERSION_MAJOR) || !defined(_MSC_VER) || _MSC_VER < 1800 #define PRIuMAX "I64u" #define PRId64 "I64d" #else diff --git a/compat/vcbuild/include/unistd.h b/compat/vcbuild/include/unistd.h index c65c2cd..b4b7b7c 100644 --- a/compat/vcbuild/include/unistd.h +++ b/compat/vcbuild/include/unistd.h @@ -45,11 +45,13 @@ typedef unsigned long long uintmax_t; typedef int64_t off64_t; +#if !defined(_MSC_VER) || _MSC_VER < 1800 #define INTMAX_MIN _I64_MIN #define INTMAX_MAX _I64_MAX #define UINTMAX_MAX _UI64_MAX #define UINT32_MAX 0xffffffff /* 4294967295U */ +#endif #define STDIN_FILENO 0 #define STDOUT_FILENO 1 -- 2.7.4.windows.1