Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
*.o
generated
run
TAGS
bin/*
11 changes: 9 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,23 @@ ENDIAN=little
#
BIN=bin

# Lib dir
ifeq ($(OS),osx)
LIBDIR=/sw/lib
else
LIBDIR=/usr/lib
endif

RM=rm -f
CC=gcc
CLD=gcc -O3 -L/sw/lib
CLD=gcc -O3 -L$(LIBDIR)
YACC=bison -v -b$(GENERATED)/y
LEX=lex

INCLUDE=include
GENERATED=generated
DEFINES=-DU2_OS_$(OS) -DU2_OS_ENDIAN_$(ENDIAN)
CFLAGS=-O3 -I/sw/include -I$(INCLUDE) -I $(GENERATED) $(DEFINES)
CFLAGS=-O3 -I$(LIBDIR) -I$(INCLUDE) -I $(GENERATED) $(DEFINES)
CWFLAGS=-Wall

.y.o:
Expand Down
14 changes: 12 additions & 2 deletions c/vere.c
Original file line number Diff line number Diff line change
Expand Up @@ -439,9 +439,14 @@ _vere_kernel(struct vere_state* v,
}
else {
if ( (stat(paq_c, &paq_stat) < 0) ||
#ifdef U2_OS_linux
(pod_stat.st_mtime > paq_stat.st_mtime)
#else
(pod_stat.st_mtimespec.tv_sec > paq_stat.st_mtimespec.tv_sec) ||
((pod_stat.st_mtimespec.tv_sec == (pod_stat.st_mtimespec.tv_sec)) &&
(pod_stat.st_mtimespec.tv_nsec > paq_stat.st_mtimespec.tv_nsec)) )
(pod_stat.st_mtimespec.tv_nsec > paq_stat.st_mtimespec.tv_nsec))
#end
)
{
FILE *fil;
u3_fox src, gen, ker;
Expand Down Expand Up @@ -661,9 +666,14 @@ _vere_shell(struct vere_state* v,

if ( v->new_b ||
(stat(paq_c, &paq_stat) < 0) ||
#ifdef U2_OS_linux
(pod_stat.st_mtime > paq_stat.st_mtime)
#else
(pod_stat.st_mtimespec.tv_sec > paq_stat.st_mtimespec.tv_sec) ||
((pod_stat.st_mtimespec.tv_sec == (pod_stat.st_mtimespec.tv_sec)) &&
(pod_stat.st_mtimespec.tv_nsec > paq_stat.st_mtimespec.tv_nsec)) )
(pod_stat.st_mtimespec.tv_nsec > paq_stat.st_mtimespec.tv_nsec))
#end
)
{
printf("[vere: building shell: %s]\n", pod_c);
ver = _vere_fire(v, _vere_file(v->x, pod_c));
Expand Down
7 changes: 6 additions & 1 deletion f/unix.c
Original file line number Diff line number Diff line change
Expand Up @@ -306,9 +306,14 @@ u2_ux_fresh(const c3_c* paf_c,
}
else {
if ( (stat(nom_c, &nom_stat) < 0) ||
#ifdef U2_OS_linux
(nam_stat.st_mtime > nom_stat.st_mtime)
#else
(nam_stat.st_mtimespec.tv_sec > nom_stat.st_mtimespec.tv_sec) ||
((nam_stat.st_mtimespec.tv_sec == (nam_stat.st_mtimespec.tv_sec)) &&
(nam_stat.st_mtimespec.tv_nsec > nom_stat.st_mtimespec.tv_nsec)) )
(nam_stat.st_mtimespec.tv_nsec > nom_stat.st_mtimespec.tv_nsec))
#endif
)
{
return u2_no;
}
Expand Down
2 changes: 1 addition & 1 deletion include/c/portable.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
**/
# if defined(U2_OS_linux)
# define U2_OS_LoomBase 0x4000000

# define U2_OS_LoomBits 28 // ie, 2^28 words == 1GB
# elif defined(U2_OS_osx)
# ifdef __LP64__
# define U2_OS_LoomBase 0x200000000
Expand Down