GNOME Bugzilla – Bug 617416
Don't use PATH_MAX for portability reasons
Last modified: 2011-03-28 21:48:35 UTC
Hi, PATH_MAX is not very portable, as POSIX doesn't mandate it. This cases build failures on some platforms, e.g. on GNU/Hurd, where PATH_MAX is undefined (since there's no path length limit). The attached patch uses dynamic allocation instead of PATH_MAX. realpath() NULL argument usage is standard since POSIX.2008, but I dunno whether _fullpath() (used in Windows) accepts it. When bug 111848 is fixed, it would probably be a good idea to use the GLib function.
Created attachment 160125 [details] [review] Use dynamic allocation rather than fixed size PATH_MAX buffers
Can you rebase this patch on latest git master and use "git format-patch -1" to generate the patch please? It doesn't apply cleanly any longer.
Created attachment 181360 [details] [review] Updated patch Patch against git. I haven't been able to build git master as it requires some stuff that is too new for me. Please let me know if there are any issues with it.
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report. I pushed your patch, but added in removal of another PATH_MAX + realpath usage that had snuck in: http://git.gnome.org/browse/gegl/commit/?id=7d12e628b7fc112ee7a7b6ac7bcf79cd529d00e4 Thanks!