KLONG
This commit is contained in:
@@ -9,6 +9,31 @@
|
||||
#define EXTERN_C_END
|
||||
#endif
|
||||
|
||||
// Some ports make the mistake of running a 32-bit userspace
|
||||
// on a 64-bit kernel. Shame on them. It's not at all OK to
|
||||
// make everything "long long", since that causes unneeded
|
||||
// slowness on 32-bit hardware.
|
||||
//
|
||||
// SPARC: 32-bit kernel is an ex-penguin, so use "long long".
|
||||
//
|
||||
// MIPS: Used for embedded systems and obsolete hardware.
|
||||
// Oh, there's a 64-bit version? SGI is headed toward IA-64,
|
||||
// so don't worry about 64-bit MIPS.
|
||||
//
|
||||
// PowerPC: Big ugly problem! Macs are popular. :-/
|
||||
//
|
||||
// Unknown: HP-PA-RISC, zSeries, and x86-64
|
||||
//
|
||||
#if defined(__sparc__) // || defined(__mips__) || defined(__powerpc__)
|
||||
#define KLONG long long // not typedef; want "unsigned KLONG" to work
|
||||
#define KLF "L"
|
||||
#define STRTOUKL strtoull
|
||||
#else
|
||||
#define KLONG long
|
||||
#define KLF "l"
|
||||
#define STRTOUKL strtoul
|
||||
#endif
|
||||
|
||||
#if !defined(restrict) && __STDC_VERSION__ < 199901
|
||||
#if __GNUC__ > 2 || __GNUC_MINOR__ >= 92 // maybe 92 or 95 ?
|
||||
#define restrict __restrict__
|
||||
|
Reference in New Issue
Block a user