Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from moddingg33k/kitkat
fixes and suggestions
- Loading branch information
Showing
15 changed files
with
239 additions
and
197 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,48 @@ | ||
#ifndef __ASM_ARM_TYPES_H | ||
#define __ASM_ARM_TYPES_H | ||
#ifndef _ASM_TYPES_H | ||
#define _ASM_TYPES_H | ||
|
||
#include <asm-generic/int-ll64.h> | ||
|
||
/* | ||
* These aren't exported outside the kernel to avoid name space clashes | ||
* The C99 types uintXX_t that are usually defined in 'stdint.h' are not as | ||
* unambiguous on ARM as you would expect. For the types below, there is a | ||
* difference on ARM between GCC built for bare metal ARM, GCC built for glibc | ||
* and the kernel itself, which results in build errors if you try to build with | ||
* -ffreestanding and include 'stdint.h' (such as when you include 'arm_neon.h' | ||
* in order to use NEON intrinsics) | ||
* | ||
* As the typedefs for these types in 'stdint.h' are based on builtin defines | ||
* supplied by GCC, we can tweak these to align with the kernel's idea of those | ||
* types, so 'linux/types.h' and 'stdint.h' can be safely included from the same | ||
* source file (provided that -ffreestanding is used). | ||
* | ||
* int32_t uint32_t uintptr_t | ||
* bare metal GCC long unsigned long unsigned int | ||
* glibc GCC int unsigned int unsigned int | ||
* kernel int unsigned int unsigned long | ||
*/ | ||
#ifdef __KERNEL__ | ||
|
||
#define BITS_PER_LONG 32 | ||
#ifdef __INT32_TYPE__ | ||
#undef __INT32_TYPE__ | ||
#define __INT32_TYPE__ int | ||
#endif | ||
|
||
#endif /* __KERNEL__ */ | ||
#ifdef __UINT32_TYPE__ | ||
#undef __UINT32_TYPE__ | ||
#define __UINT32_TYPE__ unsigned int | ||
#endif | ||
|
||
#ifdef __UINTPTR_TYPE__ | ||
#undef __UINTPTR_TYPE__ | ||
#define __UINTPTR_TYPE__ unsigned long | ||
#endif | ||
|
||
/* | ||
* These aren't exported outside the kernel to avoid name space clashes | ||
*/ | ||
#ifdef __KERNEL__ | ||
|
||
#define BITS_PER_LONG 32 | ||
|
||
#endif /* __KERNEL__ */ | ||
#endif /* _ASM_TYPES_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.