[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Move sha1 to C?
From: |
Leo |
Subject: |
Re: Move sha1 to C? |
Date: |
Tue, 24 May 2011 02:14:04 +0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.3.50 (Mac OS X 10.6.7) |
CC'd Paul for help.
On 2011-05-23 21:57 +0800, Stefan Monnier wrote:
[snipped 26 lines]
> Since these all seem to be related to the addition of the sha1 module
> from gnulib (as opposed to being unrelated changes brought in by the
> "sync with latest gnulib" that happened as a side-effect), I'd include
> them in the commit in the normal way (i.e. more or less as if you'd
> done those changes by hand, tho the ChangeLog can be a bit more concise).
>
>
> Stefan
I run gnulib-tool on OSX and get tons of lines such as:
sed: 1: "/^ *unistd *$/{s/^.*$/t ...": bad flag in substitute command: '}'
../gnulib/gnulib-tool: line 801: printf: write error: Broken pipe
In addition, the auto-generated files seem to have changes unrelated to
sha1 (see the example attached to the end).
What to do?
Leo
=== modified file 'lib/gnulib.mk'
--- lib/gnulib.mk 2011-05-18 00:39:40 +0000
+++ lib/gnulib.mk 2011-05-23 07:22:44 +0000
@@ -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=.
--makefile-name=gnulib.mk --no-libtool --macro-prefix=gl --no-vc-files
careadlinkat crypto/md5 dtoastr filemode getloadavg getopt-gnu ignore-value
intprops lstat mktime readlink socklen stdarg stdio strftime strtoumax symlink
sys_stat
+# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib
--m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=.
--makefile-name=gnulib.mk --no-libtool --macro-prefix=gl --no-vc-files
careadlinkat crypto/md5 crypto/sha1 dtoastr filemode getloadavg getopt-gnu
ignore-value intprops lstat mktime readlink socklen stdarg stdio strftime
strtoumax symlink sys_stat
MOSTLYCLEANFILES += core *.stackdump
@@ -94,11 +94,18 @@
## end gnulib module crypto/md5
+## begin gnulib module crypto/sha1
+
+
+EXTRA_DIST += sha1.c sha1.h
+
+EXTRA_libgnu_a_SOURCES += sha1.c
+
+## end gnulib module crypto/sha1
+
## begin gnulib module dosname
-if gl_GNULIB_ENABLED_dosname
-endif
EXTRA_DIST += dosname.h
## end gnulib module dosname
@@ -159,10 +166,8 @@
## begin gnulib module gettext-h
-if gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36
libgnu_a_SOURCES += gettext.h
-endif
## end gnulib module gettext-h
## begin gnulib module ignore-value
@@ -250,9 +255,7 @@
## begin gnulib module stat
-if gl_GNULIB_ENABLED_stat
-endif
EXTRA_DIST += stat.c
EXTRA_libgnu_a_SOURCES += stat.c
@@ -610,9 +613,7 @@
## begin gnulib module strtoull
-if gl_GNULIB_ENABLED_strtoull
-endif
EXTRA_DIST += strtol.c strtoul.c strtoull.c
EXTRA_libgnu_a_SOURCES += strtol.c strtoul.c strtoull.c
@@ -885,9 +886,7 @@
## begin gnulib module verify
-if gl_GNULIB_ENABLED_verify
-endif
EXTRA_DIST += verify.h
## end gnulib module verify
=== modified file 'm4/gl-comp.m4'
--- m4/gl-comp.m4 2011-05-04 07:19:21 +0000
+++ m4/gl-comp.m4 2011-05-23 18:01:16 +0000
@@ -31,6 +31,7 @@
# Code from module c++defs:
# Code from module careadlinkat:
# Code from module crypto/md5:
+ # Code from module crypto/sha1:
# Code from module dosname:
# Code from module dtoastr:
# Code from module extensions:
@@ -92,6 +93,7 @@
gl_source_base='lib'
AC_CHECK_FUNCS_ONCE([readlinkat])
gl_MD5
+gl_SHA1
AC_REQUIRE([gl_C99_STRTOLD])
gl_FILEMODE
gl_GETLOADAVG([$gl_source_base])
@@ -99,6 +101,8 @@
gl_FUNC_GETOPT_GNU
gl_MODULE_INDICATOR_FOR_TESTS([getopt-gnu])
gl_FUNC_GETOPT_POSIX
+AC_SUBST([LIBINTL])
+AC_SUBST([LTLIBINTL])
AC_REQUIRE([AC_C_INLINE])
gl_INTTYPES_INCOMPLETE
gl_FUNC_LSTAT
@@ -110,6 +114,8 @@
gl_UNISTD_MODULE_INDICATOR([readlink])
gl_TYPE_SOCKLEN_T
gt_TYPE_SSIZE_T
+gl_FUNC_STAT
+gl_SYS_STAT_MODULE_INDICATOR([stat])
gl_STDARG_H
AM_STDBOOL_H
gl_STDDEF_H
@@ -117,6 +123,8 @@
gl_STDIO_H
gl_STDLIB_H
gl_FUNC_GNU_STRFTIME
+gl_FUNC_STRTOULL
+gl_STDLIB_MODULE_INDICATOR([strtoull])
gl_FUNC_STRTOUMAX
gl_INTTYPES_MODULE_INDICATOR([strtoumax])
gl_FUNC_SYMLINK
@@ -127,74 +135,7 @@
gl_TIME_R
gl_TIME_MODULE_INDICATOR([time_r])
gl_UNISTD_H
- gl_gnulib_enabled_dosname=false
- gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=false
- gl_gnulib_enabled_stat=false
- gl_gnulib_enabled_strtoull=false
- gl_gnulib_enabled_verify=false
- func_gl_gnulib_m4code_dosname ()
- {
- if ! $gl_gnulib_enabled_dosname; then
- gl_gnulib_enabled_dosname=true
- fi
- }
- func_gl_gnulib_m4code_be453cec5eecf5731a274f2de7f2db36 ()
- {
- if ! $gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36; then
-AC_SUBST([LIBINTL])
-AC_SUBST([LTLIBINTL])
- gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=true
- fi
- }
- func_gl_gnulib_m4code_stat ()
- {
- if ! $gl_gnulib_enabled_stat; then
-gl_FUNC_STAT
-gl_SYS_STAT_MODULE_INDICATOR([stat])
- gl_gnulib_enabled_stat=true
- if $condition; then
- func_gl_gnulib_m4code_dosname
- fi
- fi
- }
- func_gl_gnulib_m4code_strtoull ()
- {
- if ! $gl_gnulib_enabled_strtoull; then
-gl_FUNC_STRTOULL
-gl_STDLIB_MODULE_INDICATOR([strtoull])
- gl_gnulib_enabled_strtoull=true
- fi
- }
- func_gl_gnulib_m4code_verify ()
- {
- if ! $gl_gnulib_enabled_verify; then
- gl_gnulib_enabled_verify=true
- fi
- }
- if test $GNULIB_UNISTD_H_GETOPT = 1; then
- func_gl_gnulib_m4code_be453cec5eecf5731a274f2de7f2db36
- fi
- if test $REPLACE_LSTAT = 1; then
- func_gl_gnulib_m4code_dosname
- fi
- if test $REPLACE_LSTAT = 1; then
- func_gl_gnulib_m4code_stat
- fi
- if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
- func_gl_gnulib_m4code_stat
- fi
- if test "$ac_cv_have_decl_strtoumax" != yes && test $ac_cv_func_strtoumax =
no; then
- func_gl_gnulib_m4code_verify
- fi
- if test "$ac_cv_have_decl_strtoumax" != yes && test $ac_cv_func_strtoumax =
no && test $ac_cv_type_unsigned_long_long_int = yes; then
- func_gl_gnulib_m4code_strtoull
- fi
m4_pattern_allow([^gl_GNULIB_ENABLED_])
- AM_CONDITIONAL([gl_GNULIB_ENABLED_dosname], [$gl_gnulib_enabled_dosname])
- AM_CONDITIONAL([gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36],
[$gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36])
- AM_CONDITIONAL([gl_GNULIB_ENABLED_stat], [$gl_gnulib_enabled_stat])
- AM_CONDITIONAL([gl_GNULIB_ENABLED_strtoull], [$gl_gnulib_enabled_strtoull])
- AM_CONDITIONAL([gl_GNULIB_ENABLED_verify], [$gl_gnulib_enabled_verify])
# End of code from modules
m4_ifval(gl_LIBSOURCES_LIST, [
m4_syscmd([test ! -d ]m4_defn([gl_LIBSOURCES_DIR])[ ||
@@ -364,6 +305,8 @@
lib/mktime-internal.h
lib/mktime.c
lib/readlink.c
+ lib/sha1.c
+ lib/sha1.h
lib/stat.c
lib/stdarg.in.h
lib/stdbool.in.h
@@ -399,6 +342,7 @@
m4/mktime.m4
m4/multiarch.m4
m4/readlink.m4
+ m4/sha1.m4
m4/socklen.m4
m4/ssize_t.m4
m4/st_dm_mode.m4
- Move sha1 to C?, Leo, 2011/05/21
- Re: Move sha1 to C?, Stefan Monnier, 2011/05/22
- Re: Move sha1 to C?, Leo, 2011/05/22
- Re: Move sha1 to C?, Stefan Monnier, 2011/05/22
- Re: Move sha1 to C?, Leo, 2011/05/23
- Re: Move sha1 to C?, Stefan Monnier, 2011/05/23
- Re: Move sha1 to C?, Leo, 2011/05/23
- Re: Move sha1 to C?, Stefan Monnier, 2011/05/23
- Re: Move sha1 to C?, Leo, 2011/05/23
- Re: Move sha1 to C?, Stefan Monnier, 2011/05/23
- Re: Move sha1 to C?,
Leo <=
- Re: Move sha1 to C?, Stefan Monnier, 2011/05/23
- Re: Move sha1 to C?, Paul Eggert, 2011/05/23
- Re: Move sha1 to C?, Leo, 2011/05/24
- Re: Move sha1 to C?, Eli Zaretskii, 2011/05/24
- Re: Move sha1 to C?, Leo, 2011/05/24
- Re: Move sha1 to C?, Richard Stallman, 2011/05/24
- Re: Move sha1 to C?, Thien-Thi Nguyen, 2011/05/24
- Re: Move sha1 to C?, Eli Zaretskii, 2011/05/23
- Re: Move sha1 to C?, Leo, 2011/05/23
- Re: Move sha1 to C?, Eli Zaretskii, 2011/05/23