]> Chaos Git - corbenik/ctrulib.git/commitdiff
stop polluting 3ds headers with extra system headers
authorDave Murphy <davem@devkitpro.org>
Fri, 28 Nov 2014 13:13:34 +0000 (13:13 +0000)
committerDave Murphy <davem@devkitpro.org>
Fri, 28 Nov 2014 13:13:34 +0000 (13:13 +0000)
libctru/include/3ds/services/fs.h
libctru/include/3ds/types.h
libctru/source/allocator/linear.cpp
libctru/source/allocator/mem_pool.h
libctru/source/sdmc_dev.c
libctru/source/services/fs.c
libctru/source/services/httpc.c
libctru/source/services/pm.c
libctru/source/services/soc/soc_common.h

index 073f3b6e648e3e11ceb5a2daa753ed4dbfd81383..e5f573dd57732a1667a2e5f8ca5a80e39fd484c3 100644 (file)
@@ -1,5 +1,4 @@
 #pragma once
-#include <string.h>
 #include <3ds/types.h>
 
 /*! @file FS.h
@@ -128,25 +127,11 @@ typedef struct
   u64 fileSize;        //!< file size
 } FS_dirent;
 
-/*! Create an FS_path from a type and data pointer.
- *
- *  @param[in] type Path type.
- *  @param[in] path Pointer to path data.
- *
- *  @returns FS_path
- *
- *  @sa FS_pathType
- */
-static inline FS_path
-FS_makePath(FS_pathType type,
-            const char  *path)
-{
-       return (FS_path){type, strlen(path)+1, (const u8*)path};
-}
-
 Result fsInit(void);
 Result fsExit(void);
 
+FS_path FS_makePath(FS_pathType type, const char  *path);
+
 Result FSUSER_Initialize(Handle* handle);
 Result FSUSER_OpenArchive(Handle* handle, FS_archive* archive);
 Result FSUSER_OpenDirectory(Handle* handle, Handle* out, FS_archive archive, FS_path dirLowPath);
index b844bcbeb8888126cfe7c9efd1c151f4df4007ee..2f7d01a53b31c62636341538f1ff24c82079f665 100644 (file)
@@ -4,7 +4,6 @@
 
 #pragma once
 
-#include <stdlib.h>
 #include <stdint.h>
 #include <stdbool.h>
 #include <stddef.h>
index e5e6b8567ceba29fb7db78c5a5f4a61344f9fb12..b0a4b271167233f5690b883452012f725d39353d 100644 (file)
@@ -1,5 +1,6 @@
 #include <3ds.h>
 #include <3ds/util/rbtree.h>
+
 #include "mem_pool.h"
 
 extern u32 __linear_heap, __linear_heap_size;
index b75d1952a42536a200e5dcc0167926fc5d741a0f..97ca60b9d3d91845abb90b2dc38dde7de083241d 100644 (file)
@@ -1,5 +1,6 @@
 #pragma once
 #include <3ds.h>
+#include <stdlib.h>
 
 struct MemChunk
 {
index 11b498c502cc04dfb8871d30630d4c8341f129a4..3d9e269f51b839f3c16a497bffc48244bacda7f6 100644 (file)
@@ -2,6 +2,7 @@
 #include <errno.h>
 #include <unistd.h>
 #include <sys/iosupport.h>
+#include <string.h>
 #include <3ds.h>
 
 /*! @internal
index 51af7b502a3735f086c60ff833e27bb1b1c78cac..2ff991da80368f2c19da1315f7567b186da48a4a 100644 (file)
@@ -14,6 +14,22 @@ static Handle fsuHandle;
 // used to determine whether or not we should do FSUSER_Initialize on fsuHandle
 Handle __get_handle_from_list(char* name);
 
+/*! Create an FS_path from a type and data pointer.
+ *
+ *  @param[in] type Path type.
+ *  @param[in] path Pointer to path data.
+ *
+ *  @returns FS_path
+ *
+ *  @sa FS_pathType
+ */
+FS_path
+FS_makePath(FS_pathType type,
+            const char  *path)
+{
+       return (FS_path){type, strlen(path)+1, (const u8*)path};
+}
+
 /*! Initialize FS service
  *
  *  @returns error
index 5b4b9491d7d9a0200296b24d7c6ce1739ab2d7bd..00cb8a7cbaa48079ff77988270fa1a9feb8351c7 100644 (file)
@@ -1,3 +1,4 @@
+#include <string.h>
 #include <3ds.h>
 
 Handle __httpc_servhandle = 0;
index 185b37d5d2d975c895d0d5f9a33654bbcd4d0c8d..6c74ed2705bf5a6d5f2c507a2c70a737c90ad80a 100644 (file)
@@ -1,4 +1,5 @@
 #include <stdlib.h>
+#include <string.h>
 #include <3ds.h>
 
 static Handle pmHandle;
index 004235d7fad5f4a1d146db78a90fbab42f5401c6..f5cfe96002cd6a79eb95280940ce530bde149b8f 100644 (file)
@@ -1,5 +1,6 @@
 #pragma once
 
+#include <string.h>
 #include <3ds.h>
 
 extern Handle  SOCU_handle;