------- Additional Comments From ams at gnu dot org 2005-05-30 16:23 ------- (In reply to comment #2) > Its easy to fix this for natFileChannelImpl.cc.
Thank you for fixing it! > For natFilePosix.cc it is not so simple - is there a portable alternative to > realpath() that does not require the use of MAXPATHLEN / PATH_MAX ? One can call realpath() with NULL for the second parameter on systems that do not have MAXPATHLEN/PATH_MAX. You could also use canonicalize_file_name(), but this is a GNU C library specific function. -- Function: char * realpath (const char *restrict NAME, char *restrict RESOLVED) ... On systems which define `PATH_MAX' this means the buffer must be large enough for a pathname of this size. For systems without limitations on the pathname length the requirement cannot be met and programs should not call `realpath' with anything but `NULL' for the second parameter. -- Function: char * canonicalize_file_name (const char *NAME) The `canonicalize_file_name' function returns the absolute name of the file named by NAME which contains no `.', `..' components nor any repeated path separators (`/') or symlinks. The result is passed back as the return value of the function in a block of memory allocated with `malloc'. If the result is not used anymore the memory should be freed with a call to `free'. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21821