]> git.donarmstrong.com Git - lilypond.git/commitdiff
patch::: 1.3.90.jcn1
authorJan Nieuwenhuizen <janneke@gnu.org>
Mon, 25 Sep 2000 08:27:50 +0000 (10:27 +0200)
committerJan Nieuwenhuizen <janneke@gnu.org>
Mon, 25 Sep 2000 08:27:50 +0000 (10:27 +0200)
1.3.90.jcn1
===========

* Use S_ISDIR () and check for stat.h.

CHANGES
VERSION
config.hh.in
configure.in
flower/file-path.cc

diff --git a/CHANGES b/CHANGES
index dc84c63d28bca0da45d57da9cefd361b765562c3..1ebf8ec8e8621c5c1beefcd0cbbfd214e018e0cb 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,8 @@
+1.3.90.jcn1
+===========
+
+* Use S_ISDIR () and check for stat.h.
+
 1.3.89.jcn1
 ===========
 
diff --git a/VERSION b/VERSION
index ce0904ffd5f55d94b10839cf29775ee0ea3b8b57..2df89940ae6ea2de210cfdb1def5fddab9f17340 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -2,7 +2,7 @@ PACKAGE_NAME=LilyPond
 MAJOR_VERSION=1
 MINOR_VERSION=3
 PATCH_LEVEL=90
-MY_PATCH_LEVEL=
+MY_PATCH_LEVEL=jcn1
 
 # use the above to send patches: MY_PATCH_LEVEL is always empty for a
 # released version.
index a24a0584cd60f7af9c4ccac925580c74e3f4a11e..be0e04a8f7f6924548bc0d5a0c28c707cc0be6d7 100644 (file)
 #define PATHSEP '@PATHSEP@'
 
 /* define if you have assert */
-#define HAVE_ASSERT_H 1
+#define HAVE_ASSERT_H 0
+
+/* define if you have sys/stat.h */
+#define HAVE_SYS_STAT_H 0
+
+/* define if you have sys/stat.h */
+#define STAT_MACROS_BROKEN 0
index f19b156e364cd12323e6e48500fa3824e86937e2..aa3f16f08f51dc0d967ac316fbac7d82375225cc 100644 (file)
@@ -14,7 +14,8 @@ AC_CONFIG_SUBDIRS(stepmake)
 # Uncomment the configuration options your package needs.
 AC_STEPMAKE_COMPILE
 # AC_HAVE_HEADERS(limits.h malloc.h string.h unistd.h values.h)
-AC_HAVE_HEADERS(assert.h)
+AC_HAVE_HEADERS(assert.h sys/stat.h)
+AC_HEADER_STAT
 
 printing_b=no
 AC_ARG_ENABLE(printing,
index 501554ea656580ef87c357412fa29bd5ad406dea..80c34db4c1701eb9e7dec6dbe065cdece72e9688 100644 (file)
@@ -2,12 +2,13 @@
    path.cc - manipulation of paths and filenames.
 */
 
-
+#include "config.h"
 #include <stdio.h>
 #include <errno.h>
+#if HAVE_SYS_STAT_H 
 #include <sys/stat.h>
+#endif
 
-#include "config.h"
 #include "file-path.hh"
 #include "flower-debug.hh"
 
@@ -102,6 +103,7 @@ File_path::find (String nm) const
 
       DEBUG_OUT << path << "? ";
 
+#if 0
       /*
        Check if directory. TODO: encapsulate for autoconf
        */
@@ -111,6 +113,15 @@ File_path::find (String nm) const
       
       if (!(sbuf.st_mode & __S_IFREG))
        continue;
+#endif
+#if !STAT_MACROS_BROKEN
+      struct stat sbuf;
+      if (stat (path.ch_C (), &sbuf) == ENOENT)
+       continue;
+      
+      if (S_ISDIR (sbuf.st_mode))
+       continue;
+#endif
 
       FILE *f = fopen (path.ch_C(), "r"); // ugh!
       if (f)
@@ -125,7 +136,7 @@ File_path::find (String nm) const
 }
 
 /**
-   Add an directory, return false if failed
+   Add a directory, return false if failed
  */
 bool
 File_path::try_add (String s)