Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
a1c0728d
Commit
a1c0728d
authored
Dec 21, 2009
by
Ramsay Jones
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add support for the MinGW platform
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
parent
cfe3a027
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
5 deletions
+18
-5
Makefile
+7
-1
src/cc-compat.h
+3
-3
src/common.h
+1
-1
tests/Makefile
+7
-0
No files found.
Makefile
View file @
a1c0728d
...
...
@@ -30,6 +30,12 @@ ifneq (,$(findstring CYGWIN,$(uname_S)))
NO_VISIBILITY
=
YesPlease
endif
ifneq
(,$(findstring
MINGW,$(uname_S)))
OS
=
win32
NO_VISIBILITY
=
YesPlease
SPARSE_FLAGS
=
-Wno-one-bit-signed-bitfield
endif
SRC_C
=
$
(
wildcard src/
*
.c
)
OS_SRC
=
$
(
wildcard src/
$(OS)
/
*
.c
)
SRC_C
+=
$(OS_SRC)
...
...
@@ -68,7 +74,7 @@ all:: $(GIT_LIB)
clean
:
rm
-f
$(GIT_LIB)
rm
-f
libgit2.pc
rm
-f
src/
*
.o src/sha1/
*
.o src/unix/
*
.o
rm
-f
src/
*
.o src/sha1/
*
.o src/unix/
*
.o
src/win32/
*
.o
rm
-rf
apidocs
rm
-f
*
~ src/
*
~ src/git/
*
~ src/sha1/
*
~ src/unix/
*
~ src/win32/
*
~
@
$(MAKE)
-C
tests
-s
--no-print-directory
clean
...
...
src/cc-compat.h
View file @
a1c0728d
...
...
@@ -40,10 +40,10 @@
#endif
/* Define the printf format specifer to use for size_t output */
#if !defined(_MSC_VER)
# define PRIuZ "zu"
#else
#if defined(_MSC_VER) || defined(__MINGW32__)
# define PRIuZ "Iu"
#else
# define PRIuZ "zu"
#endif
/* Micosoft Visual C/C++ */
...
...
src/common.h
View file @
a1c0728d
...
...
@@ -4,7 +4,7 @@
/** Force 64 bit off_t size on POSIX. */
#define _FILE_OFFSET_BITS 64
#if defined(_WIN32) && !defined(__CYGWIN__)
&& !defined(__MINGW32__)
#if defined(_WIN32) && !defined(__CYGWIN__)
#define GIT_WIN32 1
#endif
...
...
tests/Makefile
View file @
a1c0728d
...
...
@@ -15,6 +15,13 @@ CRYPTO_LIB = -lcrypto
EXTRA_LIBS
=
# Platform specific tweaks
ifneq
(,$(findstring
MINGW,$(uname_S)))
OS
=
win32
EXTRA_LIBS
+=
-lwsock32
-lpthread
endif
HDRS
=
$
(
wildcard ../src/
*
.h
)
PUBLIC_HEADERS
=
$
(
wildcard ../src/git/
*
.h
)
HDRS
+=
$(PUBLIC_HEADERS)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment