Hello community,
here is the log from the commit of package getdata for openSUSE:12.3 checked in at 2013-02-04 20:16:07
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:12.3/getdata (Old)
and /work/SRC/openSUSE:12.3/.getdata.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "getdata", Maintainer is ""
Changes:
--------
--- /work/SRC/openSUSE:12.3/getdata/getdata.changes 2013-01-31 01:17:33.000000000 +0100
+++ /work/SRC/openSUSE:12.3/.getdata.new/getdata.changes 2013-02-04 20:16:13.000000000 +0100
@@ -1,0 +2,6 @@
+Thu Jan 31 20:44:02 UTC 2013 - dvaleev@suse.com
+
+- set gd_unaligned_ok on ppc64 too (getdata-ppc64.patch)
+- fix getdata on bigendian (getdata-bigendian.patch)
+
+-------------------------------------------------------------------
New:
----
getdata-bigendian.patch
getdata-ppc64.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ getdata.spec ++++++
--- /var/tmp/diff_new_pack.O4hs6h/_old 2013-02-04 20:16:13.000000000 +0100
+++ /var/tmp/diff_new_pack.O4hs6h/_new 2013-02-04 20:16:13.000000000 +0100
@@ -1,7 +1,7 @@
#
# spec file for package getdata
#
-# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2011,2012 Christian Trippe
#
# All modifications and additions to the file contributed by third parties
@@ -25,6 +25,8 @@
Group: Development/Libraries/C and C++
Url: http://getdata.sourceforge.net/
Source: %{name}-%{version}.tar.bz2
+Patch0: getdata-ppc64.patch
+Patch1: getdata-bigendian.patch
BuildRequires: bzip2
BuildRequires: gcc-c++
BuildRequires: gcc-fortran
@@ -126,6 +128,8 @@
%prep
%setup -q
+%patch0 -p1
+%patch1 -p1
%build
%configure --disable-static --enable-modules --disable-perl
++++++ getdata-bigendian.patch ++++++
Index: getdata-0.8.2/bindings/python/pyentry.c
===================================================================
--- getdata-0.8.2.orig/bindings/python/pyentry.c
+++ getdata-0.8.2/bindings/python/pyentry.c
@@ -96,25 +96,51 @@
*scalar = gdpy_dup_pystring(pyobj);
else {
*scalar = NULL;
- if (type == GD_INT64)
- *(int64_t*)data = (int64_t)PyLong_AsLongLong(pyobj);
- else if (type == GD_COMPLEX128)
- *(double complex*)data = gdpy_as_complex(pyobj);
- else if (type == GD_FLOAT64)
- *(double*)data = PyFloat_AsDouble(pyobj);
- else if (type == GD_INT16)
- *(int16_t*)data = PyLong_AsLong(pyobj);
- else if (type == GD_UINT16)
- *(uint16_t*)data = PyLong_AsUnsignedLong(pyobj);
- else if (type == GD_UINT64) {
+ switch (type) {
+ case GD_UINT8:
+ *(uint8_t*)data = (uint8_t)PyInt_AsUnsignedLongMask(pyobj);
+ break;
+ case GD_INT8:
+ *(int8_t*)data = (int8_t)PyInt_AsLong(pyobj);
+ break;
+ case GD_UINT16:
+ *(uint16_t*)data = (uint16_t)PyInt_AsUnsignedLongMask(pyobj);
+ break;
+ case GD_INT16:
+ *(int16_t*)data = (int16_t)PyInt_AsLong(pyobj);
+ break;
+ case GD_UINT32:
+ *(uint32_t*)data = (uint32_t)PyLong_AsUnsignedLong(pyobj);
+ break;
+ case GD_INT32:
+ *(int32_t*)data = (int32_t)PyLong_AsLong(pyobj);
+ break;
+ case GD_UINT64:
if (PyLong_Check(pyobj))
*(uint64_t*)data = PyLong_AsUnsignedLongLong(pyobj);
else
*(uint64_t*)data = PyInt_AsUnsignedLongLongMask(pyobj);
- } else
+ break;
+ case GD_INT64:
+ *(int64_t*)data = (int64_t)PyLong_AsLongLong(pyobj);
+ break;
+ case GD_FLOAT32:
+ *(float*)data = (float)PyFloat_AsDouble(pyobj);
+ break;
+ case GD_FLOAT64:
+ *(double*)data = PyFloat_AsDouble(pyobj);
+ break;
+ case GD_COMPLEX64:
+ *(float complex*)data = gdpy_as_complex(pyobj);
+ break;
+ case GD_COMPLEX128:
+ *(double complex*)data = gdpy_as_complex(pyobj);
+ break;
+ default:
PyErr_Format(PyExc_RuntimeError,
"unexpected field type (%x) inside %s", type, __func__);
}
+ }
dreturnvoid();
}
@@ -187,7 +213,7 @@
PyErr_SetString(PyExc_ValueError,
"'pygetdata.entry' invalid data type");
- gdpy_set_scalar_from_pyobj(PyTuple_GetItem(tuple, 1), GD_UINT16,
+ gdpy_set_scalar_from_pyobj(PyTuple_GetItem(tuple, 1), GD_UINT_TYPE,
&E->scalar[0], &E->spf);
break;
case GD_LINCOM_ENTRY:
@@ -283,10 +309,10 @@
return;
}
- gdpy_set_scalar_from_pyobj(PyTuple_GetItem(tuple, 1), GD_INT16,
+ gdpy_set_scalar_from_pyobj(PyTuple_GetItem(tuple, 1), GD_INT_TYPE,
&E->scalar[0], &E->bitnum);
if (size > 2)
- gdpy_set_scalar_from_pyobj(PyTuple_GetItem(tuple, 2), GD_INT16,
+ gdpy_set_scalar_from_pyobj(PyTuple_GetItem(tuple, 2), GD_INT_TYPE,
&E->scalar[1], &E->numbits);
else {
E->numbits = 1;
@@ -445,10 +471,10 @@
return;
}
- gdpy_set_scalar_from_pyobj(PyTuple_GetItem(tuple, 2), GD_UINT16,
+ gdpy_set_scalar_from_pyobj(PyTuple_GetItem(tuple, 2), GD_INT_TYPE,
&E->scalar[0], &E->count_val);
- gdpy_set_scalar_from_pyobj(PyTuple_GetItem(tuple, 3), GD_UINT16,
+ gdpy_set_scalar_from_pyobj(PyTuple_GetItem(tuple, 3), GD_INT_TYPE,
&E->scalar[1], &E->count_max);
break;
case GD_CARRAY_ENTRY:
@@ -1035,7 +1061,7 @@
return -1;
}
- gdpy_set_scalar_from_pyobj(value, GD_UINT16, &scalar, &spf);
+ gdpy_set_scalar_from_pyobj(value, GD_UINT_TYPE, &scalar, &spf);
if (PyErr_Occurred()) {
free(scalar);
@@ -1421,7 +1447,7 @@
return -1;
}
- gdpy_set_scalar_from_pyobj(value, GD_INT16, &scalar, &bitnum);
+ gdpy_set_scalar_from_pyobj(value, GD_INT_TYPE, &scalar, &bitnum);
if (PyErr_Occurred()) {
free(scalar);
dreturn("%i", -1);
@@ -1476,7 +1502,7 @@
return -1;
}
- gdpy_set_scalar_from_pyobj(value, GD_INT16, &scalar, &numbits);
+ gdpy_set_scalar_from_pyobj(value, GD_INT_TYPE, &scalar, &numbits);
if (PyErr_Occurred()) {
dreturn("%i", -1);
@@ -1646,7 +1672,7 @@
return -1;
}
- gdpy_set_scalar_from_pyobj(value, GD_UINT16, &scalar, &count_val);
+ gdpy_set_scalar_from_pyobj(value, GD_INT_TYPE, &scalar, &count_val);
if (PyErr_Occurred()) {
dreturn("%i", -1);
@@ -1698,7 +1724,7 @@
return -1;
}
- gdpy_set_scalar_from_pyobj(value, GD_UINT16, &scalar, &count_max);
+ gdpy_set_scalar_from_pyobj(value, GD_INT_TYPE, &scalar, &count_max);
if (PyErr_Occurred()) {
dreturn("%i", -1);
Index: getdata-0.8.2/src/del.c
===================================================================
--- getdata-0.8.2.orig/src/del.c
+++ getdata-0.8.2/src/del.c
@@ -135,7 +135,7 @@ static void _GD_DeReference(DIRFILE *res
switch(E->field_type) {
case GD_RAW_ENTRY:
- _GD_DeReferenceOne(D, E, C, check, 0, GD_UINT16, &E->EN(raw,spf));
+ _GD_DeReferenceOne(D, E, C, check, 0, GD_UINT_TYPE, &E->EN(raw,spf));
break;
case GD_POLYNOM_ENTRY:
for (i = 0; i <= E->EN(polynom,poly_ord); ++i) {
Index: getdata-0.8.2/src/entry.c
===================================================================
--- getdata-0.8.2.orig/src/entry.c
+++ getdata-0.8.2/src/entry.c
@@ -206,7 +206,7 @@ int _GD_CalculateEntry(DIRFILE *restrict
switch(E->field_type) {
case GD_RAW_ENTRY:
- _GD_GetScalar(D, E, 0, GD_UINT16, &E->EN(raw,spf), err);
+ _GD_GetScalar(D, E, 0, GD_UINT_TYPE, &E->EN(raw,spf), err);
break;
case GD_POLYNOM_ENTRY:
E->comp_scal = 0;
Index: getdata-0.8.2/src/flush.c
===================================================================
--- getdata-0.8.2.orig/src/flush.c
+++ getdata-0.8.2/src/flush.c
@@ -391,7 +391,7 @@ static void _GD_FieldSpec(DIRFILE* D, FI
fprintf(stream, " RAW%s %s ", pretty ? " " : "",
(permissive || D->standards >= 5) ? _GD_TypeName(D,
E->EN(raw,data_type)) : _GD_OldTypeName(D, E->EN(raw,data_type)));
- _GD_WriteConst(D, stream, me, permissive, GD_UINT16, &E->EN(raw,spf),
+ _GD_WriteConst(D, stream, me, permissive, GD_UINT_TYPE, &E->EN(raw,spf),
E->scalar[0], E->scalar_ind[0], "\n");
break;
case GD_LINCOM_ENTRY:
Index: getdata-0.8.2/src/mod.c
===================================================================
--- getdata-0.8.2.orig/src/mod.c
+++ getdata-0.8.2/src/mod.c
@@ -257,7 +257,7 @@ static int _GD_Change(DIRFILE *D, const
switch(E->field_type) {
case GD_RAW_ENTRY:
j = _GD_AlterScalar(D, N->EN(raw,spf) && N->EN(raw,spf) != E->EN(raw,spf),
- GD_UINT16, &Q.EN(raw,spf), &N->EN(raw,spf), Q.scalar, Q.scalar_ind,
+ GD_UINT_TYPE, &Q.EN(raw,spf), &N->EN(raw,spf), Q.scalar, Q.scalar_ind,
N->scalar[0], N->scalar_ind[0], E->e->calculated, E->fragment_index);
if (j & GD_AS_ERROR)
@@ -293,7 +293,7 @@ static int _GD_Change(DIRFILE *D, const
struct encoding_t *enc;
if (j & GD_AS_NEED_RECALC)
- if (gd_get_constant(D, Q.scalar[0], GD_UINT16, &Q.EN(raw,spf)))
+ if (gd_get_constant(D, Q.scalar[0], GD_UINT_TYPE, &Q.EN(raw,spf)))
break;
nf = BUFFER_SIZE / _gd_max(E->e->u.raw.size,
Index: getdata-0.8.2/src/parse.c
===================================================================
--- getdata-0.8.2.orig/src/parse.c
+++ getdata-0.8.2/src/parse.c
@@ -316,7 +316,7 @@ static gd_entry_t *_GD_ParseRaw(DIRFILE
_GD_SetError(D, GD_E_FORMAT, GD_E_FORMAT_BAD_TYPE, format_file, line,
in_cols[2]);
else if ((E->scalar[0] = _GD_SetScalar(D, in_cols[3], &E->EN(raw,spf),
- GD_UINT16, me, format_file, line, E->scalar_ind, NULL, standards,
+ GD_UINT_TYPE, me, format_file, line, E->scalar_ind, NULL, standards,
pedantic)) == NULL)
{
E->e->calculated = 1;
@@ -772,13 +772,13 @@ static gd_entry_t *_GD_ParseMplex(DIRFIL
E->in_fields[1] = _GD_MungeFromFrag(D, NULL, me, in_cols[3], &offset);
E->scalar[0] = _GD_SetScalar(D, in_cols[4], &E->EN(mplex,count_val),
- GD_UINT16, me, format_file, line, E->scalar_ind, NULL, standards,
+ GD_INT_TYPE, me, format_file, line, E->scalar_ind, NULL, standards,
pedantic);
/* the count max, if present */
if (n_cols > 5) {
E->scalar[1] = _GD_SetScalar(D, in_cols[5], &E->EN(mplex,count_max),
- GD_UINT16, me, format_file, line, E->scalar_ind + 1, NULL, standards,
+ GD_INT_TYPE, me, format_file, line, E->scalar_ind + 1, NULL, standards,
pedantic);
if (E->EN(mplex,count_max) < 0)
_GD_SetError(D, GD_E_FORMAT, GD_E_FORMAT_MPLEXVAL, format_file, line,
++++++ getdata-ppc64.patch ++++++
Index: getdata-0.8.2/configure
===================================================================
--- getdata-0.8.2.orig/configure
+++ getdata-0.8.2/configure
@@ -4451,7 +4451,7 @@ echo
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${host} supports fast unaligned memory access" >&5
$as_echo_n "checking whether ${host} supports fast unaligned memory access... " >&6; }
case "${host}" in
- i?86-*-*|powerpc-*-*|x86_64-*-*) gd_unaligned_ok=yes;
+ i?86-*-*|powerpc*-*|x86_64-*-*) gd_unaligned_ok=yes;
$as_echo "#define UNALIGNED_ACCESS_OK 1" >>confdefs.h
Index: getdata-0.8.2/configure.ac
===================================================================
--- getdata-0.8.2.orig/configure.ac
+++ getdata-0.8.2/configure.ac
@@ -326,7 +326,7 @@ echo "*** Checking host environment"
echo
AC_MSG_CHECKING([whether ${host} supports fast unaligned memory access])
case "${host}" in
- i?86-*-*|powerpc-*-*|x86_64-*-*) gd_unaligned_ok=yes;
+ i?86-*-*|powerpc*-*|x86_64-*-*) gd_unaligned_ok=yes;
AC_DEFINE([UNALIGNED_ACCESS_OK], [1],
[Define to 1 if the platform supports fast unaligned memory access])
;;
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org