touched up code for icc
This commit is contained in:
parent
2cb844b8ce
commit
d79d84ee66
@ -1707,8 +1707,8 @@ moo_oop_method_t moo_findmethod (moo_t* moo, moo_oop_t receiver, const moo_oocs_
|
|||||||
MOO_ASSERT (moo, moo->active_method->owner);
|
MOO_ASSERT (moo, moo->active_method->owner);
|
||||||
c = (moo_oop_class_t)((moo_oop_class_t)moo->active_method->owner)->superclass;
|
c = (moo_oop_class_t)((moo_oop_class_t)moo->active_method->owner)->superclass;
|
||||||
if ((moo_oop_t)c == moo->_nil) goto not_found;
|
if ((moo_oop_t)c == moo->_nil) goto not_found;
|
||||||
// c is nil if it reached the top of the hierarch.
|
/* c is nil if it reached the top of the hierarchy.
|
||||||
// otherwise c points to a class object
|
* otherwise c points to a class object */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -22,8 +22,12 @@ SRCS := \
|
|||||||
logfmt.c \
|
logfmt.c \
|
||||||
moo.c \
|
moo.c \
|
||||||
obj.c \
|
obj.c \
|
||||||
|
opt.c \
|
||||||
|
pf.c \
|
||||||
rbt.c \
|
rbt.c \
|
||||||
|
std.c \
|
||||||
sym.c \
|
sym.c \
|
||||||
|
utf16.c \
|
||||||
utf8.c \
|
utf8.c \
|
||||||
utl.c \
|
utl.c \
|
||||||
main.c \
|
main.c \
|
||||||
|
5
moo/lib/pf.c
Normal file
5
moo/lib/pf.c
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
/* this file is used for the icc compiler which
|
||||||
|
* doesn't accept a file name containing a dash over the command line */
|
||||||
|
#include "pf-basic.c"
|
||||||
|
#include "pf-sys.c"
|
||||||
|
#include "pf-utf8.c"
|
@ -89,6 +89,7 @@
|
|||||||
# include <io.h>
|
# include <io.h>
|
||||||
# include <signal.h>
|
# include <signal.h>
|
||||||
# include <errno.h>
|
# include <errno.h>
|
||||||
|
# include <fcntl.h>
|
||||||
|
|
||||||
# if defined(_INTELC32_)
|
# if defined(_INTELC32_)
|
||||||
# define DOS_EXIT 0x4C
|
# define DOS_EXIT 0x4C
|
||||||
@ -2149,28 +2150,23 @@ static void vm_gettime (moo_t* moo, moo_ntime_t* now)
|
|||||||
MOO_INIT_NTIME (now, bigsec, MOO_MSEC_TO_NSEC(bigmsec));
|
MOO_INIT_NTIME (now, bigsec, MOO_MSEC_TO_NSEC(bigmsec));
|
||||||
|
|
||||||
#elif defined(__DOS__) && (defined(_INTELC32_) || defined(__WATCOMC__))
|
#elif defined(__DOS__) && (defined(_INTELC32_) || defined(__WATCOMC__))
|
||||||
|
xtn_t* xtn = GET_XTN(moo);
|
||||||
clock_t c;
|
clock_t c;
|
||||||
moo_uint64_t bigc;
|
|
||||||
|
|
||||||
/* TODO: handle overflow?? */
|
/* TODO: handle overflow?? */
|
||||||
c = clock ();
|
c = clock();
|
||||||
if (c < xtn->tc_last)
|
if (c < xtn->tc_last) xtn->tc_overflow++;
|
||||||
{
|
|
||||||
xtn->tc_overflow++;
|
|
||||||
bigc= ((moo_uint64_t)MOO_TYPE_MAX(clock_t) * xtn->tc_overflow) + c;
|
|
||||||
}
|
|
||||||
else bigc = c;
|
|
||||||
xtn->tc_last = c;
|
xtn->tc_last = c;
|
||||||
|
|
||||||
now->sec = bigc / CLOCKS_PER_SEC;
|
now->sec = c / CLOCKS_PER_SEC;
|
||||||
#if (CLOCKS_PER_SEC == 100)
|
#if (CLOCKS_PER_SEC == 100)
|
||||||
now->nsec = MOO_MSEC_TO_NSEC((bigc % CLOCKS_PER_SEC) * 10);
|
now->nsec = MOO_MSEC_TO_NSEC((c % CLOCKS_PER_SEC) * 10);
|
||||||
#elif (CLOCKS_PER_SEC == 1000)
|
#elif (CLOCKS_PER_SEC == 1000)
|
||||||
now->nsec = MOO_MSEC_TO_NSEC(bigc % CLOCKS_PER_SEC);
|
now->nsec = MOO_MSEC_TO_NSEC(c % CLOCKS_PER_SEC);
|
||||||
#elif (CLOCKS_PER_SEC == 1000000L)
|
#elif (CLOCKS_PER_SEC == 1000000L)
|
||||||
now->nsec = MOO_USEC_TO_NSEC(bigc % CLOCKS_PER_SEC);
|
now->nsec = MOO_USEC_TO_NSEC(c % CLOCKS_PER_SEC);
|
||||||
#elif (CLOCKS_PER_SEC == 1000000000L)
|
#elif (CLOCKS_PER_SEC == 1000000000L)
|
||||||
now->nsec = (bigc % CLOCKS_PER_SEC);
|
now->nsec = (c % CLOCKS_PER_SEC);
|
||||||
#else
|
#else
|
||||||
# error UNSUPPORTED CLOCKS_PER_SEC
|
# error UNSUPPORTED CLOCKS_PER_SEC
|
||||||
#endif
|
#endif
|
||||||
@ -3041,7 +3037,7 @@ static MOO_INLINE void start_ticker (void)
|
|||||||
_dos_setvect (0x1C, dos_timer_intr_handler);
|
_dos_setvect (0x1C, dos_timer_intr_handler);
|
||||||
}
|
}
|
||||||
|
|
||||||
static MOO_INLINE void moo_stop_ticker (void)
|
static MOO_INLINE void stop_ticker (void)
|
||||||
{
|
{
|
||||||
_dos_setvect (0x1C, dos_prev_timer_intr_handler);
|
_dos_setvect (0x1C, dos_prev_timer_intr_handler);
|
||||||
}
|
}
|
||||||
@ -3238,7 +3234,7 @@ static struct
|
|||||||
static int parse_logoptb (moo_t* moo, const moo_bch_t* str, moo_oow_t* xpathlen, moo_bitmask_t* xlogmask)
|
static int parse_logoptb (moo_t* moo, const moo_bch_t* str, moo_oow_t* xpathlen, moo_bitmask_t* xlogmask)
|
||||||
{
|
{
|
||||||
xtn_t* xtn = GET_XTN(moo);
|
xtn_t* xtn = GET_XTN(moo);
|
||||||
moo_bch_t* cm, * flt;
|
const moo_bch_t* cm, * flt;
|
||||||
moo_bitmask_t logmask;
|
moo_bitmask_t logmask;
|
||||||
moo_oow_t i, len, pathlen;
|
moo_oow_t i, len, pathlen;
|
||||||
|
|
||||||
@ -3293,7 +3289,7 @@ static int parse_logoptb (moo_t* moo, const moo_bch_t* str, moo_oow_t* xpathlen,
|
|||||||
static int parse_logoptu (moo_t* moo, const moo_uch_t* str, moo_oow_t* xpathlen, moo_bitmask_t* xlogmask)
|
static int parse_logoptu (moo_t* moo, const moo_uch_t* str, moo_oow_t* xpathlen, moo_bitmask_t* xlogmask)
|
||||||
{
|
{
|
||||||
xtn_t* xtn = GET_XTN(moo);
|
xtn_t* xtn = GET_XTN(moo);
|
||||||
moo_uch_t* cm, * flt;
|
const moo_uch_t* cm, * flt;
|
||||||
moo_bitmask_t logmask;
|
moo_bitmask_t logmask;
|
||||||
moo_oow_t i, len, pathlen;
|
moo_oow_t i, len, pathlen;
|
||||||
|
|
||||||
@ -3645,7 +3641,7 @@ int moo_compilestd (moo_t* moo, const moo_iostd_t* in, moo_oow_t count)
|
|||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
};
|
}
|
||||||
|
|
||||||
void moo_rcvtickstd (moo_t* moo, int v)
|
void moo_rcvtickstd (moo_t* moo, int v)
|
||||||
{
|
{
|
||||||
@ -3752,7 +3748,7 @@ void moo_catch_termreq (void)
|
|||||||
void moo_uncatch_termreq (void)
|
void moo_uncatch_termreq (void)
|
||||||
{
|
{
|
||||||
signal (SIGINT, SIG_DFL);
|
signal (SIGINT, SIG_DFL);
|
||||||
signal (SIGTERM, SGI_DFL);
|
signal (SIGTERM, SIG_DFL);
|
||||||
}
|
}
|
||||||
|
|
||||||
void moo_ignore_termreq (void)
|
void moo_ignore_termreq (void)
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
CFLAGS := /D__DOS__ /DMOO_ENABLE_STATIC_MODULE /DNDEBUG /I..\lib
|
CFLAGS := /D__DOS__ /DMOO_ENABLE_STATIC_MODULE /DNDEBUG /I..\lib
|
||||||
|
|
||||||
SRCS := \
|
SRCS := \
|
||||||
console.c \
|
_con.c \
|
||||||
ffi.c \
|
ffi.c \
|
||||||
stdio.c
|
stdio.c
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user