[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "configure cannot test when cross-compiling" should be ok

From: The Senator
Subject: Re: "configure cannot test when cross-compiling" should be ok
Date: Thu, 25 May 2006 15:17:55 +1200

> eval.c:3248: warning: implicit declaration of function `alloca'
> The relevant line in the c file was I think in the debugging code,

Yes, but it's the debugging evaluator, ie. when you run with --debug
so you can see scheme-level backtraces.

Ok, so that probably needs fixing.

> so what's the best way to fix this?

I'd have thought mingw is supposed to provide alloca.h or something to
give that function.  It's Gnu C so it must exist, as __builtin_alloca
or whatever I suppose.

Indeed. There's no alloca.h in my mingw, but there's malloc.h:
address@hidden:/usr/i586-mingw32msvc/include$ ls a*.h
accctrl.h  aclapi.h  aclui.h  afxres.h  assert.h
address@hidden:/usr/i586-mingw32msvc/include$ ls *lloc*.h

Inside that malloc.h we have:

#ifdef  __cplusplus
extern "C" {
  The _heap* memory allocation functions are supported on NT
  but not W9x. On latter, they always set errno to ENOSYS.
_CRTIMP int __cdecl _heapwalk (_HEAPINFO*);
#ifdef __GNUC__
#define _alloca(x) __builtin_alloca((x))

#ifndef _NO_OLDNAMES
_CRTIMP int __cdecl heapwalk (_HEAPINFO*);
#ifdef __GNUC__
#define alloca(x) __builtin_alloca((x))
#endif  /* Not _NO_OLDNAMES */

So perhaps eval.c will need to include malloc.h, or is this autoconf's
(or even somebody else's) job?
Just in case this is needed, my mingw-gcc has these predefined macros:
address@hidden:~/temp$ touch test.h; i586-mingw32msvc-cpp -dM test.h | grep GNUC
#define __GNUC_PATCHLEVEL__ 2
#define __GNUC__ 3
#define __GNUC_MINOR__ 4

> I am not sure of the intent of this code. Is FIONREAD being used
> as a test for the presence of ioctl?

I think so.  If the ioctl constant FIONREAD exists then the ioctl
function exists ...

> It doesn't work here because FIONREAD (and more) is also defined in
> winsock...

Thanks.  I'll conditionalize it on ioctl existing too.

I see there's a select() in winsock.h, not sure if that's what should
be used in that bit of code ... maybe not.  I thought DOS did have a
way to ask if there was input waiting on an fd though.

??? This is out of my league, I don't know what to do about this. I'll
be happy to provide whatever information is required though.

I see boot-9 loads session.scm which loads documentation.scm which
uses regexps.  Bit annoying that.  I guess nobody's built anywhere
without regexps for a while.  It might work to remove the session line
from boot-9

    (module-use! guile-user-module (resolve-interface '(ice-9 session)))

Yay, that does it, I finally got guile running!

address@hidden /cygdrive/c/guile2
$ ./a
guile> (+ 1 1)
guile> ((lambda (a b) (+ a b)) 4 5)
guile> (write 'a)
aguile> (write "Lithp ith lithtening.")
"Lithp ith lithtening."guile> (exit)

Thanks for all the help!

You might be able to delete most of the guts of documentation.scm, it
shouldn't get used unless you run `help' or `procedure-documentation'
or whatever.

Well, since it runs now, I'll have a play around first, and see how far I get.

Thanks again, really appreciate that! If you, or any testers need more
details on my build options or other configurations, send me an email,
and I'll see what I can dig up.

Happy hacking!

reply via email to

[Prev in Thread] Current Thread [Next in Thread]