VLC_EXPORT( module_config_t *, config_FindConfig,( vlc_object_t *, const char * ) );
VLC_EXPORT(const char *, config_GetDataDir, ( void ));
+VLC_EXPORT(const char *, config_GetConfDir, ( void ) );
VLC_EXPORT(char *, config_GetUserConfDir, ( void ) );
VLC_EXPORT(char *, config_GetUserDataDir, ( void ) );
VLC_EXPORT(char *, config_GetCacheDir, ( void ) );
nodist_libvlc_la_SOURCES = misc/revision.c
libvlc_la_CFLAGS = `$(VLC_CONFIG) --cflags libvlc` \
-DLOCALEDIR=\"$(localedir)\" \
+ -DSYSCONFDIR=\"$(sysconfdir)\" \
-DDATA_PATH=\"$(pkgdatadir)\" \
-DPLUGIN_PATH=\"$(pkglibdir)\"
libvlc_la_CXXFLAGS = `$(VLC_CONFIG) --cxxflags libvlc`
#endif
}
+/**
+ * Determines the system configuration directory.
+ *
+ * @return a string (always succeeds).
+ */
+const char *config_GetConfDir( void )
+{
+#if defined (WIN32) || defined (UNDER_CE)
+ return vlc_global()->psz_vlcpath;
+#elif defined(__APPLE__) || defined (SYS_BEOS)
+ static char path[PATH_MAX] = "";
+
+ if( *path == '\0' )
+ {
+ snprintf( path, sizeof( path ), "%s/share", /* FIXME: Duh? */
+ vlc_global()->psz_vlcpath );
+ path[sizeof( path ) - 1] = '\0';
+ }
+ return path;
+#else
+ return SYSCONFDIR;
+#endif
+}
+
static char *GetDir( bool b_appdata )
{
const char *psz_localhome = NULL;
__config_ExistIntf
config_FindConfig
config_GetCacheDir
+config_GetConfDir
config_GetDataDir
__config_GetFloat
__config_GetInt