help-flex
[Top][All Lists]
Advanced

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

Re: Flex: Cygwin and Windows ports


From: Bruce Lilly
Subject: Re: Flex: Cygwin and Windows ports
Date: Tue, 22 Oct 2002 10:29:38 -0400
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2a) Gecko/20020910

Vincent Caron wrote:

The 'pure' win32 build can use FLEX_NEED_INTEGRAL_TYPES, but it's causing pb with 64bit types. 'long int'is 32 bits, and 'long long int' is illegal. Attached is the smallest patch I could produce to fix this.
[...]
! #ifdef _WIN32
! typedef __int64 int64_t;
! # elif __WORDSIZE == 64 || defined __arch64__ || defined __cplusplus
  typedef long int int64_t;
  # else
  typedef long long int int64_t;
***************
*** 26,32 ****
  typedef unsigned short int uint16_t;
  typedef unsigned int uint32_t;
! #if __WORDSIZE == 64 || defined __arch64__ || defined __cplusplus
  typedef unsigned long int uint64_t;
  #else
  typedef unsigned long long int uint64_t;
--- 33,41 ----
  typedef unsigned short int uint16_t;
  typedef unsigned int uint32_t;
! #ifdef _WIN32
! typedef unsigned __int64 uint64_t;
! #elif __WORDSIZE == 64 || defined __arch64__ || defined __cplusplus
  typedef unsigned long int uint64_t;
  #else
  typedef unsigned long long int uint64_t;

Please DO NOT use _WIN32 as the sole macro for #ifdef/#ifndef.
That will break currently-working implementations (e.g. UWIN) for
which the MS compiler still defines _WIN32.





reply via email to

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