12633Sahl#!/bin/ksh 22633Sahl 32633Sahl# 42633Sahl# CDDL HEADER START 52633Sahl# 62633Sahl# The contents of this file are subject to the terms of the 72633Sahl# Common Development and Distribution License (the "License"). 82633Sahl# You may not use this file except in compliance with the License. 92633Sahl# 102633Sahl# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 112633Sahl# or http://www.opensolaris.org/os/licensing. 122633Sahl# See the License for the specific language governing permissions 132633Sahl# and limitations under the License. 142633Sahl# 152633Sahl# When distributing Covered Code, include this CDDL HEADER in each 162633Sahl# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 172633Sahl# If applicable, add the following below this CDDL HEADER, with the 182633Sahl# fields enclosed by brackets "[]" replaced with your own identifying 192633Sahl# information: Portions Copyright [yyyy] [name of copyright owner] 202633Sahl# 212633Sahl# CDDL HEADER END 222633Sahl# 232633Sahl 242633Sahl# 252633Sahl# Copyright 2006 Sun Microsystems, Inc. All rights reserved. 262633Sahl# Use is subject to license terms. 272633Sahl# 282633Sahl 292633Sahl#ident "%Z%%M% %I% %E% SMI" 302633Sahl 312633Sahl## 322633Sahl# 332633Sahl# ASSERTION: 342633Sahl# If the -64 option is specified, dtrace will force the D compiler to 352633Sahl# compile a program using the 64-bit data model. 362633Sahl# 372633Sahl# SECTION: dtrace Utility/-64 Option 382633Sahl# 392633Sahl## 402633Sahl 412633Sahlscript() 422633Sahl{ 432633Sahl $dtrace -64 -s /dev/stdin <<EOF 442633Sahl BEGIN 452633Sahl /8 != sizeof(long)/ 462633Sahl { 472633Sahl printf("Not targeted for 64 bit machine\n"); 482633Sahl exit(1); 492633Sahl } 502633Sahl 512633Sahl BEGIN 522633Sahl /8 == sizeof(long)/ 532633Sahl { 542633Sahl printf("Targeted for 64 bit machine\n"); 552633Sahl exit(0); 562633Sahl } 572633SahlEOF 582633Sahl} 592633Sahl 60*2804Stomeeif [ $# != 1 ]; then 61*2804Stomee echo expected one argument: '<'dtrace-path'>' 62*2804Stomee exit 2 63*2804Stomeefi 64*2804Stomee 65*2804Stomeedtrace=$1 662633Sahl 672633Sahlscript 682633Sahlstatus=$? 692633Sahl 702633Sahlif [ "$status" -ne 0 ]; then 712633Sahl echo $tst: dtrace failed 722633Sahlfi 732633Sahl 742633Sahlexit $status 75