1 /* $OpenBSD: syscall.h,v 1.8 2024/04/05 13:51:47 deraadt Exp $ */ 2 3 /* 4 * Copyright (c) 1998 Per Fogelstrom, Opsycon AB 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: 9 * 1. Redistributions of source code must retain the above copyright 10 * notice, this list of conditions and the following disclaimer. 11 * 2. Redistributions in binary form must reproduce the above copyright 12 * notice, this list of conditions and the following disclaimer in the 13 * documentation and/or other materials provided with the distribution. 14 * 15 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS 16 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY 19 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 * 27 */ 28 29 #ifndef __DL_SYSCALL_H__ 30 #define __DL_SYSCALL_H__ 31 32 #ifndef _dl_MAX_ERRNO 33 #define _dl_MAX_ERRNO 512L 34 #endif 35 #define _dl_mmap_error(__res) \ 36 ((long)__res < 0 && (long)__res >= -_dl_MAX_ERRNO) 37 38 struct __kbind; 39 struct stat; 40 41 int _dl_close(int); 42 __dead 43 void _dl_exit(int); 44 int _dl_fstat(int, struct stat *); 45 ssize_t _dl_getdents(int, char *, size_t); 46 int _dl_getentropy(char *, size_t); 47 int _dl_getthrid(void); 48 int _dl_issetugid(void); 49 int _dl_kbind(const struct __kbind *, size_t, int64_t); 50 void *_dl_mmap(void *, size_t, int, int, int, off_t); 51 int _dl_mprotect(const void *, size_t, int); 52 void *_dl_mquery(void *, size_t, int, int, int, off_t); 53 int _dl_pinsyscalls(void *base, size_t len, u_int *pin, int pinlen); 54 int _dl_munmap(const void *, size_t); 55 int _dl_mimmutable(const void *, size_t); 56 int _dl_open(const char *, int); 57 int _dl_pledge(const char *, const char **); 58 ssize_t _dl_read(int, void *, size_t); 59 int _dl_sendsyslog(const char *, size_t, int); 60 void _dl___set_tcb(void *); 61 int _dl_sysctl(const int *, u_int, void *, size_t *, void *, size_t); 62 __dead 63 void _dl_thrkill(pid_t, int, void *); 64 int _dl_utrace(const char *, const void *, size_t); 65 66 #endif /*__DL_SYSCALL_H__*/ 67