php_sysvmsg.h 2.0 KB

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