e372a321805939a0d5bc4eb776cc2a874800ed56Kohei Tamura# CDDL HEADER START
e372a321805939a0d5bc4eb776cc2a874800ed56Kohei Tamura# The contents of this file are subject to the terms of the
e372a321805939a0d5bc4eb776cc2a874800ed56Kohei Tamura# Common Development and Distribution License (the "License").
e372a321805939a0d5bc4eb776cc2a874800ed56Kohei Tamura# You may not use this file except in compliance with the License.
e372a321805939a0d5bc4eb776cc2a874800ed56Kohei Tamura# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
e372a321805939a0d5bc4eb776cc2a874800ed56Kohei Tamura# See the License for the specific language governing permissions
e372a321805939a0d5bc4eb776cc2a874800ed56Kohei Tamura# and limitations under the License.
e372a321805939a0d5bc4eb776cc2a874800ed56Kohei Tamura# When distributing Covered Code, include this CDDL HEADER in each
e372a321805939a0d5bc4eb776cc2a874800ed56Kohei Tamura# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
e372a321805939a0d5bc4eb776cc2a874800ed56Kohei Tamura# If applicable, add the following below this CDDL HEADER, with the
e372a321805939a0d5bc4eb776cc2a874800ed56Kohei Tamura# fields enclosed by brackets "[]" replaced with your own identifying
e372a321805939a0d5bc4eb776cc2a874800ed56Kohei Tamura# information: Portions Copyright [yyyy] [name of copyright owner]
e372a321805939a0d5bc4eb776cc2a874800ed56Kohei Tamura# CDDL HEADER END
e372a321805939a0d5bc4eb776cc2a874800ed56Kohei Tamura# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
e372a321805939a0d5bc4eb776cc2a874800ed56Kohei Tamura# Use is subject to license terms.
e372a321805939a0d5bc4eb776cc2a874800ed56Kohei Tamura# ident "%Z%%M% %I% %E% SMI"
e372a321805939a0d5bc4eb776cc2a874800ed56Kohei Tamura# Fake up a scenario where _DTRACE_VERSION is not defined by having our own
e372a321805939a0d5bc4eb776cc2a874800ed56Kohei Tamura# <unistd.h>. This tests that dtrace -h will produce a header file which can
e372a321805939a0d5bc4eb776cc2a874800ed56Kohei Tamura# be used on a system where DTrace is not present.
e372a321805939a0d5bc4eb776cc2a874800ed56Kohei Tamuraif [ $# != 1 ]; then
e372a321805939a0d5bc4eb776cc2a874800ed56Kohei Tamuraprovider test_prov {
e372a321805939a0d5bc4eb776cc2a874800ed56Kohei Tamura#include "prov.h"
ed628708ce1ab7fbcb9a5c9b2d466eafc110f3b3Kohei Tamuramain(int argc, char **argv)
e372a321805939a0d5bc4eb776cc2a874800ed56Kohei Tamura TEST_PROV_GO();
e372a321805939a0d5bc4eb776cc2a874800ed56Kohei Tamura if (TEST_PROV_GO_ENABLED()) {
e372a321805939a0d5bc4eb776cc2a874800ed56Kohei Tamura TEST_PROV_GO();
status=$?
exit $status