![H.J. Lu](/assets/img/avatar_default.png)
Check __LP64__ isn't a reliable way to tell if we are compiling for x32 since __LP64__ isnn't specified by x86-64 psABI. Not all x86-64 compilers define __LP64__, which was added to GCC 3.3. The updated x32 psABI: https://sites.google.com/site/x32abi/documents definse _ILP32 and __ILP32__ for x32. GCC trunk and 4.7 branch have been updated to define _ILP32 and __ILP32__ for x32. This patch replaces __LP64__ check with __ILP32__. Signed-off-by: H.J. Lu <hjl.tools@gmail.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
16 lines
277 B
C
16 lines
277 B
C
#ifdef __KERNEL__
|
|
# ifdef CONFIG_X86_32
|
|
# include "posix_types_32.h"
|
|
# else
|
|
# include "posix_types_64.h"
|
|
# endif
|
|
#else
|
|
# ifdef __i386__
|
|
# include "posix_types_32.h"
|
|
# elif defined(__ILP32__)
|
|
# include "posix_types_x32.h"
|
|
# else
|
|
# include "posix_types_64.h"
|
|
# endif
|
|
#endif
|