summaryrefslogtreecommitdiffstats
path: root/polyp/client-conf.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2006-01-10 17:51:06 +0000
committerLennart Poettering <lennart@poettering.net>2006-01-10 17:51:06 +0000
commitf7a99e90470526bb28cc0c225f96490110094aed (patch)
treecbcc4f2df6d66e180fd65ee50488545786d094f1 /polyp/client-conf.c
parent80ae72ce45dbc23ddc360749924110dcc752491e (diff)
Merge Pierre's changes
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@445 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'polyp/client-conf.c')
-rw-r--r--polyp/client-conf.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/polyp/client-conf.c b/polyp/client-conf.c
index 4906383d..04c3d2ef 100644
--- a/polyp/client-conf.c
+++ b/polyp/client-conf.c
@@ -19,6 +19,10 @@
USA.
***/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include <stdlib.h>
#include <assert.h>
#include <unistd.h>
@@ -33,11 +37,21 @@
#include "authkey.h"
#ifndef DEFAULT_CONFIG_DIR
-#define DEFAULT_CONFIG_DIR "/etc/polypaudio"
+# ifndef OS_IS_WIN32
+# define DEFAULT_CONFIG_DIR "/etc/polypaudio"
+# else
+# define DEFAULT_CONFIG_DIR "%POLYP_ROOT%"
+# endif
+#endif
+
+#ifndef OS_IS_WIN32
+# define PATH_SEP "/"
+#else
+# define PATH_SEP "\\"
#endif
-#define DEFAULT_CLIENT_CONFIG_FILE DEFAULT_CONFIG_DIR"/client.conf"
-#define DEFAULT_CLIENT_CONFIG_FILE_USER ".polypaudio/client.conf"
+#define DEFAULT_CLIENT_CONFIG_FILE DEFAULT_CONFIG_DIR PATH_SEP "client.conf"
+#define DEFAULT_CLIENT_CONFIG_FILE_USER ".polypaudio" PATH_SEP "client.conf"
#define ENV_CLIENT_CONFIG_FILE "POLYP_CLIENTCONFIG"
#define ENV_DEFAULT_SINK "POLYP_SINK"