Opened 3 years ago

Closed 3 years ago

#1768 closed defect (fixed)

Wrong macro added to chicken-config.h in Makefile.cross-linux-mingw

Reported by: lattay Owned by:
Priority: minor Milestone: 5.3
Component: build system Version: 5.2.0
Keywords: Cc:
Estimated difficulty: trivial

Description

Hi,
I noticed that there is a mistake in Makefile.cross-linux-mingw.
In the process of creating chicken-config.h, this Makefile declares HAVE_ALLOCA_H when it should declare HAVE_ALLOCA only.
Here is a "patch":

diff --git a/Makefile.cross-linux-mingw b/Makefile.cross-linux-mingw
index 929e140..6d6a690 100644
--- a/Makefile.cross-linux-mingw
+++ b/Makefile.cross-linux-mingw
@@ -105,7 +105,7 @@ chicken-config.h: chicken-defaults.h
 	echo "#define HAVE_UNISTD_H 1" >>$@
 	echo "#define HAVE_UNSIGNED_LONG_LONG 1" >>$@
 	echo "#define STDC_HEADERS 1" >>$@
-	echo "#define HAVE_ALLOCA_H 1" >>$@
+	echo "#define HAVE_ALLOCA 1" >>$@
 	echo "#define HAVE_DIRECT_H 1" >>$@
 	echo "#define HAVE_ERRNO_H 1" >>$@
 	echo "#define HAVE_LOADLIBRARY 1" >>$@

Change History (3)

comment:1 in reply to:  description Changed 3 years ago by lattay

Just to be clear, the reason this is the right thing is the Win32 environment provides alloca in malloc.h which is included before the attempt to include alloca.h.
Replying to lattay:

Hi,
I noticed that there is a mistake in Makefile.cross-linux-mingw.
In the process of creating chicken-config.h, this Makefile declares HAVE_ALLOCA_H when it should declare HAVE_ALLOCA only.
Here is a "patch":

diff --git a/Makefile.cross-linux-mingw b/Makefile.cross-linux-mingw
index 929e140..6d6a690 100644
--- a/Makefile.cross-linux-mingw
+++ b/Makefile.cross-linux-mingw
@@ -105,7 +105,7 @@ chicken-config.h: chicken-defaults.h
 	echo "#define HAVE_UNISTD_H 1" >>$@
 	echo "#define HAVE_UNSIGNED_LONG_LONG 1" >>$@
 	echo "#define STDC_HEADERS 1" >>$@
-	echo "#define HAVE_ALLOCA_H 1" >>$@
+	echo "#define HAVE_ALLOCA 1" >>$@
 	echo "#define HAVE_DIRECT_H 1" >>$@
 	echo "#define HAVE_ERRNO_H 1" >>$@
 	echo "#define HAVE_LOADLIBRARY 1" >>$@

comment:2 Changed 3 years ago by sjamaan

Milestone: someday5.3

comment:3 Changed 3 years ago by sjamaan

Resolution: fixed
Status: newclosed

Fixed in df3ecdfe37dc3e5d75663ad93bad9dab64e44d0e, thanks!

Note: See TracTickets for help on using tickets.