I've tried searching around but have come up with nothing: How can I determine the bits (32-bit or 64-bit) of my operating system with elisp?
On my 64-bit Linux machine, system-configuration
evaluates to "x86_64-unknown-linux-gnu"
. I don't have a Windows 32-bit machine available, but could I potentially do
(defconst 32-bit (not (null (string-match "^i386-.*" system-configuration))))
(defconst 64-bit (not (null (string-match "^x86_64-.*" system-configuration))))
to detect the bits?
Edit: "Why would you want to know that?" I wanted to write an Elisp script that would download and run the appropriate version of an executable (32 or 64-bit) for the user's OS.
(ash 1 31)
to find out whether integers will overflow or not./proc
on Windows.