]> git.donarmstrong.com Git - lilypond.git/blobdiff - flower/file-name.cc
Merge tag 'upstream/2.18.0' into debian-experimental
[lilypond.git] / flower / file-name.cc
index 1746c2c28d84adc5cbe8cd19f5e8d431dec10383..0ff89b8d874fb32f6f189470eb3c596c6cfd22f8 100644 (file)
@@ -96,9 +96,13 @@ dir_name (const string &file_name)
 string
 get_working_directory ()
 {
+#ifdef _GNU_SOURCE_
+  return string (get_current_dir_name());
+#else
   char cwd[PATH_MAX];
   // getcwd returns NULL upon a failure, contents of cwd would be undefined!
   return string (getcwd (cwd, PATH_MAX));
+#endif
 }
 
 /* Join components to full file_name. */