# define LIBVLC_EXPORT
#endif
#define VLC_PUBLIC_API LIBVLC_EXTERN LIBVLC_EXPORT
-#define VLC_PRIVATE_API LIBVLC_EXTERN LIBVLC_EXPORT /* FIXME: dubious! */
#define VLC_EXPORT( type, name, args ) \
LIBVLC_EXTERN LIBVLC_EXPORT type name args
#define ntoh16(i) ntohs(i)
#define ntoh32(i) ntohl(i)
-#ifdef WORDS_BIGENDIAN
-# define hton64(i) ( i )
-# define ntoh64(i) ( i )
-#else
-# define hton64(i) U64_AT(&i)
-# define ntoh64(i) U64_AT(&i)
-#endif
+static inline uint64_t ntoh64 (uint64_t ll)
+{
+ union { uint64_t qw; uint8_t b[16]; } v = { ll };
+ return ((uint64_t)v.b[0] << 56)
+ | ((uint64_t)v.b[1] << 48)
+ | ((uint64_t)v.b[2] << 40)
+ | ((uint64_t)v.b[3] << 32)
+ | ((uint64_t)v.b[4] << 24)
+ | ((uint64_t)v.b[5] << 16)
+ | ((uint64_t)v.b[6] << 8)
+ | ((uint64_t)v.b[7] << 0);
+}
+#define hton64(i) ntoh64(i)
/* Format string sanity checks */
-#ifdef HAVE_ATTRIBUTE_FORMAT
-# define ATTRIBUTE_FORMAT(x,y) __attribute__ ((format(printf,x,y)))
-#else
-# define ATTRIBUTE_FORMAT(x,y)
-#endif
-
-/* Alignment of critical static data structures */
-#ifdef ATTRIBUTE_ALIGNED_MAX
-# define ATTR_ALIGN(align) __attribute__ ((__aligned__ ((ATTRIBUTE_ALIGNED_MAX < align) ? ATTRIBUTE_ALIGNED_MAX : align)))
+#ifdef __GNUC__
+# define LIBVLC_FORMAT(x,y) __attribute__ ((format(printf,x,y)))
#else
-# define ATTR_ALIGN(align)
+# define LIBVLC_FORMAT(x,y)
#endif
/* */
VLC_EXPORT( int, __vlc_execve, ( vlc_object_t *p_object, int i_argc, char *const *pp_argv, char *const *pp_env, const char *psz_cwd, const char *p_in, size_t i_in, char **pp_data, size_t *pi_data ) );
#define vlc_execve(a,b,c,d,e,f,g,h,i) __vlc_execve(VLC_OBJECT(a),b,c,d,e,f,g,h,i)
+/* dir wrappers (defined in src/extras/libc.c) */
+VLC_EXPORT(int, vlc_wclosedir, ( void *_p_dir ));
+
/*****************************************************************************
* CPU capabilities
*****************************************************************************/
/*****************************************************************************
* I18n stuff
*****************************************************************************/
-#ifdef WIN32
-VLC_EXPORT( char *, vlc_dgettext, ( const char *package, const char *msgid ) );
-VLC_EXPORT( int, vlc_wclosedir, (void *) );
-#endif
-
VLC_EXPORT( char *, vlc_gettext, ( const char *msgid ) );
/*****************************************************************************