summaryrefslogtreecommitdiff
path: root/john/gcc5.patch
blob: f2a7984955abb57260fc3e11ebc0bc83fefaff72 (plain)
    1 From e2e868db3e153b3f959e119a51703d4afb99c624 Mon Sep 17 00:00:00 2001
    2 From: magnum <john.magnum@hushmail.com>
    3 Date: Wed, 13 May 2015 12:05:00 +0200
    4 Subject: [PATCH] Add another solution to #1093. This make it possible to build
    5  using gcc 5 without --std=gnu89 (although I kept the latter for now). See
    6  also #1250.
    7 
    8 ---
    9  src/DES_bs_b.c |  3 +++
   10  src/MD5_std.c  | 12 ++++++++++++
   11  2 files changed, 15 insertions(+)
   12 
   13 diff --git a/src/DES_bs_b.c b/src/DES_bs_b.c
   14 index 306b4e4..18c9235 100644
   15 --- a/src/DES_bs_b.c
   16 +++ b/src/DES_bs_b.c
   17 @@ -1272,6 +1272,9 @@ static MAYBE_INLINE void DES_bs_finalize_keys(void)
   18  #endif
   19  
   20  #if DES_bs_mt
   21 +#if __GNUC__ >= 5
   22 +extern
   23 +#endif
   24  MAYBE_INLINE void DES_bs_set_salt_for_thread(int t, unsigned int salt)
   25  #else
   26  void DES_bs_set_salt(ARCH_WORD salt)
   27 diff --git a/src/MD5_std.c b/src/MD5_std.c
   28 index 6bdcd35..1eec9b4 100644
   29 --- a/src/MD5_std.c
   30 +++ b/src/MD5_std.c
   31 @@ -496,9 +496,15 @@ extern void MD5_body(MD5_word x[15], MD5_word out[4]);
   32  #if MD5_std_mt
   33  #define MD5_body(x, out) \
   34  	MD5_body_for_thread(t, x, out)
   35 +#if __GNUC__ >= 5
   36 +extern
   37 +#endif
   38  MAYBE_INLINE_BODY void MD5_body_for_thread(int t,
   39  	MD5_word x[15], MD5_word out[4])
   40  #else
   41 +#if __GNUC__ >= 5
   42 +extern
   43 +#endif
   44  MAYBE_INLINE_BODY void MD5_body(MD5_word x[15], MD5_word out[4])
   45  #endif
   46  {
   47 @@ -595,10 +601,16 @@ MAYBE_INLINE_BODY void MD5_body(MD5_word x[15], MD5_word out[4])
   48  #if MD5_std_mt
   49  #define MD5_body(x0, x1, out0, out1) \
   50  	MD5_body_for_thread(t, x0, x1, out0, out1)
   51 +#if __GNUC__ >= 5
   52 +extern
   53 +#endif
   54  MAYBE_INLINE_BODY void MD5_body_for_thread(int t,
   55  	MD5_word x0[15], MD5_word x1[15],
   56  	MD5_word out0[4], MD5_word out1[4])
   57  #else
   58 +#if __GNUC__ >= 5
   59 +extern
   60 +#endif
   61  MAYBE_INLINE_BODY void MD5_body(MD5_word x0[15], MD5_word x1[15],
   62  	MD5_word out0[4], MD5_word out1[4])
   63  #endif

Generated by cgit