On Sat, 23 Oct 2021, Svante Signell wrote: > > However, since you asked, PATH_MAX is set to 2048 in pidof.
This is twice as long as needed on all other systems, and possibly too short on the Hurd. > > Using get_current_dir_name() is not a valid way to do it as it is not > > portable across C libraries. That’s what you have autoconf for. The Hurd always uses glibc because that’s part of the OS, instead of just a syscall wrapper like on Unix-like operating systems. > Well getcwd (NULL, 0) is supported by all glibc-based distributions. So is get_current_dir_name(). > This is an extension of POSIX.1-2001, see man getcwd. But much harder to test for than just a compile-time check for function existence. bye, //mirabilos -- Infrastrukturexperte • tarent solutions GmbH Am Dickobskreuz 10, D-53121 Bonn • http://www.tarent.de/ Telephon +49 228 54881-393 • Fax: +49 228 54881-235 HRB AG Bonn 5168 • USt-ID (VAT): DE122264941 Geschäftsführer: Dr. Stefan Barth, Kai Ebenrett, Boris Esser, Alexander Steeg **************************************************** /⁀\ The UTF-8 Ribbon ╲ ╱ Campaign against Mit dem tarent-Newsletter nichts mehr verpassen: ╳ HTML eMail! Also, https://www.tarent.de/newsletter ╱ ╲ header encryption! ****************************************************