]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'jk/a-thread-only-dies-once' into maint
authorJunio C Hamano <gitster@pobox.com>
Fri, 26 Apr 2013 18:25:59 +0000 (11:25 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 26 Apr 2013 18:25:59 +0000 (11:25 -0700)
* jk/a-thread-only-dies-once:
  run-command: use thread-aware die_is_recursing routine
  usage: allow pluggable die-recursion checks

1  2 
git-compat-util.h
run-command.c
usage.c

index e715285e7c2e0a3d0b959505921b344dda55089d,6aee9df86893459999314554fd246c2f8f847128..ad4762499ef66336ed8a7ac17cf0a6cb36da5d15
@@@ -314,19 -299,9 +314,20 @@@ extern NORETURN void die_errno(const ch
  extern int error(const char *err, ...) __attribute__((format (printf, 1, 2)));
  extern void warning(const char *err, ...) __attribute__((format (printf, 1, 2)));
  
 +/*
 + * Let callers be aware of the constant return value; this can help
 + * gcc with -Wuninitialized analysis. We restrict this trick to gcc, though,
 + * because some compilers may not support variadic macros. Since we're only
 + * trying to help gcc, anyway, it's OK; other compilers will fall back to
 + * using the function as usual.
 + */
 +#if defined(__GNUC__) && ! defined(__clang__)
 +#define error(...) (error(__VA_ARGS__), -1)
 +#endif
 +
  extern void set_die_routine(NORETURN_PTR void (*routine)(const char *err, va_list params));
  extern void set_error_routine(void (*routine)(const char *err, va_list params));
+ extern void set_die_is_recursing_routine(int (*routine)(void));
  
  extern int prefixcmp(const char *str, const char *prefix);
  extern int suffixcmp(const char *str, const char *suffix);
diff --cc run-command.c
Simple merge
diff --cc usage.c
Simple merge