Split the wrapper in module and export syms.
authorSimon 'corecode' Schubert <corecode@fs.ei.tum.de>
Sun, 13 Jan 2008 03:41:14 +0000 (04:41 +0100)
committerSimon 'corecode' Schubert <corecode@fs.ei.tum.de>
Sun, 13 Jan 2008 03:41:14 +0000 (04:41 +0100)
obj/wrap/Makefile
obj/wrap/exportsyms.c [new file with mode: 0644]
obj/wrap/wrapmodule.c [moved from obj/wrap/nvidia_wrap.c with 62% similarity]

index ed5f7b3..0d50433 100644 (file)
@@ -1,5 +1,5 @@
 SHLIB_NAME= libnvidia_wrap.so
-SRCS=  nvidia_wrap.c
+SRCS=  wrapmodule.c exportsyms.c
 NOMAN=
 
 XORGDIR?=      /usr/pkg
diff --git a/obj/wrap/exportsyms.c b/obj/wrap/exportsyms.c
new file mode 100644 (file)
index 0000000..c32a93a
--- /dev/null
@@ -0,0 +1,31 @@
+/* Wrapper symbols */
+
+#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));
+}
similarity index 62%
rename from obj/wrap/nvidia_wrap.c
rename to obj/wrap/wrapmodule.c
index 344998e..a09dbd3 100644 (file)
@@ -27,35 +27,3 @@ nvidia_wrapSetup(pointer module, pointer opts, int *errmaj, int *errmin)
 {
        xf86DrvMsg(0, X_INFO, "Nvidia binary wrapper loaded.\n");
 }
-
-/* Wrapper symbols */
-
-#include <ctype.h>
-
-extern __thread int    errno;
-
-_X_EXPORT int *
-__error(void)
-{
-       return (&errno);
-}
-
-_X_EXPORT int
-___tolower(int c)
-{
-       return (tolower(c));
-}
-
-_X_EXPORT int
-___toupper(int c)
-{
-       return (toupper(c));
-}
-
-unsigned long ___runetype_mb(int);
-
-_X_EXPORT unsigned long
-___runetype(int c)
-{
-       return (___runetype_mb(c));
-}