lkml.org 
[lkml]   [1999]   [Jul]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 2.2.10-ac7 compile errors on Alpha
On Fri, Jul 02, 1999 at 07:53:40PM +0100, Alan Cox wrote:
> > 1) SLAB_DEBUG_SUPPORT (in mm/slab.c) does not work on Alpha (or any
> > other non-i386 architecture, I presume) for lack of a memchr()
>
> Care to submit a memchr 8)

For the architectures which don't have it, let's have a na\"\ive one in C.
Since it's debug code, who cares, right?

void *memchr(const void *s, int c, size_t n)
{
while (n-- != 0) {
if (c == (char *)s++) {
return s-1;
}
}
return NULL;
}

--
Matthew Wilcox <willy@bofh.ai>
"Windows and MacOS are products, contrived by engineers in the service of
specific companies. Unix, by contrast, is not so much a product as it is a
painstakingly compiled oral history of the hacker subculture." - N Stephenson

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:52    [W:1.626 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site