1 /* 2 +----------------------------------------------------------------------+ 3 | PHP Version 7 | 4 +----------------------------------------------------------------------+ 5 | Copyright (c) 1997-2017 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 19 /* $Id$ */ 20 21 #ifndef PHP_WIN32_GLOBALS_H 22 #define PHP_WIN32_GLOBALS_H 23 24 /* misc globals for thread-safety under win32 */ 25 26 #include "win32/sendmail.h" 27 28 typedef struct _php_win32_core_globals php_win32_core_globals; 29 30 #ifdef ZTS 31 # define PW32G(v) ZEND_TSRMG(php_win32_core_globals_id, php_win32_core_globals*, v) 32 extern PHPAPI int php_win32_core_globals_id; 33 #else 34 # define PW32G(v) (the_php_win32_core_globals.v) 35 extern PHPAPI struct _php_win32_core_globals the_php_win32_core_globals; 36 #endif 37 38 struct _php_win32_core_globals { 39 /* syslog */ 40 char *log_header; 41 HANDLE log_source; 42 43 HKEY registry_key; 44 HANDLE registry_event; 45 HashTable *registry_directories; 46 47 char mail_buffer[MAIL_BUFFER_SIZE]; 48 SOCKET mail_socket; 49 char mail_host[HOST_NAME_LEN]; 50 char mail_local_host[HOST_NAME_LEN]; 51 }; 52 53 void php_win32_core_globals_ctor(void *vg); 54 void php_win32_core_globals_dtor(void *vg); 55 PHP_RSHUTDOWN_FUNCTION(win32_core_globals); 56 57 #endif 58 59