*duh* one extra zero
This commit is contained in:
parent
29cfd8df4e
commit
0a38894c43
10
GNUmakefile
10
GNUmakefile
@ -27,12 +27,18 @@ path = $(subst :, ,$(PATH))
|
||||
diet_path = $(foreach dir,$(path),$(wildcard $(dir)/diet))
|
||||
ifeq ($(strip $(diet_path)),)
|
||||
ifneq ($(wildcard /opt/diet/bin/diet),)
|
||||
DIET=/opt/diet/bin/diet -Os
|
||||
DIET=/opt/diet/bin/diet
|
||||
else
|
||||
DIET=
|
||||
endif
|
||||
else
|
||||
DIET:=$(strip $(diet_path)) -Os
|
||||
DIET:=$(strip $(diet_path))
|
||||
endif
|
||||
|
||||
ifneq ($(DIET),)
|
||||
ifneq ($(DEBUG),1)
|
||||
DIET+=-Os
|
||||
endif
|
||||
endif
|
||||
# to build without diet libc support, use $ make DIET=
|
||||
# see http://www.fefe.de/dietlibc/ for details about the diet libc
|
||||
|
@ -5,9 +5,13 @@ void io_waituntil(tai6464 t) {
|
||||
uint64 x,y;
|
||||
tai6464 now,diff;
|
||||
taia_now(&now);
|
||||
taia_sub(&diff,&t,&now);
|
||||
if (!umult64(diff.sec.x,1000,&x) || (y=x+diff.nano/10000000)<x)
|
||||
y=-1; /* overflow; wait indefinitely */
|
||||
if (!y && diff.nano) y=1;
|
||||
if (taia_less(&t,&now))
|
||||
y=0;
|
||||
else {
|
||||
taia_sub(&diff,&t,&now);
|
||||
if (!umult64(diff.sec.x,1000,&x) || (y=x+diff.nano/1000000)<x)
|
||||
y=-1; /* overflow; wait indefinitely */
|
||||
if (!y && diff.nano) y=1;
|
||||
}
|
||||
io_waituntil2(y);
|
||||
}
|
||||
|
@ -15,13 +15,13 @@ extern HANDLE io_comport;
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
tai6464 timeout;
|
||||
unsigned int wantread:1;
|
||||
unsigned int wantwrite:1;
|
||||
unsigned int canread:1;
|
||||
unsigned int canwrite:1;
|
||||
unsigned int nonblock:1;
|
||||
unsigned int inuse:1;
|
||||
tai6464 timeout;
|
||||
long next_read;
|
||||
long next_write;
|
||||
void* cookie;
|
||||
|
Loading…
x
Reference in New Issue
Block a user