git: bc02049bf8bb - main - graphics/inkscape: update to 1.1
Tobias C. Berner
tcberner at gmail.com
Mon Jul 5 04:27:47 UTC 2021
Moin moin
Am Montag, 5. Juli 2021, 04:22:46 CEST schrieb Alexey Dokuchaev:
> On Sun, Jul 04, 2021 at 08:22:15PM +0000, Tobias C. Berner wrote:
> > commit bc02049bf8bbba23d78ca07d75c02d7940b98995
> >
> > graphics/inkscape: update to 1.1
> >
> > ...
> > +-#ifdef __APPLE__
> > ++#if defined(__APPLE__) || defined(__FreeBSD__)
> > + // workaround for
> > + //
> > static_assert(__is_cpp17_forward_iterator<_ForwardIterator>::value
> > + auto const n = std::vector<Inkscape::XML::Node *>(nodes.begin(),
> > nodes.end());
> Interesting... Is this the bug in Clang or Inkscape?
>From what I gather, it seems like it was a way to follow the standard in clang
[1] .
>
> > ++#elif defined(__FreeBSD__)
> > ++ int mib[4] = { CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1 };
> > ++ char buf[MAXPATHLEN];
> > ++ size_t cb = sizeof(buf);
> > ++ if (sysctl(mib, 4, buf, &cb, NULL, 0) == 0) {
> > ++ program_name = realpath(buf, nullptr);
>
> I've recently had to patch one program in a similar way, and it looks
> like returned path is already normalized on FreeBSD, so you don't have
> to call realpath(), contrary to Linux' /proc/self/exe. If the buffer
> is expected to be free()able, s/char buf[...]/char *buf = malloc(...)/
> and change the condition to ``if (!buf || sysctl(...) == -1)'' as they
> both would set errno and thus could be handled in one if().
Indeed, a quick (probably not complete) test agrees with realpath being
unnecessary. I added it to match the NetBSD implementation of the
same [2].
>
> ./danfe
mfg Tobias
[1] https://stackoverflow.com/questions/57596150/why-does-clang-not-like-boosttransform-iterator
[2] https://gitlab.com/inkscape/inkscape/-/commit/
ca31162e74eab75e02a6441a2caf33c56d0f8183
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 618 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freebsd.org/pipermail/dev-commits-ports-all/attachments/20210705/86a2f3e8/attachment-0001.sig>
More information about the dev-commits-ports-all
mailing list