Commit | Line | Data |
---|---|---|
9ba261bd PLSC |
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 | ||
613086f6 | 30 | #if defined(__ANDROID__) || defined(__sun__) || defined(__GNU__) |
9ba261bd | 31 | #include <sys/syscall.h> |
81593390 | 32 | #elif defined(__linux__) || defined(__GLIBC__) |
9ba261bd | 33 | #include <syscall.h> |
5e4d8998 | 34 | |
80a92637 AX |
35 | #elif defined(__CYGWIN__) || defined(__APPLE__) || \ |
36 | defined(__FreeBSD__) || defined(__DragonFly__) | |
37 | /* Don't include anything on these platforms. */ | |
5e4d8998 | 38 | |
b10602e3 MJ |
39 | #else |
40 | #error "Add platform support to urcu/syscall-compat.h" | |
9ba261bd PLSC |
41 | #endif |
42 | ||
43 | #endif /* _URCU_SYSCALL_COMPAT_H */ |