Sat Sep 9 19:45:46 2017 UTC ()
Make this build.
(dholland)
diff -r1.5 -r1.6 pkgsrc/devel/sfslite/distinfo
diff -r1.1.1.1 -r1.2 pkgsrc/devel/sfslite/patches/patch-aa
diff -r0 -r1.1 pkgsrc/devel/sfslite/patches/patch-async_aio.C
diff -r0 -r1.1 pkgsrc/devel/sfslite/patches/patch-async_daemonize.C
diff -r0 -r1.1 pkgsrc/devel/sfslite/patches/patch-async_dns.C
diff -r0 -r1.1 pkgsrc/devel/sfslite/patches/patch-async_dnsparse.C
diff -r0 -r1.1 pkgsrc/devel/sfslite/patches/patch-async_ifchg.C
diff -r0 -r1.1 pkgsrc/devel/sfslite/patches/patch-async_ihash.C
diff -r0 -r1.1 pkgsrc/devel/sfslite/patches/patch-async_myname.C
diff -r0 -r1.1 pkgsrc/devel/sfslite/patches/patch-configure
diff -r0 -r1.1 pkgsrc/devel/sfslite/patches/patch-configure.in
diff -r1.1 -r1.2 pkgsrc/devel/sfslite/patches/patch-async_ihash.h
--- pkgsrc/devel/sfslite/Attic/distinfo 2015/11/03 03:29:32 1.5
+++ pkgsrc/devel/sfslite/Attic/distinfo 2017/09/09 19:45:46 1.6
| @@ -1,15 +1,24 @@ | | | @@ -1,15 +1,24 @@ |
1 | $NetBSD: distinfo,v 1.5 2015/11/03 03:29:32 agc Exp $ | | 1 | $NetBSD: distinfo,v 1.6 2017/09/09 19:45:46 dholland Exp $ |
2 | | | 2 | |
3 | SHA1 (sfslite-1.2.7.tar.gz) = 774c1defc74d9f354622f60aa5c038400b401c5b | | 3 | SHA1 (sfslite-1.2.7.tar.gz) = 774c1defc74d9f354622f60aa5c038400b401c5b |
4 | RMD160 (sfslite-1.2.7.tar.gz) = 3e72a4d6cb0975c13b51f13ff615e8a390c36e3b | | 4 | RMD160 (sfslite-1.2.7.tar.gz) = 3e72a4d6cb0975c13b51f13ff615e8a390c36e3b |
5 | SHA512 (sfslite-1.2.7.tar.gz) = b2cd6d60a4349bdc54d973656fffdad9e4a4304dfa0cc8e27584e65bdd1359c2bd2be9552bd42fdd89475929b793509dd01589afe4cb72bb8ba14fca36ccb171 | | 5 | SHA512 (sfslite-1.2.7.tar.gz) = b2cd6d60a4349bdc54d973656fffdad9e4a4304dfa0cc8e27584e65bdd1359c2bd2be9552bd42fdd89475929b793509dd01589afe4cb72bb8ba14fca36ccb171 |
6 | Size (sfslite-1.2.7.tar.gz) = 1379432 bytes | | 6 | Size (sfslite-1.2.7.tar.gz) = 1379432 bytes |
7 | SHA1 (patch-aa) = 9c13092b1fe5e9d7c25eea9293fadbbaab096299 | | 7 | SHA1 (patch-aa) = fa1f4a82d0d97375dafa972049aedc7ac0e80885 |
8 | SHA1 (patch-ab) = 0bfc67711150e5dc8eb74fba29e9abd5272e62db | | 8 | SHA1 (patch-ab) = 0bfc67711150e5dc8eb74fba29e9abd5272e62db |
9 | SHA1 (patch-ac) = 88294e8dc9785a68019f66d0513c6d043a6b9f2e | | 9 | SHA1 (patch-ac) = 88294e8dc9785a68019f66d0513c6d043a6b9f2e |
10 | SHA1 (patch-async_ihash.h) = 6ae910ad516739f04f0fd29849912c8eb457eca2 | | 10 | SHA1 (patch-async_aio.C) = e35510da5504d401f9fdac6b9cb296bdb4f9b703 |
| | | 11 | SHA1 (patch-async_daemonize.C) = db816068eaee9c0096234795c725925ced6133ca |
| | | 12 | SHA1 (patch-async_dns.C) = 6eb8ef8a772a6a83942d4335fd126717dae6e805 |
| | | 13 | SHA1 (patch-async_dnsparse.C) = 77dce63d143882a3fd531a78ef0a5b8edc48de1f |
| | | 14 | SHA1 (patch-async_ifchg.C) = f941daa091908612a783bba57dbcf3bf92db3aaa |
| | | 15 | SHA1 (patch-async_ihash.C) = 6365eadd3da6e765766f529311d58043a9b108ec |
| | | 16 | SHA1 (patch-async_ihash.h) = 027b7b270804ebf11ba1d2e5b7ac26a025abfcda |
11 | SHA1 (patch-async_itree.h) = a777c376d2e8ac2a4ffdd84ec319325edc2ebb9b | | 17 | SHA1 (patch-async_itree.h) = a777c376d2e8ac2a4ffdd84ec319325edc2ebb9b |
| | | 18 | SHA1 (patch-async_myname.C) = 0530b7a4bf43e99ff6a2ade6846db6af15fe4e6d |
12 | SHA1 (patch-async_qhash.h) = c145936da65369dce93092df3535e6fad921d030 | | 19 | SHA1 (patch-async_qhash.h) = c145936da65369dce93092df3535e6fad921d030 |
13 | SHA1 (patch-async_rwfd_c) = be0075129d6bfe3eda7f86721a8a977acd5296d2 | | 20 | SHA1 (patch-async_rwfd_c) = be0075129d6bfe3eda7f86721a8a977acd5296d2 |
14 | SHA1 (patch-async_vec.h) = 6f73867864f650de1c760228fc2f39f951554df5 | | 21 | SHA1 (patch-async_vec.h) = 6f73867864f650de1c760228fc2f39f951554df5 |
| | | 22 | SHA1 (patch-configure) = 5fbf91e7b0d215a724814c36a55110df0f3409b8 |
| | | 23 | SHA1 (patch-configure.in) = a0f282d9a5fcd9843be8373ebe55511f8c9cad23 |
15 | SHA1 (patch-libsafeptr_sp__gc.h) = 1194e270b3869b26fce2f2fb6680f599a5dc675e | | 24 | SHA1 (patch-libsafeptr_sp__gc.h) = 1194e270b3869b26fce2f2fb6680f599a5dc675e |
--- pkgsrc/devel/sfslite/patches/Attic/patch-aa 2012/05/07 07:25:55 1.1.1.1
+++ pkgsrc/devel/sfslite/patches/Attic/patch-aa 2017/09/09 19:45:46 1.2
| @@ -1,15 +1,45 @@ | | | @@ -1,15 +1,45 @@ |
1 | $NetBSD: patch-aa,v 1.1.1.1 2012/05/07 07:25:55 agc Exp $ | | 1 | $NetBSD: patch-aa,v 1.2 2017/09/09 19:45:46 dholland Exp $ |
2 | | | 2 | |
3 | Old C++ warning | | 3 | Clean up %m abuse. |
| | | 4 | XXX: third hunk's purpose is unknown. |
4 | | | 5 | |
5 | --- async/myaddrs.C 2012/03/28 12:41:30 1.1 | | 6 | --- async/myaddrs.C.orig 2009-02-12 13:20:42.000000000 +0000 |
6 | +++ async/myaddrs.C 2012/03/28 12:42:18 | | 7 | +++ async/myaddrs.C |
7 | @@ -74,7 +74,7 @@ | | 8 | @@ -41,7 +41,7 @@ myipaddrs (vec<in_addr> *res) |
| | | 9 | int s; |
| | | 10 | |
| | | 11 | if ((s = socket (AF_INET, SOCK_DGRAM, 0)) < 0) { |
| | | 12 | - warn ("socket: %m\n"); |
| | | 13 | + warn ("socket: %s\n", strerror(errno)); |
| | | 14 | return false; |
| | | 15 | } |
| | | 16 | |
| | | 17 | @@ -53,7 +53,7 @@ myipaddrs (vec<in_addr> *res) |
| | | 18 | xfree (ifc.ifc_buf); |
| | | 19 | ifc.ifc_buf = (char *) xmalloc (ifc.ifc_len); |
| | | 20 | if (ioctl (s, SIOCGIFCONF, &ifc) < 0) { |
| | | 21 | - warn ("SIOCGIFCONF: %m\n"); |
| | | 22 | + warn ("SIOCGIFCONF: %s\n", strerror(errno)); |
| | | 23 | close (s); |
| | | 24 | xfree (ifc.ifc_buf); |
| | | 25 | return false; |
| | | 26 | @@ -74,7 +74,7 @@ myipaddrs (vec<in_addr> *res) |
8 | res->clear (); | | 27 | res->clear (); |
9 | bhash<in_addr> addrs; | | 28 | bhash<in_addr> addrs; |
10 | | | 29 | |
11 | - p = ifc.ifc_buf; | | 30 | - p = ifc.ifc_buf; |
12 | + p = (char *)(void *)ifc.ifc_buf; | | 31 | + p = (char *)(void *)ifc.ifc_buf; |
13 | e = p + ifc.ifc_len; | | 32 | e = p + ifc.ifc_len; |
14 | while (p < e) { | | 33 | while (p < e) { |
15 | struct ifreq *ifrp = (struct ifreq *) p; | | 34 | struct ifreq *ifrp = (struct ifreq *) p; |
| | | 35 | @@ -88,8 +88,8 @@ myipaddrs (vec<in_addr> *res) |
| | | 36 | if (ifrp->ifr_addr.sa_family != AF_INET) |
| | | 37 | continue; |
| | | 38 | if (ioctl (s, SIOCGIFFLAGS, &ifr) < 0) { |
| | | 39 | - warn ("SIOCGIFFLAGS (%.*s): %m\n", (int) sizeof (ifr.ifr_name), |
| | | 40 | - ifr.ifr_name); |
| | | 41 | + warn ("SIOCGIFFLAGS (%.*s): %s\n", (int) sizeof (ifr.ifr_name), |
| | | 42 | + ifr.ifr_name, strerror(errno)); |
| | | 43 | continue; |
| | | 44 | } |
| | | 45 | in_addr a = ((struct sockaddr_in *) &ifrp->ifr_addr)->sin_addr; |
$NetBSD: patch-async_aio.C,v 1.1 2017/09/09 19:45:46 dholland Exp $
Clean up %m abuse.
--- async/aio.C~ 2009-02-12 13:20:42.000000000 +0000
+++ async/aio.C
@@ -21,6 +21,7 @@
*
*/
+#include <cstring>
#include "aiod.h"
aiobuf::aiobuf (aiod *d, size_t p, size_t l)
@@ -62,7 +63,7 @@ aiod::writeq::output ()
wbuf.copyout (buf, wsize);
ssize_t n = write (wfd, buf, wsize);
if (n < 0)
- fatal ("write to aiod failed (%m)\n"); // XXX - should make aiod fail
+ fatal ("write to aiod failed (%s)\n", strerror(errno)); // XXX - should make aiod fail
wbuf.rembytes (n);
if (!wbuf.resid ())
fdcb (wfd, selwrite, NULL);
@@ -81,7 +82,7 @@ aiod::writeq::sendmsg (aiomsg_t msg)
else {
ssize_t n = write (wfd, &msg, sizeof (msg));
if (n < 0)
- fatal ("write to aiod failed (%m)\n");
+ fatal ("write to aiod failed (%s)\n", strerror(errno));
if (n != sizeof (msg)) {
// Writes less than PIPE_BUF were supposed to be atomic
warn ("aiod::writeq::sendmsg: partial write (%d bytes)\n", (int) n);
@@ -98,7 +99,7 @@ aiod::daemon::launch (str path, int shmf
int fds[2];
if (socketpair (AF_UNIX, SOCK_STREAM, 0, fds) < 0)
- fatal ("aiod::daemon::launch: socketpair failed: %m\n");
+ fatal ("aiod::daemon::launch: socketpair failed: %s\n", strerror(errno));
wq.wfd = fd = fds[0];
close_on_exec (fd);
@@ -166,24 +167,24 @@ aiod::aiod (u_int nproc, ssize_t shmsize
xfree (temp);
}
if (!tmpfile)
- fatal ("aiod: could not create temporary file: %m\n");
+ fatal ("aiod: could not create temporary file: %s\n", strerror(errno));
umask (m);
close_on_exec (shmfd);
if (ftruncate (shmfd, shmmax) < 0)
- fatal ("aiod: could not grow shared mem file (%m)\n");
+ fatal ("aiod: could not grow shared mem file (%s)\n", strerror(errno));
struct stat sb;
if (fstat (shmfd, &sb) < 0)
- fatal ("fstat (%s): %m\n", tmpfile.cstr ());
+ fatal ("fstat (%s): %s\n", tmpfile.cstr (), strerror(errno));
shmbuf = static_cast<char *>
(mmap (NULL, (size_t) shmmax, PROT_READ|PROT_WRITE,
MAP_FILE|MAP_SHARED, shmfd, 0));
if (shmbuf == (char *) MAP_FAILED)
- fatal ("aiod: could not mmap shared mem file (%m)\n");
+ fatal ("aiod: could not mmap shared mem file (%s)\n", strerror(errno));
int fds[2];
if (pipe (fds) < 0)
- fatal ("aiod: pipe syscall failed: %m\n");
+ fatal ("aiod: pipe syscall failed: %s\n", strerror(errno));
wq.wfd = fds[1];
close_on_exec (wq.wfd);
int rfd = fds[0];
@@ -201,10 +202,10 @@ aiod::aiod (u_int nproc, ssize_t shmsize
* wherever possible we use flock as it is faster.) */
int fd = ::open (tmpfile, O_RDWR);
if (fd < 0)
- fatal ("cannot reopen %s: %m\n", tmpfile.cstr ());
+ fatal ("cannot reopen %s: %s\n", tmpfile.cstr (), strerror(errno));
struct stat sb2;
if (fstat (fd, &sb2) < 0)
- fatal ("fstat (%s): %m\n", tmpfile.cstr ());
+ fatal ("fstat (%s): %s\n", tmpfile.cstr (), strerror(errno));
if (sb.st_dev != sb2.st_dev || sb.st_ino != sb2.st_ino)
fatal ("aiod: somone tampered with %s\n", tmpfile.cstr ());
@@ -223,14 +224,14 @@ aiod::aiod (u_int nproc, ssize_t shmsize
* consuming disk space to make sure it gets garbage collected
* properly. */
if (::unlink (tmpfile) < 0)
- fatal ("aiod: unlink (%s): %m\n", tmpfile.cstr ());
+ fatal ("aiod: unlink (%s): %s\n", tmpfile.cstr (), strerror(errno));
}
aiod::~aiod ()
{
fail ();
if (munmap (shmbuf, shmlen) < 0)
- warn ("~aiod could not unmap shared mem: %m\n");
+ warn ("~aiod could not unmap shared mem: %s\n", strerror(errno));
close (shmfd);
delete[] dv;
}
@@ -267,7 +268,7 @@ aiod::input (int i)
ssize_t n = read (dv[i].fd, buf, sizeof (buf));
if (n <= 0) {
if (n < 0)
- warn ("aiod: read: %m\n");
+ warn ("aiod: read: %s\n", strerror(errno));
else
warn ("aiod: EOF\n");
fail ();
@@ -469,7 +470,7 @@ aiod::bufalloc_cb2 (size_t inc, ptr<aiob
bb.settotsize (shmlen + inc);
shmlen = bb.gettotsize ();
if (shmpin && mlock (shmbuf + oshmlen, shmlen - oshmlen) < 0)
- warn ("could not pin aiod shared memory: %m\n");
+ warn ("could not pin aiod shared memory: %s\n", strerror(errno));
bufwake ();
}
}
$NetBSD: patch-async_daemonize.C,v 1.1 2017/09/09 19:45:46 dholland Exp $
Clean up %m abuse.
--- async/daemonize.C~ 2009-02-12 13:20:42.000000000 +0000
+++ async/daemonize.C
@@ -21,6 +21,7 @@
*
*/
+#include <cstring>
#include "async.h"
str syslog_priority ("daemon.notice");
@@ -31,7 +32,7 @@ start_log_to_file (const str &line, cons
int fd;
int n;
if ((fd = open (logfile.cstr (), flags, m)) < 0) {
- warn ("%s: %m\n", logfile.cstr ());
+ warn ("%s: %s\n", logfile.cstr (), strerror(errno));
fd = errfd;
} else {
warn << "Logging via logfile: " << logfile << "\n";
@@ -65,7 +66,7 @@ start_logger (const str &priority, const
pid_t pid;
int status;
if ((pid = spawn (PATH_LOGGER, av, 0, 0, errfd)) < 0) {
- warn ("%s: %m\n", PATH_LOGGER);
+ warn ("%s: %s\n", PATH_LOGGER, strerror(errno));
return start_log_to_file (line, logfile, flags, mode);
}
if (waitpid (pid, &status, 0) <= 0 || !WIFEXITED (status) ||
@@ -74,7 +75,7 @@ start_logger (const str &priority, const
int fds[2];
if (socketpair (AF_UNIX, SOCK_STREAM, 0, fds) < 0)
- fatal ("socketpair: %m\n");
+ fatal ("socketpair: %s\n", strerror(errno));
close_on_exec (fds[0]);
if (fds[1] != 0)
close_on_exec (fds[1]);
@@ -84,7 +85,7 @@ start_logger (const str &priority, const
close (fds[1]);
return fds[0];
} else
- warn ("%s: %m\n", PATH_LOGGER);
+ warn ("%s: %s\n", PATH_LOGGER, strerror(errno));
#endif /* PATH_LOGGER */
return start_log_to_file (line, logfile, flags, mode);
}
@@ -103,7 +104,7 @@ start_logger ()
close (fd);
if (socketpair (AF_UNIX, SOCK_STREAM, 0, fds) < 0)
- fatal ("socketpair: %m\n");
+ fatal ("socketpair: %s\n", strerror(errno));
close_on_exec (fds[0]);
if (fds[1] != 0)
close_on_exec (fds[1]);
@@ -113,7 +114,7 @@ start_logger ()
if (fds[0] != errfd) {
err_flush (); // XXX - we shouldn't depend on aerr.C
if (dup2 (fds[0], errfd) < 0)
- fatal ("dup2: %m\n");
+ fatal ("dup2: %s\n", strerror(errno));
close (fds[0]);
}
if (errfd != 1)
@@ -121,7 +122,7 @@ start_logger ()
return;
}
else
- warn ("%s: %m\n", PATH_LOGGER);
+ warn ("%s: %s\n", PATH_LOGGER, strerror(errno));
#endif /* PATH_LOGGER */
/* No logger, at least send chatter to stdout rather than stderr, so
@@ -161,13 +162,13 @@ daemonize (const str &nm)
default:
_exit (0);
case -1:
- fatal ("fork: %m\n");
+ fatal ("fork: %s\n", strerror(errno));
case 0:
break;
}
if (setsid () == -1)
- fatal ("setsid: %m\n");
+ fatal ("setsid: %s\n", strerror(errno));
if (!builddir) {
start_logger ();
str path = strbuf () << PIDDIR << "/" << pidfilebase << ".pid";
$NetBSD: patch-async_dns.C,v 1.1 2017/09/09 19:45:46 dholland Exp $
Clean up %m abuse.
--- async/dns.C~ 2009-02-12 13:20:42.000000000 +0000
+++ async/dns.C
@@ -156,13 +156,13 @@ resolver::udpinit ()
udpsock = NULL;
int fd = socket (addr->sa_family, SOCK_DGRAM, 0);
if (fd < 0) {
- warn ("resolver::udpsock: socket: %m\n");
+ warn ("resolver::udpsock: socket: %s\n", strerror(errno));
return false;
}
make_async (fd);
close_on_exec (fd);
if (connect (fd, addr, addrlen) < 0) {
- warn ("resolver::udpsock: connect: %m\n");
+ warn ("resolver::udpsock: connect: %s\n", strerror(errno));
close (fd);
return false;
}
@@ -177,7 +177,7 @@ resolver::tcpinit ()
tcpsock = NULL;
int fd = socket (addr->sa_family, SOCK_STREAM, 0);
if (fd < 0) {
- warn ("resolver::tcpsock: socket: %m\n");
+ warn ("resolver::tcpsock: socket: %s\n", strerror(errno));
return false;
}
make_async (fd);
@@ -415,7 +415,7 @@ resolv_conf::reload_cb (ref<bool> d, boo
reload_lock = false;
last_reload = sfs_get_timenow();
if (!newres) {
- warn ("resolv_conf::reload_cb: fork: %m\n");
+ warn ("resolv_conf::reload_cb: fork: %s\n", strerror(errno));
setsock (true);
return;
}
$NetBSD: patch-async_dnsparse.C,v 1.1 2017/09/09 19:45:46 dholland Exp $
Fix up illegal pointer aliasing.
--- async/dnsparse.C~ 2009-02-12 13:20:42.000000000 +0000
+++ async/dnsparse.C
@@ -757,10 +757,15 @@ printaddrs (const char *msg, ptr<hostent
void
printhints (addrhint **hpp)
{
- for (; *hpp; hpp++)
- if ((*hpp)->h_addrtype == AF_INET)
+ in_addr ia;
+
+ for (; *hpp; hpp++) {
+ if ((*hpp)->h_addrtype == AF_INET) {
+ memcpy(&ia, (*hpp)->h_address, sizeof(ia));
printf (" (hint: %s %s)\n", (*hpp)->h_name,
- inet_ntoa (*(in_addr *) (*hpp)->h_address));
+ inet_ntoa (ia));
+ }
+ }
}
void
$NetBSD: patch-async_ifchg.C,v 1.1 2017/09/09 19:45:46 dholland Exp $
Clean up %m abuse.
--- async/ifchg.C~ 2009-02-12 13:20:42.000000000 +0000
+++ async/ifchg.C
@@ -21,6 +21,7 @@
*
*/
+#include <cstring>
#include "async.h"
#include "dns.h"
#include "list.h"
@@ -74,7 +75,7 @@ ifchgcb (cbv cb)
{
if (!lazy) {
if (!myipaddrs (&ifchg_addrs))
- fatal ("myipaddrs: %m\n");
+ fatal ("myipaddrs: %s\n", strerror(errno));
lazy = lazycb (60, wrap (ifchgcb_test));
}
ifchgcb_t *chg = New ifchgcb_t (cb);
$NetBSD: patch-async_ihash.C,v 1.1 2017/09/09 19:45:46 dholland Exp $
Use legal C++ syntax.
--- async/ihash.C~ 2009-02-23 16:26:42.000000000 +0000
+++ async/ihash.C
@@ -53,7 +53,7 @@ _ihash_grow (_ihash_table *htp, const si
nbuckets = 3;
}
- ntab = New (void * [nbuckets]);
+ ntab = New void * [nbuckets];
bzero (ntab, nbuckets * sizeof (*ntab));
for (i = 0; i < htp->buckets; i++)
$NetBSD: patch-async_myname.C,v 1.1 2017/09/09 19:45:46 dholland Exp $
Clean up %m abuse.
--- async/myname.C~ 2009-02-12 13:20:42.000000000 +0000
+++ async/myname.C
@@ -21,6 +21,7 @@
*
*/
+#include <cstring>
#include "dns.h"
str
@@ -42,7 +43,7 @@ myname ()
char namebuf[MAXHOSTNAMELEN+1];
namebuf[MAXHOSTNAMELEN] = '\0';
if (gethostname (namebuf, MAXHOSTNAMELEN) < 0)
- panic ("gethostname: %m\n");
+ panic ("gethostname: %s\n", strerror(errno));
if (strchr (namebuf, '.'))
return namebuf;
$NetBSD: patch-configure,v 1.1 2017/09/09 19:45:46 dholland Exp $
Don't trash LDFLAGS.
--- configure~ 2009-06-09 14:29:57.000000000 +0000
+++ configure
@@ -35514,9 +35514,9 @@ for flag in $LDFLAGS; do
LIBAPM=
new_LDFLAGS="$new_LDFLAGS -all-static"
else
- new_LDFLAGS=" $flag"
+ new_LDFLAGS="$new_LDFLAGS $flag"
fi
done
LDFLAGS="$new_LDFLAGS"
{ $as_echo "$as_me:$LINENO: checking for MAP_NOSYNC option" >&5
$NetBSD: patch-configure.in,v 1.1 2017/09/09 19:45:46 dholland Exp $
Don't trash LDFLAGS.
--- configure.in~ 2009-06-09 14:29:36.000000000 +0000
+++ configure.in
@@ -347,7 +347,7 @@ for flag in $LDFLAGS; do
LIBAPM=
new_LDFLAGS="$new_LDFLAGS -all-static"
else
- new_LDFLAGS=" $flag"
+ new_LDFLAGS="$new_LDFLAGS $flag"
fi
done
LDFLAGS="$new_LDFLAGS"
--- pkgsrc/devel/sfslite/patches/Attic/patch-async_ihash.h 2013/03/28 21:21:18 1.1
+++ pkgsrc/devel/sfslite/patches/Attic/patch-async_ihash.h 2017/09/09 19:45:46 1.2
| @@ -1,16 +1,18 @@ | | | @@ -1,16 +1,18 @@ |
1 | $NetBSD: patch-async_ihash.h,v 1.1 2013/03/28 21:21:18 joerg Exp $ | | 1 | $NetBSD: patch-async_ihash.h,v 1.2 2017/09/09 19:45:46 dholland Exp $ |
2 | | | 2 | |
3 | --- async/ihash.h.orig 2013-03-25 14:13:37.000000000 +0000 | | 3 | Catch up to C++ standards drift. |
| | | 4 | |
| | | 5 | --- async/ihash.h.orig 2009-02-23 16:26:42.000000000 +0000 |
4 | +++ async/ihash.h | | 6 | +++ async/ihash.h |
5 | @@ -248,7 +248,7 @@ public: | | 7 | @@ -248,7 +248,7 @@ public: |
6 | ihash () : eq (E ()), hash (H ()) {} | | 8 | ihash () : eq (E ()), hash (H ()) {} |
7 | ihash (const E &e, const H &h) : eq (e), hash (h) {} | | 9 | ihash (const E &e, const H &h) : eq (e), hash (h) {} |
8 | | | 10 | |
9 | - bool insert (V *elm) { return insert_val (elm, hash (elm->*key)); } | | 11 | - bool insert (V *elm) { return insert_val (elm, hash (elm->*key)); } |
10 | + bool insert (V *elm) { return this->insert_val (elm, hash (elm->*key)); } | | 12 | + bool insert (V *elm) { return this->insert_val (elm, hash (elm->*key)); } |
11 | | | 13 | |
12 | #if 0 | | 14 | #if 0 |
13 | template<class T> V *operator[] (const T &k) const { | | 15 | template<class T> V *operator[] (const T &k) const { |
14 | @@ -256,16 +256,16 @@ public: | | 16 | @@ -256,16 +256,16 @@ public: |
15 | V *operator[] (const K &k) const { | | 17 | V *operator[] (const K &k) const { |
16 | #endif | | 18 | #endif |
| @@ -21,13 +23,64 @@ $NetBSD: patch-async_ihash.h,v 1.1 2013/ | | | @@ -21,13 +23,64 @@ $NetBSD: patch-async_ihash.h,v 1.1 2013/ |
21 | - v = next_val (v)) | | 23 | - v = next_val (v)) |
22 | + v = this->next_val (v)) | | 24 | + v = this->next_val (v)) |
23 | ; | | 25 | ; |
24 | return v; | | 26 | return v; |
25 | } | | 27 | } |
26 | | | 28 | |
27 | V *nextkeq (V *v) { | | 29 | V *nextkeq (V *v) { |
28 | const K &k = v->*key; | | 30 | const K &k = v->*key; |
29 | - while ((v = next_val (v)) && !eq (k, v->*key)) | | 31 | - while ((v = next_val (v)) && !eq (k, v->*key)) |
30 | + while ((v = this->next_val (v)) && !eq (k, v->*key)) | | 32 | + while ((v = this->next_val (v)) && !eq (k, v->*key)) |
31 | ; | | 33 | ; |
32 | return v; | | 34 | return v; |
33 | }; | | 35 | }; |
| | | 36 | @@ -287,13 +287,13 @@ public: |
| | | 37 | : eq1 (e1), eq2 (e2), hash (h) {} |
| | | 38 | |
| | | 39 | void insert (V *elm) |
| | | 40 | - { insert_val (elm, hash (elm->*key1, elm->*key2)); } |
| | | 41 | + { this->insert_val (elm, hash (elm->*key1, elm->*key2)); } |
| | | 42 | |
| | | 43 | V *operator() (const K1 &k1, const K2 &k2) const { |
| | | 44 | V *v; |
| | | 45 | - for (v = lookup_val (hash (k1, k2)); |
| | | 46 | + for (v = this->lookup_val (hash (k1, k2)); |
| | | 47 | v && !(eq1 (k1, v->*key1) && eq2 (k2, v->*key2)); |
| | | 48 | - v = next_val (v)) |
| | | 49 | + v = this->next_val (v)) |
| | | 50 | ; |
| | | 51 | return v; |
| | | 52 | } |
| | | 53 | @@ -301,7 +301,7 @@ public: |
| | | 54 | V *nextkeq (V *v) { |
| | | 55 | const K1 &k1 = v->*key1; |
| | | 56 | const K1 &k2 = v->*key2; |
| | | 57 | - while ((v = next_val (v)) |
| | | 58 | + while ((v = this->next_val (v)) |
| | | 59 | && !(eq1 (k1, v->*key1) && eq2 (k2, v->*key2))) |
| | | 60 | ; |
| | | 61 | return v; |
| | | 62 | @@ -320,20 +320,20 @@ public: |
| | | 63 | shash () {} |
| | | 64 | shash (const E &e, const H &h) : eq (e), hash (h) {} |
| | | 65 | |
| | | 66 | - void insert (V *elm) { insert_val (elm, hash (*elm)); } |
| | | 67 | + void insert (V *elm) { this->insert_val (elm, hash (*elm)); } |
| | | 68 | |
| | | 69 | V *operator[] (const V &k) const { |
| | | 70 | V *v; |
| | | 71 | - for (v = lookup_val (hash (k)); |
| | | 72 | + for (v = this->lookup_val (hash (k)); |
| | | 73 | v && !eq (k, *v); |
| | | 74 | - v = next_val (v)) |
| | | 75 | + v = this->next_val (v)) |
| | | 76 | ; |
| | | 77 | return v; |
| | | 78 | } |
| | | 79 | |
| | | 80 | V *nextkeq (V *v) { |
| | | 81 | const V &k = *v; |
| | | 82 | - while ((v = next_val (v)) && !eq (k, *v)) |
| | | 83 | + while ((v = this->next_val (v)) && !eq (k, *v)) |
| | | 84 | ; |
| | | 85 | return v; |
| | | 86 | } |