summaryrefslogtreecommitdiff
path: root/lib/libc/sys/lseek.c
diff options
context:
space:
mode:
authorPhilip Guenther <guenther@cvs.openbsd.org>2015-09-11 13:26:21 +0000
committerPhilip Guenther <guenther@cvs.openbsd.org>2015-09-11 13:26:21 +0000
commitc7b05d22d4364f15fbb4613057614c7c4141d5ea (patch)
tree7c815ee3719e2ece8d7d053e42f8d842c9b50142 /lib/libc/sys/lseek.c
parent97d2e2140973d0f19150fb246a3e179a62c785cb (diff)
Use PROTO_NORMAL() on __syscall to go direct, adjusting the declaration
to eliminate some casts. Retire some uses of old-style STUB* macros where superseded by namespace.h bits tweaks and ok deraadt@
Diffstat (limited to 'lib/libc/sys/lseek.c')
-rw-r--r--lib/libc/sys/lseek.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/lib/libc/sys/lseek.c b/lib/libc/sys/lseek.c
index 51d0676356a..5d6d7048b32 100644
--- a/lib/libc/sys/lseek.c
+++ b/lib/libc/sys/lseek.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lseek.c,v 1.15 2011/10/16 06:29:56 guenther Exp $ */
+/* $OpenBSD: lseek.c,v 1.16 2015/09/11 13:26:20 guenther Exp $ */
/*
* Copyright (c) 1992, 1993
* The Regents of the University of California. All rights reserved.
@@ -30,22 +30,19 @@
#include <sys/syscall.h>
#include <unistd.h>
-#include "thread_private.h"
-off_t __syscall(quad_t, ...);
+off_t __syscall(quad_t, ...);
+PROTO_NORMAL(__syscall);
-/* lseek is weak to support libpthread locking */
-
-STUB_PROTOTYPE(lseek);
-
-STUB_ALIAS(lseek);
+DEF_SYS(lseek);
/*
* This function provides 64-bit offset padding that
* is not supplied by GCC 1.X but is supplied by GCC 2.X.
*/
off_t
-STUB_NAME(lseek)(int fd, off_t offset, int whence)
+lseek(int fd, off_t offset, int whence)
{
- return (__syscall((quad_t)SYS_lseek, fd, 0, offset, whence));
+ return (__syscall(SYS_lseek, fd, 0, offset, whence));
}
+DEF_WEAK(lseek);