| 1 | #ifndef _URCU_SYSCALL_COMPAT_H |
| 2 | #define _URCU_SYSCALL_COMPAT_H |
| 3 | |
| 4 | /* |
| 5 | * urcu/syscall-compat.h |
| 6 | * |
| 7 | * Userspace RCU library - Syscall Compatibility Header |
| 8 | * |
| 9 | * Copyright 2013 - Pierre-Luc St-Charles <pierre-luc.st-charles@polymtl.ca> |
| 10 | * |
| 11 | * Note: this file is only used to simplify the code required to |
| 12 | * include the 'syscall.h' system header across multiple platforms, |
| 13 | * which might not always be located at the same place (or needed at all). |
| 14 | * |
| 15 | * This library is free software; you can redistribute it and/or |
| 16 | * modify it under the terms of the GNU Lesser General Public |
| 17 | * License as published by the Free Software Foundation; either |
| 18 | * version 2.1 of the License, or (at your option) any later version. |
| 19 | * |
| 20 | * This library is distributed in the hope that it will be useful, |
| 21 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 22 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 23 | * Lesser General Public License for more details. |
| 24 | * |
| 25 | * You should have received a copy of the GNU Lesser General Public |
| 26 | * License along with this library; if not, write to the Free Software |
| 27 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 28 | */ |
| 29 | |
| 30 | #if defined(__ANDROID__) || defined(__sun__) || defined(__GNU__) |
| 31 | #include <sys/syscall.h> |
| 32 | #elif defined(__linux__) || defined(__GLIBC__) |
| 33 | #include <syscall.h> |
| 34 | |
| 35 | #elif defined(__CYGWIN__) || defined(__APPLE__) || \ |
| 36 | defined(__FreeBSD__) || defined(__DragonFly__) |
| 37 | /* Don't include anything on these platforms. */ |
| 38 | |
| 39 | #else |
| 40 | #error "Add platform support to urcu/syscall-compat.h" |
| 41 | #endif |
| 42 | |
| 43 | #endif /* _URCU_SYSCALL_COMPAT_H */ |