php_win32_globals.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*
  2. +----------------------------------------------------------------------+
  3. | Copyright (c) The PHP Group |
  4. +----------------------------------------------------------------------+
  5. | This source file is subject to version 3.01 of the PHP license, |
  6. | that is bundled with this package in the file LICENSE, and is |
  7. | available through the world-wide-web at the following url: |
  8. | https://www.php.net/license/3_01.txt |
  9. | If you did not receive a copy of the PHP license and are unable to |
  10. | obtain it through the world-wide-web, please send a note to |
  11. | license@php.net so we can mail you a copy immediately. |
  12. +----------------------------------------------------------------------+
  13. | Author: Wez Furlong <wez@php.net> |
  14. +----------------------------------------------------------------------+
  15. */
  16. #ifndef PHP_WIN32_GLOBALS_H
  17. #define PHP_WIN32_GLOBALS_H
  18. /* misc globals for thread-safety under win32 */
  19. #include "win32/sendmail.h"
  20. typedef struct _php_win32_core_globals php_win32_core_globals;
  21. #ifdef ZTS
  22. # define PW32G(v) ZEND_TSRMG(php_win32_core_globals_id, php_win32_core_globals*, v)
  23. extern PHPAPI int php_win32_core_globals_id;
  24. #else
  25. # define PW32G(v) (the_php_win32_core_globals.v)
  26. extern PHPAPI struct _php_win32_core_globals the_php_win32_core_globals;
  27. #endif
  28. struct _php_win32_core_globals {
  29. /* syslog */
  30. char *log_header;
  31. HANDLE log_source;
  32. HKEY registry_key;
  33. HANDLE registry_event;
  34. HashTable *registry_directories;
  35. char mail_buffer[MAIL_BUFFER_SIZE];
  36. SOCKET mail_socket;
  37. char mail_host[HOST_NAME_LEN];
  38. char mail_local_host[HOST_NAME_LEN];
  39. };
  40. void php_win32_core_globals_ctor(void *vg);
  41. void php_win32_core_globals_dtor(void *vg);
  42. PHP_RSHUTDOWN_FUNCTION(win32_core_globals);
  43. #endif