Source: astyle Version: 3.1-2 Severity: important Tags: patch User: debian-h...@lists.debian.org Usertags: hurd Control: forwarded -1 https://sourceforge.net/p/astyle/bugs/549/ Control: block -1 by 995612
Hi, currently astyle cannot be built on hurd-i386. The first issue is the unconditional requirement of Java, which is not available/ported on Hurd; this was reported as #995612, as it does not affect only Hurd. The second issue, specific to Hurd, is the unconditional usage of PATH_MAX; I reported the issue upstream with a patch [1]; however, given that the project is basically no more developed further [2], then I'm attaching it here as well, since apparently it will be needed as Debian patch... [1] https://sourceforge.net/p/astyle/bugs/549/ [2] https://sourceforge.net/p/astyle/bugs/548/ Thanks, -- Pino
Author: Pino Toscano <toscano.p...@tiscali.it> Description: Use modern realpath() to avoid PATH_MAX Last-Update: 2021-10-03 Forwarded: https://sourceforge.net/p/astyle/bugs/549/ --- a/src/astyle_main.cpp +++ b/src/astyle_main.cpp @@ -1379,13 +1379,12 @@ // Return the full path name or an empty string if failed. string ASConsole::getFullPathName(const string& relativePath) const { - // ignore realPath attribute warning -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wunused-result" - char fullPath[PATH_MAX]; - realpath(relativePath.c_str(), fullPath); - return fullPath; -#pragma GCC diagnostic pop + char *fullPath = realpath(relativePath.c_str(), nullptr); + if (fullPath == nullptr) + return string(); + const string p(fullPath); + free(fullPath); + return p; } /**