comparison Resources/WebAssembly/ArithmeticTests/arith.patch @ 2510:04873915beaf

configuration of DCMTK for WebAssembly
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 28 Mar 2018 14:14:37 +0200
parents
children
comparison
equal deleted inserted replaced
2509:9d9f2d088dce 2510:04873915beaf
1 --- /home/jodogne/Subversion/orthanc/Resources/WebAssembly/ArithmeticTests/i/dcmtk-3.6.2/config/tests/arith.cc 2017-07-14 17:41:11.000000000 +0200
2 +++ arith.cc 2018-03-28 13:53:34.242234303 +0200
3 @@ -19,6 +19,8 @@
4 * for being used within oflimits.h.
5 */
6
7 +#include <emscripten/emscripten.h>
8 +
9 // Note: This depends on some files of ofstd and osconfig.h,
10 // although it is part of configure testing itself.
11 // Therefore, ensure osconfig.h has already been generated
12 @@ -514,7 +516,9 @@
13 }
14 #endif
15
16 -int main( int argc, char** argv )
17 +extern "C"
18 +{
19 +int EMSCRIPTEN_KEEPALIVE Run()
20 {
21 #ifdef HAVE_WINDOWS_H
22 // Activate the fallback workaround, it will only be used
23 @@ -524,6 +528,8 @@
24 #endif
25
26 COUT << "Inspecting fundamental arithmetic types... " << OFendl;
27 +
28 +#if 0
29 if( argc != 2 )
30 {
31 STD_NAMESPACE cerr << "-- " << "Error: missing destination file "
32 @@ -532,6 +538,9 @@
33 }
34
35 STD_NAMESPACE ofstream out( argv[1] );
36 +#else
37 + std::ostream& out = std::cerr;
38 +#endif
39
40 out << "#ifndef CONFIG_ARITH_H" << '\n';
41 out << "#define CONFIG_ARITH_H" << '\n';
42 @@ -619,3 +628,4 @@
43
44 return 0;
45 }
46 +}