|
|
|
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
|
|
|
|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
|
|
|
|
#
|
|
|
|
# Filename: package/.../dietlibc/patches/pkg_nasm.patch
|
|
|
|
# Copyright (C) 2004 - 2006 The T2 SDE Project
|
|
|
|
# Copyright (C) 1998 - 2004 Clifford Wolf
|
|
|
|
#
|
|
|
|
# More information can be found in the files COPYING and README.
|
|
|
|
#
|
|
|
|
# This patch file is dual-licensed. It is available under the license the
|
|
|
|
# patched project is licensed under, as long as it is an OpenSource license
|
|
|
|
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
|
|
|
|
# of the GNU General Public License as published by the Free Software
|
|
|
|
# Foundation; either version 2 of the License, or (at your option) any later
|
|
|
|
# version.
|
|
|
|
# --- SDE-COPYRIGHT-NOTE-END ---
|
|
|
|
|
|
|
|
--- ./nasmlib.c.orig 2005-01-15 23:15:51.000000000 +0100
|
|
|
|
+++ ./nasmlib.c 2006-06-18 22:11:25.000000000 +0200
|
|
|
|
@@ -372,10 +372,8 @@
|
|
|
|
if (posn >= r->stepsize * LAYERSIZ(r))
|
|
|
|
return 0; /* Return 0 for undefined entries */
|
|
|
|
while (r->layers > 0) {
|
|
|
|
- ldiv_t l;
|
|
|
|
- l = ldiv(posn, r->stepsize);
|
|
|
|
- r = r->u.b.data[l.quot];
|
|
|
|
- posn = l.rem;
|
|
|
|
+ r = r->u.b.data[ posn / r->stepsize ];
|
|
|
|
+ posn = posn % r->stepsize;
|
|
|
|
if (!r)
|
|
|
|
return 0; /* Return 0 for undefined entries */
|
|
|
|
}
|
|
|
|
@@ -408,14 +406,12 @@
|
|
|
|
result = r;
|
|
|
|
|
|
|
|
while (r->layers > 0) {
|
|
|
|
- ldiv_t l;
|
|
|
|
struct RAA **s;
|
|
|
|
- l = ldiv(posn, r->stepsize);
|
|
|
|
- s = &r->u.b.data[l.quot];
|
|
|
|
+ s = &r->u.b.data[ posn / r->stepsize ];
|
|
|
|
if (!*s)
|
|
|
|
*s = real_raa_init(r->layers - 1);
|
|
|
|
r = *s;
|
|
|
|
- posn = l.rem;
|
|
|
|
+ posn = posn % r->stepsize;
|
|
|
|
}
|
|
|
|
|
|
|
|
r->u.l.data[posn] = value;
|