Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 31 Oct 2014 11:42:35 +0800
From: "黄建忠" <jianzhong.huang@...oft.com.cn>
To: "musl" <musl@...ts.openwall.com>
Cc: "Rich Felker" <dalias@...c.org>
Subject: Re: the prototype decl of  memcpy/memcmp/calloc/free shouldnot in sched.h

I encounter a problem that use clang/libc++/libc++abi only to build the whole system(As i remeber gcc should be ok).

In firefox, there is a system_wrapper header include sched.h, but in hunspell codes, calloc and free was redefined, so there is a conflicts here.
for example, in "extensions/spellcheck/hunspell/src/hunspell_alloc_hooks.h"
#define calloc(count, size) HunspellAllocator::CountingCalloc(count, size)

It's not a big issue and can be fixed in firefox.

but still feel strange that these declarations exists in sched.h and also a little bit conflict with common sense.

Please consider it.
 
------------------ Original ------------------
From:  "Rich Felker"<dalias@...c.org>;
Date:  Fri, Oct 31, 2014 11:24 AM
To:  "musl"<musl@...ts.openwall.com>; 

Subject:  Re: [musl] the prototype decl of  memcpy/memcmp/calloc/free shouldnot in sched.h

 
On Fri, Oct 31, 2014 at 11:03:35AM +0800, 黄建忠 wrote:
> Hi, there,
> 
> sched.h in musl should not contains the prototype declarations of "memcpy/memcmp/calloc/free" func.
> 
> memcpy/memcmp already in string.h
> calloc/free already in stdlib.h
> 
> Any reason they should exist in sched.h?

They're present only under _GNU_SOURCE mode, and the reason is that
musl's CPU_* macros for working with cpu sets for affinity use these
functions directly rather than having additional exported symbols in a
protected namespace to do the work. Is this approach causing a problem
for you?

Rich
Content of type "text/html" skipped

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.