1 /*
2 +----------------------------------------------------------------------+
3 | PHP Version 7 |
4 +----------------------------------------------------------------------+
5 | Copyright (c) 1997-2016 The PHP Group |
6 +----------------------------------------------------------------------+
7 | This source file is subject to version 3.01 of the PHP license, |
8 | that is bundled with this package in the file LICENSE, and is |
9 | available through the world-wide-web at the following url: |
10 | http://www.php.net/license/3_01.txt |
11 | If you did not receive a copy of the PHP license and are unable to |
12 | obtain it through the world-wide-web, please send a note to |
13 | license@php.net so we can mail you a copy immediately. |
14 +----------------------------------------------------------------------+
15 | Author: Wez Furlong <wez@thebrainroom.com> |
16 +----------------------------------------------------------------------+
17 */
18
19 /* $Id$ */
20
21 #ifndef PHP_SYSVMSG_H
22 #define PHP_SYSVMSG_H
23
24 #if HAVE_SYSVMSG
25
26 extern zend_module_entry sysvmsg_module_entry;
27 #define phpext_sysvmsg_ptr &sysvmsg_module_entry
28
29 #include "php_version.h"
30 #define PHP_SYSVMSG_VERSION PHP_VERSION
31
32 #ifndef __USE_GNU
33 /* we want to use mtype instead of __mtype */
34 #define __USE_GNU
35 #endif
36
37 #include <sys/types.h>
38 #include <sys/ipc.h>
39 #include <sys/msg.h>
40
41 #ifdef ZTS
42 #include "TSRM.h"
43 #endif
44
45 PHP_MINIT_FUNCTION(sysvmsg);
46 PHP_MINFO_FUNCTION(sysvmsg);
47
48 PHP_FUNCTION(msg_get_queue);
49 PHP_FUNCTION(msg_remove_queue);
50 PHP_FUNCTION(msg_stat_queue);
51 PHP_FUNCTION(msg_set_queue);
52 PHP_FUNCTION(msg_send);
53 PHP_FUNCTION(msg_receive);
54 PHP_FUNCTION(msg_queue_exists);
55
56 typedef struct {
57 key_t key;
58 zend_long id;
59 } sysvmsg_queue_t;
60
61 struct php_msgbuf {
62 zend_long mtype;
63 char mtext[1];
64 };
65
66 #endif /* HAVE_SYSVMSG */
67
68 #endif /* PHP_SYSVMSG_H */
69
70
71 /*
72 * Local variables:
73 * tab-width: 4
74 * c-basic-offset: 4
75 * indent-tabs-mode: t
76 * End:
77 */