Print this page
XXX Remove nawk(1)


   6 # Common Development and Distribution License (the "License").
   7 # You may not use this file except in compliance with the License.
   8 #
   9 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  10 # or http://www.opensolaris.org/os/licensing.
  11 # See the License for the specific language governing permissions
  12 # and limitations under the License.
  13 #
  14 # When distributing Covered Code, include this CDDL HEADER in each
  15 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  16 # If applicable, add the following below this CDDL HEADER, with the
  17 # fields enclosed by brackets "[]" replaced with your own identifying
  18 # information: Portions Copyright [yyyy] [name of copyright owner]
  19 #
  20 # CDDL HEADER END
  21 #
  22 #
  23 # Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
  24 # Use is subject to license terms.
  25 #
  26 #ident  "%Z%%M% %I%     %E% SMI"
  27 #
  28 
  29 #
  30 # Create dummy functions for each of the functions in the module API.  We can
  31 # then link a module against an object file created from the output of this
  32 # script to determine whether or not that module restricts itself to the API.
  33 # If the module uses functions outside of the module API, then it cannot be
  34 # used as a kmdb module.
  35 #
  36 nawk '
  37         /^[     ]*global:[      ]*$/ {
  38                 printing = 1;
  39                 next;
  40         }
  41 
  42         /^[     ]*local:[       ]*$/ {
  43                 printing = 0;
  44                 next;
  45         }
  46 
  47         # Skip blank lines and comments
  48         /^$/ { next; }
  49         /^[     ]*#/ { next;}
  50 
  51         # Print globals only
  52         printing == 0 { next; }
  53 
  54         # Symbols beginning with "kmdb_" are not in the module API - they are
  55         # private to kmdb.
  56         $1 ~ /^kmdb_/ { next; }




   6 # Common Development and Distribution License (the "License").
   7 # You may not use this file except in compliance with the License.
   8 #
   9 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  10 # or http://www.opensolaris.org/os/licensing.
  11 # See the License for the specific language governing permissions
  12 # and limitations under the License.
  13 #
  14 # When distributing Covered Code, include this CDDL HEADER in each
  15 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  16 # If applicable, add the following below this CDDL HEADER, with the
  17 # fields enclosed by brackets "[]" replaced with your own identifying
  18 # information: Portions Copyright [yyyy] [name of copyright owner]
  19 #
  20 # CDDL HEADER END
  21 #
  22 #
  23 # Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
  24 # Use is subject to license terms.
  25 #


  26 
  27 #
  28 # Create dummy functions for each of the functions in the module API.  We can
  29 # then link a module against an object file created from the output of this
  30 # script to determine whether or not that module restricts itself to the API.
  31 # If the module uses functions outside of the module API, then it cannot be
  32 # used as a kmdb module.
  33 #
  34 /usr/xpg4/bin/awk '
  35         /^[     ]*global:[      ]*$/ {
  36                 printing = 1;
  37                 next;
  38         }
  39 
  40         /^[     ]*local:[       ]*$/ {
  41                 printing = 0;
  42                 next;
  43         }
  44 
  45         # Skip blank lines and comments
  46         /^$/ { next; }
  47         /^[     ]*#/ { next;}
  48 
  49         # Print globals only
  50         printing == 0 { next; }
  51 
  52         # Symbols beginning with "kmdb_" are not in the module API - they are
  53         # private to kmdb.
  54         $1 ~ /^kmdb_/ { next; }