Re: Re: ext/sysvmsg
| From: | Sascha Schumann | Date: | Tue, 08 Oct 2002 16:56:30 +0000 |
| Subject: | Re: Re: ext/sysvmsg | ||
| References: | 1 | Groups: | php.dev php.qa |
| Request: | Send a blank email to php-dev+get-89235@lists.php.net to get a copy of this message | ||
> The struct msgbuf as defined, for example here:
> http://ou800doc.caldera.com/cgi-bin/man/man?msgop+2
>
> defines mtext member as mtext[] while FreeBSD defines it as mtext[1].
Yes, mtext[] is not a valid ISO C construct.
The structures of the SysV IPC interfaces are generally not
defined by system headers, although some implementations
choose to provide them.
Thus the rule should be: If autoconf finds the definition, we
use it, otherwise we rely on our own, namespace-protected
version. Example:
#ifdef HAVE_STRUCT_SYSMSG
typedef struct sysmsg php_sysmsg;
#else
typedef struct {
long mtype;
char mtext[1];
} php_sysmsg;
#endif
> Shall I revert the patch?
Unless it decreases the quality of the code, it should stay
in (I have not looked at it myself).
- Sascha