From 068b29ae82c4009280694057b816f020cbbfff0f Mon Sep 17 00:00:00 2001 From: Julian Seward Date: Tue, 17 Oct 2006 12:49:31 +0000 Subject: [PATCH] AIX build fixes. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6308 --- coregrind/m_libcfile.c | 13 +++++++++---- perf/ffbench.c | 10 ---------- 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/coregrind/m_libcfile.c b/coregrind/m_libcfile.c index fb08569916..0965961f42 100644 --- a/coregrind/m_libcfile.c +++ b/coregrind/m_libcfile.c @@ -31,6 +31,7 @@ #include "pub_core_basics.h" #include "pub_core_vki.h" #include "pub_core_vkiscnums.h" +#include "pub_core_debuglog.h" #include "pub_core_libcbase.h" #include "pub_core_libcassert.h" #include "pub_core_libcfile.h" @@ -291,13 +292,17 @@ Int VG_(access) ( HChar* path, Bool irusr, Bool iwusr, Bool ixusr ) /* returns: 0 = success, non-0 is failure */ Int VG_(check_executable)(HChar* f) { -#ifdef __NR_stat64 + /* This is something of a kludge. Really we should fix VG_(stat) to + do this itself, but not clear how to do it as it depends on + having a 'struct vki_stat64' which is different from 'struct + vki_stat'. */ +# if defined(VGO_linux) && defined(__NR_stat64) struct vki_stat64 st; SysRes res = VG_(do_syscall2)(__NR_stat64, (UWord)f, (UWord)&st); -#else +# else struct vki_stat st; - SysRes res = VG_(do_syscall2)(__NR_stat, (UWord)f, (UWord)&st); -#endif + SysRes res = VG_(stat)(f, &st); +# endif if (res.isError) { return res.err; diff --git a/perf/ffbench.c b/perf/ffbench.c index b1ea74b366..7a02ce43ac 100644 --- a/perf/ffbench.c +++ b/perf/ffbench.c @@ -155,16 +155,6 @@ #define max(a,b) ((a)>(b)?(a):(b)) #define min(a,b) ((a)<=(b)?(a):(b)) -#ifndef unix -#ifndef WIN32 -extern char *farmalloc(long s); -#define malloc(x) farmalloc(x) -#endif -#define FWMODE "wb" -#else -#define FWMODE "w" -#endif - /* Multi-dimensional fast Fourier transform -- 2.47.2