From: Nicholas Nethercote Date: Sun, 22 Feb 2009 22:23:09 +0000 (+0000) Subject: Make fcntl and fcntl64 wrappers more consistent. X-Git-Tag: svn/VALGRIND_3_5_0~948 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=68b5487a3a1c1387e6c6ce2ff8f1952d507d8dd4;p=thirdparty%2Fvalgrind.git Make fcntl and fcntl64 wrappers more consistent. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9217 --- diff --git a/coregrind/m_syswrap/syswrap-generic.c b/coregrind/m_syswrap/syswrap-generic.c index 05419b9d0a..e885b975ed 100644 --- a/coregrind/m_syswrap/syswrap-generic.c +++ b/coregrind/m_syswrap/syswrap-generic.c @@ -2781,7 +2781,6 @@ PRE(sys_fcntl) case VKI_F_GETLK64: case VKI_F_SETLK64: case VKI_F_SETLKW64: -# else # endif PRINT("sys_fcntl[ARG3=='lock'] ( %ld, %ld, %#lx )", ARG1,ARG2,ARG3); PRE_REG_READ3(long, "fcntl", @@ -2790,7 +2789,11 @@ PRE(sys_fcntl) break; } +# if defined(VGP_x86_linux) + if (ARG2 == VKI_F_SETLKW || ARG2 == VKI_F_SETLKW64) +# else if (ARG2 == VKI_F_SETLKW) +# endif *flags |= SfMayBlock; } @@ -2853,11 +2856,10 @@ PRE(sys_fcntl64) # if defined(VGP_x86_linux) if (ARG2 == VKI_F_SETLKW || ARG2 == VKI_F_SETLKW64) - *flags |= SfMayBlock; # else if (ARG2 == VKI_F_SETLKW) - *flags |= SfMayBlock; # endif + *flags |= SfMayBlock; } POST(sys_fcntl64)