#!/bin/sh -
echo "/* alternate.c: automatically generated with copy of unconfigured routines */"
echo
if [ "$1" != y ]
then
	awk ' \
		/^#include/ {print $0; next; } \
		/^aout_remote_init_mm\(/ { on=1 ; print "\nvoid" ; } \
		/^unsigned long .*create_aout_tables\(/ { on=1 ; print "\n#ifdef CONFIG_MOSIX"; } \
		/^static void set_brk/ { on=1; print ""; }
		/^}/ { if(on) print "}" ; on=0; next; } \
		on == 1  { print $0; }
		' < $2
fi
