diff --git a/runtime/flang/global.h b/runtime/flang/global.h index 59a755ef0da..cab3448de5b 100644 --- a/runtime/flang/global.h +++ b/runtime/flang/global.h @@ -28,16 +28,10 @@ /* declarations needed where integer*8 & logical*8 are supported and * the natural integer is integer*4 (__BIGINT is __INT4). */ -#ifndef _WIN32 typedef int FLANG_INT64[2]; typedef unsigned int FLANG_UINT64[2]; #define I64_MSH(t) t[1] #define I64_LSH(t) t[0] -#else -#include -#define I64_MSH(t) ((int*)((void *)&t))[1] -#define I64_LSH(t) ((int*)((void *)&t))[0] -#endif extern int __ftn_32in64_; diff --git a/runtime/flang/miscsup_com.c b/runtime/flang/miscsup_com.c index 7eb9d053211..053c5917db0 100644 --- a/runtime/flang/miscsup_com.c +++ b/runtime/flang/miscsup_com.c @@ -28,6 +28,8 @@ #ifndef _WIN32 #include #include +#else +#include #endif #include "stdioInterf.h" #include "fioMacros.h" diff --git a/runtime/flangrti/CMakeLists.txt b/runtime/flangrti/CMakeLists.txt index 0bc427e749b..82cbe1bfb6b 100644 --- a/runtime/flangrti/CMakeLists.txt +++ b/runtime/flangrti/CMakeLists.txt @@ -231,9 +231,10 @@ target_include_directories(flangrti_shared set_target_properties(flangrti_shared flangrti_static PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${FLANG_RTE_LIB_DIR}) -target_compile_options(flangrti_static PRIVATE -fPIC) - -target_compile_options(flangrti_shared PRIVATE -fPIC) +if (NOT MSVC) + target_compile_options(flangrti_static PRIVATE -fPIC) + target_compile_options(flangrti_shared PRIVATE -fPIC) +endif() target_compile_options(flangrti_static PUBLIC $<$:-Mreentrant>) diff --git a/runtime/flangrti/iostdinit.c b/runtime/flangrti/iostdinit.c index 2d0d51928d7..b769389296d 100644 --- a/runtime/flangrti/iostdinit.c +++ b/runtime/flangrti/iostdinit.c @@ -294,7 +294,7 @@ __io_timezone(void *tm) /* OT 10 */ void * _pgi_get_iob(int xx) { - return & __iob_func()[xx]; + return __acrt_iob_func(xx); } #endif