This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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 v2] Fix Wundef warning for MEMCPY_OK_FOR_FWD_MEMMOVE


> On Thu, Jun 26, 2014 at 12:04:23PM -0700, Roland McGrath wrote:
> > That only helps x86_64 and not anybody else using that file (whether
> > directly by sysdeps selection or by #include).  I think memcopy.h should
> > be required to define that one way or the other.  Then we can have a
> > default in sysdeps/generic/memcopy.h.
> 
> Wouldn't that not catch cases where one forgets to define the macro
> and inherits the default?

The norm is not to define it and use the default.  It's not an error to be
caught.  Anyone who does not want the default (today, only tile) would
include the generic header before overriding a subset of its definitions
(as tile does).  So tile would just do:

#undef	MEMCPY_OK_FOR_FWD_MEMMOVE
#define MEMCPY_OK_FOR_FWD_MEMMOVE 1


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