|
|
|
@ -1,7 +1,7 @@
|
|
|
|
|
Index: configure
|
|
|
|
|
--- configure.orig 2016-04-17 00:41:20.000000000 +0200
|
|
|
|
|
+++ configure 2016-04-17 10:57:12.628734213 +0200
|
|
|
|
|
@@ -3330,7 +3330,7 @@
|
|
|
|
|
--- configure.orig 2019-02-20 16:19:07.000000000 +0100
|
|
|
|
|
+++ configure 2019-02-23 09:55:13.954138000 +0100
|
|
|
|
|
@@ -3354,7 +3354,7 @@
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -11,9 +11,9 @@ Index: configure
|
|
|
|
|
|
|
|
|
|
if test x$fsect = x5; then
|
|
|
|
|
Index: src/apprentice.c
|
|
|
|
|
--- src/apprentice.c.orig 2016-03-31 19:51:12.000000000 +0200
|
|
|
|
|
+++ src/apprentice.c 2016-04-17 10:57:12.628734213 +0200
|
|
|
|
|
@@ -1255,7 +1255,7 @@
|
|
|
|
|
--- src/apprentice.c.orig 2019-02-20 03:35:27.000000000 +0100
|
|
|
|
|
+++ src/apprentice.c 2019-02-23 09:55:13.954530000 +0100
|
|
|
|
|
@@ -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 2016-03-31 19:51:12.000000000 +0200
|
|
|
|
|
+++ src/compress.c 2016-04-17 10:58:19.959757918 +0200
|
|
|
|
|
@@ -298,7 +298,7 @@
|
|
|
|
|
--- 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 @@
|
|
|
|
|
* `safe' read for sockets and pipes.
|
|
|
|
|
*/
|
|
|
|
|
protected ssize_t
|
|
|
|
@ -34,16 +34,16 @@ Index: src/compress.c
|
|
|
|
|
{
|
|
|
|
|
ssize_t rv;
|
|
|
|
|
#ifdef FIONREAD
|
|
|
|
|
@@ -397,7 +397,7 @@
|
|
|
|
|
if (swrite(tfd, startbuf, nbytes) != (ssize_t)nbytes)
|
|
|
|
|
@@ -439,7 +439,7 @@
|
|
|
|
|
if (swrite(tfd, startbuf, nbytes) != CAST(ssize_t, nbytes))
|
|
|
|
|
r = 1;
|
|
|
|
|
else {
|
|
|
|
|
- while ((r = sread(fd, buf, sizeof(buf), 1)) > 0)
|
|
|
|
|
+ while ((r = file_sread(fd, buf, sizeof(buf), 1)) > 0)
|
|
|
|
|
if (swrite(tfd, buf, (size_t)r) != r)
|
|
|
|
|
if (swrite(tfd, buf, CAST(size_t, r)) != r)
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
@@ -704,14 +704,14 @@
|
|
|
|
|
@@ -746,14 +746,14 @@
|
|
|
|
|
goto err;
|
|
|
|
|
}
|
|
|
|
|
rv = OKDATA;
|
|
|
|
@ -61,9 +61,9 @@ Index: src/compress.c
|
|
|
|
|
r = filter_error(*newch, r);
|
|
|
|
|
break;
|
|
|
|
|
Index: src/file.h
|
|
|
|
|
--- src/file.h.orig 2016-03-31 19:51:12.000000000 +0200
|
|
|
|
|
+++ src/file.h 2016-04-17 10:57:12.628734213 +0200
|
|
|
|
|
@@ -485,7 +485,7 @@
|
|
|
|
|
--- 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 @@
|
|
|
|
|
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 *);
|
|
|
|
|
@@ -551,9 +551,11 @@
|
|
|
|
|
@@ -568,9 +568,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 2016-03-21 16:56:53.000000000 +0100
|
|
|
|
|
+++ src/funcs.c 2016-04-17 10:57:12.628734213 +0200
|
|
|
|
|
--- src/funcs.c.orig 2019-02-20 03:35:27.000000000 +0100
|
|
|
|
|
+++ src/funcs.c 2019-02-23 09:55:13.955105000 +0100
|
|
|
|
|
@@ -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>
|
|
|
|
|
@@ -598,3 +599,108 @@
|
|
|
|
|
@@ -644,3 +645,108 @@
|
|
|
|
|
*ptr = '\0';
|
|
|
|
|
return buf;
|
|
|
|
|
}
|
|
|
|
@ -205,8 +205,8 @@ Index: src/funcs.c
|
|
|
|
|
+#endif
|
|
|
|
|
+
|
|
|
|
|
Index: src/getopt_long.h
|
|
|
|
|
--- src/getopt_long.h.orig 2016-04-17 10:57:12.628734213 +0200
|
|
|
|
|
+++ src/getopt_long.h 2016-04-17 10:57:12.628734213 +0200
|
|
|
|
|
--- 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
|
|
|
|
|
@@ -0,0 +1,14 @@
|
|
|
|
|
+#ifndef __GETOPT_LONG_H
|
|
|
|
|
+#define __GETOPT_LONG_H 1
|
|
|
|
@ -223,9 +223,9 @@ Index: src/getopt_long.h
|
|
|
|
|
+
|
|
|
|
|
+#endif
|
|
|
|
|
Index: src/magic.c
|
|
|
|
|
--- src/magic.c.orig 2016-03-31 19:51:12.000000000 +0200
|
|
|
|
|
+++ src/magic.c 2016-04-17 10:58:40.628742803 +0200
|
|
|
|
|
@@ -124,7 +124,7 @@
|
|
|
|
|
--- src/magic.c.orig 2019-02-20 03:35:27.000000000 +0100
|
|
|
|
|
+++ src/magic.c 2019-02-23 09:56:34.792363000 +0100
|
|
|
|
|
@@ -122,7 +122,7 @@
|
|
|
|
|
_w32_get_magic_relative_to(char **hmagicpath, HINSTANCE module)
|
|
|
|
|
{
|
|
|
|
|
static const char *trypaths[] = {
|
|
|
|
@ -234,7 +234,7 @@ Index: src/magic.c
|
|
|
|
|
"%s/magic.mgc",
|
|
|
|
|
};
|
|
|
|
|
LPSTR dllpath;
|
|
|
|
|
@@ -148,7 +148,7 @@
|
|
|
|
|
@@ -146,7 +146,7 @@
|
|
|
|
|
sp = strlen(dllpath);
|
|
|
|
|
if (sp > 3 && stricmp(&dllpath[sp - 3], "bin") == 0) {
|
|
|
|
|
_w32_append_path(hmagicpath,
|
|
|
|
@ -243,12 +243,12 @@ Index: src/magic.c
|
|
|
|
|
goto out;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -486,7 +486,7 @@
|
|
|
|
|
@@ -474,7 +474,7 @@
|
|
|
|
|
if (ispipe) {
|
|
|
|
|
ssize_t r = 0;
|
|
|
|
|
|
|
|
|
|
- while ((r = sread(fd, (void *)&buf[nbytes],
|
|
|
|
|
+ while ((r = file_sread(fd, (void *)&buf[nbytes],
|
|
|
|
|
(size_t)(ms->bytes_max - nbytes), 1)) > 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;
|
|
|
|
|