diff --git a/GNUmakefile b/GNUmakefile index ecf8a60..12eca18 100644 --- a/GNUmakefile +++ b/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 diff --git a/io/io_waituntil.c b/io/io_waituntil.c index 36bfbcb..929cc3e 100644 --- a/io/io_waituntil.c +++ b/io/io_waituntil.c @@ -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)