Browse Source

MFH:- Added missing MSG_EOR and MSG_EOF constants

experimental/5.2-WITH_DRCP
Jani Taskinen 19 years ago
parent
commit
c96c5ca91f
  1. 1
      NEWS
  2. 12
      ext/sockets/sockets.c

1
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)

12
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);

Loading…
Cancel
Save