Add patch to fix integer wrapping in test
This commit is contained in:
parent
5e3477da5c
commit
14eb82c4ad
35
hdf-wrap.patch
Normal file
35
hdf-wrap.patch
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
diff -up hdf-4.2.9/hdf/test/sdmms.c.wrap hdf-4.2.9/hdf/test/sdmms.c
|
||||||
|
--- hdf-4.2.9/hdf/test/sdmms.c.wrap 2013-02-07 21:44:52.000000000 -0700
|
||||||
|
+++ hdf-4.2.9/hdf/test/sdmms.c 2013-02-16 20:20:35.741870559 -0700
|
||||||
|
@@ -63,9 +63,10 @@ static int32 ical5;
|
||||||
|
void
|
||||||
|
test_sdmms(void)
|
||||||
|
{
|
||||||
|
- int i, j, err, err1, err2, ret;
|
||||||
|
- intn rank;
|
||||||
|
- int32 dims[2];
|
||||||
|
+ unsigned int i, j;
|
||||||
|
+ int err, err1, err2, ret;
|
||||||
|
+ intn rank;
|
||||||
|
+ int32 dims[2];
|
||||||
|
|
||||||
|
rank = 2;
|
||||||
|
dims[0] = 10;
|
||||||
|
@@ -87,7 +88,7 @@ test_sdmms(void)
|
||||||
|
ui16[i][j] = (uint16) ((i * 6000) + j); /* range: 0 ~ 60000 */
|
||||||
|
|
||||||
|
i32[i][j] = (int32) ((i * 60000) - 300000 + j); /* range: 0 ~ 2-billion */
|
||||||
|
- ui32[i][j] = (uint32) ((i * 400000000) + j); /* range: 0 ~ 4-billion */
|
||||||
|
+ ui32[i][j] = (uint32) ((i * 400000000U) + j); /* range: 0 ~ 4-billion */
|
||||||
|
}
|
||||||
|
|
||||||
|
f32scale[i] = (float32) ((i * 40) + j); /* range: 0 ~ 4-billion */
|
||||||
|
@@ -99,7 +100,7 @@ test_sdmms(void)
|
||||||
|
ui16scale[i] = (uint16) ((i * 6000) + j); /* range: 0 ~ 60000 */
|
||||||
|
|
||||||
|
i32scale[i] = (int32) ((i * 60000) - 300000 + j); /* range: 0 ~ 2-billion */
|
||||||
|
- ui32scale[i] = (uint32) ((i * 400000000) + j); /* range: 0 ~ 4-billion */
|
||||||
|
+ ui32scale[i] = (uint32) ((i * 400000000U) + j); /* range: 0 ~ 4-billion */
|
||||||
|
}
|
||||||
|
|
||||||
|
cal1 = (float64) 10.0;
|
5
hdf.spec
5
hdf.spec
@ -13,6 +13,8 @@ Patch3: hdf-4.2.4-s390.patch
|
|||||||
Patch4: hdf-4.2.7-arm.patch
|
Patch4: hdf-4.2.7-arm.patch
|
||||||
# Add some missing declarations
|
# Add some missing declarations
|
||||||
Patch5: hdf-declaration.patch
|
Patch5: hdf-declaration.patch
|
||||||
|
# Patch to fix integer wrapping in test
|
||||||
|
Patch6: hdf-wrap.patch
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
BuildRequires: flex byacc libjpeg-devel zlib-devel
|
BuildRequires: flex byacc libjpeg-devel zlib-devel
|
||||||
%if "%{?dist}" != ".el4"
|
%if "%{?dist}" != ".el4"
|
||||||
@ -50,6 +52,8 @@ HDF development headers and libraries.
|
|||||||
%patch2 -p1 -b .sparc
|
%patch2 -p1 -b .sparc
|
||||||
%patch3 -p1 -b .s390
|
%patch3 -p1 -b .s390
|
||||||
%patch4 -p1 -b .arm
|
%patch4 -p1 -b .arm
|
||||||
|
%patch5 -p1 -b .declaration
|
||||||
|
%patch6 -p1 -b .wrap
|
||||||
|
|
||||||
chmod a-x *hdf/*/*.c hdf/*/*.h
|
chmod a-x *hdf/*/*.c hdf/*/*.h
|
||||||
# restore include file timestamps modified by patching
|
# restore include file timestamps modified by patching
|
||||||
@ -119,6 +123,7 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
* Fri Feb 15 2013 Orion Poplawski <orion@cora.nwra.com> 4.2.9-1
|
* Fri Feb 15 2013 Orion Poplawski <orion@cora.nwra.com> 4.2.9-1
|
||||||
- Update to 4.2.9
|
- Update to 4.2.9
|
||||||
- Add patch for some missing declarations
|
- Add patch for some missing declarations
|
||||||
|
- Add patch to fix integer wrapping in test
|
||||||
|
|
||||||
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.2.8-4
|
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.2.8-4
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
|
||||||
|
Loading…
Reference in New Issue
Block a user