SHA256
1
0
forked from pool/gsl
gsl/gsl-wrap.diff

69 lines
2.3 KiB
Diff
Raw Normal View History

Index: gsl-1.11/sort/Makefile.am
===================================================================
--- gsl-1.11.orig/sort/Makefile.am
+++ gsl-1.11/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.11/Makefile.in
===================================================================
--- gsl-1.11.orig/Makefile.in
+++ gsl-1.11/Makefile.in
@@ -89,16 +89,16 @@ SCRIPTS = $(bin_SCRIPTS)
DEFAULT_INCLUDES = -I.@am__isrc@
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 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
- $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) $(CFLAGS_$@) $(EXTRA_CFLAGS)
CCLD = $(CC)
LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
- $(LDFLAGS) -o $@
+ $(LDFLAGS) $(LDFLAGS_$@) $(EXTRA_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.11/sort/test_source.c
===================================================================
--- gsl-1.11.orig/sort/test_source.c
+++ gsl-1.11/sort/test_source.c
@@ -158,19 +158,19 @@ TYPE (test_sort_vector) (size_t N, size_
void
FUNCTION (my, initialize) (TYPE (gsl_vector) * v)
{
size_t i;
- ATOMIC k = 0;
- volatile ATOMIC kk;
+ ATOMIC maxk = 0;
/* Must be sorted initially */
for (i = 0; i < v->size; i++)
{
- kk = k;
- k++;
- /* Prevent overflow */
- if (k < kk) k = kk;
+ ATOMIC k = i;
+ if (k < maxk) /* prevent wrap around */
+ k = maxk;
+ else
+ maxk = k;
FUNCTION (gsl_vector, set) (v, i, k);
}
}