Changeset View
Changeset View
Standalone View
Standalone View
head/cddl/contrib/opensolaris/lib/libdtrace/common/mkerrno.sh
Show All 19 Lines | |||||
# | # | ||||
# CDDL HEADER END | # CDDL HEADER END | ||||
# | # | ||||
# | # | ||||
# Copyright 2003 Sun Microsystems, Inc. All rights reserved. | # Copyright 2003 Sun Microsystems, Inc. All rights reserved. | ||||
# Use is subject to license terms. | # Use is subject to license terms. | ||||
# | # | ||||
#ident "%Z%%M% %I% %E% SMI" | #ident "%Z%%M% %I% %E% SMI" | ||||
set -e | |||||
echo "\ | echo "\ | ||||
/*\n\ | /*\n\ | ||||
* Copyright 2003 Sun Microsystems, Inc. All rights reserved.\n\ | * Copyright 2003 Sun Microsystems, Inc. All rights reserved.\n\ | ||||
* Use is subject to license terms.\n\ | * Use is subject to license terms.\n\ | ||||
*/\n\ | */\n\ | ||||
\n\ | \n\ | ||||
#pragma ident\t\"%Z%%M%\t%I%\t%E% SMI\"\n" | #pragma ident\t\"%Z%%M%\t%I%\t%E% SMI\"\n" | ||||
pattern='^#define[ ]\(E[A-Z0-9]*\)[ ]*\([A-Z0-9]*\).*$' | pattern='^#define[ ]\(E[A-Z0-9]*\)[ ]*\([A-Z0-9]*\).*$' | ||||
replace='inline int \1 = \2;@#pragma D binding "1.0" \1' | replace='inline int \1 = \2;@#pragma D binding "1.0" \1' | ||||
sed -n "s/$pattern/$replace/p" | tr '@' '\n' | sed -n "s/$pattern/$replace/p" | tr '@' '\n' |