Use <string.h> & <3ds/exheader.h>, fix some bugs, etc.

also fix all warnings and use -Werror
This commit is contained in:
TuxSH
2018-05-24 00:55:38 +02:00
parent e6b7dc1dc5
commit d28e961adc
85 changed files with 276 additions and 643 deletions

View File

@@ -24,8 +24,8 @@
* reasonable ways as different from the original version.
*/
#include <string.h>
#include "debug.h"
#include "memory.h"
#include "synchronization.h"
KRecursiveLock dbgParamsLock = { NULL };

View File

@@ -23,11 +23,11 @@
* or requiring that modified versions of such material be marked in
* reasonable ways as different from the original version.
*/
#include <string.h>
#include "fatalExceptionHandlers.h"
#include "utils.h"
#include "kernel.h"
#include "memory.h"
#include "globals.h"
#define REG_DUMP_SIZE 4 * 23

View File

@@ -23,9 +23,9 @@
* or requiring that modified versions of such material be marked in
* reasonable ways as different from the original version.
*/
#include <string.h>
#include "ipc.h"
#include "memory.h"
static SessionInfo sessionInfos[MAX_SESSION] = { {NULL} };
static u32 nbActiveSessions = 0;

View File

@@ -23,7 +23,7 @@
* or requiring that modified versions of such material be marked in
* reasonable ways as different from the original version.
*/
#include <string.h>
#include "utils.h"
#include "globals.h"
#include "synchronization.h"
@@ -31,7 +31,6 @@
#include "svc.h"
#include "svc/ConnectToPort.h"
#include "svcHandler.h"
#include "memory.h"
struct KExtParameters
{
@@ -53,7 +52,7 @@ void relocateAndSetupMMU(u32 coreId, u32 *L1Table)
// Relocate ourselves, and clear BSS
// This is only OK because the jumps will be relative...
memcpy((void *)p0->basePA, (const void *)0x18000000, __bss_start__ - __start__);
memset32((u32 *)(p0->basePA + (__bss_start__ - __start__)), 0, __bss_end__ - __bss_start__);
memset((u32 *)(p0->basePA + (__bss_start__ - __start__)), 0, __bss_end__ - __bss_start__);
// Map the kernel ext to 0x40000000
// 4KB extended small pages: [SYS:RW USR:-- X TYP:NORMAL SHARED OUTER NOCACHE, INNER CACHED WB WA]

View File

@@ -24,7 +24,7 @@
* reasonable ways as different from the original version.
*/
#include "memory.h"
#include <string.h>
#include "synchronization.h"
#include "svc.h"
#include "svc/ControlMemory.h"

View File

@@ -23,9 +23,9 @@
* or requiring that modified versions of such material be marked in
* reasonable ways as different from the original version.
*/
#include <string.h>
#include "svc/ConnectToPort.h"
#include "memory.h"
#include "ipc.h"
Result ConnectToPortHook(Handle *out, const char *name)

View File

@@ -23,9 +23,9 @@
* or requiring that modified versions of such material be marked in
* reasonable ways as different from the original version.
*/
#include <string.h>
#include "svc/ControlService.h"
#include "memory.h"
#include "ipc.h"
Result ControlService(ServiceOp op, u32 varg1, u32 varg2)

View File

@@ -23,9 +23,9 @@
* or requiring that modified versions of such material be marked in
* reasonable ways as different from the original version.
*/
#include <string.h>
#include "svc/CopyHandle.h"
#include "memory.h"
Result CopyHandle(Handle *outHandle, Handle outProcessHandle, Handle inHandle, Handle inProcessHandle)
{

View File

@@ -23,9 +23,9 @@
* or requiring that modified versions of such material be marked in
* reasonable ways as different from the original version.
*/
#include <string.h>
#include "svc/GetThreadInfo.h"
#include "memory.h"
Result GetHandleInfoHook(s64 *out, Handle handle, u32 type)
{

View File

@@ -25,7 +25,7 @@
*/
#include "svc/GetProcessInfo.h"
#include "memory.h"
#include <string.h>
Result GetProcessInfoHook(s64 *out, Handle processHandle, u32 type)
{

View File

@@ -23,9 +23,9 @@
* or requiring that modified versions of such material be marked in
* reasonable ways as different from the original version.
*/
#include <string.h>
#include "svc/GetThreadInfo.h"
#include "memory.h"
Result GetThreadInfoHook(s64 *out, Handle threadHandle, u32 type)
{

View File

@@ -23,12 +23,12 @@
* or requiring that modified versions of such material be marked in
* reasonable ways as different from the original version.
*/
#include <string.h>
#include "svc/KernelSetState.h"
#include "synchronization.h"
#include "ipc.h"
#include "debug.h"
#include "memory.h"
#define MAX_DEBUG 3

View File

@@ -23,9 +23,9 @@
* or requiring that modified versions of such material be marked in
* reasonable ways as different from the original version.
*/
#include <string.h>
#include "svc/SendSyncRequest.h"
#include "memory.h"
#include "ipc.h"
Result SendSyncRequestHook(Handle handle)

View File

@@ -25,7 +25,7 @@
*/
#include "svc/TranslateHandle.h"
#include "memory.h"
#include <string.h>
Result TranslateHandle(u32 *outKAddr, char *outClassName, Handle handle)
{