[vlc-commits] Remove unneeded OS/2 hacks

Rémi Denis-Courmont git at videolan.org
Wed May 16 16:32:30 CEST 2012


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed May 16 17:19:21 2012 +0300| [2f2d6f4dd7283d929d86cf107897dfdeb7db946e] | committer: Rémi Denis-Courmont

Remove unneeded OS/2 hacks

They are in src/os2/filesystem.c.

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

 src/posix/filesystem.c |   14 --------------
 1 file changed, 14 deletions(-)

diff --git a/src/posix/filesystem.c b/src/posix/filesystem.c
index 8066bb1..4f57e3b 100644
--- a/src/posix/filesystem.c
+++ b/src/posix/filesystem.c
@@ -154,24 +154,10 @@ char *vlc_readdir( DIR *dir )
     char *path = NULL;
 
     long len = fpathconf (dirfd (dir), _PC_NAME_MAX);
-#if !defined(__OS2__) || !defined(__INNOTEK_LIBC__)
-#ifdef NAME_MAX
     /* POSIX says there shall we room for NAME_MAX bytes at all times */
     if (/*len == -1 ||*/ len < NAME_MAX)
         len = NAME_MAX;
-#else
-    /* OS is broken. Lets assume there is no files left. */
-    if (len == -1)
-        return NULL;
-#endif
     len += offsetof (struct dirent, d_name) + 1;
-#else /* __OS2__ && __INNOTEK_LIBC__ */
-    /* In the implementation of Innotek LIBC, aka kLIBC on OS/2,
-     * fpathconf (_PC_NAME_MAX) is broken, and d_name is not the last member
-     * of struct dirent.
-     * So just allocate as many as the size of struct dirent. */
-    len = sizeof (struct dirent);
-#endif
 
     struct dirent *buf = malloc (len);
     if (unlikely(buf == NULL))



More information about the vlc-commits mailing list