pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/databases/gdbm
Module Name: pkgsrc
Committed By: schmonz
Date: Tue Sep 14 13:32:50 UTC 2021
Modified Files:
pkgsrc/databases/gdbm: distinfo
Added Files:
pkgsrc/databases/gdbm/patches: patch-configure patch-src_gdbmshell.c
patch-src_gdbmsync.c patch-src_systems.h
Log Message:
Apply upstream patch 32517af7 to check for st_mtim in struct stat. Fixes
macOS build.
To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 pkgsrc/databases/gdbm/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/databases/gdbm/patches/patch-configure \
pkgsrc/databases/gdbm/patches/patch-src_gdbmshell.c \
pkgsrc/databases/gdbm/patches/patch-src_gdbmsync.c \
pkgsrc/databases/gdbm/patches/patch-src_systems.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/databases/gdbm/distinfo
diff -u pkgsrc/databases/gdbm/distinfo:1.18 pkgsrc/databases/gdbm/distinfo:1.19
--- pkgsrc/databases/gdbm/distinfo:1.18 Sun Sep 12 09:12:34 2021
+++ pkgsrc/databases/gdbm/distinfo Tue Sep 14 13:32:50 2021
@@ -1,7 +1,11 @@
-$NetBSD: distinfo,v 1.18 2021/09/12 09:12:34 wiz Exp $
+$NetBSD: distinfo,v 1.19 2021/09/14 13:32:50 schmonz Exp $
SHA1 (gdbm-1.21.tar.gz) = f6eec6113f04a4b5fd2c1cfead10e7d65c8f3d89
RMD160 (gdbm-1.21.tar.gz) = 0a39c460bc85e271cac4d7fe08f6b38bf9426e6a
SHA512 (gdbm-1.21.tar.gz) = b2a31802d1af9f97b24d3dd01cb048bab4a8e748297f1b70851c0342400dde4281242b7f80bd92a36035e22398d240d131b550ab444ee838a077522a6921fa43
Size (gdbm-1.21.tar.gz) = 1005982 bytes
+SHA1 (patch-configure) = 0ae6c9280f911a524a3a2043df1e24588bd93a63
SHA1 (patch-src_Makefile.in) = 52b47f3dcd381143d1cdae40f1972bd989dcce1f
+SHA1 (patch-src_gdbmshell.c) = 56e8d69db9cab2a2e4846d9adec908596dd1f6a0
+SHA1 (patch-src_gdbmsync.c) = b57595f11838faabe5accda79fb62207c021a052
+SHA1 (patch-src_systems.h) = dc4132ae62c6b4f050dcf3d4c30552af087b310b
Added files:
Index: pkgsrc/databases/gdbm/patches/patch-configure
diff -u /dev/null pkgsrc/databases/gdbm/patches/patch-configure:1.1
--- /dev/null Tue Sep 14 13:32:50 2021
+++ pkgsrc/databases/gdbm/patches/patch-configure Tue Sep 14 13:32:50 2021
@@ -0,0 +1,36 @@
+$NetBSD: patch-configure,v 1.1 2021/09/14 13:32:50 schmonz Exp $
+
+Apply upstream patch 32517af7 to check for st_mtim in struct stat.
+Fixes macOS build.
+
+--- configure.orig 2021-09-02 12:47:45.000000000 +0000
++++ configure
+@@ -15451,6 +15451,28 @@ _ACEOF
+
+
+ fi
++ac_fn_c_check_member "$LINENO" "struct stat" "st_mtim" "ac_cv_member_struct_stat_st_mtim" "#include <sys/types.h>
++ #include <sys/stat.h>
++"
++if test "x$ac_cv_member_struct_stat_st_mtim" = xyes; then :
++
++cat >>confdefs.h <<_ACEOF
++#define HAVE_STRUCT_STAT_ST_MTIM 1
++_ACEOF
++
++
++fi
++ac_fn_c_check_member "$LINENO" "struct stat" "st_mtimespec" "ac_cv_member_struct_stat_st_mtimespec" "#include <sys/types.h>
++ #include <sys/stat.h>
++"
++if test "x$ac_cv_member_struct_stat_st_mtimespec" = xyes; then :
++
++cat >>confdefs.h <<_ACEOF
++#define HAVE_STRUCT_STAT_ST_MTIMESPEC 1
++_ACEOF
++
++
++fi
+
+
+ if test "$want_compat" = yes; then
Index: pkgsrc/databases/gdbm/patches/patch-src_gdbmshell.c
diff -u /dev/null pkgsrc/databases/gdbm/patches/patch-src_gdbmshell.c:1.1
--- /dev/null Tue Sep 14 13:32:50 2021
+++ pkgsrc/databases/gdbm/patches/patch-src_gdbmshell.c Tue Sep 14 13:32:50 2021
@@ -0,0 +1,19 @@
+$NetBSD: patch-src_gdbmshell.c,v 1.1 2021/09/14 13:32:50 schmonz Exp $
+
+Apply upstream patch 32517af7 to check for st_mtim in struct stat.
+Fixes macOS build.
+
+--- src/gdbmshell.c.orig 2021-09-02 12:39:55.000000000 +0000
++++ src/gdbmshell.c
+@@ -1010,7 +1010,11 @@ print_snapshot (char const *snapname, FI
+ fprintf (fp, "%s: ", snapname);
+ fprintf (fp, "%03o %s ", st.st_mode & 0777,
+ decode_mode (st.st_mode, buf));
++#if HAVE_STRUCT_STAT_ST_MTIM
+ fprintf (fp, "%ld.%09ld", st.st_mtim.tv_sec, st.st_mtim.tv_nsec);
++#else
++ fprintf (fp, "%ld [%s]", st.st_mtime, _("insufficient precision"));
++#endif
+ if (S_ISREG (st.st_mode))
+ {
+ GDBM_FILE dbf;
Index: pkgsrc/databases/gdbm/patches/patch-src_gdbmsync.c
diff -u /dev/null pkgsrc/databases/gdbm/patches/patch-src_gdbmsync.c:1.1
--- /dev/null Tue Sep 14 13:32:50 2021
+++ pkgsrc/databases/gdbm/patches/patch-src_gdbmsync.c Tue Sep 14 13:32:50 2021
@@ -0,0 +1,45 @@
+$NetBSD: patch-src_gdbmsync.c,v 1.1 2021/09/14 13:32:50 schmonz Exp $
+
+Apply upstream patch 32517af7 to check for st_mtim in struct stat.
+Fixes macOS build.
+
+--- src/gdbmsync.c.orig 2021-08-10 12:13:24.000000000 +0000
++++ src/gdbmsync.c
+@@ -220,16 +220,23 @@ gdbm_failure_atomic (GDBM_FILE dbf, cons
+ }
+
+ static inline int
+-timespec_cmp (struct timespec const *a, struct timespec const *b)
++timespec_cmp (struct stat const *a, struct stat const *b)
+ {
+- if (a->tv_sec < b->tv_sec)
++#if HAVE_STRUCT_STAT_ST_MTIM
++ if (a->st_mtim.tv_sec < b->st_mtim.tv_sec)
+ return -1;
+- if (a->tv_sec > b->tv_sec)
++ if (a->st_mtim.tv_sec > b->st_mtim.tv_sec)
+ return 1;
+- if (a->tv_nsec < b->tv_nsec)
++ if (a->st_mtim.tv_nsec < b->st_mtim.tv_nsec)
+ return -1;
+- if (a->tv_nsec > b->tv_nsec)
++ if (a->st_mtim.tv_nsec > b->st_mtim.tv_nsec)
+ return 1;
++#else
++ if (a->st_mtime < b->st_mtime)
++ return -1;
++ if (a->st_mtime > b->st_mtime)
++ return 1;
++#endif
+ return 0;
+ }
+
+@@ -374,7 +381,7 @@ gdbm_latest_snapshot (const char *even,
+ * Select the newer snapshot, i.e. the one whose mtime
+ * is greater than the other's
+ */
+- switch (timespec_cmp (&st_even.st_mtim, &st_odd.st_mtim))
++ switch (timespec_cmp (&st_even, &st_odd))
+ {
+ case -1:
+ *ret = odd;
Index: pkgsrc/databases/gdbm/patches/patch-src_systems.h
diff -u /dev/null pkgsrc/databases/gdbm/patches/patch-src_systems.h:1.1
--- /dev/null Tue Sep 14 13:32:50 2021
+++ pkgsrc/databases/gdbm/patches/patch-src_systems.h Tue Sep 14 13:32:50 2021
@@ -0,0 +1,21 @@
+$NetBSD: patch-src_systems.h,v 1.1 2021/09/14 13:32:50 schmonz Exp $
+
+Apply upstream patch 32517af7 to check for st_mtim in struct stat.
+Fixes macOS build.
+
+--- src/systems.h.orig 2021-08-10 12:13:24.000000000 +0000
++++ src/systems.h
+@@ -52,6 +52,13 @@
+ # define STATBLKSIZE(st) 1024
+ #endif
+
++#if ! HAVE_STRUCT_STAT_ST_MTIM
++# if HAVE_STRUCT_STAT_ST_MTIMESPEC
++# define st_mtim st_mtimespec
++# define HAVE_STRUCT_STAT_ST_MTIM 1
++# endif
++#endif
++
+ #ifndef STDERR_FILENO
+ # define STDERR_FILENO 2
+ #endif
Home |
Main Index |
Thread Index |
Old Index