On Fri, 01 Aug 2003, Pawel Worach wrote:
> I have no idea how portable this is but freebsd doesn't
> use malloc.h anymore.

Nobody should ever have used <malloc.h>.  You should use <stdlib.h>, as
defined by the ANSI/ISO C standard.

FreeBSD's malloc.h was created on 15 November 1994, with comments saying
that it was for SYSV-compatibility only.  Two days later, on 17 November
1994, a "#warning" line was added to complain that people should use
<stdlib.h>, not <malloc.h>.  In October 2001, the #warning was changed
to #error.

NetBSD added a malloc.h file on 15 April 1993, and the commit log says
"because so much stuff expects it".  NetBSD's malloc.h simply includes
stdlib.h.  (I disapprove of catering to broken code; it would be better
if NetBSD did not have malloc.h and if the broken code stopped trying to
include malloc.h.)

--apb (Alan Barrett)

Reply via email to