diff options
Diffstat (limited to 'sci-chemistry/gchemutils/files')
-rw-r--r-- | sci-chemistry/gchemutils/files/gchemutils-0.10.3-glibc-2.10.patch | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/sci-chemistry/gchemutils/files/gchemutils-0.10.3-glibc-2.10.patch b/sci-chemistry/gchemutils/files/gchemutils-0.10.3-glibc-2.10.patch new file mode 100644 index 000000000000..45cf973810cd --- /dev/null +++ b/sci-chemistry/gchemutils/files/gchemutils-0.10.3-glibc-2.10.patch @@ -0,0 +1,37 @@ +diff -ur gnome-chemistry-utils-0.10.3.orig/libs/gcu/element.cc gnome-chemistry-utils-0.10.3/libs/gcu/element.cc +--- gnome-chemistry-utils-0.10.3.orig/libs/gcu/element.cc 2009-01-05 21:09:59.000000000 +0200 ++++ gnome-chemistry-utils-0.10.3/libs/gcu/element.cc 2009-08-08 11:30:16.000000000 +0300 +@@ -44,8 +44,8 @@ + + static void ReadValue (char const *source, GcuValue &value) + { +- char *buf, *dot; +- value.value = strtod (source, &buf); ++ const char *buf, *dot; ++ value.value = strtod (source, const_cast <char**> (&buf)); + dot = strchr (source, '.'); + value.prec = (dot)? buf - dot - 1: 0; + value.delta = (*buf == '(')? strtol (buf + 1, NULL, 10): 0; +@@ -53,8 +53,8 @@ + + static void ReadDimensionalValue (char const *source, GcuDimensionalValue &value) + { +- char *buf, *dot; +- value.value = strtod (source, &buf); ++ const char *buf, *dot; ++ value.value = strtod (source, const_cast <char**> (&buf)); + dot = strchr (source, '.'); + value.prec = (dot)? buf - dot - 1: 0; + value.delta = (*buf == '(')? strtol (buf + 1, NULL, 10): 0; +diff -ur gnome-chemistry-utils-0.10.3.orig/libs/gcu/spectrumdoc.cc gnome-chemistry-utils-0.10.3/libs/gcu/spectrumdoc.cc +--- gnome-chemistry-utils-0.10.3.orig/libs/gcu/spectrumdoc.cc 2009-01-05 21:09:59.000000000 +0200 ++++ gnome-chemistry-utils-0.10.3/libs/gcu/spectrumdoc.cc 2009-08-08 11:29:46.000000000 +0300 +@@ -1411,7 +1411,7 @@ + char buf[32], c = data[0]; + double val = 0., newval = 0.; + bool pos, diff = false; +- char *eq = strstr (data, "$$"); ++ char *eq = strstr (const_cast <char *> (data), "$$"); + if (eq) + *eq = 0; + pos = true; |