Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 31 Oct 2001 18:21:41 +0200
From:      Peter Pentchev <roam@ringlet.net>
To:        "Thyer, Matthew" <Matthew.Thyer@dsto.defence.gov.au>
Cc:        murray@freebsd.org, ports@freebsd.org
Subject:   Re: ports/devel/nasm fails to build on recent -CURRENT due to <malloc.h> has been replaced by <stdlib.h>
Message-ID:  <20011031182141.B73971@straylight.oblivion.bg>
In-Reply-To: <3BDF453A.2692101B@dsto.defence.gov.au>; from Matthew.Thyer@dsto.defence.gov.au on Wed, Oct 31, 2001 at 10:56:34AM %2B1030
References:  <3BDF453A.2692101B@dsto.defence.gov.au>

next in thread | previous in thread | raw e-mail | index | archive | help

--wac7ysb48OaltWcw
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Wed, Oct 31, 2001 at 10:56:34AM +1030, Thyer, Matthew wrote:
> cc -c -O -pipe  -Wall -ansi -pedantic -I. -I.. symtab.c
> In file included from symtab.c:12:
> /usr/include/malloc.h:2: #error "<malloc.h> has been replaced by <stdlib.h>"
> *** Error code 1

Please try the attached patch.  Also attached is a message I sent to
H. Peter Anvin, who is listed as the last person who touched the nasm
source :)

G'luck,
Peter

-- 
No language can express every thought unambiguously, least of all this one.

Index: ports/devel/nasm/files/patch-rdoff::symtab.c
===================================================================
RCS file: ports/devel/nasm/files/patch-rdoff::symtab.c
diff -N ports/devel/nasm/files/patch-rdoff::symtab.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ports/devel/nasm/files/patch-rdoff::symtab.c	31 Oct 2001 14:52:42 -0000
@@ -0,0 +1,10 @@
+--- rdoff/symtab.c.old	Wed Oct 31 16:52:11 2001
++++ rdoff/symtab.c	Wed Oct 31 16:52:17 2001
+@@ -9,7 +9,6 @@
+  */
+ #include <stdio.h>
+ #include <stdlib.h>
+-#include <malloc.h>
+ 
+ #include "symtab.h"
+ #include "hash.h"

--wac7ysb48OaltWcw
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="hpa.mail"

Date: Wed, 31 Oct 2001 18:19:42 +0200
From: Peter Pentchev <roam@ringlet.net>
To: "H. Peter Anvin" <hpa@zytor.com>
Subject: nasm build fix
Message-ID: <20011031181941.A73971@straylight.oblivion.bg>

Hi,

I'm writing to you because your name is listed in the MODIFIED file
of the nasm-0.98 distribution used by the FreeBSD Ports collection.

A file in the nasm distrbution contains an '#include <malloc.h>' line.
The <malloc.h> header has been obsoleted by the <stdlib.h> header
for the malloc(3) and free(3) functions, as per the ISO/IEC 9899:1990
("ISO C89") standard.  The FreeBSD developers decided to recently
remove it, because <stdlib.h> has been the standard header file
for several years now.  However, there still are a couple of programs
which use <malloc.h>, and the FreeBSD Ports Collection team is working
with their authors towards replacing that with the proper use of <stdlib.h>.

Please find attached a patch to the nasm sources, which allows it
to build again on FreeBSD 5.0-CURRENT, and should allow it to build
on pretty much any recent release of most OS's.

Thank you for your work on nasm!

G'luck,
Peter

--- rdoff/symtab.c.old	Wed Oct 31 16:52:11 2001
+++ rdoff/symtab.c	Wed Oct 31 16:52:17 2001
@@ -9,7 +9,6 @@
  */
 #include <stdio.h>
 #include <stdlib.h>
-#include <malloc.h>
 
 #include "symtab.h"
 #include "hash.h"


--wac7ysb48OaltWcw--

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011031182141.B73971>