64-bit clean fillbytes.c
This commit is contained in:
parent
dd670927ac
commit
b87c007a7a
52
misc/cdrecord-current/patches/patch-bb
Normal file
52
misc/cdrecord-current/patches/patch-bb
Normal file
@ -0,0 +1,52 @@
|
||||
--- lib/fillbytes.c.orig Sun Feb 4 18:40:33 1996
|
||||
+++ lib/fillbytes.c Thu Apr 2 08:53:54 1998
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
#define DO8(a) a;a;a;a;a;a;a;a;
|
||||
|
||||
-#define cval ((char) lval)
|
||||
+#define cval ((char) ival)
|
||||
|
||||
#ifdef PROTOTYPES
|
||||
char *fillbytes(void *tov, int cnt, char val)
|
||||
@@ -37,14 +37,14 @@
|
||||
{
|
||||
register char *to = (char *)tov;
|
||||
register int n;
|
||||
- register long lval;
|
||||
+ register int ival;
|
||||
|
||||
if ((n = cnt) == 0)
|
||||
return (to);
|
||||
|
||||
- lval = val & 0xFF;
|
||||
+ ival = val & 0xFF;
|
||||
|
||||
- while (!laligned(to)) {
|
||||
+ while (!ialigned(to)) {
|
||||
*to++ = cval;
|
||||
n--;
|
||||
}
|
||||
@@ -52,17 +52,17 @@
|
||||
if (n >= 32) {
|
||||
register int rem = n & 31;
|
||||
|
||||
- lval |= (lval<<8);
|
||||
- lval |= (lval<<16);
|
||||
+ ival |= (ival<<8);
|
||||
+ ival |= (ival<<16);
|
||||
n >>= 5;
|
||||
{
|
||||
- register long *tol = (long *)to;
|
||||
+ register int *toi = (int *)to;
|
||||
|
||||
do {
|
||||
- DO8 (*tol++ = lval);
|
||||
+ DO8 (*toi++ = ival);
|
||||
} while (--n > 0);
|
||||
|
||||
- to = (char *)tol;
|
||||
+ to = (char *)toi;
|
||||
}
|
||||
n = rem;
|
||||
|
Loading…
Reference in New Issue
Block a user