зеркало из https://github.com/microsoft/git.git
OS X: Fix redeclaration of die warning
compat/apple-common-crypto.h uses die() in one of its macros, but was included in git-compat-util.h before the definition of die. Fix by simply moving the relevant block after the die/error/warning declarations. Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com> Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Родитель
c984938f9c
Коммит
f2be034c69
|
@ -128,16 +128,6 @@
|
||||||
#include <poll.h>
|
#include <poll.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef NO_OPENSSL
|
|
||||||
#ifdef APPLE_COMMON_CRYPTO
|
|
||||||
#include "compat/apple-common-crypto.h"
|
|
||||||
#else
|
|
||||||
#include <openssl/evp.h>
|
|
||||||
#include <openssl/hmac.h>
|
|
||||||
#endif /* APPLE_COMMON_CRYPTO */
|
|
||||||
#include <openssl/x509v3.h>
|
|
||||||
#endif /* NO_OPENSSL */
|
|
||||||
|
|
||||||
#if defined(__MINGW32__)
|
#if defined(__MINGW32__)
|
||||||
/* pull in Windows compatibility stuff */
|
/* pull in Windows compatibility stuff */
|
||||||
#include "compat/mingw.h"
|
#include "compat/mingw.h"
|
||||||
|
@ -329,6 +319,16 @@ extern NORETURN void die_errno(const char *err, ...) __attribute__((format (prin
|
||||||
extern int error(const char *err, ...) __attribute__((format (printf, 1, 2)));
|
extern int error(const char *err, ...) __attribute__((format (printf, 1, 2)));
|
||||||
extern void warning(const char *err, ...) __attribute__((format (printf, 1, 2)));
|
extern void warning(const char *err, ...) __attribute__((format (printf, 1, 2)));
|
||||||
|
|
||||||
|
#ifndef NO_OPENSSL
|
||||||
|
#ifdef APPLE_COMMON_CRYPTO
|
||||||
|
#include "compat/apple-common-crypto.h"
|
||||||
|
#else
|
||||||
|
#include <openssl/evp.h>
|
||||||
|
#include <openssl/hmac.h>
|
||||||
|
#endif /* APPLE_COMMON_CRYPTO */
|
||||||
|
#include <openssl/x509v3.h>
|
||||||
|
#endif /* NO_OPENSSL */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Let callers be aware of the constant return value; this can help
|
* Let callers be aware of the constant return value; this can help
|
||||||
* gcc with -Wuninitialized analysis. We restrict this trick to gcc, though,
|
* gcc with -Wuninitialized analysis. We restrict this trick to gcc, though,
|
||||||
|
|
Загрузка…
Ссылка в новой задаче