Mercurial > mxe-octave
annotate src/of-netcdf-1-fixes.patch @ 4037:85abb6c3ec8b
of-netcdf: patch for --enable-64 (Bug #46060)
* src/of-netcdf-1-fixes.patch: new file
* dist-files.mk: add of-netcdf-1-fixes.patch
author | John Donoghue <john.donoghue@ieee.org> |
---|---|
date | Tue, 29 Sep 2015 19:43:19 -0400 |
parents | |
children |
rev | line source |
---|---|
4037
85abb6c3ec8b
of-netcdf: patch for --enable-64 (Bug #46060)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
1 diff -ur netcdf.orig/src/__netcdf__.cc netcdf/src/__netcdf__.cc |
85abb6c3ec8b
of-netcdf: patch for --enable-64 (Bug #46060)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
2 --- netcdf.orig/src/__netcdf__.cc 2015-09-26 07:53:37.710240236 -0400 |
85abb6c3ec8b
of-netcdf: patch for --enable-64 (Bug #46060)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
3 +++ netcdf/src/__netcdf__.cc 2015-09-26 13:58:27.115208120 -0400 |
85abb6c3ec8b
of-netcdf: patch for --enable-64 (Bug #46060)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
4 @@ -551,8 +551,14 @@ |
85abb6c3ec8b
of-netcdf: patch for --enable-64 (Bug #46060)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
5 check_err(nc_inq_unlimdims(ncid, &nunlimdims, NULL)); |
85abb6c3ec8b
of-netcdf: patch for --enable-64 (Bug #46060)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
6 Array<int> unlimdimids = Array<int>(dim_vector(1,nunlimdims)); |
85abb6c3ec8b
of-netcdf: patch for --enable-64 (Bug #46060)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
7 check_err(nc_inq_unlimdims(ncid, &nunlimdims, unlimdimids.fortran_vec())); |
85abb6c3ec8b
of-netcdf: patch for --enable-64 (Bug #46060)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
8 + |
85abb6c3ec8b
of-netcdf: patch for --enable-64 (Bug #46060)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
9 + Array<double> d_unlimdimids = Array<double>(dim_vector(1,nunlimdims)); |
85abb6c3ec8b
of-netcdf: patch for --enable-64 (Bug #46060)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
10 + for (octave_idx_type idx=0;idx<d_unlimdimids.numel();idx++) |
85abb6c3ec8b
of-netcdf: patch for --enable-64 (Bug #46060)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
11 + { |
85abb6c3ec8b
of-netcdf: patch for --enable-64 (Bug #46060)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
12 + d_unlimdimids(idx) = unlimdimids(idx); |
85abb6c3ec8b
of-netcdf: patch for --enable-64 (Bug #46060)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
13 + } |
85abb6c3ec8b
of-netcdf: patch for --enable-64 (Bug #46060)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
14 |
85abb6c3ec8b
of-netcdf: patch for --enable-64 (Bug #46060)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
15 - return octave_value(unlimdimids); |
85abb6c3ec8b
of-netcdf: patch for --enable-64 (Bug #46060)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
16 + return octave_value(d_unlimdimids); |
85abb6c3ec8b
of-netcdf: patch for --enable-64 (Bug #46060)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
17 } |
85abb6c3ec8b
of-netcdf: patch for --enable-64 (Bug #46060)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
18 |
85abb6c3ec8b
of-netcdf: patch for --enable-64 (Bug #46060)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
19 |
85abb6c3ec8b
of-netcdf: patch for --enable-64 (Bug #46060)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
20 @@ -1840,7 +1846,14 @@ |
85abb6c3ec8b
of-netcdf: patch for --enable-64 (Bug #46060)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
21 Array<int> varids = Array<int>(dim_vector(1,nvars)); |
85abb6c3ec8b
of-netcdf: patch for --enable-64 (Bug #46060)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
22 check_err(nc_inq_varids(ncid, &nvars, varids.fortran_vec())); |
85abb6c3ec8b
of-netcdf: patch for --enable-64 (Bug #46060)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
23 |
85abb6c3ec8b
of-netcdf: patch for --enable-64 (Bug #46060)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
24 - return octave_value(varids); |
85abb6c3ec8b
of-netcdf: patch for --enable-64 (Bug #46060)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
25 + Array<double> d_varids = Array<double>(dim_vector(1,nvars)); |
85abb6c3ec8b
of-netcdf: patch for --enable-64 (Bug #46060)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
26 + for (octave_idx_type idx=0;idx<d_varids.numel();idx++) |
85abb6c3ec8b
of-netcdf: patch for --enable-64 (Bug #46060)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
27 + { |
85abb6c3ec8b
of-netcdf: patch for --enable-64 (Bug #46060)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
28 + d_varids(idx) = varids(idx); |
85abb6c3ec8b
of-netcdf: patch for --enable-64 (Bug #46060)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
29 + } |
85abb6c3ec8b
of-netcdf: patch for --enable-64 (Bug #46060)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
30 + |
85abb6c3ec8b
of-netcdf: patch for --enable-64 (Bug #46060)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
31 + |
85abb6c3ec8b
of-netcdf: patch for --enable-64 (Bug #46060)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
32 + return octave_value(d_varids); |
85abb6c3ec8b
of-netcdf: patch for --enable-64 (Bug #46060)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
33 } |
85abb6c3ec8b
of-netcdf: patch for --enable-64 (Bug #46060)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
34 |
85abb6c3ec8b
of-netcdf: patch for --enable-64 (Bug #46060)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
35 DEFUN_DLD(netcdf_inqVar, args,, |
85abb6c3ec8b
of-netcdf: patch for --enable-64 (Bug #46060)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
36 @@ -1996,8 +2009,14 @@ |
85abb6c3ec8b
of-netcdf: patch for --enable-64 (Bug #46060)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
37 check_err(nc_inq_ndims(ncid, &ndims)); |
85abb6c3ec8b
of-netcdf: patch for --enable-64 (Bug #46060)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
38 Array<int> dimids = Array<int>(dim_vector(1,ndims)); |
85abb6c3ec8b
of-netcdf: patch for --enable-64 (Bug #46060)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
39 check_err(nc_inq_dimids(ncid, &ndims, dimids.fortran_vec(),include_parents)); |
85abb6c3ec8b
of-netcdf: patch for --enable-64 (Bug #46060)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
40 + |
85abb6c3ec8b
of-netcdf: patch for --enable-64 (Bug #46060)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
41 + Array<double> d_dimids = Array<double>(dim_vector(1,ndims)); |
85abb6c3ec8b
of-netcdf: patch for --enable-64 (Bug #46060)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
42 + for (octave_idx_type idx=0;idx<d_dimids.numel();idx++) |
85abb6c3ec8b
of-netcdf: patch for --enable-64 (Bug #46060)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
43 + { |
85abb6c3ec8b
of-netcdf: patch for --enable-64 (Bug #46060)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
44 + d_dimids(idx) = dimids(idx); |
85abb6c3ec8b
of-netcdf: patch for --enable-64 (Bug #46060)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
45 + } |
85abb6c3ec8b
of-netcdf: patch for --enable-64 (Bug #46060)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
46 |
85abb6c3ec8b
of-netcdf: patch for --enable-64 (Bug #46060)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
47 - return octave_value(dimids); |
85abb6c3ec8b
of-netcdf: patch for --enable-64 (Bug #46060)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
48 + return octave_value(d_dimids); |
85abb6c3ec8b
of-netcdf: patch for --enable-64 (Bug #46060)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
49 } |
85abb6c3ec8b
of-netcdf: patch for --enable-64 (Bug #46060)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
50 |
85abb6c3ec8b
of-netcdf: patch for --enable-64 (Bug #46060)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
51 |
85abb6c3ec8b
of-netcdf: patch for --enable-64 (Bug #46060)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
52 @@ -2067,8 +2086,14 @@ |
85abb6c3ec8b
of-netcdf: patch for --enable-64 (Bug #46060)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
53 |
85abb6c3ec8b
of-netcdf: patch for --enable-64 (Bug #46060)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
54 Array<int> ncids = Array<int>(dim_vector(1,numgrps)); |
85abb6c3ec8b
of-netcdf: patch for --enable-64 (Bug #46060)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
55 check_err(nc_inq_grps(ncid, NULL, ncids.fortran_vec())); |
85abb6c3ec8b
of-netcdf: patch for --enable-64 (Bug #46060)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
56 - |
85abb6c3ec8b
of-netcdf: patch for --enable-64 (Bug #46060)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
57 - return octave_value(ncids); |
85abb6c3ec8b
of-netcdf: patch for --enable-64 (Bug #46060)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
58 + |
85abb6c3ec8b
of-netcdf: patch for --enable-64 (Bug #46060)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
59 + Array<double> d_ncids = Array<double>(dim_vector(1,numgrps)); |
85abb6c3ec8b
of-netcdf: patch for --enable-64 (Bug #46060)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
60 + for (octave_idx_type idx=0;idx<d_ncids.numel();idx++) |
85abb6c3ec8b
of-netcdf: patch for --enable-64 (Bug #46060)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
61 + { |
85abb6c3ec8b
of-netcdf: patch for --enable-64 (Bug #46060)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
62 + d_ncids(idx) = ncids(idx); |
85abb6c3ec8b
of-netcdf: patch for --enable-64 (Bug #46060)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
63 + } |
85abb6c3ec8b
of-netcdf: patch for --enable-64 (Bug #46060)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
64 + |
85abb6c3ec8b
of-netcdf: patch for --enable-64 (Bug #46060)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
65 + return octave_value(d_ncids); |
85abb6c3ec8b
of-netcdf: patch for --enable-64 (Bug #46060)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
66 } |
85abb6c3ec8b
of-netcdf: patch for --enable-64 (Bug #46060)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
67 |
85abb6c3ec8b
of-netcdf: patch for --enable-64 (Bug #46060)
John Donoghue <john.donoghue@ieee.org>
parents:
diff
changeset
|
68 //int nc_inq_grpname(int ncid, char *name); |