* Add support for other operating systems (kFreeBSD, FreeBSD, and OSX for now).

* Switch to autoconf from genconfig.sh.
This commit is contained in:
Justin Maggard
2011-09-16 23:39:58 +00:00
parent 715af3519b
commit 773e1f6566
40 changed files with 1952 additions and 533 deletions

View File

@ -19,9 +19,14 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "config.h"
#include <stdio.h>
#include <string.h>
#ifdef HAVE_MACHINE_ENDIAN_H
#include <machine/endian.h>
#else
#include <endian.h>
#endif
#include "misc.h"

View File

@ -23,7 +23,11 @@
#define __PACKED__ __attribute__((packed))
#ifdef HAVE_MACHINE_ENDIAN_H
#include <machine/endian.h>
#else
#include <endian.h>
#endif
typedef struct _GUID {
__u32 l;

View File

@ -33,10 +33,10 @@ typedef enum {
static iconv_result
do_iconv(const char* to_ces, const char* from_ces,
char *inbuf, size_t inbytesleft,
ICONV_CONST char *inbuf, size_t inbytesleft,
char *outbuf_orig, size_t outbytesleft_orig)
{
#ifdef HAVE_ICONV_H
#ifdef HAVE_ICONV
size_t rc;
iconv_result ret = ICONV_OK;
@ -65,9 +65,9 @@ do_iconv(const char* to_ces, const char* from_ces,
iconv_close(cd);
return ret;
#else // HAVE_ICONV_H
#else // HAVE_ICONV
return ICONV_FATAL;
#endif // HAVE_ICONV_H
#endif // HAVE_ICONV
}
#define N_LANG_ALT 8

View File

@ -232,8 +232,7 @@ _get_mp3tags(char *file, struct song_metadata *psong)
if((utf8_text) && (strncasecmp((char*)utf8_text, "iTun", 4) != 0))
{
// read comment
if(utf8_text)
free(utf8_text);
free(utf8_text);
native_text = id3_field_getfullstring(&pid3frame->fields[3]);
if(native_text)
@ -241,16 +240,14 @@ _get_mp3tags(char *file, struct song_metadata *psong)
utf8_text = (unsigned char*)id3_ucs4_utf8duplicate(native_text);
if(utf8_text)
{
if (psong->comment)
free(psong->comment);
free(psong->comment);
psong->comment = (char*)utf8_text;
}
}
}
else
{
if(utf8_text)
free(utf8_text);
free(utf8_text);
}
}
}

View File

@ -37,7 +37,7 @@
#include <FLAC/metadata.h>
#include "../config.h"
#ifdef HAVE_ICONV_H
#ifdef HAVE_ICONV
#include <iconv.h>
#endif

View File

@ -30,6 +30,7 @@
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <libgen.h>
#define ROLE_NOUSE 0
#define ROLE_START 1