diff --new-file -urp gzipfs/cmpdi2.c gzipfs-zaurus/cmpdi2.c
--- gzipfs/cmpdi2.c	1970-01-01 01:00:00.000000000 +0100
+++ gzipfs-zaurus/cmpdi2.c	2005-09-21 00:01:27.000000000 +0200
@@ -0,0 +1,51 @@
+/* More subroutines needed by GCC output code on some machines.  */
+/* Compile this one with gcc.  */
+/* Copyright (C) 1989, 92-98, 1999 Free Software Foundation, Inc.
+
+This file is part of GNU CC.
+
+GNU CC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU CC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU CC; see the file COPYING.  If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.  */
+
+/* As a special exception, if you link this library with other files,
+   some of which are compiled with GCC, to produce an executable,
+   this library does not by itself cause the resulting executable
+   to be covered by the GNU General Public License.
+   This exception does not however invalidate any other reasons why
+   the executable file might be covered by the GNU General Public License.
+ */
+/* support functions required by the kernel. based on code from gcc-2.95.3 */
+/* I Molton     29/07/01 */
+
+#include "gcclib.h"
+
+word_type
+__cmpdi2 (DItype a, DItype b)
+{
+  DIunion au, bu;
+
+  au.ll = a, bu.ll = b;
+
+  if ((USItype) au.s.high < (USItype) bu.s.high)
+    return 0;
+  else if ((USItype) au.s.high > (USItype) bu.s.high)
+    return 2;
+  if ((USItype) au.s.low < (USItype) bu.s.low)
+    return 0;
+  else if ((USItype) au.s.low > (USItype) bu.s.low)
+    return 2;
+  return 1;
+}
+
diff --new-file -urp gzipfs/fistdev.mk gzipfs-zaurus/fistdev.mk
--- gzipfs/fistdev.mk	1970-01-01 01:00:00.000000000 +0100
+++ gzipfs-zaurus/fistdev.mk	2005-09-21 08:39:42.000000000 +0200
@@ -0,0 +1,3 @@
+TOPINC=-I/home/darkstar/zaurus/kernel/linux-cacko-1.22.brew/include
+LINUXSRC=/home/darkstar/zaurus/kernel/linux-cacko-1.22.brew
+EXTRACFLAGS=-w -mapcs -fno-common -pipe -mapcs-32 -march=armv4 -Wa,-mxscale -mtune=strongarm -mshort-load-bytes -msoft-float
diff --new-file -urp gzipfs/fist_gzipfs.h gzipfs-zaurus/fist_gzipfs.h
--- gzipfs/fist_gzipfs.h	2005-09-21 08:38:47.000000000 +0200
+++ gzipfs-zaurus/fist_gzipfs.h	2005-09-21 08:40:14.000000000 +0200
@@ -23,7 +23,7 @@
 #define FIST_ACCESSMODE_READWRITE 1
 
 /* Turn on debugging? */
-#define FIST_DEBUG 1
+//#define FIST_DEBUG 1
 
 /* Turn on dynamic_inode_numbers? */
 /* #undef FIST_DYNAMIC_INODE_NUMBERS */
diff --new-file -urp gzipfs/gcclib.h gzipfs-zaurus/gcclib.h
--- gzipfs/gcclib.h	1970-01-01 01:00:00.000000000 +0100
+++ gzipfs-zaurus/gcclib.h	2005-09-16 05:45:18.000000000 +0200
@@ -0,0 +1,25 @@
+/* gcclib.h -- definitions for various functions 'borrowed' from gcc-2.95.3 */
+/* I Molton     29/07/01 */
+
+#define BITS_PER_UNIT  8
+#define SI_TYPE_SIZE (sizeof (SItype) * BITS_PER_UNIT)
+
+typedef unsigned int UQItype    __attribute__ ((mode (QI)));
+typedef          int SItype     __attribute__ ((mode (SI)));
+typedef unsigned int USItype    __attribute__ ((mode (SI)));
+typedef          int DItype     __attribute__ ((mode (DI)));
+typedef          int word_type 	__attribute__ ((mode (__word__)));
+typedef unsigned int UDItype    __attribute__ ((mode (DI)));
+
+#ifdef __ARMEB__
+  struct DIstruct {SItype high, low;};
+#else
+  struct DIstruct {SItype low, high;};
+#endif
+
+typedef union
+{
+  struct DIstruct s;
+  DItype ll;
+} DIunion;
+
diff --new-file -urp gzipfs/Makefile gzipfs-zaurus/Makefile
--- gzipfs/Makefile	2005-09-21 08:38:47.000000000 +0200
+++ gzipfs-zaurus/Makefile	2005-09-21 08:36:00.000000000 +0200
@@ -12,7 +12,7 @@ CFLAGS = -D__KERNEL__ -DMODULE -DFISTGEN
 UCFLAGS = -DFISTGEN -I. ${TOPINC} -g -O2 -Wall -Wno-unused # -Werror
 
 O_TARGET := gzipfs.o
-ADD_M_SRC = inflate.c zutil.c deflate.c trees.c inftrees.c adler32.c inffast.c compress.c  fist_aux.c mmap.c
+ADD_M_SRC = inflate.c zutil.c deflate.c trees.c inftrees.c adler32.c inffast.c compress.c  fist_aux.c mmap.c cmpdi2.c
 # vm_area.o is not needed if we use generic_file_mmap
 # mmap.o and attach.o are optionally added
 O_OBJS   := fist_gzipfs.o \
diff --new-file -urp gzipfs/mmap.c gzipfs-zaurus/mmap.c
--- gzipfs/mmap.c	2005-09-21 08:38:48.000000000 +0200
+++ gzipfs-zaurus/mmap.c	2005-09-21 08:39:23.000000000 +0200
@@ -145,7 +145,7 @@ gzipfs_writepage(page_t *page)
      * traverse the list of current files, and compare to find the
      * given inode to get file_t for the given page
      */
-    atomic_inc_and_test(&files->count);
+    atomic_inc(&files->count);
     read_lock(&files->file_lock);
 
     j = 0;
@@ -183,7 +183,7 @@ gzipfs_writepage(page_t *page)
     }
 
     read_unlock(&files->file_lock);
-    atomic_dec_and_test(&files->count);
+    atomic_dec(&files->count);
 
     /*
      * We have not got the file structure.  maybe, the process

