summaryrefslogtreecommitdiffstats
path: root/polyp/daemon-conf.c
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2006-01-05 22:51:37 +0000
committerPierre Ossman <ossman@cendio.se>2006-01-05 22:51:37 +0000
commit19d9fcbda8637099854f2d8147b402b4420d19f5 (patch)
tree993f0ebc9045bd893cd3039d0ae6277ee5806c05 /polyp/daemon-conf.c
parent2f74bb9d437fc165695e1d4bb7516ca979962a49 (diff)
Port to Windows. This is mostly glue layers for the poor POSIX support
on Windows. A few notes * Only sockets behave somewhat like file descriptors in UNIX. * There are no fixed paths. Closes thing is environment variables that point to system directories. We also figure out where the binary/dll is located and use that as configuration directory. git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/ossman@418 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'polyp/daemon-conf.c')
-rw-r--r--polyp/daemon-conf.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/polyp/daemon-conf.c b/polyp/daemon-conf.c
index a6afd05a..780581b2 100644
--- a/polyp/daemon-conf.c
+++ b/polyp/daemon-conf.c
@@ -37,13 +37,23 @@
#include "resampler.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
-#define DEFAULT_SCRIPT_FILE DEFAULT_CONFIG_DIR"/default.pa"
-#define DEFAULT_SCRIPT_FILE_USER ".polypaudio/default.pa"
-#define DEFAULT_CONFIG_FILE DEFAULT_CONFIG_DIR"/daemon.conf"
-#define DEFAULT_CONFIG_FILE_USER ".polypaudio/daemon.conf"
+#ifndef OS_IS_WIN32
+# define PATH_SEP "/"
+#else
+# define PATH_SEP "\\"
+#endif
+
+#define DEFAULT_SCRIPT_FILE DEFAULT_CONFIG_DIR PATH_SEP "default.pa"
+#define DEFAULT_SCRIPT_FILE_USER ".polypaudio" PATH_SEP "default.pa"
+#define DEFAULT_CONFIG_FILE DEFAULT_CONFIG_DIR PATH_SEP "daemon.conf"
+#define DEFAULT_CONFIG_FILE_USER ".polypaudio" PATH_SEP "daemon.conf"
#define ENV_SCRIPT_FILE "POLYP_SCRIPT"
#define ENV_CONFIG_FILE "POLYP_CONFIG"