Index: head/cddl/contrib/opensolaris/lib/libdtrace/common/mkerrno.sh =================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/mkerrno.sh (revision 364123) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/mkerrno.sh (revision 364124) @@ -1,41 +1,40 @@ #!/bin/sh # # CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License, Version 1.0 only # (the "License"). You may not use this file except in compliance # with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions # and limitations under the License. # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file at usr/src/OPENSOLARIS.LICENSE. # If applicable, add the following below this CDDL HEADER, with the # fields enclosed by brackets "[]" replaced with your own identifying # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END # # # Copyright 2003 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -#ident "%Z%%M% %I% %E% SMI" set -e -echo "\ -/*\n\ - * Copyright 2003 Sun Microsystems, Inc. All rights reserved.\n\ - * Use is subject to license terms.\n\ - */\n\ -\n\ -#pragma ident\t\"%Z%%M%\t%I%\t%E% SMI\"\n" +printf "%s" " +/* + * Copyright 2003 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +" pattern='^#define[ ]\(E[A-Z0-9]*\)[ ]*\([A-Z0-9]*\).*$' replace='inline int \1 = \2;@#pragma D binding "1.0" \1' sed -n "s/$pattern/$replace/p" | tr '@' '\n' Index: head/cddl/contrib/opensolaris/lib/libdtrace/common/mkerrtags.sh =================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/mkerrtags.sh (revision 364123) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/mkerrtags.sh (revision 364124) @@ -1,60 +1,57 @@ #!/bin/sh # # CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License, Version 1.0 only # (the "License"). You may not use this file except in compliance # with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions # and limitations under the License. # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file at usr/src/OPENSOLARIS.LICENSE. # If applicable, add the following below this CDDL HEADER, with the # fields enclosed by brackets "[]" replaced with your own identifying # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END # # # Copyright 2003 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -#ident "%Z%%M% %I% %E% SMI" set -e -BSDECHO=-e +printf "%s" " +/* + * Copyright 2003 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ -echo ${BSDECHO} "\ -/*\n\ - * Copyright 2003 Sun Microsystems, Inc. All rights reserved.\n\ - * Use is subject to license terms.\n\ - */\n\ -\n\ -#pragma ident\t\"%Z%%M%\t%I%\t%E% SMI\"\n\ -\n\ #include -\n\ -static const char *const _dt_errtags[] = {" +static const char *const _dt_errtags[] = { +" + pattern='^ \(D_[A-Z0-9_]*\),*' replace=' "\1",' sed -n "s/$pattern/$replace/p" || exit 1 -echo ${BSDECHO} "\ -};\n\ -\n\ -static const int _dt_ntag = sizeof (_dt_errtags) / sizeof (_dt_errtags[0]);\n\ -\n\ +printf "%s" " +}; + +static const int _dt_ntag = sizeof (_dt_errtags) / sizeof (_dt_errtags[0]); + const char * dt_errtag(dt_errtag_t tag) { return (_dt_errtags[(tag > 0 && tag < _dt_ntag) ? tag : 0]); -}" +} +" exit 0 Index: head/cddl/contrib/opensolaris/lib/libdtrace/common/mknames.sh =================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/mknames.sh (revision 364123) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/mknames.sh (revision 364124) @@ -1,56 +1,53 @@ #!/bin/sh # # CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License, Version 1.0 only # (the "License"). You may not use this file except in compliance # with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions # and limitations under the License. # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file at usr/src/OPENSOLARIS.LICENSE. # If applicable, add the following below this CDDL HEADER, with the # fields enclosed by brackets "[]" replaced with your own identifying # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END # # # Copyright 2005 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -#ident "%Z%%M% %I% %E% SMI" set -e -BSDECHO=-e +printf "%s" " +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ -echo ${BSDECHO} "\ -/*\n\ - * Copyright 2005 Sun Microsystems, Inc. All rights reserved.\n\ - * Use is subject to license terms.\n\ - */\n\ -\n\ -#pragma ident\t\"%Z%%M%\t%I%\t%E% SMI\"\n\ -\n\ -#include \n\ -\n\ +#include + /*ARGSUSED*/ -const char *\n\ -dtrace_subrstr(dtrace_hdl_t *dtp, int subr)\n\ -{\n\ - switch (subr) {" +const char * +dtrace_subrstr(dtrace_hdl_t *dtp, int subr) +{ + switch (subr) { +" nawk ' /^#define[ ]*DIF_SUBR_/ && $2 != "DIF_SUBR_MAX" { printf("\tcase %s: return (\"%s\");\n", $2, tolower(substr($2, 10))); }' -echo ${BSDECHO} "\ - default: return (\"unknown\");\n\ - }\n\ -}" +printf "%s" " + default: return (\"unknown\"); + } +} +" Index: head/cddl/contrib/opensolaris/lib/libdtrace/common/mksignal.sh =================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/mksignal.sh (revision 364123) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/mksignal.sh (revision 364124) @@ -1,41 +1,40 @@ #!/bin/sh # # CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License, Version 1.0 only # (the "License"). You may not use this file except in compliance # with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions # and limitations under the License. # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file at usr/src/OPENSOLARIS.LICENSE. # If applicable, add the following below this CDDL HEADER, with the # fields enclosed by brackets "[]" replaced with your own identifying # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END # # # Copyright 2003 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -#ident "%Z%%M% %I% %E% SMI" set -e -echo "\ -/*\n\ - * Copyright 2003 Sun Microsystems, Inc. All rights reserved.\n\ - * Use is subject to license terms.\n\ - */\n\ -\n\ -#pragma ident\t\"%Z%%M%\t%I%\t%E% SMI\"\n" +printf "%s" " +/* + * Copyright 2003 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +" pattern='^#define[ ]*_*\(SIG[A-Z0-9]*\)[ ]\{1,\}\([A-Z0-9]*\).*$' replace='inline int \1 = \2;@#pragma D binding "1.0" \1' sed -n "s/$pattern/$replace/p;/SIGRTMAX/q" | tr '@' '\n'