]> git.xonotic.org Git - xonotic/d0_blind_id.git/blobdiff - sha2.c
Merge branch 'little_update' into 'master'
[xonotic/d0_blind_id.git] / sha2.c
diff --git a/sha2.c b/sha2.c
index a06bbb4628079577215beaf38ff05abd847d8434..4d31cec38cab843e09cabccfe4fd6ba13f8f7f72 100644 (file)
--- a/sha2.c
+++ b/sha2.c
@@ -1,9 +1,11 @@
+#include "d0.h"
+
 /*
  * include the license notice into the dynamic library to "reproduce the
  * copyright notice" automatically, so the application developer does not have
  * to care about this term
  */
-const char *d0_sha2_c_bsd_license_notice = "\n"
+const char *d0_sha2_c_bsd_license_notice D0_USED = "\n"
 "/*\n"
 " * FILE:      sha2.c\n"
 " * AUTHOR:    Aaron D. Gifford - http://www.aarongifford.com/\n"
@@ -35,7 +37,7 @@ const char *d0_sha2_c_bsd_license_notice = "\n"
 " * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n"
 " * SUCH DAMAGE.\n"
 " *\n"
-" * $Id: sha2.c,v 1.1 2001/11/08 00:01:51 adg Exp adg $\n"
+" * $Original-Id: sha2.c,v 1.1 2001/11/08 00:01:51 adg Exp adg $\n"
 " */\n";
 
 #include <string.h>    /* memcpy()/memset() or bcopy()/bzero() */
@@ -187,6 +189,14 @@ typedef u_int64_t sha2_word64;     /* Exactly 8 bytes */
 #define MEMCPY_BCOPY(d,s,l)    bcopy((s), (d), (l))
 #endif
 
+#if HAVE_MEMSET_S
+#undef MEMSET_BZERO
+#define MEMSET_BZERO(p, l)      memset_s((p), (l), 0, (l))
+#elif HAVE_EXPLICIT_BZERO
+#undef MEMSET_BZERO
+#define MEMSET_BZERO(p, l)      explicit_bzero((p), (l))
+#endif
+
 
 /*** THE SIX LOGICAL FUNCTIONS ****************************************/
 /*