mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-04 16:11:05 +00:00
When building with MINGW, specify __USE_MINGW_ANSI_STDIO
.
This option is already present in the CMake config, but was missing from `Makefile.embed` and would cause all kinds of weird failures when compiling rugged on windows with the ruby devkit.
This commit is contained in:
parent
847c679309
commit
a6837b5fc9
@ -6,12 +6,12 @@ else
|
|||||||
PREFIX=
|
PREFIX=
|
||||||
endif
|
endif
|
||||||
|
|
||||||
WIN32=0
|
MINGW=0
|
||||||
ifneq (,$(findstring MINGW32,$(PLATFORM)))
|
ifneq (,$(findstring MINGW32,$(PLATFORM)))
|
||||||
WIN32=1
|
MINGW=1
|
||||||
endif
|
endif
|
||||||
ifneq (,$(findstring mingw,$(CROSS_COMPILE)))
|
ifneq (,$(findstring mingw,$(CROSS_COMPILE)))
|
||||||
WIN32=1
|
MINGW=1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
rm=rm -f
|
rm=rm -f
|
||||||
@ -20,7 +20,7 @@ RANLIB=$(PREFIX)ranlib
|
|||||||
|
|
||||||
LIBNAME=libgit2.a
|
LIBNAME=libgit2.a
|
||||||
|
|
||||||
ifeq ($(WIN32),1)
|
ifeq ($(MINGW),1)
|
||||||
CC=gcc
|
CC=gcc
|
||||||
else
|
else
|
||||||
CC=cc
|
CC=cc
|
||||||
@ -35,10 +35,10 @@ CFLAGS= -g $(DEFINES) -Wall -Wextra -O2 $(EXTRA_CFLAGS)
|
|||||||
|
|
||||||
SRCS = $(wildcard src/*.c) $(wildcard src/transports/*.c) $(wildcard src/xdiff/*.c) $(wildcard deps/http-parser/*.c) $(wildcard deps/zlib/*.c) src/hash/hash_generic.c
|
SRCS = $(wildcard src/*.c) $(wildcard src/transports/*.c) $(wildcard src/xdiff/*.c) $(wildcard deps/http-parser/*.c) $(wildcard deps/zlib/*.c) src/hash/hash_generic.c
|
||||||
|
|
||||||
ifeq ($(WIN32),1)
|
ifeq ($(MINGW),1)
|
||||||
SRCS += $(wildcard src/win32/*.c) $(wildcard src/compat/*.c) deps/regex/regex.c
|
SRCS += $(wildcard src/win32/*.c) $(wildcard src/compat/*.c) deps/regex/regex.c
|
||||||
INCLUDES += -Ideps/regex
|
INCLUDES += -Ideps/regex
|
||||||
DEFINES += -DWIN32 -D_WIN32_WINNT=0x0501
|
DEFINES += -DWIN32 -D_WIN32_WINNT=0x0501 -D__USE_MINGW_ANSI_STDIO=1
|
||||||
else
|
else
|
||||||
SRCS += $(wildcard src/unix/*.c)
|
SRCS += $(wildcard src/unix/*.c)
|
||||||
CFLAGS += -fPIC
|
CFLAGS += -fPIC
|
||||||
|
Loading…
Reference in New Issue
Block a user