]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
AIX build fixes.
authorJulian Seward <jseward@acm.org>
Tue, 17 Oct 2006 12:49:31 +0000 (12:49 +0000)
committerJulian Seward <jseward@acm.org>
Tue, 17 Oct 2006 12:49:31 +0000 (12:49 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6308

coregrind/m_libcfile.c
perf/ffbench.c

index fb08569916680fe68b7181a43da6472c493d53be..0965961f429c3649dc9e0a6572c8c559a057d24a 100644 (file)
@@ -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;
index b1ea74b36658b301f4f4b54d386d2e0a5ad0b587..7a02ce43acd4e9f1a47ba1e71754732424ffabf5 100644 (file)
 #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