Skip to content

Commit

Permalink
remove strict ansi check from __u64 in asm/types.h
Browse files Browse the repository at this point in the history
Remove the __STRICT_ANSI__ check from the __u64/__s64 declaration on
32bit targets.

GCC can be made to warn about usage of long long types with ISO C90
(-ansi), but only with -pedantic.  You can write this in a way that even
then it doesn't cause warnings, namely by:

#ifdef __GNUC__
__extension__ typedef __signed__ long long __s64;
__extension__ typedef unsigned long long __u64;
#endif

The __extension__ keyword in front of this switches off any pedantic
warnings for this expression.

Signed-off-by: Olaf Hering <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
olafhering authored and Linus Torvalds committed Oct 17, 2007
1 parent ac8d35c commit 68a9bd0
Show file tree
Hide file tree
Showing 17 changed files with 51 additions and 51 deletions.
6 changes: 3 additions & 3 deletions include/asm-arm/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ typedef unsigned short __u16;
typedef __signed__ int __s32;
typedef unsigned int __u32;

#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
typedef __signed__ long long __s64;
typedef unsigned long long __u64;
#if defined(__GNUC__)
__extension__ typedef __signed__ long long __s64;
__extension__ typedef unsigned long long __u64;
#endif

#endif /* __ASSEMBLY__ */
Expand Down
6 changes: 3 additions & 3 deletions include/asm-avr32/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ typedef unsigned short __u16;
typedef __signed__ int __s32;
typedef unsigned int __u32;

#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
typedef __signed__ long long __s64;
typedef unsigned long long __u64;
#if defined(__GNUC__)
__extension__ typedef __signed__ long long __s64;
__extension__ typedef unsigned long long __u64;
#endif

#endif /* __ASSEMBLY__ */
Expand Down
6 changes: 3 additions & 3 deletions include/asm-blackfin/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ typedef __signed__ int __s32;
typedef unsigned int __u32;

/* HK0617 -- Changes to unsigned long temporarily */
#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
typedef __signed__ long long __s64;
typedef unsigned long long __u64;
#if defined(__GNUC__)
__extension__ typedef __signed__ long long __s64;
__extension__ typedef unsigned long long __u64;
#endif

#endif /* __ASSEMBLY__ */
Expand Down
6 changes: 3 additions & 3 deletions include/asm-cris/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ typedef unsigned short __u16;
typedef __signed__ int __s32;
typedef unsigned int __u32;

#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
typedef __signed__ long long __s64;
typedef unsigned long long __u64;
#if defined(__GNUC__)
__extension__ typedef __signed__ long long __s64;
__extension__ typedef unsigned long long __u64;
#endif

#endif /* __ASSEMBLY__ */
Expand Down
6 changes: 3 additions & 3 deletions include/asm-frv/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ typedef unsigned short __u16;
typedef __signed__ int __s32;
typedef unsigned int __u32;

#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
typedef __signed__ long long __s64;
typedef unsigned long long __u64;
#if defined(__GNUC__)
__extension__ typedef __signed__ long long __s64;
__extension__ typedef unsigned long long __u64;
#endif

#endif /* __ASSEMBLY__ */
Expand Down
6 changes: 3 additions & 3 deletions include/asm-h8300/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ typedef unsigned short __u16;
typedef __signed__ int __s32;
typedef unsigned int __u32;

#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
typedef __signed__ long long __s64;
typedef unsigned long long __u64;
#if defined(__GNUC__)
__extension__ typedef __signed__ long long __s64;
__extension__ typedef unsigned long long __u64;
#endif

/*
Expand Down
6 changes: 3 additions & 3 deletions include/asm-m32r/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ typedef unsigned short __u16;
typedef __signed__ int __s32;
typedef unsigned int __u32;

#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
typedef __signed__ long long __s64;
typedef unsigned long long __u64;
#if defined(__GNUC__)
__extension__ typedef __signed__ long long __s64;
__extension__ typedef unsigned long long __u64;
#endif
#endif /* __ASSEMBLY__ */

Expand Down
6 changes: 3 additions & 3 deletions include/asm-m68k/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ typedef unsigned short __u16;
typedef __signed__ int __s32;
typedef unsigned int __u32;

#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
typedef __signed__ long long __s64;
typedef unsigned long long __u64;
#if defined(__GNUC__)
__extension__ typedef __signed__ long long __s64;
__extension__ typedef unsigned long long __u64;
#endif

#endif /* __ASSEMBLY__ */
Expand Down
6 changes: 3 additions & 3 deletions include/asm-mips/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ typedef unsigned long __u64;

#else

#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
typedef __signed__ long long __s64;
typedef unsigned long long __u64;
#if defined(__GNUC__)
__extension__ typedef __signed__ long long __s64;
__extension__ typedef unsigned long long __u64;
#endif

#endif
Expand Down
6 changes: 3 additions & 3 deletions include/asm-parisc/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ typedef unsigned short __u16;
typedef __signed__ int __s32;
typedef unsigned int __u32;

#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
typedef __signed__ long long __s64;
typedef unsigned long long __u64;
#if defined(__GNUC__)
__extension__ typedef __signed__ long long __s64;
__extension__ typedef unsigned long long __u64;
#endif

#endif /* __ASSEMBLY__ */
Expand Down
6 changes: 3 additions & 3 deletions include/asm-powerpc/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ typedef unsigned int __u32;
typedef __signed__ long __s64;
typedef unsigned long __u64;
#else
#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
typedef __signed__ long long __s64;
typedef unsigned long long __u64;
#if defined(__GNUC__)
__extension__ typedef __signed__ long long __s64;
__extension__ typedef unsigned long long __u64;
#endif
#endif /* __powerpc64__ */

Expand Down
6 changes: 3 additions & 3 deletions include/asm-s390/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ typedef __signed__ int __s32;
typedef unsigned int __u32;

#ifndef __s390x__
#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
typedef __signed__ long long __s64;
typedef unsigned long long __u64;
#if defined(__GNUC__)
__extension__ typedef __signed__ long long __s64;
__extension__ typedef unsigned long long __u64;
#endif
#else /* __s390x__ */
typedef __signed__ long __s64;
Expand Down
6 changes: 3 additions & 3 deletions include/asm-sh/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ typedef unsigned short __u16;
typedef __signed__ int __s32;
typedef unsigned int __u32;

#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
typedef __signed__ long long __s64;
typedef unsigned long long __u64;
#if defined(__GNUC__)
__extension__ typedef __signed__ long long __s64;
__extension__ typedef unsigned long long __u64;
#endif

#endif /* __ASSEMBLY__ */
Expand Down
6 changes: 3 additions & 3 deletions include/asm-sh64/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ typedef unsigned short __u16;
typedef __signed__ int __s32;
typedef unsigned int __u32;

#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
typedef __signed__ long long __s64;
typedef unsigned long long __u64;
#if defined(__GNUC__)
__extension__ typedef __signed__ long long __s64;
__extension__ typedef unsigned long long __u64;
#endif

#endif /* __ASSEMBLY__ */
Expand Down
6 changes: 3 additions & 3 deletions include/asm-v850/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ typedef unsigned short __u16;
typedef __signed__ int __s32;
typedef unsigned int __u32;

#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
typedef __signed__ long long __s64;
typedef unsigned long long __u64;
#if defined(__GNUC__)
__extension__ typedef __signed__ long long __s64;
__extension__ typedef unsigned long long __u64;
#endif

#endif /* !__ASSEMBLY__ */
Expand Down
6 changes: 3 additions & 3 deletions include/asm-x86/types_32.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ typedef unsigned short __u16;
typedef __signed__ int __s32;
typedef unsigned int __u32;

#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
typedef __signed__ long long __s64;
typedef unsigned long long __u64;
#if defined(__GNUC__)
__extension__ typedef __signed__ long long __s64;
__extension__ typedef unsigned long long __u64;
#endif

#endif /* __ASSEMBLY__ */
Expand Down
6 changes: 3 additions & 3 deletions include/asm-xtensa/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ typedef unsigned short __u16;
typedef __signed__ int __s32;
typedef unsigned int __u32;

#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
typedef __signed__ long long __s64;
typedef unsigned long long __u64;
#if defined(__GNUC__)
__extension__ typedef __signed__ long long __s64;
__extension__ typedef unsigned long long __u64;
#endif

/*
Expand Down

0 comments on commit 68a9bd0

Please sign in to comment.