diff -Naur mw1/kernel/lib/include/mw.h mw2/kernel/lib/include/mw.h
--- mw1/kernel/lib/include/mw.h	2003-11-25 18:17:32.000000000 +0100
+++ mw2/kernel/lib/include/mw.h	2005-10-25 17:07:57.000000000 +0200
@@ -27,7 +27,7 @@
 #ifndef MW_LIB
 
 #include <stdio.h>
-
+#include <string.h>
 #include <time.h>
 #define	mw_time()	time((time_t *) NULL)
 
@@ -37,6 +37,10 @@
 /* defines malloc as void * */
 #include <stdlib.h>
 
+#define MAXFLOAT  3.40282347e+38F
+#define FLTMAX  MAXFLOAT
+#define FLT_MAX MAXFLOAT
+
 extern void  mwexit(int);
 extern void  mw_exit(int);
 extern void  *mwmalloc(size_t);
diff -Naur mw1/kernel/lib/include/type_conv.h mw2/kernel/lib/include/type_conv.h
--- mw1/kernel/lib/include/type_conv.h	2004-10-08 15:33:33.000000000 +0200
+++ mw2/kernel/lib/include/type_conv.h	2005-10-25 17:07:57.000000000 +0200
@@ -1,7 +1,7 @@
 /*
           List all possible conversions between internal types
   This file has been automatically generated by the MegaWave2 kernel using
-          /home/mw/megawave2/kernel_obj/lib/obj/ix86/make_type_conv
+          /home/lgarrido/megawave2/kernel_obj/lib/obj/ix86/make_type_conv
 */
 
 
diff -Naur mw1/kernel/lib/src/ccmovie.c mw2/kernel/lib/src/ccmovie.c
--- mw1/kernel/lib/src/ccmovie.c	1999-05-26 11:46:45.000000000 +0200
+++ mw2/kernel/lib/src/ccmovie.c	2005-10-25 17:07:56.000000000 +0200
@@ -14,7 +14,7 @@
       94235 Cachan cedex, France. Email: megawave@cmla.ens-cachan.fr 
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
 #include <stdio.h>
-
+#include <string.h>
 #include "mw.h"
 
 /* creates a new ccmovie structure */
diff -Naur mw1/kernel/lib/src/cimage.c mw2/kernel/lib/src/cimage.c
--- mw1/kernel/lib/src/cimage.c	1999-11-12 18:44:01.000000000 +0100
+++ mw2/kernel/lib/src/cimage.c	2005-10-25 17:07:56.000000000 +0200
@@ -14,6 +14,7 @@
       94235 Cachan cedex, France. Email: megawave@cmla.ens-cachan.fr 
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
 #include <stdio.h>
+#include <string.h>
 #include "mw.h"
 
 /* creates a new cimage structure */
diff -Naur mw1/kernel/lib/src/fimage.c mw2/kernel/lib/src/fimage.c
--- mw1/kernel/lib/src/fimage.c	1999-11-12 18:44:59.000000000 +0100
+++ mw2/kernel/lib/src/fimage.c	2005-10-25 17:07:56.000000000 +0200
@@ -15,7 +15,7 @@
       94235 Cachan cedex, France. Email: megawave@cmla.ens-cachan.fr 
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
 #include <stdio.h>
-
+#include <string.h>
 #include "mw.h"
 
 /* creates a new fimage structure */
diff -Naur mw1/kernel/lib/src/fimage_io.c mw2/kernel/lib/src/fimage_io.c
--- mw1/kernel/lib/src/fimage_io.c	2002-01-31 17:49:40.000000000 +0100
+++ mw2/kernel/lib/src/fimage_io.c	2005-10-25 17:07:56.000000000 +0200
@@ -14,6 +14,7 @@
       94235 Cachan cedex, France. Email: megawave@cmla.ens-cachan.fr 
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
 #include <stdio.h>
+#include <string.h>
 #include <fcntl.h>
 #include <sys/file.h>
 
diff -Naur mw1/kernel/lib/src/jpeg_io.c mw2/kernel/lib/src/jpeg_io.c
--- mw1/kernel/lib/src/jpeg_io.c	2002-07-04 22:41:19.000000000 +0200
+++ mw2/kernel/lib/src/jpeg_io.c	2005-10-25 17:07:56.000000000 +0200
@@ -19,6 +19,7 @@
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
 
 #include <stdio.h>
+#include <string.h>
 #ifdef JPEG
 #include <setjmp.h>
 #include <jpeglib.h>
@@ -408,7 +409,7 @@
 
   /* Add comment */
   sprintf(comment,"%s JPEG Quality %d",image->cmt,Q);
-  jpeg_write_marker(&cinfo,JPEG_COM,(byte *) comment,(u_int) strlen(comment));
+  jpeg_write_marker(&cinfo,JPEG_COM,(unsigned char *) comment,(unsigned int) strlen(comment));
 
   /* Save the bitplanes */
   pic=image->gray;
@@ -487,7 +488,7 @@
 
   /* Add comment */
   sprintf(comment,"%s JPEG Quality %d",image->cmt,Q);
-  jpeg_write_marker(&cinfo,JPEG_COM,(byte *) comment,(u_int) strlen(comment));
+  jpeg_write_marker(&cinfo,JPEG_COM,(unsigned char *) comment,(unsigned int) strlen(comment));
 
   /* Save the bitplanes */
   N = image->ncol * image->nrow * 3;
diff -Naur mw1/kernel/lib/src/Makefile mw2/kernel/lib/src/Makefile
--- mw1/kernel/lib/src/Makefile	2003-07-04 11:55:43.000000000 +0200
+++ mw2/kernel/lib/src/Makefile	2005-10-25 17:07:56.000000000 +0200
@@ -62,7 +62,7 @@
 # Version Silicon Graphics IRIX
 
 # Version GCC (ex. : PC Linux)
-CC = gcc $(CCMODE) -fpic
+CC = gcc --ansi $(CCMODE) -fpic
 
 # Archiver
 ARFLAGS  = rcv
diff -Naur mw1/kernel/lib/src/make_type_conv.c mw2/kernel/lib/src/make_type_conv.c
--- mw1/kernel/lib/src/make_type_conv.c	2002-07-04 21:21:24.000000000 +0200
+++ mw2/kernel/lib/src/make_type_conv.c	2005-10-25 17:07:57.000000000 +0200
@@ -24,6 +24,7 @@
 #include <stdio.h>
 #include <string.h>
 #include <ctype.h>
+#include <stdlib.h>
 
 #include "native_ftype.h"
 
diff -Naur mw1/kernel/lib/src/mwio.c mw2/kernel/lib/src/mwio.c
--- mw1/kernel/lib/src/mwio.c	2003-04-12 11:40:51.000000000 +0200
+++ mw2/kernel/lib/src/mwio.c	2005-10-25 17:07:56.000000000 +0200
@@ -138,7 +138,7 @@
   struct stat statbuf;
 
   if (stat(fname,&statbuf) != 0) return(0);
-  if ((statbuf.st_mode & S_IFDIR) == S_IFDIR) 
+  if (S_ISDIR(statbuf.st_mode)) 
     {
       mwerror(WARNING,1,"'%s' is a directory, trying another match...\n",fname);
       return(2); /* directory */
@@ -149,8 +149,8 @@
       return(3); /* not readable */
     }
 
-  if ((statbuf.st_mode & S_IFREG) == S_IFREG) return(1); /* regular */
-  if ((statbuf.st_mode & S_IFLNK) == S_IFLNK) return(1); /* link */
+  if (S_ISREG(statbuf.st_mode)) return(1); /* regular */
+  if (S_ISLNK(statbuf.st_mode)) return(1); /* link */
 
   mwerror(WARNING,1,"'%s' is not a regular nor a link file, trying another match...\n",
 	  fname);
@@ -192,7 +192,7 @@
       
       sprintf(newdir,"%s/%s",searchdir,dirbuf->d_name);	      
       if ((stat(newdir,&statbuf) == 0) &&
-	  ((statbuf.st_mode & S_IFDIR) == S_IFDIR))
+	  (S_ISDIR(statbuf.st_mode)))
 	/* dirbuf->d_name is a directory */
 	if (_search_filename_in_dir(fname,newdir,founddir)==TRUE)
 	  return(TRUE);
diff -Naur mw1/kernel/lib/src/type_conv.c mw2/kernel/lib/src/type_conv.c
--- mw1/kernel/lib/src/type_conv.c	2004-10-08 15:33:33.000000000 +0200
+++ mw2/kernel/lib/src/type_conv.c	2005-10-25 17:07:56.000000000 +0200
@@ -1,7 +1,7 @@
 /*
           Extended conversion function for internal and external types
   This file has been automatically generated by the MegaWave2 kernel using
-          /home/mw/megawave2/kernel_obj/lib/obj/ix86/make_type_conv
+          /home/lgarrido/megawave2/kernel_obj/lib/obj/ix86/make_type_conv
 */
 
 #include <stdio.h>
diff -Naur mw1/kernel/lib/src/wtrans2d_io.c mw2/kernel/lib/src/wtrans2d_io.c
--- mw1/kernel/lib/src/wtrans2d_io.c	2000-08-13 10:39:08.000000000 +0200
+++ mw2/kernel/lib/src/wtrans2d_io.c	2005-10-25 17:07:56.000000000 +0200
@@ -14,6 +14,7 @@
       94235 Cachan cedex, France. Email: megawave@cmla.ens-cachan.fr 
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
 #include <stdio.h>
+#include <string.h>
 #include <fcntl.h>
 #include <sys/file.h>
 #include <string.h>
diff -Naur mw1/kernel/mwp/bintree.c mw2/kernel/mwp/bintree.c
--- mw1/kernel/mwp/bintree.c	1999-06-01 11:37:41.000000000 +0200
+++ mw2/kernel/mwp/bintree.c	2005-10-25 17:07:57.000000000 +0200
@@ -8,6 +8,7 @@
 
 /* Fichiers d'include */
 #include <stdio.h>
+#include <string.h>
 #include "bintree.h"
 #include "symbol.h"
 #include "token.h"
diff -Naur mw1/kernel/mwp/fillmwarg.c mw2/kernel/mwp/fillmwarg.c
--- mw1/kernel/mwp/fillmwarg.c	2002-07-15 11:37:23.000000000 +0200
+++ mw2/kernel/mwp/fillmwarg.c	2005-10-25 17:07:57.000000000 +0200
@@ -15,6 +15,7 @@
 
 /* Fichiers d'include */
 #include <stdio.h>
+#include <string.h>
 #include <limits.h>
 #include <stdlib.h>
 #include <ctype.h>
@@ -326,9 +327,9 @@
   Symbol *s;
   struct Ioinfo *info;
 #ifdef __STDC__
-  static struct Ioinfo *iotype(char *, Node *, Node *, short);
+  struct Ioinfo *iotype(char *, Node *, Node *, short);
 #else
-  static struct Ioinfo *iotype();
+  struct Ioinfo *iotype();
 #endif
 
 #ifdef DEBUG
@@ -414,9 +415,9 @@
   Symbol *s;
   struct Ioinfo *info;
 #ifdef __STDC__
-  static struct Ioinfo *iotype(char *, Node *, Node *, short);
+  struct Ioinfo *iotype(char *, Node *, Node *, short);
 #else
-  static struct Ioinfo *iotype();
+  struct Ioinfo *iotype();
 #endif
 
 #ifdef DEBUG
@@ -476,9 +477,9 @@
   Symbol *s;
   struct Ioinfo *info;
 #ifdef __STDC__
-  static struct Ioinfo *iotype(char *, Node *, Node *, short);
+  struct Ioinfo *iotype(char *, Node *, Node *, short);
 #else
-  static struct Ioinfo *iotype();
+  struct Ioinfo *iotype();
 #endif
 #ifdef DEBUG
    PRDBG("set_neededarg(0x%x, 0x%x)\n", arg, e);
@@ -594,9 +595,9 @@
   Symbol *s;
   struct Ioinfo *info;
 #ifdef __STDC__
-  static struct Ioinfo *iotype(char *, Node *, Node *, short);
+  struct Ioinfo *iotype(char *, Node *, Node *, short);
 #else
-  static struct Ioinfo *iotype();
+  struct Ioinfo *iotype();
 #endif
 #ifdef DEBUG
    PRDBG("set_optarg(0x%X, 0x%X)\n", arg, e);
@@ -694,9 +695,9 @@
   Symbol *s;
   struct Ioinfo *info;
 #ifdef __STDC__
-  static struct Ioinfo *iotype(char *, Node *, Node *, short);
+  struct Ioinfo *iotype(char *, Node *, Node *, short);
 #else
-  static struct Ioinfo *iotype();
+  struct Ioinfo *iotype();
 #endif
   /* Argtype = VARARG */
   e->t = VARARG;
@@ -793,9 +794,9 @@
   Symbol *s;
   struct Ioinfo *info;
 #ifdef __STDC__
-  static struct Ioinfo *iotype(char *, Node *, Node *, short);
+  struct Ioinfo *iotype(char *, Node *, Node *, short);
 #else
-  static struct Ioinfo *iotype();
+  struct Ioinfo *iotype();
 #endif
   /* Argtype = NOTUSEDARG */
   e->t = NOTUSEDARG;
@@ -1233,9 +1234,9 @@
 #endif
 
 #ifdef __STDC__
-static struct Ioinfo *iotype(char *name, Node *type, Node *access, short state)
+struct Ioinfo *iotype(char *name, Node *type, Node *access, short state)
 #else
-static struct Ioinfo *iotype(name, type, access, state)
+struct Ioinfo *iotype(name, type, access, state)
 char *name;
 
 /* Node *type, access;  Modif JF 21/3/94 */
diff -Naur mw1/kernel/mwp/genifile.c mw2/kernel/mwp/genifile.c
--- mw1/kernel/mwp/genifile.c	2000-12-25 18:50:38.000000000 +0100
+++ mw2/kernel/mwp/genifile.c	2005-10-25 17:07:57.000000000 +0200
@@ -13,6 +13,7 @@
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
 
 #include <stdio.h>
+#include <string.h>
 #include "bintree.h"
 #include "symbol.h"
 #include "token.h"
diff -Naur mw1/kernel/mwp/genmain.c mw2/kernel/mwp/genmain.c
--- mw1/kernel/mwp/genmain.c	2003-04-09 16:06:59.000000000 +0200
+++ mw2/kernel/mwp/genmain.c	2005-10-25 17:07:57.000000000 +0200
@@ -30,6 +30,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
 
 #include "bintree.h"
 #include "symbol.h"
diff -Naur mw1/kernel/mwp/genxmain.c mw2/kernel/mwp/genxmain.c
--- mw1/kernel/mwp/genxmain.c	2003-07-01 19:28:22.000000000 +0200
+++ mw2/kernel/mwp/genxmain.c	2005-10-25 17:07:57.000000000 +0200
@@ -14,6 +14,7 @@
 
 #ifdef XMWP
 #include <stdio.h>
+#include <string.h>
 #include "bintree.h"
 #include "symbol.h"
 #include "token.h"
diff -Naur mw1/kernel/mwp/io.c mw2/kernel/mwp/io.c
--- mw1/kernel/mwp/io.c	2002-02-06 20:38:45.000000000 +0100
+++ mw2/kernel/mwp/io.c	2005-10-25 17:07:57.000000000 +0200
@@ -13,6 +13,7 @@
 
 #define sparc 1
 #include <stdio.h>
+#include <string.h>
 #include <stdlib.h>
 #include <errno.h>
 #ifdef __STDC__
diff -Naur mw1/kernel/mwp/main.c mw2/kernel/mwp/main.c
--- mw1/kernel/mwp/main.c	2001-12-27 22:56:44.000000000 +0100
+++ mw2/kernel/mwp/main.c	2005-10-25 17:07:57.000000000 +0200
@@ -255,7 +255,7 @@
 	   and it seems useless on kernel 2.0.36 : assuming that -undef was needed
 	   by very old kernels only and remove this flag.
 	*/
-	sprintf(buffer, "%s -C %s %s %s/mw%d.i", CPPCMD, bufcpp, argv[optind], 
+	sprintf(buffer, "%s -undef -C %s %s %s/mw%d.i", CPPCMD, bufcpp, argv[optind], 
                                                               tmpdir, getpid());
 #else
 	sprintf(buffer, "%s -C %s %s %s/mw%d.i", CPPCMD, bufcpp, argv[optind], 
diff -Naur mw1/kernel/mwp/mw_present.c mw2/kernel/mwp/mw_present.c
--- mw1/kernel/mwp/mw_present.c	1999-06-01 12:22:54.000000000 +0200
+++ mw2/kernel/mwp/mw_present.c	2005-10-25 17:07:57.000000000 +0200
@@ -7,6 +7,7 @@
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
 
 #include <stdio.h>
+#include <string.h>
 #include <sys/types.h>
 #include <sys/time.h>
 #include <time.h>
diff -Naur mw1/kernel/mwp/omwarg.c mw2/kernel/mwp/omwarg.c
--- mw1/kernel/mwp/omwarg.c	2003-07-01 19:57:54.000000000 +0200
+++ mw2/kernel/mwp/omwarg.c	2005-10-25 17:07:57.000000000 +0200
@@ -12,6 +12,7 @@
 */
 
 #include <stdio.h>
+#include <string.h>
 #include "bintree.h"
 #include "symbol.h"
 #include "token.h"
diff -Naur mw1/kernel/mwp/printnod.c mw2/kernel/mwp/printnod.c
--- mw1/kernel/mwp/printnod.c	2001-06-07 12:12:45.000000000 +0200
+++ mw2/kernel/mwp/printnod.c	2005-10-25 17:07:57.000000000 +0200
@@ -15,6 +15,7 @@
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
 
 #include <stdio.h>
+#include <string.h>
 #include <ctype.h>
 #include "bintree.h"
 #include "symbol.h"
diff -Naur mw1/kernel/Wdevice/src/W_X11R4.c mw2/kernel/Wdevice/src/W_X11R4.c
--- mw1/kernel/Wdevice/src/W_X11R4.c	2002-10-18 15:32:22.000000000 +0200
+++ mw2/kernel/Wdevice/src/W_X11R4.c	2005-10-25 17:07:57.000000000 +0200
@@ -22,6 +22,7 @@
 
 #include <stdio.h>
 #include <math.h>
+#include <string.h>
 
 /* W_X11R4 Include File */
 #include "W_X11R4.h"
diff -Naur mw1/src/image/level_lines/flstb_quantize.c mw2/src/image/level_lines/flstb_quantize.c
--- mw1/src/image/level_lines/flstb_quantize.c	2002-01-24 23:50:42.000000000 +0100
+++ mw2/src/image/level_lines/flstb_quantize.c	2005-10-25 17:07:55.000000000 +0200
@@ -3,8 +3,7 @@
   name = {flstb_quantize}; 
   version = {"1.2"}; 
   author = {"Pascal Monasse"}; 
-  function = {"Quantize the Fast Level Sets Transform of a bilinear \
-interpolated image"};
+  function = {"Quantize the Fast Level Sets Transform of a bilinear \ interpolated image"};
   usage = { 
     'l': levels -> pLevels "Levels of quantization (Fsignal)",
     'o': offset -> pOffset "Offset of the quantization (default 0.5)",
diff -Naur mw1/src/image/level_lines/flst_pixels.c mw2/src/image/level_lines/flst_pixels.c
--- mw1/src/image/level_lines/flst_pixels.c	2001-11-29 20:23:56.000000000 +0100
+++ mw2/src/image/level_lines/flst_pixels.c	2005-10-25 17:07:55.000000000 +0200
@@ -3,8 +3,7 @@
   name = {flst_pixels}; 
   version = {"1.0"}; 
   author = {"Pascal Monasse"}; 
-  function = {"Fill the field PIXELS of a tree of shapes.\
- Module meant to be called from another one, not from the command line"};
+  function = {"Fill the field PIXELS of a tree of shapes.\ Module meant to be called from another one, not from the command line"};
   usage = { 
     tree -> pTree "The tree of the interpolated image"
     }; 
