mirror of
https://github.com/FreeRDP/FreeRDP.git
synced 2024-11-23 01:44:35 +08:00
Added stdbool.h compat header
This commit is contained in:
parent
0b0b716dd6
commit
3831233301
22
compat/stdbool/stdbool.h
Normal file
22
compat/stdbool/stdbool.h
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
/*===---- stdbool.h - Standard header for booleans -------------------------===
|
||||||
|
*
|
||||||
|
* Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
|
* See https://llvm.org/LICENSE.txt for license information.
|
||||||
|
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
|
*
|
||||||
|
*===-----------------------------------------------------------------------===
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __STDBOOL_H
|
||||||
|
#define __STDBOOL_H
|
||||||
|
|
||||||
|
/* Don't define bool, true, and false in C++, except as a GNU extension. */
|
||||||
|
#ifndef __cplusplus
|
||||||
|
typedef int bool;
|
||||||
|
#define true 1
|
||||||
|
#define false 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define __bool_true_false_are_defined 1
|
||||||
|
|
||||||
|
#endif /* __STDBOOL_H */
|
@ -49,6 +49,15 @@ if(NOT DEFINED BUILD_SHARED_LIBS)
|
|||||||
set(BUILD_SHARED_LIBS ON)
|
set(BUILD_SHARED_LIBS ON)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if (NOT IOS)
|
||||||
|
check_include_files(stdbool.h WINPR_HAVE_STDBOOL_H)
|
||||||
|
if (NOT WINPR_HAVE_STDBOOL_H)
|
||||||
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../compat/stdbool)
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
set(WINPR_HAVE_STDBOOL_H 1)
|
||||||
|
endif()
|
||||||
|
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DRDTK_EXPORTS")
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DRDTK_EXPORTS")
|
||||||
|
|
||||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
|
||||||
|
Loading…
Reference in New Issue
Block a user