On 2016-05-26 15:29, Conrad E. Meyer wrote: > Author: cem > Date: Thu May 26 19:29:29 2016 > New Revision: 300773 > URL: https://svnweb.freebsd.org/changeset/base/300773 > > Log: > crypto routines: Hint minimum buffer sizes to the compiler > > Use the C99 'static' keyword to hint to the compiler IVs and output digest > sizes. The keyword informs the compiler of the minimum valid size for a > given > array. Obviously not every pointer can be validated (i.e., the compiler can > produce false negative but not false positive reports). > > No functional change. No ABI change. > > Sponsored by: EMC / Isilon Storage Division > > Modified: > head/sys/crypto/aesni/aesni.h > head/sys/crypto/aesni/aesni_wrap.c > head/sys/crypto/sha1.c > head/sys/crypto/sha1.h > head/sys/crypto/sha2/sha256.h > head/sys/crypto/sha2/sha256c.c > head/sys/crypto/sha2/sha384.h > head/sys/crypto/sha2/sha512.h > head/sys/crypto/sha2/sha512c.c > head/sys/crypto/siphash/siphash.c > head/sys/crypto/siphash/siphash.h > head/sys/kern/md4c.c > head/sys/kern/md5c.c > head/sys/sys/md4.h > head/sys/sys/md5.h > > Modified: head/sys/sys/md5.h > ============================================================================== > --- head/sys/sys/md5.h Thu May 26 19:17:51 2016 (r300772) > +++ head/sys/sys/md5.h Thu May 26 19:29:29 2016 (r300773) > @@ -44,10 +44,6 @@ typedef struct MD5Context { > __BEGIN_DECLS > void MD5Init (MD5_CTX *); > void MD5Update (MD5_CTX *, const void *, unsigned int); > -void MD5Final (unsigned char [16], MD5_CTX *); > -char * MD5End(MD5_CTX *, char *); > -char * MD5File(const char *, char *); > -char * MD5FileChunk(const char *, char *, off_t, off_t); > -char * MD5Data(const void *, unsigned int, char *); > +void MD5Final (unsigned char[static MD5_DIGEST_LENGTH], MD5_CTX *); > __END_DECLS > #endif /* _SYS_MD5_H_ */ >
This seems to have broken on sparc64, and other gcc based arches: ===> lib/libc (obj,all,install) In file included from /usr/src/lib/libc/../libmd/md5.h:40, from /usr/src/lib/libc/../libmd/md5c.c:42: /usr/obj/sparc64.sparc64/usr/src/tmp/usr/include/sys/md5.h:47: error: static or type qualifiers in abstract declarator --- md5c.o --- *** [md5c.o] Error code 1 -- Allan Jude _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"