Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] View of /config/trunk/chk-global-names.sh
ViewVC logotype

View of /config/trunk/chk-global-names.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2 - (download) (as text) (annotate)
Sat Oct 4 23:33:09 1997 UTC (21 years, 11 months ago) by monnier
Original Path: sml/trunk/config/chk-global-names.sh
File size: 474 byte(s)
Initial revision
#!/bin/sh
#
# COPYRIGHT (c) 1995 AT&T Bell Laboratories.
#
# Check to see if "_" is prepended to global names in the symbol table.
#

CC=${CC:-cc}

TMP_FILE=/tmp/smlConfig-$$
TMP_FILE_C=$TMP_FILE.c

cat > $TMP_FILE_C <<XXXX
main () {}
XXXX

$CC -c -o $TMP_FILE $TMP_FILE_C
if [ "$?" != "0" ]; then
    rm -f $TMP_FILE $TMP_FILE_C
    exit 1
fi

if `nm $TMP_FILE | grep -q "_main"`
  then echo "-DGLOBALS_HAVE_UNDERSCORE"
fi             

rm -f $TMP_FILE $TMP_FILE_C

exit 0

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0