compat.h revision 283927
1275680Strasz/*- 2275680Strasz * Copyright (c) 2009 Hudson River Trading LLC 3275680Strasz * Written by: John H. Baldwin <jhb@FreeBSD.org> 4275680Strasz * All rights reserved. 5275680Strasz * 6275680Strasz * Redistribution and use in source and binary forms, with or without 7275680Strasz * modification, are permitted provided that the following conditions 8275680Strasz * are met: 9275680Strasz * 1. Redistributions of source code must retain the above copyright 10275680Strasz * notice, this list of conditions and the following disclaimer. 11275680Strasz * 2. Redistributions in binary form must reproduce the above copyright 12275680Strasz * notice, this list of conditions and the following disclaimer in the 13275680Strasz * documentation and/or other materials provided with the distribution. 14275680Strasz * 15275680Strasz * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 16275680Strasz * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17275680Strasz * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18275680Strasz * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 19275680Strasz * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20275680Strasz * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21275680Strasz * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22275680Strasz * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23275680Strasz * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24275680Strasz * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25275680Strasz * SUCH DAMAGE. 26275680Strasz * 27275680Strasz * $FreeBSD: stable/10/lib/libc/include/compat.h 283927 2015-06-02 19:20:39Z jhb $ 28275680Strasz */ 29275680Strasz 30275680Strasz/* 31275680Strasz * This file defines compatiblity symbol versions for old system calls. It 32275680Strasz * is included in all generated system call files. 33275680Strasz */ 34275680Strasz 35275680Strasz#ifndef __LIBC_COMPAT_H__ 36275680Strasz#define __LIBC_COMPAT_H__ 37275680Strasz 38275680Strasz#define __sym_compat(sym,impl,verid) \ 39284582Strasz .symver impl, sym@verid 40275680Strasz 41275680Strasz__sym_compat(__semctl, freebsd7___semctl, FBSD_1.0); 42316470Strasz__sym_compat(msgctl, freebsd7_msgctl, FBSD_1.0); 43275680Strasz__sym_compat(shmctl, freebsd7_shmctl, FBSD_1.0); 44284589Sallanjude 45275680Strasz#undef __sym_compat 46275680Strasz 47275680Strasz#define __weak_reference(sym,alias) \ 48284728Sallanjude .weak alias;.equ alias,sym 49284589Sallanjude 50284589Sallanjude#ifndef SYSCALL_COMPAT 51275680Strasz__weak_reference(__sys_fcntl,__fcntl_compat) 52275680Strasz#endif 53 54#undef __weak_reference 55 56#endif /* __LIBC_COMPAT_H__ */ 57 58