Problem reported by Jim Meyering (Bug#24826).
* tests/timestamp: Add a test from Jim Meyering to exercise the fix
* zip.c (zip): Treat unknown time stamps as 0.
test $? = 2 || fail=1
}
+# Ensure that --no-name does not provoke a time stamp warning.
+: | gzip --no-name > k || fail=1
+
Exit $fail
flags |= ORIG_NAME;
}
put_byte(flags); /* general flags */
- if (0 < time_stamp.tv_sec && time_stamp.tv_sec <= 0xffffffff)
+ if (time_stamp.tv_nsec < 0)
+ stamp = 0;
+ else if (0 < time_stamp.tv_sec && time_stamp.tv_sec <= 0xffffffff)
stamp = time_stamp.tv_sec;
else
{