summaryrefslogtreecommitdiff
path: root/compat
diff options
context:
space:
mode:
Diffstat (limited to 'compat')
-rw-r--r--compat/mingw.c7
-rw-r--r--compat/terminal.c18
-rw-r--r--compat/vcbuild/README4
-rwxr-xr-xcompat/vcbuild/scripts/clink.pl2
4 files changed, 17 insertions, 14 deletions
diff --git a/compat/mingw.c b/compat/mingw.c
index 8ee0b6408e..a00f331230 100644
--- a/compat/mingw.c
+++ b/compat/mingw.c
@@ -18,8 +18,8 @@ void open_in_gdb(void)
static struct child_process cp = CHILD_PROCESS_INIT;
extern char *_pgmptr;
- argv_array_pushl(&cp.args, "mintty", "gdb", NULL);
- argv_array_pushf(&cp.args, "--pid=%d", getpid());
+ strvec_pushl(&cp.args, "mintty", "gdb", NULL);
+ strvec_pushf(&cp.args, "--pid=%d", getpid());
cp.clean_on_exit = 1;
if (start_command(&cp) < 0)
die_errno("Could not start gdb");
@@ -290,6 +290,9 @@ int mingw_unlink(const char *pathname)
if (xutftowcs_path(wpathname, pathname) < 0)
return -1;
+ if (DeleteFileW(wpathname))
+ return 0;
+
/* read-only files cannot be removed */
_wchmod(wpathname, 0666);
while ((ret = _wunlink(wpathname)) == -1 && tries < ARRAY_SIZE(delay)) {
diff --git a/compat/terminal.c b/compat/terminal.c
index 35bca03d14..43b73ddc75 100644
--- a/compat/terminal.c
+++ b/compat/terminal.c
@@ -86,9 +86,9 @@ static void restore_term(void)
if (stty_restore.nr == 0)
return;
- argv_array_push(&cp.args, "stty");
+ strvec_push(&cp.args, "stty");
for (i = 0; i < stty_restore.nr; i++)
- argv_array_push(&cp.args, stty_restore.items[i].string);
+ strvec_push(&cp.args, stty_restore.items[i].string);
run_command(&cp);
string_list_clear(&stty_restore, 0);
return;
@@ -107,25 +107,25 @@ static int disable_bits(DWORD bits)
if (use_stty) {
struct child_process cp = CHILD_PROCESS_INIT;
- argv_array_push(&cp.args, "stty");
+ strvec_push(&cp.args, "stty");
if (bits & ENABLE_LINE_INPUT) {
string_list_append(&stty_restore, "icanon");
- argv_array_push(&cp.args, "-icanon");
+ strvec_push(&cp.args, "-icanon");
}
if (bits & ENABLE_ECHO_INPUT) {
string_list_append(&stty_restore, "echo");
- argv_array_push(&cp.args, "-echo");
+ strvec_push(&cp.args, "-echo");
}
if (bits & ENABLE_PROCESSED_INPUT) {
string_list_append(&stty_restore, "-ignbrk");
string_list_append(&stty_restore, "intr");
string_list_append(&stty_restore, "^c");
- argv_array_push(&cp.args, "ignbrk");
- argv_array_push(&cp.args, "intr");
- argv_array_push(&cp.args, "");
+ strvec_push(&cp.args, "ignbrk");
+ strvec_push(&cp.args, "intr");
+ strvec_push(&cp.args, "");
}
if (run_command(&cp) == 0)
@@ -273,7 +273,7 @@ static int is_known_escape_sequence(const char *sequence)
hashmap_init(&sequences, (hashmap_cmp_fn)sequence_entry_cmp,
NULL, 0);
- argv_array_pushl(&cp.args, "infocmp", "-L", "-1", NULL);
+ strvec_pushl(&cp.args, "infocmp", "-L", "-1", NULL);
if (pipe_command(&cp, NULL, 0, &buf, 0, NULL, 0))
strbuf_setlen(&buf, 0);
diff --git a/compat/vcbuild/README b/compat/vcbuild/README
index 42292e7c09..51fb083dbb 100644
--- a/compat/vcbuild/README
+++ b/compat/vcbuild/README
@@ -26,8 +26,8 @@ The Steps to Build Git with VS2015 or VS2017 from the command line.
Use ONE of the following forms which should match how you want to
compile git.exe.
- $ ./compat/vcbuild/vcpkg_copy_packages.bat debug
- $ ./compat/vcbuild/vcpkg_copy_packages.bat release
+ $ ./compat/vcbuild/vcpkg_copy_dlls.bat debug
+ $ ./compat/vcbuild/vcpkg_copy_dlls.bat release
3. Build git using MSVC from an SDK bash window using one of the
following commands:
diff --git a/compat/vcbuild/scripts/clink.pl b/compat/vcbuild/scripts/clink.pl
index 61ad084a7b..df167d1e1a 100755
--- a/compat/vcbuild/scripts/clink.pl
+++ b/compat/vcbuild/scripts/clink.pl
@@ -66,7 +66,7 @@ while (@ARGV) {
}
push(@args, $lib);
} elsif ("$arg" eq "-lexpat") {
- push(@args, "expat.lib");
+ push(@args, "libexpat.lib");
} elsif ("$arg" =~ /^-L/ && "$arg" ne "-LTCG") {
$arg =~ s/^-L/-LIBPATH:/;
push(@lflags, $arg);