diff options
author | Tony Cook <tony@develop-help.com> | 2011-07-20 20:23:15 +1000 |
---|---|---|
committer | Tony Cook <tony@develop-help.com> | 2011-08-09 19:03:20 +1000 |
commit | 12b81ca50a3ad3c06c786138add2f964cf24acb6 (patch) | |
tree | 8067e05f4af824241fd4781c7408f56d760bfe05 /Makefile.SH | |
parent | 2186be13a01ba687b2fe25f0d5c898031257c2b5 (diff) | |
download | perl-12b81ca50a3ad3c06c786138add2f964cf24acb6.tar.gz |
work around a bug in dtrace - it strips const from function parameters
With usedtrace this caused:
- build failures under g++ (OS X)
- const qualification warnings with gcc (OS X)
The workaround simply adds const to char * parameters if not already
present.
The bug in dtrace was apparently reported to Sun in 2006:
http://opensolaris.org/jive/thread.jspa?threadID=53810
Mozilla ran into the same problem:
https://bugzilla.mozilla.org/show_bug.cgi?id=593483
Diffstat (limited to 'Makefile.SH')
-rwxr-xr-x | Makefile.SH | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Makefile.SH b/Makefile.SH index 714d78c202..b1045624d9 100755 --- a/Makefile.SH +++ b/Makefile.SH @@ -749,8 +749,11 @@ else case "$dtrace_h" in ?*) $spitshell >>$Makefile <<'!NO!SUBS!' +# dtrace dicards const qualifiers from arguments, put them back $(DTRACE_H): perldtrace.d - $(DTRACE) -h -s perldtrace.d -o $(DTRACE_H) + $(DTRACE) -h -s perldtrace.d -o $(DTRACE_H).in + sed -e '/const/!s/char \*/const char */g' $(DTRACE_H).in >$(DTRACE_H) + $(RMS) $(DTRACE_H).in mydtrace.h: $(DTRACE_H) |