Index: kernel/generic/src/console/cmd.c
===================================================================
--- kernel/generic/src/console/cmd.c	(revision 19021131a8049e328f4ae00e41f505a00c88463b)
+++ kernel/generic/src/console/cmd.c	(revision 6da1013f00030b5dcedc878f40a0e6242a8d3282)
@@ -617,12 +617,7 @@
 	uintptr_t symaddr;
 	char *symbol;
-	unative_t (*f)(void);
-#ifdef ia64
-	struct {
-		unative_t f;
-		unative_t gp;
-	} fptr;
-#endif
-
+	unative_t (*fnc)(void);
+	fncptr_t fptr;
+	
 	symaddr = get_symbol_addr((char *) argv->buffer);
 	if (!symaddr)
@@ -633,13 +628,7 @@
 	} else {
 		symbol = get_symtab_entry(symaddr);
+		fnc = (unative_t (*)(void)) arch_construct_function(&fptr, (void *) symaddr, (void *) cmd_call0);
 		printf("Calling %s() (%p)\n", symbol, symaddr);
-#ifdef ia64
-		fptr.f = symaddr;
-		fptr.gp = ((unative_t *)cmd_call2)[1];
-		f =  (unative_t (*)(void)) &fptr;
-#else
-		f =  (unative_t (*)(void)) symaddr;
-#endif
-		printf("Result: %#" PRIxn "\n", f());
+		printf("Result: %#" PRIxn "\n", fnc());
 	}
 	
@@ -681,13 +670,8 @@
 	uintptr_t symaddr;
 	char *symbol;
-	unative_t (*f)(unative_t,...);
+	unative_t (*fnc)(unative_t, ...);
 	unative_t arg1 = argv[1].intval;
-#ifdef ia64
-	struct {
-		unative_t f;
-		unative_t gp;
-	} fptr;
-#endif
-
+	fncptr_t fptr;
+	
 	symaddr = get_symbol_addr((char *) argv->buffer);
 	if (!symaddr)
@@ -698,14 +682,7 @@
 	} else {
 		symbol = get_symtab_entry(symaddr);
-
+		fnc = (unative_t (*)(unative_t, ...)) arch_construct_function(&fptr, (void *) symaddr, (void *) cmd_call1);
 		printf("Calling f(%#" PRIxn "): %p: %s\n", arg1, symaddr, symbol);
-#ifdef ia64
-		fptr.f = symaddr;
-		fptr.gp = ((unative_t *)cmd_call2)[1];
-		f =  (unative_t (*)(unative_t,...)) &fptr;
-#else
-		f =  (unative_t (*)(unative_t,...)) symaddr;
-#endif
-		printf("Result: %#" PRIxn "\n", f(arg1));
+		printf("Result: %#" PRIxn "\n", fnc(arg1));
 	}
 	
@@ -718,14 +695,9 @@
 	uintptr_t symaddr;
 	char *symbol;
-	unative_t (*f)(unative_t,unative_t,...);
+	unative_t (*fnc)(unative_t, unative_t, ...);
 	unative_t arg1 = argv[1].intval;
 	unative_t arg2 = argv[2].intval;
-#ifdef ia64
-	struct {
-		unative_t f;
-		unative_t gp;
-	}fptr;
-#endif
-
+	fncptr_t fptr;
+	
 	symaddr = get_symbol_addr((char *) argv->buffer);
 	if (!symaddr)
@@ -736,14 +708,8 @@
 	} else {
 		symbol = get_symtab_entry(symaddr);
+		fnc = (unative_t (*)(unative_t, unative_t, ...)) arch_construct_function(&fptr, (void *) symaddr, (void *) cmd_call2);
 		printf("Calling f(%#" PRIxn ", %#" PRIxn "): %p: %s\n", 
 		       arg1, arg2, symaddr, symbol);
-#ifdef ia64
-		fptr.f = symaddr;
-		fptr.gp = ((unative_t *)cmd_call2)[1];
-		f =  (unative_t (*)(unative_t,unative_t,...)) &fptr;
-#else
-		f =  (unative_t (*)(unative_t,unative_t,...)) symaddr;
-#endif
-		printf("Result: %#" PRIxn "\n", f(arg1, arg2));
+		printf("Result: %#" PRIxn "\n", fnc(arg1, arg2));
 	}
 	
@@ -756,15 +722,10 @@
 	uintptr_t symaddr;
 	char *symbol;
-	unative_t (*f)(unative_t,unative_t,unative_t,...);
+	unative_t (*fnc)(unative_t, unative_t, unative_t, ...);
 	unative_t arg1 = argv[1].intval;
 	unative_t arg2 = argv[2].intval;
 	unative_t arg3 = argv[3].intval;
-#ifdef ia64
-	struct {
-		unative_t f;
-		unative_t gp;
-	}fptr;
-#endif
-
+	fncptr_t fptr;
+	
 	symaddr = get_symbol_addr((char *) argv->buffer);
 	if (!symaddr)
@@ -775,14 +736,8 @@
 	} else {
 		symbol = get_symtab_entry(symaddr);
+		fnc = (unative_t (*)(unative_t, unative_t, unative_t, ...)) arch_construct_function(&fptr, (void *) symaddr, (void *) cmd_call3);
 		printf("Calling f(%#" PRIxn ",%#" PRIxn ", %#" PRIxn "): %p: %s\n", 
 		       arg1, arg2, arg3, symaddr, symbol);
-#ifdef ia64
-		fptr.f = symaddr;
-		fptr.gp = ((unative_t *)cmd_call2)[1];
-		f =  (unative_t (*)(unative_t,unative_t,unative_t,...)) &fptr;
-#else
-		f =  (unative_t (*)(unative_t,unative_t,unative_t,...)) symaddr;
-#endif
-		printf("Result: %#" PRIxn "\n", f(arg1, arg2, arg3));
+		printf("Result: %#" PRIxn "\n", fnc(arg1, arg2, arg3));
 	}
 	
@@ -997,7 +952,7 @@
 	
 	for (test = tests; test->name != NULL; test++)
-		printf("%s\t\t%s%s\n", test->name, test->desc, (test->safe ? "" : " (unsafe)"));
-	
-	printf("*\t\tRun all safe tests\n");
+		printf("%-10s %s%s\n", test->name, test->desc, (test->safe ? "" : " (unsafe)"));
+	
+	printf("%-10s Run all safe tests\n", "*");
 	return 1;
 }
Index: kernel/generic/src/ipc/irq.c
===================================================================
--- kernel/generic/src/ipc/irq.c	(revision 19021131a8049e328f4ae00e41f505a00c88463b)
+++ kernel/generic/src/ipc/irq.c	(revision 6da1013f00030b5dcedc878f40a0e6242a8d3282)
@@ -101,5 +101,4 @@
 			    code->cmds[i].value;
 			break;
-#if defined(ia32) || defined(amd64) || defined(ia64)
 		case CMD_PORT_READ_1:
 			dstval = inb((long) code->cmds[i].addr);
@@ -108,15 +107,4 @@
 			outb((long) code->cmds[i].addr, code->cmds[i].value);
 			break;
-#endif
-#if defined(ia64) && defined(SKI)
-		case CMD_IA64_GETCHAR:
-			dstval = _getc(&ski_uconsole);
-			break;
-#endif
-#if defined(ppc32)
-		case CMD_PPC32_GETCHAR:
-			dstval = cuda_get_scancode();
-			break;
-#endif
 		default:
 			break;
Index: kernel/generic/src/main/version.c
===================================================================
--- kernel/generic/src/main/version.c	(revision 19021131a8049e328f4ae00e41f505a00c88463b)
+++ kernel/generic/src/main/version.c	(revision 6da1013f00030b5dcedc878f40a0e6242a8d3282)
@@ -35,13 +35,14 @@
 #include <main/version.h>
 #include <print.h>
+#include <macros.h>
 
 char *project = "SPARTAN kernel";
-char *copyright = "Copyright (c) 2001-2008 HelenOS project";
-char *release = RELEASE;
-char *name = NAME;
-char *arch = ARCH;
+char *copyright = "Copyright (c) 2001-2009 HelenOS project";
+char *release = STRING(RELEASE);
+char *name = STRING(NAME);
+char *arch = STRING(KARCH);
 
 #ifdef REVISION
-	char *revision = ", revision " REVISION;
+	char *revision = ", revision " STRING(REVISION);
 #else
 	char *revision = "";
@@ -49,5 +50,5 @@
 
 #ifdef TIMESTAMP
-	char *timestamp = " on " TIMESTAMP;
+	char *timestamp = " on " STRING(TIMESTAMP);
 #else
 	char *timestamp = "";
Index: kernel/generic/src/proc/thread.c
===================================================================
--- kernel/generic/src/proc/thread.c	(revision 19021131a8049e328f4ae00e41f505a00c88463b)
+++ kernel/generic/src/proc/thread.c	(revision 6da1013f00030b5dcedc878f40a0e6242a8d3282)
@@ -103,5 +103,5 @@
 
 static slab_cache_t *thread_slab;
-#ifdef ARCH_HAS_FPU
+#ifdef CONFIG_FPU
 slab_cache_t *fpu_context_slab;
 #endif
@@ -162,5 +162,5 @@
 	thr_constructor_arch(t);
 	
-#ifdef ARCH_HAS_FPU
+#ifdef CONFIG_FPU
 #ifdef CONFIG_FPU_LAZY
 	t->saved_fpu_context = NULL;
@@ -170,9 +170,9 @@
 		return -1;
 #endif
-#endif	
+#endif
 
 	t->kstack = (uint8_t *) frame_alloc(STACK_FRAMES, FRAME_KA | kmflags);
 	if (!t->kstack) {
-#ifdef ARCH_HAS_FPU
+#ifdef CONFIG_FPU
 		if (t->saved_fpu_context)
 			slab_free(fpu_context_slab, t->saved_fpu_context);
@@ -197,5 +197,5 @@
 
 	frame_free(KA2PA(t->kstack));
-#ifdef ARCH_HAS_FPU
+#ifdef CONFIG_FPU
 	if (t->saved_fpu_context)
 		slab_free(fpu_context_slab, t->saved_fpu_context);
@@ -216,5 +216,5 @@
 	    thr_constructor, thr_destructor, 0);
 
-#ifdef ARCH_HAS_FPU
+#ifdef CONFIG_FPU
 	fpu_context_slab = slab_cache_create("fpu_slab", sizeof(fpu_context_t),
 	    FPU_CONTEXT_ALIGN, NULL, NULL, 0);
