svr4 should support the svr3 style fcntl-cmd name F_GETLK_SVR3
authorniklas <niklas@openbsd.org>
Wed, 8 Jan 1997 13:04:53 +0000 (13:04 +0000)
committerniklas <niklas@openbsd.org>
Wed, 8 Jan 1997 13:04:53 +0000 (13:04 +0000)
sys/compat/ibcs2/files.ibcs2
sys/compat/svr4/svr4_fcntl.c

index d4f7c73..5e505e5 100644 (file)
@@ -1,4 +1,4 @@
-#      $OpenBSD: files.ibcs2,v 1.2 1996/08/02 20:35:02 niklas Exp $
+#      $OpenBSD: files.ibcs2,v 1.3 1997/01/08 13:04:53 niklas Exp $
 #      $NetBSD: files.ibcs2,v 1.3 1995/08/14 01:34:09 mycroft Exp $
 #
 # Config.new file description for machine-independent IBCS-2 compat code.
@@ -9,7 +9,7 @@
 
 file   compat/ibcs2/ibcs2_errno.c      compat_ibcs2
 file   compat/ibcs2/ibcs2_exec.c       compat_ibcs2
-file   compat/ibcs2/ibcs2_fcntl.c      compat_ibcs2
+file   compat/ibcs2/ibcs2_fcntl.c      compat_ibcs2 | compat_svr4
 file   compat/ibcs2/ibcs2_ioctl.c      compat_ibcs2
 file   compat/ibcs2/ibcs2_ipc.c        compat_ibcs2
 file   compat/ibcs2/ibcs2_misc.c       compat_ibcs2
index 7c97627..45436c4 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: svr4_fcntl.c,v 1.3 1996/08/02 20:20:32 niklas Exp $    */
+/*     $OpenBSD: svr4_fcntl.c,v 1.4 1997/01/08 13:04:57 niklas Exp $    */
 /*     $NetBSD: svr4_fcntl.c,v 1.14 1995/10/14 20:24:24 christos Exp $  */
 
 /*
 #include <compat/svr4/svr4_util.h>
 #include <compat/svr4/svr4_fcntl.h>
 
+#include <compat/ibcs2/ibcs2_types.h>
+#include <compat/ibcs2/ibcs2_signal.h>
+#include <compat/ibcs2/ibcs2_syscallargs.h>
+
 static u_long svr4_to_bsd_cmd __P((u_long));
 static int svr4_to_bsd_flags __P((int));
 static int bsd_to_svr4_flags __P((int));
@@ -262,6 +266,9 @@ svr4_sys_fcntl(p, v, retval)
        int                             error;
        struct sys_fcntl_args           fa;
 
+       if (SCARG(uap, cmd) == SVR4_F_GETLK_SVR3)
+               return ibcs2_sys_fcntl(p, v, retval);
+
        SCARG(&fa, fd) = SCARG(uap, fd);
        SCARG(&fa, cmd) = svr4_to_bsd_cmd(SCARG(uap, cmd));