File tree Expand file tree Collapse file tree 3 files changed +15
-2
lines changed Expand file tree Collapse file tree 3 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -1212,7 +1212,7 @@ ARFLAGS = rcs
12121212PTHREAD_CFLAGS =
12131213
12141214# For the 'sparse' target
1215- SPARSE_FLAGS ?=
1215+ SPARSE_FLAGS ?= -std=gnu99
12161216SP_EXTRA_FLAGS = -Wno-universal-initializer
12171217
12181218# For informing GIT-BUILD-OPTIONS of the SANITIZE=leak target
Original file line number Diff line number Diff line change @@ -208,7 +208,7 @@ endif()
208208if (CMAKE_C_COMPILER_ID STREQUAL "MSVC" )
209209 set (CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR} )
210210 set (CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR} )
211- add_compile_options (/MP)
211+ add_compile_options (/MP /std:c11 )
212212endif ()
213213
214214#default behaviour
Original file line number Diff line number Diff line change 11#ifndef GIT_COMPAT_UTIL_H
22#define GIT_COMPAT_UTIL_H
33
4+ #if __STDC_VERSION__ - 0 < 199901L
5+ /*
6+ * Git is in a testing period for mandatory C99 support in the compiler. If
7+ * your compiler is reasonably recent, you can try to enable C99 support (or,
8+ * for MSVC, C11 support). If you encounter a problem and can't enable C99
9+ * support with your compiler (such as with "-std=gnu99") and don't have access
10+ * to one with this support, such as GCC or Clang, you can remove this #if
11+ * directive, but please report the details of your system to
12+ * git@vger.kernel.org.
13+ */
14+ #error "Required C99 support is in a test phase. Please see git-compat-util.h for more details."
15+ #endif
16+
417#ifdef USE_MSVC_CRTDBG
518/*
619 * For these to work they must appear very early in each
You can’t perform that action at this time.
0 commit comments