[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Flex: Cygwin and Windows ports
From: |
Vincent Caron |
Subject: |
Re: Flex: Cygwin and Windows ports |
Date: |
Tue, 22 Oct 2002 13:53:33 +0200 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.2a) Gecko/20020910 |
W. L. Estes wrote:
flexint.h in flex-2.5.23 does not include inttypes.h, it includes sys/types.h.
Ops, missed that change. The lack of 'uint*' types still apply. Cygwin
actually defines __uint{8,16,32}_t types, ie. only expect to use them
internally (for opaque types such as pthread_t). The 'u_int*' flavour is
tagged to be MS specific. Attached is a 5-liner patch for Cygwin.
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.
*** flex-2.5.23-orig/flexint.h Mon Oct 21 19:21:18 2002
--- flex-2.5.23-my/flexint.h Tue Oct 22 13:46:44 2002
***************
*** 14,20 ****
typedef short int int16_t;
typedef int int32_t;
! # if __WORDSIZE == 64 || defined __arch64__ || defined __cplusplus
typedef long int int64_t;
# else
typedef long long int int64_t;
--- 19,27 ----
typedef short int int16_t;
typedef int int32_t;
! #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;
*** flex-2.5.23-orig/flexint.h Mon Oct 21 19:21:18 2002
--- flex-2.5.23-my/flexint.h Tue Oct 22 13:32:48 2002
***************
*** 5,10 ****
--- 5,15 ----
#ifndef FLEX_NEED_INTEGRAL_TYPE_DEFINITIONS
#include <sys/types.h>
+ #ifdef __CYGWIN__
+ typedef u_int8_t uint8_t;
+ typedef u_int16_t uint16_t;
+ typedef u_int32_t uint32_t;
+ #endif
#else
/* Exact integral types. */
- Flex: Cygwin and Windows ports, Vincent Caron, 2002/10/21
- Re: Flex: Cygwin and Windows ports, W. L. Estes, 2002/10/21
- Re: Flex: Cygwin and Windows ports,
Vincent Caron <=
- Re: Flex: Cygwin and Windows ports, Bruce Lilly, 2002/10/22
- Re: Flex: Cygwin and Windows ports, Vincent Caron, 2002/10/22
- Re: Flex: Cygwin and Windows ports, Bruce Lilly, 2002/10/22
- Re: Flex: Cygwin and Windows ports, Vincent Caron, 2002/10/22
- Re: Flex: Cygwin and Windows ports, Bruce Lilly, 2002/10/22