Index: trunk/src/libctests/glibc/Makefile
===================================================================
--- trunk/src/libctests/glibc/Makefile	(revision 2175)
+++ trunk/src/libctests/glibc/Makefile	(revision 2176)
@@ -9,4 +9,5 @@
 #
 OUTDIR = ./out
+ABSOUTDIR = $(CURDIR)/out
 TS     = $(shell date '+"%Y-%m-%d-%H-%M-%S"')
 LOG    = $(OUTDIR)/$(1)-$(TS).log
@@ -47,9 +48,16 @@
 	-DHAVE_64BIT_FILEIO_TYPES \
 	-DHAVE_SWPRINTF \
-	-DHAVE_RPC_NETDB_H
+	-DHAVE_RPC_NETDB_H \
+	-DHAVE_NL_LANGINFO_EXTENTIONS
 endif
 
 ifeq ($(TARGET),innoteklibc)
 SKIPPED    := \
+	io/test-stat.c \
+	io/test-stat2.c \
+	\
+	login/tst-grantpt.c \
+	login/tst-utmpx.c \
+	\
 	malloc/tst-mallocstate.c \
 	\
@@ -153,5 +161,6 @@
 	posix/tst-pcre.c \
 	misc/tst-tsearch.c  \
-	misc/tst-dirname.c
+	misc/tst-dirname.c \
+	io/bug-ftw4.c
 	
 # NOTES:	
@@ -164,4 +173,5 @@
 # posix/tst-fnmatch.c:				This too!
 # misc/tst-tsearch.c:				This really needs looking at on BSD.
+# io/bug-ftw4.c:					open("dir")
 	
 CFLAGS     += -Zomf -g -I sysdeps/os2 \
@@ -313,4 +323,5 @@
         io/tst-statvfs.c
 # todo io/ftwtest.sh
+io/bug-ftw2.c_DIR = ./io
 
 LIBIO := \
@@ -761,10 +772,14 @@
 define def_simple
 
+$(eval _EXEC := $(strip $(if $($1_DIR),\
+	cd $($(1)_DIR) && LC_ALL=C $($1_ENVS) $(ABSOUTDIR)/$(2).exe $($1_ARGS),\
+	cd $(dir $(OUTDIR)/$2) && LC_ALL=C $($1_ENVS) $(notdir $2).exe $($1_ARGS))))
+
 $(OUTDIR)/$2.result: $1 $(OUTDIR)/$(dir $1).dir_created $($(1)_DEPS)
 	@echo "########## $1"; \
 	echo  "##  BUILDING: $$(CC) $$(CFLAGS) $$(LDFLAGS) -o $(OUTDIR)/$2.exe $($(1)_CFLAGS) $($(1)_LDFLAGS) $$<"; \
 	if $$(CC) $$(CFLAGS) $$(LDFLAGS) -o $(OUTDIR)/$2.exe $($(1)_CFLAGS) $($(1)_LDFLAGS) $$<; then \
-		echo "##  RUNNING : (cd $$(dir $$@) && LC_ALL=C $($1_ENVS) $(notdir $2).exe $($1_ARGS)) $(if $($(1)_INPUT), < $($(1)_INPUT),)"; \
-		if (cd $$(dir $$@) && LC_ALL=C $($1_ENVS) $(notdir $2).exe $($1_ARGS)) $(if $($(1)_INPUT), < $($(1)_INPUT),); then\
+		echo "##  RUNNING : ( $(_EXEC) )$(if $($(1)_INPUT), < $($(1)_INPUT))"; \
+		if ( $(_EXEC) )$(if $($(1)_INPUT), < $($(1)_INPUT)); then \
 			echo OK > $$@; \
 			printf "########## %-26s - SUCCESS\n" "$1"; \
@@ -793,5 +808,8 @@
 	@printf "########## %-26s - SKIPPED\n" "$1"; \
 	echo "SKIPPED" > $$@
-	
+
+$2: $(OUTDIR)/$2.result
+	@
+
 _TESTS += $(OUTDIR)/$2.result
 $(eval _$(TEST) += $(OUTDIR)/$2.result)
Index: trunk/src/libctests/glibc/io/bug-ftw4.c
===================================================================
--- trunk/src/libctests/glibc/io/bug-ftw4.c	(revision 2175)
+++ trunk/src/libctests/glibc/io/bug-ftw4.c	(revision 2176)
@@ -26,4 +26,9 @@
 #include <sys/stat.h>
 #include <unistd.h>
+
+#ifndef HAVE_64BIT_FILEIO_TYPES
+#define ftw64 ftw
+#define stat64 stat
+#endif
 
 static int cb_called;
Index: trunk/src/libctests/glibc/io/ftwtest.c
===================================================================
--- trunk/src/libctests/glibc/io/ftwtest.c	(revision 2175)
+++ trunk/src/libctests/glibc/io/ftwtest.c	(revision 2176)
@@ -7,4 +7,11 @@
 #include <unistd.h>
 #include <sys/stat.h>
+#ifdef FTW_CONTINUE
+#define FTW_CONTINUE 0
+#endif
+#ifdef FTW_STOP
+#define FTW_STOP 1
+#endif
+
 
 
@@ -55,4 +62,5 @@
   printf (", level = %d\n", f->level);
 
+#ifdef FTW_ACTIONRETVAL
   if (skip_siblings && strcmp (name + f->base, skip_siblings) == 0)
     return FTW_SKIP_SIBLINGS;
@@ -60,4 +68,5 @@
   if (skip_subtree && strcmp (name + f->base, skip_subtree) == 0)
     return FTW_SKIP_SUBTREE;
+#endif
 
   return do_exit ? 26 : FTW_CONTINUE;
@@ -88,5 +97,7 @@
   if (skip_subtree || skip_siblings)
     {
+#ifdef FTW_ACTIONRETVAL
       flag |= FTW_ACTIONRETVAL;
+#endif
       if (do_exit)
 	{
Index: trunk/src/libctests/glibc/io/test-lfs.c
===================================================================
--- trunk/src/libctests/glibc/io/test-lfs.c	(revision 2175)
+++ trunk/src/libctests/glibc/io/test-lfs.c	(revision 2176)
@@ -27,4 +27,18 @@
 #include <errno.h>
 #include <sys/resource.h>
+#ifndef HAVE_64BIT_FILEIO_TYPES
+#define getrlimit64     getrlimit
+#define setrlimit64     setrlimit
+#define mkstemp64       mkstemp
+#define fopen64         fopen
+#define fstat64         fstat
+#define stat64          stat
+#define fseeko64        fseeko
+#define ftello64        ftello
+#define lseek64         lseek
+#define rlimit64        rlimit
+#define off64_t         off_t
+#endif
+
 
 /* Prototype for our test function.  */
Index: trunk/src/libctests/glibc/io/test-utime.c
===================================================================
--- trunk/src/libctests/glibc/io/test-utime.c	(revision 2175)
+++ trunk/src/libctests/glibc/io/test-utime.c	(revision 2176)
@@ -51,5 +51,5 @@
   /* Test utime with arg */
   ut.actime = 500000000;
-  ut.modtime = 500000001;
+  ut.modtime = 500000002; /* OS/2 have a two-second resolution api */
   if (utime (file, &ut))
     {
Index: trunk/src/libctests/glibc/io/tst-fcntl.c
===================================================================
--- trunk/src/libctests/glibc/io/tst-fcntl.c	(revision 2175)
+++ trunk/src/libctests/glibc/io/tst-fcntl.c	(revision 2176)
@@ -25,5 +25,8 @@
 #include <unistd.h>
 #include <sys/stat.h>
-
+#ifndef HAVE_64BIT_FILEIO_TYPES
+#define stat64 stat
+#define fstat64 fstat
+#endif
 
 /* Prototype for our test function.  */
