typedef uint64_t lv_uintptr_t on 64 bit systems

This commit is contained in:
Gabor Kiss-Vamosi
2019-12-02 15:03:43 +01:00
parent 6c8b0c44be
commit 4037a68ccc
2 changed files with 17 additions and 12 deletions

View File

@@ -22,21 +22,11 @@ extern "C" {
#include <stdint.h> #include <stdint.h>
#include <stddef.h> #include <stddef.h>
#include "lv_log.h" #include "lv_log.h"
#include "lv_types.h"
/********************* /*********************
* DEFINES * DEFINES
*********************/ *********************/
// Check windows
#ifdef __WIN64
#define LV_MEM_ENV64
#endif
// Check GCC
#ifdef __GNUC__
#if defined(__x86_64__) || defined(__ppc64__)
#define LV_MEM_ENV64
#endif
#endif
/********************** /**********************
* TYPEDEFS * TYPEDEFS

View File

@@ -17,6 +17,17 @@ extern "C" {
/********************* /*********************
* DEFINES * DEFINES
*********************/ *********************/
// Check windows
#ifdef __WIN64
#define LV_ARCH_64
#endif
// Check GCC
#ifdef __GNUC__
#if defined(__x86_64__) || defined(__ppc64__)
#define LV_ARCH_64
#endif
#endif
/********************** /**********************
* TYPEDEFS * TYPEDEFS
@@ -32,7 +43,11 @@ enum {
}; };
typedef uint8_t lv_res_t; typedef uint8_t lv_res_t;
typedef unsigned long int lv_uintptr_t; #ifdef LV_ARCH_64
typedef uint64_t lv_uintptr_t;
#else
typedef uint32_t lv_uintptr_t;
#endif
/********************** /**********************
* GLOBAL PROTOTYPES * GLOBAL PROTOTYPES