|
From: Rich C. <rc...@wi...> - 2012-08-30 01:37:56
|
Hi Florian, No, the last 20 lines cut out this line: util.c:6:20: error: endian.h: No such file or directory There is a <machine/endian.h> which seems to do what you want. Since this is in the test directory, there's no #define for darwin or VGO_darwin, so I used the pre-defined gcc symbol. Rich Index: util.c =================================================================== --- util.c (revision 12911) +++ util.c (working copy) @@ -3,7 +3,13 @@ #include <stdio.h> // fprintf #include <stdlib.h> // exit #include <assert.h> // assert +#if defined(__APPLE__) +#include <machine/endian.h> +#define __BYTE_ORDER BYTE_ORDER +#define __LITTLE_ENDIAN LITTLE_ENDIAN +#else #include <endian.h> +#endif #include "vtest.h" Index: vbits.c =================================================================== --- vbits.c (revision 12911) +++ vbits.c (working copy) @@ -2,7 +2,13 @@ #include <stdio.h> // fprintf #include <assert.h> // assert -#include <endian.h> // __BYTE_ORDER +#if defined(__APPLE__) +#include <machine/endian.h> +#define __BYTE_ORDER BYTE_ORDER +#define __LITTLE_ENDIAN LITTLE_ENDIAN +#else +#include <endian.h> +#endif #include "vbits.h" #include "vtest.h" On Wed, 29 Aug 2012 09:03:27 -0400 Florian Krohm <fl...@ei...> wrote: > On 08/29/2012 01:01 AM, Rich Coe wrote: > > > > valgrind revision: 12911 > > VEX revision: 2491 > > C compiler: i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3) > > Assembler: > > C library: unknown > > uname -mrs: Darwin 10.8.0 i386 > > Vendor version: unknown > > > > Nightly build on macx86 ( Darwin 10.8.0 i386 ) > > Started at 2012-08-28 23:35:01 CDT > > Ended at 2012-08-29 00:01:40 CDT > > Results differ from 24 hours ago > > > > Checking out valgrind source tree ... done > > Configuring valgrind ... done > > Building valgrind ... failed > > > > Last 20 lines of verbose log follow echo > > util.c:50: warning: format '%016lx' expects type 'long unsigned int', but argument 3 has type 'uint64_t' > > util.c:52: error: '__BYTE_ORDER' undeclared (first use in this function) > > util.c:52: error: (Each undeclared identifier is reported only once > > util.c:52: error: for each function it appears in.) > > util.c:52: error: '__LITTLE_ENDIAN' undeclared (first use in this function) > > Umpf... So <endian.h> exists, but __BYTE_ORDER is not defined? > I know I can do without including endian.h -- just curious. > > > util.c:53: warning: format '%016lx' expects type 'long unsigned int', but argument 3 has type 'long long unsigned int' > > I'll take care of these. > > Florian > > -- Rich Coe rc...@wi... |