Robert Norris <rw_nor...@hotmail.com> writes: >> #define _XOPEN_SOURCE > > Simply removing it is the best option, as it compiles and runs on Linux OK > without this line. > I've no idea why it was put in, but the line originates from the initial code > creation back in 2005. > Some background on this define: > > https://stackoverflow.com/questions/5378778/what-does-d-xopen-source-do-mean > > So as Viking doesn't use strdup() directly (it uses g_<func>() versions when > available), any usage (or attempt thereof) of _XOPEN_SOURCE is unnecessary. > Even in the very first version of gpx.c, strdup() was not used. > > Admittedly I always wondered a little about this define really meant/what it > was used for, but never bothered to investigate further as it appeared to > 'work'. > > PS. Thanks as always for your pkgsrc efforts
2005 was a really long time ago. So definitely just take it out, and if something turns out to be needed on solaris, somebody can figure out the minimal change. The real point of these defines is to have a program declare the specification it is written so, so that operating systems will hide all symbols and functions etc. that are not mandated by that standard. This checks that the program really is portable. Instead, they often get used when some operating system does not make available extensions by default. However, more or less the norm today is that if POSIX specifies it, and the OS doesn't provide it, the OS should be fixed (and usually is). _______________________________________________ Viking-devel mailing list Viking-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/viking-devel Viking home page: http://viking.sf.net/