Skip to content

Commit bb4dfa6

Browse files
committed
Fix link errors by making empty methods for now
1 parent d771ceb commit bb4dfa6

File tree

12 files changed

+21
-23
lines changed

12 files changed

+21
-23
lines changed

runtime/flang/close.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ __fortio_close(FIO_FCB *f, int flag)
7171
else
7272
__fort_unlink(f->name);
7373
}
74-
#ifdef WINNT
74+
#ifdef _WIN32
7575
else if (f->status == FIO_SCRATCH)
7676
unlink(f->name);
7777
#endif

runtime/flang/const.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ __get_size_of(int* idx)
429429
return __fort_size_of[*idx];
430430
}
431431

432-
#ifdef WINNT
432+
#ifdef _WIN32
433433

434434
/* pg access routines for data shared between windows dlls */
435435

runtime/flang/cvt.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,8 @@
1515
*
1616
*/
1717

18-
#ifndef WIN64
1918
#include <stdlib.h>
2019
#include <string.h>
21-
#endif
2220
#include <math.h>
2321

2422
#define IEEE 1

runtime/flang/dmod.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ double __fmth_i_dmod(double f, double g);
2424
double
2525
__mth_i_dmod(double f, double g)
2626
{
27-
/* Need to do this way until a bug in the Win64 fmod routine is fixed */
27+
/* TODO: Need to do this way until a bug in the Win64 fmod routine is fixed */
2828
#if defined(_WIN32)
29-
return __fmth_i_dmod(f, g);
29+
return fmod(f, g);
3030
#else
3131
return fmod(f, g);
3232
#endif

runtime/flang/etime3f.c

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -52,17 +52,7 @@ float ENT3F(ETIME, etime)(float *tarray)
5252
#else
5353
#include <Windows.h>
5454

55-
float convert_filetime( const FILETIME *ac_FileTime )
56-
{
57-
ULARGE_INTEGER lv_Large ;
58-
59-
lv_Large.LowPart = ac_FileTime->dwLowDateTime ;
60-
lv_Large.HighPart = ac_FileTime->dwHighDateTime ;
61-
62-
return (float)lv_Large.QuadPart ;
63-
}
64-
65-
float ENT3F(DTIME, dtime)(float *tarray)
55+
float ENT3F(ETIME, etime)(float *tarray)
6656
{
6757
FILETIME accum_user;
6858
FILETIME accum_sys;

runtime/flang/fsync3f.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,12 @@ extern FILE *__getfile3f();
2626

2727
void ENT3F(FSYNC, fsync)(lu) int *lu;
2828
{
29+
#ifndef _WIN32
2930
FILE *f;
3031

3132
f = __getfile3f(*lu);
3233
if (f)
3334
fsync(__io_getfd(f));
3435
return;
36+
#endif
3537
}

runtime/flang/hand.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,4 +131,9 @@ __fort_sethand()
131131
}
132132
}
133133

134+
#else
135+
void
136+
__fort_sethand()
137+
{
138+
}
134139
#endif

runtime/flang/irandm3f.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
#include "ent3f.h"
2323

24-
#ifdef WINNT
24+
#ifdef _WIN32
2525

2626
int ENT3F(IRANDM, irandm)(int *flag)
2727
{

runtime/flang/open.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232

3333
#if defined(_WIN32)
3434
#define access _access
35+
#define unlink _unlink
3536
#endif
3637

3738
static FIO_FCB *Fcb; /* pointer to the file control block */

runtime/flang/utils.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -621,6 +621,10 @@ sincosf(float x, float *sine, float *cosine) {
621621
*cosine = cosf(x);
622622
}
623623

624+
int ftruncate(int fd, __int64 length) {
625+
_chsize_s(fd, length);
626+
}
627+
624628
struct timezone
625629
{
626630
int tz_minuteswest; /* minutes W of Greenwich */

0 commit comments

Comments
 (0)