From: Colin Watson Date: Wed, 13 Nov 2013 14:47:23 +0000 (+0000) Subject: * grub-core/kern/misc.c: Don't redirect divisions in the X-Git-Tag: grub-2.02-beta1~342 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=81a2e438dc00a33acd3687822670d9e725a3c526;p=thirdparty%2Fgrub.git * grub-core/kern/misc.c: Don't redirect divisions in the GRUB_UTIL case. * include/grub/misc.h: Likewise. --- diff --git a/ChangeLog b/ChangeLog index d68b33a74..91bbeb44d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2013-11-13 Colin Watson + + * grub-core/kern/misc.c: Don't redirect divisions in the + GRUB_UTIL case. + * include/grub/misc.h: Likewise. + 2013-11-13 Colin Watson * grub-core/osdep/unix/emuconsole.c (put): Pacify the compiler on diff --git a/grub-core/kern/misc.c b/grub-core/kern/misc.c index 8b771a5d8..194e7703a 100644 --- a/grub-core/kern/misc.c +++ b/grub-core/kern/misc.c @@ -596,6 +596,8 @@ grub_divmod64 (grub_uint64_t n, grub_uint64_t d, grub_uint64_t *r) return q; } +#ifndef GRUB_UTIL + #if defined (__arm__) grub_uint32_t @@ -639,6 +641,8 @@ __umoddi3 (grub_uint64_t a, grub_uint64_t b) #endif +#endif /* GRUB_UTIL */ + /* Convert a long long value to a string. This function avoids 64-bit modular arithmetic or divisions. */ static char * diff --git a/include/grub/misc.h b/include/grub/misc.h index 8b0f33972..a46e08684 100644 --- a/include/grub/misc.h +++ b/include/grub/misc.h @@ -453,6 +453,8 @@ grub_error_load (const struct grub_error_saved *save) grub_errno = save->grub_errno; } +#ifndef GRUB_UTIL + #if defined (__arm__) grub_uint32_t @@ -487,6 +489,8 @@ EXPORT_FUNC (__umoddi3) (grub_uint64_t a, grub_uint64_t b); #endif +#endif /* GRUB_UTIL */ + #if BOOT_TIME_STATS struct grub_boot_time