add rump_syscalls_compat.h

This commit is contained in:
pooka 2010-07-19 15:28:18 +00:00
parent 7f9f73897e
commit abfc763eb1
3 changed files with 68 additions and 4 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: mi,v 1.1482 2010/07/11 06:16:55 mrg Exp $
# $NetBSD: mi,v 1.1483 2010/07/19 15:28:18 pooka Exp $
#
# Note: don't delete entries from here - mark them as "obsolete" instead.
#
@ -1904,6 +1904,7 @@
./usr/include/rump/rump.h comp-c-include
./usr/include/rump/rump_namei.h comp-c-include
./usr/include/rump/rump_syscalls.h comp-c-include
./usr/include/rump/rump_syscalls_compat.h comp-c-include
./usr/include/rump/rumpdefs.h comp-c-include
./usr/include/rump/rumpkern_if_pub.h comp-c-include
./usr/include/rump/rumpnet_if_pub.h comp-c-include

View File

@ -1,9 +1,9 @@
# $NetBSD: Makefile,v 1.2 2009/10/14 17:29:19 pooka Exp $
# $NetBSD: Makefile,v 1.3 2010/07/19 15:28:19 pooka Exp $
INCSDIR= /usr/include/rump
INCS= rump.h rump_namei.h rump_syscalls.h rumpdefs.h rumpuser.h
INCS+= rumpvnode_if.h
INCS= rump.h rump_namei.h rump_syscalls.h rump_syscalls_compat.h
INCS+= rumpdefs.h rumpuser.h rumpvnode_if.h
INCS+= rumpkern_if_pub.h rumpvfs_if_pub.h rumpnet_if_pub.h

View File

@ -0,0 +1,63 @@
/* $NetBSD: rump_syscalls_compat.h,v 1.1 2010/07/19 15:28:20 pooka Exp $ */
/*-
* Copyright (c) 2010 Antti Kantee. All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
#ifndef _RUMP_RUMP_SYSCALLS_COMPAT_H_
#define _RUMP_RUMP_SYSCALLS_COMPAT_H_
#ifndef _KERNEL
/*
* Compat calls. They're manual now. Note the slightly non-standard
* naming. This is because we cannot exploit __RENAME() the same way
* normal builds exploit it -- we want to build *new* files linked
* against these symbols. Note that the defines don't allow calling
* the current ones from a old userland, should that be desired for
* whatever reason.
*/
#ifdef __NetBSD__
#include <sys/param.h>
#if !__NetBSD_Prereq__(5,99,7)
#define rump_sys_stat(a,b) rump_sys_nb5_stat(a,b)
#define rump_sys_lstat(a,b) rump_sys_nb5_lstat(a,b)
#define rump_sys_pollts(a,b,c,d) rump_sys_nb5_pollts(a,b,c,d)
#endif /* __NetBSD_Prereq */
#endif /* __NetBSD__ */
#endif /* _KERNEL */
#ifdef _BEGIN_DECLS
_BEGIN_DECLS
#endif
int rump_sys_nb5_stat(const char *, struct stat *);
int rump_sys_nb5_lstat(const char *, struct stat *);
int rump_sys_nb5_pollts(struct pollfd *, size_t,
const struct timespec *, const void *);
#ifdef _END_DECLS
_END_DECLS
#endif
#endif /* _RUMP_RUMP_SYSCALLS_COMPAT_H_ */