From: Jani Taskinen Date: Tue, 24 Jul 2007 11:35:08 +0000 (+0000) Subject: MFH:- Added missing MSG_EOR and MSG_EOF constants X-Git-Tag: php-5.2.4RC1~62 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c96c5ca91f943e804e9891e4ad8ffa49a7353835;p=php MFH:- Added missing MSG_EOR and MSG_EOF constants --- diff --git a/NEWS b/NEWS index 5e624fa823..50c4767844 100644 --- a/NEWS +++ b/NEWS @@ -30,6 +30,7 @@ PHP NEWS - Added missing error check inside bcpowmod(). (Ilia) - Added CURLOPT_PRIVATE & CURLINFO_PRIVATE constants. (Andrey A. Belashkov, Tony) +- Added missing MSG_EOR and MSG_EOF constants to sockets extension. (Jani) - Implemented FR #41884 (ReflectionClass::getDefaultProperties() does not handle static attributes). (Tony) diff --git a/ext/sockets/sockets.c b/ext/sockets/sockets.c index 3a467de4df..d5f3dcadea 100644 --- a/ext/sockets/sockets.c +++ b/ext/sockets/sockets.c @@ -68,6 +68,12 @@ static PHP_GINIT_FUNCTION(sockets); #endif #endif +#ifndef MSG_EOF +#ifdef MSG_FIN +#define MSG_EOF MSG_FIN +#endif +#endif + #ifndef SUN_LEN #define SUN_LEN(su) (sizeof(*(su)) - sizeof((su)->sun_path) + strlen((su)->sun_path)) #endif @@ -480,6 +486,12 @@ PHP_MINIT_FUNCTION(sockets) REGISTER_LONG_CONSTANT("MSG_WAITALL", MSG_WAITALL, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("MSG_PEEK", MSG_PEEK, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("MSG_DONTROUTE", MSG_DONTROUTE, CONST_CS | CONST_PERSISTENT); +#ifdef MSG_EOR + REGISTER_LONG_CONSTANT("MSG_EOR", MSG_EOR, CONST_CS | CONST_PERSISTENT); +#endif +#ifdef MSG_EOF + REGISTER_LONG_CONSTANT("MSG_EOF", MSG_EOF, CONST_CS | CONST_PERSISTENT); +#endif REGISTER_LONG_CONSTANT("SO_DEBUG", SO_DEBUG, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("SO_REUSEADDR", SO_REUSEADDR, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("SO_KEEPALIVE", SO_KEEPALIVE, CONST_CS | CONST_PERSISTENT);