* Re: What's cooking in git.git (Aug 2009, #03; Thu, 20)
From: Mark A Rada @ 2009-08-21 12:40 UTC (permalink / raw)
To: Jakub Narebski; +Cc: git
In-Reply-To: <7veir5naq3.fsf@alter.siamese.dyndns.org>
On 20-Aug-09, at 10:48 PM, Junio C Hamano wrote:
> Should graduate to 'master' soon.
>
> * mr/gitweb-xz (2009-08-06) 3 commits
> (merged to 'next' on 2009-08-14 at b63b8e6)
> + gitweb: add support for XZ compressed snapshots
> + gitweb: update INSTALL regarding specific snapshot settings
> + gitweb: support to globally disable a snapshot format
>
I never submitted any tests for the patch that adds global snapshot
disabling
functionality to gitweb.
Jakub, I changed the gitweb_run routine to capture STDOUT as well, is
that ok?
Unless I missed a case, the tests show that the extra condition check
that was
added in the &git_snapshot routine is never actually executed, because a
disabled snapshot format is not added to @snapshot_fmts, which is
checked
first.
snippet:
5178 } elsif (!grep($_ eq $format, @snapshot_fmts)) {
5179 die_error(403, "Unsupported snapshot format");
5180 } elsif ($known_snapshot_formats{$format}{'disabled'}) {
5181 die_error(403, "Snapshot format not allowed");
5182 }
5183
--
Mark A Rada (ferrous26)
marada@uwaterloo.ca
---
t/t9500-gitweb-standalone-no-errors.sh | 67 +++++++++++++++++++++++
++++++++-
1 files changed, 66 insertions(+), 1 deletions(-)
diff --git a/t/t9500-gitweb-standalone-no-errors.sh b/t/t9500-gitweb-
standalone-no-errors.sh
index 6275181..9ce9667 100755
--- a/t/t9500-gitweb-standalone-no-errors.sh
+++ b/t/t9500-gitweb-standalone-no-errors.sh
@@ -57,10 +57,11 @@ gitweb_run () {
# we are interested only in properly formatted errors/warnings
rm -f gitweb.log &&
perl -- "$SCRIPT_NAME" \
- >/dev/null 2>gitweb.log &&
+ >gitweb.output 2>gitweb.log &&
if grep "^[[]" gitweb.log >/dev/null 2>&1; then false; else true; fi
# gitweb.log is left for debugging
+ # gitweb.output is used to parse output
}
. ./test-lib.sh
@@ -704,4 +705,68 @@ test_expect_success \
gitweb_run "p=.git;a=summary"'
test_debug 'cat gitweb.log'
+
+#
----------------------------------------------------------------------
+# snapshot settings
+
+cat >>gitweb_config.perl <<EOF
+
+\$feature{'snapshot'}{'override'} = 0;
+EOF
+
+test_expect_success \
+ 'snapshots: tgz only default format enabled' \
+ 'gitweb_run "p=.git;a=snapshot;h=HEAD;sf=tgz" &&
+ grep "Status: 200 OK" gitweb.output &&
+ gitweb_run "p=.git;a=snapshot;h=HEAD;sf=tbz2" &&
+ grep "403 - Unsupported snapshot format" gitweb.output &&
+ gitweb_run "p=.git;a=snapshot;h=HEAD;sf=txz" &&
+ grep "403 - Unsupported snapshot format" gitweb.output &&
+ gitweb_run "p=.git;a=snapshot;h=HEAD;sf=zip" &&
+ grep "403 - Unsupported snapshot format" gitweb.output'
+test_debug 'cat gitweb.output'
+
+
+cat >>gitweb_config.perl <<EOF
+
+\$feature{'snapshot'}{'default'} = ['tgz','tbz2','txz','zip'];
+EOF
+
+test_expect_success \
+ 'snapshots: all enabled in default, use default disabled value' \
+ 'gitweb_run "p=.git;a=snapshot;h=HEAD;sf=tgz" &&
+ grep "Status: 200 OK" gitweb.output &&
+ gitweb_run "p=.git;a=snapshot;h=HEAD;sf=tbz2" &&
+ grep "Status: 200 OK" gitweb.output &&
+ gitweb_run "p=.git;a=snapshot;h=HEAD;sf=txz" &&
+ grep "403 - Unsupported snapshot format" gitweb.output &&
+ gitweb_run "p=.git;a=snapshot;h=HEAD;sf=zip" &&
+ grep "Status: 200 OK" gitweb.output'
+test_debug 'cat gitweb.output'
+
+
+cat >>gitweb_config.perl <<EOF
+
+\$known_snapshot_formats{'zip'}{'disabled'} = 1;
+EOF
+
+test_expect_success \
+ 'snapshots: zip explicitly disabled' \
+ 'gitweb_run "p=.git;a=snapshot;h=HEAD;sf=zip" &&
+ grep "403 - Unsupported snapshot format" gitweb.output'
+test_debug 'cat gitweb.output'
+
+
+cat >>gitweb_config.perl <<EOF
+
+\$known_snapshot_formats{'tgz'}{'disabled'} = 0;
+EOF
+
+test_expect_success \
+ 'snapshots: tgz explicitly enabled' \
+ 'gitweb_run "p=.git;a=snapshot;h=HEAD;sf=tgz" &&
+ grep "Status: 200 OK" gitweb.output'
+test_debug 'cat gitweb.output'
+
+
test_done
--
1.6.4
^ permalink raw reply related
* Re: [PATCH] test suite: add a check that all test numbers are unique
From: Jeff King @ 2009-08-21 12:53 UTC (permalink / raw)
To: Johannes Sixt; +Cc: Junio C Hamano, Git Mailing List
In-Reply-To: <4A8E68AF.8040001@viscovery.net>
On Fri, Aug 21, 2009 at 11:28:15AM +0200, Johannes Sixt wrote:
> The test runs only if 'make all' is used. Its purpose is to alert our
> valued integrator if different branches are merged that happen to
> introduce the same test number.
I think this is probably useful. In addition to the t7406 you posted a
patch for, it looks like t4037 has a duplicate in next.
As for the implementation:
> +++ b/t/check_unique_numbers.sh
> @@ -0,0 +1,27 @@
> +#!/bin/sh
> +
> +# checks whether test case numbers are unique;
> +# returns non-zero if any duplicates were found
> +
> +check_numbers () {
> + last= dup=
> + while read name
> + do
> + case $name in
> + t[0-9][0-9][0-9][0-9]-*.sh)
> + number=${name%%-*}
> + if test "$number" = "$last"; then
> + dup="$dup $number"
> + fi
> + last=$number
> + ;;
> + esac
> + done
> + test -z "$dup" || {
> + echo >&2 "error: duplicate test numbers:" $dup
> + return 1
> + }
> +}
> +
> +ls -1 | # no wildcard to avoid overflow of command line
> +check_numbers
Why not the much shorter:
tests() {
ls | sed -n 's/^\(t[0-9][0-9][0-9][0-9]\)-.*\.sh$/\1/p'
}
dups=`tests | uniq -d`
instead of the long shell loop?
-Peff
^ permalink raw reply
* [PATCH v2] test suite: add a check that all test numbers are unique
From: Johannes Sixt @ 2009-08-21 13:13 UTC (permalink / raw)
To: Jeff King; +Cc: Junio C Hamano, Git Mailing List
In-Reply-To: <20090821125324.GA6280@coredump.intra.peff.net>
Jeff King schrieb:
> Why not the much shorter:
>
> tests() {
> ls | sed -n 's/^\(t[0-9][0-9][0-9][0-9]\)-.*\.sh$/\1/p'
> }
> dups=`tests | uniq -d`
>
> instead of the long shell loop?
Because it's faster on Windows ;-) No, seriously, I didn't know about
uniq -d.
Here is a replacement patch.
--- 8< ---
From: Johannes Sixt <j6t@kdbg.org>
Subject: [PATCH] t/Makefile: add a check that all test numbers are unique
The test runs only if 'make all' is used. Its purpose is to alert our
valued integrator if different branches are merged that happen to
introduce the same test number.
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
---
t/Makefile | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/t/Makefile b/t/Makefile
index bd09390..ed8281a 100644
--- a/t/Makefile
+++ b/t/Makefile
@@ -17,6 +17,10 @@ T = $(wildcard t[0-9][0-9][0-9][0-9]-*.sh)
TSVN = $(wildcard t91[0-9][0-9]-*.sh)
all: pre-clean
+ @dups=`ls | sed -n 's/^\(t[0-9][0-9][0-9][0-9]\)-.*\.sh$$/\1/p' | \
+ uniq -d` && \
+ test -z "$$dups" || { \
+ echo "duplicate test numbers:" $$dups; exit 1; }
$(MAKE) aggregate-results-and-cleanup
$(T):
--
1.6.4.204.g6aad7
^ permalink raw reply related
* [PATCH 01/14] Fix non-constant array creation
From: Marius Storm-Olsen @ 2009-08-21 13:30 UTC (permalink / raw)
To: Johannes.Schindelin; +Cc: msysgit, git, lznuaa, Marius Storm-Olsen
In-Reply-To: <cover.1250860247.git.mstormo@gmail.com>
MSVC doesn't munge the non-constant expression, so use xmalloc instead.
Signed-off-by: Marius Storm-Olsen <mstormo@gmail.com>
---
builtin-apply.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/builtin-apply.c b/builtin-apply.c
index ae11b41..0f19965 100644
--- a/builtin-apply.c
+++ b/builtin-apply.c
@@ -1875,7 +1875,7 @@ static int match_fragment(struct image *img,
size_t imgoff = 0;
size_t preoff = 0;
size_t postlen = postimage->len;
- size_t imglen[preimage->nr];
+ size_t *imglen = xmalloc(sizeof(size_t) * preimage->nr);
for (i = 0; i < preimage->nr; i++) {
size_t prelen = preimage->line[i].len;
@@ -1901,6 +1901,7 @@ static int match_fragment(struct image *img,
memcpy(fixed_buf, img->buf + try, imgoff);
for (i = 0; i < preimage->nr; i++)
preimage->line[i].len = imglen[i];
+ free(imglen);
/*
* Update the preimage buffer and the postimage context lines.
--
1.6.3.msysgit.0.18.gef407
^ permalink raw reply related
* [PATCH 04/14] Add define guards to compat/win32.h
From: Marius Storm-Olsen @ 2009-08-21 13:30 UTC (permalink / raw)
To: Johannes.Schindelin; +Cc: msysgit, git, lznuaa, Marius Storm-Olsen
In-Reply-To: <cover.1250860247.git.mstormo@gmail.com>
Signed-off-by: Marius Storm-Olsen <mstormo@gmail.com>
---
compat/win32.h | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/compat/win32.h b/compat/win32.h
index c26384e..e8c178d 100644
--- a/compat/win32.h
+++ b/compat/win32.h
@@ -1,3 +1,6 @@
+#ifndef WIN32_H
+#define WIN32_H
+
/* common Win32 functions for MinGW and Cygwin */
#include <windows.h>
@@ -32,3 +35,5 @@ static inline int get_file_attr(const char *fname, WIN32_FILE_ATTRIBUTE_DATA *fd
return ENOENT;
}
}
+
+#endif
--
1.6.3.msysgit.0.18.gef407
^ permalink raw reply related
* [PATCH 02/14] Avoid declaration after statement
From: Marius Storm-Olsen @ 2009-08-21 13:30 UTC (permalink / raw)
To: Johannes.Schindelin; +Cc: msysgit, git, lznuaa, Marius Storm-Olsen
In-Reply-To: <cover.1250860247.git.mstormo@gmail.com>
From: Frank Li <lznuaa@gmail.com>
Microsoft Visual C++ does not understand this C99 style
Signed-off-by: Frank Li <lznuaa@gmail.com>
Signed-off-by: Marius Storm-Olsen <mstormo@gmail.com>
---
compat/mingw.c | 14 ++++++++++----
help.c | 3 ++-
run-command.c | 2 ++
3 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/compat/mingw.c b/compat/mingw.c
index bed4178..e4e0e60 100644
--- a/compat/mingw.c
+++ b/compat/mingw.c
@@ -123,13 +123,17 @@ int mingw_open (const char *filename, int oflags, ...)
{
va_list args;
unsigned mode;
+ int fd;
+
va_start(args, oflags);
mode = va_arg(args, int);
va_end(args);
if (!strcmp(filename, "/dev/null"))
filename = "nul";
- int fd = open(filename, oflags, mode);
+
+ fd = open(filename, oflags, mode);
+
if (fd < 0 && (oflags & O_CREAT) && errno == EACCES) {
DWORD attrs = GetFileAttributes(filename);
if (attrs != INVALID_FILE_ATTRIBUTES && (attrs & FILE_ATTRIBUTE_DIRECTORY))
@@ -580,10 +584,11 @@ static char **get_path_split(void)
static void free_path_split(char **path)
{
+ char **p = path;
+
if (!path)
return;
- char **p = path;
while (*p)
free(*p++);
free(path);
@@ -1108,9 +1113,9 @@ int sigaction(int sig, struct sigaction *in, struct sigaction *out)
#undef signal
sig_handler_t mingw_signal(int sig, sig_handler_t handler)
{
+ sig_handler_t old = timer_fn;
if (sig != SIGALRM)
return signal(sig, handler);
- sig_handler_t old = timer_fn;
timer_fn = handler;
return old;
}
@@ -1197,8 +1202,9 @@ struct dirent *mingw_readdir(DIR *dir)
if (dir->dd_handle == (long)INVALID_HANDLE_VALUE && dir->dd_stat == 0)
{
+ DWORD lasterr;
handle = FindFirstFileA(dir->dd_name, &buf);
- DWORD lasterr = GetLastError();
+ lasterr = GetLastError();
dir->dd_handle = (long)handle;
if (handle == INVALID_HANDLE_VALUE && (lasterr != ERROR_NO_MORE_FILES)) {
errno = err_win_to_posix(lasterr);
diff --git a/help.c b/help.c
index 294337e..fd51b8e 100644
--- a/help.c
+++ b/help.c
@@ -127,7 +127,7 @@ static int is_executable(const char *name)
return 0;
#ifdef __MINGW32__
- /* cannot trust the executable bit, peek into the file instead */
+{ /* cannot trust the executable bit, peek into the file instead */
char buf[3] = { 0 };
int n;
int fd = open(name, O_RDONLY);
@@ -140,6 +140,7 @@ static int is_executable(const char *name)
st.st_mode |= S_IXUSR;
close(fd);
}
+}
#endif
return st.st_mode & S_IXUSR;
}
diff --git a/run-command.c b/run-command.c
index f3e7abb..efac7ad 100644
--- a/run-command.c
+++ b/run-command.c
@@ -134,6 +134,7 @@ fail_pipe:
error("cannot fork() for %s: %s", cmd->argv[0],
strerror(failed_errno = errno));
#else
+{
int s0 = -1, s1 = -1, s2 = -1; /* backups of stdin, stdout, stderr */
const char **sargv = cmd->argv;
char **env = environ;
@@ -200,6 +201,7 @@ fail_pipe:
dup2(s1, 1), close(s1);
if (s2 >= 0)
dup2(s2, 2), close(s2);
+}
#endif
if (cmd->pid < 0) {
--
1.6.3.msysgit.0.18.gef407
^ permalink raw reply related
* [PATCH 07/14] Fix __stdcall/WINAPI placement and function prototype
From: Marius Storm-Olsen @ 2009-08-21 13:30 UTC (permalink / raw)
To: Johannes.Schindelin; +Cc: msysgit, git, lznuaa, Marius Storm-Olsen
In-Reply-To: <cover.1250860247.git.mstormo@gmail.com>
From: Frank Li <lznuaa@gmail.com>
WINAPI is a macro which translates into the proper calling convention, so
replace __stdcall with that.
MSVC requires WINAPI to be between the functions return value and the
function name, and that the function pointer type is in the form of
return_type (WINAPI *function_name)(arguments...)
Signed-off-by: Frank Li <lznuaa@gmail.com>
Signed-off-by: Marius Storm-Olsen <mstormo@gmail.com>
---
compat/mingw.c | 4 ++--
run-command.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/compat/mingw.c b/compat/mingw.c
index 836426c..9716528 100644
--- a/compat/mingw.c
+++ b/compat/mingw.c
@@ -1017,7 +1017,7 @@ static sig_handler_t timer_fn = SIG_DFL;
* length to call the signal handler.
*/
-static __stdcall unsigned ticktack(void *dummy)
+static unsigned WINAPI ticktack(void *dummy)
{
while (WaitForSingleObject(timer_event, timer_interval) == WAIT_TIMEOUT) {
if (timer_fn == SIG_DFL)
@@ -1144,7 +1144,7 @@ void mingw_open_html(const char *unixpath)
int link(const char *oldpath, const char *newpath)
{
- typedef BOOL WINAPI (*T)(const char*, const char*, LPSECURITY_ATTRIBUTES);
+ typedef BOOL (WINAPI *T)(const char*, const char*, LPSECURITY_ATTRIBUTES);
static T create_hard_link = NULL;
if (!create_hard_link) {
create_hard_link = (T) GetProcAddress(
diff --git a/run-command.c b/run-command.c
index efac7ad..98232e9 100644
--- a/run-command.c
+++ b/run-command.c
@@ -319,7 +319,7 @@ int run_command_v_opt_cd_env(const char **argv, int opt, const char *dir, const
}
#ifdef __MINGW32__
-static __stdcall unsigned run_thread(void *data)
+static unsigned WINAPI run_thread(void *data)
{
struct async *async = data;
return async->proc(async->fd_for_proc, async->data);
--
1.6.3.msysgit.0.18.gef407
^ permalink raw reply related
* [RFC/PATCH 00/14] Build git with MSVC
From: Marius Storm-Olsen @ 2009-08-21 13:30 UTC (permalink / raw)
To: Johannes.Schindelin; +Cc: msysgit, git, lznuaa, Marius Storm-Olsen
So, Frank Li started this series, and I took it upon my self to help
out a bit; cleaning, reorganizing, rebasing the series. Hopefully
we're now a bit closer to including the series into mainline..
Here's a summary of what has happend:
1) This series is rebased ontop of git.git 'next', which needed an
extra patch to avoid a non-constant array creation, which
mscv doesn't like.
2) I've polished (tied to anyways) the commit messages a bit.
3) I've applied much of the feedback provided to the first round of
the patches.
4) I've split, merged and reordered some of the patches, so things
that belong together are in the same commits, and in a order of
'importance'
5) I've removed the
#define func _func
stuff, as it's not needed and Microsoft cannot really kill the
compatibility functions anyways. So, adding the define
_CRT_NONSTDC_NO_DEPRECATE
will kill the warnings seen without the defines above.
6) ..probably much more as well, but I forget..
Note: I did not sign off on the last two commits, which involve the
adding of the vcproj files, since I don't agree on adding them as is.
We need a Makefile way of compiling primarily, and second, a script
to generate the vcproj, as already discussed. But the commits are
included for completeness, at to let others compile and play with it.
I've kept the original author as is, and just signed the patches..
Thanks for watching, now bring on the comments!
Frank Li (11):
Avoid declaration after statement
Define SNPRINTF_SIZE_CORR=1 for Microsoft Visual C++
Change regerror() declaration from K&R style to ANSI C (C89)
mingw.c: Use the O_BINARY flag to open files
Fix __stdcall/WINAPI placement and function prototype
Test for WIN32 instead of __MINGW32_
Avoid including windows.h in winansi.c for MSVC build
Add MinGW header files to build git with MSVC
Add platform files for MSVC porting
Add MSVC project files
Add README and gitignore file for MSVC build
Marius Storm-Olsen (3):
Fix non-constant array creation
Add define guards to compat/win32.h
Add empty header files for MSVC port
builtin-apply.c | 3 +-
compat/mingw.c | 20 +-
compat/msvc.c | 35 +
compat/msvc.h | 102 +++
compat/regex/regex.c | 7 +-
compat/snprintf.c | 2 +-
compat/vcbuild/.gitignore | 3 +
compat/vcbuild/README | 13 +
compat/vcbuild/git/git.vcproj | 197 +++++
compat/vcbuild/include/arpa/inet.h | 1 +
compat/vcbuild/include/dirent.h | 128 ++++
compat/vcbuild/include/grp.h | 1 +
compat/vcbuild/include/inttypes.h | 1 +
compat/vcbuild/include/netdb.h | 1 +
compat/vcbuild/include/netinet/in.h | 1 +
compat/vcbuild/include/netinet/tcp.h | 1 +
compat/vcbuild/include/pwd.h | 1 +
compat/vcbuild/include/sys/ioctl.h | 1 +
compat/vcbuild/include/sys/param.h | 1 +
compat/vcbuild/include/sys/poll.h | 1 +
compat/vcbuild/include/sys/select.h | 1 +
compat/vcbuild/include/sys/socket.h | 1 +
compat/vcbuild/include/sys/time.h | 1 +
compat/vcbuild/include/sys/utime.h | 34 +
compat/vcbuild/include/sys/wait.h | 1 +
compat/vcbuild/include/unistd.h | 92 +++
compat/vcbuild/include/utime.h | 1 +
compat/vcbuild/libgit/libgit.vcproj | 1359 ++++++++++++++++++++++++++++++++++
compat/win32.h | 5 +
compat/winansi.c | 2 +
git-compat-util.h | 3 +
help.c | 5 +-
pager.c | 4 +-
run-command.c | 12 +-
run-command.h | 2 +-
setup.c | 2 +-
36 files changed, 2020 insertions(+), 25 deletions(-)
create mode 100644 compat/msvc.c
create mode 100644 compat/msvc.h
create mode 100644 compat/vcbuild/.gitignore
create mode 100644 compat/vcbuild/README
create mode 100644 compat/vcbuild/git/git.vcproj
create mode 100644 compat/vcbuild/include/arpa/inet.h
create mode 100644 compat/vcbuild/include/dirent.h
create mode 100644 compat/vcbuild/include/grp.h
create mode 100644 compat/vcbuild/include/inttypes.h
create mode 100644 compat/vcbuild/include/netdb.h
create mode 100644 compat/vcbuild/include/netinet/in.h
create mode 100644 compat/vcbuild/include/netinet/tcp.h
create mode 100644 compat/vcbuild/include/pwd.h
create mode 100644 compat/vcbuild/include/sys/ioctl.h
create mode 100644 compat/vcbuild/include/sys/param.h
create mode 100644 compat/vcbuild/include/sys/poll.h
create mode 100644 compat/vcbuild/include/sys/select.h
create mode 100644 compat/vcbuild/include/sys/socket.h
create mode 100644 compat/vcbuild/include/sys/time.h
create mode 100644 compat/vcbuild/include/sys/utime.h
create mode 100644 compat/vcbuild/include/sys/wait.h
create mode 100644 compat/vcbuild/include/unistd.h
create mode 100644 compat/vcbuild/include/utime.h
create mode 100644 compat/vcbuild/libgit/libgit.vcproj
^ permalink raw reply
* [PATCH 09/14] Avoid including windows.h in winansi.c for MSVC build
From: Marius Storm-Olsen @ 2009-08-21 13:30 UTC (permalink / raw)
To: Johannes.Schindelin; +Cc: msysgit, git, lznuaa, Marius Storm-Olsen
In-Reply-To: <cover.1250860247.git.mstormo@gmail.com>
From: Frank Li <lznuaa@gmail.com>
compat/msvc.h includes winsock2.h which conflicts with windows.h.
msvc.h also defines the oldest Windows API version required.
Signed-off-by: Frank Li <lznuaa@gmail.com>
Signed-off-by: Marius Storm-Olsen <mstormo@gmail.com>
---
compat/winansi.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/compat/winansi.c b/compat/winansi.c
index 9217c24..0d79845 100644
--- a/compat/winansi.c
+++ b/compat/winansi.c
@@ -2,7 +2,9 @@
* Copyright 2008 Peter Harris <git@peter.is-a-geek.org>
*/
+#ifndef _MSC_VER
#include <windows.h>
+#endif
#include "../git-compat-util.h"
/*
--
1.6.3.msysgit.0.18.gef407
^ permalink raw reply related
* [PATCH 14/14] Add README and gitignore file for MSVC build
From: Marius Storm-Olsen @ 2009-08-21 13:30 UTC (permalink / raw)
To: Johannes.Schindelin; +Cc: msysgit, git, lznuaa
In-Reply-To: <cover.1250860247.git.mstormo@gmail.com>
From: Frank Li <lznuaa@gmail.com>
Add a README file to tell users how to build git with MSVC.
Also add a gitignore file to make git ignore files generated
by a MSVC build.
Signed-off-by: Frank Li <lznuaa@gmail.com>
---
compat/vcbuild/.gitignore | 3 +++
compat/vcbuild/README | 13 +++++++++++++
2 files changed, 16 insertions(+), 0 deletions(-)
create mode 100644 compat/vcbuild/.gitignore
create mode 100644 compat/vcbuild/README
diff --git a/compat/vcbuild/.gitignore b/compat/vcbuild/.gitignore
new file mode 100644
index 0000000..297ee5b
--- /dev/null
+++ b/compat/vcbuild/.gitignore
@@ -0,0 +1,3 @@
+Debug
+Release
+*.user
diff --git a/compat/vcbuild/README b/compat/vcbuild/README
new file mode 100644
index 0000000..3667ca3
--- /dev/null
+++ b/compat/vcbuild/README
@@ -0,0 +1,13 @@
+The Steps of Build Git with VS2008
+
+1. Create VC Build Environment.
+
+ git clone git://repo.or.cz/gitbuild.git
+
+ gitbuild include VS solution file and library such as zlib.
+
+2. Get Submodule
+
+ git submodule update --init
+
+3. Open gitbuild\gitbuild.sln with VS2008. Then press F7.
--
1.6.3.msysgit.0.18.gef407
^ permalink raw reply related
* [PATCH 10/14] Add empty header files for MSVC port
From: Marius Storm-Olsen @ 2009-08-21 13:30 UTC (permalink / raw)
To: Johannes.Schindelin; +Cc: msysgit, git, lznuaa, Marius Storm-Olsen
In-Reply-To: <cover.1250860247.git.mstormo@gmail.com>
MSVC lacks many of the header files included by git-compat-util.h,
so add blank header files for these instead of going ifdef crazy.
Signed-off-by: Marius Storm-Olsen <mstormo@gmail.com>
---
compat/vcbuild/include/arpa/inet.h | 1 +
compat/vcbuild/include/grp.h | 1 +
compat/vcbuild/include/inttypes.h | 1 +
compat/vcbuild/include/netdb.h | 1 +
compat/vcbuild/include/netinet/in.h | 1 +
compat/vcbuild/include/netinet/tcp.h | 1 +
compat/vcbuild/include/pwd.h | 1 +
compat/vcbuild/include/sys/ioctl.h | 1 +
compat/vcbuild/include/sys/param.h | 1 +
compat/vcbuild/include/sys/poll.h | 1 +
compat/vcbuild/include/sys/select.h | 1 +
compat/vcbuild/include/sys/socket.h | 1 +
compat/vcbuild/include/sys/time.h | 1 +
compat/vcbuild/include/sys/wait.h | 1 +
14 files changed, 14 insertions(+), 0 deletions(-)
create mode 100644 compat/vcbuild/include/arpa/inet.h
create mode 100644 compat/vcbuild/include/grp.h
create mode 100644 compat/vcbuild/include/inttypes.h
create mode 100644 compat/vcbuild/include/netdb.h
create mode 100644 compat/vcbuild/include/netinet/in.h
create mode 100644 compat/vcbuild/include/netinet/tcp.h
create mode 100644 compat/vcbuild/include/pwd.h
create mode 100644 compat/vcbuild/include/sys/ioctl.h
create mode 100644 compat/vcbuild/include/sys/param.h
create mode 100644 compat/vcbuild/include/sys/poll.h
create mode 100644 compat/vcbuild/include/sys/select.h
create mode 100644 compat/vcbuild/include/sys/socket.h
create mode 100644 compat/vcbuild/include/sys/time.h
create mode 100644 compat/vcbuild/include/sys/wait.h
diff --git a/compat/vcbuild/include/arpa/inet.h b/compat/vcbuild/include/arpa/inet.h
new file mode 100644
index 0000000..0d8552a
--- /dev/null
+++ b/compat/vcbuild/include/arpa/inet.h
@@ -0,0 +1 @@
+/* Intentionally empty file to support building git with MSVC */
diff --git a/compat/vcbuild/include/grp.h b/compat/vcbuild/include/grp.h
new file mode 100644
index 0000000..0d8552a
--- /dev/null
+++ b/compat/vcbuild/include/grp.h
@@ -0,0 +1 @@
+/* Intentionally empty file to support building git with MSVC */
diff --git a/compat/vcbuild/include/inttypes.h b/compat/vcbuild/include/inttypes.h
new file mode 100644
index 0000000..0d8552a
--- /dev/null
+++ b/compat/vcbuild/include/inttypes.h
@@ -0,0 +1 @@
+/* Intentionally empty file to support building git with MSVC */
diff --git a/compat/vcbuild/include/netdb.h b/compat/vcbuild/include/netdb.h
new file mode 100644
index 0000000..0d8552a
--- /dev/null
+++ b/compat/vcbuild/include/netdb.h
@@ -0,0 +1 @@
+/* Intentionally empty file to support building git with MSVC */
diff --git a/compat/vcbuild/include/netinet/in.h b/compat/vcbuild/include/netinet/in.h
new file mode 100644
index 0000000..0d8552a
--- /dev/null
+++ b/compat/vcbuild/include/netinet/in.h
@@ -0,0 +1 @@
+/* Intentionally empty file to support building git with MSVC */
diff --git a/compat/vcbuild/include/netinet/tcp.h b/compat/vcbuild/include/netinet/tcp.h
new file mode 100644
index 0000000..0d8552a
--- /dev/null
+++ b/compat/vcbuild/include/netinet/tcp.h
@@ -0,0 +1 @@
+/* Intentionally empty file to support building git with MSVC */
diff --git a/compat/vcbuild/include/pwd.h b/compat/vcbuild/include/pwd.h
new file mode 100644
index 0000000..0d8552a
--- /dev/null
+++ b/compat/vcbuild/include/pwd.h
@@ -0,0 +1 @@
+/* Intentionally empty file to support building git with MSVC */
diff --git a/compat/vcbuild/include/sys/ioctl.h b/compat/vcbuild/include/sys/ioctl.h
new file mode 100644
index 0000000..0d8552a
--- /dev/null
+++ b/compat/vcbuild/include/sys/ioctl.h
@@ -0,0 +1 @@
+/* Intentionally empty file to support building git with MSVC */
diff --git a/compat/vcbuild/include/sys/param.h b/compat/vcbuild/include/sys/param.h
new file mode 100644
index 0000000..0d8552a
--- /dev/null
+++ b/compat/vcbuild/include/sys/param.h
@@ -0,0 +1 @@
+/* Intentionally empty file to support building git with MSVC */
diff --git a/compat/vcbuild/include/sys/poll.h b/compat/vcbuild/include/sys/poll.h
new file mode 100644
index 0000000..0d8552a
--- /dev/null
+++ b/compat/vcbuild/include/sys/poll.h
@@ -0,0 +1 @@
+/* Intentionally empty file to support building git with MSVC */
diff --git a/compat/vcbuild/include/sys/select.h b/compat/vcbuild/include/sys/select.h
new file mode 100644
index 0000000..0d8552a
--- /dev/null
+++ b/compat/vcbuild/include/sys/select.h
@@ -0,0 +1 @@
+/* Intentionally empty file to support building git with MSVC */
diff --git a/compat/vcbuild/include/sys/socket.h b/compat/vcbuild/include/sys/socket.h
new file mode 100644
index 0000000..0d8552a
--- /dev/null
+++ b/compat/vcbuild/include/sys/socket.h
@@ -0,0 +1 @@
+/* Intentionally empty file to support building git with MSVC */
diff --git a/compat/vcbuild/include/sys/time.h b/compat/vcbuild/include/sys/time.h
new file mode 100644
index 0000000..0d8552a
--- /dev/null
+++ b/compat/vcbuild/include/sys/time.h
@@ -0,0 +1 @@
+/* Intentionally empty file to support building git with MSVC */
diff --git a/compat/vcbuild/include/sys/wait.h b/compat/vcbuild/include/sys/wait.h
new file mode 100644
index 0000000..0d8552a
--- /dev/null
+++ b/compat/vcbuild/include/sys/wait.h
@@ -0,0 +1 @@
+/* Intentionally empty file to support building git with MSVC */
--
1.6.3.msysgit.0.18.gef407
^ permalink raw reply related
* [PATCH 13/14] Add MSVC project files
From: Marius Storm-Olsen @ 2009-08-21 13:30 UTC (permalink / raw)
To: Johannes.Schindelin; +Cc: msysgit, git, lznuaa
In-Reply-To: <cover.1250860247.git.mstormo@gmail.com>
From: Frank Li <lznuaa@gmail.com>
Add libgit.vcproj to build common library, and git.vcproj to
build git itself.
Signed-off-by: Frank Li <lznuaa@gmail.com>
---
compat/vcbuild/git/git.vcproj | 197 +++++
compat/vcbuild/libgit/libgit.vcproj | 1359 +++++++++++++++++++++++++++++++++++
2 files changed, 1556 insertions(+), 0 deletions(-)
create mode 100644 compat/vcbuild/git/git.vcproj
create mode 100644 compat/vcbuild/libgit/libgit.vcproj
diff --git a/compat/vcbuild/git/git.vcproj b/compat/vcbuild/git/git.vcproj
new file mode 100644
index 0000000..6f85de3
--- /dev/null
+++ b/compat/vcbuild/git/git.vcproj
@@ -0,0 +1,197 @@
+<?xml version="1.0" encoding="gb2312"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="git"
+ ProjectGUID="{E3E30E51-C5AD-407B-AB43-985E4111474A}"
+ RootNamespace="git"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="196613"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)\bin"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="0"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..;..\..\..\..\zlib;..\..;..\;..\include;..\..\..\compat;..\..\..\compat\fnmatch;..\..\..\compat\regex;.\"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="wininet.lib ws2_32.lib "
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)\bin"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="0"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ EnableIntrinsicFunctions="true"
+ AdditionalIncludeDirectories="..\..\..;..\..\..\..\zlib;..\..;..\;..\include;..\..\..\compat;..\..\..\compat\fnmatch;..\..\..\compat\regex;.\"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="wininet.lib ws2_32.lib "
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\..\git.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/compat/vcbuild/libgit/libgit.vcproj b/compat/vcbuild/libgit/libgit.vcproj
new file mode 100644
index 0000000..e333873
--- /dev/null
+++ b/compat/vcbuild/libgit/libgit.vcproj
@@ -0,0 +1,1359 @@
+<?xml version="1.0" encoding="gb2312"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="libgit"
+ ProjectGUID="{F6DEC8C3-B803-4A86-8848-430F08B499E3}"
+ RootNamespace="libgit"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="196613"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="4"
+ CharacterSet="0"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\include;..\..;..\..\..;..\..\fnmatch;..\..\regex;..\..\..\..\zlib"
+ PreprocessorDefinitions="WIN32;_DEBUG;_LIB;HAVE_STRING_H;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="4"
+ CharacterSet="0"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ EnableIntrinsicFunctions="true"
+ AdditionalIncludeDirectories="..\..\..;..\..\..\..\zlib;..\..;..\;..\include;..\..\..\compat;..\..\..\compat\fnmatch;..\..\..\compat\regex;.\"
+ PreprocessorDefinitions="WIN32;NDEBUG;_LIB;HAVE_STRING_H"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\..\block-sha1\sha1.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\..\..\archive.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\attr.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\blob.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\branch.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\builtin.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\bundle.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\cache-tree.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\cache.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\color.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\commit.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\csum-file.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\decorate.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\delta.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\diff.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\diffcore.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\dir.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\exec_cmd.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\fetch-pack.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\fsck.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\git-compat-util.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\graph.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\grep.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\hash.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\help.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\http.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\levenshtein.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\list-objects.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\ll-merge.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\log-tree.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\mailmap.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\merge-recursive.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\notes.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\object.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\pack-refs.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\pack-revindex.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\pack.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\parse-options.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\patch-ids.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\pkt-line.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\progress.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\quote.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\reachable.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\reflog-walk.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\refs.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\remote.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\rerere.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\revision.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\run-command.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\send-pack.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\sha1-lookup.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\shortlog.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\sideband.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\sigchain.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\strbuf.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\string-list.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\tag.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\tar.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\thread-utils.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\transport.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\tree-walk.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\tree.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\unpack-trees.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\userdiff.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\utf8.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\walker.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\wt-status.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\xdiff-interface.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ <Filter
+ Name="compat"
+ >
+ <File
+ RelativePath="..\..\..\compat\basename.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\compat\cygwin.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\compat\fnmatch\fnmatch.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\compat\fnmatch\fnmatch.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\compat\fopen.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\compat\memmem.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\compat\mingw.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\compat\mkdtemp.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\compat\mkstemps.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\msvc.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\compat\pread.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\compat\qsort.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\regex\regex.c"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions="REGEX_MALLOC"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions="REGEX_MALLOC"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\compat\regex\regex.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\compat\setenv.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\compat\snprintf.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\compat\strcasestr.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\compat\strlcpy.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\compat\strtoumax.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\compat\unsetenv.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\compat\win32.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\compat\win32mmap.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\compat\winansi.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="git"
+ >
+ <File
+ RelativePath="..\..\..\abspath.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\alias.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\alloc.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\archive-tar.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\archive-zip.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\archive.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\attr.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\base85.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\bisect.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\blob.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\branch.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\builtin-add.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\builtin-annotate.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\builtin-apply.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\builtin-archive.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\builtin-bisect--helper.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\builtin-blame.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\builtin-branch.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\builtin-bundle.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\builtin-cat-file.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\builtin-check-attr.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\builtin-check-ref-format.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\builtin-checkout-index.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\builtin-checkout.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\builtin-clean.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\builtin-clone.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\builtin-commit-tree.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\builtin-commit.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\builtin-config.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\builtin-count-objects.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\builtin-describe.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\builtin-diff-files.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\builtin-diff-index.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\builtin-diff-tree.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\builtin-diff.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\builtin-fast-export.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\builtin-fetch--tool.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\builtin-fetch-pack.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\builtin-fetch.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\builtin-fmt-merge-msg.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\builtin-for-each-ref.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\builtin-fsck.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\builtin-gc.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\builtin-grep.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\builtin-help.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\builtin-init-db.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\builtin-log.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\builtin-ls-files.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\builtin-ls-remote.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\builtin-ls-tree.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\builtin-mailinfo.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\builtin-mailsplit.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\builtin-merge-base.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\builtin-merge-file.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\builtin-merge-ours.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\builtin-merge-recursive.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\builtin-merge.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\builtin-mktree.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\builtin-mv.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\builtin-name-rev.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\builtin-pack-objects.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\builtin-pack-refs.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\builtin-prune-packed.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\builtin-prune.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\builtin-push.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\builtin-read-tree.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\builtin-receive-pack.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\builtin-reflog.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\builtin-remote.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\builtin-rerere.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\builtin-reset.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\builtin-rev-list.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\builtin-rev-parse.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\builtin-revert.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\builtin-rm.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\builtin-send-pack.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\builtin-shortlog.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\builtin-show-branch.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\builtin-show-ref.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\builtin-stripspace.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\builtin-symbolic-ref.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\builtin-tag.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\builtin-tar-tree.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\builtin-unpack-objects.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\builtin-update-index.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\builtin-update-ref.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\builtin-upload-archive.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\builtin-verify-pack.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\builtin-verify-tag.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\builtin-write-tree.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\bundle.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\cache-tree.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\color.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\combine-diff.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\commit.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\config.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\connect.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\convert.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\copy.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\csum-file.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\ctype.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\date.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\decorate.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\diff-delta.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\diff-lib.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\diff-no-index.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\diff.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\diffcore-break.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\diffcore-delta.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\diffcore-order.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\diffcore-pickaxe.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\diffcore-rename.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\dir.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\editor.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\entry.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\environment.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\exec_cmd.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\fsck.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\graph.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\grep.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\hash.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\help.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\ident.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\levenshtein.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\list-objects.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\ll-merge.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lockfile.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\log-tree.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\mailmap.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\match-trees.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\merge-file.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\merge-recursive.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\merge-tree.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\name-hash.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\object.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\pack-check.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\pack-refs.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\pack-revindex.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\pack-write.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\pager.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\parse-options.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\patch-delta.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\patch-ids.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\path.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\pkt-line.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\preload-index.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\pretty.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\progress.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\quote.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\reachable.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\read-cache.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\reflog-walk.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\refs.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\remote.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\rerere.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\revision.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\run-command.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\server-info.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\setup.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\sha1-lookup.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\sha1_file.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\sha1_name.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\shallow.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\sideband.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\sigchain.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\strbuf.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\string-list.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\symlinks.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\tag.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\thread-utils.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\trace.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\transport.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\tree-diff.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\tree-walk.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\tree.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\unpack-trees.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\usage.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\userdiff.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\utf8.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\walker.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\wrapper.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\write_or_die.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\ws.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\wt-status.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\xdiff-interface.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="xdiff"
+ >
+ <File
+ RelativePath="..\..\..\xdiff\xdiff.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\xdiff\xdiffi.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\xdiff\xdiffi.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\xdiff\xemit.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\xdiff\xemit.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\xdiff\xinclude.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\xdiff\xmacros.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\xdiff\xmerge.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\xdiff\xpatience.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\xdiff\xprepare.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\xdiff\xprepare.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\xdiff\xtypes.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\xdiff\xutils.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\xdiff\xutils.h"
+ >
+ </File>
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
--
1.6.3.msysgit.0.18.gef407
^ permalink raw reply related
* [PATCH 11/14] Add MinGW header files to build git with MSVC
From: Marius Storm-Olsen @ 2009-08-21 13:30 UTC (permalink / raw)
To: Johannes.Schindelin; +Cc: msysgit, git, lznuaa, Marius Storm-Olsen
In-Reply-To: <cover.1250860247.git.mstormo@gmail.com>
From: Frank Li <lznuaa@gmail.com>
Added the header files dirent.h, unistd.h and utime.h
Signed-off-by: Frank Li <lznuaa@gmail.com>
Signed-off-by: Marius Storm-Olsen <mstormo@gmail.com>
---
compat/vcbuild/include/dirent.h | 128 ++++++++++++++++++++++++++++++++++++
compat/vcbuild/include/sys/utime.h | 34 ++++++++++
compat/vcbuild/include/unistd.h | 92 ++++++++++++++++++++++++++
compat/vcbuild/include/utime.h | 1 +
4 files changed, 255 insertions(+), 0 deletions(-)
create mode 100644 compat/vcbuild/include/dirent.h
create mode 100644 compat/vcbuild/include/sys/utime.h
create mode 100644 compat/vcbuild/include/unistd.h
create mode 100644 compat/vcbuild/include/utime.h
diff --git a/compat/vcbuild/include/dirent.h b/compat/vcbuild/include/dirent.h
new file mode 100644
index 0000000..440618d
--- /dev/null
+++ b/compat/vcbuild/include/dirent.h
@@ -0,0 +1,128 @@
+/*
+ * DIRENT.H (formerly DIRLIB.H)
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is a part of the mingw-runtime package.
+ *
+ * The mingw-runtime package and its code is distributed in the hope that it
+ * will be useful but WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESSED OR
+ * IMPLIED ARE HEREBY DISCLAIMED. This includes but is not limited to
+ * warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * You are free to use this package and its code without limitation.
+ */
+#ifndef _DIRENT_H_
+#define _DIRENT_H_
+#include <io.h>
+
+#define PATH_MAX 512
+
+#define __MINGW_NOTHROW
+
+#ifndef RC_INVOKED
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct dirent
+{
+ long d_ino; /* Always zero. */
+ unsigned short d_reclen; /* Always zero. */
+ unsigned short d_namlen; /* Length of name in d_name. */
+ char d_name[FILENAME_MAX]; /* File name. */
+};
+
+/*
+ * This is an internal data structure. Good programmers will not use it
+ * except as an argument to one of the functions below.
+ * dd_stat field is now int (was short in older versions).
+ */
+typedef struct
+{
+ /* disk transfer area for this dir */
+ struct _finddata_t dd_dta;
+
+ /* dirent struct to return from dir (NOTE: this makes this thread
+ * safe as long as only one thread uses a particular DIR struct at
+ * a time) */
+ struct dirent dd_dir;
+
+ /* _findnext handle */
+ long dd_handle;
+
+ /*
+ * Status of search:
+ * 0 = not started yet (next entry to read is first entry)
+ * -1 = off the end
+ * positive = 0 based index of next entry
+ */
+ int dd_stat;
+
+ /* given path for dir with search pattern (struct is extended) */
+ char dd_name[PATH_MAX+3];
+} DIR;
+
+DIR* __cdecl __MINGW_NOTHROW opendir (const char*);
+struct dirent* __cdecl __MINGW_NOTHROW readdir (DIR*);
+int __cdecl __MINGW_NOTHROW closedir (DIR*);
+void __cdecl __MINGW_NOTHROW rewinddir (DIR*);
+long __cdecl __MINGW_NOTHROW telldir (DIR*);
+void __cdecl __MINGW_NOTHROW seekdir (DIR*, long);
+
+
+/* wide char versions */
+
+struct _wdirent
+{
+ long d_ino; /* Always zero. */
+ unsigned short d_reclen; /* Always zero. */
+ unsigned short d_namlen; /* Length of name in d_name. */
+ wchar_t d_name[FILENAME_MAX]; /* File name. */
+};
+
+/*
+ * This is an internal data structure. Good programmers will not use it
+ * except as an argument to one of the functions below.
+ */
+typedef struct
+{
+ /* disk transfer area for this dir */
+ //struct _wfinddata_t dd_dta;
+
+ /* dirent struct to return from dir (NOTE: this makes this thread
+ * safe as long as only one thread uses a particular DIR struct at
+ * a time) */
+ struct _wdirent dd_dir;
+
+ /* _findnext handle */
+ long dd_handle;
+
+ /*
+ * Status of search:
+ * 0 = not started yet (next entry to read is first entry)
+ * -1 = off the end
+ * positive = 0 based index of next entry
+ */
+ int dd_stat;
+
+ /* given path for dir with search pattern (struct is extended) */
+ wchar_t dd_name[1];
+} _WDIR;
+
+
+
+_WDIR* __cdecl __MINGW_NOTHROW _wopendir (const wchar_t*);
+struct _wdirent* __cdecl __MINGW_NOTHROW _wreaddir (_WDIR*);
+int __cdecl __MINGW_NOTHROW _wclosedir (_WDIR*);
+void __cdecl __MINGW_NOTHROW _wrewinddir (_WDIR*);
+long __cdecl __MINGW_NOTHROW _wtelldir (_WDIR*);
+void __cdecl __MINGW_NOTHROW _wseekdir (_WDIR*, long);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* Not RC_INVOKED */
+
+#endif /* Not _DIRENT_H_ */
diff --git a/compat/vcbuild/include/sys/utime.h b/compat/vcbuild/include/sys/utime.h
new file mode 100644
index 0000000..582589c
--- /dev/null
+++ b/compat/vcbuild/include/sys/utime.h
@@ -0,0 +1,34 @@
+#ifndef _UTIME_H_
+#define _UTIME_H_
+/*
+ * UTIME.H
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is a part of the mingw-runtime package.
+ *
+ * The mingw-runtime package and its code is distributed in the hope that it
+ * will be useful but WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESSED OR
+ * IMPLIED ARE HEREBY DISCLAIMED. This includes but is not limited to
+ * warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * You are free to use this package and its code without limitation.
+ */
+
+/*
+ * Structure used by _utime function.
+ */
+struct _utimbuf
+{
+ time_t actime; /* Access time */
+ time_t modtime; /* Modification time */
+};
+
+#ifndef _NO_OLDNAMES
+/* NOTE: Must be the same as _utimbuf above. */
+struct utimbuf
+{
+ time_t actime;
+ time_t modtime;
+};
+#endif /* Not _NO_OLDNAMES */
+
+#endif
diff --git a/compat/vcbuild/include/unistd.h b/compat/vcbuild/include/unistd.h
new file mode 100644
index 0000000..2a4f276
--- /dev/null
+++ b/compat/vcbuild/include/unistd.h
@@ -0,0 +1,92 @@
+#ifndef _UNISTD_
+#define _UNISTD_
+
+/* Win32 define for porting git*/
+
+#ifndef _MODE_T_
+#define _MODE_T_
+typedef unsigned short _mode_t;
+
+#ifndef _NO_OLDNAMES
+typedef _mode_t mode_t;
+#endif
+#endif /* Not _MODE_T_ */
+
+#ifndef _SSIZE_T_
+#define _SSIZE_T_
+typedef long _ssize_t;
+
+#ifndef _OFF_T_
+#define _OFF_T_
+typedef long _off_t;
+
+#ifndef _NO_OLDNAMES
+typedef _off_t off_t;
+#endif
+#endif /* Not _OFF_T_ */
+
+
+#ifndef _NO_OLDNAMES
+typedef _ssize_t ssize_t;
+#endif
+#endif /* Not _SSIZE_T_ */
+
+typedef signed char int8_t;
+typedef unsigned char uint8_t;
+typedef short int16_t;
+typedef unsigned short uint16_t;
+typedef int int32_t;
+typedef unsigned uint32_t;
+typedef long long int64_t;
+typedef unsigned long long uint64_t;
+
+typedef long long intmax_t;
+typedef unsigned long long uintmax_t;
+
+typedef int64_t off64_t;
+
+#define STDOUT_FILENO 1
+#define STDERR_FILENO 2
+
+/* Some defines for _access nAccessMode (MS doesn't define them, but
+ * it doesn't seem to hurt to add them). */
+#define F_OK 0 /* Check for file existence */
+/* Well maybe it does hurt. On newer versions of MSVCRT, an access mode
+ of 1 causes invalid parameter error. */
+#define X_OK 0 /* MS access() doesn't check for execute permission. */
+#define W_OK 2 /* Check for write permission */
+#define R_OK 4 /* Check for read permission */
+
+#define _S_IFIFO 0x1000 /* FIFO */
+#define _S_IFCHR 0x2000 /* Character */
+#define _S_IFBLK 0x3000 /* Block: Is this ever set under w32? */
+#define _S_IFDIR 0x4000 /* Directory */
+#define _S_IFREG 0x8000 /* Regular */
+
+#define _S_IFMT 0xF000 /* File type mask */
+
+#define _S_IXUSR _S_IEXEC
+#define _S_IWUSR _S_IWRITE
+#define _S_IRUSR _S_IREAD
+#define _S_ISDIR(m) (((m) & _S_IFMT) == _S_IFDIR)
+
+#define S_IFIFO _S_IFIFO
+#define S_IFCHR _S_IFCHR
+#define S_IFBLK _S_IFBLK
+#define S_IFDIR _S_IFDIR
+#define S_IFREG _S_IFREG
+#define S_IFMT _S_IFMT
+#define S_IEXEC _S_IEXEC
+#define S_IWRITE _S_IWRITE
+#define S_IREAD _S_IREAD
+#define S_IRWXU _S_IRWXU
+#define S_IXUSR _S_IXUSR
+#define S_IWUSR _S_IWUSR
+#define S_IRUSR _S_IRUSR
+
+
+#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
+#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
+#define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
+
+#endif
diff --git a/compat/vcbuild/include/utime.h b/compat/vcbuild/include/utime.h
new file mode 100644
index 0000000..8285f38
--- /dev/null
+++ b/compat/vcbuild/include/utime.h
@@ -0,0 +1 @@
+#include <sys/utime.h>
--
1.6.3.msysgit.0.18.gef407
^ permalink raw reply related
* [PATCH 12/14] Add platform files for MSVC porting
From: Marius Storm-Olsen @ 2009-08-21 13:30 UTC (permalink / raw)
To: Johannes.Schindelin; +Cc: msysgit, git, lznuaa, Marius Storm-Olsen
In-Reply-To: <cover.1250860247.git.mstormo@gmail.com>
From: Frank Li <lznuaa@gmail.com>
Add msvc.c and msvc.h to build git under MSVC
Signed-off-by: Frank Li <lznuaa@gmail.com>
Signed-off-by: Marius Storm-Olsen <mstormo@gmail.com>
---
compat/msvc.c | 35 ++++++++++++++++++
compat/msvc.h | 102 +++++++++++++++++++++++++++++++++++++++++++++++++++++
git-compat-util.h | 3 ++
3 files changed, 140 insertions(+), 0 deletions(-)
create mode 100644 compat/msvc.c
create mode 100644 compat/msvc.h
diff --git a/compat/msvc.c b/compat/msvc.c
new file mode 100644
index 0000000..ac04a4c
--- /dev/null
+++ b/compat/msvc.c
@@ -0,0 +1,35 @@
+#include "../git-compat-util.h"
+#include "win32.h"
+#include <conio.h>
+#include "../strbuf.h"
+
+DIR *opendir(const char *name)
+{
+ int len;
+ DIR *p;
+ p = (DIR*)malloc(sizeof(DIR));
+ memset(p, 0, sizeof(DIR));
+ strncpy(p->dd_name, name, PATH_MAX);
+ len = strlen(p->dd_name);
+ p->dd_name[len] = '/';
+ p->dd_name[len+1] = '*';
+
+ if (p == NULL)
+ return NULL;
+
+ p->dd_handle = _findfirst(p->dd_name, &p->dd_dta);
+
+ if (p->dd_handle == -1) {
+ free(p);
+ return NULL;
+ }
+ return p;
+}
+int closedir(DIR *dir)
+{
+ _findclose(dir->dd_handle);
+ free(dir);
+ return 0;
+}
+
+#include "mingw.c"
diff --git a/compat/msvc.h b/compat/msvc.h
new file mode 100644
index 0000000..3e22186
--- /dev/null
+++ b/compat/msvc.h
@@ -0,0 +1,102 @@
+#ifndef __MSVC__HEAD
+#define __MSVC__HEAD
+
+/* Define minimize windows version */
+#define WINVER 0x0500
+#define _WIN32_WINNT 0x0500
+#define _WIN32_WINDOWS 0x0410
+#define _WIN32_IE 0x0700
+#define NTDDI_VERSION NTDDI_WIN2KSP1
+#include <winsock2.h>
+#include <direct.h>
+#include <process.h>
+
+/* Configuration */
+#define NO_PREAD
+#define NO_OPENSSL
+#define NO_LIBGEN_H
+#define NO_SYMLINK_HEAD
+#define NO_IPV6
+#define NO_SETENV
+#define NO_UNSETENV
+#define NO_STRCASESTR
+#define NO_STRLCPY
+#define NO_MEMMEM
+#define NO_C99_FORMAT
+#define NO_STRTOUMAX
+#define NO_MKDTEMP
+#define NO_MKSTEMPS
+#define NO_ST_BLOCKS_IN_STRUCT_STAT
+#define NO_NSEC
+#define NO_REGEX
+#define NO_SYS_SELECT_H
+#define NO_PTHEADS
+#define NO_ICONV
+#define NO_PTHREADS
+#define NO_CURL
+#define NO_STRTOUMAX
+#define NO_STRLCPY
+#define NO_UNSETENV
+#define NO_SETENV
+
+#define USE_WIN32_MMAP
+#define USE_NED_ALLOCATOR
+#define HAVE_STRING_H 1
+#define STDC_HEADERS
+#define SNPRINTF_RETURNS_BOGUS
+#define RUNTIME_PREFIX
+#define REGEX_MALLOC
+
+/* Git runtime infomation */
+#define ETC_GITCONFIG "%HOME%"
+#define SHA1_HEADER "block-sha1\\sha1.h"
+#define GIT_EXEC_PATH "bin"
+#define GIT_VERSION "1.6"
+#define BINDIR "bin"
+#define PREFIX "."
+#define GIT_MAN_PATH "man"
+#define GIT_INFO_PATH "info"
+#define GIT_HTML_PATH "html"
+#define DEFAULT_GIT_TEMPLATE_DIR "templates"
+
+/* porting function */
+#define inline __inline
+#define __inline__ __inline
+#define __attribute__(x)
+#define va_copy(dst, src) ((dst) = (src))
+
+static __inline int strcasecmp (const char *s1, const char *s2)
+{
+ int size1 = strlen(s1);
+ int sisz2 = strlen(s2);
+ return _strnicmp(s1, s2, sisz2 > size1 ? sisz2 : size1);
+}
+
+#undef ERROR
+#undef stat
+#undef _stati64
+#include "compat/mingw.h"
+#undef stat
+#define stat _stati64
+#define _stat64(x,y) mingw_lstat(x,y)
+
+/*
+ Even though _stati64 is normally just defined at _stat64
+ on Windows, we specify it here as a proper struct to avoid
+ compiler warnings about macro redefinition due to magic in
+ mingw.h. Struct taken from ReactOS (GNU GPL license).
+*/
+struct _stati64 {
+ _dev_t st_dev;
+ _ino_t st_ino;
+ unsigned short st_mode;
+ short st_nlink;
+ short st_uid;
+ short st_gid;
+ _dev_t st_rdev;
+ __int64 st_size;
+ time_t st_atime;
+ time_t st_mtime;
+ time_t st_ctime;
+};
+#endif
diff --git a/git-compat-util.h b/git-compat-util.h
index e5e9f39..8ea444f 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -113,6 +113,9 @@
/* pull in Windows compatibility stuff */
#include "compat/mingw.h"
#endif /* __MINGW32__ */
+#ifdef _MSC_VER
+#include "compat/msvc.h"
+#endif
#ifndef NO_LIBGEN_H
#include <libgen.h>
--
1.6.3.msysgit.0.18.gef407
^ permalink raw reply related
* [PATCH 06/14] mingw.c: Use the O_BINARY flag to open files
From: Marius Storm-Olsen @ 2009-08-21 13:30 UTC (permalink / raw)
To: Johannes.Schindelin; +Cc: msysgit, git, lznuaa, Marius Storm-Olsen
In-Reply-To: <cover.1250860247.git.mstormo@gmail.com>
From: Frank Li <lznuaa@gmail.com>
On Windows, binary files must be opened using the O_BINARY flag for
untranslated mode. MinGW does this for us automatically, but Microsoft
Visual C++ does not.
Signed-off-by: Frank Li <lznuaa@gmail.com>
Signed-off-by: Marius Storm-Olsen <mstormo@gmail.com>
---
compat/mingw.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/compat/mingw.c b/compat/mingw.c
index e4e0e60..836426c 100644
--- a/compat/mingw.c
+++ b/compat/mingw.c
@@ -132,7 +132,7 @@ int mingw_open (const char *filename, int oflags, ...)
if (!strcmp(filename, "/dev/null"))
filename = "nul";
- fd = open(filename, oflags, mode);
+ fd = open(filename, oflags | O_BINARY, mode);
if (fd < 0 && (oflags & O_CREAT) && errno == EACCES) {
DWORD attrs = GetFileAttributes(filename);
@@ -278,7 +278,7 @@ int mkstemp(char *template)
char *filename = mktemp(template);
if (filename == NULL)
return -1;
- return open(filename, O_RDWR | O_CREAT, 0600);
+ return open(filename, O_RDWR | O_CREAT | O_BINARY, 0600);
}
int gettimeofday(struct timeval *tv, void *tz)
--
1.6.3.msysgit.0.18.gef407
^ permalink raw reply related
* [PATCH 08/14] Test for WIN32 instead of __MINGW32_
From: Marius Storm-Olsen @ 2009-08-21 13:30 UTC (permalink / raw)
To: Johannes.Schindelin; +Cc: msysgit, git, lznuaa, Marius Storm-Olsen
In-Reply-To: <cover.1250860247.git.mstormo@gmail.com>
From: Frank Li <lznuaa@gmail.com>
The code which is conditional on MinGW32 is actually conditional on Windows.
Use the WIN32 symbol, which is defined by the MINGW32 and MSVC environments,
but not by Cygwin.
Signed-off-by: Frank Li <lznuaa@gmail.com>
Signed-off-by: Marius Storm-Olsen <mstormo@gmail.com>
---
help.c | 2 +-
| 4 ++--
run-command.c | 8 ++++----
run-command.h | 2 +-
setup.c | 2 +-
5 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/help.c b/help.c
index fd51b8e..e8db31f 100644
--- a/help.c
+++ b/help.c
@@ -126,7 +126,7 @@ static int is_executable(const char *name)
!S_ISREG(st.st_mode))
return 0;
-#ifdef __MINGW32__
+#ifdef WIN32
{ /* cannot trust the executable bit, peek into the file instead */
char buf[3] = { 0 };
int n;
--git a/pager.c b/pager.c
index 4921843..37d1948 100644
--- a/pager.c
+++ b/pager.c
@@ -9,7 +9,7 @@
static int spawned_pager;
-#ifndef __MINGW32__
+#ifndef WIN32
static void pager_preexec(void)
{
/*
@@ -70,7 +70,7 @@ void setup_pager(void)
pager_argv[2] = pager;
pager_process.argv = pager_argv;
pager_process.in = -1;
-#ifndef __MINGW32__
+#ifndef WIN32
pager_process.preexec_cb = pager_preexec;
#endif
if (start_command(&pager_process))
diff --git a/run-command.c b/run-command.c
index 98232e9..2c6da42 100644
--- a/run-command.c
+++ b/run-command.c
@@ -75,7 +75,7 @@ fail_pipe:
trace_argv_printf(cmd->argv, "trace: run_command:");
-#ifndef __MINGW32__
+#ifndef WIN32
fflush(NULL);
cmd->pid = fork();
if (!cmd->pid) {
@@ -318,7 +318,7 @@ int run_command_v_opt_cd_env(const char **argv, int opt, const char *dir, const
return run_command(&cmd);
}
-#ifdef __MINGW32__
+#ifdef WIN32
static unsigned WINAPI run_thread(void *data)
{
struct async *async = data;
@@ -334,7 +334,7 @@ int start_async(struct async *async)
return error("cannot create pipe: %s", strerror(errno));
async->out = pipe_out[0];
-#ifndef __MINGW32__
+#ifndef WIN32
/* Flush stdio before fork() to avoid cloning buffers */
fflush(NULL);
@@ -363,7 +363,7 @@ int start_async(struct async *async)
int finish_async(struct async *async)
{
-#ifndef __MINGW32__
+#ifndef WIN32
int ret = wait_or_whine(async->pid, "child process", 0);
#else
DWORD ret = 0;
diff --git a/run-command.h b/run-command.h
index 0c00b25..fb34209 100644
--- a/run-command.h
+++ b/run-command.h
@@ -70,7 +70,7 @@ struct async {
int (*proc)(int fd, void *data);
void *data;
int out; /* caller reads from here and closes it */
-#ifndef __MINGW32__
+#ifndef WIN32
pid_t pid;
#else
HANDLE tid;
diff --git a/setup.c b/setup.c
index e3781b6..029371e 100644
--- a/setup.c
+++ b/setup.c
@@ -41,7 +41,7 @@ const char *prefix_path(const char *prefix, int len, const char *path)
const char *prefix_filename(const char *pfx, int pfx_len, const char *arg)
{
static char path[PATH_MAX];
-#ifndef __MINGW32__
+#ifndef WIN32
if (!pfx || !*pfx || is_absolute_path(arg))
return arg;
memcpy(path, pfx, pfx_len);
--
1.6.3.msysgit.0.18.gef407
^ permalink raw reply related
* [PATCH 03/14] Define SNPRINTF_SIZE_CORR=1 for Microsoft Visual C++
From: Marius Storm-Olsen @ 2009-08-21 13:30 UTC (permalink / raw)
To: Johannes.Schindelin; +Cc: msysgit, git, lznuaa, Marius Storm-Olsen
In-Reply-To: <cover.1250860247.git.mstormo@gmail.com>
From: Frank Li <lznuaa@gmail.com>
The Microsoft C runtime's vsnprintf function does not add NUL at
the end of the buffer.
Signed-off-by: Frank Li <lznuaa@gmail.com>
Signed-off-by: Marius Storm-Olsen <mstormo@gmail.com>
---
compat/snprintf.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/compat/snprintf.c b/compat/snprintf.c
index 6c0fb05..37b1edf 100644
--- a/compat/snprintf.c
+++ b/compat/snprintf.c
@@ -6,7 +6,7 @@
* number of characters to write without the trailing NUL.
*/
#ifndef SNPRINTF_SIZE_CORR
-#if defined(__MINGW32__) && defined(__GNUC__) && __GNUC__ < 4
+#if (defined(__MINGW32__) && defined(__GNUC__) && __GNUC__ < 4) || defined(_MSC_VER)
#define SNPRINTF_SIZE_CORR 1
#else
#define SNPRINTF_SIZE_CORR 0
--
1.6.3.msysgit.0.18.gef407
^ permalink raw reply related
* [PATCH 05/14] Change regerror() declaration from K&R style to ANSI C (C89)
From: Marius Storm-Olsen @ 2009-08-21 13:30 UTC (permalink / raw)
To: Johannes.Schindelin; +Cc: msysgit, git, lznuaa, Marius Storm-Olsen
In-Reply-To: <cover.1250860247.git.mstormo@gmail.com>
From: Frank Li <lznuaa@gmail.com>
The MSVC compiler doesn't like K&R style.
Signed-off-by: Frank Li <lznuaa@gmail.com>
Signed-off-by: Marius Storm-Olsen <mstormo@gmail.com>
---
compat/regex/regex.c | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/compat/regex/regex.c b/compat/regex/regex.c
index 5ea0075..67d5c37 100644
--- a/compat/regex/regex.c
+++ b/compat/regex/regex.c
@@ -4852,11 +4852,8 @@ regexec (preg, string, nmatch, pmatch, eflags)
from either regcomp or regexec. We don't use PREG here. */
size_t
-regerror (errcode, preg, errbuf, errbuf_size)
- int errcode;
- const regex_t *preg;
- char *errbuf;
- size_t errbuf_size;
+regerror(int errcode, const regex_t *preg,
+ char *errbuf, size_t errbuf_size)
{
const char *msg;
size_t msg_size;
--
1.6.3.msysgit.0.18.gef407
^ permalink raw reply related
* Re: [PATCH 01/14] Fix non-constant array creation
From: Erik Faye-Lund @ 2009-08-21 13:41 UTC (permalink / raw)
To: Marius Storm-Olsen; +Cc: Johannes.Schindelin, msysgit, git, lznuaa
In-Reply-To: <6283b3e1775f43c6fc07e5047f9c99acdc27bc8f.1250860247.git.mstormo@gmail.com>
On Fri, Aug 21, 2009 at 3:30 PM, Marius Storm-Olsen<mstormo@gmail.com> wrote:
> @@ -1875,7 +1875,7 @@ static int match_fragment(struct image *img,
> size_t imgoff = 0;
> size_t preoff = 0;
> size_t postlen = postimage->len;
> - size_t imglen[preimage->nr];
> + size_t *imglen = xmalloc(sizeof(size_t) * preimage->nr);
How about using alloca instead? It allocates from the stack (just like
the C99-style variable-length array you're replacing), and you don't
need to free the memory afterwards.
... or is alloca frowned upon? I see it's already used both in
compat/regex/regex.c and in compat/nedmalloc/malloc.c, but not
apparently not in the git core.
--
Erik "kusma" Faye-Lund
kusmabite@gmail.com
(+47) 986 59 656
^ permalink raw reply
* Re: [PATCH 01/14] Fix non-constant array creation
From: Marius Storm-Olsen @ 2009-08-21 13:46 UTC (permalink / raw)
To: Erik Faye-Lund; +Cc: Johannes.Schindelin, msysgit, git, lznuaa
In-Reply-To: <40aa078e0908210641m660b003do6f637535293672ae@mail.gmail.com>
Erik Faye-Lund said the following on 21.08.2009 15:41:
> On Fri, Aug 21, 2009 at 3:30 PM, Marius Storm-Olsen<mstormo@gmail.com> wrote:
>> @@ -1875,7 +1875,7 @@ static int match_fragment(struct image *img,
>> size_t imgoff = 0;
>> size_t preoff = 0;
>> size_t postlen = postimage->len;
>> - size_t imglen[preimage->nr];
>> + size_t *imglen = xmalloc(sizeof(size_t) * preimage->nr);
>
> How about using alloca instead? It allocates from the stack (just like
> the C99-style variable-length array you're replacing), and you don't
> need to free the memory afterwards.
>
> ... or is alloca frowned upon? I see it's already used both in
> compat/regex/regex.c and in compat/nedmalloc/malloc.c, but not
> apparently not in the git core.
MSVC compiles regex.c, so it must handle it. I'm fine with that.
--
.marius
^ permalink raw reply
* Re: [PATCH] Add support for the Mongoose web server.
From: Wilhansen Li @ 2009-08-21 14:24 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
In-Reply-To: <7vvdkhip3a.fsf@alter.siamese.dyndns.org>
I hope I did this right (the word wraps). I took the liberty to sort
the server list.
---
Mongoose (http://code.google.com/p/mongoose/) is a lightweight web
server. It's just a single binary so it's a lot simpler to configure and
install.
Signed-off-by: Wilhansen Li <wil@nohakostudios.net>
---
Documentation/git-instaweb.txt | 2 +-
git-instaweb.sh | 57 ++++++++++++++++++++++++++++++++++++---
2 files changed, 53 insertions(+), 6 deletions(-)
diff --git a/Documentation/git-instaweb.txt b/Documentation/git-instaweb.txt
index 22da21a..0771f25 100644
--- a/Documentation/git-instaweb.txt
+++ b/Documentation/git-instaweb.txt
@@ -29,7 +29,7 @@ OPTIONS
The HTTP daemon command-line that will be executed.
Command-line options may be specified here, and the
configuration file will be added at the end of the command-line.
- Currently lighttpd, apache2 and webrick are supported.
+ Currently apache2, lighttpd, mongoose and webrick are supported.
(Default: lighttpd)
-m::
diff --git a/git-instaweb.sh b/git-instaweb.sh
index 5f5cac7..d96eddb 100755
--- a/git-instaweb.sh
+++ b/git-instaweb.sh
@@ -77,11 +77,30 @@ start_httpd () {
resolve_full_httpd
# don't quote $full_httpd, there can be arguments to it (-f)
- $full_httpd "$fqgitdir/gitweb/httpd.conf"
- if test $? != 0; then
- echo "Could not execute http daemon $httpd."
- exit 1
- fi
+ case "$httpd" in
+ *mongoose*)
+ #The mongoose server doesn't have a daemon mode so we'll have to fork it
+ $full_httpd "$fqgitdir/gitweb/httpd.conf" &
+ #Save the pid before doing anything else (we'll print it later)
+ pid=$!
+
+ if test $? != 0; then
+ echo "Could not execute http daemon $httpd."
+ exit 1
+ fi
+
+ cat > "$fqgitdir/pid" <<EOF
+$pid
+EOF
+ ;;
+ *)
+ $full_httpd "$fqgitdir/gitweb/httpd.conf"
+ if test $? != 0; then
+ echo "Could not execute http daemon $httpd."
+ exit 1
+ fi
+ ;;
+ esac
}
stop_httpd () {
@@ -308,6 +327,31 @@ EOF
fi
}
+mongoose_conf() {
+ cat > "$conf" <<EOF
+# Mongoose web server configuration file.
+# Lines starting with '#' and empty lines are ignored.
+# For detailed description of every option, visit
+# http://code.google.com/p/mongoose/wiki/MongooseManual
+
+root $fqgitdir/gitweb
+ports $port
+index_files gitweb.cgi
+#ssl_cert $fqgitdir/gitweb/ssl_cert.pem
+error_log $fqgitdir/gitweb/error.log
+access_log $fqgitdir/gitweb/access.log
+
+#cgi setup
+cgi_env PATH=/usr/local/bin:/usr/bin:/bin,GIT_DIR=$GIT_DIR,GIT_EXEC_PATH=$GIT_EXEC_PATH
+cgi_interp $PERL
+cgi_ext cgi,pl
+
+# mimetype mapping
+mime_types .gz=application/x-gzip,.tar.gz=application/x-tgz,.tgz=application/x-tgz,.tar=application/x-tar,.zip=application/zip,.gif=image/gif,.jpg=image/jpeg,.jpeg=image/jpeg,.png=image/png,.css=text/css,.html=text/html,.htm=text/html,.js=text/javascript,.c=text/plain,.cpp=text/plain,.log=text/plain,.conf=text/plain,.text=text/plain,.txt=text/plain,.dtd=text/xml,.bz2=application/x-bzip,.tbz=application/x-bzip-compressed-tar,.tar.bz2=application/x-bzip-compressed-tar
+EOF
+}
+
+
script='
s#^(my|our) \$projectroot =.*#$1 \$projectroot = "'$(dirname "$fqgitdir")'";#;
s#(my|our) \$gitbin =.*#$1 \$gitbin = "'$GIT_EXEC_PATH'";#;
@@ -344,6 +388,9 @@ case "$httpd" in
webrick)
webrick_conf
;;
+*mongoose*)
+ mongoose_conf
+ ;;
*)
echo "Unknown httpd specified: $httpd"
exit 1
--
1.6.4
^ permalink raw reply related
* Re: [PATCH v2] test suite: add a check that all test numbers are unique
From: Jeff King @ 2009-08-21 14:37 UTC (permalink / raw)
To: Johannes Sixt; +Cc: Junio C Hamano, Git Mailing List
In-Reply-To: <4A8E9D73.1090604@viscovery.net>
On Fri, Aug 21, 2009 at 03:13:23PM +0200, Johannes Sixt wrote:
> Because it's faster on Windows ;-) No, seriously, I didn't know about
> uniq -d.
:)
> Here is a replacement patch.
Looks good to me. Thanks.
-Peff
^ permalink raw reply
* Re: [PATCH 05/14] Change regerror() declaration from K&R style to ANSI C (C89)
From: Frank Li @ 2009-08-21 14:37 UTC (permalink / raw)
To: Marius Storm-Olsen; +Cc: Johannes.Schindelin, msysgit, git
In-Reply-To: <07846e22f50dfd5e1b483a02cf550e5373125f1d.1250860247.git.mstormo@gmail.com>
>
> size_t
> -regerror (errcode, preg, errbuf, errbuf_size)
> - int errcode;
> - const regex_t *preg;
> - char *errbuf;
> - size_t errbuf_size;
> +regerror(int errcode, const regex_t *preg,
> + char *errbuf, size_t errbuf_size)
> {
The true reason is MSVC type define errcode as int.
Frank Li
^ permalink raw reply
* how to do "git merge --abort"
From: bill lam @ 2009-08-21 14:51 UTC (permalink / raw)
To: git
How to abort a merge if it said there are conflicts but I do not want
to (or can not) resolve it for the moment. I can not find the --abort
option as that for git-rebase.
--
regards,
====================================================
GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
^ permalink raw reply
* Re: [PATCH 05/14] Change regerror() declaration from K&R style to ANSI C (C89)
From: Marius Storm-Olsen @ 2009-08-21 14:54 UTC (permalink / raw)
To: Frank Li; +Cc: Johannes.Schindelin, msysgit, git
From: Frank Li <lznuaa@gmail.com>
> size_t
> -regerror (errcode, preg, errbuf, errbuf_size)
> - int errcode;
> - const regex_t *preg;
> - char *errbuf;
> - size_t errbuf_size;
> +regerror(int errcode, const regex_t *preg,
> + char *errbuf, size_t errbuf_size)
> {
>
> The true reason is MSVC type define errcode as int.
Ok, will reword it.. Thanks.
--
.marius @ phone
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox