Paul Eggert <[email protected]> writes:

> * lib/filename.h: Add warning that IS_RELATIVE_FILE_NAME ("") is 1.
> ---
>  lib/filename.h | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/lib/filename.h b/lib/filename.h
> index bc401b17a8..e37a373eb4 100644
> --- a/lib/filename.h
> +++ b/lib/filename.h
> @@ -49,7 +49,10 @@ extern "C" {
>                                 any notion of "current directory".
>     IS_RELATIVE_FILE_NAME(Filename)
>                                 tests whether Filename may be concatenated
> -                               to a directory filename.
> +                               to a directory filename to yield the name
> +                               of a file relative to that directory.
> +                               Watch out: IS_RELATIVE_FILE_NAME ("") is 1
> +                               even though "" is not a relative file name.
>     Note: On native Windows, OS/2, DOS, "c:" is neither an absolute nor a
>     relative file name!
>     IS_FILE_NAME_WITH_DIR(Filename)  tests whether Filename contains a device

Just curious, did you run into a bug in your recent GNU tar changes
because of this behavior?

Collin

P.S. I'm suprised you wrote "1" instead of "true". I think you are the
only person I have seen use booleans in C macro definitions. :)

    $ grep -F USE_LONGLONG_H src/factor.c 
    #ifndef USE_LONGLONG_H
    #  define USE_LONGLONG_H true
    #  define USE_LONGLONG_H false
    #if USE_LONGLONG_H

Reply via email to