charConv: tie the buffer size for iconv() to our PATH_MAX constant

Although most PATH_MAX is higher than the 1k buffer we set, some
implementations will set a 256 (or even 64) byte PATH_MAX, so
we should be prepared for that.

git-svn-id: https://svn.musicpd.org/mpd/trunk@7121 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
Eric Wong 2008-01-01 10:09:43 +00:00
parent 1b4de32706
commit 5e7367c580
1 changed files with 2 additions and 1 deletions

View File

@ -20,6 +20,7 @@
#include "mpd_types.h"
#include "utf8.h"
#include "utils.h"
#include "path.h"
#include <stdlib.h>
#include <errno.h>
@ -40,7 +41,7 @@ static mpd_sint8 char_conv_use_iconv;
-1 is to use utf8ToLatin1*/
static mpd_sint8 char_conv_latin1ToUtf8;
#define BUFFER_SIZE 1024
#define BUFFER_SIZE MPD_PATH_MAX
static void closeCharSetConversion(void);