Re: [racket] Detecting 32/64-bit racket

2011-10-29 Thread Norman Gray
Matthew, hello. On 2011 Oct 29, at 17:43, Matthew Flatt wrote: > At Sat, 29 Oct 2011 16:19:53 +0200, Niklas Larsson wrote: >> 2011/10/29 Thomas Chust : >>> 2011/10/29 Norman Gray : [...] Is there a recommended way to detect whether racket is a 32- or 64-bit executable? [...]

Re: [racket] Detecting 32/64-bit racket

2011-10-29 Thread Robby Findler
On Sat, Oct 29, 2011 at 11:43 AM, Matthew Flatt wrote: > At Sat, 29 Oct 2011 16:19:53 +0200, Niklas Larsson wrote: >> 2011/10/29 Thomas Chust : >> > 2011/10/29 Norman Gray : >> >> [...] >> >> Is there a recommended way to detect whether racket is a 32- or >> >> 64-bit executable? >> >> [...] >> >

Re: [racket] Detecting 32/64-bit racket

2011-10-29 Thread Matthew Flatt
At Sat, 29 Oct 2011 16:19:53 +0200, Niklas Larsson wrote: > 2011/10/29 Thomas Chust : > > 2011/10/29 Norman Gray : > >> [...] > >> Is there a recommended way to detect whether racket is a 32- or > >> 64-bit executable? > >> [...] > > > > Hello Norman, > > > > while I don't know whether this strateg

Re: [racket] Detecting 32/64-bit racket

2011-10-29 Thread Norman Gray
Thomas and all, hello. On 2011 Oct 29, at 15:11, Thomas Chust wrote: > 2011/10/29 Norman Gray : >> I'm writing a racket extension to wrap a C library >> , and in the configure.ac, I >> want to be able to detect whether racket is a 32- or 64-bit >> executab

Re: [racket] Detecting 32/64-bit racket

2011-10-29 Thread Robby Findler
(oh, this might fail if we were to get a 128bit world, I suppose :) On Sat, Oct 29, 2011 at 9:31 AM, Robby Findler wrote: > Another not so great way, in Racket, to tell if the current racket is > built as a 64 bit or 32 bit executable (is that what you're wanting?) > >  ;; 64bit? : -> boolean >  

Re: [racket] Detecting 32/64-bit racket

2011-10-29 Thread Robby Findler
Another not so great way, in Racket, to tell if the current racket is built as a 64 bit or 32 bit executable (is that what you're wanting?) ;; 64bit? : -> boolean (define (64bit?) (eq? (expt 2 61) (expt 2 61))) I don't know if this is promised to always work going forwards, but it is hard for

Re: [racket] Detecting 32/64-bit racket

2011-10-29 Thread Niklas Larsson
2011/10/29 Thomas Chust : > 2011/10/29 Norman Gray : >> [...] >> Is there a recommended way to detect whether racket is a 32- or >> 64-bit executable? >> [...] > > Hello Norman, > > while I don't know whether this strategy is particularly > recommendable, I would suggest to use utilities from the F

Re: [racket] Detecting 32/64-bit racket

2011-10-29 Thread Thomas Chust
2011/10/29 Norman Gray : > [...] > Is there a recommended way to detect whether racket is a 32- or > 64-bit executable? > [...] Hello Norman, while I don't know whether this strategy is particularly recommendable, I would suggest to use utilities from the FFI module: (require (only-in ffi/unsa

[racket] Detecting 32/64-bit racket

2011-10-29 Thread Norman Gray
Greetings. Is there a recommended way to detect whether racket is a 32- or 64-bit executable? I'm writing a racket extension to wrap a C library , and in the configure.ac, I want to be able to detect whether racket is a 32- or 64-bit executable, so I kn