From: Micah Cowan Date: Fri, 4 Sep 2009 16:41:51 +0000 (-0700) Subject: Update md5/. X-Git-Tag: v1.13~257 X-Git-Url: http://sjero.net/git/?p=wget;a=commitdiff_plain;h=2456d9bc547aacc8ad387f441e81455cd9301fe7 Update md5/. --- diff --git a/.hgignore b/.hgignore index f21afade..f1c89deb 100644 --- a/.hgignore +++ b/.hgignore @@ -20,6 +20,7 @@ lib/alloca.h lib/libgnu.a lib/unistd.h lib/stdbool.h +lib/stddef.h lib/stdint.h lib/stdio.h lib/stdlib.h @@ -33,6 +34,8 @@ lib/ref-del.sed md5/.deps md5/*.o md5/libmd5.a +md5/stddef.h +md5/stdint.h tests/WgetTest.pm tests/unit-tests tests/*.o diff --git a/ChangeLog b/ChangeLog index 5e3823b2..89104ebd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2009-09-04 Micah Cowan - + + * md5/*: Updated md5 from gnulib. + * configure.ac: Configured build-aux/ as auxiliarry directory. * build-aux/compile, build-aux/config.guess, diff --git a/lib/Makefile.am b/lib/Makefile.am index ba8029a1..05163698 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -9,7 +9,7 @@ # the same distribution terms as the rest of that program. # # Generated by gnulib-tool. -# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=. --no-libtool --macro-prefix=gl alloca announce-gen c-ctype getopt getpass-gnu gnupload maintainer-makefile quote quotearg strcasestr update-copyright +# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --no-libtool --macro-prefix=gl alloca announce-gen c-ctype getopt getpass-gnu gnupload maintainer-makefile quote quotearg strcasestr update-copyright AUTOMAKE_OPTIONS = 1.5 gnits @@ -68,7 +68,7 @@ EXTRA_DIST += alloca.in.h ## begin gnulib module announce-gen -EXTRA_DIST += $(top_srcdir)/./announce-gen +EXTRA_DIST += $(top_srcdir)/build-aux/announce-gen ## end gnulib module announce-gen @@ -268,7 +268,7 @@ EXTRA_DIST += $(top_srcdir)/GNUmakefile ## begin gnulib module gnupload -EXTRA_DIST += $(top_srcdir)/./gnupload +EXTRA_DIST += $(top_srcdir)/build-aux/gnupload ## end gnulib module gnupload @@ -281,9 +281,9 @@ EXTRA_DIST += intprops.h ## begin gnulib module link-warning -LINK_WARNING_H=$(top_srcdir)/./link-warning.h +LINK_WARNING_H=$(top_srcdir)/build-aux/link-warning.h -EXTRA_DIST += $(top_srcdir)/./link-warning.h +EXTRA_DIST += $(top_srcdir)/build-aux/link-warning.h ## end gnulib module link-warning @@ -887,21 +887,21 @@ EXTRA_DIST += unistd.in.h ## begin gnulib module update-copyright -EXTRA_DIST += $(top_srcdir)/./update-copyright +EXTRA_DIST += $(top_srcdir)/build-aux/update-copyright ## end gnulib module update-copyright ## begin gnulib module useless-if-before-free -EXTRA_DIST += $(top_srcdir)/./useless-if-before-free +EXTRA_DIST += $(top_srcdir)/build-aux/useless-if-before-free ## end gnulib module useless-if-before-free ## begin gnulib module vc-list-files -EXTRA_DIST += $(top_srcdir)/./vc-list-files +EXTRA_DIST += $(top_srcdir)/build-aux/vc-list-files ## end gnulib module vc-list-files diff --git a/m4/gnulib-cache.m4 b/m4/gnulib-cache.m4 index 56ec1b05..bfcbea78 100644 --- a/m4/gnulib-cache.m4 +++ b/m4/gnulib-cache.m4 @@ -15,7 +15,7 @@ # Specification in the form of a command-line invocation: -# gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=. --no-libtool --macro-prefix=gl alloca announce-gen c-ctype getopt getpass-gnu gnupload maintainer-makefile quote quotearg strcasestr update-copyright +# gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --no-libtool --macro-prefix=gl alloca announce-gen c-ctype getopt getpass-gnu gnupload maintainer-makefile quote quotearg strcasestr update-copyright # Specification in the form of a few gnulib-tool.m4 macro invocations: gl_LOCAL_DIR([]) diff --git a/md5/Makefile.am b/md5/Makefile.am index f1001341..5a3312ff 100644 --- a/md5/Makefile.am +++ b/md5/Makefile.am @@ -9,7 +9,7 @@ # the same distribution terms as the rest of that program. # # Generated by gnulib-tool. -# Reproduce by: gnulib-tool --import --dir=. --lib=libmd5 --source-base=md5 --m4-base=md5/m4 --doc-base=doc --tests-base=tests --aux-dir=. --no-libtool --macro-prefix=md5 crypto/md5 +# Reproduce by: gnulib-tool --import --dir=. --lib=libmd5 --source-base=md5 --m4-base=md5/m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --no-libtool --macro-prefix=md5 crypto/md5 AUTOMAKE_OPTIONS = 1.5 gnits @@ -48,12 +48,35 @@ EXTRA_libmd5_a_SOURCES += md5.c ## begin gnulib module link-warning -LINK_WARNING_H=$(top_srcdir)/./link-warning.h +LINK_WARNING_H=$(top_srcdir)/build-aux/link-warning.h -EXTRA_DIST += $(top_srcdir)/./link-warning.h +EXTRA_DIST += $(top_srcdir)/build-aux/link-warning.h ## end gnulib module link-warning +## begin gnulib module stddef + +BUILT_SOURCES += $(STDDEF_H) + +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +stddef.h: stddef.in.h + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ + sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''NEXT_STDDEF_H''@|$(NEXT_STDDEF_H)|g' \ + -e 's|@''HAVE_WCHAR_T''@|$(HAVE_WCHAR_T)|g' \ + -e 's|@''REPLACE_NULL''@|$(REPLACE_NULL)|g' \ + < $(srcdir)/stddef.in.h; \ + } > $@-t && \ + mv $@-t $@ +MOSTLYCLEANFILES += stddef.h stddef.h-t + +EXTRA_DIST += stddef.in.h + +## end gnulib module stddef + ## begin gnulib module stdint BUILT_SOURCES += $(STDINT_H) @@ -61,7 +84,7 @@ BUILT_SOURCES += $(STDINT_H) # We need the following in order to create when the system # doesn't have one that works with the given compiler. stdint.h: stdint.in.h - rm -f $@-t $@ + $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ @@ -88,7 +111,7 @@ stdint.h: stdint.in.h -e 's/@''HAVE_SIGNED_WINT_T''@/$(HAVE_SIGNED_WINT_T)/g' \ -e 's/@''WINT_T_SUFFIX''@/$(WINT_T_SUFFIX)/g' \ < $(srcdir)/stdint.in.h; \ - } > $@-t + } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += stdint.h stdint.h-t @@ -103,7 +126,7 @@ BUILT_SOURCES += $(WCHAR_H) # We need the following in order to create when the system # version does not work standalone. wchar.h: wchar.in.h - rm -f $@-t $@ + $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ @@ -146,7 +169,7 @@ wchar.h: wchar.in.h -e 's|@''REPLACE_WCWIDTH''@|$(REPLACE_WCWIDTH)|g' \ -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \ < $(srcdir)/wchar.in.h; \ - } > $@-t + } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += wchar.h wchar.h-t diff --git a/md5/m4/gnulib-cache.m4 b/md5/m4/gnulib-cache.m4 index b0872afd..8a5d1f2e 100644 --- a/md5/m4/gnulib-cache.m4 +++ b/md5/m4/gnulib-cache.m4 @@ -15,7 +15,7 @@ # Specification in the form of a command-line invocation: -# gnulib-tool --import --dir=. --lib=libmd5 --source-base=md5 --m4-base=md5/m4 --doc-base=doc --tests-base=tests --aux-dir=. --no-libtool --macro-prefix=md5 crypto/md5 +# gnulib-tool --import --dir=. --lib=libmd5 --source-base=md5 --m4-base=md5/m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --no-libtool --macro-prefix=md5 crypto/md5 # Specification in the form of a few gnulib-tool.m4 macro invocations: gl_LOCAL_DIR([]) diff --git a/md5/m4/gnulib-comp.m4 b/md5/m4/gnulib-comp.m4 index 24cf478a..1b6f3e80 100644 --- a/md5/m4/gnulib-comp.m4 +++ b/md5/m4/gnulib-comp.m4 @@ -44,6 +44,7 @@ AC_DEFUN([md5_INIT], gl_source_base='md5' gl_MD5 gl_MULTIARCH + gl_STDDEF_H gl_STDINT_H gl_WCHAR_H m4_ifval(md5_LIBSOURCES_LIST, [ @@ -182,6 +183,7 @@ AC_DEFUN([md5_FILE_LIST], [ lib/dummy.c lib/md5.c lib/md5.h + lib/stddef.in.h lib/stdint.in.h lib/wchar.in.h m4/00gnulib.m4 @@ -190,7 +192,9 @@ AC_DEFUN([md5_FILE_LIST], [ m4/longlong.m4 m4/md5.m4 m4/multiarch.m4 + m4/stddef_h.m4 m4/stdint.m4 m4/wchar.m4 + m4/wchar_t.m4 m4/wint_t.m4 ]) diff --git a/md5/m4/stddef_h.m4 b/md5/m4/stddef_h.m4 new file mode 100644 index 00000000..682e9c62 --- /dev/null +++ b/md5/m4/stddef_h.m4 @@ -0,0 +1,45 @@ +dnl A placeholder for POSIX 2008 , for platforms that have issues. +# stddef_h.m4 serial 1 +dnl Copyright (C) 2009 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +AC_DEFUN([gl_STDDEF_H], +[ + AC_REQUIRE([gl_STDDEF_H_DEFAULTS]) + AC_REQUIRE([gt_TYPE_WCHAR_T]) + if test $gt_cv_c_wchar_t = no; then + HAVE_WCHAR_T=0 + STDDEF_H=stddef.h + fi + AC_CACHE_CHECK([whether NULL can be used in arbitrary expressions], + [gl_cv_decl_null_works], + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include + int test[2 * (sizeof NULL == sizeof (void *)) -1]; +]])], + [gl_cv_decl_null_works=yes], + [gl_cv_decl_null_works=no])]) + if test $gl_cv_decl_null_works = no; then + REPLACE_NULL=1 + STDDEF_H=stddef.h + fi + if test -n "$STDDEF_H"; then + gl_CHECK_NEXT_HEADERS([stddef.h]) + fi +]) + +AC_DEFUN([gl_STDDEF_MODULE_INDICATOR], +[ + dnl Use AC_REQUIRE here, so that the default settings are expanded once only. + AC_REQUIRE([gl_STDDEF_H_DEFAULTS]) + GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1 +]) + +AC_DEFUN([gl_STDDEF_H_DEFAULTS], +[ + dnl Assume proper GNU behavior unless another module says otherwise. + REPLACE_NULL=0; AC_SUBST([REPLACE_NULL]) + HAVE_WCHAR_T=1; AC_SUBST([HAVE_WCHAR_T]) + STDDEF_H=''; AC_SUBST([STDDEF_H]) +]) diff --git a/md5/m4/wchar.m4 b/md5/m4/wchar.m4 index 2e52a82a..ce53a45c 100644 --- a/md5/m4/wchar.m4 +++ b/md5/m4/wchar.m4 @@ -7,7 +7,7 @@ dnl with or without modifications, as long as this notice is preserved. dnl Written by Eric Blake. -# wchar.m4 serial 23 +# wchar.m4 serial 25 AC_DEFUN([gl_WCHAR_H], [ @@ -27,7 +27,10 @@ wchar_t w;]], fi AC_SUBST([HAVE_WINT_T]) - if test $gl_cv_header_wchar_h_standalone != yes || test $gt_cv_c_wint_t != yes; then + dnl If is replaced, then must also be replaced. + AC_REQUIRE([gl_STDDEF_H]) + + if test $gl_cv_header_wchar_h_standalone != yes || test $gt_cv_c_wint_t != yes || test -n "$STDDEF_H"; then WCHAR_H=wchar.h fi diff --git a/md5/m4/wchar_t.m4 b/md5/m4/wchar_t.m4 new file mode 100644 index 00000000..fb27a7f6 --- /dev/null +++ b/md5/m4/wchar_t.m4 @@ -0,0 +1,20 @@ +# wchar_t.m4 serial 3 (gettext-0.18) +dnl Copyright (C) 2002-2003, 2008, 2009 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Bruno Haible. +dnl Test whether has the 'wchar_t' type. +dnl Prerequisite: AC_PROG_CC + +AC_DEFUN([gt_TYPE_WCHAR_T], +[ + AC_CACHE_CHECK([for wchar_t], [gt_cv_c_wchar_t], + [AC_TRY_COMPILE([#include + wchar_t foo = (wchar_t)'\0';], , + [gt_cv_c_wchar_t=yes], [gt_cv_c_wchar_t=no])]) + if test $gt_cv_c_wchar_t = yes; then + AC_DEFINE([HAVE_WCHAR_T], [1], [Define if you have the 'wchar_t' type.]) + fi +]) diff --git a/md5/md5.h b/md5/md5.h index a3f413b8..3999b9a5 100644 --- a/md5/md5.h +++ b/md5/md5.h @@ -1,7 +1,7 @@ /* Declaration of functions and data types used for MD5 sum computing library functions. - Copyright (C) 1995, 1996, 1997, 1999, 2000, 2001, 2004, 2005, 2006, - 2008, 2009 Free Software Foundation, Inc. + Copyright (C) 1995-1997,1999,2000,2001,2004,2005,2006,2008,2009 + Free Software Foundation, Inc. This file is part of the GNU C Library. This program is free software; you can redistribute it and/or modify it @@ -54,6 +54,10 @@ # define __md5_stream md5_stream #endif +# ifdef __cplusplus +extern "C" { +# endif + /* Structure to save state of computation between the single steps. */ struct md5_ctx { @@ -115,4 +119,8 @@ extern int __md5_stream (FILE *stream, void *resblock) __THROW; extern void *__md5_buffer (const char *buffer, size_t len, void *resblock) __THROW; +# ifdef __cplusplus +} +# endif + #endif /* md5.h */ diff --git a/md5/stddef.in.h b/md5/stddef.in.h new file mode 100644 index 00000000..aff3b94c --- /dev/null +++ b/md5/stddef.in.h @@ -0,0 +1,86 @@ +/* A substitute for POSIX 2008 , for platforms that have issues. + + Copyright (C) 2009 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +/* Written by Eric Blake. */ + +/* + * POSIX 2008 for platforms that have issues. + * + */ + +#if __GNUC__ >= 3 +@PRAGMA_SYSTEM_HEADER@ +#endif + +#if defined __need_wchar_t || defined __need_size_t \ + || defined __need_ptrdiff_t || defined __need_NULL \ + || defined __need_wint_t +/* Special invocation convention inside gcc header files. In + particular, gcc provides a version of that blindly + redefines NULL even when __need_wint_t was defined, even though + wint_t is not normally provided by . Hence, we must + remember if special invocation has ever been used to obtain wint_t, + in which case we need to clean up NULL yet again. */ + +# if !(defined _GL_STDDEF_H && defined _GL_STDDEF_WINT_T) +# ifdef __need_wint_t +# undef _GL_STDDEF_H +# define _GL_STDDEF_WINT_T +# endif +# @INCLUDE_NEXT@ @NEXT_STDDEF_H@ +# endif + +#else +/* Normal invocation convention. */ + +# ifndef _GL_STDDEF_H + +/* The include_next requires a split double-inclusion guard. */ + +# @INCLUDE_NEXT@ @NEXT_STDDEF_H@ + +# ifndef _GL_STDDEF_H +# define _GL_STDDEF_H + +/* On NetBSD 5.0, the definition of NULL lacks proper parentheses. */ +#if @REPLACE_NULL@ +# undef NULL +# ifdef __cplusplus + /* ISO C++ says that the macro NULL must expand to an integer constant + expression, hence '((void *) 0)' is not allowed in C++. */ +# if __GNUG__ >= 3 + /* GNU C++ has a __null macro that behaves like an integer ('int' or + 'long') but has the same size as a pointer. Use that, to avoid + warnings. */ +# define NULL __null +# else +# define NULL 0L +# endif +# else +# define NULL ((void *) 0) +# endif +#endif + +/* Some platforms lack wchar_t. */ +#if !@HAVE_WCHAR_T@ +# define wchar_t int +#endif + +# endif /* _GL_STDDEF_H */ +# endif /* _GL_STDDEF_H */ +#endif /* __need_XXX */