patch to force POSIX pathname conversion (mostly on win32)

Mumit Khan khan@xraylith.wisc.EDU
Fri Apr 30 22:47:00 GMT 1999


Chris Faylor <cgf@cygnus.com> writes:
> A couple of questions:
> 
> 1) Do you really want to use conv_to_posix_path_list rather than conv_to_posi
> x_path,
>    i.e., are all of the strings being created UNIX PATH format like /bin:/usr
> /bin:?
>    It doesn't seem to be that way.  If you use the path_list variant you won'
> t be
>    able to handle file names with semicolons in them.  Dunno if that is even 
> valid
>    under Windows but why go through the extra overhead?
> 
> 2) I normally don't like to use static buffers but the
>    conv_to_posix_path_list_buf_size call is sort of expensive.  Doesn't gcc h
> ave a
>    maximum path length?  If so, could you just set aside a buffer to hold thi
> s and
>    malloc enough space after the conversion?  Actually you could just make th
> is a
>    dynamic array...

Both good points, and both to be changed if the approach is approved by
the maintainers. I wanted to get a working patch out as soon as possible
to get feedback.  BTW, feel free to send me an efficient cygwin-specific 
version of the macro. 

Now that you mention it, the only place where the pathlist is used is
via the environment variables such as C_INCLUDE_PATH etc, and GET_ENV
_PATH_LIST takes care of that.

Regards,
Mumit




More information about the Gcc-patches mailing list