|
|
|
@ -1,6 +1,6 @@
|
|
|
|
|
Index: configure
|
|
|
|
|
--- configure.orig 2019-02-20 16:19:07.000000000 +0100
|
|
|
|
|
+++ configure 2019-02-23 09:55:13.954138000 +0100
|
|
|
|
|
--- configure.orig 2019-05-17 04:27:45.000000000 +0200
|
|
|
|
|
+++ configure 2019-05-17 07:57:58.610495000 +0200
|
|
|
|
|
@@ -3354,7 +3354,7 @@
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
@ -12,7 +12,7 @@ Index: configure
|
|
|
|
|
if test x$fsect = x5; then
|
|
|
|
|
Index: src/apprentice.c
|
|
|
|
|
--- src/apprentice.c.orig 2019-02-20 03:35:27.000000000 +0100
|
|
|
|
|
+++ src/apprentice.c 2019-02-23 09:55:13.954530000 +0100
|
|
|
|
|
+++ src/apprentice.c 2019-05-17 07:57:58.610870000 +0200
|
|
|
|
|
@@ -1303,7 +1303,7 @@
|
|
|
|
|
for (i = 0; i < nme; i++)
|
|
|
|
|
mentrycount += me[i].cont_count;
|
|
|
|
@ -23,9 +23,9 @@ Index: src/apprentice.c
|
|
|
|
|
file_oomem(ms, slen);
|
|
|
|
|
return -1;
|
|
|
|
|
Index: src/compress.c
|
|
|
|
|
--- src/compress.c.orig 2019-02-20 03:35:27.000000000 +0100
|
|
|
|
|
+++ src/compress.c 2019-02-23 09:56:24.385273000 +0100
|
|
|
|
|
@@ -338,7 +338,7 @@
|
|
|
|
|
--- src/compress.c.orig 2019-05-07 04:27:11.000000000 +0200
|
|
|
|
|
+++ src/compress.c 2019-05-17 08:01:23.118814000 +0200
|
|
|
|
|
@@ -350,7 +350,7 @@
|
|
|
|
|
* `safe' read for sockets and pipes.
|
|
|
|
|
*/
|
|
|
|
|
protected ssize_t
|
|
|
|
@ -34,7 +34,7 @@ Index: src/compress.c
|
|
|
|
|
{
|
|
|
|
|
ssize_t rv;
|
|
|
|
|
#ifdef FIONREAD
|
|
|
|
|
@@ -439,7 +439,7 @@
|
|
|
|
|
@@ -451,7 +451,7 @@
|
|
|
|
|
if (swrite(tfd, startbuf, nbytes) != CAST(ssize_t, nbytes))
|
|
|
|
|
r = 1;
|
|
|
|
|
else {
|
|
|
|
@ -43,13 +43,13 @@ Index: src/compress.c
|
|
|
|
|
if (swrite(tfd, buf, CAST(size_t, r)) != r)
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
@@ -746,14 +746,14 @@
|
|
|
|
|
goto err;
|
|
|
|
|
}
|
|
|
|
|
rv = OKDATA;
|
|
|
|
|
- if ((r = sread(fdp[STDOUT_FILENO][0], *newch, bytes_max, 0)) > 0)
|
|
|
|
|
+ if ((r = file_sread(fdp[STDOUT_FILENO][0], *newch, bytes_max, 0)) > 0)
|
|
|
|
|
break;
|
|
|
|
|
@@ -775,14 +775,14 @@
|
|
|
|
|
goto err;
|
|
|
|
|
}
|
|
|
|
|
rv = OKDATA;
|
|
|
|
|
- r = sread(fdp[STDOUT_FILENO][0], *newch, bytes_max, 0);
|
|
|
|
|
+ r = file_sread(fdp[STDOUT_FILENO][0], *newch, bytes_max, 0);
|
|
|
|
|
if (r <= 0) {
|
|
|
|
|
DPRINTF("Read stdout failed %d (%s)\n", fdp[STDOUT_FILENO][0],
|
|
|
|
|
r != -1 ? strerror(errno) : "no data");
|
|
|
|
|
|
|
|
|
@ -59,11 +59,11 @@ Index: src/compress.c
|
|
|
|
|
+ (r = file_sread(fdp[STDERR_FILENO][0], *newch, bytes_max, 0)) > 0)
|
|
|
|
|
{
|
|
|
|
|
r = filter_error(*newch, r);
|
|
|
|
|
break;
|
|
|
|
|
goto ok;
|
|
|
|
|
Index: src/file.h
|
|
|
|
|
--- src/file.h.orig 2019-02-20 03:32:11.000000000 +0100
|
|
|
|
|
+++ src/file.h 2019-02-23 09:55:13.954945000 +0100
|
|
|
|
|
@@ -500,7 +500,7 @@
|
|
|
|
|
--- src/file.h.orig 2019-05-07 04:27:11.000000000 +0200
|
|
|
|
|
+++ src/file.h 2019-05-17 07:57:58.611273000 +0200
|
|
|
|
|
@@ -501,7 +501,7 @@
|
|
|
|
|
protected void file_showstr(FILE *, const char *, size_t);
|
|
|
|
|
protected size_t file_mbswidth(const char *);
|
|
|
|
|
protected const char *file_getbuffer(struct magic_set *);
|
|
|
|
@ -72,7 +72,7 @@ Index: src/file.h
|
|
|
|
|
protected int file_check_mem(struct magic_set *, unsigned int);
|
|
|
|
|
protected int file_looks_utf8(const unsigned char *, size_t, unichar *,
|
|
|
|
|
size_t *);
|
|
|
|
|
@@ -568,9 +568,11 @@
|
|
|
|
|
@@ -559,9 +559,11 @@
|
|
|
|
|
ssize_t pread(int, void *, size_t, off_t);
|
|
|
|
|
#endif
|
|
|
|
|
#ifndef HAVE_VASPRINTF
|
|
|
|
@ -85,8 +85,8 @@ Index: src/file.h
|
|
|
|
|
#endif
|
|
|
|
|
#ifndef HAVE_DPRINTF
|
|
|
|
|
Index: src/funcs.c
|
|
|
|
|
--- src/funcs.c.orig 2019-02-20 03:35:27.000000000 +0100
|
|
|
|
|
+++ src/funcs.c 2019-02-23 09:55:13.955105000 +0100
|
|
|
|
|
--- src/funcs.c.orig 2019-05-07 04:27:11.000000000 +0200
|
|
|
|
|
+++ src/funcs.c 2019-05-17 07:57:58.611428000 +0200
|
|
|
|
|
@@ -35,6 +35,7 @@
|
|
|
|
|
#include <stdarg.h>
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
@ -95,7 +95,7 @@ Index: src/funcs.c
|
|
|
|
|
#include <ctype.h>
|
|
|
|
|
#if defined(HAVE_WCHAR_H)
|
|
|
|
|
#include <wchar.h>
|
|
|
|
|
@@ -644,3 +645,108 @@
|
|
|
|
|
@@ -650,3 +651,108 @@
|
|
|
|
|
*ptr = '\0';
|
|
|
|
|
return buf;
|
|
|
|
|
}
|
|
|
|
@ -205,8 +205,8 @@ Index: src/funcs.c
|
|
|
|
|
+#endif
|
|
|
|
|
+
|
|
|
|
|
Index: src/getopt_long.h
|
|
|
|
|
--- src/getopt_long.h.orig 2019-02-23 09:55:13.955212000 +0100
|
|
|
|
|
+++ src/getopt_long.h 2019-02-23 09:55:13.955198000 +0100
|
|
|
|
|
--- src/getopt_long.h.orig 2019-05-17 07:57:58.611532000 +0200
|
|
|
|
|
+++ src/getopt_long.h 2019-05-17 07:57:58.611518000 +0200
|
|
|
|
|
@@ -0,0 +1,14 @@
|
|
|
|
|
+#ifndef __GETOPT_LONG_H
|
|
|
|
|
+#define __GETOPT_LONG_H 1
|
|
|
|
@ -223,8 +223,8 @@ Index: src/getopt_long.h
|
|
|
|
|
+
|
|
|
|
|
+#endif
|
|
|
|
|
Index: src/magic.c
|
|
|
|
|
--- src/magic.c.orig 2019-02-20 03:35:27.000000000 +0100
|
|
|
|
|
+++ src/magic.c 2019-02-23 09:56:34.792363000 +0100
|
|
|
|
|
--- src/magic.c.orig 2019-05-07 04:27:11.000000000 +0200
|
|
|
|
|
+++ src/magic.c 2019-05-17 08:01:36.628818000 +0200
|
|
|
|
|
@@ -122,7 +122,7 @@
|
|
|
|
|
_w32_get_magic_relative_to(char **hmagicpath, HINSTANCE module)
|
|
|
|
|
{
|
|
|
|
@ -243,12 +243,12 @@ Index: src/magic.c
|
|
|
|
|
goto out;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -474,7 +474,7 @@
|
|
|
|
|
if (ispipe) {
|
|
|
|
|
ssize_t r = 0;
|
|
|
|
|
@@ -478,7 +478,7 @@
|
|
|
|
|
if (fd != -1) {
|
|
|
|
|
ssize_t r = 0;
|
|
|
|
|
|
|
|
|
|
- while ((r = sread(fd, RCAST(void *, &buf[nbytes]),
|
|
|
|
|
+ while ((r = file_sread(fd, RCAST(void *, &buf[nbytes]),
|
|
|
|
|
CAST(size_t, ms->bytes_max - nbytes), 1)) > 0) {
|
|
|
|
|
nbytes += r;
|
|
|
|
|
if (r < PIPE_BUF) break;
|
|
|
|
|
- while ((r = sread(fd, RCAST(void *, &buf[nbytes]),
|
|
|
|
|
+ while ((r = file_sread(fd, RCAST(void *, &buf[nbytes]),
|
|
|
|
|
CAST(size_t, ms->bytes_max - nbytes), 1)) > 0) {
|
|
|
|
|
nbytes += r;
|
|
|
|
|
if (r < PIPE_BUF) break;
|
|
|
|
|