php_sysvmsg.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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. #ifndef PHP_SYSVMSG_H
  19. #define PHP_SYSVMSG_H
  20. #if HAVE_SYSVMSG
  21. extern zend_module_entry sysvmsg_module_entry;
  22. #define phpext_sysvmsg_ptr &sysvmsg_module_entry
  23. #include "php_version.h"
  24. #define PHP_SYSVMSG_VERSION PHP_VERSION
  25. #ifndef __USE_GNU
  26. /* we want to use mtype instead of __mtype */
  27. #define __USE_GNU
  28. #endif
  29. #include <sys/types.h>
  30. #include <sys/ipc.h>
  31. #include <sys/msg.h>
  32. #ifdef ZTS
  33. #include "TSRM.h"
  34. #endif
  35. PHP_MINIT_FUNCTION(sysvmsg);
  36. PHP_MINFO_FUNCTION(sysvmsg);
  37. PHP_FUNCTION(msg_get_queue);
  38. PHP_FUNCTION(msg_remove_queue);
  39. PHP_FUNCTION(msg_stat_queue);
  40. PHP_FUNCTION(msg_set_queue);
  41. PHP_FUNCTION(msg_send);
  42. PHP_FUNCTION(msg_receive);
  43. PHP_FUNCTION(msg_queue_exists);
  44. typedef struct {
  45. key_t key;
  46. zend_long id;
  47. } sysvmsg_queue_t;
  48. struct php_msgbuf {
  49. zend_long mtype;
  50. char mtext[1];
  51. };
  52. #endif /* HAVE_SYSVMSG */
  53. #endif /* PHP_SYSVMSG_H */
  54. /*
  55. * Local variables:
  56. * tab-width: 4
  57. * c-basic-offset: 4
  58. * indent-tabs-mode: t
  59. * End:
  60. */