From 970a75f00e4c9416629dcb938d1cc139711e44bb Mon Sep 17 00:00:00 2001 From: Ron Pedde Date: Wed, 29 Mar 2006 22:02:42 +0000 Subject: [PATCH] win32 fixes --- src/conf.c | 4 +-- src/redblack.c | 2 +- win32/config.h | 2 +- win32/nsi/mt-daapd-example.conf | 43 ++++++++++++--------------------- 4 files changed, 20 insertions(+), 31 deletions(-) diff --git a/src/conf.c b/src/conf.c index 18bb7399..a311021e 100644 --- a/src/conf.c +++ b/src/conf.c @@ -1096,7 +1096,7 @@ char *conf_implode(char *section, char *key, char *delimiter) { if(penum->type != LL_TYPE_STRING) { DPRINTF(E_FATAL,L_CONF,"multivalued property not a string?\n"); } - len += strlen(penum->value.as_string); + len += (int)strlen(penum->value.as_string); count++; } @@ -1105,7 +1105,7 @@ char *conf_implode(char *section, char *key, char *delimiter) { return NULL; } - len += (strlen(delimiter) * (count-1)); + len += ((int)strlen(delimiter) * (count-1)); retval = (char*)malloc(len + 1); if(!retval) { DPRINTF(E_FATAL,L_CONF,"conf_implode: malloc\n"); diff --git a/src/redblack.c b/src/redblack.c index d0392da3..693b9617 100644 --- a/src/redblack.c +++ b/src/redblack.c @@ -451,7 +451,7 @@ static struct RB_ENTRY(node) * RB_ENTRY(_lookup)(int mode, const RB_ENTRY(data_t) *key, struct RB_ENTRY(tree) *rbinfo) { struct RB_ENTRY(node) *x,*y; - int cmp=0;; + int cmp=0; int found=0; y=RBNULL; /* points to the parent of x */ diff --git a/win32/config.h b/win32/config.h index ab167340..d54baaa3 100644 --- a/win32/config.h +++ b/win32/config.h @@ -74,7 +74,7 @@ #define HAVE_STRERROR 1 /* Define to 1 if you have the header file. */ -#define HAVE_STRINGS_H 1 +/* #define HAVE_STRINGS_H 1 */ /* Define to 1 if you have the header file. */ #define HAVE_STRING_H 1 diff --git a/win32/nsi/mt-daapd-example.conf b/win32/nsi/mt-daapd-example.conf index 388159f6..672c17af 100644 --- a/win32/nsi/mt-daapd-example.conf +++ b/win32/nsi/mt-daapd-example.conf @@ -18,7 +18,7 @@ # Location of the admin web pages. # # If you installed from .RPM, .deb, or tarball with --prefix=/usr, then -# this is correct. +# this is correct. # # If you installed from tarball without --prefix=/usr, then the correct # path is probably /usr/local/share/mt-daapd/admin-root. @@ -51,7 +51,7 @@ admin_pw=mt-daapd # info in. Valid choices are "sqlite" and "sqlite3". # -db_type=sqlite +db_type=sqlite3 # # db_parms @@ -96,24 +96,13 @@ servername=mt-daapd # must be specified whether the server is running # as root or not. # +# This is a leftover from the port from unix -- it's +# not used on windows, but still hanging around, like +# an appendix. +# runas=nobody -# -# playlist (optional) -# -# This is the location of a playlist file. -# This is for Apple-style "Smart Playlists" -# See the mt-daapd.playlist file in the -# contrib directory for syntax and examples -# -# This doesn't control static playlists... these -# are controlled with the "process_m3u" directive -# below. -# - -playlist=/etc/mt-daapd.playlist - # # password (optional) # @@ -205,11 +194,11 @@ extensions=.mp3,.m4a,.m4p # There is experimental support thanks to Hiren Joshi # (hirenj@mooh.org) for dynamically adding art to the id3v2 # header as it is streamed (!!). If you were using a music system -# like zina or andromeda, for example, with cover art called +# like zina or andromeda, for example, with cover art called # "_folderOpenImage.jpg", you could use the parameter # art_file _folderOpenImage.jpg and if the file _folderOpenImage.jpg # was located in the same folder as the .mp3 file, it would appear -# in iTunes. Cool, eh? +# in iTunes. Cool, eh? # #art_filename _folderOpenImage.jpg @@ -218,11 +207,11 @@ extensions=.mp3,.m4a,.m4p # rescan_interval # # How often to check the file system to see if any mp3 files -# have been added or removed. +# have been added or removed. # # if not specified, the default is 0, which disables background scanning. # -# If background rescanning is disabled, a scan can still be forced from the +# If background rescanning is disabled, a scan can still be forced from the # "status" page of the administrative web interface # # Setting a rescan_interval lower than the time it takes to rescan @@ -233,7 +222,7 @@ extensions=.mp3,.m4a,.m4p #rescan_interval 300 -# always_scan +# always_scan # # The default behavior is not not do background rescans of the # filesystem unless there are clients connected. The thought is to @@ -244,7 +233,7 @@ extensions=.mp3,.m4a,.m4p # always_scan 0 -# +# # process_m3u # # By default m3u processing is turned off, since most m3u files @@ -262,18 +251,18 @@ extensions=.mp3,.m4a,.m4p # # scan_type -# +# # # This sets how aggressively mp3 files should be scanned to determine # file length. There are three values: # -# 0 (Normal) +# 0 (Normal) # Just scan the first mp3 frame to try and calculate size. This will # be accurate for most files, but VBR files without an Xing tag will # probably have wildly inaccurate file times. This is the default. # # 1 (Aggressive) -# This checks the bitrates of 10 frames in the middle of the song. +# This checks the bitrates of 10 frames in the middle of the song. # This will still be inaccurate for VBR files without an Xing tag, # but they probably won't be quite as inaccurate as 0. This takes # more time, obviously, although the time hit will only happen the @@ -284,7 +273,7 @@ extensions=.mp3,.m4a,.m4p # This should result in accurate song times, but will take the most # time. Again, this will only have to be incurred the first time # the file is indexed. -# +# scan_type=2