]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/kpath.cc
* scm/define-grob-properties.scm: remove 'type
[lilypond.git] / lily / kpath.cc
index c1d2bffaa0aae38e2bb888e1f2c9e630a8b6d9d7..3516e61318f062ecf99cdaf1ba8def46525fff84 100644 (file)
@@ -3,12 +3,24 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 2000--2002 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c) 2000--2003 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #include <stdio.h>
 #include <string.h>
 
+/*
+
+The problem, as far as I can tell, is that MacOS X has its getopt
+prototype in <unistd.h>, while I think other operating systems have it
+in other places. <unistd.h> is included by kpathsea.h, so you end up
+renaming both conflicting prototypes to YAKLUDGE.
+
+I found a somewhat more elegant patch for this: Just #include
+<unistd.h> before defining YAKLUDGE.
+
+*/
+#include <unistd.h>    
 #include "config.h"
 
 #define popen REALLYUGLYKLUDGE
@@ -26,7 +38,6 @@ extern "C" {
 #include "string.hh"
 #include "main.hh"
 #include "kpath.hh"
-#include "lily-version.hh"
 #include "warn.hh"
 
 String
@@ -55,7 +66,7 @@ ly_find_tfm (char const * name)
 {
   String p = global_path.find (String (name) + ".tfm");
 
-  if (p.length_i ())
+  if (p.length ())
     return p;
   
 #if (KPATHSEA && HAVE_KPSE_FIND_FILE)