#!/bin/sh
#
#	mkstubs_h 2.0 - make <minix/stubs.h>		Author: Kees J. Bot
#								22 Dec 1994
#
# Make #defines to bypass the "xxx: jmp _xxx" stubs.

cat <<'LEADER'
/*	minix/stubs.h - Macro stubs for POSIX functions	
 *							Author: Kees J. Bot
 *								26 Mar 1994
 * The #define's in this file are created by the mkstubs_h script
 * in lib/mach/minix.`arch`/stubs.  The "xxx: jmp _xxx" assembly stubs
 * allow user programs to use system calls, but also allow user code to
 * redefine system call names.  Library functions call the system calls
 * directly using their "_xxx" names by including <minix/stubs.h>.
 */
#ifndef _MINIX__STUBS_H
#define _MINIX__STUBS_H

LEADER

# Emit the stubs bypass #defines.
ls *.s | sed -e '
		/^cf[sg]et[io]speed\./d
		s/\([^.]*\).*/#define \1 _\1/
	'

cat <<'TRAILER'

#endif /* _MINIX__STUBS_H */
TRAILER
