php_fcgi.h 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. /*
  2. +----------------------------------------------------------------------+
  3. | PHP Version 5 |
  4. +----------------------------------------------------------------------+
  5. | Copyright (c) 1997-2015 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: |
  16. +----------------------------------------------------------------------+
  17. */
  18. /* $Id$ */
  19. #ifndef PHP_FCGI_H
  20. #define PHP_FCGI_H
  21. extern zend_module_entry fcgi_module_entry;
  22. #define phpext_fcgi_ptr &fcgi_module_entry
  23. #define PHP_FCGI_VERSION "0.1.0" /* Replace with version number for your extension */
  24. #ifdef PHP_WIN32
  25. # define PHP_FCGI_API __declspec(dllexport)
  26. #elif defined(__GNUC__) && __GNUC__ >= 4
  27. # define PHP_FCGI_API __attribute__ ((visibility("default")))
  28. #else
  29. # define PHP_FCGI_API
  30. #endif
  31. #ifdef ZTS
  32. #include "TSRM.h"
  33. #endif
  34. PHP_MINIT_FUNCTION(fcgi);
  35. PHP_MSHUTDOWN_FUNCTION(fcgi);
  36. PHP_RINIT_FUNCTION(fcgi);
  37. PHP_RSHUTDOWN_FUNCTION(fcgi);
  38. PHP_MINFO_FUNCTION(fcgi);
  39. PHP_FUNCTION(confirm_fcgi_compiled); /* For testing, remove later. */
  40. PHP_FUNCTION(fcgi_init);
  41. PHP_FUNCTION(fcgi_fini);
  42. PHP_FUNCTION(fcgi_accept);
  43. PHP_FUNCTION(fcgi_finish);
  44. PHP_FUNCTION(fcgi_getparam);
  45. PHP_FUNCTION(fcgi_echo);
  46. PHP_FUNCTION(fcgi_getcontent);
  47. /*
  48. Declare any global variables you may need between the BEGIN
  49. and END macros here:
  50. ZEND_BEGIN_MODULE_GLOBALS(fcgi)
  51. long global_value;
  52. char *global_string;
  53. ZEND_END_MODULE_GLOBALS(fcgi)
  54. */
  55. /* In every utility function you add that needs to use variables
  56. in php_fcgi_globals, call TSRMLS_FETCH(); after declaring other
  57. variables used by that function, or better yet, pass in TSRMLS_CC
  58. after the last function argument and declare your utility function
  59. with TSRMLS_DC after the last declared argument. Always refer to
  60. the globals in your function as FCGI_G(variable). You are
  61. encouraged to rename these macros something shorter, see
  62. examples in any other php module directory.
  63. */
  64. #ifdef ZTS
  65. #define FCGI_G(v) TSRMG(fcgi_globals_id, zend_fcgi_globals *, v)
  66. #else
  67. #define FCGI_G(v) (fcgi_globals.v)
  68. #endif
  69. #endif /* PHP_FCGI_H */
  70. /*
  71. * Local variables:
  72. * tab-width: 4
  73. * c-basic-offset: 4
  74. * End:
  75. * vim600: noet sw=4 ts=4 fdm=marker
  76. * vim<600: noet sw=4 ts=4
  77. */