Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(21)

Issue 320360043: Issue 5077: Fix build failure on GNU Hurd

Can't Edit
Can't Publish+Mail
Start Review
Created:
3 months, 2 weeks ago by trueroad
Modified:
3 months, 1 week ago
Reviewers:
lemzwerg
CC:
lilypond-devel_gnu.org
Visibility:
Public.

Description

Issue 5077/2: Improve portability of get_working_directory() We used `getcwd()` with `PATH_MAX` to get the current directory. However, `PATH_MAX` does not exist in environments such as GNU Hurd. Debian developers avoided `PATH_MAX` by using `get_current_dir_name()` instead of `getcwd()`. It needed to protected with `#ifdef _GNU_SOURCE` since `get_current_dir_name()` is glibc specific. So `PATH_MAX` was still required in non-glibc environments. There is a `getcwd()` extention that can avoid `PATH_MAX` by setting the first argument to NULL. The extension can be used in many environments, including glibc, but POSIX does not recommend it in conforming applications. This commit improves portability by obtaining the current directory with a method conforming to the standard. Issue 5077/1: Fix build failure on GNU Hurd LilyPond failed to build on GNU Hurd because Hurd does not have PATH_MAX. This commit is based on the following patch by Debian. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=761036 However, the patch raises an error on `make check`. This commit has been fixed so that the error does not raise.

Patch Set 1 : From Debian #

Patch Set 2 : Fix `make check` #

Patch Set 3 : Improve portability #

Unified diffs Side-by-side diffs Delta from patch set Stats (+17 lines, -5 lines) Patch
M flower/file-name.cc View 1 2 1 chunk +15 lines, -3 lines 0 comments Download
M flower/test-file-path.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 4
trueroad
Fix `make check`
3 months, 2 weeks ago (2017-03-11 11:59:40 UTC) #1
trueroad
Improbe portability
3 months, 2 weeks ago (2017-03-11 12:01:56 UTC) #2
lemzwerg
LGTM
3 months, 2 weeks ago (2017-03-11 12:15:07 UTC) #3
trueroad
3 months, 1 week ago (2017-03-19 14:52:37 UTC) #4
I've pushed to staging.

commit 9fd7a4d08b6414ce4b5b130316b688f36c6a6265
Issue 5077/2: Improve portability of get_working_directory()

commit e632a63b594206ed96f34f75b813411857af6a49
Issue 5077/1: Fix build failure on GNU Hurd
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld 80a51fa-tainted