]> sjero.net Git - wget/commitdiff
Update md5/.
authorMicah Cowan <micah@cowan.name>
Fri, 4 Sep 2009 16:41:51 +0000 (09:41 -0700)
committerMicah Cowan <micah@cowan.name>
Fri, 4 Sep 2009 16:41:51 +0000 (09:41 -0700)
12 files changed:
.hgignore
ChangeLog
lib/Makefile.am
m4/gnulib-cache.m4
md5/Makefile.am
md5/m4/gnulib-cache.m4
md5/m4/gnulib-comp.m4
md5/m4/stddef_h.m4 [new file with mode: 0644]
md5/m4/wchar.m4
md5/m4/wchar_t.m4 [new file with mode: 0644]
md5/md5.h
md5/stddef.in.h [new file with mode: 0644]

index f21afadeb8bedd7316f979a1be559a00654fa45d..f1c89deb6a24e49c6eeb5d2a25d176f422c48e14 100644 (file)
--- 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
index 5e3823b29ba2299cc3cd4a611f8fb1b1b4e745f9..89104ebdd2c626ffa2e3b23e3c6eb1d3fe27275a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2009-09-04  Micah Cowan  <micah@cowan.name>
-       
+
+       * md5/*: Updated md5 from gnulib.
+
        * configure.ac: Configured build-aux/ as auxiliarry directory.
 
        * build-aux/compile, build-aux/config.guess,
index ba8029a120fa2bca44fab9455b3de00c59b003e2..051636988d3fc4d1b1ffd7f7905e2600fdabe682 100644 (file)
@@ -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
 
index 56ec1b0540269c37f1322c509ec2d0f8cb5a8088..bfcbea786a57ffc77bcb5474b90fc47d1556de13 100644 (file)
@@ -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([])
index f1001341e6fb27a55a3cad8b86fb53ad4dd7c224..5a3312ffbf5361e84b72565d3bc64d7530cad363 100644 (file)
@@ -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 <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
 
 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
 # 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 <wchar.h> 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
 
index b0872afd2056ca1a83006fcfea18edcd6512f4bb..8a5d1f2e7b7b1d33a11d56275aed3d1b4b0986b4 100644 (file)
@@ -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([])
index 24cf478a8aefeb0f995c24f8f1a87a1ede34ff4c..1b6f3e80a84b1d6e7ba540bd060d3c05733323db 100644 (file)
@@ -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 (file)
index 0000000..682e9c6
--- /dev/null
@@ -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])
+])
index 2e52a82acfb9a94e00ca1ef12729f3294995f64b..ce53a45cf5c4a8481933f2307f3e44f7a90ba0d4 100644 (file)
@@ -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 <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
   fi
 
diff --git a/md5/m4/wchar_t.m4 b/md5/m4/wchar_t.m4
new file mode 100644 (file)
index 0000000..fb27a7f
--- /dev/null
@@ -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
+])
index a3f413b85cc97d290cb9760376571710b005762a..3999b9a50cf6c96a8a59babc1c8c196bbcedcb68 100644 (file)
--- 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
 # 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 (file)
index 0000000..aff3b94
--- /dev/null
@@ -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 */