This is the mail archive of the libc-ports@sources.redhat.com mailing list for the libc-ports project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Unify pthread_spin_[try]lock implementations.


> This works at least with GCC 4.4 and GCC 4.8, albeit with a warning:
> 
> ../ports/sysdeps/mips/nptl/pthread_spin_lock.c:19:2: warning: #include_next in primary source file [enabled by default]
>  #include_next <nptl/pthread_spin_lock.c>
>   ^

Right.  We don't want that.

> Given that previous versions of GCC can, potentially, fail to compile
> this, I would rather use the "../../../../nptl/pthread_spin_lock.c"
> version.  Any alternative suggestions?

Anything that depends on the location of the source file is a bad idea.
It will break if things get moved around, and perhaps nonobviously.
You could use <sysdeps/../nptl/foo.c> but it merits a comment about why
the more common and simple <nptl/foo.c> is not being used.


Thanks,
Roland


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]