Home | History | Annotate | Download | only in lint.d
      1 #!/usr/bin/sh
      2 #
      3 # CDDL HEADER START
      4 #
      5 # The contents of this file are subject to the terms of the
      6 # Common Development and Distribution License, Version 1.0 only
      7 # (the "License").  You may not use this file except in compliance
      8 # with the License.
      9 #
     10 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
     11 # or http://www.opensolaris.org/os/licensing.
     12 # See the License for the specific language governing permissions
     13 # and limitations under the License.
     14 #
     15 # When distributing Covered Code, include this CDDL HEADER in each
     16 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
     17 # If applicable, add the following below this CDDL HEADER, with the
     18 # fields enclosed by brackets "[]" replaced with your own identifying
     19 # information: Portions Copyright [yyyy] [name of copyright owner]
     20 #
     21 # CDDL HEADER END
     22 #
     23 #
     24 # Copyright 1989 Sun Microsystems, Inc.  All rights reserved.
     25 # Use is subject to license terms.
     26 #
     27 
     28 #	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
     29 #	  All Rights Reserved
     30 
     31 # University Copyright- Copyright (c) 1982, 1986, 1988
     32 # The Regents of the University of California
     33 # All Rights Reserved
     34 #
     35 # University Acknowledgment- Portions of this document are derived from
     36 # software developed by the University of California, Berkeley, and its
     37 # contributors.
     38 
     39 #pragma ident	"%Z%%M%	%I%	%E% SMI"
     40 
     41 
     42 # lint command for BSD compatibility package:
     43 #
     44 #	BSD compatibility package header files (/usr/ucbinclude)
     45 #	are included before SVr4 default (/usr/include) files but 
     46 #       after any directories specified on the command line via 
     47 #	the -I option.  Thus, the BSD header files are included
     48 #	next to last, and SVr4 header files are searched last.
     49 #	
     50 #	BSD compatibility package libraries are searched first.
     51 #
     52 #	Because the BSD compatibility package C lint library does not 
     53 #	contain all the C library routines of /usr/ccs/lib/llib-lc, 
     54 #	the BSD package C library is named /usr/ucblib/llib-lucb
     55 #	and is passed explicitly to lint.  This ensures that llib-lucb
     56 #	will be searched first for routines and that 
     57 #	/usr/ccs/lib/llib-lc will be searched afterwards for routines 
     58 #	not found in /usr/ucblib/llib-lucb.  Also because sockets is    
     59 #       provided in libc under BSD, /usr/lib/llib-lsocket and 
     60 #	/usr/lib/llib-lnsl are also included as default libraries.
     61 #	
     62 #	Note: Lint does not allow you to reset the search PATH for
     63 # 	libraries. The following uses the -L option to point to
     64 #	/usr/ucblib. There are however some combinations of options
     65 #	specified by the user that could overrule the intended path.
     66 #
     67 
     68 if [ -f /usr/ccs/bin/ucblint ]
     69 then
     70 	/usr/ccs/bin/ucblint -L/usr/ucblib -Xs "$@" -I/usr/ucbinclude \
     71 	-L/usr/ucblib -lucb -lsocket -lnsl -lelf
     72 	ret=$?
     73 	exit $ret
     74 else
     75 	echo "/usr/ucb/lint:  language optional software not installed"
     76 	exit 1
     77 fi
     78