pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/filesystems/glusterfs



Module Name:    pkgsrc
Committed By:   js
Date:           Sun Mar 12 17:57:44 UTC 2023

Modified Files:
        pkgsrc/filesystems/glusterfs: DESCR Makefile PLIST distinfo
        pkgsrc/filesystems/glusterfs/patches: patch-configure.ac
Added Files:
        pkgsrc/filesystems/glusterfs/patches:
            patch-libglusterfs-src-glusterfs-dict.h
Removed Files:
        pkgsrc/filesystems/glusterfs/patches: patch-config.h.in patch-configure
            patch-rpc_rpc_lib_rpcsvc.c
            patch-tools_gfind__missing__files_gfind__missing__files.sh
            patch-xlators_mgmt_glusterd_src_glusterd-utils.c
            patch-xlators_mount_fuse_src_fuse-bridge.c
            patch-xlators_performance_write-behind_src_write-behind.c
            patch-xlators_storage_posix_src_posix-entry-ops.c

Log Message:
Update filesystem/glusterfs to 10.3

Patch from Alexander Schreiber, the new maintainer, with minor changes by me.

Newer versions of glusterfs no longer work on 32 bit systems, so I have moved
the previous version to filesystem/glusterfs8.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 pkgsrc/filesystems/glusterfs/DESCR
cvs rdiff -u -r1.110 -r1.111 pkgsrc/filesystems/glusterfs/Makefile
cvs rdiff -u -r1.40 -r1.41 pkgsrc/filesystems/glusterfs/PLIST
cvs rdiff -u -r1.73 -r1.74 pkgsrc/filesystems/glusterfs/distinfo
cvs rdiff -u -r1.2 -r0 pkgsrc/filesystems/glusterfs/patches/patch-config.h.in \
    pkgsrc/filesystems/glusterfs/patches/patch-tools_gfind__missing__files_gfind__missing__files.sh \
    pkgsrc/filesystems/glusterfs/patches/patch-xlators_mgmt_glusterd_src_glusterd-utils.c \
    pkgsrc/filesystems/glusterfs/patches/patch-xlators_mount_fuse_src_fuse-bridge.c \
    pkgsrc/filesystems/glusterfs/patches/patch-xlators_storage_posix_src_posix-entry-ops.c
cvs rdiff -u -r1.5 -r0 pkgsrc/filesystems/glusterfs/patches/patch-configure
cvs rdiff -u -r1.3 -r1.4 \
    pkgsrc/filesystems/glusterfs/patches/patch-configure.ac
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/filesystems/glusterfs/patches/patch-libglusterfs-src-glusterfs-dict.h
cvs rdiff -u -r1.3 -r0 \
    pkgsrc/filesystems/glusterfs/patches/patch-rpc_rpc_lib_rpcsvc.c \
    pkgsrc/filesystems/glusterfs/patches/patch-xlators_performance_write-behind_src_write-behind.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/filesystems/glusterfs/DESCR
diff -u pkgsrc/filesystems/glusterfs/DESCR:1.1.1.1 pkgsrc/filesystems/glusterfs/DESCR:1.2
--- pkgsrc/filesystems/glusterfs/DESCR:1.1.1.1  Thu Aug 26 14:26:18 2010
+++ pkgsrc/filesystems/glusterfs/DESCR  Sun Mar 12 17:57:44 2023
@@ -2,10 +2,10 @@ GlusterFS is a flexible, powerful, POSIX
 that can scale to several petabytes.
 
 GlusterFS works over either TCP/IP or high-performance Infiniband
-RDMA interconnect.
+RDMA interconnect.  It requires a 64-bit CPU.
 
 GlusterFS provides striping and on-the-fly synchronous replication
 of files. GlusterFS has a fully distributed design, with no single
 point of failure.
 
-Please visit http://www.gluster.org/glusterfs.php for more info.
+Please visit http://www.gluster.org/ for more info.

Index: pkgsrc/filesystems/glusterfs/Makefile
diff -u pkgsrc/filesystems/glusterfs/Makefile:1.110 pkgsrc/filesystems/glusterfs/Makefile:1.111
--- pkgsrc/filesystems/glusterfs/Makefile:1.110 Wed Nov 23 16:20:00 2022
+++ pkgsrc/filesystems/glusterfs/Makefile       Sun Mar 12 17:57:44 2023
@@ -1,28 +1,40 @@
-# $NetBSD: Makefile,v 1.110 2022/11/23 16:20:00 adam Exp $
+# $NetBSD: Makefile,v 1.111 2023/03/12 17:57:44 js Exp $
 
-DISTNAME=      glusterfs-8.2
-PKGREVISION=   8
+DISTNAME=      glusterfs-10.3
 CATEGORIES=    filesystems
 MASTER_SITES=  http://bits.gluster.org/pub/gluster/glusterfs/src/
 
-MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
+MAINTAINER=    als%thangorodrim.ch@localhost
 HOMEPAGE=      https://www.gluster.org/
 COMMENT=       Cluster filesystem
 LICENSE=       gnu-gpl-v3
 
-GNU_CONFIGURE=         yes
-USE_LIBTOOL=           yes
-USE_TOOLS+=            flex bison pkg-config bash
+DEPENDS+=      bash>=4:../../shells/bash
+GNU_CONFIGURE= yes
+USE_LIBTOOL=   yes
+USE_TOOLS+=    flex bison pkg-config bash autoconf autoreconf automake
 
 CONFIGURE_ARGS+=       --disable-fusermount
 CONFIGURE_ARGS+=       --disable-fuse-notifications
 CONFIGURE_ARGS+=       --localstatedir=${VARBASE}
+CONFIGURE_ARGS+=       --without-tcmalloc
+# libtirpc not in pkgsrc (yet)
+CONFIGURE_ARGS+=       --without-libtirpc
+
+# Upstream glusterfs effectively dropped support for 32bit platforms
+# somewhere between 8.2 (works on e.g. NetBSD/i386) and 10.3 as various
+# internal bits went from 32 to 64 bits and atomic updates where done
+# on those - can't do that for 64bit values on a 32bit arch.
+# https://github.com/gluster/glusterfs/issues/702 proposed an explicit
+# drop of 32bit and eventually it just happened. See
+# https://github.com/gluster/glusterfs/issues/3911#issuecomment-1451711686
+# for a more detailed explanation.
+BROKEN_ON_PLATFORM=    ${LP32PLATFORMS}
 
 # Make sure we do not attept to link with -lfl
 # Only libfl.a is available, and libtool wants libfl.so
 MAKE_FLAGS+=           LEXLIB=""
 
-REPLACE_PYTHON+=       contrib/ipaddr-py/ipaddr.py
 REPLACE_PYTHON+=       events/src/glustereventsd.py
 REPLACE_PYTHON+=       events/src/peer_eventsapi.py
 REPLACE_PYTHON+=       events/tools/eventsdash.py
@@ -32,35 +44,27 @@ REPLACE_PYTHON+=    extras/snap_scheduler/g
 REPLACE_PYTHON+=       extras/snap_scheduler/snap_scheduler.py
 REPLACE_PYTHON+=       geo-replication/src/peer_georep-sshkey.py.in
 REPLACE_PYTHON+=       geo-replication/src/peer_mountbroker.in
-REPLACE_PYTHON+=       geo-replication/src/peer_mountbroker.py
 REPLACE_PYTHON+=       geo-replication/src/peer_mountbroker.py.in
-REPLACE_PYTHON+=       geo-replication/syncdaemon/changelogagent.py
 REPLACE_PYTHON+=       geo-replication/syncdaemon/gsyncd.py
 REPLACE_PYTHON+=       geo-replication/syncdaemon/gsyncdstatus.py
 REPLACE_PYTHON+=       tools/gfind_missing_files/gfid_to_path.py
 REPLACE_PYTHON+=       tools/glusterfind/S57glusterfind-delete-post.py
 REPLACE_PYTHON+=       tools/glusterfind/glusterfind.in
-REPLACE_PYTHON+=       tools/glusterfind/src/__init__.py
 REPLACE_PYTHON+=       tools/glusterfind/src/brickfind.py
 REPLACE_PYTHON+=       tools/glusterfind/src/changelog.py
-REPLACE_PYTHON+=       tools/glusterfind/src/changelogdata.py
-REPLACE_PYTHON+=       tools/glusterfind/src/conf.py
-REPLACE_PYTHON+=       tools/glusterfind/src/libgfchangelog.py
 REPLACE_PYTHON+=       tools/glusterfind/src/main.py
 REPLACE_PYTHON+=       tools/glusterfind/src/nodeagent.py
-REPLACE_PYTHON+=       tools/glusterfind/src/utils.py
 
 REPLACE_BASH+=         extras/ganesha/ocf/ganesha_grace
 REPLACE_BASH+=         extras/ganesha/ocf/ganesha_mon
 REPLACE_BASH+=         extras/ganesha/ocf/ganesha_nfsd
-REPLACE_BASH+=         extras/ganesha/scripts/copy-export-ganesha.sh
 REPLACE_BASH+=         extras/ganesha/scripts/create-export-ganesha.sh
 REPLACE_BASH+=         extras/ganesha/scripts/dbus-send.sh
 REPLACE_BASH+=         extras/ganesha/scripts/ganesha-ha.sh
 REPLACE_BASH+=         extras/geo-rep/generate-gfid-file.sh
 REPLACE_BASH+=         extras/geo-rep/get-gfid.sh
 REPLACE_BASH+=         extras/geo-rep/gsync-upgrade.sh
-REPLACE_BASH+=         extras/geo-rep/slave-upgrade.sh
+REPLACE_BASH+=         extras/geo-rep/secondary-upgrade.sh
 REPLACE_BASH+=         extras/peer_add_secret_pub.in
 REPLACE_BASH+=         extras/post-upgrade-script-for-quota.sh
 REPLACE_BASH+=         extras/pre-upgrade-script-for-quota.sh
@@ -76,17 +80,20 @@ CHECK_PORTABILITY_SKIP+=    extras/peer_add
 
 SUBST_CLASSES+=                mtab
 SUBST_STAGE.mtab=      post-build
-SUBST_FILES.mtab=      doc/mount.glusterfs.8
-SUBST_FILES.mtab=      libglusterfs/src/compat.h
-SUBST_FILES.mtab=      xlators/mount/fuse/utils/mount.glusterfs.in
-SUBST_SED.mtab=                -e "s,mtab,/proc/mounts,g"
+SUBST_FILES.mtab+=     xlators/mount/fuse/utils/mount.glusterfs.in
+SUBST_SED.mtab+=       -e "s,mtab,/proc/mounts,g"
 
 SUBST_CLASSES+=                etc
 SUBST_STAGE.etc=       pre-build
-SUBST_FILES.etc+=      libglusterfs/src/logging.c
+SUBST_FILES.etc=       libglusterfs/src/logging.c
 SUBST_FILES.etc+=      doc/glusterfsd.8
 SUBST_SED.etc=         -e "s,/etc/gluster,${PREFIX}/etc/gluster,g"
 
+SUBST_CLASSES+=                bash
+SUBST_STAGE.bash=      pre-configure
+SUBST_FILES.bash=      build-aux/pkg-version
+SUBST_SED.bash=                -e "s,/bin/bash,/usr/pkg/bin/bash,g"
+
 #EGDIR=                        ${PREFIX}/etc/glusterfs
 #CONF_FILES+=          ${EGDIR}/glusterd.vol.sample ${EGDIR}/glusterd.vol
 OWN_DIRS+=             ${VARBASE}/log/glusterfs
@@ -101,6 +108,9 @@ PLIST_SUBST+=               PYSITELIB=${PYSITELIB:Q}
 PLIST_SUBST+=          GLUSTERFS_VERSION=${DISTNAME:S/glusterfs-//}
 MESSAGE_SRC=           ${PKGDIR}/MESSAGE.${OPSYS}
 
+pre-configure:
+       cd ${WRKSRC} && ./autogen.sh
+
 pre-build:
        cd ${WRKSRC}/extras &&                                  \
        ${ECHO} "glusterd.vol.sample: glusterd.vol" >> Makefile &&      \
@@ -111,7 +121,7 @@ post-install:
            ${DESTDIR}/${PREFIX}/sbin/mount_glusterfs
 
 # Debug
-CFLAGS+=               -g 
+CFLAGS+=               -g
 INSTALL_UNSTRIPPED=    yes
 CONFIGURE_ARGS+=       --enable-debug
 #.include "../../devel/boehm-gc/buildlink3.mk"

Index: pkgsrc/filesystems/glusterfs/PLIST
diff -u pkgsrc/filesystems/glusterfs/PLIST:1.40 pkgsrc/filesystems/glusterfs/PLIST:1.41
--- pkgsrc/filesystems/glusterfs/PLIST:1.40     Tue Jul  7 01:01:27 2020
+++ pkgsrc/filesystems/glusterfs/PLIST  Sun Mar 12 17:57:44 2023
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.40 2020/07/07 01:01:27 manu Exp $
+@comment $NetBSD: PLIST,v 1.41 2023/03/12 17:57:44 js Exp $
 ${PYSITELIB}/gluster/__init__.py
 ${PYSITELIB}/gluster/__init__.pyc
 ${PYSITELIB}/gluster/__init__.pyo
@@ -38,6 +38,7 @@ include/glusterfs/client_t.h
 include/glusterfs/cluster-syncop.h
 include/glusterfs/common-utils.h
 include/glusterfs/compat-errno.h
+include/glusterfs/compat-io_uring.h
 include/glusterfs/compat-uuid.h
 include/glusterfs/compat.h
 include/glusterfs/daemon.h
@@ -51,6 +52,9 @@ include/glusterfs/fd.h
 include/glusterfs/gd-common-utils.h
 include/glusterfs/gf-dirent.h
 include/glusterfs/gf-event.h
+include/glusterfs/gf-io-common.h
+include/glusterfs/gf-io-legacy.h
+include/glusterfs/gf-io.h
 include/glusterfs/gfchangelog/changelog.h
 include/glusterfs/gidcache.h
 include/glusterfs/glfs-message-id.h
@@ -289,12 +293,12 @@ libexec/glusterfs/python/syncdaemon/libg
 libexec/glusterfs/python/syncdaemon/logutils.py
 libexec/glusterfs/python/syncdaemon/logutils.pyc
 libexec/glusterfs/python/syncdaemon/logutils.pyo
-libexec/glusterfs/python/syncdaemon/master.py
-libexec/glusterfs/python/syncdaemon/master.pyc
-libexec/glusterfs/python/syncdaemon/master.pyo
 libexec/glusterfs/python/syncdaemon/monitor.py
 libexec/glusterfs/python/syncdaemon/monitor.pyc
 libexec/glusterfs/python/syncdaemon/monitor.pyo
+libexec/glusterfs/python/syncdaemon/primary.py
+libexec/glusterfs/python/syncdaemon/primary.pyc
+libexec/glusterfs/python/syncdaemon/primary.pyo
 libexec/glusterfs/python/syncdaemon/py2py3.py
 libexec/glusterfs/python/syncdaemon/py2py3.pyc
 libexec/glusterfs/python/syncdaemon/py2py3.pyo
@@ -318,7 +322,7 @@ libexec/glusterfs/scripts/get-gfid.sh
 libexec/glusterfs/scripts/gsync-sync-gfid
 libexec/glusterfs/scripts/gsync-upgrade.sh
 libexec/glusterfs/scripts/schedule_georep.py
-libexec/glusterfs/scripts/slave-upgrade.sh
+libexec/glusterfs/scripts/secondary-upgrade.sh
 libexec/glusterfs/set_geo_rep_pem_keys.sh
 man/man8/gluster-setgfid2path.8
 man/man8/gluster.8

Index: pkgsrc/filesystems/glusterfs/distinfo
diff -u pkgsrc/filesystems/glusterfs/distinfo:1.73 pkgsrc/filesystems/glusterfs/distinfo:1.74
--- pkgsrc/filesystems/glusterfs/distinfo:1.73  Tue Oct 26 10:25:29 2021
+++ pkgsrc/filesystems/glusterfs/distinfo       Sun Mar 12 17:57:44 2023
@@ -1,14 +1,8 @@
-$NetBSD: distinfo,v 1.73 2021/10/26 10:25:29 nia Exp $
+$NetBSD: distinfo,v 1.74 2023/03/12 17:57:44 js Exp $
 
-BLAKE2s (glusterfs-8.2.tar.gz) = 8e3161a768b5875b190f44cc3698de3ea9703c2550306c019dc6776c4ab12cd7
-SHA512 (glusterfs-8.2.tar.gz) = e11ffd544cdfd55e4309bcf10d9f6d3cb13b3c0beeaf578e024c9b40df19f5bc5dc6965bca1166e96e05e42041093c48772b160952c235f7456f0898594d01d2
-Size (glusterfs-8.2.tar.gz) = 7761620 bytes
-SHA1 (patch-config.h.in) = 1560806ebd786139b404544461dcda0ec1d60b37
-SHA1 (patch-configure) = 07d7a61d7c24ab8b0e4bb00ab6ae2452e41d903f
-SHA1 (patch-configure.ac) = fcb7da30005e9a08e7a0f4ac2f5e55511580aa18
-SHA1 (patch-rpc_rpc_lib_rpcsvc.c) = 287e5da091a2610ee010a44a5b51a90a402cff01
-SHA1 (patch-tools_gfind__missing__files_gfind__missing__files.sh) = 67d374d8dc3213bd3d159e7cb8479c14e8ba162d
-SHA1 (patch-xlators_mgmt_glusterd_src_glusterd-utils.c) = 3e8e6fa5e4baff94532f58a6509f7b5817ce02bf
-SHA1 (patch-xlators_mount_fuse_src_fuse-bridge.c) = 4706bc7264b7e4ec7f01cc143f3edce96213401e
-SHA1 (patch-xlators_performance_write-behind_src_write-behind.c) = cf3eea86ab4255a7714b25a35a98495eff0f772e
-SHA1 (patch-xlators_storage_posix_src_posix-entry-ops.c) = 2c1acf30097ca4ce7b6ec6e1212f989c86201553
+BLAKE2s (glusterfs-10.3.tar.gz) = c2f9b5670d1df7a787e445207caa421a949f1fb98cafb587441925efe8d9e25a
+SHA512 (glusterfs-10.3.tar.gz) = af7c8a15db48196a5f7022e4da87ae8d8d43a12c8968b242f40fb43ea562d1d214e75b3a67800f8594c97847e15c01367b6d464964252551d6f8d3e93fb0f832
+Size (glusterfs-10.3.tar.gz) = 8283537 bytes
+SHA1 (patch-configure.ac_no_bash) = eea22135006c11a25ad94eaf04ee1cbe8ac2ea9b
+SHA1 (patch-configure.ac_time_t) = 2bf7b3d6845216429d0064b4b5c47c9daf328c94
+SHA1 (patch-libglusterfs-src-glusterfs-dict.h) = ebfdfe6ffbdda3532d15fe108d4214b1e9596304

Index: pkgsrc/filesystems/glusterfs/patches/patch-configure.ac
diff -u pkgsrc/filesystems/glusterfs/patches/patch-configure.ac:1.3 pkgsrc/filesystems/glusterfs/patches/patch-configure.ac:1.4
--- pkgsrc/filesystems/glusterfs/patches/patch-configure.ac:1.3 Sun Sep 27 01:13:11 2020
+++ pkgsrc/filesystems/glusterfs/patches/patch-configure.ac     Sun Mar 12 17:57:44 2023
@@ -1,36 +1,34 @@
-$NetBSD: patch-configure.ac,v 1.3 2020/09/27 01:13:11 manu Exp $
+$NetBSD: patch-configure.ac,v 1.4 2023/03/12 17:57:44 js Exp $
 
-Make FUSE notification optional at configure time
-From upstream https://review.gluster.org/24731
+Check for sizeof(time_t).
 
---- configure.ac.orig  2020-07-06 03:22:37.734704915 +0200
-+++ configure.ac       2020-07-22 02:26:32.903778538 +0200
-@@ -683,8 +683,16 @@
-    BUILD_FUSE_CLIENT="yes"
- fi
+Defang bash 4.0 syntax in configure
+(https://github.com/gluster/glusterfs/issues/3940).
+
+--- configure.ac.orig   2022-09-20 12:24:29.568820624 +0200
++++ configure.ac        2023-03-06 22:45:21.897057433 +0100
+@@ -544,6 +544,11 @@
+ AC_SUBST(SIZEOF_LONG)
+ AC_SUBST(SIZEOF_LONG_LONG)
  
- AC_SUBST(FUSE_CLIENT_SUBDIR)
-+
-+AC_ARG_ENABLE([fuse-notifications],
-+  AS_HELP_STRING([--disable-fuse-notifications], [Disable FUSE notifications]))
++# size of time_t
++AC_CHECK_SIZEOF(time_t)
++SIZEOF_TIME_T=$ac_cv_sizeof_time_t
++AC_SUBST(SIZEOF_TIME_T)
 +
-+AS_IF([test "x$enable_fuse_notifications" != "xno"], [
-+  AC_DEFINE([HAVE_FUSE_NOTIFICATIONS], [1], [Use FUSE notifications])
-+])
-+
- # end FUSE section
- 
+ # YACC needs a check
+ AC_PROG_YACC
+ if test "x${YACC}" = "xbyacc" -o "x${YACC}" = "xyacc" -o "x${YACC}" = "x"; then
+@@ -1896,10 +1896,10 @@
+ echo "Building with LTO    : $LTO_BUILD"
+ echo
  
- AC_CHECK_LIB([ssl], TLS_method, [HAVE_OPENSSL_1_1="yes"], [HAVE_OPENSSL_1_1="no"])
-@@ -945,8 +953,11 @@
-     *freebsd*)
-     CFLAGS="${CFLAGS} -isystem /usr/local/include"
-     ARGP_LDADD=-largp
-     ;;
-+    *netbsd*)
-+    ARGP_LDADD=-largp
-+    ;;
- esac
- dnl argp-standalone does not provide a pkg-config file
- AC_CHECK_HEADER([argp.h], AC_DEFINE(HAVE_ARGP, 1, [have argp]))
- if test "x$ac_cv_header_argp_h" != "xyes"; then
+-# dnl Note: ${X^^} capitalization assumes bash >= 4.x
+ if test "x$SANITIZER" != "xnone"; then
++        UC_SANITIZER=$(echo ${SANITIZER} | tr 'a-z' 'A-Z')
+         echo "Note: since glusterfs processes are daemon processes, use"
+-        echo "'export ${SANITIZER^^}_OPTIONS=log_path=/path/to/xxx.log' to collect"
++        echo "'export ${UC_SANITIZER}_OPTIONS=log_path=/path/to/xxx.log' to collect"
+         echo "sanitizer output. Further details and more options can be"
+         echo "found at https://github.com/google/sanitizers.";
+ fi

Added files:

Index: pkgsrc/filesystems/glusterfs/patches/patch-libglusterfs-src-glusterfs-dict.h
diff -u /dev/null pkgsrc/filesystems/glusterfs/patches/patch-libglusterfs-src-glusterfs-dict.h:1.1
--- /dev/null   Sun Mar 12 17:57:45 2023
+++ pkgsrc/filesystems/glusterfs/patches/patch-libglusterfs-src-glusterfs-dict.h        Sun Mar 12 17:57:44 2023
@@ -0,0 +1,42 @@
+$NetBSD: patch-libglusterfs-src-glusterfs-dict.h,v 1.1 2023/03/12 17:57:44 js Exp $
+
+Do not use __WORDSIZE as proxy for sizeof(time_t), since:
+ - __WORDSIZE is glibc (and thus Linux) only
+ - machine word size is a bad proxy for sizeof(time_t), e.g.
+   NetBSD on 32bit arch (i386) also has sizeof(time_t) == 8
+
+Instead use configure to check sizeof(time_t) and use this.
+
+upstream bug https://github.com/gluster/glusterfs/issues/3942
+
+--- libglusterfs/src/glusterfs/dict.h.orig      2023-01-01 23:19:50.909999764 +0100
++++ libglusterfs/src/glusterfs/dict.h   2023-01-01 23:09:15.920888776 +0100
+@@ -15,6 +15,7 @@
+ #include <sys/uio.h>
+ #include <pthread.h>
+ 
++#include "config.h"
+ #include "glusterfs/common-utils.h"
+ 
+ typedef struct _data data_t;
+@@ -320,17 +321,17 @@
+ dict_set_uint64(dict_t *this, char *key, uint64_t val);
+ 
+ /* POSIX-compliant systems requires the 'time_t' to be a signed integer. */
+-#if __WORDSIZE == 64
++#if SIZEOF_TIME_T == 8
+ #define dict_get_time(dict, key, val) dict_get_int64((dict), (key), (val))
+ #define dict_set_time(dict, key, val) dict_set_int64((dict), (key), (val))
+-#elif __WORDSIZE == 32
++#elif SIZEOF_TIME_T == 4
+ #define dict_get_time(dict, key, val)                   \
+     dict_get_int32((dict), (key), ((int32_t *)(val)))
+ #define dict_set_time(dict, key, val)                   \
+     dict_set_int32((dict), (key), ((int32_t)(val)))
+ #else
+ #error "unknown word size"
+-#endif /* WORDSIZE check */
++#endif /* SIZEOF_TIME_T check */
+ 
+ GF_MUST_CHECK int
+ dict_check_flag(dict_t *this, char *key, int flag);



Home | Main Index | Thread Index | Old Index