Discussion:
com gtk/php-gtk: fix in the generator for compiling on macos. slightly cheeky, but working for now.: generator/lineoutput.php
David Soria Parra
2010-06-25 18:23:51 UTC
Permalink
Commit: 95d70abd4450ee0cac2c93a1767ace78c95eb08a
Author: Bob Majdak Jr <***@php.net> Fri, 25 Jun 2010 18:23:51 +0000
Parents: a1906b24f0680471c92cbd88dd1721c3726d43b8
Branches: master

Link: http://git.php.net/?p=gtk/php-gtk.git;a=commitdiff;h=95d70abd4450ee0cac2c93a1767ace78c95eb08a

Log:
fix in the generator for compiling on macos. slightly cheeky, but working for now.

Changed paths:
M generator/lineoutput.php


Diff:
95d70abd4450ee0cac2c93a1767ace78c95eb08a
diff --git a/generator/lineoutput.php b/generator/lineoutput.php
index 3829fc7..6e3f30d 100644
--- a/generator/lineoutput.php
+++ b/generator/lineoutput.php
@@ -69,7 +69,17 @@ class LineOutput {
}
$filename = substr($this->filename, 0, -2) . $string . '.c';
$files .= ' ' . basename($filename);
- file_put_contents($filename, $this->header . $this->body[$id]);
+
+ $header = $this->header;
+
+ // this is a cheeky fix for the link sysem failing on MacOS when these
+ // files get broken into multiple files.
+ // bob - 20100625
+ if(PHP_OS == "Darwin" && $id > 0) {
+ $header = preg_replace('/^PHP_GTK_EXPORT_CE\(.+?\);$/ms','',$header);
+ }
+
+ file_put_contents($filename, $header . $this->body[$id]);
}
file_put_contents('php://stdout', $files, FILE_APPEND);
}
--
PHP-GTK CVS Mailing List (http://gtk.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Loading...