mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
Powerpc Fixes (part 1):
- Enable builds for powerpc ISA type. - Add DIV_ROUND_UP and roundup macros if unavailable. - Cast 64-bit values for %lld format string to (long long) to quiet compile warning.
This commit is contained in:
+16
-1
@@ -39,7 +39,22 @@ extern "C" {
|
||||
#define _ILP32
|
||||
#endif
|
||||
|
||||
#else /* Currently only x86_64 and i386 arches supported */
|
||||
/* powerpc (ppc64) arch specific defines */
|
||||
#elif defined(__powerpc) || defined(__powerpc__)
|
||||
|
||||
#if !defined(__powerpc)
|
||||
#define __powerpc
|
||||
#endif
|
||||
|
||||
#if !defined(__powerpc__)
|
||||
#define __powerpc__
|
||||
#endif
|
||||
|
||||
#if !defined(_LP64)
|
||||
#define _LP64
|
||||
#endif
|
||||
|
||||
#else /* Currently only x86_64, i386, and powerpc arches supported */
|
||||
#error "Unsupported ISA type"
|
||||
#endif
|
||||
|
||||
|
||||
@@ -149,13 +149,19 @@ extern uint32_t zone_get_hostid(void *zone);
|
||||
|
||||
/* common macros */
|
||||
#ifndef MIN
|
||||
#define MIN(a, b) ((a) < (b) ? (a) : (b))
|
||||
#define MIN(a, b) ((a) < (b) ? (a) : (b))
|
||||
#endif
|
||||
#ifndef MAX
|
||||
#define MAX(a, b) ((a) < (b) ? (b) : (a))
|
||||
#define MAX(a, b) ((a) < (b) ? (b) : (a))
|
||||
#endif
|
||||
#ifndef ABS
|
||||
#define ABS(a) ((a) < 0 ? -(a) : (a))
|
||||
#define ABS(a) ((a) < 0 ? -(a) : (a))
|
||||
#endif
|
||||
#ifndef DIV_ROUND_UP
|
||||
#define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d))
|
||||
#endif
|
||||
#ifndef roundup
|
||||
#define roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y))
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user