Re: canonicalize_file_name

2008-10-31 Thread Mark J. Reed
On Fri, Oct 31, 2008 at 9:04 AM, Eric Blake wrote: > POSIX 200x (which is on track to be approved later this year) has modified > the requirements on realpath() that NULL be a universally accepted > argument. Oh, good. > Not all vendors comply with this yet, but at some point, it > will no longer

Re: canonicalize_file_name

2008-10-31 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Corinna Vinschen on 10/31/2008 5:17 AM: >> The safest course would be to declare or >> preallocate a buffer of size PATH_MAX and pass it to realpath(); that >> should work with any POSIX-compliant C library. > > Neverthless this is good

Re: canonicalize_file_name

2008-10-31 Thread Corinna Vinschen
On Oct 31 07:03, Mark J. Reed wrote: > John Emmas> Calling 'canonicalize_file_name(path)' is equivalent to calling > JE> 'realpath(path, NULL)' By a stroke of luck, 'realpath()' is defined in > JE> cygwin/stdlib.h so maybe I should use that? > > Corinna Vinschen> Yes, sure. > > Yes, you should

Re: canonicalize_file_name

2008-10-31 Thread John Emmas
Thanks for that advice, Corinna & Mark. John -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/

Re: canonicalize_file_name

2008-10-31 Thread Mark J. Reed
John Emmas> Calling 'canonicalize_file_name(path)' is equivalent to calling JE> 'realpath(path, NULL)' By a stroke of luck, 'realpath()' is defined in JE> cygwin/stdlib.h so maybe I should use that? Corinna Vinschen> Yes, sure. Yes, you should use realpath(), but passing it NULL won't necessari

Re: canonicalize_file_name

2008-10-31 Thread Corinna Vinschen
On Oct 30 18:22, John Emmas wrote: > Thanks guys. > > According to something I read on the internet this afternoon > > Calling 'canonicalize_file_name(path)' is equivalent to calling > 'realpath(path, NULL)' By a stroke of luck, 'realpath()' is defined in > cygwin/stdlib.h so maybe I should use

Re: canonicalize_file_name

2008-10-30 Thread John Emmas
Thanks guys. According to something I read on the internet this afternoon Calling 'canonicalize_file_name(path)' is equivalent to calling 'realpath(path, NULL)' By a stroke of luck, 'realpath()' is defined in cygwin/stdlib.h so maybe I should use that? John -- Unsubscribe info: http:/

Re: canonicalize_file_name

2008-10-30 Thread Corinna Vinschen
On Oct 30 05:49, Eric Blake wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > According to John Emmas on 10/30/2008 2:00 AM: > > On my Linux boxes, /usr/include/stdlib.h declares a function called > > 'canonicalize_file_name()'. AFAICT its purpose is to return the > > absolute path to

Re: canonicalize_file_name

2008-10-30 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to John Emmas on 10/30/2008 2:00 AM: > On my Linux boxes, /usr/include/stdlib.h declares a function called > 'canonicalize_file_name()'. AFAICT its purpose is to return the > absolute path to a file (or folder) after resolving any symbolic l