I have updated pkgsrc to 1.8.  I haven't really shaken it out, but it
starts up fine on NetBSD 8 amd64.

I have a stray patch from before.  I am not sure what's going on with
the original visibility define, and why it needs to be different on
sunos.

In general, I lean to not having any visibility defines unless
they are really necessary and then only guarded with ifdefs for where
needed, as once you add one other symbols are hidden.

Also, I typically find that they are added and then not removed, so I
wonder if just removing _XOPEN_SOURCE line results in an ok build on
modern linux.  If not, I would be nice to a) ifdef guard it for linux
and version, and 2) explain what the failure is.

I built on NetBSD 8 w/o any of this (both _XOPEN_SOURCE lines and all
the ifs just plain removed) and it built fine.

It may be that on sunos, not defining _XOPEN_SOURCE is ok, but defining
it without a value is bad.

Thanks,
Greg




$NetBSD: patch-src_gpx.c,v 1.3 2020/03/18 00:02:46 gdt Exp $

This is a build fix for SunOS.
\todo Explain why, and if the new __sun way is correct in general.
\todo File upstream.

--- src/gpx.c.orig      2020-01-30 08:34:43.000000000 +0000
+++ src/gpx.c
@@ -26,7 +26,12 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
  */
+
+#if defined(__sun)
+#define _XOPEN_SOURCE 600
+#else
 #define _XOPEN_SOURCE /* glibc2 needs this */
+#endif
 
 #include "gpx.h"
 #include "viking.h"


_______________________________________________
Viking-devel mailing list
Viking-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/viking-devel
Viking home page: http://viking.sf.net/

Reply via email to