xref: /PHP-7.3/ext/sysvmsg/php_sysvmsg.h (revision 8d3f8ca1)
1 /*
2   +----------------------------------------------------------------------+
3   | PHP Version 7                                                        |
4   +----------------------------------------------------------------------+
5   | Copyright (c) 1997-2018 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 #ifndef PHP_SYSVMSG_H
20 #define PHP_SYSVMSG_H
21 
22 #if HAVE_SYSVMSG
23 
24 extern zend_module_entry sysvmsg_module_entry;
25 #define phpext_sysvmsg_ptr &sysvmsg_module_entry
26 
27 #include "php_version.h"
28 #define PHP_SYSVMSG_VERSION PHP_VERSION
29 
30 #ifndef __USE_GNU
31 /* we want to use mtype instead of __mtype */
32 #define __USE_GNU
33 #endif
34 
35 #include <sys/types.h>
36 #include <sys/ipc.h>
37 #include <sys/msg.h>
38 
39 #ifdef ZTS
40 #include "TSRM.h"
41 #endif
42 
43 PHP_MINIT_FUNCTION(sysvmsg);
44 PHP_MINFO_FUNCTION(sysvmsg);
45 
46 PHP_FUNCTION(msg_get_queue);
47 PHP_FUNCTION(msg_remove_queue);
48 PHP_FUNCTION(msg_stat_queue);
49 PHP_FUNCTION(msg_set_queue);
50 PHP_FUNCTION(msg_send);
51 PHP_FUNCTION(msg_receive);
52 PHP_FUNCTION(msg_queue_exists);
53 
54 typedef struct {
55 	key_t key;
56 	zend_long id;
57 } sysvmsg_queue_t;
58 
59 struct php_msgbuf {
60 	zend_long mtype;
61 	char mtext[1];
62 };
63 
64 #endif /* HAVE_SYSVMSG */
65 
66 #endif	/* PHP_SYSVMSG_H */
67 
68 
69 /*
70  * Local variables:
71  * tab-width: 4
72  * c-basic-offset: 4
73  * indent-tabs-mode: t
74  * End:
75  */
76