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 | Authors: Anatol Belski <ab@php.net> |
14 +----------------------------------------------------------------------+
15 */
16
17 #include <config.w32.h>
18
19 #include <php.h>
20
21 #ifdef HAVE_LIBXML
22 #include <libxml/threads.h>
23 #endif
24
25 /* TODO this file, or part of it, could be machine generated, to
26 allow extensions and SAPIs adding their own init stuff.
27 However expected is that MINIT is enough in most cases.
28 This file is only useful for some really internal stuff,
29 eq. initializing something before the DLL even is
30 available to be called. */
31
DllMain(HINSTANCE inst,DWORD reason,LPVOID dummy)32 BOOL WINAPI DllMain(HINSTANCE inst, DWORD reason, LPVOID dummy)
33 {
34 BOOL ret = TRUE;
35
36 #ifdef HAVE_LIBXML
37 /* This imply that only LIBXML_STATIC_FOR_DLL is supported ATM.
38 If that changes, this place will need some rework.
39 TODO Also this should be revisited as no initialization
40 might be needed for TS build (libxml build with TLS
41 support. */
42 ret = ret && xmlDllMain(inst, reason, dummy);
43 #endif
44
45 return ret;
46 }
47