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] linux-generic: avoid "redefined" warnings for open_not_cancel{,_2}


On 5/15/2012 4:22 PM, Roland McGrath wrote:
> That's a kludge.  Just use a guard.

Fair enough, but my concern was: what guard?  Should I be very explicit and use

#ifndef _SYSDEPS_UNIX_SYSV_LINUX_GENERIC_NOT_CANCEL_H
# define _SYSDEPS_UNIX_SYSV_LINUX_GENERIC_NOT_CANCEL_H
...
#endif

The problem is the internal recursive include of another "not-cancel.h",
which would fail to work properly if the included file also ended up using
the same guard.  That seems to rule out _NOT_CANCEL_H, for example.

You could imagine #including the recursive "not-cancel.h" before
#define'ing the guard, but that also seems like a kludge.  :-)

-- 
Chris Metcalf, Tilera Corp.
http://www.tilera.com


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