17c478bd9Sstevel@tonic-gate#! /bin/sh 27c478bd9Sstevel@tonic-gate# 37c478bd9Sstevel@tonic-gate# CDDL HEADER START 47c478bd9Sstevel@tonic-gate# 57c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the 67c478bd9Sstevel@tonic-gate# Common Development and Distribution License, Version 1.0 only 77c478bd9Sstevel@tonic-gate# (the "License"). You may not use this file except in compliance 87c478bd9Sstevel@tonic-gate# with the License. 97c478bd9Sstevel@tonic-gate# 107c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 117c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing. 127c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions 137c478bd9Sstevel@tonic-gate# and limitations under the License. 147c478bd9Sstevel@tonic-gate# 157c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each 167c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 177c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the 187c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying 197c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner] 207c478bd9Sstevel@tonic-gate# 217c478bd9Sstevel@tonic-gate# CDDL HEADER END 227c478bd9Sstevel@tonic-gate# 23*78b6ed60Scraigm 247c478bd9Sstevel@tonic-gate# 25*78b6ed60Scraigm# Copyright 2005 Sun Microsystems, Inc. All rights reserved. 26*78b6ed60Scraigm# Use is subject to license terms. 27*78b6ed60Scraigm# 28*78b6ed60Scraigm 297c478bd9Sstevel@tonic-gate#ident "%Z%%M% %I% %E% SMI" 30*78b6ed60Scraigm 317c478bd9Sstevel@tonic-gate# Stub library for programmer's interface to libsys. Used to satisfy ld(1) 327c478bd9Sstevel@tonic-gate# processing, and serves as a precedence place-holder at execution-time. 337c478bd9Sstevel@tonic-gate 347c478bd9Sstevel@tonic-gateawk ' 357c478bd9Sstevel@tonic-gate/.*/ { 367c478bd9Sstevel@tonic-gate if ($2 == "1") { 377c478bd9Sstevel@tonic-gate printf("#pragma weak %s = _%s\n", $3, $3); 387c478bd9Sstevel@tonic-gate flag = "_"; 397c478bd9Sstevel@tonic-gate } else 407c478bd9Sstevel@tonic-gate flag = ""; 417c478bd9Sstevel@tonic-gate if ($1 == "f") { 427c478bd9Sstevel@tonic-gate printf("void *\n%s%s()\n{\n", flag, $3); 43*78b6ed60Scraigm printf("\t/*NOTREACHED*/\n\treturn (0);\n}\n\n"); 447c478bd9Sstevel@tonic-gate } else { 457c478bd9Sstevel@tonic-gate if ($4 == "1") 467c478bd9Sstevel@tonic-gate printf("%s %s%s %s %s\n\n", $5, flag, $3, $6, $7); 477c478bd9Sstevel@tonic-gate else if ($4 == "2") 487c478bd9Sstevel@tonic-gate printf("%s %s %s%s %s %s\n\n", $5, $6, flag, $3, $7, $8); 497c478bd9Sstevel@tonic-gate else if ($4 == "3") 507c478bd9Sstevel@tonic-gate printf("%s %s %s%s%s %s %s %s\n\n", $5, $6, flag, $3, $7, $8, $9, $10); 517c478bd9Sstevel@tonic-gate } 527c478bd9Sstevel@tonic-gate} 537c478bd9Sstevel@tonic-gate' libsys.list > libsys.c 54