Remove references to PATH_MAX macro

Since the macro PATH_MAX is not defined on every system (GNU/Hurd being
one of those who do not define it), we remove all references to this
macro. Instead, we use a buffer of arbitraty size and grow it when
needed to contain paths.
This commit is contained in:
Lancelot SIX
2013-11-21 22:03:49 +01:00
committed by Michael Stapelberg
parent 4f5e0e794f
commit f22995393a
5 changed files with 78 additions and 27 deletions

View File

@ -372,7 +372,8 @@ char *get_process_filename(const char *prefix);
*
* The implementation follows http://stackoverflow.com/a/933996/712014
*
* Returned value must be freed by the caller.
*/
const char *get_exe_path(const char *argv0);
char *get_exe_path(const char *argv0);
#endif