Add LD_PRELOAD wrapper
authorSimon 'corecode' Schubert <corecode@fs.ei.tum.de>
Sat, 12 Jan 2008 14:40:01 +0000 (15:40 +0100)
committerSimon 'corecode' Schubert <corecode@fs.ei.tum.de>
Sun, 13 Jan 2008 03:25:01 +0000 (04:25 +0100)
obj/wrap/Makefile [new file with mode: 0644]
obj/wrap/nvidia_wrap.c [new file with mode: 0644]

diff --git a/obj/wrap/Makefile b/obj/wrap/Makefile
new file mode 100644 (file)
index 0000000..e544662
--- /dev/null
@@ -0,0 +1,6 @@
+LIB=   nvidia_wrap
+SRCS=  nvidia_wrap.c
+SHLIB_MAJOR= 1
+NOMAN=
+
+.include <bsd.lib.mk>
diff --git a/obj/wrap/nvidia_wrap.c b/obj/wrap/nvidia_wrap.c
new file mode 100644 (file)
index 0000000..2024a86
--- /dev/null
@@ -0,0 +1,29 @@
+#include <ctype.h>
+
+extern __thread int    errno;
+
+int *
+__error(void)
+{
+       return (&errno);
+}
+
+int
+___tolower(int c)
+{
+       return (tolower(c));
+}
+
+int
+___toupper(int c)
+{
+       return (toupper(c));
+}
+
+unsigned long ___runetype_mb(int);
+
+unsigned long
+___runetype(int c)
+{
+       return (___runetype_mb(c));
+}