summaryrefslogtreecommitdiff
path: root/lang/scm/files
diff options
context:
space:
mode:
Diffstat (limited to 'lang/scm/files')
-rw-r--r--lang/scm/files/patch-bigrecy_32bit_upstream96
-rw-r--r--lang/scm/files/patch-r4rstest.scm12
-rw-r--r--lang/scm/files/patch-texinfo5_fixes201
-rw-r--r--lang/scm/files/patch-warnings82
4 files changed, 45 insertions, 346 deletions
diff --git a/lang/scm/files/patch-bigrecy_32bit_upstream b/lang/scm/files/patch-bigrecy_32bit_upstream
deleted file mode 100644
index 594f9766de2b..000000000000
--- a/lang/scm/files/patch-bigrecy_32bit_upstream
+++ /dev/null
@@ -1,96 +0,0 @@
-Obtained from Debian
-
- https://launchpad.net/ubuntu/+source/scm/5f2-2build1
-
-Description: Support ARM64 ("aarch64") platform
-Author: Jakub Bogusz
---- scl.c 2015/01/03 20:50:15 1.142
-+++ scl.c 2016/08/10 02:33:05 1.143
-@@ -166,33 +166,34 @@
- /* try first with starved precision */
- {
- num = scm_ash(mant, MAKINUM(e2 - point));
-- bigrecy(mant);
-+ if (num != mant) bigrecy(mant);
- quo = scm_round_quotient(num, VELTS(pows5)[(long) point]);
- if (pmantexp2dbl(quo, point) != f) {
-- bigrecy(quo); quo = num;
-+ if (quo != num) { bigrecy(quo); quo = num; }
- num = scm_ash(quo, MAKINUM(1L));
-- bigrecy(quo);
-+ if (num != quo) bigrecy(quo);
- quo = scm_round_quotient(num, VELTS(pows5)[(long) --point]);
- }
-+ if (num != quo) bigrecy(num);
- }
- } else { /* e2 <= 0 */
- /* try first with starved precision */
- {
- SCM den = scm_ash(MAKINUM(1L), MAKINUM(point - e2));
- num = product(mant, VELTS(pows5)[- (long) point]);
-- bigrecy(mant);
-+ if (num != mant) { bigrecy(mant); if (mant != MAKINUM(1)) mant = INUM0; }
- quo = scm_round_quotient(num, den);
- if (pmantexp2dbl(quo, point) != f) {
-- bigrecy(quo); quo = num;
-+ if (quo != num) { bigrecy(quo); quo = num; }
- point--;
- num = product(quo, MAKINUM(10));
- if (mant != MAKINUM(1)) bigrecy(quo);
- quo = scm_round_quotient(num, den);
-- }
-+ if (quo != num) bigrecy(num);
-+ } else if ((mant != MAKINUM(1)) && (quo != num)) bigrecy(num);
- bigrecy(den);
- }
- }
-- bigrecy(num);
- a[ch++] = '.';
- /* if (sizeof(UBIGLONG)>=sizeof(double)) /\* Is ulong larger than mantissa? *\/ */
- /* ch += iulong2str(num2ulong(quo, (char *)ARG1, s_number2string), 10, &a[ch]); */
-@@ -680,7 +681,7 @@
- ans = ldexp(ans, bex + point);
- }
- if (num != quo) bigrecy(quo);
-- if (bmant != MAKINUM(1L)) bigrecy(num);
-+ if ((num != bmant) && (bmant != MAKINUM(1L))) bigrecy(num);
- return ans;
- } else {
- int maxpow = LENGTH(pows5) - 1;
-@@ -696,7 +697,7 @@
- quo = scm_round_quotient(num, scm_ash(scl, MAKINUM(1L)));
- }
- if (-point > maxpow) bigrecy(scl);
-- bigrecy(num);
-+ if (num != quo) bigrecy(num);
- ans = ldexp(int2dbl(quo), bex + point);
- bigrecy(quo);
- return ans;
-@@ -2478,7 +2479,7 @@
- tmp = acc;
- acc = product(tmp, tz1);
- #ifdef BIGDIG
-- bigrecy(tmp);
-+ if (acc != tmp) bigrecy(tmp);
- #endif
- break;
- }
-@@ -2486,7 +2487,7 @@
- tmp = acc;
- acc = product(tmp, tz1);
- #ifdef BIGDIG
-- bigrecy(tmp);
-+ if (acc != tmp) bigrecy(tmp);
- #endif
- }
- tmp = tz1;
-@@ -2841,8 +2842,8 @@
- bex += j * BITSPERDIG;
- if (bex > 0) ans = ldexp(ans, bex);
- }
-+ if (quo != num) bigrecy(quo);
- if (num != b) bigrecy(num);
-- if (quo != b) bigrecy(quo);
- if (tc16_bigneg==TYP16(b)) return -ans;
- return ans;
- }
diff --git a/lang/scm/files/patch-r4rstest.scm b/lang/scm/files/patch-r4rstest.scm
deleted file mode 100644
index b85ef51c0bdd..000000000000
--- a/lang/scm/files/patch-r4rstest.scm
+++ /dev/null
@@ -1,12 +0,0 @@
---- r4rstest.scm.orig
-+++ r4rstest.scm
-@@ -794,8 +794,7 @@
- (test #t 'mult-float-print-test (mult-float-print-test
- (string->number "3.1415926535897931")))
- (test #t 'mult-float-print-test (mult-float-print-test
-- (string->number "2.7182818284590451")))
-- (test #t float-rw-range-test)))
-+ (string->number "2.7182818284590451")))))
-
- (define (test-bignum)
- (define tb
diff --git a/lang/scm/files/patch-texinfo5_fixes b/lang/scm/files/patch-texinfo5_fixes
deleted file mode 100644
index 3991e97c65ed..000000000000
--- a/lang/scm/files/patch-texinfo5_fixes
+++ /dev/null
@@ -1,201 +0,0 @@
-Obtained from Debian:
-
- https://launchpad.net/ubuntu/+source/scm/5f2-2build1
-
---- Xlibscm.texi
-+++ Xlibscm.texi
-@@ -257,8 +257,9 @@ used.
- Returns the root window for the specified @var{screen-number}. Use
- @code{x:root-window} for functions that need a drawable of a particular
- screen or for creating top-level windows.
-+@end defun
-
--@defunx x:root-window window
-+@defun x:root-window window
- Returns the root window for the specified @var{window}'s screen.
- @end defun
-
-@@ -345,7 +346,9 @@ Returns the number of entries in the def
-
- @defun x:screen-depth display screen-number
- Returns the depth of the root window of the specified screen.
--@defunx x:screen-depth display
-+@end defun
-+
-+@defun x:screen-depth display
- @defunx x:screen-depth window
- @defunx x:screen-depth visual
- Returns the depth of argument.
-@@ -420,8 +423,9 @@ and the @var{visual} must be one support
-
- The returned window will have the attributes specified by
- @var{field-name}s and @var{value}.
-+@end defun
-
--@defunx x:create-window window position size border-width border background
-+@defun x:create-window window position size border-width border background
- The returned window inherits its depth, class, and visual from its
- parent. All other window attributes, except @var{background} and
- @var{border}, have their default values.
-@@ -909,7 +913,9 @@ those for @code{x:window-set!}:
- @defun x:get-window-property window property
- Returns the (string or list of numbers) value of @var{property} of
- @var{window}.
--@defunx x:get-window-property window property #t
-+@end defun
-+
-+@defun x:get-window-property window property #t
- Removes and returns the (string or list of numbers) value of
- @var{property} of @var{window}.
- @end defun
-@@ -1392,8 +1398,9 @@ The hotspot comes from the information s
- initial colors of a cursor are a black foreground and a white background
- (see X:Recolor-Cursor). The names of all cursor shapes are defined with
- the prefix XC: in @file{x11.scm}.
-+@end defun
-
--@defunx x:create-cursor source-font source-char mask-font mask-char fgc bgc
-+@defun x:create-cursor source-font source-char mask-font mask-char fgc bgc
- Creates a cursor from the source and mask bitmaps obtained from the
- specified font glyphs. The integer @var{source-char} must be a defined
- glyph in @var{source-font}. The integer @var{mask-char} must be a
-@@ -1402,12 +1409,14 @@ and @var{mask-char} glyphs are positione
- hotspot. The @var{source-char} and @var{mask-char} need not have the
- same bounding box metrics, and there is no restriction on the placement
- of the hotspot relative to the bounding boxes.
-+@end defun
-
--@defunx x:create-cursor source-font source-char #f #f fgc bgc
-+@defun x:create-cursor source-font source-char #f #f fgc bgc
- If @var{mask-font} and @var{mask-char} are #f, all pixels of the source
- are displayed.
-+@end defun
-
--@defunx x:create-cursor source-pixmap mask-pixmap fgc bgc origin
-+@defun x:create-cursor source-pixmap mask-pixmap fgc bgc origin
- @var{mask-pixmap} must be the same size as the pixmap defined by the
- @var{source-pixmap} argument. The foreground and background RGB values
- must be specified using @var{foreground-color} and
-@@ -1422,8 +1431,9 @@ source and mask must have depth one but
- @var{mask-pixmap} defines the shape of the cursor. The pixels set to 1
- in @var{mask-pixmap} define which source pixels are displayed, and the
- pixels set to 0 define which pixels are ignored.
-+@end defun
-
--@defunx x:create-cursor source-pixmap #f fgc bgc origin
-+@defun x:create-cursor source-pixmap #f fgc bgc origin
- If @var{mask-pixmap} is #f, all pixels of the source are displayed.
- @end defun
-
-@@ -1539,8 +1549,9 @@ The RGB values of the allocated entries
- succeeded or #f if it failed. The first array has the pixels allocated
- and the second has the plane-masks.
-
-+@end defun
-
--@defunx x:alloc-colormap-cells colormap ncolors rgb
-+@defun x:alloc-colormap-cells colormap ncolors rgb
- @defunx x:alloc-colormap-cells colormap ncolors rgb contiguous?
-
- The specified @var{ncolors} must be positive; and @var{rgb} a list or
-@@ -1596,8 +1607,9 @@ is in error, the one that gets reported
- @var{rgb} is a list or vector of 3 integers, describing the red, green,
- and blue intensities respectively; or an integer @samp{#x@i{rrggbb}},
- packing red, green and blue intensities in the range 0 - 255.
-+@end defun
-
--@defunx x:colormap-find-color colormap color-name
-+@defun x:colormap-find-color colormap color-name
-
- The case-insensitive string @var{color_name} specifies the name of a
- color (for example, @file{red})
-@@ -1630,8 +1642,9 @@ The integer @var{pixel} must be a valid
- @var{rgb} is a list or vector of 3 integers, describing the red, green,
- and blue intensities respectively; or an integer @samp{#x@i{rrggbb}},
- packing red, green and blue intensities in the range 0 - 255.
-+@end defun
-
--@defunx X:Color-Set! colormap pixel color-name
-+@defun X:Color-Set! colormap pixel color-name
-
- The case-insensitive string @var{color_name} specifies the name of a
- color (for example, @file{red})
-@@ -1671,8 +1684,9 @@ Flushes the output buffer. Some client
- function because the output buffer is automatically flushed as needed by
- calls to X:Pending, X:Next-Event, and X:Window-Event. Events generated
- by the server may be enqueued into the library's event queue.
-+@end defun
-
--@defunx x:flush gc
-+@defun x:flush gc
- Forces sending of GC component changes.
-
- Xlib usually defers sending changes to the components of a GC to the
-@@ -1726,12 +1740,14 @@ results.
-
- @defun x:draw-points drawable gc position @dots{}
- @var{Position} @dots{} specifies coordinates of the point to be drawn.
-+@end defun
-
--@defunx x:draw-points drawable gc x y @dots{}
-+@defun x:draw-points drawable gc x y @dots{}
- (@var{x}, @var{y}) @dots{} specifies coordinates of the point to be
- drawn.
-+@end defun
-
--@defunx x:draw-points drawable gc point-array
-+@defun x:draw-points drawable gc point-array
- @var{point-array} is a uniform short array of rank 2, whose rightmost
- index spans a range of 2.
-
-@@ -1748,12 +1764,14 @@ clip-mask.
- @defun x:draw-segments drawable gc pos1 pos2 @dots{}
- @var{Pos1}, @var{pos2}, @dots{} specify coordinates to be connected by
- segments.
-+@end defun
-
--@defunx x:draw-segments drawable gc x1 y1 x2 y2 @dots{}
-+@defun x:draw-segments drawable gc x1 y1 x2 y2 @dots{}
- (@var{x1}, @var{y1}), (@var{x2}, @var{y2}) @dots{} specify coordinates
- to be connected by segments.
-+@end defun
-
--@defunx x:draw-segments drawable gc point-array
-+@defun x:draw-segments drawable gc point-array
- @var{point-array} is a uniform short array of rank 2, whose rightmost
- index spans a range of 2.
-
-@@ -1779,12 +1797,14 @@ dash-offset, and dash-list.
- @defun x:draw-lines drawable gc pos1 pos2 @dots{}
- @var{Pos1}, @var{pos2}, @dots{} specify coordinates to be connected by
- lines.
-+@end defun
-
--@defunx x:draw-lines drawable gc x1 y1 x2 y2 @dots{}
-+@defun x:draw-lines drawable gc x1 y1 x2 y2 @dots{}
- (@var{x1}, @var{y1}), (@var{x2}, @var{y2}) @dots{} specify coordinates
- to be connected by lines.
-+@end defun
-
--@defunx x:draw-lines drawable gc point-array
-+@defun x:draw-lines drawable gc point-array
- @var{point-array} is a uniform short array of rank 2, whose rightmost
- index spans a range of 2.
-
-@@ -1810,12 +1830,14 @@ dash-offset, and dash-list.
-
- @defun x:fill-polygon drawable gc pos1 pos2 @dots{}
- @var{Pos1}, @var{pos2}, @dots{} specify coordinates of the border path.
-+@end defun
-
--@defunx x:fill-polygon drawable gc x1 y1 x2 y2 @dots{}
-+@defun x:fill-polygon drawable gc x1 y1 x2 y2 @dots{}
- (@var{x1}, @var{y1}), (@var{x2}, @var{y2}) @dots{} specify coordinates
- of the border path.
-+@end defun
-
--@defunx x:fill-polygon drawable gc point-array
-+@defun x:fill-polygon drawable gc point-array
- @var{point-array} is a uniform short array of rank 2, whose rightmost
- index spans a range of 2.
-
diff --git a/lang/scm/files/patch-warnings b/lang/scm/files/patch-warnings
index 0f5767679e13..a5b615c13bbe 100644
--- a/lang/scm/files/patch-warnings
+++ b/lang/scm/files/patch-warnings
@@ -3437,8 +3437,8 @@
-
void init_sc2()
{
---- scl.c 2015-01-02 22:43:33.000000000 -0500
-+++ scl.c 2015-01-23 18:55:19.000000000 -0500
+--- scl.c 2018-06-29 18:33:08.000000000 -0400
++++ scl.c 2024-01-04 14:02:59.999224000 -0500
@@ -35,5 +35,7 @@
static sizet pdbl2str P((double f, char *a, sizet ch));
static sizet iflo2str P((SCM flt, char *str));
@@ -3447,8 +3447,8 @@
+#endif
static long scm_twos_power P((SCM n));
static double mantexp2dbl P((SCM manstr, int expo));
-@@ -42,35 +44,37 @@
- static SCM ilog P((unsigned long m, SCM b, SCM k, unsigned long *n));
+@@ -43,44 +45,46 @@
+ static double dpows5[23];
-static char s_makrect[] = "make-rectangular", s_makpolar[] = "make-polar",
+static const char s_makrect[] = "make-rectangular", s_makpolar[] = "make-polar",
@@ -3467,7 +3467,7 @@
-char s_inexactp[] = "inexact?";
-static char s_zerop[] = "zero?", s_abs[] = "abs",
-+const char s_inexactp[] = "inexact?";
++const char s_inexactp[] = "inexact?";
+static const char s_zerop[] = "zero?", s_abs[] = "abs",
s_positivep[] = "positive?", s_negativep[] = "negative?";
-static char s_lessp[] = "<", s_grp[] = ">";
@@ -3488,21 +3488,24 @@
-static char s_str2list[] = "string->list";
-static char s_st_copy[] = "string-copy", s_st_fill[] = "string-fill!";
-static char s_vect2list[] = "vector->list", s_ve_fill[] = "vector-fill!";
--static char str_inf0[] = "inf.0", str_nan0[] = "nan.0", str_0[] = "0.0";
+-static char str_inf0[] = "inf.0", str_nan0[] = "nan.0", str_0[] = "0.";
-static char s_intexpt[] = "integer-expt", s_cintlog[] = "ceiling-integer-log";
-static char s_dfloat_parts[] = "double-float-parts";
+static const char s_list_tail[] = "list-tail";
+static const char s_str2list[] = "string->list";
+static const char s_st_copy[] = "string-copy", s_st_fill[] = "string-fill!";
+static const char s_vect2list[] = "vector->list", s_ve_fill[] = "vector-fill!";
-+#if defined(FLOATS) && defined(BIGDIG)
-+static const char str_inf0[] = "inf.0", str_nan0[] = "nan.0", str_0[] = "0.0";
++static const char s_intexpt[] = "integer-expt", s_cintlog[] = "ceiling-integer-log";
++#ifdef BIGDIG
+static const char s_dfloat_parts[] = "double-float-parts";
+#endif
-+static const char s_intexpt[] = "integer-expt", s_cintlog[] = "ceiling-integer-log";
#define s_intlog (&s_cintlog[8])
-@@ -81,5 +85,5 @@
+ /*** NUMBERS -> STRINGS ***/
+ #ifdef FLOATS
++static const char str_inf0[] = "inf.0", str_nan0[] = "nan.0", str_0[] = "0.";
+ static int dbl_mant_dig = 0;
+ static double max_dbl_int; /* Integers less than or equal to max_dbl_int
are representable exactly as doubles. */
-int inf2str(f, a)
@@ -3539,6 +3542,16 @@
+ const char *str;
long len;
register int radix;
+@@ -684,3 +690,3 @@
+ if (point < 23 && INUM(scm_intlength(bmant)) <= dbl_mant_dig)
+- return ldexp(num2dbl(bmant,ARG1,s_str2number) * dpows5[point], point);
++ return ldexp(num2dbl(bmant,(const char *)(intptr_t)ARG1,s_str2number) * dpows5[point], point);
+ {
+@@ -714,3 +720,3 @@
+ if (-point < 23 && INUM(scm_intlength(bmant)) <= dbl_mant_dig)
+- return ldexp(num2dbl(bmant,ARG1,s_str2number) / dpows5[-point], point);
++ return ldexp(num2dbl(bmant,(const char *)(intptr_t)ARG1,s_str2number) / dpows5[-point], point);
+ {
@@ -743,7 +749,7 @@
SCM istr2flo(str, len, radix)
@@ -3774,13 +3787,6 @@
+static SCM numident(x)
SCM x;
{
-@@ -2837,5 +2846,5 @@
- sizet j = i - (dbl_mant_dig + BITSPERDIG - 1)/BITSPERDIG;
- BIGDIG *digits = BDIGITS(quo);
-- if (j < 0) j = 0;
-+ if (i <= dbl_mant_dig + BITSPERDIG) j = 0;
- while (i-- > j) ans = digits[i] + ldexp(ans, BITSPERDIG);
- bex += j * BITSPERDIG;
@@ -2915,5 +2924,5 @@
}
@@ -4382,7 +4388,7 @@
+SCM_EXPORT void ints_warn P((const char *s1, const char* s2, const char *fname, int linum));
#endif
SCM_EXPORT void add_final P((void (*final)(void)));
-@@ -1007,18 +977,12 @@
+@@ -1007,18 +977,13 @@
SCM_EXPORT SCM scm_load_string P((SCM str));
SCM_EXPORT SCM scm_unexec P((const SCM pathname));
-SCM_EXPORT SCM scm_logbitp P((SCM index, SCM j1));
@@ -4396,7 +4402,7 @@
-SCM_EXPORT SCM scm_cintlog P((SCM base, SCM k));
-SCM_EXPORT SCM scm_ash P((SCM n, SCM cnt));
-SCM_EXPORT SCM scm_bitfield P((SCM n, SCM start, SCM end));
--SCM_EXPORT SCM scm_logcount P((SCM n));
+ SCM_EXPORT SCM scm_logcount P((SCM n));
-SCM_EXPORT SCM scm_intlength P((SCM n));
-SCM_EXPORT SCM scm_copybit P((SCM index, SCM j1, SCM bit));
+SCM_EXPORT SCM scm_logbitp P((SCM index, SCM j1));
@@ -4968,8 +4974,8 @@
+ bzero(&sad, sizeof(sad));
ASRTER(NIMP(sockpt) && OPFPORTP(sockpt), sockpt, ARG1, s_getsockname);
SYSCALL(sts = getsockname(fileno(STREAM(sockpt)),
---- subr.c 2014-05-02 20:06:08.000000000 -0400
-+++ subr.c 2015-01-23 18:55:19.000000000 -0500
+--- subr.c 2017-10-21 22:10:12.000000000 -0400
++++ subr.c 2024-01-04 14:43:25.011483000 -0500
@@ -25,14 +25,13 @@
#define s_append (s_st_append+7)
@@ -5176,13 +5182,6 @@
+static SCM scm_bitwise_bit_count(n)
SCM n;
{
-@@ -1421,5 +1425,5 @@
- }
-
--SCM scm_logcount(n)
-+static SCM scm_logcount(n)
- SCM n;
- {
@@ -1445,5 +1449,5 @@
}
@@ -5475,12 +5474,15 @@
+ const BIGDIG *x, *y;
sizet nx, ny;
int sgn;
-@@ -2075,4 +2081,5 @@
- return normbig(z);
+@@ -2076,6 +2082,4 @@
}
+-UBIGLONG divbigdig(ds, h, div)
+- BIGDIG *ds;
+- sizet h;
+- BIGDIG div;
+
- UBIGLONG divbigdig(ds, h, div)
- BIGDIG *ds;
++UBIGLONG divbigdig(BIGDIG *ds, sizet h, BIGDIG div)
+ {
@@ -2088,5 +2095,5 @@
return t2;
}
@@ -5507,8 +5509,8 @@
+ BIGDIG *y;
sizet xlen, ylen;
int sgn, mode;
---- sys.c 2014-04-24 23:01:53.000000000 -0400
-+++ sys.c 2015-01-27 01:32:50.000000000 -0500
+--- sys.c 2017-10-22 19:48:07.000000000 -0400
++++ sys.c 2024-01-04 14:20:24.372143000 -0500
@@ -26,7 +26,6 @@
#endif
@@ -6058,13 +6060,19 @@
+static const char s_port_table[] = "port table";
SCM scm_port_entry(stream, ptype, flags)
FILE *stream;
-@@ -2073,5 +2079,5 @@
+@@ -2073,6 +2079,10 @@
}
-static char remsg[] = "remove\n#define ", addmsg[] = "add\n#define ",
-+static const char remsg[] = "remove\n#define ", addmsg[] = "add\n#define ",
- rdmsg[] = "reduce";
+- rdmsg[] = "reduce";
++#if defined(BIGDIG) || defined(SHORT_SIZET) || defined(SHORT_INT) || \
++ defined(CDR_DOUBLES) || defined(SINGLES) || defined(STACK_GROWS_UP)
++static const char remsg[] = "remove\n#define ";
++#endif
++static const char addmsg[] = "add\n#define ", rdmsg[] = "reduce";
++
void init_storage(stack_start_ptr, init_heap_size)
+ STACKITEM *stack_start_ptr;
@@ -2249,5 +2255,5 @@
Cambridge, MA 02138
*/