/*****************************************************************************
* fixups.h: portability fixups included from config.h
*****************************************************************************
- * Copyright © 1998-2007 the VideoLAN project
- * $Id$
+ * Copyright © 1998-2008 the VideoLAN project
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*result = *s;
return result;
}
+static inline struct tm *gmtime_r (const time_t *timep, struct tm *result)
+{
+ struct tm *s = gmtime (timep);
+ if (s == NULL)
+ return NULL;
+
+ *result = *s;
+ return result;
+}
#endif
+#ifndef HAVE_DIRENT_H
+typedef void DIR;
+# ifndef FILENAME_MAX
+# define FILENAME_MAX (260)
+# endif
+struct dirent
+{
+ long d_ino; /* Always zero. */
+ unsigned short d_reclen; /* Always zero. */
+ unsigned short d_namlen; /* Length of name in d_name. */
+ char d_name[FILENAME_MAX]; /* File name. */
+};
+# define opendir vlc_opendir
+# define readdir vlc_readdir
+# define closedir vlc_closedir
+# define rewinddir vlc_rewindir
+VLC_EXPORT( void *, vlc_opendir, ( const char * ) );
+VLC_EXPORT( void *, vlc_readdir, ( void * ) );
+VLC_EXPORT( int, vlc_closedir, ( void * ) );
+VLC_INTERNAL( void, vlc_rewinddir, ( void * ) );
+#endif
+
+#ifndef HAVE_USELOCALE
+typedef void *locale_t;
+# define newlocale( a, b, c ) ((locale_t)0)
+# define uselocale( a ) ((locale_t)0)
+# define freelocale( a ) (void)0
+#endif
+
+/* libintl support */
+#define _(str) vlc_gettext (str)
+
+#if defined (ENABLE_NLS)
+# include <libintl.h>
+#else
+# define dgettext(dom, str) ((char *)(str))
+#endif
+
+#define N_(str) gettext_noop (str)
+#define gettext_noop(str) (str)
+
#endif /* !LIBVLC_FIXUPS_H */