momo            Wed Mar 19 03:57:56 2003 EDT

  Modified files:              
    /phpdoc/scripts     file-entities.php.in 
  Log:
  fix for cygwin php binary
  
Index: phpdoc/scripts/file-entities.php.in
diff -u phpdoc/scripts/file-entities.php.in:1.7 phpdoc/scripts/file-entities.php.in:1.8
--- phpdoc/scripts/file-entities.php.in:1.7     Thu Dec 26 15:26:00 2002
+++ phpdoc/scripts/file-entities.php.in Wed Mar 19 03:57:56 2003
@@ -17,7 +17,7 @@
 # |             Gabor Hojtsy <[EMAIL PROTECTED]>                              |
 # +----------------------------------------------------------------------+
 # 
-# $Id: file-entities.php.in,v 1.7 2002/12/26 20:26:00 goba Exp $
+# $Id: file-entities.php.in,v 1.8 2003/03/19 08:57:56 momo Exp $
 */
 
 /**
@@ -50,10 +50,22 @@
 // XSL sheets are used or not (either "yes" or "no")
 $xsl_sheet_used = ("@DOCBOOKXSL_USED@" == "yes" ? TRUE : FALSE);
 
+// when php complied on cygwin, the working path have to be /cygdrive..
+// the below preg_replace have to be done only using binary php  complied on MSVC:
+ob_start();
+phpinfo(1);
+$tmp = ob_get_contents();
+ob_end_clean();
+$cygwin_complied = eregi("CYGWIN",$tmp) ? true : false;
+
+$ppath = $cygwin_complied 
+       ? "@WORKDIR@"
+       : preg_replace("!^/cygdrive/(\\w)/!", "\\1:/", "@WORKDIR@");
+
 // The output directory, which we need to parse for windows specific
-// things, special cygwin path notation, and correct all problems is
-// needed. Also use absolute path to have meaningful error messages
-$out_dir = abs_path(preg_replace("!^/cygdrive/(\\w)/!", "\\1:/", "@WORKDIR@"));
+// things, and correct all problems is needed.
+// Also use absolute path to have meaningful error messages
+$out_dir = abs_path($ppath);
 
 // The source directory is passed in the 5th argument counting from backwards.
 $srcdir = abs_path("@SRCDIR@");



-- 
PHP Documentation Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to