Browse Source

more fixes for Debian 10

master
parent
commit
45d4573bc1
  1. 66
      make/make.patch

66
make/make.patch

@ -1,6 +1,6 @@
Index: configure
--- configure.orig 2016-06-11 01:03:21.000000000 +0200
+++ configure 2020-01-04 10:33:02.705581000 +0100
+++ configure 2020-01-04 10:48:35.633740000 +0100
@@ -11481,10 +11481,9 @@
#include <glob.h>
#include <fnmatch.h>
@ -13,9 +13,55 @@ Index: configure
gnu glob
# endif
#endif
Index: dir.c
--- dir.c.orig 2016-05-31 09:17:26.000000000 +0200
+++ dir.c 2020-01-04 10:48:35.634315000 +0100
@@ -1299,15 +1299,40 @@
}
#endif
+/* Similarly for lstat. */
+#if !defined(lstat) && !defined(WINDOWS32) || defined(VMS)
+# ifndef VMS
+# ifndef HAVE_SYS_STAT_H
+int lstat (const char *path, struct stat *sbuf);
+# endif
+# else
+ /* We are done with the fake lstat. Go back to the real lstat */
+# ifdef lstat
+# undef lstat
+# endif
+# endif
+# define local_lstat lstat
+#elif defined(WINDOWS32)
+/* Windows doesn't support lstat(). */
+# define local_lstat local_stat
+#else
+static int
+local_lstat (const char *path, struct stat *buf)
+{
+ int e;
+ EINTRLOOP (e, lstat (path, buf));
+ return e;
+}
+#endif
+
void
dir_setup_glob (glob_t *gl)
{
gl->gl_opendir = open_dirstream;
gl->gl_readdir = read_dirstream;
gl->gl_closedir = free;
+ gl->gl_lstat = local_lstat;
gl->gl_stat = local_stat;
- /* We don't bother setting gl_lstat, since glob never calls it.
- The slot is only there for compatibility with 4.4 BSD. */
}
void
Index: glob/glob.c
--- glob/glob.c.orig 2013-10-20 19:14:38.000000000 +0200
+++ glob/glob.c 2020-01-04 01:29:39.888868000 +0100
+++ glob/glob.c 2020-01-04 10:48:35.633968000 +0100
@@ -217,13 +217,13 @@
# ifdef HAVE_ALLOCA_H
# include <alloca.h>
@ -34,7 +80,7 @@ Index: glob/glob.c
Index: makeint.h
--- makeint.h.orig 2016-05-21 22:22:32.000000000 +0200
+++ makeint.h 2020-01-04 01:29:39.889043000 +0100
+++ makeint.h 2020-01-04 10:48:35.634471000 +0100
@@ -73,7 +73,7 @@
#include <stdio.h>
#include <ctype.h>
@ -44,3 +90,17 @@ Index: makeint.h
/* SCO 3.2 "devsys 4.2" has a prototype for 'ftime' in <time.h> that bombs
unless <sys/timeb.h> has been included first. */
# include <sys/timeb.h>
@@ -156,11 +156,11 @@
#ifdef PATH_MAX
# define GET_PATH_MAX PATH_MAX
-# define PATH_VAR(var) char var[PATH_MAX]
+# define PATH_VAR(var) char var[PATH_MAX+1]
#else
# define NEED_GET_PATH_MAX 1
# define GET_PATH_MAX (get_path_max ())
-# define PATH_VAR(var) char *var = alloca (GET_PATH_MAX)
+# define PATH_VAR(var) char *var = alloca (GET_PATH_MAX+1)
unsigned int get_path_max (void);
#endif

Loading…
Cancel
Save