# New Ticket Created by Andreas Rottmann # Please include the string: [perl #52616] # in the subject line of all future correspondence about this issue. # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=52616 >
The attached patch fixes some portability problems in the Eclectus codebase.
Several small fixes to increase portability. From: Andreas Rottmann <[EMAIL PROTECTED]> --- languages/eclectus/compiler.scm | 2 +- languages/eclectus/tests-driver.scm | 15 +++++++++------ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/languages/eclectus/compiler.scm b/languages/eclectus/compiler.scm index e7eeb85..0ca9778 100644 --- a/languages/eclectus/compiler.scm +++ b/languages/eclectus/compiler.scm @@ -518,7 +518,7 @@ (emit " .local pmc reg_~a reg_~a = new '~a' - " uid uid (car past)) + " uid uid (symbol->string (car past))) (for-each (lambda (daughter) (if (eq? '@ (car daughter)) diff --git a/languages/eclectus/tests-driver.scm b/languages/eclectus/tests-driver.scm index b42837e..a551c35 100644 --- a/languages/eclectus/tests-driver.scm +++ b/languages/eclectus/tests-driver.scm @@ -60,7 +60,7 @@ ; TODO: can I use (directory-separator) in petite? (define *path-to-parrot* - (if (zero? (system "perl -e \"exit($^O eq q{MSWin32} ? 1 : 0)\"")) + (if (zero? (system "perl -e 'exit($^O eq q{MSWin32} ? 1 : 0)'")) "../../parrot" "..\\..\\parrot")) @@ -79,15 +79,18 @@ (let f () (let ((c (read-char))) (cond - ((eof-object? c) (void)) - (else (display c) (f)))))))))) + ((not (eof-object? c)) + (display c) + (f)))))))))) (define (test-with-string-output test-id expr expected-output test-name) (run-compile expr) (execute) - (if (string=? expected-output (get-string)) - (pass ( + test-id 1 ) (format #f "~a: ~a" test-name expr)) - (fail ( + test-id 1 ) (format #f "~a: expected ~s, got ~a" test-name expr (get-string) )))) + (let ((actual-output (get-string))) + (if (string=? expected-output actual-output) + (pass ( + test-id 1 ) (format #f "~a: ~a" test-name expr)) + (fail ( + test-id 1 ) (format #f "~a: expected ~s, got ~s" + test-name expected-output actual-output))))) (define (emit . args) (apply fprintf (compile-port) args)
Regards, Rotty -- Andreas Rottmann | [EMAIL PROTECTED] | [EMAIL PROTECTED] | [EMAIL PROTECTED] http://rotty.uttx.net | GnuPG Key: http://rotty.uttx.net/gpg.asc Fingerprint | C38A 39C5 16D7 B69F 33A3 6993 22C8 27F7 35A9 92E7 v2sw7MYChw5pr5OFma7u7Lw2m5g/l7Di6e6t5BSb7en6g3/5HZa2Xs6MSr1/2p7 hackerkey.com To iterate is human; to recurse, divine.