[vlc-commits] Move 'struct stat' forward declaration where actually needed

Rémi Denis-Courmont git at videolan.org
Fri Jan 27 22:31:55 CET 2012


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Fri Jan 27 22:59:26 2012 +0200| [9ce7c7d986c8e12a618804063ea06c58503bf7b8] | committer: Rémi Denis-Courmont

Move 'struct stat' forward declaration where actually needed

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9ce7c7d986c8e12a618804063ea06c58503bf7b8
---

 include/vlc_common.h  |    5 -----
 include/vlc_fs.h      |    2 ++
 src/modules/modules.h |    3 +++
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/include/vlc_common.h b/include/vlc_common.h
index 1c64ecd..481f4cd 100644
--- a/include/vlc_common.h
+++ b/include/vlc_common.h
@@ -388,7 +388,6 @@ typedef struct update_iterator_t update_iterator_t;
 /* Meta engine */
 typedef struct meta_engine_t meta_engine_t;
 
-/* stat/lstat/fstat */
 #ifdef WIN32
 # include <sys/stat.h>
 
@@ -397,10 +396,6 @@ struct _stati64;
 #  define stat _stati64
 #  define fstat _fstati64
 #endif
-
-/* You should otherwise use vlc_stat and vlc_lstat. */
-#else
-struct stat;
 #endif
 
 /**
diff --git a/include/vlc_fs.h b/include/vlc_fs.h
index 99c2d87..d8a54ed 100644
--- a/include/vlc_fs.h
+++ b/include/vlc_fs.h
@@ -68,6 +68,8 @@ static inline void vlc_rewinddir( DIR *dir )
 # define rewinddir vlc_rewinddir
 #endif
 
+struct stat;
+
 VLC_API int vlc_stat( const char *filename, struct stat *buf );
 VLC_API int vlc_lstat( const char *filename, struct stat *buf );
 
diff --git a/src/modules/modules.h b/src/modules/modules.h
index e9b1297..a870560 100644
--- a/src/modules/modules.h
+++ b/src/modules/modules.h
@@ -121,6 +121,9 @@ void module_Unload (module_handle_t);
 void   CacheMerge (vlc_object_t *, module_t *, module_t *);
 void   CacheDelete(vlc_object_t *, const char *);
 size_t CacheLoad  (vlc_object_t *, const char *, module_cache_t **);
+
+struct stat;
+
 int CacheAdd (module_cache_t **, size_t *,
               const char *, const struct stat *, module_t *);
 void CacheSave  (vlc_object_t *, const char *, module_cache_t *, size_t);



More information about the vlc-commits mailing list