ref: 623026a394cfb634788f8f238084b932674ede56
parent: 372b2e44049f355c52c13d75112db9f14d0ae4f7
author: LoRd_MuldeR <[email protected]>
date: Sat Dec 16 15:59:34 EST 2017
Some improvements to "unicode_support.h" + include this file on ALL platforms.
--- a/frontend/audio.c
+++ b/frontend/audio.c
@@ -38,9 +38,7 @@
#include <neaacdec.h>
#include <stdint.h>
-#ifdef _WIN32
#include "unicode_support.h"
-#endif
#include "audio.h"
--- a/frontend/main.c
+++ b/frontend/main.c
@@ -39,7 +39,6 @@
#ifndef __MINGW32__
#define off_t __int64
#endif
-#include "unicode_support.h"
#else
#include <time.h>
#endif
@@ -53,6 +52,7 @@
#include <neaacdec.h>
+#include "unicode_support.h"
#include "audio.h"
#include "mp4read.h"
--- a/frontend/mp4read.c
+++ b/frontend/mp4read.c
@@ -24,9 +24,7 @@
#include <time.h>
#include <limits.h>
-#ifdef _WIN32
#include "unicode_support.h"
-#endif
#include "mp4read.h"
enum ATOM_TYPE
--- a/frontend/unicode_support.h
+++ b/frontend/unicode_support.h
@@ -32,6 +32,7 @@
#include <stdio.h>
+#if defined WIN32 || defined _WIN32 || defined WIN64 || defined _WIN64
char *utf16_to_utf8(const wchar_t *input);
char *utf16_to_ansi(const wchar_t *input);
wchar_t *utf8_to_utf16(const char *input);
@@ -40,8 +41,6 @@
FILE *fopen_utf8(const char *filename_utf8, const char *mode_utf8);
void init_console_utf8(FILE *const stream);
void uninit_console_utf8(void);
-
-#ifdef _WIN32
#define faad_fopen(X,Y) fopen_utf8((X),(Y))
#else
#define faad_fopen(X,Y) fopen((X),(Y))