diff options
author | Anatol Belski <ab@php.net> | 2014-08-19 13:11:32 +0200 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2014-08-19 13:11:32 +0200 |
commit | 5491d01a925392be921095d17e08203da662263c (patch) | |
tree | 1a73edbf4fc18dd85e75cc55b1440406330c1918 /ext/sysvmsg | |
parent | 58aa0f8df898a6df36725c21e05a036bbf5e3216 (diff) | |
download | php-git-5491d01a925392be921095d17e08203da662263c.tar.gz |
port sysvshm, sysvsem and sysvmsg
Diffstat (limited to 'ext/sysvmsg')
-rw-r--r-- | ext/sysvmsg/php_sysvmsg.h | 4 | ||||
-rw-r--r-- | ext/sysvmsg/sysvmsg.c | 22 |
2 files changed, 13 insertions, 13 deletions
diff --git a/ext/sysvmsg/php_sysvmsg.h b/ext/sysvmsg/php_sysvmsg.h index df8c4d4235..033a89cfb6 100644 --- a/ext/sysvmsg/php_sysvmsg.h +++ b/ext/sysvmsg/php_sysvmsg.h @@ -52,11 +52,11 @@ PHP_FUNCTION(msg_queue_exists); typedef struct { key_t key; - long id; + php_int_t id; } sysvmsg_queue_t; struct php_msgbuf { - long mtype; + php_int_t mtype; char mtext[1]; }; diff --git a/ext/sysvmsg/sysvmsg.c b/ext/sysvmsg/sysvmsg.c index 30d51a672a..afeffcc092 100644 --- a/ext/sysvmsg/sysvmsg.c +++ b/ext/sysvmsg/sysvmsg.c @@ -230,9 +230,9 @@ PHP_FUNCTION(msg_stat_queue) Check whether a message queue exists */ PHP_FUNCTION(msg_queue_exists) { - long key; + php_int_t key; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &key) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "i", &key) == FAILURE) { return; } @@ -248,11 +248,11 @@ PHP_FUNCTION(msg_queue_exists) Attach to a message queue */ PHP_FUNCTION(msg_get_queue) { - long key; - long perms = 0666; + php_int_t key; + php_int_t perms = 0666; sysvmsg_queue_t *mq; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l|l", &key, &perms) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "i|i", &key, &perms) == FAILURE) { return; } @@ -299,8 +299,8 @@ PHP_FUNCTION(msg_remove_queue) PHP_FUNCTION(msg_receive) { zval *out_message, *queue, *out_msgtype, *zerrcode = NULL; - long desiredmsgtype, maxsize, flags = 0; - long realflags = 0; + php_int_t desiredmsgtype, maxsize, flags = 0; + php_int_t realflags = 0; zend_bool do_unserialize = 1; sysvmsg_queue_t *mq = NULL; struct php_msgbuf *messagebuffer = NULL; /* buffer to transmit */ @@ -308,7 +308,7 @@ PHP_FUNCTION(msg_receive) RETVAL_FALSE; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rlz/lz/|blz/", + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "riz/iz/|biz/", &queue, &desiredmsgtype, &out_msgtype, &maxsize, &out_message, &do_unserialize, &flags, &zerrcode) == FAILURE) { return; @@ -386,7 +386,7 @@ PHP_FUNCTION(msg_receive) PHP_FUNCTION(msg_send) { zval *message, *queue, *zerror=NULL; - long msgtype; + php_int_t msgtype; zend_bool do_serialize = 1, blocking = 1; sysvmsg_queue_t * mq = NULL; struct php_msgbuf * messagebuffer = NULL; /* buffer to transmit */ @@ -395,7 +395,7 @@ PHP_FUNCTION(msg_send) RETVAL_FALSE; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rlz|bbz/", + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "riz|bbz/", &queue, &msgtype, &message, &do_serialize, &blocking, &zerror) == FAILURE) { return; } @@ -425,7 +425,7 @@ PHP_FUNCTION(msg_send) break; case IS_INT: - message_len = spprintf(&p, 0, "%ld", Z_IVAL_P(message)); + message_len = spprintf(&p, 0, "%pd", Z_IVAL_P(message)); break; case IS_FALSE: message_len = spprintf(&p, 0, "0"); |