Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(533)

Side by Side Diff: ports/tar/nacl.patch

Issue 550423003: Ignore utime errors for until we restore old behavior for tar + libtar. (Closed) Base URL: https://chromium.googlesource.com/external/naclports.git@master
Patch Set: fix Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ports/libtar/nacl.patch ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 diff --git a/lib/mktime.c b/lib/mktime.c 1 diff --git a/lib/mktime.c b/lib/mktime.c
2 index 16f5b9a..63d7cb1 100644 2 index 16f5b9a..63d7cb1 100644
3 --- a/lib/mktime.c 3 --- a/lib/mktime.c
4 +++ b/lib/mktime.c 4 +++ b/lib/mktime.c
5 @@ -141,8 +141,11 @@ ydhms_diff (long int year1, long int yday1, int hour1, int min1, int sec1, 5 @@ -141,8 +141,11 @@ ydhms_diff (long int year1, long int yday1, int hour1, int min1, int sec1,
6 int year0, int yday0, int hour0, int min0, int sec0) 6 int year0, int yday0, int hour0, int min0, int sec0)
7 { 7 {
8 verify (C99_integer_division, -1 / 2 == 0); 8 verify (C99_integer_division, -1 / 2 == 0);
9 + /* This check looks simply wrong. tar-1.27.1 does not have this check. */ 9 + /* This check looks simply wrong. tar-1.27.1 does not have this check. */
10 +#if !defined(__native_client__) 10 +#if !defined(__native_client__)
11 verify (long_int_year_and_yday_are_wide_enough, 11 verify (long_int_year_and_yday_are_wide_enough,
12 INT_MAX <= LONG_MAX / 2 || TIME_T_MAX <= UINT_MAX); 12 INT_MAX <= LONG_MAX / 2 || TIME_T_MAX <= UINT_MAX);
13 +#endif 13 +#endif
14 14
15 /* Compute intervening leap days correctly even if year is negative. 15 /* Compute intervening leap days correctly even if year is negative.
16 Take care to avoid integer overflow here. */ 16 Take care to avoid integer overflow here. */
17 diff --git a/src/Makefile.in b/src/Makefile.in 17 diff --git a/src/Makefile.in b/src/Makefile.in
18 index 86de4cc..64eeb01 100644 18 index 86de4cc..64eeb01 100644
19 --- a/src/Makefile.in 19 --- a/src/Makefile.in
20 +++ b/src/Makefile.in 20 +++ b/src/Makefile.in
21 @@ -178,7 +178,7 @@ LDFLAGS = @LDFLAGS@ 21 @@ -178,7 +178,7 @@ LDFLAGS = @LDFLAGS@
22 LIBICONV = @LIBICONV@ 22 LIBICONV = @LIBICONV@
23 LIBINTL = @LIBINTL@ 23 LIBINTL = @LIBINTL@
24 LIBOBJS = @LIBOBJS@ 24 LIBOBJS = @LIBOBJS@
25 -LIBS = @LIBS@ 25 -LIBS = @LIBS@
26 +LIBS = @LIBS@ $(EXTRA_LIBS) 26 +LIBS = @LIBS@ $(EXTRA_LIBS)
27 LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@ 27 LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
28 LIB_SETSOCKOPT = @LIB_SETSOCKOPT@ 28 LIB_SETSOCKOPT = @LIB_SETSOCKOPT@
29 LTLIBICONV = @LTLIBICONV@ 29 LTLIBICONV = @LTLIBICONV@
30 diff --git a/src/extract.c b/src/extract.c
31 index f348b82..e536c05 100644
32 --- a/src/extract.c
33 +++ b/src/extract.c
34 @@ -255,6 +255,14 @@ set_stat (char const *file_name,
35
36 utimbuf.modtime = stat_info->st_mtime;
37
38 + /* TODO(bradnelson): Remove this when all mounts handle utime. */
39 +#if defined(__native_client__)
40 + if (utime (file_name, &utimbuf) < 0) {
41 + if (errno != ENOSYS && errno != EINVAL) {
42 + utime_error (file_name);
43 + }
44 + }
45 +#else
46 if (utime (file_name, &utimbuf) < 0)
47 utime_error (file_name);
48 else
49 @@ -262,6 +270,7 @@ set_stat (char const *file_name,
50 check_time (file_name, utimbuf.actime);
51 check_time (file_name, utimbuf.modtime);
52 }
53 +#endif
54 }
55
56 /* Some systems allow non-root users to give files away. Once this
30 diff --git a/src/tar.c b/src/tar.c 57 diff --git a/src/tar.c b/src/tar.c
31 index 31d7d30..eec331e 100644 58 index 31d7d30..eec331e 100644
32 --- a/src/tar.c 59 --- a/src/tar.c
33 +++ b/src/tar.c 60 +++ b/src/tar.c
34 @@ -37,6 +37,7 @@ 61 @@ -37,6 +37,7 @@
35 #include "common.h" 62 #include "common.h"
36 63
37 #include <getdate.h> 64 #include <getdate.h>
38 +#include <locale.h> 65 +#include <locale.h>
39 #include <localedir.h> 66 #include <localedir.h>
40 #include <rmt.h> 67 #include <rmt.h>
41 #include <prepargs.h> 68 #include <prepargs.h>
42 @@ -1617,7 +1618,7 @@ decode_options (int argc, char **argv) 69 @@ -1617,7 +1618,7 @@ decode_options (int argc, char **argv)
43 70
44 /* Main routine for tar. */ 71 /* Main routine for tar. */
45 int 72 int
46 -main (int argc, char **argv) 73 -main (int argc, char **argv)
47 +nacl_main (int argc, char **argv) 74 +nacl_main (int argc, char **argv)
48 { 75 {
49 set_start_time (); 76 set_start_time ();
50 program_name = argv[0]; 77 program_name = argv[0];
OLDNEW
« no previous file with comments | « ports/libtar/nacl.patch ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698