unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* Fix for alloca() usage
@ 2010-11-19 12:21 carlo.bramix
  2010-11-19 13:29 ` Ludovic Courtès
  0 siblings, 1 reply; 2+ messages in thread
From: carlo.bramix @ 2010-11-19 12:21 UTC (permalink / raw)
  To: guile-devel

[-- Attachment #1: Type: text/plain, Size: 527 bytes --]

Hello,
the following files:

libguile/control.c
libguile/fluids.c
libguile/foreign.c
libguile/hashtab.c
libguile/strings.c

require to include <alloca.h>.
Since the alloca.h generated into the /lib directory takes care of various 
configurations, this will fix alloca() usage: after applying the fix, these 
sources will be able to be compiled on Windows since the compiler implements 
_alloca() instead of alloca().
The attached patch has been generated from the latest sources in the 
repository.

Sincerely,

Carlo Bramini.

[-- Attachment #2: guile.txt --]
[-- Type: text/plain, Size: 1847 bytes --]

diff -r -u guile-HEAD-c9b16ce-old/libguile/control.c guile-HEAD-c9b16ce-new/libguile/control.c
--- guile-HEAD-c9b16ce-old/libguile/control.c	2010-11-18 20:48:55 +0000
+++ guile-HEAD-c9b16ce-new/libguile/control.c	2010-11-19 12:06:52 +0000
@@ -20,6 +20,8 @@
 #  include <config.h>
 #endif
 
+#include <alloca.h>
+
 #include "libguile/_scm.h"
 #include "libguile/control.h"
 #include "libguile/objcodes.h"
diff -r -u guile-HEAD-c9b16ce-old/libguile/fluids.c guile-HEAD-c9b16ce-new/libguile/fluids.c
--- guile-HEAD-c9b16ce-old/libguile/fluids.c	2010-11-18 20:48:55 +0000
+++ guile-HEAD-c9b16ce-new/libguile/fluids.c	2010-11-19 12:07:06 +0000
@@ -20,6 +20,7 @@
 # include <config.h>
 #endif
 
+#include <alloca.h>
 #include <stdio.h>
 #include <string.h>
 
diff -r -u guile-HEAD-c9b16ce-old/libguile/foreign.c guile-HEAD-c9b16ce-new/libguile/foreign.c
--- guile-HEAD-c9b16ce-old/libguile/foreign.c	2010-11-18 20:48:55 +0000
+++ guile-HEAD-c9b16ce-new/libguile/foreign.c	2010-11-19 12:07:15 +0000
@@ -22,6 +22,7 @@
 
 #include <ffi.h>
 
+#include <alloca.h>
 #include <alignof.h>
 #include <string.h>
 #include <assert.h>
diff -r -u guile-HEAD-c9b16ce-old/libguile/hashtab.c guile-HEAD-c9b16ce-new/libguile/hashtab.c
--- guile-HEAD-c9b16ce-old/libguile/hashtab.c	2010-11-18 20:48:55 +0000
+++ guile-HEAD-c9b16ce-new/libguile/hashtab.c	2010-11-19 12:07:24 +0000
@@ -23,6 +23,7 @@
 #endif
 
 #include <stdio.h>
+#include <alloca.h>
 #include <assert.h>
 
 #include "libguile/_scm.h"
diff -r -u guile-HEAD-c9b16ce-old/libguile/strings.c guile-HEAD-c9b16ce-new/libguile/strings.c
--- guile-HEAD-c9b16ce-old/libguile/strings.c	2010-11-18 20:48:55 +0000
+++ guile-HEAD-c9b16ce-new/libguile/strings.c	2010-11-19 12:07:34 +0000
@@ -22,6 +22,7 @@
 # include <config.h>
 #endif
 
+#include <alloca.h>
 #include <string.h>
 #include <stdio.h>
 #include <ctype.h>

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Fix for alloca() usage
  2010-11-19 12:21 Fix for alloca() usage carlo.bramix
@ 2010-11-19 13:29 ` Ludovic Courtès
  0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2010-11-19 13:29 UTC (permalink / raw)
  To: guile-devel

Hi,

"carlo.bramix@libero.it" <carlo.bramix@libero.it> writes:

> the following files:
>
> libguile/control.c
> libguile/fluids.c
> libguile/foreign.c
> libguile/hashtab.c
> libguile/strings.c
>
> require to include <alloca.h>.
> Since the alloca.h generated into the /lib directory takes care of various 
> configurations, this will fix alloca() usage: after applying the fix, these 
> sources will be able to be compiled on Windows since the compiler implements 
> _alloca() instead of alloca().
> The attached patch has been generated from the latest sources in the 
> repository.

Applied, thanks!

Ludo’.




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-11-19 13:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-19 12:21 Fix for alloca() usage carlo.bramix
2010-11-19 13:29 ` Ludovic Courtès

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).