pkgsrc-Changes archive

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

CVS commit: pkgsrc/mail/fdm



Module Name:    pkgsrc
Committed By:   leot
Date:           Mon Mar 18 10:53:41 UTC 2019

Modified Files:
        pkgsrc/mail/fdm: Makefile distinfo
Added Files:
        pkgsrc/mail/fdm/patches: patch-shm-mmap.c

Log Message:
fdm: Adjust mremap(2) usage on NetBSD

MREMAP_MAYMOVE flag is the default behaviour on NetBSD and by
adjusting the single mremap() call it can be used on NetBSD too
(remove CONFIGURE_ENV injection kludge).

Thanks to <joerg> and <kamil> respectively for kindly pointing out
that and suggestions! (possible regressions are mine!)


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 pkgsrc/mail/fdm/Makefile
cvs rdiff -u -r1.11 -r1.12 pkgsrc/mail/fdm/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/mail/fdm/patches/patch-shm-mmap.c

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

Modified files:

Index: pkgsrc/mail/fdm/Makefile
diff -u pkgsrc/mail/fdm/Makefile:1.13 pkgsrc/mail/fdm/Makefile:1.14
--- pkgsrc/mail/fdm/Makefile:1.13       Sun Mar 17 21:33:03 2019
+++ pkgsrc/mail/fdm/Makefile    Mon Mar 18 10:53:40 2019
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.13 2019/03/17 21:33:03 leot Exp $
+# $NetBSD: Makefile,v 1.14 2019/03/18 10:53:40 leot Exp $
 
 DISTNAME=      fdm-2.0
-PKGREVISION=   1
+PKGREVISION=   2
 CATEGORIES=    mail
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=nicm/}
 
@@ -17,9 +17,6 @@ INSTALLATION_DIRS+=   ${EGDIR} ${DOCDIR}
 EGDIR=                 ${PREFIX}/share/examples/fdm
 DOCDIR=                        ${PREFIX}/share/doc/fdm
 
-# Avoid mremap(2) due flags not available on NetBSD
-CONFIGURE_ENV.NetBSD+= ac_cv_func_mremap=no    
-
 CFLAGS.NetBSD+=                -D_OPENBSD_SOURCE       # needed for strtonum(3)
 
 .include "options.mk"

Index: pkgsrc/mail/fdm/distinfo
diff -u pkgsrc/mail/fdm/distinfo:1.11 pkgsrc/mail/fdm/distinfo:1.12
--- pkgsrc/mail/fdm/distinfo:1.11       Wed Feb 13 11:08:02 2019
+++ pkgsrc/mail/fdm/distinfo    Mon Mar 18 10:53:40 2019
@@ -1,7 +1,8 @@
-$NetBSD: distinfo,v 1.11 2019/02/13 11:08:02 leot Exp $
+$NetBSD: distinfo,v 1.12 2019/03/18 10:53:40 leot Exp $
 
 SHA1 (fdm-2.0.tar.gz) = 4da70cca5791457489d9e0a018706a6696609eab
 RMD160 (fdm-2.0.tar.gz) = b07dc4ee0b8de3362177d74bd935d1ae4dad961d
 SHA512 (fdm-2.0.tar.gz) = 9c321dfd200af7b7d396524a43a3ac4b569cddda0a2096122b935e9d7bdb8101f269341fae5bbd4ad8a2947312774da2d49e03eddc67c6ecbce4e1ff9488ebe2
 Size (fdm-2.0.tar.gz) = 180662 bytes
 SHA1 (patch-Makefile.am) = 2169ebc8e7c920cdf8492ee2039b410f5a6e358c
+SHA1 (patch-shm-mmap.c) = d6d961768b60e9174350dc7c6439c2d0be10ae1a

Added files:

Index: pkgsrc/mail/fdm/patches/patch-shm-mmap.c
diff -u /dev/null pkgsrc/mail/fdm/patches/patch-shm-mmap.c:1.1
--- /dev/null   Mon Mar 18 10:53:41 2019
+++ pkgsrc/mail/fdm/patches/patch-shm-mmap.c    Mon Mar 18 10:53:41 2019
@@ -0,0 +1,18 @@
+$NetBSD: patch-shm-mmap.c,v 1.1 2019/03/18 10:53:41 leot Exp $
+
+Adjust mremap(2) usage for NetBSD.
+
+--- shm-mmap.c.orig    2019-02-12 22:08:26.000000000 +0000
++++ shm-mmap.c
+@@ -218,7 +218,11 @@ shm_resize(struct shm *shm, size_t nmemb
+               return (NULL);
+ 
+ #ifdef HAVE_MREMAP
++#if defined(__NetBSD__)
++      shm->data = mremap(shm->data, shm->size, NULL, newsize, 0);
++#else
+       shm->data = mremap(shm->data, shm->size, newsize, MREMAP_MAYMOVE);
++#endif
+ #else
+       shm->data = mmap(NULL, newsize, SHM_PROT, SHM_FLAGS, shm->fd, 0);
+ #endif



Home | Main Index | Thread Index | Old Index