-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Bruno Haible wrote: > Sam Steingold wrote: >> CLISP comes with a replacement realpath implementation for platforms >> which lacks it (are there still such platforms?). > > If someone provides a correct implementation of realpath for gnulib, we will > accept it. But it's better to use canonicalize_file_name(), because > > - realpath does not have size limitation and associated troubles. Citing the > Linux manpage: > > BUGS > Avoid using this function. It is broken by design since it > is impossible to determine a suitable size for the output > buffer, resolved_path. According to POSIX a buffer of > size PATH_MAX suffices, but PATH_MAX need not be a defined > constant, and may have to be obtained using pathconf(). > And asking pathconf() does not really help, since on the > one hand POSIX warns that the result of pathconf() may be > huge and unsuitable for mallocing memory. And on the other > hand pathconf() may return -1 to signify that PATH_MAX is > not bounded.
this is equally applicable to any function what relies on PATH_MAX,e.g., getcwd. pretty soon every user of gnulib will be distributing a full glibc with his package. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHJj/RPp1Qsf2qnMcRAoY7AJ9w7Pmm3HTaBH4HFa/JnIL7QAoWZwCfUO/8 OsMyyBVridwtU9xML1lDDIc= =bvWT -----END PGP SIGNATURE-----