patch-2.1.53 linux/arch/sparc64/solaris/conv.h

Next file: linux/arch/sparc64/solaris/entry64.S
Previous file: linux/arch/sparc64/solaris/Makefile
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.52/linux/arch/sparc64/solaris/conv.h linux/arch/sparc64/solaris/conv.h
@@ -0,0 +1,28 @@
+/* $Id: conv.h,v 1.2 1997/09/03 12:29:13 jj Exp $
+ * conv.h: Utility macros for Solaris emulation
+ *
+ * Copyright (C) 1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
+ */
+ 
+/* #define DEBUG_SOLARIS */
+
+#ifndef __ASSEMBLY__
+
+#include <asm/unistd.h>
+
+/* As gcc will warn about casting u32 to some ptr, we have to cast it to
+ * unsigned long first, and that's what is A() for.
+ * You just do (void *)A(x), instead of having to
+ * type (void *)((unsigned long)x) or instead of just (void *)x, which will
+ * produce warnings.
+ */
+#define A(x) ((unsigned long)x)
+
+extern unsigned sys_call_table[];
+extern unsigned sys_call_table32[];
+extern unsigned sunos_sys_table[];
+
+#define SYS(name) ((long)sys_call_table[__NR_##name])
+#define SUNOS(x) ((long)sunos_sys_table[x])
+
+#endif /* __ASSEMBLY__ */

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov