Index: soft/giet_vm/giet_fat32/fat32.h
===================================================================
--- soft/giet_vm/giet_fat32/fat32.h	(revision 662)
+++ soft/giet_vm/giet_fat32/fat32.h	(revision 663)
@@ -9,4 +9,5 @@
 #define _FAT32_H
 
+#include "fat32_shared.h"
 #include "giet_config.h"
 #include "kernel_locks.h"
@@ -125,29 +126,4 @@
 
 #define FAT_INITIALISED         0xBABEF00D
-
-#ifndef _FAT32_SHARED
-#define _FAT32_SHARED
-typedef struct fat_file_info_s
-{
-    unsigned int size;
-    unsigned int offset;
-    unsigned int is_dir;
-}   fat_file_info_t;
-
-typedef struct fat_dirent_s
-{
-    unsigned int cluster;
-    unsigned int size;
-    unsigned int is_dir;
-    char name[36];
-}   fat_dirent_t;
-
-#define SEEK_SET                0
-#define SEEK_CUR                1
-
-#define O_RDONLY                0x01
-#define O_TRUNC                 0x10
-#define O_CREATE                0x20
-#endif // _FAT32_SHARED
 
 /********************************************************************************
Index: soft/giet_vm/giet_fat32/fat32_shared.h
===================================================================
--- soft/giet_vm/giet_fat32/fat32_shared.h	(revision 663)
+++ soft/giet_vm/giet_fat32/fat32_shared.h	(revision 663)
@@ -0,0 +1,58 @@
+////////////////////////////////////////////////////////////////////////////////
+// File     : fat32_shared.h
+// Date     : 27/07/2015
+// Author   : ClÃ©ment GuÃ©rin
+// Copyright (c) UPMC-LIP6
+////////////////////////////////////////////////////////////////////////////////
+
+#ifndef _FAT32_SHARED
+#define _FAT32_SHARED
+
+/********************************************************************************
+  This struct is used by _fat_file_info().
+********************************************************************************/
+
+typedef struct fat_file_info_s
+{
+    unsigned int size;      // size in bytes
+    unsigned int offset;    // offset in bytes
+    unsigned int is_dir;    // is the file a directory
+}   fat_file_info_t;
+
+/********************************************************************************
+  This struct is used by _fat_readdir(). It describes a directory entry.
+********************************************************************************/
+
+typedef struct fat_dirent_s
+{
+    unsigned int cluster;   // cluster index
+    unsigned int size;      // size in bytes
+    unsigned int is_dir;    // is the entry a directory
+    char name[36];          // entry name
+}   fat_dirent_t;
+
+/********************************************************************************
+  _fat_open() flags.
+********************************************************************************/
+
+#define O_RDONLY                0x01
+#define O_TRUNC                 0x10
+#define O_CREATE                0x20
+
+/********************************************************************************
+  _fat_lseek() flags.
+********************************************************************************/
+
+#define SEEK_SET                0
+#define SEEK_CUR                1
+
+#endif // _FAT32_SHARED
+
+// Local Variables:
+// tab-width: 4
+// c-basic-offset: 4
+// c-file-offsets:((innamespace . 0)(inline-open . 0))
+// indent-tabs-mode: nil
+// End:
+// vim: filetype=c:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+
Index: soft/giet_vm/giet_libs/stdio.h
===================================================================
--- soft/giet_vm/giet_libs/stdio.h	(revision 662)
+++ soft/giet_vm/giet_libs/stdio.h	(revision 663)
@@ -12,4 +12,6 @@
 #ifndef _STDIO_H
 #define _STDIO_H
+
+#include "giet_fat32/fat32_shared.h"
 
 // These define must be synchronised with 
@@ -83,33 +85,4 @@
 #define SYSCALL_COPROC_RUN           0x3E
 #define SYSCALL_COPROC_RELEASE       0x3F
-
-////////////////////////////////////////////////////////////////////////////
-// These define must be synchronised vith values defined in fat32.h
-////////////////////////////////////////////////////////////////////////////
-
-#ifndef _FAT32_SHARED
-#define _FAT32_SHARED
-typedef struct fat_file_info_s
-{
-    unsigned int size;
-    unsigned int offset;
-    unsigned int is_dir;
-}   fat_file_info_t;
-
-typedef struct fat_dirent_s
-{
-    unsigned int cluster;
-    unsigned int size;
-    unsigned int is_dir;
-    char name[36];
-}   fat_dirent_t;
-
-#define SEEK_SET            0          // argument for giet_fat_lseek()
-#define SEEK_CUR            1          // argument for giet_fat_lseek
-
-#define O_RDONLY            0x01       // argument for giet_fat_open()
-#define O_TRUNC             0x10       // argument for giet_fat_open()
-#define O_CREATE            0x20       // argument for giet_fat_open()
-#endif // _FAT32_SHARED
 
 ////////////////////////////////////////////////////////////////////////////
