Port changes from bug 777122 to mfbt/SHA1.h, which makes using SHA1 not a linker error.
authorJustin Lebar <justin.lebar@gmail.com>
Thu, 25 Oct 2012 11:14:51 -0400
changeset 116956 feefd63e2f52e908755ba4b3d02b37522c3b91b2
parent 116955 2509dbe2179d0dc2e9e2b1ea8a935f725e4c3a64
child 116957 5682ea0f4ab14e3d8e01cd8bbf12e6e2db52c30c
push id239
push userakeybl@mozilla.com
push dateThu, 03 Jan 2013 21:54:43 +0000
treeherdermozilla-release@3a7b66445659 [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_ */