Commit Graph

9 Commits

Author SHA1 Message Date
Simon Glass
c9502f4914 Define uintptr_t as long int to simplify printf() format strings
If uintptr_t can be either an unsigned int or an unsigned long int, it is
tricky to use it in a printf() format string. This changes it to
unsigned long int consistently. This should do the right thing on both
32-bit and 64-bit architectures.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Mike Frysinger <vapier@gentoo.org>
2011-11-22 08:39:24 +01:00
Simon Glass
a7551a3f79 sandbox: Add compiler defines to support a 64-bit x86_64 platform
This sets __WORDSIZE to 8 correctly on 64-bit machines.

Signed-off-by: Simon Glass <sjg@chromium.org>
2011-10-17 23:53:39 +02:00
Jeroen Hofstee
5bce5dc33d include/compiler.h: typedef ulong for FreeBSD
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
2011-07-28 21:17:11 +02:00
Andreas Bießmann
5933645904 include/compiler.h: remove uint typedef for __MACH__
uint is typedefed twice if __MACH__ is defined. This generates an error
when calling MAKEALL for netstar bord on OS X.

This patch removes the typedef for __MACH__ case in favor of general
definiton some lines below.

Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
2010-10-06 23:09:42 +02:00
Wolfgang Denk
9312bba01a include/compiler.h: remove redundant declaration of errno
Commit 37566090 "compiler.h: unify system ifdef cruft here" added both
a "#include <errno.h>" and a "extern int errno;" to include/compiler.h
which is causing build warnings for some systems, for example for the
"netstar" board:

	In file included from /home/wd/git/u-boot/work/lib/crc32.c:15:
	include/compiler.h:28: warning: function declaration isn't a prototype

The declaration of "errno" should be redundant, as <errno.h> is
supposed to provide a correct declaration, so drop it.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Mike Frysinger <vapier@gentoo.org>
2010-06-20 02:21:58 +02:00
Mike Frysinger
b050c72d52 compiler.h: add uint typedef
Recent crc changes started using the "uint" type in headers that are used
on the build system.  This subsequently broke mingw targets as they do not
provide such a type.  So add this basic typedef to compiler.h so that we
do not have to worry about this breaking again in the future.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-05-06 00:38:05 +02:00
Matthias Kaehlcke
b63815e313 move definition of macros likely and unlikely to compiler.h
the macros likely and unlikely were defined in include/linux/mtd/compat.h,
but used in code not related to MTD. moved the macro definitions to compiler.h

Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net>
2010-01-18 00:28:27 +01:00
Anton Vorontsov
d8bc55a6fb Move uninitialized_var() macro from ubi_uboot.h to compiler.h
This is needed so that we could use this macro for non-UBI code.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
2009-09-04 22:16:40 +02:00
Mike Frysinger
3756609076 compiler.h: unify system ifdef cruft here
Shove a lot of the HOSTCC and related #ifdef checking crap into the new
compiler.h header so that we can keep all other headers nice and clean.

Also introduce custom uswap functions so we don't have to rely on the non
standard implementations that a host may (or may not in the case of OS X)
provide.  This allows mkimage to finally build cleanly on an OS X system.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-07-19 21:41:46 +02:00