about summary refs log tree commit diff stats
path: root/wrapperhelper/example-libc.h
diff options
context:
space:
mode:
authorrajdakin <rajdakin@gmail.com>2024-09-06 15:07:38 +0200
committerGitHub <noreply@github.com>2024-09-06 15:07:38 +0200
commit6044feb7fd58ff69f63f5418f516b1f3ded346e9 (patch)
tree9935288f145df5b80f6d118c8a487b0a10afb1e8 /wrapperhelper/example-libc.h
parent7dc59ac342d315dbb352becbeabc4e7057992de0 (diff)
downloadbox64-6044feb7fd58ff69f63f5418f516b1f3ded346e9.tar.gz
box64-6044feb7fd58ff69f63f5418f516b1f3ded346e9.zip
Wrapper helper (#1799)
* [WRAPPERHELPER] Added wrapperhelper v0.1, tested on libc

* [WRAPPED] Removed updates to libc from this branch

* [WRAPPERHELPER] Removed GPL header and added modified LGPL header, added notes about licensing issues
Diffstat (limited to 'wrapperhelper/example-libc.h')
-rw-r--r--wrapperhelper/example-libc.h170
1 files changed, 170 insertions, 0 deletions
diff --git a/wrapperhelper/example-libc.h b/wrapperhelper/example-libc.h
new file mode 100644
index 00000000..24dea13d
--- /dev/null
+++ b/wrapperhelper/example-libc.h
@@ -0,0 +1,170 @@
+#define __x86_64__
+#define __WCHAR_MAX__ 2147483647
+#define __WCHAR_MIN__ (-__WCHAR_MAX - 1)
+#define _GNU_SOURCE 1
+#define __USE_MISC 1
+#define PORTMAP
+#define __WORDSIZE 64
+
+// Based on /usr/include/clang/Basic/TokenKinds.def
+// Alternate spelling for various tokens.  There are GCC extensions in all
+// languages, but should not be disabled in strict conformance mode.
+#define __alignof__   __alignof
+#define __asm         asm
+#define __asm__       asm
+#define __complex     _Complex
+#define __complex__   _Complex
+#define __const       const
+#define __const__     const
+#define __decltype    decltype
+#define __imag__      __imag
+#define __inline      inline
+#define __inline__    inline
+#define __nullptr     nullptr
+#define __real__      __real
+#define __restrict    restrict
+#define __restrict__  restrict
+#define __signed      signed
+#define __signed__    signed
+#define __typeof      typeof
+#define __typeof__    typeof
+#define __volatile    volatile
+#define __volatile__  volatile
+
+typedef __int128 __int128_t;
+typedef unsigned __int128 __uint128_t;
+
+// TODO
+#define inline
+
+#include <stdint.h>
+
+#include <aliases.h>
+#include <argp.h>
+#include <argz.h>
+#include <arpa/inet.h>
+#include <arpa/nameser.h>
+#include <asm/prctl.h>
+#include <complex.h>
+#include <ctype.h>
+#include <dirent.h>
+#include <envz.h>
+#include <err.h>
+#include <error.h>
+#include <execinfo.h>
+#include <event.h>
+#include <fcntl.h>
+#include <fmtmsg.h>
+#include <fnmatch.h>
+#include <fstab.h>
+#include <fts.h>
+#include <ftw.h>
+#include <gconv.h>
+#include <glob.h>
+#include <gnu/libc-version.h>
+#include <grp.h>
+#include <gshadow.h>
+#include <iconv.h>
+#include <ifaddrs.h>
+#include <inttypes.h>
+#include <langinfo.h>
+#include <libgen.h>
+#include <libintl.h>
+#include <link.h>
+#include <linux/module.h>
+#include <locale.h>
+#include <math.h>
+#include <malloc.h>
+#include <mcheck.h>
+#include <mntent.h>
+#include <monetary.h>
+#include <netdb.h>
+#include <net/if.h>
+#include <netinet/ether.h>
+#include <netinet/in.h>
+#include <nl_types.h>
+#include <obstack.h>
+#include <poll.h>
+#include <printf.h>
+#include <pwd.h>
+#include <regex.h>
+#include <resolv.h>
+#include <rpc/auth.h>
+#include <rpc/des_crypt.h>
+#include <rpc/key_prot.h>
+#include <rpc/rpc.h>
+#include <sched.h>
+#include <search.h>
+#include <setjmp.h>
+#include <shadow.h>
+#include <signal.h>
+#include <spawn.h>
+#include <stddef.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/auxv.h>
+#include <sys/epoll.h>
+#include <sys/eventfd.h>
+#include <sys/fanotify.h>
+#include <sys/file.h>
+#include <sys/fsuid.h>
+#include <sys/inotify.h>
+#include <sys/io.h>
+#include <sys/ipc.h>
+#include <sys/klog.h>
+#include <sys/mman.h>
+#include <sys/mount.h>
+#include <sys/msg.h>
+#include <sys/personality.h>
+#include <sys/prctl.h>
+#include <sys/profil.h>
+#include <sys/ptrace.h>
+#include <sys/quota.h>
+#include <sys/random.h>
+#include <sys/reboot.h>
+#include <sys/resource.h>
+#include <sys/sem.h>
+#include <sys/sendfile.h>
+#include <sys/shm.h>
+#include <sys/signal.h>
+#include <sys/signalfd.h>
+#include <sys/socket.h>
+#include <sys/stat.h>
+#include <sys/statfs.h>
+#include <sys/statvfs.h>
+#include <sys/swap.h>
+#include <sys/syscall.h>
+#include <sys/sysinfo.h>
+#include <sys/syslog.h>
+#include <sys/sysmacros.h>
+#include <sys/time.h>
+#include <sys/timeb.h>
+#include <sys/timerfd.h>
+#include <sys/times.h>
+#include <sys/timex.h>
+#include <sys/types.h>
+#include <sys/utsname.h>
+#include <sys/vfs.h>
+#include <sys/xattr.h>
+#include <syslog.h>
+#include <termios.h>
+#include <time.h>
+#include <threads.h>
+#include <ttyent.h>
+#include <uchar.h>
+#include <ucontext.h>
+#include <ulimit.h>
+#include <unistd.h>
+#include <unistdio.h>
+#include <utime.h>
+#include <utmp.h>
+#include <utmpx.h>
+#include <wait.h>
+#include <wchar.h>
+#include <wctype.h>
+#include <wordexp.h>
+
+#pragma wrappers explicit_simple FTS
+#pragma wrappers explicit_simple FTS64
+#pragma wrappers explicit_simple glob_t
+#pragma wrappers explicit_simple glob64_t