@Miller: are you compiling on a Windows XP machine !?

The #ifdefs would fix the compilation error on Windows XP, but we still have to compile the release on a Windows Vista+ machine to make the IPv6 functionality available. I think Windows XP doesn't even support IPv6 before service pack 3.

IMO, we should finally raise the default WINVER to Windows Vista, at least. Windows XP is *ancient* by now. Recently, even support for Windows 7 has ended...

On macOS, the minimum supported version is 10.6, which is from 2009. Windows XP was first released in 2001...

We might still allow people to compile for Windows XP by overriding WINVER, but it shouldn't be the default anymore.

Christof

On 28.05.2020 13:06, Dan Wilcox wrote:
That sounds good. What do you think Christof? Do you think it would alter any of the default behavior? I have to run so I can't look into this more until later today.

it's easy: AI_ALL and AI_V4MAPPED are only available since Windows Vista.

the default settings compile for Windows2000 (or so).

to compile for windows vista (and aboce), use the following macros
(preferably in the Makefile):
-DWINVER=0x0600 -D_WIN32_WINNT=0x0600

(this is already done in the autotools-Makefile; but afaik not in the
src/makefile.mingw)

alternatively (and probably additionally), the use of these macros
should probably be protected by ifdef clauses.

in iemnet (which has backported some of the new code from s_net.c) i use:

~~~
 hints.ai_flags |= AI_PASSIVE
#ifdef AI_ALL
   | AI_ALL     /* both IPv4 and IPv6 addrs */
#endif
#ifdef AI_V4MAPPED
   | AI_V4MAPPED /* fallback to IPv4-mapped IPv6 addrs */
#endif
   | 0;
~~~

--------
Dan Wilcox
@danomatika
danomatika.com
robotcowboy.com




_______________________________________________
Pd-dev mailing list
Pd-dev@lists.iem.at
https://lists.puredata.info/listinfo/pd-dev