Skip to content

Commit a0c2fef

Browse files
committed
fix windows crash
1 parent f585cc4 commit a0c2fef

2 files changed

Lines changed: 6 additions & 8 deletions

File tree

src/SPC/builder/extension/decimal.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ public function patchBeforeBuildconf(): bool
1919
'zend_module_entry decimal_module_entry',
2020
'zend_module_entry php_decimal_module_entry'
2121
);
22+
FileSystem::replaceFileStr(
23+
$this->source_dir . '/config.w32',
24+
'ARG_WITH("decimal", "for decimal support", "no");',
25+
'ARG_WITH("decimal", "for decimal support", "no");' . "\n" .
26+
'ADD_EXTENSION_DEP("decimal", "json");'
27+
);
2228
return true;
2329
}
2430

src/SPC/builder/windows/library/libmpdec.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,5 @@ protected function build(): void
2929
}
3030
}
3131
copy($makefile_dir . '\mpdecimal.h', BUILD_INCLUDE_PATH . '\mpdecimal.h');
32-
33-
// Disable dllimport for static linking: the header defaults to
34-
// __declspec(dllimport) when _DLL is defined, idk if php builds with /MD
35-
FileSystem::replaceFileStr(
36-
BUILD_INCLUDE_PATH . '\mpdecimal.h',
37-
'#elif defined(_DLL)',
38-
'#elif 0'
39-
);
4032
}
4133
}

0 commit comments

Comments
 (0)