summaryrefslogtreecommitdiffstats
path: root/lib/libc/include
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2015-04-18 21:50:13 +0000
committerkib <kib@FreeBSD.org>2015-04-18 21:50:13 +0000
commit2254748ed0eebd8391a1bc331f3d54d0ddb1f69d (patch)
tree5939add2a0816746476989dd37677ad0fb0428ac /lib/libc/include
parent2b1ec4f62f3bd13a47fea3a9c366c9a7a0ac35e0 (diff)
downloadFreeBSD-src-2254748ed0eebd8391a1bc331f3d54d0ddb1f69d.zip
FreeBSD-src-2254748ed0eebd8391a1bc331f3d54d0ddb1f69d.tar.gz
The lseek(2), mmap(2), truncate(2), ftruncate(2), pread(2), and
pwrite(2) syscalls are wrapped to provide compatibility with pre-7.x kernels which required padding before the off_t parameter. The fcntl(2) contains compatibility code to handle kernels before the struct flock was changed during the 8.x CURRENT development. The shims were reasonable to allow easier revert to the older kernel at that time. Now, two or three major releases later, shims do not serve any purpose. Such old kernels cannot handle current libc, so revert the compatibility code. Make padded syscalls support conditional under the COMPAT6 config option. For COMPAT32, the syscalls were under COMPAT6 already. Remove WITHOUT_SYSCALL_COMPAT build option, which only purpose was to (partially) disable the removed shims. Reviewed by: jhb, imp (previous versions) Discussed with: peter Sponsored by: The FreeBSD Foundation MFC after: 1 week
Diffstat (limited to 'lib/libc/include')
-rw-r--r--lib/libc/include/compat.h2
-rw-r--r--lib/libc/include/libc_private.h11
2 files changed, 1 insertions, 12 deletions
diff --git a/lib/libc/include/compat.h b/lib/libc/include/compat.h
index 2b8f0de..6ab17d7 100644
--- a/lib/libc/include/compat.h
+++ b/lib/libc/include/compat.h
@@ -47,9 +47,7 @@ __sym_compat(shmctl, freebsd7_shmctl, FBSD_1.0);
#define __weak_reference(sym,alias) \
.weak alias;.equ alias,sym
-#ifndef SYSCALL_COMPAT
__weak_reference(__sys_fcntl,__fcntl_compat)
-#endif
#undef __weak_reference
diff --git a/lib/libc/include/libc_private.h b/lib/libc/include/libc_private.h
index 2de6f77..a670d63 100644
--- a/lib/libc/include/libc_private.h
+++ b/lib/libc/include/libc_private.h
@@ -278,21 +278,12 @@ extern void (*__cleanup)(void) __hidden;
/*
* Get kern.osreldate to detect ABI revisions. Explicitly
- * ignores value of $OSVERSION and caches result. Prototypes
- * for the wrapped "new" pad-less syscalls are here for now.
+ * ignores value of $OSVERSION and caches result.
*/
int __getosreldate(void);
#include <sys/_types.h>
#include <sys/_sigset.h>
-/* With pad */
-__off_t __sys_freebsd6_lseek(int, int, __off_t, int);
-int __sys_freebsd6_ftruncate(int, int, __off_t);
-int __sys_freebsd6_truncate(const char *, int, __off_t);
-__ssize_t __sys_freebsd6_pread(int, void *, __size_t, int, __off_t);
-__ssize_t __sys_freebsd6_pwrite(int, const void *, __size_t, int, __off_t);
-void * __sys_freebsd6_mmap(void *, __size_t, int, int, int, int, __off_t);
-
struct aiocb;
struct fd_set;
struct iovec;
OpenPOWER on IntegriCloud