Port changes from bug 777122 to mfbt/SHA1.h, which makes using SHA1 not a linker error.
☠☠ backed out by 27e470b01865 ☠ ☠
authorJustin Lebar <justin.lebar@gmail.com>
Thu, 25 Oct 2012 11:14:51 -0400
changeset 116345 5844c438d0776af76650808aec18ff291094c050
parent 116344 4d04726fe87b8f7cd6c75ef0bb88202811b02d74
child 116346 236f979ea908025341bc6ffce5af247cee6e98b0
push id1708
push userakeybl@mozilla.com
push dateMon, 19 Nov 2012 21:10:21 +0000
treeherdermozilla-beta@27b14fe50103 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs777122
milestone18.0a2
Port changes from bug 777122 to mfbt/SHA1.h, which makes using SHA1 not a linker error.
mfbt/SHA1.h
--- a/mfbt/SHA1.h
+++ b/mfbt/SHA1.h
@@ -20,27 +20,29 @@
  * The finish method may only be called once and cannot be followed by calls
  * to update.
  */
 
 #ifndef mozilla_SHA1_h_
 #define mozilla_SHA1_h_
 
 #include "mozilla/StandardInteger.h"
+#include "mozilla/Types.h"
+
 namespace mozilla {
 class SHA1Sum {
   union {
     uint32_t w[16];         /* input buffer */
     uint8_t  b[64];
   } u;
   uint64_t size;            /* count of hashed bytes. */
   unsigned H[22];           /* 5 state variables, 16 tmp values, 1 extra */
   bool mDone;
 
 public:
   static const unsigned int HashSize = 20;
-  SHA1Sum();
-  void update(const void* dataIn, uint32_t len);
-  void finish(uint8_t hashout[20]);
+  MFBT_API() SHA1Sum();
+  MFBT_API(void) update(const void* dataIn, uint32_t len);
+  MFBT_API(void) finish(uint8_t hashout[20]);
 };
 }
 
 #endif /* mozilla_SHA1_h_ */