cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: How to setup and maintain parallel 64 bit and 32 bit

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 18 Mar 2016 09:53:42 +0100 (CET)

On Fri, 18 Mar 2016, Frank Chang wrote:

> In order to run a 32 bit build, I had to add, #define IS_32BIT 1 , in
> curlbuild.h and change else to #else in curlbuild.h Please tell if this is
> okay or is there a better way?

The "IS_32BIT" define in the FAQ should be replaced with some define or macro
that you can use on your platforms to detect that a 32bit build is requested.
Or perhaps it is easier to detect a 64bit build but the point is the same.

Which specific define to check depends on your system and your preference
really.

One possibility is to use a known define that sets a limit. Like this:

  #include <stdint.h>
  #if UINTPTR_MAX == 0xffffffff
  /* 32-bit */
  #else
  /* non 32bit */
  #endif

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:  https://curl.haxx.se/mail/etiquette.html
Received on 2016-03-18