1
0
mirror of https://github.com/moparisthebest/wget synced 2024-07-03 16:38:41 -04:00

Update md5/.

This commit is contained in:
Micah Cowan 2009-09-04 09:41:51 -07:00
parent 55437151ba
commit 2456d9bc54
12 changed files with 216 additions and 22 deletions

View File

@ -20,6 +20,7 @@ lib/alloca.h
lib/libgnu.a lib/libgnu.a
lib/unistd.h lib/unistd.h
lib/stdbool.h lib/stdbool.h
lib/stddef.h
lib/stdint.h lib/stdint.h
lib/stdio.h lib/stdio.h
lib/stdlib.h lib/stdlib.h
@ -33,6 +34,8 @@ lib/ref-del.sed
md5/.deps md5/.deps
md5/*.o md5/*.o
md5/libmd5.a md5/libmd5.a
md5/stddef.h
md5/stdint.h
tests/WgetTest.pm tests/WgetTest.pm
tests/unit-tests tests/unit-tests
tests/*.o tests/*.o

View File

@ -1,5 +1,7 @@
2009-09-04 Micah Cowan <micah@cowan.name> 2009-09-04 Micah Cowan <micah@cowan.name>
* md5/*: Updated md5 from gnulib.
* configure.ac: Configured build-aux/ as auxiliarry directory. * configure.ac: Configured build-aux/ as auxiliarry directory.
* build-aux/compile, build-aux/config.guess, * build-aux/compile, build-aux/config.guess,

View File

@ -9,7 +9,7 @@
# the same distribution terms as the rest of that program. # the same distribution terms as the rest of that program.
# #
# Generated by gnulib-tool. # 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 AUTOMAKE_OPTIONS = 1.5 gnits
@ -68,7 +68,7 @@ EXTRA_DIST += alloca.in.h
## begin gnulib module announce-gen ## begin gnulib module announce-gen
EXTRA_DIST += $(top_srcdir)/./announce-gen EXTRA_DIST += $(top_srcdir)/build-aux/announce-gen
## end gnulib module announce-gen ## end gnulib module announce-gen
@ -268,7 +268,7 @@ EXTRA_DIST += $(top_srcdir)/GNUmakefile
## begin gnulib module gnupload ## begin gnulib module gnupload
EXTRA_DIST += $(top_srcdir)/./gnupload EXTRA_DIST += $(top_srcdir)/build-aux/gnupload
## end gnulib module gnupload ## end gnulib module gnupload
@ -281,9 +281,9 @@ EXTRA_DIST += intprops.h
## begin gnulib module link-warning ## 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 ## end gnulib module link-warning
@ -887,21 +887,21 @@ EXTRA_DIST += unistd.in.h
## begin gnulib module update-copyright ## begin gnulib module update-copyright
EXTRA_DIST += $(top_srcdir)/./update-copyright EXTRA_DIST += $(top_srcdir)/build-aux/update-copyright
## end gnulib module update-copyright ## end gnulib module update-copyright
## begin gnulib module useless-if-before-free ## 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 ## end gnulib module useless-if-before-free
## begin gnulib module vc-list-files ## 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 ## end gnulib module vc-list-files

View File

@ -15,7 +15,7 @@
# Specification in the form of a command-line invocation: # 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: # Specification in the form of a few gnulib-tool.m4 macro invocations:
gl_LOCAL_DIR([]) gl_LOCAL_DIR([])

View File

@ -9,7 +9,7 @@
# the same distribution terms as the rest of that program. # the same distribution terms as the rest of that program.
# #
# Generated by gnulib-tool. # 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 AUTOMAKE_OPTIONS = 1.5 gnits
@ -48,12 +48,35 @@ EXTRA_libmd5_a_SOURCES += md5.c
## begin gnulib module link-warning ## 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 ## end gnulib module link-warning
## begin gnulib module stddef
BUILT_SOURCES += $(STDDEF_H)
# We need the following in order to create <stddef.h> 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 ## begin gnulib module stdint
BUILT_SOURCES += $(STDINT_H) BUILT_SOURCES += $(STDINT_H)
@ -61,7 +84,7 @@ BUILT_SOURCES += $(STDINT_H)
# We need the following in order to create <stdint.h> when the system # We need the following in order to create <stdint.h> when the system
# doesn't have one that works with the given compiler. # doesn't have one that works with the given compiler.
stdint.h: stdint.in.h stdint.h: stdint.in.h
rm -f $@-t $@ $(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
sed -e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \ sed -e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \
-e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|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/@''HAVE_SIGNED_WINT_T''@/$(HAVE_SIGNED_WINT_T)/g' \
-e 's/@''WINT_T_SUFFIX''@/$(WINT_T_SUFFIX)/g' \ -e 's/@''WINT_T_SUFFIX''@/$(WINT_T_SUFFIX)/g' \
< $(srcdir)/stdint.in.h; \ < $(srcdir)/stdint.in.h; \
} > $@-t } > $@-t && \
mv $@-t $@ mv $@-t $@
MOSTLYCLEANFILES += stdint.h stdint.h-t MOSTLYCLEANFILES += stdint.h stdint.h-t
@ -103,7 +126,7 @@ BUILT_SOURCES += $(WCHAR_H)
# We need the following in order to create <wchar.h> when the system # We need the following in order to create <wchar.h> when the system
# version does not work standalone. # version does not work standalone.
wchar.h: wchar.in.h wchar.h: wchar.in.h
rm -f $@-t $@ $(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|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 's|@''REPLACE_WCWIDTH''@|$(REPLACE_WCWIDTH)|g' \
-e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \ -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
< $(srcdir)/wchar.in.h; \ < $(srcdir)/wchar.in.h; \
} > $@-t } > $@-t && \
mv $@-t $@ mv $@-t $@
MOSTLYCLEANFILES += wchar.h wchar.h-t MOSTLYCLEANFILES += wchar.h wchar.h-t

View File

@ -15,7 +15,7 @@
# Specification in the form of a command-line invocation: # 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: # Specification in the form of a few gnulib-tool.m4 macro invocations:
gl_LOCAL_DIR([]) gl_LOCAL_DIR([])

View File

@ -44,6 +44,7 @@ AC_DEFUN([md5_INIT],
gl_source_base='md5' gl_source_base='md5'
gl_MD5 gl_MD5
gl_MULTIARCH gl_MULTIARCH
gl_STDDEF_H
gl_STDINT_H gl_STDINT_H
gl_WCHAR_H gl_WCHAR_H
m4_ifval(md5_LIBSOURCES_LIST, [ m4_ifval(md5_LIBSOURCES_LIST, [
@ -182,6 +183,7 @@ AC_DEFUN([md5_FILE_LIST], [
lib/dummy.c lib/dummy.c
lib/md5.c lib/md5.c
lib/md5.h lib/md5.h
lib/stddef.in.h
lib/stdint.in.h lib/stdint.in.h
lib/wchar.in.h lib/wchar.in.h
m4/00gnulib.m4 m4/00gnulib.m4
@ -190,7 +192,9 @@ AC_DEFUN([md5_FILE_LIST], [
m4/longlong.m4 m4/longlong.m4
m4/md5.m4 m4/md5.m4
m4/multiarch.m4 m4/multiarch.m4
m4/stddef_h.m4
m4/stdint.m4 m4/stdint.m4
m4/wchar.m4 m4/wchar.m4
m4/wchar_t.m4
m4/wint_t.m4 m4/wint_t.m4
]) ])

45
md5/m4/stddef_h.m4 Normal file
View File

@ -0,0 +1,45 @@
dnl A placeholder for POSIX 2008 <stddef.h>, 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 <stddef.h>
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])
])

View File

@ -7,7 +7,7 @@ dnl with or without modifications, as long as this notice is preserved.
dnl Written by Eric Blake. dnl Written by Eric Blake.
# wchar.m4 serial 23 # wchar.m4 serial 25
AC_DEFUN([gl_WCHAR_H], AC_DEFUN([gl_WCHAR_H],
[ [
@ -27,7 +27,10 @@ wchar_t w;]],
fi fi
AC_SUBST([HAVE_WINT_T]) AC_SUBST([HAVE_WINT_T])
if test $gl_cv_header_wchar_h_standalone != yes || test $gt_cv_c_wint_t != yes; then dnl If <stddef.h> is replaced, then <wchar.h> 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 WCHAR_H=wchar.h
fi fi

20
md5/m4/wchar_t.m4 Normal file
View File

@ -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 <stddef.h> 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 <stddef.h>
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
])

View File

@ -1,7 +1,7 @@
/* Declaration of functions and data types used for MD5 sum computing /* Declaration of functions and data types used for MD5 sum computing
library functions. library functions.
Copyright (C) 1995, 1996, 1997, 1999, 2000, 2001, 2004, 2005, 2006, Copyright (C) 1995-1997,1999,2000,2001,2004,2005,2006,2008,2009
2008, 2009 Free Software Foundation, Inc. Free Software Foundation, Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.
This program is free software; you can redistribute it and/or modify it This program is free software; you can redistribute it and/or modify it
@ -54,6 +54,10 @@
# define __md5_stream md5_stream # define __md5_stream md5_stream
#endif #endif
# ifdef __cplusplus
extern "C" {
# endif
/* Structure to save state of computation between the single steps. */ /* Structure to save state of computation between the single steps. */
struct md5_ctx 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, extern void *__md5_buffer (const char *buffer, size_t len,
void *resblock) __THROW; void *resblock) __THROW;
# ifdef __cplusplus
}
# endif
#endif /* md5.h */ #endif /* md5.h */

86
md5/stddef.in.h Normal file
View File

@ -0,0 +1,86 @@
/* A substitute for POSIX 2008 <stddef.h>, 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 <stddef.h> for platforms that have issues.
* <http://www.opengroup.org/susv3xbd/stddef.h.html>
*/
#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 <stddef.h> that blindly
redefines NULL even when __need_wint_t was defined, even though
wint_t is not normally provided by <stddef.h>. 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 */