[Beignet] [PATCH] rename ulong to ulong64 to avoid the conflicts in <sys/types.h>
Zhigang Gong
zhigang.gong at linux.intel.com
Tue Aug 20 20:19:28 PDT 2013
I wasn't aware of this conflict on 32bit system. Thanks for the fix, pushed.
On Tue, Aug 20, 2013 at 02:45:15PM +0800, Lu Guanqun wrote:
> [ 31%] Building CXX object utests/CMakeFiles/utests.dir/compiler_abs_diff.cpp.o
> /home/q/beignet.git/utests/compiler_abs_diff.cpp:201:18: error: conflicting declaration ‘typedef uint64_t ulong’
> /usr/include/i386-linux-gnu/sys/types.h:151:27: error: ‘ulong’ has a previous declaration as ‘typedef long unsigned int ulong’
>
> Signed-off-by: Lu Guanqun <guanqun.lu at intel.com>
> CC: Zhigang Gong <zhigang.gong at linux.intel.com>
> ---
> utests/compiler_abs_diff.cpp | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/utests/compiler_abs_diff.cpp b/utests/compiler_abs_diff.cpp
> index f89d001..71881b1 100644
> --- a/utests/compiler_abs_diff.cpp
> +++ b/utests/compiler_abs_diff.cpp
> @@ -196,13 +196,13 @@ template <typename T, typename U> static void compiler_abs_diff_with_type(void)
> typedef unsigned char uchar;
> typedef unsigned short ushort;
> typedef unsigned int uint;
> -typedef uint64_t ulong;
> +typedef uint64_t ulong64;
> ABS_TEST_DIFF_TYPE(int, uint)
> -ABS_TEST_DIFF_TYPE_2(int64_t, long, ulong)
> +ABS_TEST_DIFF_TYPE_2(int64_t, long, ulong64)
> ABS_TEST_DIFF_TYPE(short, ushort)
> ABS_TEST_DIFF_TYPE(char, uchar)
> ABS_TEST_DIFF_TYPE(uint, uint)
> -ABS_TEST_DIFF_TYPE(ulong, ulong)
> +ABS_TEST_DIFF_TYPE_2(ulong64, ulong, ulong64)
> ABS_TEST_DIFF_TYPE(ushort, ushort)
> ABS_TEST_DIFF_TYPE(uchar, uchar)
>
> --
> 1.7.9.5
>
> _______________________________________________
> Beignet mailing list
> Beignet at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/beignet
More information about the Beignet
mailing list