Changeset View
Changeset View
Standalone View
Standalone View
cddl/contrib/opensolaris/lib/libdtrace/common/mksignal.sh
Show All 21 Lines | |||||
# | # | ||||
# | # | ||||
# 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 | set -e | ||||
echo "\ | printf "%s" " | ||||
/*\n\ | /* | ||||
* Copyright 2003 Sun Microsystems, Inc. All rights reserved.\n\ | * Copyright 2003 Sun Microsystems, Inc. All rights reserved. | ||||
* Use is subject to license terms.\n\ | * Use is subject to license terms. | ||||
*/\n\ | */ | ||||
\n\ | |||||
#pragma ident\t\"%Z%%M%\t%I%\t%E% SMI\"\n" | #pragma ident\t\"%Z%%M%\t%I%\t%E% SMI\" | ||||
" | |||||
pattern='^#define[ ]*_*\(SIG[A-Z0-9]*\)[ ]\{1,\}\([A-Z0-9]*\).*$' | pattern='^#define[ ]*_*\(SIG[A-Z0-9]*\)[ ]\{1,\}\([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;/SIGRTMAX/q" | tr '@' '\n' | sed -n "s/$pattern/$replace/p;/SIGRTMAX/q" | tr '@' '\n' |