And yet again it is time for me to bitch about dependency creep. I thought about pulling realpath from gnulib (because clisp includes its own implementation - BTW, are there still unixes which lack it?) and discovered that it offered canonicalize_file_name instead. I tried pulling it and the list of new files I got did not fit on the screen:
? src/gllib/areadlink-with-size.c ? src/gllib/areadlink.h ? src/gllib/at-func.c ? src/gllib/basename-lgpl.c ? src/gllib/basename.c ? src/gllib/bitrotate.h ? src/gllib/canonicalize.c ? src/gllib/canonicalize.h ? src/gllib/chdir-long.c ? src/gllib/chdir-long.h ? src/gllib/chown.c ? src/gllib/cloexec.c ? src/gllib/cloexec.h ? src/gllib/close.c ? src/gllib/dirent.in.h ? src/gllib/dirfd.c ? src/gllib/dirname-lgpl.c ? src/gllib/dirname.c ? src/gllib/dirname.h ? src/gllib/dosname.h ? src/gllib/dup-safer.c ? src/gllib/dup2.c ? src/gllib/error.c ? src/gllib/error.h ? src/gllib/exitfail.c ? src/gllib/exitfail.h ? src/gllib/fchdir.c ? src/gllib/fchmodat.c ? src/gllib/fchown-stub.c ? src/gllib/fchownat.c ? src/gllib/fclose.c ? src/gllib/fcntl.c ? src/gllib/fcntl.in.h ? src/gllib/fd-safer.c ? src/gllib/fdopendir.c ? src/gllib/file-set.c ? src/gllib/file-set.h ? src/gllib/filenamecat-lgpl.c ? src/gllib/filenamecat.h ? src/gllib/freading.c ? src/gllib/freading.h ? src/gllib/fstatat.c ? src/gllib/getcwd-lgpl.c ? src/gllib/getcwd.c ? src/gllib/getdtablesize.c ? src/gllib/hash-pjw.c ? src/gllib/hash-pjw.h ? src/gllib/hash-triple.c ? src/gllib/hash-triple.h ? src/gllib/hash.c ? src/gllib/hash.h ? src/gllib/intprops.h ? src/gllib/lchown.c ? src/gllib/lseek.c ? src/gllib/lstat.c ? src/gllib/malloc.c ? src/gllib/mempcpy.c ? src/gllib/memrchr.c ? src/gllib/mkdir.c ? src/gllib/mkdirat.c ? src/gllib/open.c ? src/gllib/openat-die.c ? src/gllib/openat-priv.h ? src/gllib/openat-proc.c ? src/gllib/openat.c ? src/gllib/openat.h ? src/gllib/pathmax.h ? src/gllib/pipe-safer.c ? src/gllib/readlink.c ? src/gllib/realloc.c ? src/gllib/rmdir.c ? src/gllib/same-inode.h ? src/gllib/same.c ? src/gllib/same.h ? src/gllib/save-cwd.c ? src/gllib/save-cwd.h ? src/gllib/stat.c ? src/gllib/stdio-impl.h ? src/gllib/stdio.in.h ? src/gllib/strdup.c ? src/gllib/strerror.c ? src/gllib/stripslash.c ? src/gllib/strndup.c ? src/gllib/strnlen.c ? src/gllib/sys_stat.in.h ? src/gllib/time.in.h ? src/gllib/unistd--.h ? src/gllib/unistd-safer.h ? src/gllib/unlink.c ? src/gllib/unlinkat.c ? src/gllib/xalloc-die.c ? src/gllib/xalloc-oversized.h ? src/gllib/xalloc.h ? src/gllib/xgetcwd.c ? src/gllib/xgetcwd.h ? src/gllib/xmalloc.c ? src/gllib/xstrndup.c ? src/gllib/xstrndup.h ? src/glm4/canonicalize.m4 ? src/glm4/chdir-long.m4 ? src/glm4/chown.m4 ? src/glm4/cloexec.m4 ? src/glm4/close.m4 ? src/glm4/d-ino.m4 ? src/glm4/dirent_h.m4 ? src/glm4/dirfd.m4 ? src/glm4/dirname.m4 ? src/glm4/double-slash-root.m4 ? src/glm4/dup2.m4 ? src/glm4/error.m4 ? src/glm4/fchdir.m4 ? src/glm4/fclose.m4 ? src/glm4/fcntl.m4 ? src/glm4/fcntl_h.m4 ? src/glm4/fdopendir.m4 ? src/glm4/filenamecat.m4 ? src/glm4/freading.m4 ? src/glm4/getcwd-abort-bug.m4 ? src/glm4/getcwd-path-max.m4 ? src/glm4/getcwd.m4 ? src/glm4/getdtablesize.m4 ? src/glm4/hash.m4 ? src/glm4/inline.m4 ? src/glm4/lchown.m4 ? src/glm4/lseek.m4 ? src/glm4/lstat.m4 ? src/glm4/malloc.m4 ? src/glm4/mempcpy.m4 ? src/glm4/memrchr.m4 ? src/glm4/mkdir.m4 ? src/glm4/mode_t.m4 ? src/glm4/open.m4 ? src/glm4/openat.m4 ? src/glm4/pathmax.m4 ? src/glm4/readlink.m4 ? src/glm4/realloc.m4 ? src/glm4/rmdir.m4 ? src/glm4/same.m4 ? src/glm4/save-cwd.m4 ? src/glm4/ssize_t.m4 ? src/glm4/stat.m4 ? src/glm4/stdio_h.m4 ? src/glm4/strdup.m4 ? src/glm4/strerror.m4 ? src/glm4/strndup.m4 ? src/glm4/strnlen.m4 ? src/glm4/sys_stat_h.m4 ? src/glm4/time_h.m4 ? src/glm4/unistd-safer.m4 ? src/glm4/unlink.m4 ? src/glm4/xalloc.m4 ? src/glm4/xgetcwd.m4 ? src/glm4/xstrndup.m4 Yep, 150+ new files just for canonicalize_file_name (realpath in clisp/src/pathname.d almost takes about 160 lines of C code). People, this is ridiculous. -- Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 11.0.60900031 http://pmw.org.il http://ffii.org http://iris.org.il http://memri.org http://www.PetitionOnline.com/tap12009/ http://truepeace.org Three can keep a secret if two of them are dead.