[XviD-devel] (u)intptr_t
Rhialto
rhialto at falu.nl
Mon Feb 13 20:49:13 CET 2006
(I didn't see this in the archive yet so I'm sending it again)
Hi there,
I have just compiled xvidcore 1.1.0 on a system that properly defines
intptr_t and uintptr_t. Because of that, I get a whole bunch of
warnings, such as
C: utils/mem_transfer.c
In file included from ../../src/global.h:30,
from ../../src/utils/mem_transfer.c:26:
../../src/portab.h:86:1: warning: "intptr_t" redefined
In file included from /usr/include/sys/inttypes.h:46,
from /usr/include/inttypes.h:43,
from ../../src/portab.h:66,
from ../../src/global.h:30,
from ../../src/utils/mem_transfer.c:26:
/usr/include/sys/stdint.h:87:1: warning: this is the location of the previous definition
In file included from ../../src/global.h:30,
from ../../src/utils/mem_transfer.c:26:
../../src/portab.h:90:1: warning: "uintptr_t" redefined
In file included from /usr/include/sys/inttypes.h:46,
from /usr/include/inttypes.h:43,
from ../../src/portab.h:66,
from ../../src/global.h:30,
from ../../src/utils/mem_transfer.c:26:
/usr/include/sys/stdint.h:92:1: warning: this is the location of the previous definition
Can you please test for this in configure? I made a patch to avoid the
problem, but that assumes that the types are defined by the system
headers, so on older systems it would not work.
--- portab.h.orig 2005-12-30 15:34:56.000000000 +0100
+++ portab.h 2006-02-12 15:42:38.000000000 +0100
@@ -73,21 +73,17 @@
#if defined(ARCH_IS_32BIT)
# define CACHE_LINE 64
-# define ptr_t uint32_t
-# define intptr_t int32_t
+# define ptr_t uintptr_t
# if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(__INTEL_COMPILER)
# include <stdarg.h>
# else
-# define uintptr_t uint32_t
# endif
#elif defined(ARCH_IS_64BIT)
# define CACHE_LINE 64
-# define ptr_t uint64_t
-# define intptr_t int64_t
+# define ptr_t uintptr_t
# if defined (_MSC_VER) && _MSC_VER >= 1300 && !defined(__INTEL_COMPILER)
# include <stdarg.h>
# else
-# define uintptr_t uint64_t
# endif
#else
# error You are trying to compile XviD without defining address bus size.
-Olaf.
--
___ Olaf 'Rhialto' Seibert -- You author it, and I'll reader it.
\X/ rhialto/at/xs4all.nl -- Cetero censeo "authored" delendum esse.
More information about the XviD-devel
mailing list