mirror of
https://github.com/DarkStore-3DS/Project_CTR.git
synced 2026-07-06 00:39:11 +00:00
[ctrtool/makerom] Silenced warnings, fixed compiling on systems with libiconv installed.
This commit is contained in:
+1
-1
@@ -5,7 +5,7 @@ OBJS = $(foreach dir,$(SRC_DIR),$(subst .c,.o,$(wildcard $(dir)/*.c))) $(foreach
|
|||||||
# Compiler Settings
|
# Compiler Settings
|
||||||
LIBS = -static-libgcc -static-libstdc++
|
LIBS = -static-libgcc -static-libstdc++
|
||||||
CXXFLAGS = -I.
|
CXXFLAGS = -I.
|
||||||
CFLAGS = -O2 -flto -Wall -Wno-unused-variable -Wno-unused-but-set-variable -I.
|
CFLAGS = -O2 -flto -Wall -Wno-unused-variable -Wno-unused-but-set-variable -Wno-unused-result -I.
|
||||||
OUTPUT = ctrtool
|
OUTPUT = ctrtool
|
||||||
CC = gcc
|
CC = gcc
|
||||||
CXX = g++
|
CXX = g++
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
|
#define LIBICONV_PLUG
|
||||||
#include <iconv.h>
|
#include <iconv.h>
|
||||||
#endif
|
#endif
|
||||||
#include "oschar.h"
|
#include "oschar.h"
|
||||||
|
|||||||
+1
-1
@@ -5,7 +5,7 @@ OBJS = $(foreach dir,$(SRC_DIR),$(subst .c,.o,$(wildcard $(dir)/*.c)))
|
|||||||
# Compiler Settings
|
# Compiler Settings
|
||||||
LIBS = -static-libgcc
|
LIBS = -static-libgcc
|
||||||
CXXFLAGS = -I.
|
CXXFLAGS = -I.
|
||||||
CFLAGS = --std=c99 -O2 -flto -Wall -Wno-unused-but-set-variable -Wno-unused-value -I. $(MAKEROM_BUILD_FLAGS)
|
CFLAGS = --std=c99 -O2 -flto -Wall -Wno-unused-but-set-variable -Wno-unused-value -Wno-unused-result -I. $(MAKEROM_BUILD_FLAGS)
|
||||||
CC = gcc
|
CC = gcc
|
||||||
CXX = g++
|
CXX = g++
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
|
#define LIBICONV_PLUG
|
||||||
#include <iconv.h>
|
#include <iconv.h>
|
||||||
#endif
|
#endif
|
||||||
#include "oschar.h"
|
#include "oschar.h"
|
||||||
@@ -134,6 +135,7 @@ utf16char_t* strcopy_UTF8toUTF16(const char *src)
|
|||||||
|
|
||||||
iconv_t cd = iconv_open("UTF-16LE", "UTF-8");
|
iconv_t cd = iconv_open("UTF-16LE", "UTF-8");
|
||||||
iconv(cd, &in, &in_bytes, &out, &out_bytes);
|
iconv(cd, &in, &in_bytes, &out, &out_bytes);
|
||||||
|
iconv_close(cd);
|
||||||
return dst;
|
return dst;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -162,6 +164,7 @@ char* strcopy_UTF16toUTF8(const utf16char_t *src)
|
|||||||
|
|
||||||
iconv_t cd = iconv_open("UTF-8", "UTF-16LE");
|
iconv_t cd = iconv_open("UTF-8", "UTF-16LE");
|
||||||
iconv(cd, &in, &in_bytes, &out, &out_bytes);
|
iconv(cd, &in, &in_bytes, &out, &out_bytes);
|
||||||
|
iconv_close(cd);
|
||||||
return dst;
|
return dst;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user