67 lines
2.2 KiB
Diff
67 lines
2.2 KiB
Diff
Index: gsl-1.9/sort/Makefile.am
|
|
===================================================================
|
|
--- gsl-1.9.orig/sort/Makefile.am
|
|
+++ gsl-1.9/sort/Makefile.am
|
|
@@ -10,7 +10,9 @@ noinst_HEADERS = sortvec_source.c sortve
|
|
TESTS = $(check_PROGRAMS)
|
|
|
|
check_PROGRAMS = test
|
|
|
|
+#test_source.lo_CFLAGS = -fwrapv
|
|
+
|
|
test_SOURCES = test.c
|
|
test_LDADD = libgslsort.la ../permutation/libgslpermutation.la ../vector/libgslvector.la ../block/libgslblock.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la
|
|
|
|
Index: gsl-1.9/Makefile.in
|
|
===================================================================
|
|
--- gsl-1.9.orig/Makefile.in
|
|
+++ gsl-1.9/Makefile.in
|
|
@@ -106,15 +106,15 @@ SCRIPTS = $(bin_SCRIPTS)
|
|
DEFAULT_INCLUDES = -I. -I$(srcdir) -I.
|
|
depcomp =
|
|
am__depfiles_maybe =
|
|
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
|
- $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
|
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) $(CFLAGS_$@) $(EXTRA_CFLAGS)
|
|
LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
|
|
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
|
|
- $(AM_CFLAGS) $(CFLAGS)
|
|
+ $(AM_CFLAGS) $(CFLAGS) $(CFLAGS_$@) $(EXTRA_CFLAGS)
|
|
CCLD = $(CC)
|
|
LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
|
- $(AM_LDFLAGS) $(LDFLAGS) -o $@
|
|
+ $(AM_LDFLAGS) $(LDFLAGS) $(LDFLAGS_$@) -o $@
|
|
SOURCES = $(libgsl_la_SOURCES) $(gsl_histogram_SOURCES) \
|
|
$(gsl_randist_SOURCES)
|
|
DIST_SOURCES = $(libgsl_la_SOURCES) $(gsl_histogram_SOURCES) \
|
|
$(gsl_randist_SOURCES)
|
|
Index: gsl-1.9/sort/test_source.c
|
|
===================================================================
|
|
--- gsl-1.9.orig/sort/test_source.c
|
|
+++ gsl-1.9/sort/test_source.c
|
|
@@ -158,18 +158,19 @@ TYPE (test_sort_vector) (size_t N, size_
|
|
void
|
|
FUNCTION (my, initialize) (TYPE (gsl_vector) * v)
|
|
{
|
|
size_t i;
|
|
- ATOMIC k = 0, kk;
|
|
+ ATOMIC maxk = 0;
|
|
|
|
/* Must be sorted initially */
|
|
|
|
for (i = 0; i < v->size; i++)
|
|
{
|
|
- kk = k;
|
|
- k++;
|
|
- if (k < kk) /* prevent overflow */
|
|
- k = kk;
|
|
+ ATOMIC k = i;
|
|
+ if (k < maxk) /* prevent wrap around */
|
|
+ k = maxk;
|
|
+ else
|
|
+ maxk = k;
|
|
FUNCTION (gsl_vector, set) (v, i, k);
|
|
}
|
|
}
|
|
|