unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Leo <sdl.web@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Paul Eggert <eggert@cs.ucla.edu>, emacs-devel@gnu.org
Subject: Re: Move sha1 to C?
Date: Tue, 24 May 2011 02:14:04 +0800	[thread overview]
Message-ID: <m1sjs55loz.fsf@th041094.ip.tsinghua.edu.cn> (raw)
In-Reply-To: <jwv4o4lmskc.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Mon, 23 May 2011 10:57:25 -0300")

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




  reply	other threads:[~2011-05-23 18:14 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-21  6:37 Move sha1 to C? Leo
2011-05-22 19:04 ` Stefan Monnier
2011-05-22 20:02   ` Leo
2011-05-23  1:23     ` Stefan Monnier
2011-05-23  8:44       ` Leo
2011-05-23 12:04         ` Stefan Monnier
2011-05-23 13:21           ` Leo
2011-05-23 13:27             ` Stefan Monnier
2011-05-23 13:34               ` Leo
2011-05-23 13:57                 ` Stefan Monnier
2011-05-23 18:14                   ` Leo [this message]
2011-05-23 19:15                     ` Stefan Monnier
2011-05-23 22:10                     ` Paul Eggert
2011-05-24  4:09                       ` Leo
2011-05-24 10:01                         ` Eli Zaretskii
2011-05-24 14:24                           ` Leo
2011-05-24 22:01                           ` Richard Stallman
2011-05-24  5:09                       ` Thien-Thi Nguyen
2011-05-23 14:30                 ` Eli Zaretskii
2011-05-23 17:47                   ` Leo
2011-05-23 18:12                     ` Eli Zaretskii
2011-05-23 18:23                       ` Leo
2011-05-23 19:21                         ` Eli Zaretskii
2011-05-23  7:21     ` Eli Zaretskii
2011-05-23  8:30       ` Leo
2011-05-23 15:27         ` Chong Yidong
2011-05-23 17:14           ` Leo
2011-05-23 17:38       ` Leo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m1sjs55loz.fsf@th041094.ip.tsinghua.edu.cn \
    --to=sdl.web@gmail.com \
    --cc=eggert@cs.ucla.edu \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).