comparison src/msvc-hdf5-1.patch @ 3095:f2bbfa69647e

[MSVC] enable HDF5 compilation
author Michael Goffioul <michael.goffioul@gmail.com>
date Tue, 25 Jun 2013 20:10:01 -0400
parents
children
comparison
equal deleted inserted replaced
3094:121b54e000ed 3095:f2bbfa69647e
1 diff -ur hdf5-1.8.10-orig/c++/src/Makefile.am hdf5-1.8.10/c++/src/Makefile.am
2 --- hdf5-1.8.10-orig/c++/src/Makefile.am 2012-10-11 13:31:51 -0400
3 +++ hdf5-1.8.10/c++/src/Makefile.am 2013-06-25 14:30:43 -0400
4 @@ -30,6 +30,8 @@
5 # Add libtool numbers to the HDF5 C++ library (from config/lt_vers.am)
6 libhdf5_cpp_la_LDFLAGS= -version-info $(LT_VERS_INTERFACE):$(LT_VERS_REVISION):$(LT_VERS_AGE) $(AM_LDFLAGS)
7
8 +AM_CPPFLAGS += -DHDF5_CPPDLL_EXPORTS -D_HDF5USEDLL_
9 +
10 # Shared C++ libraries aren't universally supported.
11 if CXX_SHARED_CONDITIONAL
12 else
13 diff -ur hdf5-1.8.10-orig/c++/test/Makefile.am hdf5-1.8.10/c++/test/Makefile.am
14 --- hdf5-1.8.10-orig/c++/test/Makefile.am 2012-10-11 13:31:49 -0400
15 +++ hdf5-1.8.10/c++/test/Makefile.am 2013-06-25 14:30:43 -0400
16 @@ -23,6 +23,8 @@
17 # Include src, test, and c++/src directories
18 INCLUDES=-I$(top_srcdir)/src -I$(top_srcdir)/test -I$(top_srcdir)/c++/src
19
20 +AM_CPPFLAGS += -D_HDF5USEDLL_ -DHDF5CPP_USEDLL
21 +
22 # Shared C++ libraries aren't universally supported.
23 if CXX_SHARED_CONDITIONAL
24 else
25 diff -ur hdf5-1.8.10-orig/config/conclude.am hdf5-1.8.10/config/conclude.am
26 --- hdf5-1.8.10-orig/config/conclude.am 2012-10-11 13:31:46 -0400
27 +++ hdf5-1.8.10/config/conclude.am 2013-06-25 14:31:37 -0400
28 @@ -23,7 +23,7 @@
29 # lib_LIBRARIES are built for lib target), but EXTRA_LIB, EXTRA_PROG, and
30 # EXTRA_TEST variables are supplied to allow the user to force targets to
31 # be built at certain times.
32 -LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \
33 +_LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \
34 $(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB)
35 PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \
36 $(EXTRA_PROG)
37 @@ -36,9 +36,9 @@
38
39 # lib/progs/tests targets recurse into subdirectories. build-* targets
40 # build files in this directory.
41 -build-lib: $(LIB)
42 -build-progs: $(LIB) $(PROGS)
43 -build-tests: $(LIB) $(PROGS) $(chk_TESTS)
44 +build-lib: $(_LIB)
45 +build-progs: $(_LIB) $(PROGS)
46 +build-tests: $(_LIB) $(PROGS) $(chk_TESTS)
47
48 # General rule for recursive building targets.
49 # BUILT_SOURCES contain targets that need to be built before anything else
50 @@ -98,7 +98,7 @@
51 @$(MAKE) build-check-p
52
53 # Actual execution of check-s.
54 -build-check-s: $(LIB) $(PROGS) $(chk_TESTS)
55 +build-check-s: $(_LIB) $(PROGS) $(chk_TESTS)
56 @if test -n "$(TEST_PROG)$(TEST_SCRIPT)"; then \
57 echo "===Serial tests in `echo ${PWD} | sed -e s:.*/::` begin `date`==="; \
58 fi
59 @@ -193,7 +193,7 @@
60 fi
61
62 # Actual execution of check-p.
63 -build-check-p: $(LIB) $(PROGS) $(chk_TESTS)
64 +build-check-p: $(_LIB) $(PROGS) $(chk_TESTS)
65 @if test -n "$(TEST_PROG_PARA)$(TEST_SCRIPT_PARA)"; then \
66 echo "===Parallel tests in `echo ${PWD} | sed -e s:.*/::` begin `date`==="; \
67 fi
68 @@ -223,7 +223,7 @@
69 fi
70
71 # Run test with different Virtual File Driver
72 -check-vfd: $(LIB) $(PROGS) $(chk_TESTS)
73 +check-vfd: $(_LIB) $(PROGS) $(chk_TESTS)
74 @for vfd in $(VFD_LIST) dummy; do \
75 if test $$vfd != dummy; then \
76 echo "============================"; \
77 diff -ur hdf5-1.8.10-orig/hl/c++/src/Makefile.am hdf5-1.8.10/hl/c++/src/Makefile.am
78 --- hdf5-1.8.10-orig/hl/c++/src/Makefile.am 2012-10-11 13:31:44 -0400
79 +++ hdf5-1.8.10/hl/c++/src/Makefile.am 2013-06-25 14:30:43 -0400
80 @@ -30,6 +30,8 @@
81 # Add libtool numbers to the HDF5 HL C++ library (from config/lt_vers.am)
82 libhdf5_hl_cpp_la_LDFLAGS= -version-info $(LT_VERS_INTERFACE):$(LT_VERS_REVISION):$(LT_VERS_AGE) $(AM_LDFLAGS)
83
84 +AM_CPPFLAGS += -D_HDF5USEDLL_ -DHDF5_HL_CPPDLL_EXPORTS
85 +
86 # Shared C++ libraries aren't universally supported.
87 if CXX_SHARED_CONDITIONAL
88 else
89 diff -ur hdf5-1.8.10-orig/hl/c++/test/Makefile.am hdf5-1.8.10/hl/c++/test/Makefile.am
90 --- hdf5-1.8.10-orig/hl/c++/test/Makefile.am 2012-10-11 13:31:44 -0400
91 +++ hdf5-1.8.10/hl/c++/test/Makefile.am 2013-06-25 14:30:43 -0400
92 @@ -23,6 +23,8 @@
93 # Include directories
94 INCLUDES=-I$(top_srcdir)/src -I$(top_srcdir)/c++/src -I$(top_srcdir)/hl/src -I$(top_srcdir)/hl/c++/src -I$(top_srcdir)/test -I$(top_builddir)/hl/test -I$(top_srcdir)/hl/test
95
96 +AM_CPPFLAGS += -D_HDF5USEDLL_ -DHDF5USE_HLCPPDLL
97 +
98 # Shared C++ libraries aren't universally supported.
99 if CXX_SHARED_CONDITIONAL
100 else
101 diff -ur hdf5-1.8.10-orig/hl/src/Makefile.am hdf5-1.8.10/hl/src/Makefile.am
102 --- hdf5-1.8.10-orig/hl/src/Makefile.am 2012-10-11 13:31:43 -0400
103 +++ hdf5-1.8.10/hl/src/Makefile.am 2013-06-25 14:30:43 -0400
104 @@ -22,7 +22,7 @@
105 include $(top_srcdir)/config/lt_vers.am
106
107 # Add include directories to the C preprocessor flags
108 -AM_CPPFLAGS+=-I$(top_srcdir)/src
109 +AM_CPPFLAGS+=-I$(top_srcdir)/src -D_HDF5USEDLL_ -D_HDF5_HLDLL_EXPORTS_
110
111 # This library is our main target.
112 lib_LTLIBRARIES=libhdf5_hl.la
113 diff -ur hdf5-1.8.10-orig/hl/test/Makefile.am hdf5-1.8.10/hl/test/Makefile.am
114 --- hdf5-1.8.10-orig/hl/test/Makefile.am 2012-10-11 13:31:43 -0400
115 +++ hdf5-1.8.10/hl/test/Makefile.am 2013-06-25 14:30:43 -0400
116 @@ -22,7 +22,7 @@
117 include $(top_srcdir)/config/commence.am
118
119 # Add include directories to C preprocessor flags
120 -AM_CPPFLAGS+=-I. -I$(srcdir) -I$(top_builddir)/src -I$(top_srcdir)/src -I$(top_builddir)/test -I$(top_srcdir)/test -I$(top_srcdir)/hl/src
121 +AM_CPPFLAGS+=-I. -I$(srcdir) -I$(top_builddir)/src -I$(top_srcdir)/src -I$(top_builddir)/test -I$(top_srcdir)/test -I$(top_srcdir)/hl/src -D_HDF5USEDLL_ -D_HDF5USEHLDLL_
122
123 # The tests depend on the hdf5, hdf5 test, and hdf5_hl libraries
124 LDADD=$(LIBH5_HL) $(LIBH5TEST) $(LIBHDF5)
125 diff -ur hdf5-1.8.10-orig/perform/Makefile.am hdf5-1.8.10/perform/Makefile.am
126 --- hdf5-1.8.10-orig/perform/Makefile.am 2012-10-11 13:31:52 -0400
127 +++ hdf5-1.8.10/perform/Makefile.am 2013-06-25 14:30:43 -0400
128 @@ -23,6 +23,8 @@
129
130 INCLUDES=-I$(top_srcdir)/src -I$(top_srcdir)/test -I$(top_srcdir)/tools/lib
131
132 +AM_CPPFLAGS += -D_HDF5USEDLL_
133 +
134 # bin_PROGRAMS will be installed.
135 if BUILD_PARALLEL_CONDITIONAL
136 bin_PROGRAMS=h5perf_serial h5perf
137 diff -ur hdf5-1.8.10-orig/src/H5public.h hdf5-1.8.10/src/H5public.h
138 --- hdf5-1.8.10-orig/src/H5public.h 2012-10-26 20:12:05 -0400
139 +++ hdf5-1.8.10/src/H5public.h 2013-06-25 14:30:43 -0400
140 @@ -126,7 +126,7 @@
141 typedef int htri_t;
142
143 /* Define the ssize_t type if it not is defined */
144 -#if H5_SIZEOF_SSIZE_T==0
145 +#if H5_SIZEOF_SSIZE_T==0 && ! defined (ssize_t)
146 /* Undefine this size, we will re-define it in one of the sections below */
147 #undef H5_SIZEOF_SSIZE_T
148 #if H5_SIZEOF_SIZE_T==H5_SIZEOF_INT
149 diff -ur hdf5-1.8.10-orig/src/Makefile.am hdf5-1.8.10/src/Makefile.am
150 --- hdf5-1.8.10-orig/src/Makefile.am 2012-10-11 13:30:56 -0400
151 +++ hdf5-1.8.10/src/Makefile.am 2013-06-25 14:30:43 -0400
152 @@ -41,7 +41,8 @@
153 DISTCLEANFILES=H5pubconf.h
154
155 # library sources
156 -libhdf5_la_SOURCES= H5.c H5checksum.c H5dbg.c H5system.c H5timer.c H5trace.c \
157 +AM_CPPFLAGS += -D_HDF5DLL_
158 +libhdf5_la_SOURCES= H5FDwindows.c H5.c H5checksum.c H5dbg.c H5system.c H5timer.c H5trace.c \
159 H5A.c H5Abtree2.c H5Adense.c H5Adeprec.c H5Aint.c H5Atest.c \
160 H5AC.c H5B.c H5Bcache.c H5Bdbg.c \
161 H5B2.c H5B2cache.c H5B2dbg.c H5B2hdr.c H5B2int.c H5B2stat.c H5B2test.c \
162 @@ -113,7 +114,7 @@
163 H5FDmulti.h H5FDsec2.h H5FDstdio.h \
164 H5Gpublic.h H5Ipublic.h H5Lpublic.h \
165 H5MMpublic.h H5Opublic.h H5Ppublic.h H5Rpublic.h H5Spublic.h \
166 - H5Tpublic.h H5Zpublic.h
167 + H5Tpublic.h H5Zpublic.h H5FDwindows.h
168
169 # install libhdf5.settings in lib directory
170 settingsdir=$(libdir)
171 diff -ur hdf5-1.8.10-orig/test/Makefile.am hdf5-1.8.10/test/Makefile.am
172 --- hdf5-1.8.10-orig/test/Makefile.am 2012-10-11 13:30:44 -0400
173 +++ hdf5-1.8.10/test/Makefile.am 2013-06-25 14:30:43 -0400
174 @@ -23,6 +23,8 @@
175
176 INCLUDES=-I$(top_srcdir)/src -I$(top_builddir)/src
177
178 +AM_CPPFLAGS += -D_HDF5USEDLL_
179 +
180 # Test script for error_test and err_compat
181 TEST_SCRIPT = testerror.sh testlibinfo.sh testcheck_version.sh testlinks_env.sh
182 check_SCRIPTS = $(TEST_SCRIPT)
183 diff -ur hdf5-1.8.10-orig/test/testcheck_version.sh.in hdf5-1.8.10/test/testcheck_version.sh.in
184 --- hdf5-1.8.10-orig/test/testcheck_version.sh.in 2012-10-11 13:30:44 -0400
185 +++ hdf5-1.8.10/test/testcheck_version.sh.in 2013-06-25 14:30:43 -0400
186 @@ -178,6 +178,7 @@
187 ret_code=$?
188 cat $actual_err >> $actual
189
190 + dos2unix $actual > /dev/null 2>&1
191 if [ $h5haveexitcode = 'yes' -a \( $expect_code -ne $ret_code \) ]; then
192 echo "*FAILED*"
193 echo " Expected exit code ($expect_code) differs from actual code ($ret_code)"
194 diff -ur hdf5-1.8.10-orig/test/testerror.sh.in hdf5-1.8.10/test/testerror.sh.in
195 --- hdf5-1.8.10-orig/test/testerror.sh.in 2012-10-11 13:30:43 -0400
196 +++ hdf5-1.8.10/test/testerror.sh.in 2013-06-25 14:30:44 -0400
197 @@ -72,7 +72,8 @@
198 -e 's/H5Eset_auto[1-2]*/H5Eset_auto(1 or 2)/' \
199 $actual_err > $actual_ext
200 cat $actual_ext >> $actual
201 -
202 +
203 + dos2unix $actual > /dev/null 2>&1
204 if $CMP $expect1 $actual; then
205 echo " PASSED"
206 elif $CMP $expect2 $actual; then
207 diff -ur hdf5-1.8.10-orig/tools/h5copy/Makefile.am hdf5-1.8.10/tools/h5copy/Makefile.am
208 --- hdf5-1.8.10-orig/tools/h5copy/Makefile.am 2012-10-11 13:31:39 -0400
209 +++ hdf5-1.8.10/tools/h5copy/Makefile.am 2013-06-25 14:30:44 -0400
210 @@ -23,6 +23,8 @@
211 # Include src and tools/lib directories
212 INCLUDES=-I$(top_srcdir)/src -I$(top_srcdir)/tools/lib
213
214 +AM_CPPFLAGS += -D_HDF5USEDLL_
215 +
216 # Test programs and scripts
217 TEST_PROG=h5copygentest
218 TEST_SCRIPT=testh5copy.sh
219 diff -ur hdf5-1.8.10-orig/tools/h5diff/Makefile.am hdf5-1.8.10/tools/h5diff/Makefile.am
220 --- hdf5-1.8.10-orig/tools/h5diff/Makefile.am 2012-10-11 13:31:39 -0400
221 +++ hdf5-1.8.10/tools/h5diff/Makefile.am 2013-06-25 14:30:44 -0400
222 @@ -23,6 +23,8 @@
223 # Include src and tools/lib directories
224 INCLUDES=-I$(top_srcdir)/src -I$(top_srcdir)/tools/lib
225
226 +AM_CPPFLAGS += -D_HDF5USEDLL_
227 +
228 # Always build and test h5diff but build and test ph5diff only if parallel
229 # is enabled.
230 if BUILD_PARALLEL_CONDITIONAL
231 diff -ur hdf5-1.8.10-orig/tools/h5dump/Makefile.am hdf5-1.8.10/tools/h5dump/Makefile.am
232 --- hdf5-1.8.10-orig/tools/h5dump/Makefile.am 2012-10-11 13:31:22 -0400
233 +++ hdf5-1.8.10/tools/h5dump/Makefile.am 2013-06-25 14:30:44 -0400
234 @@ -23,6 +23,8 @@
235 # Include files in /src directory and /tools/lib directory
236 INCLUDES=-I$(top_srcdir)/src -I$(top_srcdir)/tools/lib
237
238 +AM_CPPFLAGS += -D_HDF5USEDLL_
239 +
240 # Test programs and scripts
241 TEST_PROG=h5dumpgentest
242 TEST_SCRIPT=testh5dump.sh testh5dumppbits.sh testh5dumpxml.sh
243 diff -ur hdf5-1.8.10-orig/tools/h5import/Makefile.am hdf5-1.8.10/tools/h5import/Makefile.am
244 --- hdf5-1.8.10-orig/tools/h5import/Makefile.am 2012-10-11 13:31:40 -0400
245 +++ hdf5-1.8.10/tools/h5import/Makefile.am 2013-06-25 14:30:44 -0400
246 @@ -23,6 +23,8 @@
247 # Include src and tools/lib directories
248 INCLUDES=-I$(top_srcdir)/src -I$(top_srcdir)/tools/lib
249
250 +AM_CPPFLAGS += -D_HDF5USEDLL_
251 +
252 # Test programs and scripts
253 TEST_PROG=h5importtest
254 TEST_SCRIPT=h5importtestutil.sh
255 diff -ur hdf5-1.8.10-orig/tools/h5jam/Makefile.am hdf5-1.8.10/tools/h5jam/Makefile.am
256 --- hdf5-1.8.10-orig/tools/h5jam/Makefile.am 2012-10-11 13:31:36 -0400
257 +++ hdf5-1.8.10/tools/h5jam/Makefile.am 2013-06-25 14:30:44 -0400
258 @@ -23,6 +23,8 @@
259 # Include src and tools/lib directories
260 INCLUDES=-I$(top_srcdir)/src -I$(top_srcdir)/tools/lib
261
262 +AM_CPPFLAGS += -D_HDF5USEDLL_
263 +
264 bin_PROGRAMS=h5jam h5unjam
265 check_PROGRAMS=tellub h5jamgentest getub
266 TEST_SCRIPT=testh5jam.sh
267 diff -ur hdf5-1.8.10-orig/tools/h5ls/Makefile.am hdf5-1.8.10/tools/h5ls/Makefile.am
268 --- hdf5-1.8.10-orig/tools/h5ls/Makefile.am 2012-10-11 13:31:41 -0400
269 +++ hdf5-1.8.10/tools/h5ls/Makefile.am 2013-06-25 14:30:44 -0400
270 @@ -23,6 +23,8 @@
271 # Include src and tools/lib directories
272 INCLUDES=-I$(top_srcdir)/src -I$(top_srcdir)/tools/lib
273
274 +AM_CPPFLAGS += -D_HDF5USEDLL_
275 +
276 # Test programs and scripts
277 TEST_SCRIPT=testh5ls.sh
278 check_SCRIPTS=$(TEST_SCRIPT)
279 diff -ur hdf5-1.8.10-orig/tools/h5repack/Makefile.am hdf5-1.8.10/tools/h5repack/Makefile.am
280 --- hdf5-1.8.10-orig/tools/h5repack/Makefile.am 2012-10-11 13:31:23 -0400
281 +++ hdf5-1.8.10/tools/h5repack/Makefile.am 2013-06-25 14:30:44 -0400
282 @@ -23,6 +23,8 @@
283 # Include src, test, and tools/lib directories
284 INCLUDES=-I$(top_srcdir)/src -I$(top_srcdir)/test -I$(top_srcdir)/tools/lib
285
286 +AM_CPPFLAGS += -D_HDF5USEDLL_
287 +
288 # Test programs and scripts
289 TEST_SCRIPT=h5repack.sh
290 TEST_PROG=h5repacktst
291 diff -ur hdf5-1.8.10-orig/tools/h5stat/Makefile.am hdf5-1.8.10/tools/h5stat/Makefile.am
292 --- hdf5-1.8.10-orig/tools/h5stat/Makefile.am 2012-10-11 13:31:41 -0400
293 +++ hdf5-1.8.10/tools/h5stat/Makefile.am 2013-06-25 14:30:44 -0400
294 @@ -23,6 +23,8 @@
295 # Include src directory
296 INCLUDES=-I$(top_srcdir)/src -I$(top_srcdir)/tools/lib
297
298 +AM_CPPFLAGS += -D_HDF5USEDLL_
299 +
300 #test script and program
301 TEST_PROG=h5stat_gentest
302 TEST_SCRIPT=testh5stat.sh
303 diff -ur hdf5-1.8.10-orig/tools/h5stat/testh5stat.sh.in hdf5-1.8.10/tools/h5stat/testh5stat.sh.in
304 --- hdf5-1.8.10-orig/tools/h5stat/testh5stat.sh.in 2012-10-11 13:31:41 -0400
305 +++ hdf5-1.8.10/tools/h5stat/testh5stat.sh.in 2013-06-25 14:30:44 -0400
306 @@ -158,6 +158,7 @@
307 ) >$actual 2>$actual_err
308 cat $actual_err >> $actual
309
310 + dos2unix $actual > /dev/null 2>&1
311
312 if [ ! -f $expect ]; then
313 # Create the expect file if it doesn't yet exist.
314 diff -ur hdf5-1.8.10-orig/tools/lib/Makefile.am hdf5-1.8.10/tools/lib/Makefile.am
315 --- hdf5-1.8.10-orig/tools/lib/Makefile.am 2012-10-11 13:31:39 -0400
316 +++ hdf5-1.8.10/tools/lib/Makefile.am 2013-06-25 14:30:44 -0400
317 @@ -23,6 +23,8 @@
318 # Include files in /src directory
319 INCLUDES=-I$(top_srcdir)/src
320
321 +AM_CPPFLAGS += -D_HDF5USEDLL_
322 +
323 # This is our main target, the h5tools library.
324 noinst_LTLIBRARIES=libh5tools.la
325
326 diff -ur hdf5-1.8.10-orig/tools/misc/Makefile.am hdf5-1.8.10/tools/misc/Makefile.am
327 --- hdf5-1.8.10-orig/tools/misc/Makefile.am 2012-10-11 13:31:41 -0400
328 +++ hdf5-1.8.10/tools/misc/Makefile.am 2013-06-25 14:30:44 -0400
329 @@ -23,6 +23,8 @@
330 # Include src directory
331 INCLUDES=-I$(top_srcdir)/src -I$(top_srcdir)/tools/lib
332
333 +AM_CPPFLAGS += -D_HDF5USEDLL_
334 +
335 #test script and program
336 TEST_PROG=h5repart_gentest talign
337 TEST_SCRIPT=testh5repart.sh testh5mkgrp.sh