Skip to content

Support for native bool on Visual C++ build #754

@matthiasblaesing

Description

@matthiasblaesing

Currently the unittest NativeTest#testSizeof fails for bool when the binaries are build with the Microsoft SDK for Windows 7.1. The problem is located in dispatch.c: (line 123):

#ifdef __cplusplus
extern "C" {
#else
#if defined(_MSC_VER)
// At least until I upgrace to 2013-era MSVS
typedef int bool;
#define true 1
#define false 0
#else
#include <stdbool.h>
#endif
#endif

in this case the defined bool type has the same size as int (4 bytes), which conflicts with mingw + gcc (both 1).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions