Re: [OpenIndiana-discuss] struct msghdr and _XPG4_2

2016-05-25 Thread Nikola M
On 05/25/16 04:53 PM, Aurélien Larcher wrote: may be incorrect... and so would software written on them. Even on FreeBSD I have seen _XOPEN_SOURCE=500 assuming c99. I think Alexander found more of them hardcoded in source files while testing gcc 5.3... Yikes. That's not right. Compilation envi

Re: [OpenIndiana-discuss] struct msghdr and _XPG4_2

2016-05-25 Thread Alan Coopersmith
On 05/25/16 12:15 AM, Alexander Pyhalov wrote: Hi. It seems illumos/Solaris is the only OS which doesn't have msg_control and msg_controllen in struct msghdr by default. For Solaris 11.x & earlier, yes. Is it because of some standard requirements or just historical artifact? Can we somehow al

Re: [OpenIndiana-discuss] struct msghdr and _XPG4_2

2016-05-25 Thread Aurélien Larcher
On Wed, May 25, 2016 at 4:48 PM, James Carlson wrote: > On 5/25/2016 9:55 AM, Aurélien Larcher wrote: > > On Wed, May 25, 2016 at 3:25 PM, James Carlson > > > wrote: > > > >> It's not terrifically hard to do -- setting -D_XOPEN_SOURCE=600 on a > >> compiler compatible with at least c99 and linki

Re: [OpenIndiana-discuss] struct msghdr and _XPG4_2

2016-05-25 Thread James Carlson
On 5/25/2016 9:55 AM, Aurélien Larcher wrote: > On Wed, May 25, 2016 at 3:25 PM, James Carlson > wrote: > >> It's not terrifically hard to do -- setting -D_XOPEN_SOURCE=600 on a >> compiler compatible with at least c99 and linking with -lxnet should set >> you up with a SUSv3 environment -- but,

Re: [OpenIndiana-discuss] struct msghdr and _XPG4_2

2016-05-25 Thread Aurélien Larcher
On Wed, May 25, 2016 at 3:25 PM, James Carlson wrote: > On 5/25/2016 4:13 AM, Alexander Pyhalov wrote: > > The issue here is that illumos tries to be compatible with I don't know > > what. So instead of POSIX-complying OS we have an OS which has interface > > compatible to I don't know what (SunO

Re: [OpenIndiana-discuss] struct msghdr and _XPG4_2

2016-05-25 Thread James Carlson
On 5/25/2016 4:13 AM, Alexander Pyhalov wrote: > The issue here is that illumos tries to be compatible with I don't know > what. So instead of POSIX-complying OS we have an OS which has interface > compatible to I don't know what (SunOS 4? something prehistoric?), which > doesn't work for applicati

Re: [OpenIndiana-discuss] struct msghdr and _XPG4_2

2016-05-25 Thread Alexander Pyhalov
On 05/25/2016 11:04, the outsider wrote: Interesting topic! A quick search brought me this: https://bugs.php.net/bug.php?id=66013 (but it seems you found it too) It seems you are bound to XPG4_2... http://docs.oracle.com/cd/E19253-01/817-4415/sockets-27/index.html http://linux.die.net/man/2/re

Re: [OpenIndiana-discuss] struct msghdr and _XPG4_2

2016-05-25 Thread the outsider
http://stackoverflow.com/questions/1034587/how-does-xpg4-2-and-other-defines -work-on-solaris -Oorspronkelijk bericht- Van: Alexander Pyhalov [mailto:a...@rsu.ru] Verzonden: woensdag 25 mei 2016 9:16 Aan: Discussion list for OpenIndiana Onderwerp: [OpenIndiana-discuss] struct msghdr

Re: [OpenIndiana-discuss] struct msghdr and _XPG4_2

2016-05-25 Thread the outsider
ssion list for OpenIndiana Onderwerp: [OpenIndiana-discuss] struct msghdr and _XPG4_2 Hi. It seems illumos/Solaris is the only OS which doesn't have msg_control and msg_controllen in struct msghdr by default. So, code like this (this time taken from scrren), fails. struct sockaddr_un a;

[OpenIndiana-discuss] struct msghdr and _XPG4_2

2016-05-25 Thread Alexander Pyhalov
Hi. It seems illumos/Solaris is the only OS which doesn't have msg_control and msg_controllen in struct msghdr by default. So, code like this (this time taken from scrren), fails. struct sockaddr_un a; struct msghdr msg; struct iovec iov; char control[1024]; len = sizeof(a); debug