Adjust better to Gnulib signed-int read changes
The 2024-08-09 Gnulib changes that caused some modules prefer signed types to size_t means that Tar should follow suit. * src/buffer.c (short_read): * src/system.c (sys_child_open_for_compress) (sys_child_open_for_uncompress): rmtread and safe_read return ptrdiff_t not idx_t; don’t rely on implementation defined conversion. * src/misc.c (blocking_read): Never return a negative number. Return idx_t, not ptrdiff_t, with the same convention for EOF and error as the new full_read. All callers changed. * src/sparse.c (sparse_dump_region, check_sparse_region) (check_data_region): * src/update.c (append_file): full_read no longer returns SAFE_READ_ERROR for I/O error; instead it returns the number of bytes successfully read, and sets errno. Adjust to this. * src/system.c (sys_child_open_for_uncompress): Rewrite to avoid need for goto and label.
This commit is contained in:
@@ -731,7 +731,7 @@ void undo_last_backup (void);
|
||||
|
||||
int deref_stat (char const *name, struct stat *buf);
|
||||
|
||||
ptrdiff_t blocking_read (int fd, void *buf, idx_t count);
|
||||
idx_t blocking_read (int fd, void *buf, idx_t count);
|
||||
idx_t blocking_write (int fd, void const *buf, idx_t count);
|
||||
|
||||
extern idx_t chdir_current;
|
||||
|
||||
Reference in New Issue
Block a user