php_win32_globals.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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@php.net> |
  16. +----------------------------------------------------------------------+
  17. */
  18. #ifndef PHP_WIN32_GLOBALS_H
  19. #define PHP_WIN32_GLOBALS_H
  20. /* misc globals for thread-safety under win32 */
  21. #include "win32/sendmail.h"
  22. typedef struct _php_win32_core_globals php_win32_core_globals;
  23. #ifdef ZTS
  24. # define PW32G(v) ZEND_TSRMG(php_win32_core_globals_id, php_win32_core_globals*, v)
  25. extern PHPAPI int php_win32_core_globals_id;
  26. #else
  27. # define PW32G(v) (the_php_win32_core_globals.v)
  28. extern PHPAPI struct _php_win32_core_globals the_php_win32_core_globals;
  29. #endif
  30. struct _php_win32_core_globals {
  31. /* syslog */
  32. char *log_header;
  33. HANDLE log_source;
  34. HKEY registry_key;
  35. HANDLE registry_event;
  36. HashTable *registry_directories;
  37. char mail_buffer[MAIL_BUFFER_SIZE];
  38. SOCKET mail_socket;
  39. char mail_host[HOST_NAME_LEN];
  40. char mail_local_host[HOST_NAME_LEN];
  41. };
  42. void php_win32_core_globals_ctor(void *vg);
  43. void php_win32_core_globals_dtor(void *vg);
  44. PHP_RSHUTDOWN_FUNCTION(win32_core_globals);
  45. #endif
  46. /*
  47. * Local variables:
  48. * tab-width: 4
  49. * c-basic-offset: 4
  50. * End:
  51. * vim600: sw=4 ts=4 fdm=marker
  52. * vim<600: sw=4 ts=4
  53. */