From 0636e9ecb5a32db4d4520f50a20652faa825feaf Mon Sep 17 00:00:00 2001 From: Axel Beckert Date: Sat, 3 Sep 2011 14:05:19 +0200 Subject: Imported Upstream version 3.7.2 --- osdef.sh | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 osdef.sh (limited to 'osdef.sh') diff --git a/osdef.sh b/osdef.sh new file mode 100644 index 0000000..3ecc4d7 --- /dev/null +++ b/osdef.sh @@ -0,0 +1,46 @@ +#! /bin/sh + +if test -z "$CC"; then + CC=cc +fi +if test -z "$srcdir"; then + srcdir=. +fi + +sed < $srcdir/osdef.h.in -n -e '/^extern/s@.*[)* ][)* ]*\([^ *]*\) __P.*@/[)*, ]\1[ (]/i\\\ +\\/\\[^a-zA-Z_\\]\1 __P\\/d@p' > osdef1.sed +cat << EOF > osdef0.c +#include "config.h" +#include +#include +#include +#include +#include +#ifdef SHADOWPW +#include +#endif +#ifndef sun +#include +#endif +#ifndef NAMEDPIPE +#include +#endif +#include "os.h" +#if defined(UTMPOK) && defined (GETTTYENT) && !defined(GETUTENT) +#include +#endif +#ifdef SVR4 +# include +#endif +EOF +cat << EOF > osdef2.sed +1i\\ +/* +1i\\ + * This file is automagically created from osdef.sh -- DO NOT EDIT +1i\\ + */ +EOF +$CC -I. -I$srcdir -E osdef0.c | sed -n -f osdef1.sed >> osdef2.sed +sed -f osdef2.sed < $srcdir/osdef.h.in > osdef.h +rm osdef0.c osdef1.sed osdef2.sed -- cgit v1.2.3