summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Gui/interface.c4
-rwxr-xr-xconfigure6
-rw-r--r--input/input.c2
-rw-r--r--libmpcodecs/dec_audio.c6
-rw-r--r--libmpcodecs/dec_video.c6
-rw-r--r--libmpdemux/cache2.c1
-rw-r--r--libmpdvdkit2/ioctl.c1
-rw-r--r--libvo/font_load.c2
-rw-r--r--libvo/font_load_ft.c2
-rw-r--r--libvo/vosub_vidix.c2
-rw-r--r--mencoder.c4
-rw-r--r--mplayer.c10
-rw-r--r--osdep/glob-win.c1
13 files changed, 22 insertions, 25 deletions
diff --git a/Gui/interface.c b/Gui/interface.c
index 2d8aa136e1..cd32ad638f 100644
--- a/Gui/interface.c
+++ b/Gui/interface.c
@@ -188,7 +188,7 @@ void guiInit( void )
wsXInit( (void *)mDisplay );
// --- load skin
skinDirInHome=get_path("Skin");
- skinMPlayerDir=DATADIR "/Skin";
+ skinMPlayerDir=MPLAYER_DATADIR "/Skin";
printf("SKIN dir 1: '%s'\n",skinDirInHome);
printf("SKIN dir 2: '%s'\n",skinMPlayerDir);
if ( !skinName ) skinName=strdup( "default" );
@@ -405,7 +405,7 @@ void guiLoadFont( void )
vo_font=read_font_desc( font_name,font_factor,0 );
if ( !vo_font )
{
- gfree( (void **)&font_name ); font_name=gstrdup( DATADIR"/font/font.desc" );
+ gfree( (void **)&font_name ); font_name=gstrdup(MPLAYER_DATADIR "/font/font.desc" );
vo_font=read_font_desc( font_name,font_factor,0 );
}
}
diff --git a/configure b/configure
index ed6575647d..8c71da7975 100755
--- a/configure
+++ b/configure
@@ -5432,9 +5432,9 @@ $_def_hpux_scsi_h
$_def_stddef
/* Common data directory (for fonts, etc) */
-#define DATADIR "$_datadir"
-#define CONFDIR "$_confdir"
-#define LIBDIR "$_libdir"
+#define MPLAYER_DATADIR "$_datadir"
+#define MPLAYER_CONFDIR "$_confdir"
+#define MPLAYER_LIBDIR "$_libdir"
/* Define this to compile stream-caching support, it can be enabled via
-cache <kilobytes> */
diff --git a/input/input.c b/input/input.c
index 2eec96d356..c8c2506106 100644
--- a/input/input.c
+++ b/input/input.c
@@ -1464,7 +1464,7 @@ mp_input_init(void) {
if(! mp_input_parse_config(file)) {
// Try global conf dir
- file = CONFDIR"/input.conf";
+ file = MPLAYER_CONFDIR "/input.conf";
if(! mp_input_parse_config(file))
mp_msg(MSGT_INPUT,MSGL_WARN,"Falling back on default (hardcoded) input config\n");
}
diff --git a/libmpcodecs/dec_audio.c b/libmpcodecs/dec_audio.c
index 731b6cff5e..edb7cd9a0c 100644
--- a/libmpcodecs/dec_audio.c
+++ b/libmpcodecs/dec_audio.c
@@ -160,11 +160,11 @@ int init_audio(sh_audio_t *sh_audio,char* codecname,char* afm,int status){
ad_functions_t *funcs_sym;
ad_info_t *info_sym;
- buf_len = strlen(LIBDIR)+strlen(sh_audio->codec->drv)+16;
+ buf_len = strlen(MPLAYER_LIBDIR)+strlen(sh_audio->codec->drv)+16;
buf = malloc(buf_len);
if (!buf)
break;
- snprintf(buf, buf_len, "%s/mplayer/ad_%s.so", LIBDIR, sh_audio->codec->drv);
+ snprintf(buf, buf_len, "%s/mplayer/ad_%s.so", MPLAYER_LIBDIR, sh_audio->codec->drv);
mp_msg(MSGT_DECAUDIO, MSGL_DBG2, "Trying to open external plugin: %s\n", buf);
sh_audio->dec_handle = dlopen(buf, RTLD_LAZY);
if (!sh_audio->dec_handle)
@@ -181,7 +181,7 @@ int init_audio(sh_audio_t *sh_audio,char* codecname,char* afm,int status){
free(buf);
mpadec = funcs_sym;
mp_msg(MSGT_DECAUDIO, MSGL_V, "Using external decoder plugin (%s/mplayer/ad_%s.so)!\n",
- LIBDIR, sh_audio->codec->drv);
+ MPLAYER_LIBDIR, sh_audio->codec->drv);
}
#endif
if(!mpadec){ // driver not available (==compiled in)
diff --git a/libmpcodecs/dec_video.c b/libmpcodecs/dec_video.c
index 1d58f62c10..74b005990d 100644
--- a/libmpcodecs/dec_video.c
+++ b/libmpcodecs/dec_video.c
@@ -187,11 +187,11 @@ int init_video(sh_video_t *sh_video,char* codecname,char* vfm,int status){
vd_functions_t *funcs_sym;
vd_info_t *info_sym;
- buf_len = strlen(LIBDIR)+strlen(sh_video->codec->drv)+16;
+ buf_len = strlen(MPLAYER_LIBDIR)+strlen(sh_video->codec->drv)+16;
buf = malloc(buf_len);
if (!buf)
break;
- snprintf(buf, buf_len, "%s/mplayer/vd_%s.so", LIBDIR, sh_video->codec->drv);
+ snprintf(buf, buf_len, "%s/mplayer/vd_%s.so", MPLAYER_LIBDIR, sh_video->codec->drv);
mp_msg(MSGT_DECVIDEO, MSGL_DBG2, "Trying to open external plugin: %s\n", buf);
sh_video->dec_handle = dlopen(buf, RTLD_LAZY);
if (!sh_video->dec_handle)
@@ -207,7 +207,7 @@ int init_video(sh_video_t *sh_video,char* codecname,char* vfm,int status){
free(buf);
mpvdec = funcs_sym;
mp_msg(MSGT_DECVIDEO, MSGL_V, "Using external decoder plugin (%s/mplayer/vd_%s.so)!\n",
- LIBDIR, sh_video->codec->drv);
+ MPLAYER_LIBDIR, sh_video->codec->drv);
}
#endif
if(!mpvdec){ // driver not available (==compiled in)
diff --git a/libmpdemux/cache2.c b/libmpdemux/cache2.c
index cbefce2279..370f47a3fe 100644
--- a/libmpdemux/cache2.c
+++ b/libmpdemux/cache2.c
@@ -22,7 +22,6 @@
#include <sys/wait.h>
#include "../osdep/shmem.h"
#else
-#undef DATADIR
#include <windows.h>
static DWORD WINAPI ThreadProc(void* s);
#endif
diff --git a/libmpdvdkit2/ioctl.c b/libmpdvdkit2/ioctl.c
index 3a782d5d51..5386fb7911 100644
--- a/libmpdvdkit2/ioctl.c
+++ b/libmpdvdkit2/ioctl.c
@@ -39,7 +39,6 @@
#include <sys/types.h>
#if defined( WIN32 )
-# undef DATADIR /* clashes with /usr/include/w32api/objidl.h */
# include <windows.h>
# include <winioctl.h>
#elif defined ( SYS_OS2 )
diff --git a/libvo/font_load.c b/libvo/font_load.c
index 82d8d6a81b..0cb14f7516 100644
--- a/libvo/font_load.c
+++ b/libvo/font_load.c
@@ -157,7 +157,7 @@ while(fgets(sor,1020,f)){
} else
if(strcmp(section,"[files]")==0){
- char *default_dir=DATADIR"/font";
+ char *default_dir=MPLAYER_DATADIR "/font";
if(pdb==2 && strcmp(p[0],"alpha")==0){
char *cp;
if (!(cp=malloc(strlen(desc->fpath)+strlen(p[1])+2))) return NULL;
diff --git a/libvo/font_load_ft.c b/libvo/font_load_ft.c
index 7b38382462..352dbed2f9 100644
--- a/libvo/font_load_ft.c
+++ b/libvo/font_load_ft.c
@@ -905,7 +905,7 @@ static int load_sub_face(char *name, FT_Face *face)
if (err) {
err = FT_New_Face(library, get_path("subfont.ttf"), 0, face);
if (err) {
- err = FT_New_Face(library, DATADIR"/subfont.ttf", 0, face);
+ err = FT_New_Face(library, MPLAYER_DATADIR "/subfont.ttf", 0, face);
if (err) {
mp_msg(MSGT_OSD, MSGL_ERR, "New_Face failed. Maybe the font path is wrong.\nPlease supply the text font file (~/.mplayer/subfont.ttf).\n" );
return -1;
diff --git a/libvo/vosub_vidix.c b/libvo/vosub_vidix.c
index 370ce64ec5..908ae5fd73 100644
--- a/libvo/vosub_vidix.c
+++ b/libvo/vosub_vidix.c
@@ -709,7 +709,7 @@ int vidix_preinit(const char *drvname,void *server)
printf("vosub_vidix: You have wrong version of VIDIX library\n");
return -1;
}
- vidix_handler = vdlOpen(LIBDIR"/mplayer/vidix/",
+ vidix_handler = vdlOpen(MPLAYER_LIBDIR "/mplayer/vidix/",
drvname ? drvname[0] == ':' ? &drvname[1] : drvname[0] ? drvname : NULL : NULL,
TYPE_OUTPUT,
verbose);
diff --git a/mencoder.c b/mencoder.c
index bec2f6d362..e7e5609227 100644
--- a/mencoder.c
+++ b/mencoder.c
@@ -377,7 +377,7 @@ unsigned int timer_start;
// check codec.conf
if(!parse_codec_cfg(get_path("codecs.conf"))){
- if(!parse_codec_cfg(CONFDIR"/codecs.conf")){
+ if(!parse_codec_cfg(MPLAYER_CONFDIR "/codecs.conf")){
if(!parse_codec_cfg(NULL)){
mp_msg(MSGT_MENCODER,MSGL_HINT,MSGTR_CopyCodecsConf);
exit(0);
@@ -443,7 +443,7 @@ if(!parse_codec_cfg(get_path("codecs.conf"))){
// try default:
vo_font=read_font_desc(get_path("font/font.desc"),font_factor,verbose>1);
if(!vo_font)
- vo_font=read_font_desc(DATADIR"/font/font.desc",font_factor,verbose>1);
+ vo_font=read_font_desc(MPLAYER_DATADIR "/font/font.desc",font_factor,verbose>1);
}
#endif
#endif
diff --git a/mplayer.c b/mplayer.c
index 68945038f5..611682028d 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -525,7 +525,7 @@ void parse_cfgfiles( m_config_t* conf )
{
char *conffile;
int conffile_fd;
-if (m_config_parse_config_file(conf, CONFDIR"/mplayer.conf") < 0)
+if (m_config_parse_config_file(conf, MPLAYER_CONFDIR "/mplayer.conf") < 0)
exit(1);
if ((conffile = get_path("")) == NULL) {
mp_msg(MSGT_CPLAYER,MSGL_WARN,MSGTR_NoHomeDir);
@@ -866,7 +866,7 @@ int gui_no_filename=0;
// check codec.conf
if(!parse_codec_cfg(get_path("codecs.conf"))){
- if(!parse_codec_cfg(CONFDIR"/codecs.conf")){
+ if(!parse_codec_cfg(MPLAYER_CONFDIR "/codecs.conf")){
if(!parse_codec_cfg(NULL)){
mp_msg(MSGT_CPLAYER,MSGL_HINT,MSGTR_CopyCodecsConf);
exit(0);
@@ -1038,7 +1038,7 @@ if(!parse_codec_cfg(get_path("codecs.conf"))){
// try default:
vo_font=read_font_desc(get_path("font/font.desc"),font_factor,verbose>1);
if(!vo_font)
- vo_font=read_font_desc(DATADIR"/font/font.desc",font_factor,verbose>1);
+ vo_font=read_font_desc(MPLAYER_DATADIR "/font/font.desc",font_factor,verbose>1);
}
#ifdef HAVE_FREETYPE
if (!vo_font)
@@ -1117,8 +1117,8 @@ current_module = NULL;
if(menu_init(menu_cfg))
mp_msg(MSGT_CPLAYER,MSGL_INFO,"Menu inited: %s\n", menu_cfg);
else {
- if(menu_init(CONFDIR"/menu.conf"))
- mp_msg(MSGT_CPLAYER,MSGL_INFO,"Menu inited: %s\n", CONFDIR"/menu.conf");
+ if(menu_init(MPLAYER_CONFDIR "/menu.conf"))
+ mp_msg(MSGT_CPLAYER,MSGL_INFO,"Menu inited: %s\n", MPLAYER_CONFDIR"/menu.conf");
else {
mp_msg(MSGT_CPLAYER,MSGL_INFO,"Menu init failed\n");
use_menu = 0;
diff --git a/osdep/glob-win.c b/osdep/glob-win.c
index 08ec3c2a6c..d1e3dd87ae 100644
--- a/osdep/glob-win.c
+++ b/osdep/glob-win.c
@@ -5,7 +5,6 @@
#ifndef HAVE_GLOB
#ifdef __MINGW32__
-#undef DATADIR
#include <windows.h>
#include "glob.h"