summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2017-01-28 00:33:52 -0500
committermidipix <writeonce@midipix.org>2017-01-28 00:33:52 -0500
commita29a7a1f265304b5e29ceae11813ef0409f72d25 (patch)
tree23205944e71b6d8b9bc8f85ddcde1b68fd474439
parent77cbd46254c491fb56d863494b9102217f297252 (diff)
downloadpemagine-a29a7a1f265304b5e29ceae11813ef0409f72d25.tar.bz2
pemagine-a29a7a1f265304b5e29ceae11813ef0409f72d25.tar.xz
ldso: apply type to OS status code macro definitions.
-rw-r--r--src/internal/pe_os.h27
-rw-r--r--src/ldso/pe_find_framework_loader.c4
2 files changed, 16 insertions, 15 deletions
diff --git a/src/internal/pe_os.h b/src/internal/pe_os.h
index ad26de4..a2f83b0 100644
--- a/src/internal/pe_os.h
+++ b/src/internal/pe_os.h
@@ -1,21 +1,22 @@
#ifndef PE_OS_H
#define PE_OS_H
+#include <psxtypes/psxtypes.h>
#include <pemagine/pe_structs.h>
-#define OS_STATUS_SUCCESS 0x00000000
-#define OS_STATUS_INVALID_PARAMETER 0xC000000D
-#define OS_STATUS_ILLEGAL_CHARACTER 0xC0000161
-#define OS_STATUS_NO_MATCH 0xC0000272
-#define OS_STATUS_INVALID_ADDRESS 0xC0000141
-#define OS_STATUS_CONTEXT_MISMATCH 0xC0000719
-#define OS_STATUS_COULD_NOT_INTERPRET 0xC00000B9
-#define OS_STATUS_NAME_TOO_LONG 0xC0000106
-#define OS_STATUS_INTERNAL_ERROR 0xC00000E5
-#define OS_STATUS_BAD_FILE_TYPE 0xC0000903
-#define OS_STATUS_OBJECT_NAME_NOT_FOUND 0xC0000034
-#define OS_STATUS_OBJECT_PATH_NOT_FOUND 0xC000003A
-#define OS_STATUS_MORE_PROCESSING_REQUIRED 0xC0000016
+#define OS_STATUS_SUCCESS (int32_t)0x00000000
+#define OS_STATUS_INVALID_PARAMETER (int32_t)0xC000000D
+#define OS_STATUS_ILLEGAL_CHARACTER (int32_t)0xC0000161
+#define OS_STATUS_NO_MATCH (int32_t)0xC0000272
+#define OS_STATUS_INVALID_ADDRESS (int32_t)0xC0000141
+#define OS_STATUS_CONTEXT_MISMATCH (int32_t)0xC0000719
+#define OS_STATUS_COULD_NOT_INTERPRET (int32_t)0xC00000B9
+#define OS_STATUS_NAME_TOO_LONG (int32_t)0xC0000106
+#define OS_STATUS_INTERNAL_ERROR (int32_t)0xC00000E5
+#define OS_STATUS_BAD_FILE_TYPE (int32_t)0xC0000903
+#define OS_STATUS_OBJECT_NAME_NOT_FOUND (int32_t)0xC0000034
+#define OS_STATUS_OBJECT_PATH_NOT_FOUND (int32_t)0xC000003A
+#define OS_STATUS_MORE_PROCESSING_REQUIRED (int32_t)0xC0000016
#define OS_OBJ_INHERIT 0x00000002
#define OS_OBJ_CASE_INSENSITIVE 0x00000040
diff --git a/src/ldso/pe_find_framework_loader.c b/src/ldso/pe_find_framework_loader.c
index df18655..0d158c1 100644
--- a/src/ldso/pe_find_framework_loader.c
+++ b/src/ldso/pe_find_framework_loader.c
@@ -224,9 +224,9 @@ int32_t pe_find_framework_loader(
OS_FILE_NON_DIRECTORY_FILE);
while (!hloader) {
- if (status == (int32_t)OS_STATUS_OBJECT_NAME_NOT_FOUND)
+ if (status == OS_STATUS_OBJECT_NAME_NOT_FOUND)
(void)0;
- else if (status == (int32_t)OS_STATUS_OBJECT_PATH_NOT_FOUND)
+ else if (status == OS_STATUS_OBJECT_PATH_NOT_FOUND)
(void)0;
else
return status;