| OLD | NEW |
| 1 diff --git a/configure b/configure | 1 diff --git a/configure b/configure |
| 2 index 466a189..3b1fe44 100755 | 2 index 466a189..3b1fe44 100755 |
| 3 --- a/configure | 3 --- a/configure |
| 4 +++ b/configure | 4 +++ b/configure |
| 5 @@ -2602,8 +2602,8 @@ cat >>confdefs.h <<\_ACEOF | 5 @@ -2602,8 +2602,8 @@ cat >>confdefs.h <<\_ACEOF |
| 6 #define HAVE_STRLCPY 1 | 6 #define HAVE_STRLCPY 1 |
| 7 _ACEOF | 7 _ACEOF |
| 8 | 8 |
| 9 -else | 9 -else |
| 10 - LIBOBJS="$LIBOBJS strlcpy.$ac_objext" | 10 - LIBOBJS="$LIBOBJS strlcpy.$ac_objext" |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 gr = getgrgid(gid); | 94 gr = getgrgid(gid); |
| 95 @@ -176,6 +179,7 @@ th_set_group(TAR *t, gid_t gid) | 95 @@ -176,6 +179,7 @@ th_set_group(TAR *t, gid_t gid) |
| 96 strlcpy(t->th_buf.gname, gr->gr_name, sizeof(t->th_buf.gname)); | 96 strlcpy(t->th_buf.gname, gr->gr_name, sizeof(t->th_buf.gname)); |
| 97 | 97 |
| 98 int_to_oct(gid, t->th_buf.gid, 8); | 98 int_to_oct(gid, t->th_buf.gid, 8); |
| 99 +#endif | 99 +#endif |
| 100 } | 100 } |
| 101 | 101 |
| 102 | 102 |
| 103 diff --git a/lib/extract.c b/lib/extract.c | 103 diff --git a/lib/extract.c b/lib/extract.c |
| 104 index 6bbb801..4ae276d 100644 | 104 index 6bbb801..2d8b571 100644 |
| 105 --- a/lib/extract.c | 105 --- a/lib/extract.c |
| 106 +++ b/lib/extract.c | 106 +++ b/lib/extract.c |
| 107 @@ -28,6 +28,22 @@ | 107 @@ -28,6 +28,22 @@ |
| 108 #endif | 108 #endif |
| 109 | 109 |
| 110 | 110 |
| 111 +#if defined(__native_client__) && defined(_NEWLIB_VERSION) | 111 +#if defined(__native_client__) && defined(_NEWLIB_VERSION) |
| 112 +struct group *getgrgid(gid_t gid) { | 112 +struct group *getgrgid(gid_t gid) { |
| 113 + errno = ENOSYS; | 113 + errno = ENOSYS; |
| 114 + return NULL; | 114 + return NULL; |
| 115 +} | 115 +} |
| 116 + | 116 + |
| 117 +int major(dev_t dev) { | 117 +int major(dev_t dev) { |
| 118 + return 0; | 118 + return 0; |
| 119 +} | 119 +} |
| 120 + | 120 + |
| 121 +int minor(dev_t dev) { | 121 +int minor(dev_t dev) { |
| 122 + return 0; | 122 + return 0; |
| 123 +} | 123 +} |
| 124 +#endif | 124 +#endif |
| 125 + | 125 + |
| 126 + | 126 + |
| 127 struct linkname | 127 struct linkname |
| 128 { | 128 { |
| 129 char ln_save[MAXPATHLEN]; | 129 char ln_save[MAXPATHLEN]; |
| 130 @@ -117,6 +133,7 @@ tar_extract_file(TAR *t, char *realname) | 130 @@ -74,10 +90,17 @@ tar_set_file_perms(TAR *t, char *realname) |
| 131 » /* change access/modification time */ |
| 132 » if (!TH_ISSYM(t) && utime(filename, &ut) == -1) |
| 133 » { |
| 134 + /* TODO(bradnelson): Remove this when all mounts support utime. */ |
| 135 +#if !defined(__native_client__) |
| 136 + if (errno != ENOSYS && errno != EINVAL) { |
| 137 +#endif |
| 138 #ifdef DEBUG |
| 139 » » perror("utime()"); |
| 140 #endif |
| 141 » » return -1; |
| 142 +#if !defined(__native_client__) |
| 143 + } |
| 144 +#endif |
| 145 » } |
| 146 |
| 147 » /* change permissions */ |
| 148 @@ -117,6 +140,7 @@ tar_extract_file(TAR *t, char *realname) |
| 131 if (i == 1) | 149 if (i == 1) |
| 132 i = 0; | 150 i = 0; |
| 133 } | 151 } |
| 134 +#ifndef __native_client__ | 152 +#ifndef __native_client__ |
| 135 else if (TH_ISLNK(t)) | 153 else if (TH_ISLNK(t)) |
| 136 i = tar_extract_hardlink(t, realname); | 154 i = tar_extract_hardlink(t, realname); |
| 137 else if (TH_ISSYM(t)) | 155 else if (TH_ISSYM(t)) |
| 138 @@ -127,6 +144,7 @@ tar_extract_file(TAR *t, char *realname) | 156 @@ -127,6 +151,7 @@ tar_extract_file(TAR *t, char *realname) |
| 139 i = tar_extract_blockdev(t, realname); | 157 i = tar_extract_blockdev(t, realname); |
| 140 else if (TH_ISFIFO(t)) | 158 else if (TH_ISFIFO(t)) |
| 141 i = tar_extract_fifo(t, realname); | 159 i = tar_extract_fifo(t, realname); |
| 142 +#endif | 160 +#endif |
| 143 else /* if (TH_ISREG(t)) */ | 161 else /* if (TH_ISREG(t)) */ |
| 144 i = tar_extract_regfile(t, realname); | 162 i = tar_extract_regfile(t, realname); |
| 145 | 163 |
| 146 @@ -282,6 +300,7 @@ tar_skip_regfile(TAR *t) | 164 @@ -282,6 +307,7 @@ tar_skip_regfile(TAR *t) |
| 147 } | 165 } |
| 148 | 166 |
| 149 | 167 |
| 150 +#ifndef __native_client__ | 168 +#ifndef __native_client__ |
| 151 /* hardlink */ | 169 /* hardlink */ |
| 152 int | 170 int |
| 153 tar_extract_hardlink(TAR * t, char *realname) | 171 tar_extract_hardlink(TAR * t, char *realname) |
| 154 @@ -436,6 +455,7 @@ tar_extract_blockdev(TAR *t, char *realname) | 172 @@ -436,6 +462,7 @@ tar_extract_blockdev(TAR *t, char *realname) |
| 155 | 173 |
| 156 return 0; | 174 return 0; |
| 157 } | 175 } |
| 158 +#endif | 176 +#endif |
| 159 | 177 |
| 160 | 178 |
| 161 /* directory */ | 179 /* directory */ |
| 162 @@ -493,6 +513,7 @@ tar_extract_dir(TAR *t, char *realname) | 180 @@ -493,6 +520,7 @@ tar_extract_dir(TAR *t, char *realname) |
| 163 } | 181 } |
| 164 | 182 |
| 165 | 183 |
| 166 +#ifndef __native_client__ | 184 +#ifndef __native_client__ |
| 167 /* FIFO */ | 185 /* FIFO */ |
| 168 int | 186 int |
| 169 tar_extract_fifo(TAR *t, char *realname) | 187 tar_extract_fifo(TAR *t, char *realname) |
| 170 @@ -525,5 +546,6 @@ tar_extract_fifo(TAR *t, char *realname) | 188 @@ -525,5 +553,6 @@ tar_extract_fifo(TAR *t, char *realname) |
| 171 | 189 |
| 172 return 0; | 190 return 0; |
| 173 } | 191 } |
| 174 +#endif | 192 +#endif |
| 175 | 193 |
| 176 | 194 |
| 177 diff --git a/lib/output.c b/lib/output.c | 195 diff --git a/lib/output.c b/lib/output.c |
| 178 index a2db929..e645db5 100644 | 196 index a2db929..e645db5 100644 |
| 179 --- a/lib/output.c | 197 --- a/lib/output.c |
| 180 +++ b/lib/output.c | 198 +++ b/lib/output.c |
| (...skipping 26 matching lines...) Expand all Loading... |
| 207 +++ b/libtar/Makefile.in | 225 +++ b/libtar/Makefile.in |
| 208 @@ -16,7 +16,7 @@ PACKAGE_VERSION = @PACKAGE_VERSION@ | 226 @@ -16,7 +16,7 @@ PACKAGE_VERSION = @PACKAGE_VERSION@ |
| 209 | 227 |
| 210 ### Installation programs and flags | 228 ### Installation programs and flags |
| 211 INSTALL = @INSTALL@ | 229 INSTALL = @INSTALL@ |
| 212 -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -s | 230 -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -s |
| 213 +INSTALL_PROGRAM = @INSTALL_PROGRAM@ | 231 +INSTALL_PROGRAM = @INSTALL_PROGRAM@ |
| 214 INSTALL_DATA = @INSTALL_DATA@ | 232 INSTALL_DATA = @INSTALL_DATA@ |
| 215 LN_S = @LN_S@ | 233 LN_S = @LN_S@ |
| 216 MKDIR = @MKDIR@ | 234 MKDIR = @MKDIR@ |
| OLD | NEW |