Date: Sat, 11 Jul 2015 03:12:35 +0000 (UTC) From: John-Mark Gurney <jmg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285366 - in head: lib/libmd sys/crypto/sha2 Message-ID: <201507110312.t6B3CZBv081280@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jmg Date: Sat Jul 11 03:12:34 2015 New Revision: 285366 URL: https://svnweb.freebsd.org/changeset/base/285366 Log: Complete the move that was started w/ r263218.. For some reason I didn't delete the files, so that means we need to bring the changes in r282726 to the correct files.. make tinderbox completed with this patch... Deleted: head/lib/libmd/sha256.h head/lib/libmd/sha256c.c Modified: head/sys/crypto/sha2/sha256.h head/sys/crypto/sha2/sha256c.c Modified: head/sys/crypto/sha2/sha256.h ============================================================================== --- head/sys/crypto/sha2/sha256.h Fri Jul 10 22:10:00 2015 (r285365) +++ head/sys/crypto/sha2/sha256.h Sat Jul 11 03:12:34 2015 (r285366) @@ -40,6 +40,38 @@ typedef struct SHA256Context { } SHA256_CTX; __BEGIN_DECLS + +/* Ensure libmd symbols do not clash with libcrypto */ + +#ifndef SHA256_Init +#define SHA256_Init _libmd_SHA256_Init +#endif +#ifndef SHA256_Update +#define SHA256_Update _libmd_SHA256_Update +#endif +#ifndef SHA256_Final +#define SHA256_Final _libmd_SHA256_Final +#endif +#ifndef SHA256_End +#define SHA256_End _libmd_SHA256_End +#endif +#ifndef SHA256_File +#define SHA256_File _libmd_SHA256_File +#endif +#ifndef SHA256_FileChunk +#define SHA256_FileChunk _libmd_SHA256_FileChunk +#endif +#ifndef SHA256_Data +#define SHA256_Data _libmd_SHA256_Data +#endif + +#ifndef SHA256_Transform +#define SHA256_Transform _libmd_SHA256_Transform +#endif +#ifndef SHA256_version +#define SHA256_version _libmd_SHA256_version +#endif + void SHA256_Init(SHA256_CTX *); void SHA256_Update(SHA256_CTX *, const void *, size_t); void SHA256_Final(unsigned char [32], SHA256_CTX *); Modified: head/sys/crypto/sha2/sha256c.c ============================================================================== --- head/sys/crypto/sha2/sha256c.c Fri Jul 10 22:10:00 2015 (r285365) +++ head/sys/crypto/sha2/sha256c.c Sat Jul 11 03:12:34 2015 (r285366) @@ -299,3 +299,18 @@ SHA256_Final(unsigned char digest[32], S /* Clear the context state */ memset((void *)ctx, 0, sizeof(*ctx)); } + +#ifdef WEAK_REFS +/* When building libmd, provide weak references. Note: this is not + activated in the context of compiling these sources for internal + use in libcrypt. + */ +#undef SHA256_Init +__weak_reference(_libmd_SHA256_Init, SHA256_Init); +#undef SHA256_Update +__weak_reference(_libmd_SHA256_Update, SHA256_Update); +#undef SHA256_Final +__weak_reference(_libmd_SHA256_Final, SHA256_Final); +#undef SHA256_Transform +__weak_reference(_libmd_SHA256_Transform, SHA256_Transform); +#endif
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201507110312.t6B3CZBv081280>