[PATCH] Add a SYS_write definition on systems where it is not defined in headers

Mike Hommey mh+jemalloc at glandium.org
Tue Mar 27 06:15:36 PDT 2012


On Tue, Mar 27, 2012 at 10:11:38AM -0300, Ricardo Nabinger Sanchez wrote:
> Hello Mike,
> 
> On Tue, 27 Mar 2012 14:48:58 +0200
> Mike Hommey <mh+jemalloc at glandium.org> wrote:
> 
> > +#if !defined(SYS_write) && defined(__NR_write)
> > +#define SYS_write __NR_write
> > +#endif
> 
> Isn't this a good spot for something like the following?
> 
> #else
> #error "SYS_write is broken on your system."
> #endif
> 
> Unless I'm overlooking something obvious, it should not be a good thing
> letting the compilation go past this point, assuming it will fail in a
> later stage anyway.

Well, considering it's going to fail later with a pretty self describing
error message, it's probably not worth bothering.

Mike



More information about the jemalloc-discuss mailing list