summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJani Taskinen <jani@php.net>2007-07-24 11:35:08 +0000
committerJani Taskinen <jani@php.net>2007-07-24 11:35:08 +0000
commitc96c5ca91f943e804e9891e4ad8ffa49a7353835 (patch)
tree9f9b45ff63a2c4ea35c0b58b9305cfc8fd6c3b5a
parent10da2d994b45e774085cc9aa608de2b9e65dff44 (diff)
downloadphp-git-c96c5ca91f943e804e9891e4ad8ffa49a7353835.tar.gz
MFH:- Added missing MSG_EOR and MSG_EOF constants
-rw-r--r--NEWS1
-rw-r--r--ext/sockets/sockets.c12
2 files changed, 13 insertions, 0 deletions
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);