From: Nicholas Clark Date: Tue, 10 Apr 2007 18:30:04 +0000 (+0000) Subject: Make the don't-use-nm symbol table probes work under C++. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=328aef96c192c44093e580ff7a2614137052ba36;p=p5sagit%2Fp5-mst-13.2.git Make the don't-use-nm symbol table probes work under C++. p4raw-id: //depot/perl@30897 --- diff --git a/Configure b/Configure index dd3cd92..b317e44 100755 --- a/Configure +++ b/Configure @@ -7582,18 +7582,21 @@ true-*) tx=no; eval "tval=\$$4"; case "$tval" in "") tx=yes;; esac;; esac; case "$tx" in yes) + case "$d_cplusplus" in + $define) extern_C=\"C\";; + esac; tval=false; if $test "$runnm" = true; then if $contains $tlook $tf >/dev/null 2>&1; then tval=true; elif $test "$mistrustnm" = compile -o "$mistrustnm" = run; then - echo "void *(*(p()))$tdc { extern void *$1$tdc; return &$1; } int main() { if(p()) return(0); else return(1); }"> try.c; + echo "extern $extern_C void *$1$tdc; void *(*(p()))$tdc { return &$1; } int main() { if(p()) return(0); else return(1); }"> try.c; $cc -o try $optimize $ccflags $ldflags try.c >/dev/null 2>&1 $libs && tval=true; $test "$mistrustnm" = run -a -x try && { $run ./try$_exe >/dev/null 2>&1 || tval=false; }; $rm -f try$_exe try.c core core.* try.core; fi; else - echo "void *(*(p()))$tdc { extern void *$1$tdc; return &$1; } int main() { if(p()) return(0); else return(1); }"> try.c; + echo "extern $extern_C void *$1$tdc; void *(*(p()))$tdc { return &$1; } int main() { if(p()) return(0); else return(1); }"> try.c; $cc -o try $optimize $ccflags $ldflags try.c $libs >/dev/null 2>&1 && tval=true; $rm -f try$_exe try.c; fi;