source: patches/e2fsprogs-1.39-cross-1.patch@ a64a245

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since a64a245 was bbaf626, checked in by Ken Moffat <zarniwhoop@…>, 18 years ago

Allow e2fsprogs-1.39 to cross-compile for ppc64 from a host using 'long long' 64-bit types.

  • Property mode set to 100644
File size: 7.4 KB
  • lib/ext2fs/ext2_types.h.in

    Submitted By: Ken Moffat <ken at linuxfromscratch dot org>
    Date: 2006-07-29
    Initial Package Version: 1.39
    Origin: Self.
    Upstream status: not submitted, pending comments on bug 1529730 for e2fsprogs.
    Description:
     Revert changes to two .h.in files which prevent cross-compilation for powerpc64
    from x86 and x86_64.  I believe the problem will appear whenever the machine
    doing the build uses long long for __{s,u}64and the target uses long, and perhaps
    also the other way around.  The following arches that are in the book use long:
    alpha, mips64, ppc64, sparc64.  None except ppc64 have reported this, so perhaps
    there is something different there.
    
    old new  
    77        !defined(_EXT2_TYPES_H))
    88#define _EXT2_TYPES_H
    99
    10 @ASM_TYPES_HEADER@
    11 
    12 #ifdef __U8_TYPEDEF
    13 typedef __U8_TYPEDEF __u8;
    14 #else
    1510typedef unsigned char __u8;
    16 #endif
    17 
    18 #ifdef __S8_TYPEDEF
    19 typedef __S8_TYPEDEF __s8;
    20 #else
    2111typedef signed char __s8;
    22 #endif
    2312
    24 #ifdef __U16_TYPEDEF
    25 typedef __U16_TYPEDEF __u16;
     13#if (@SIZEOF_INT@ == 8)
     14typedef int             __s64;
     15typedef unsigned int    __u64;
    2616#else
    27 #if (@SIZEOF_INT@ == 2)
    28 typedef unsigned int    __u16;
     17#if (@SIZEOF_LONG@ == 8)
     18typedef long            __s64;
     19typedef unsigned long   __u64;
    2920#else
    30 #if (@SIZEOF_SHORT@ == 2)
    31 typedef unsigned short  __u16;
     21#if (@SIZEOF_LONG_LONG@ == 8)
     22#if defined(__GNUC__)
     23typedef __signed__ long long    __s64;
    3224#else
    33   ?==error: undefined 16 bit type
    34 #endif /* SIZEOF_SHORT == 2 */
    35 #endif /* SIZEOF_INT == 2 */
    36 #endif /* __U16_TYPEDEF */
     25typedef signed long long        __s64;
     26#endif /* __GNUC__ */
     27typedef unsigned long long      __u64;
     28#endif /* SIZEOF_LONG_LONG == 8 */
     29#endif /* SIZEOF_LONG == 8 */
     30#endif /* SIZEOF_INT == 8 */
    3731
    38 #ifdef __S16_TYPEDEF
    39 typedef __S16_TYPEDEF __s16;
    40 #else
    4132#if (@SIZEOF_INT@ == 2)
    4233typedef int             __s16;
     34typedef unsigned int    __u16;
    4335#else
    4436#if (@SIZEOF_SHORT@ == 2)
    4537typedef short           __s16;
     38typedef unsigned short  __u16;
    4639#else
    4740  ?==error: undefined 16 bit type
    4841#endif /* SIZEOF_SHORT == 2 */
    4942#endif /* SIZEOF_INT == 2 */
    50 #endif /* __S16_TYPEDEF */
    51 
    52 
    53 #ifdef __U32_TYPEDEF
    54 typedef __U32_TYPEDEF __u32;
    55 #else
    56 #if (@SIZEOF_INT@ == 4)
    57 typedef unsigned int    __u32;
    58 #else
    59 #if (@SIZEOF_LONG@ == 4)
    60 typedef unsigned long   __u32;
    61 #else
    62 #if (@SIZEOF_SHORT@ == 4)
    63 typedef unsigned short  __u32;
    64 #else
    65  ?== error: undefined 32 bit type
    66 #endif /* SIZEOF_SHORT == 4 */
    67 #endif /* SIZEOF_LONG == 4 */
    68 #endif /* SIZEOF_INT == 4 */
    69 #endif /* __U32_TYPEDEF */
    7043
    71 #ifdef __S32_TYPEDEF
    72 typedef __S32_TYPEDEF __s32;
    73 #else
    7444#if (@SIZEOF_INT@ == 4)
    7545typedef int             __s32;
     46typedef unsigned int    __u32;
    7647#else
    7748#if (@SIZEOF_LONG@ == 4)
    7849typedef long            __s32;
     50typedef unsigned long   __u32;
    7951#else
    8052#if (@SIZEOF_SHORT@ == 4)
    8153typedef short           __s32;
     54typedef unsigned short  __u32;
    8255#else
    8356 ?== error: undefined 32 bit type
    8457#endif /* SIZEOF_SHORT == 4 */
    8558#endif /* SIZEOF_LONG == 4 */
    8659#endif /* SIZEOF_INT == 4 */
    87 #endif /* __S32_TYPEDEF */
    88 
    89 #ifdef __U64_TYPEDEF
    90 typedef __U64_TYPEDEF __u64;
    91 #else
    92 #if (@SIZEOF_INT@ == 8)
    93 typedef unsigned int    __u64;
    94 #else
    95 #if (@SIZEOF_LONG@ == 8)
    96 typedef unsigned long   __u64;
    97 #else
    98 #if (@SIZEOF_LONG_LONG@ == 8)
    99 typedef unsigned long long      __u64;
    100 #endif /* SIZEOF_LONG_LONG == 8 */
    101 #endif /* SIZEOF_LONG == 8 */
    102 #endif /* SIZEOF_INT == 8 */
    103 #endif /* __U64_TYPEDEF */
    104 
    105 #ifdef __S64_TYPEDEF
    106 typedef __S64_TYPEDEF __s64;
    107 #else
    108 #if (@SIZEOF_INT@ == 8)
    109 typedef int             __s64;
    110 #else
    111 #if (@SIZEOF_LONG@ == 8)
    112 typedef long            __s64;
    113 #else
    114 #if (@SIZEOF_LONG_LONG@ == 8)
    115 #if defined(__GNUC__)
    116 typedef __signed__ long long    __s64;
    117 #else
    118 typedef signed long long        __s64;
    119 #endif /* __GNUC__ */
    120 #endif /* SIZEOF_LONG_LONG == 8 */
    121 #endif /* SIZEOF_LONG == 8 */
    122 #endif /* SIZEOF_INT == 8 */
    123 #endif /* __S64_TYPEDEF */
    124 
    125 #undef __S8_TYPEDEF
    126 #undef __U8_TYPEDEF
    127 #undef __S16_TYPEDEF
    128 #undef __U16_TYPEDEF
    129 #undef __S32_TYPEDEF
    130 #undef __U32_TYPEDEF
    131 #undef __S64_TYPEDEF
    132 #undef __U64_TYPEDEF
    13360
    13461#endif /* _*_TYPES_H */
  • lib/blkid/blkid_types.h.in

    old new  
    77        !defined(_EXT2_TYPES_H))
    88#define _BLKID_TYPES_H
    99
    10 @ASM_TYPES_HEADER@
    11 
    12 #ifdef __U8_TYPEDEF
    13 typedef __U8_TYPEDEF __u8;
    14 #else
    1510typedef unsigned char __u8;
    16 #endif
    17 
    18 #ifdef __S8_TYPEDEF
    19 typedef __S8_TYPEDEF __s8;
    20 #else
    2111typedef signed char __s8;
    22 #endif
    2312
    24 #ifdef __U16_TYPEDEF
    25 typedef __U16_TYPEDEF __u16;
     13#if (@SIZEOF_INT@ == 8)
     14typedef int             __s64;
     15typedef unsigned int    __u64;
    2616#else
    27 #if (@SIZEOF_INT@ == 2)
    28 typedef unsigned int    __u16;
     17#if (@SIZEOF_LONG@ == 8)
     18typedef long            __s64;
     19typedef unsigned long   __u64;
    2920#else
    30 #if (@SIZEOF_SHORT@ == 2)
    31 typedef unsigned short  __u16;
     21#if (@SIZEOF_LONG_LONG@ == 8)
     22#if defined(__GNUC__)
     23typedef __signed__ long long    __s64;
    3224#else
    33   ?==error: undefined 16 bit type
    34 #endif /* SIZEOF_SHORT == 2 */
    35 #endif /* SIZEOF_INT == 2 */
    36 #endif /* __U16_TYPEDEF */
     25typedef signed long long        __s64;
     26#endif /* __GNUC__ */
     27typedef unsigned long long      __u64;
     28#endif /* SIZEOF_LONG_LONG == 8 */
     29#endif /* SIZEOF_LONG == 8 */
     30#endif /* SIZEOF_INT == 8 */
    3731
    38 #ifdef __S16_TYPEDEF
    39 typedef __S16_TYPEDEF __s16;
    40 #else
    4132#if (@SIZEOF_INT@ == 2)
    4233typedef int             __s16;
     34typedef unsigned int    __u16;
    4335#else
    4436#if (@SIZEOF_SHORT@ == 2)
    4537typedef short           __s16;
     38typedef unsigned short  __u16;
    4639#else
    4740  ?==error: undefined 16 bit type
    4841#endif /* SIZEOF_SHORT == 2 */
    4942#endif /* SIZEOF_INT == 2 */
    50 #endif /* __S16_TYPEDEF */
    51 
    52 
    53 #ifdef __U32_TYPEDEF
    54 typedef __U32_TYPEDEF __u32;
    55 #else
    56 #if (@SIZEOF_INT@ == 4)
    57 typedef unsigned int    __u32;
    58 #else
    59 #if (@SIZEOF_LONG@ == 4)
    60 typedef unsigned long   __u32;
    61 #else
    62 #if (@SIZEOF_SHORT@ == 4)
    63 typedef unsigned short  __u32;
    64 #else
    65  ?== error: undefined 32 bit type
    66 #endif /* SIZEOF_SHORT == 4 */
    67 #endif /* SIZEOF_LONG == 4 */
    68 #endif /* SIZEOF_INT == 4 */
    69 #endif /* __U32_TYPEDEF */
    7043
    71 #ifdef __S32_TYPEDEF
    72 typedef __S32_TYPEDEF __s32;
    73 #else
    7444#if (@SIZEOF_INT@ == 4)
    7545typedef int             __s32;
     46typedef unsigned int    __u32;
    7647#else
    7748#if (@SIZEOF_LONG@ == 4)
    7849typedef long            __s32;
     50typedef unsigned long   __u32;
    7951#else
    8052#if (@SIZEOF_SHORT@ == 4)
    8153typedef short           __s32;
     54typedef unsigned short  __u32;
    8255#else
    8356 ?== error: undefined 32 bit type
    8457#endif /* SIZEOF_SHORT == 4 */
    8558#endif /* SIZEOF_LONG == 4 */
    8659#endif /* SIZEOF_INT == 4 */
    87 #endif /* __S32_TYPEDEF */
    88 
    89 #ifdef __U64_TYPEDEF
    90 typedef __U64_TYPEDEF __u64;
    91 #else
    92 #if (@SIZEOF_INT@ == 8)
    93 typedef unsigned int    __u64;
    94 #else
    95 #if (@SIZEOF_LONG@ == 8)
    96 typedef unsigned long   __u64;
    97 #else
    98 #if (@SIZEOF_LONG_LONG@ == 8)
    99 typedef unsigned long long      __u64;
    100 #endif /* SIZEOF_LONG_LONG == 8 */
    101 #endif /* SIZEOF_LONG == 8 */
    102 #endif /* SIZEOF_INT == 8 */
    103 #endif /* __U64_TYPEDEF */
    104 
    105 #ifdef __S64_TYPEDEF
    106 typedef __S64_TYPEDEF __s64;
    107 #else
    108 #if (@SIZEOF_INT@ == 8)
    109 typedef int             __s64;
    110 #else
    111 #if (@SIZEOF_LONG@ == 8)
    112 typedef long            __s64;
    113 #else
    114 #if (@SIZEOF_LONG_LONG@ == 8)
    115 #if defined(__GNUC__)
    116 typedef __signed__ long long    __s64;
    117 #else
    118 typedef signed long long        __s64;
    119 #endif /* __GNUC__ */
    120 #endif /* SIZEOF_LONG_LONG == 8 */
    121 #endif /* SIZEOF_LONG == 8 */
    122 #endif /* SIZEOF_INT == 8 */
    123 #endif /* __S64_TYPEDEF */
    124 
    125 #undef __S8_TYPEDEF
    126 #undef __U8_TYPEDEF
    127 #undef __S16_TYPEDEF
    128 #undef __U16_TYPEDEF
    129 #undef __S32_TYPEDEF
    130 #undef __U32_TYPEDEF
    131 #undef __S64_TYPEDEF
    132 #undef __U64_TYPEDEF
    13360
    13461#endif /* _*_TYPES_H */
Note: See TracBrowser for help on using the repository browser.