1 Description: Hurd build without PATH_MAX; currently broken
2 Forwarded: http://lists.gnu.org/archive/html/bug-lilypond/2017-01/msg00023.html
3 Origin: vendor, https://bugs.debian.org/cgi-bin/bugreport.cgi?att=1;bug=761036;filename=hurd_file_name_support;msg=5
4 Bug-Debian: https://bugs.debian.org/761036
5 Author: Don Armstrong <don@debian.org>
6 Author: Petter Reinholdtsen <pere@hungry.com>
7 Reviewed-by: Dr. Tobias Quathamer <toddy@debian.org>
8 Reviewed-by: Anthony Fok <foka@debian.org>
9 Last-Update: 2017-01-27
10 --- a/flower/file-name.cc
11 +++ b/flower/file-name.cc
14 get_working_directory ()
17 + char *cwd = get_current_dir_name();
23 // getcwd returns NULL upon a failure, contents of cwd would be undefined!
24 return string (getcwd (cwd, PATH_MAX));
28 /* Join components to full file_name. */
29 --- a/flower/test-file-path.cc
30 +++ b/flower/test-file-path.cc
36 +get_working_directory ()
39 + char *cwd = get_current_dir_name();
45 + // getcwd returns NULL upon a failure, contents of cwd would be undefined!
46 + return string (getcwd (cwd, PATH_MAX));
50 TEST (File_path, Find)
52 char const *extensions[] = {"ly", "", 0};
55 - if (!getcwd (cwd, PATH_MAX))
56 + if (get_working_directory().empty())
58 cerr << "Could not get current work directory\n";