Skip to content

Commit

Permalink
Merge branch 'j6t/mingw'
Browse files Browse the repository at this point in the history
* j6t/mingw: (38 commits)
  compat/pread.c: Add a forward declaration to fix a warning
  Windows: Fix ntohl() related warnings about printf formatting
  Windows: TMP and TEMP environment variables specify a temporary directory.
  Windows: Make 'git help -a' work.
  Windows: Work around an oddity when a pipe with no reader is written to.
  Windows: Make the pager work.
  When installing, be prepared that template_dir may be relative.
  Windows: Use a relative default template_dir and ETC_GITCONFIG
  Windows: Compute the fallback for exec_path from the program invocation.
  Turn builtin_exec_path into a function.
  Windows: Use a customized struct stat that also has the st_blocks member.
  Windows: Add a custom implementation for utime().
  Windows: Add a new lstat and fstat implementation based on Win32 API.
  Windows: Implement a custom spawnve().
  Windows: Implement wrappers for gethostbyname(), socket(), and connect().
  Windows: Work around incompatible sort and find.
  Windows: Implement asynchronous functions as threads.
  Windows: Disambiguate DOS style paths from SSH URLs.
  Windows: A rudimentary poll() emulation.
  Windows: Implement start_command().
  ...
  • Loading branch information
gitster committed Jul 3, 2008
2 parents 7d3580d + 14086b0 commit bb1ab2d
Show file tree
Hide file tree
Showing 26 changed files with 7,633 additions and 80 deletions.
6 changes: 3 additions & 3 deletions Documentation/git.txt
Expand Up @@ -410,9 +410,9 @@ git so take care if using Cogito etc.
'GIT_ALTERNATE_OBJECT_DIRECTORIES':: 'GIT_ALTERNATE_OBJECT_DIRECTORIES'::
Due to the immutable nature of git objects, old objects can be Due to the immutable nature of git objects, old objects can be
archived into shared, read-only directories. This variable archived into shared, read-only directories. This variable
specifies a ":" separated list of git object directories which specifies a ":" separated (on Windows ";" separated) list
can be used to search for git objects. New objects will not be of git object directories which can be used to search for git
written to these directories. objects. New objects will not be written to these directories.


'GIT_DIR':: 'GIT_DIR'::
If the 'GIT_DIR' environment variable is set then it If the 'GIT_DIR' environment variable is set then it
Expand Down
46 changes: 43 additions & 3 deletions Makefile
Expand Up @@ -205,7 +205,7 @@ GITWEB_FAVICON = git-favicon.png
GITWEB_SITE_HEADER = GITWEB_SITE_HEADER =
GITWEB_SITE_FOOTER = GITWEB_SITE_FOOTER =


export prefix bindir gitexecdir sharedir template_dir htmldir sysconfdir export prefix bindir gitexecdir sharedir htmldir sysconfdir


CC = gcc CC = gcc
AR = ar AR = ar
Expand Down Expand Up @@ -273,11 +273,9 @@ EXTRA_PROGRAMS =


# ... and all the rest that could be moved out of bindir to gitexecdir # ... and all the rest that could be moved out of bindir to gitexecdir
PROGRAMS += $(EXTRA_PROGRAMS) PROGRAMS += $(EXTRA_PROGRAMS)
PROGRAMS += git-daemon$X
PROGRAMS += git-fast-import$X PROGRAMS += git-fast-import$X
PROGRAMS += git-fetch-pack$X PROGRAMS += git-fetch-pack$X
PROGRAMS += git-hash-object$X PROGRAMS += git-hash-object$X
PROGRAMS += git-imap-send$X
PROGRAMS += git-index-pack$X PROGRAMS += git-index-pack$X
PROGRAMS += git-merge-index$X PROGRAMS += git-merge-index$X
PROGRAMS += git-merge-tree$X PROGRAMS += git-merge-tree$X
Expand Down Expand Up @@ -337,6 +335,7 @@ LIB_H += builtin.h
LIB_H += cache.h LIB_H += cache.h
LIB_H += cache-tree.h LIB_H += cache-tree.h
LIB_H += commit.h LIB_H += commit.h
LIB_H += compat/mingw.h
LIB_H += csum-file.h LIB_H += csum-file.h
LIB_H += decorate.h LIB_H += decorate.h
LIB_H += delta.h LIB_H += delta.h
Expand Down Expand Up @@ -717,6 +716,36 @@ ifeq ($(uname_S),HP-UX)
NO_HSTRERROR = YesPlease NO_HSTRERROR = YesPlease
NO_SYS_SELECT_H = YesPlease NO_SYS_SELECT_H = YesPlease
endif endif
ifneq (,$(findstring MINGW,$(uname_S)))
NO_MMAP = YesPlease
NO_PREAD = YesPlease
NO_OPENSSL = YesPlease
NO_CURL = YesPlease
NO_SYMLINK_HEAD = YesPlease
NO_IPV6 = YesPlease
NO_SETENV = YesPlease
NO_UNSETENV = YesPlease
NO_STRCASESTR = YesPlease
NO_STRLCPY = YesPlease
NO_MEMMEM = YesPlease
NEEDS_LIBICONV = YesPlease
OLD_ICONV = YesPlease
NO_C99_FORMAT = YesPlease
NO_STRTOUMAX = YesPlease
NO_MKDTEMP = YesPlease
SNPRINTF_RETURNS_BOGUS = YesPlease
NO_SVN_TESTS = YesPlease
NO_PERL_MAKEMAKER = YesPlease
NO_POSIX_ONLY_PROGRAMS = YesPlease
COMPAT_CFLAGS += -D__USE_MINGW_ACCESS -DNOGDI -Icompat
COMPAT_CFLAGS += -DSNPRINTF_SIZE_CORR=1
COMPAT_CFLAGS += -DSTRIP_EXTENSION=\".exe\"
COMPAT_OBJS += compat/mingw.o compat/fnmatch.o compat/regex.o
EXTLIBS += -lws2_32
X = .exe
template_dir = ../share/git-core/templates/
ETC_GITCONFIG = ../etc/gitconfig
endif
ifneq (,$(findstring arm,$(uname_M))) ifneq (,$(findstring arm,$(uname_M)))
ARM_SHA1 = YesPlease ARM_SHA1 = YesPlease
endif endif
Expand Down Expand Up @@ -777,6 +806,10 @@ ifdef ZLIB_PATH
endif endif
EXTLIBS += -lz EXTLIBS += -lz


ifndef NO_POSIX_ONLY_PROGRAMS
PROGRAMS += git-daemon$X
PROGRAMS += git-imap-send$X
endif
ifndef NO_OPENSSL ifndef NO_OPENSSL
OPENSSL_LIBSSL = -lssl OPENSSL_LIBSSL = -lssl
ifdef OPENSSLDIR ifdef OPENSSLDIR
Expand Down Expand Up @@ -1268,6 +1301,13 @@ remove-dashes:


### Installation rules ### Installation rules


ifeq ($(firstword $(subst /, ,$(template_dir))),..)
template_instdir = $(gitexecdir)/$(template_dir)
else
template_instdir = $(template_dir)
endif
export template_instdir

install: all install: all
$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(bindir_SQ)' $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(bindir_SQ)'
$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(gitexecdir_SQ)' $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(gitexecdir_SQ)'
Expand Down
2 changes: 1 addition & 1 deletion cache.h
Expand Up @@ -522,7 +522,7 @@ int safe_create_leading_directories_const(const char *path);
char *enter_repo(char *path, int strict); char *enter_repo(char *path, int strict);
static inline int is_absolute_path(const char *path) static inline int is_absolute_path(const char *path)
{ {
return path[0] == '/'; return path[0] == '/' || has_dos_drive_prefix(path);
} }
const char *make_absolute_path(const char *path); const char *make_absolute_path(const char *path);
const char *make_nonrelative_path(const char *path); const char *make_nonrelative_path(const char *path);
Expand Down

0 comments on commit bb1ab2d

Please sign in to comment.