[前][次][番号順一覧][スレッド一覧]

ruby-changes:41711

From: zzak <ko1@a...>
Date: Tue, 9 Feb 2016 14:33:26 +0900 (JST)
Subject: [ruby-changes:41711] zzak:r53785 (trunk): * ext/zlib/zlib.c: Document mtime header behavior with patch by @schneems

zzak	2016-02-09 14:33:35 +0900 (Tue, 09 Feb 2016)

  New Revision: 53785

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=53785

  Log:
    * ext/zlib/zlib.c: Document mtime header behavior with patch by @schneems
      Fixes [GH-1129]: https://github.com/ruby/ruby/pull/1129

  Modified files:
    trunk/ChangeLog
    trunk/ext/zlib/zlib.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 53784)
+++ ChangeLog	(revision 53785)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Tue Feb  9 14:32:23 2016  Zachary Scott  <zzak@r...>
+
+	* ext/zlib/zlib.c: Document mtime header behavior with patch by @schneems
+	  Fixes [GH-1129]: https://github.com/ruby/ruby/pull/1129
+
 Tue Feb  9 13:52:49 2016  Zachary Scott  <zzak@r...>
 
 	* re.c: Remove deprecated kcode argument from Regexp.new and compile
Index: ext/zlib/zlib.c
===================================================================
--- ext/zlib/zlib.c	(revision 53784)
+++ ext/zlib/zlib.c	(revision 53785)
@@ -3221,7 +3221,20 @@ rb_gzfile_set_lineno(VALUE obj, VALUE li https://github.com/ruby/ruby/blob/trunk/ext/zlib/zlib.c#L3221
  * Document-method: Zlib::GzipWriter#mtime=
  *
  * Specify the modification time (+mtime+) in the gzip header.
- * Using a Fixnum or Integer
+ * Using a Fixnum or Integer.
+ *
+ * Setting the mtime in the gzip header does not effect the
+ * mtime of the file generated. Different utilities that
+ * expand the gzipped files may use the mtime
+ * header. For example the gunzip utility can use the `-N`
+ * flag which will set the resultant file's mtime to the
+ * value in the header. By default many tools will set
+ * the mtime of the expanded file to the mtime of the
+ * gzipped file, not the mtime in the header.
+ *
+ * If you do not set an mtime, the default value will be the time
+ * when compression started. Setting a value of 0 indicates
+ * no time stamp is available.
  */
 static VALUE
 rb_gzfile_set_mtime(VALUE obj, VALUE mtime)

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]