mirror of
https://github.com/git/git.git
synced 2026-02-07 08:15:23 +00:00
Merge 'non-win-fixes' into HEAD
This commit is contained in:
7
Makefile
7
Makefile
@@ -1054,14 +1054,11 @@ else
|
||||
REMOTE_CURL_NAMES = $(REMOTE_CURL_PRIMARY) $(REMOTE_CURL_ALIASES)
|
||||
PROGRAM_OBJS += http-fetch.o
|
||||
PROGRAMS += $(REMOTE_CURL_NAMES)
|
||||
curl_check := $(shell (echo 070908; curl-config --vernum | sed -e '/^70[BC]/s/^/0/') 2>/dev/null | sort -r | sed -ne 2p)
|
||||
ifeq "$(curl_check)" "070908"
|
||||
ifndef NO_CURL_MULTI
|
||||
ifndef NO_EXPAT
|
||||
PROGRAM_OBJS += http-push.o
|
||||
endif
|
||||
endif
|
||||
curl_check := $(shell (echo 072200; curl-config --vernum | sed -e '/^70[BC]/s/^/0/') 2>/dev/null | sort -r | sed -ne 2p)
|
||||
ifeq "$(curl_check)" "072200"
|
||||
# Assume that cURL is new enough
|
||||
USE_CURL_FOR_IMAP_SEND = YesPlease
|
||||
endif
|
||||
ifdef USE_CURL_FOR_IMAP_SEND
|
||||
|
||||
@@ -222,7 +222,7 @@ static const char *lock_repo_for_gc(int force, pid_t* ret_pid)
|
||||
* running.
|
||||
*/
|
||||
time(NULL) - st.st_mtime <= 12 * 3600 &&
|
||||
fscanf(fp, "%"PRIuMAX" %127c", &pid, locking_host) == 2 &&
|
||||
fscanf(fp, "%"SCNuMAX" %127c", &pid, locking_host) == 2 &&
|
||||
/* be gentle to concurrent "gc" on remote hosts */
|
||||
(strcmp(locking_host, my_host) || !kill(pid, 0) || errno == EPERM);
|
||||
if (fp != NULL)
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
02110-1301 USA. */
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
static reg_errcode_t re_compile_internal (regex_t *preg, const char * pattern,
|
||||
size_t length, reg_syntax_t syntax);
|
||||
static void re_compile_fastmap_iter (regex_t *bufp,
|
||||
@@ -2577,7 +2579,7 @@ parse_dup_op (bin_tree_t *elem, re_string_t *regexp, re_dfa_t *dfa,
|
||||
old_tree = NULL;
|
||||
|
||||
if (elem->token.type == SUBEXP)
|
||||
postorder (elem, mark_opt_subexp, (void *) (long) elem->token.opr.idx);
|
||||
postorder (elem, mark_opt_subexp, (void *) (intptr_t) elem->token.opr.idx);
|
||||
|
||||
tree = create_tree (dfa, elem, NULL, (end == -1 ? OP_DUP_ASTERISK : OP_ALT));
|
||||
if (BE (tree == NULL, 0))
|
||||
@@ -3806,7 +3808,7 @@ create_token_tree (re_dfa_t *dfa, bin_tree_t *left, bin_tree_t *right,
|
||||
static reg_errcode_t
|
||||
mark_opt_subexp (void *extra, bin_tree_t *node)
|
||||
{
|
||||
int idx = (int) (long) extra;
|
||||
int idx = (int) (intptr_t) extra;
|
||||
if (node->token.type == SUBEXP && node->token.opr.idx == idx)
|
||||
node->token.opt_subexp = 1;
|
||||
|
||||
|
||||
11
configure.ac
11
configure.ac
@@ -521,6 +521,17 @@ AC_CHECK_LIB([curl], [curl_global_init],
|
||||
[NO_CURL=],
|
||||
[NO_CURL=YesPlease])
|
||||
|
||||
if test -z "$NO_CURL"; then
|
||||
|
||||
AC_CHECK_DECLS([curl_multi_init],
|
||||
[NO_CURL_MULTI=],
|
||||
[NO_CURL_MULTI=UnfortunatelyYes],
|
||||
[[#include <curl/curl.h>]])
|
||||
|
||||
GIT_CONF_SUBST([NO_CURL_MULTI])
|
||||
|
||||
fi
|
||||
|
||||
GIT_UNSTASH_FLAGS($CURLDIR)
|
||||
|
||||
GIT_CONF_SUBST([NO_CURL])
|
||||
|
||||
@@ -299,6 +299,10 @@ extern char *gitbasename(char *);
|
||||
#define PRIuMAX "llu"
|
||||
#endif
|
||||
|
||||
#ifndef SCNuMAX
|
||||
#define SCNuMAX PRIuMAX
|
||||
#endif
|
||||
|
||||
#ifndef PRIu32
|
||||
#define PRIu32 "u"
|
||||
#endif
|
||||
@@ -571,7 +575,7 @@ extern int git_lstat(const char *, struct stat *);
|
||||
#endif
|
||||
|
||||
#define DEFAULT_PACKED_GIT_LIMIT \
|
||||
((1024L * 1024L) * (sizeof(void*) >= 8 ? 8192 : 256))
|
||||
((1024L * 1024L) * (size_t)(sizeof(void*) >= 8 ? 8192 : 256))
|
||||
|
||||
#ifdef NO_PREAD
|
||||
#define pread git_pread
|
||||
|
||||
11
http.c
11
http.c
@@ -421,6 +421,17 @@ static CURL *get_curl_handle(void)
|
||||
curl_easy_setopt(result, CURLOPT_PROXY, curl_http_proxy);
|
||||
#if LIBCURL_VERSION_NUM >= 0x070a07
|
||||
curl_easy_setopt(result, CURLOPT_PROXYAUTH, CURLAUTH_ANY);
|
||||
#endif
|
||||
#if LIBCURL_VERSION_NUM >= 0x071800
|
||||
if (starts_with(curl_http_proxy, "socks5"))
|
||||
curl_easy_setopt(result,
|
||||
CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5);
|
||||
else if (starts_with(curl_http_proxy, "socks4a"))
|
||||
curl_easy_setopt(result,
|
||||
CURLOPT_PROXYTYPE, CURLPROXY_SOCKS4A);
|
||||
else if (starts_with(curl_http_proxy, "socks"))
|
||||
curl_easy_setopt(result,
|
||||
CURLOPT_PROXYTYPE, CURLPROXY_SOCKS4);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -1422,11 +1422,15 @@ static CURL *setup_curl(struct imap_server_conf *srvc)
|
||||
curl_easy_setopt(curl, CURLOPT_PORT, server.port);
|
||||
|
||||
if (server.auth_method) {
|
||||
#if LIBCURL_VERSION_NUM < 0x072200
|
||||
warning("No LOGIN_OPTIONS support in this cURL version");
|
||||
#else
|
||||
struct strbuf auth = STRBUF_INIT;
|
||||
strbuf_addstr(&auth, "AUTH=");
|
||||
strbuf_addstr(&auth, server.auth_method);
|
||||
curl_easy_setopt(curl, CURLOPT_LOGIN_OPTIONS, auth.buf);
|
||||
strbuf_release(&auth);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!server.use_ssl)
|
||||
|
||||
@@ -21,7 +21,7 @@ static int pack_revindex_hashsz;
|
||||
|
||||
static int pack_revindex_ix(struct packed_git *p)
|
||||
{
|
||||
unsigned long ui = (unsigned long)p;
|
||||
unsigned long ui = (unsigned long)(intptr_t)p;
|
||||
int i;
|
||||
|
||||
ui = ui ^ (ui >> 16); /* defeat structure alignment */
|
||||
|
||||
@@ -2017,7 +2017,7 @@ static unsigned long pack_entry_hash(struct packed_git *p, off_t base_offset)
|
||||
{
|
||||
unsigned long hash;
|
||||
|
||||
hash = (unsigned long)p + (unsigned long)base_offset;
|
||||
hash = (unsigned long)(intptr_t)p + (unsigned long)base_offset;
|
||||
hash += (hash >> 8) + (hash >> 16);
|
||||
return hash % MAX_DELTA_CACHE;
|
||||
}
|
||||
|
||||
@@ -19,4 +19,11 @@ GIT_TEXTDOMAINDIR='@@BUILD_DIR@@/po/build/locale'
|
||||
PATH='@@BUILD_DIR@@/bin-wrappers:'"$PATH"
|
||||
export GIT_EXEC_PATH GITPERLLIB PATH GIT_TEXTDOMAINDIR
|
||||
|
||||
if test -n "$TEST_GDB_GIT"
|
||||
then
|
||||
exec gdb -args "${GIT_EXEC_PATH}/@@PROG@@" "$@"
|
||||
echo "Could not run gdb -args ${GIT_EXEC_PATH}/@@PROG@@ $*" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exec "${GIT_EXEC_PATH}/@@PROG@@" "$@"
|
||||
|
||||
Reference in New Issue
Block a user