[distcc] sanity check for TMPDIR

Martin Pool mbp at sourcefrog.net
Tue Jul 22 12:32:16 GMT 2003


On 22 Jul 2003, Heiko_Elger at arburg.com wrote:

> some gcc compiler, especially WindRivver System GNU compiler with CYGWIN, cannot
> work with the real unix path TMPDIR - but it really works with mixed case path.
> mixed case path on cygwin is like the following:
> 
> unix path                 /tmp
> cygwin path             /tmp or /cygdrive/c/tmp
> cygwin mixed path   c:/tmp
> 
> Cause of sanity check it's not possible to export a cygwin mixed case path.

Where does mixed case come into it?

What's wrong with using /cygdrive/c/tmp?

> Perhaps you can replace the sanity check in dcc_get_tmp_top() in file
> src/tempfile.c
> with the following - using opendir() call for existeny check:
> 
> 
> -------------------- snip snip ----------------------
> static const char *dcc_get_tmp_top(void)
> {
>     const char *d;
>     DIR *handle;
> 
>     d = getenv("TMPDIR");
>     handle=opendir(d);

Is there any particular reason to use opendir() rather than stat()?

Best regards,
--
Martin



More information about the distcc mailing list