Skip to content

Commit

Permalink
More windows fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
isuruf authored and xoviat committed Dec 23, 2017
1 parent 199329d commit 2cb73b2
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 10 deletions.
6 changes: 0 additions & 6 deletions runtime/flang/global.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 <windows.h>
#define I64_MSH(t) ((int*)((void *)&t))[1]
#define I64_LSH(t) ((int*)((void *)&t))[0]
#endif


extern int __ftn_32in64_;
Expand Down
2 changes: 2 additions & 0 deletions runtime/flang/miscsup_com.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
#ifndef _WIN32
#include <sys/time.h>
#include <unistd.h>
#else
#include <winsock2.h>
#endif
#include "stdioInterf.h"
#include "fioMacros.h"
Expand Down
7 changes: 4 additions & 3 deletions runtime/flangrti/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 $<$<COMPILE_LANGUAGE:Fortran>:-Mreentrant>)

Expand Down
2 changes: 1 addition & 1 deletion runtime/flangrti/iostdinit.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 2cb73b2

Please sign in to comment.