Skip to content

Commit d9a4c7a

Browse files
committed
Remove uchar.h includes
1 parent 64f8bee commit d9a4c7a

4 files changed

Lines changed: 3 additions & 6 deletions

File tree

lib/libpe/include/libpe/dir_resources.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@
2323
#define LIBPE_DIR_RESOURCES_H
2424

2525
#include <stdint.h>
26-
#include <uchar.h>
27-
#include <wchar.h>
2826

2927
#ifdef __cplusplus
3028
extern "C" {

lib/libpe/resources.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
#include <string.h>
3131
#include <sys/types.h>
3232
#include <sys/stat.h>
33-
#include <uchar.h>
3433
#include <unistd.h>
3534

3635
// REFERENCE: https://msdn.microsoft.com/en-us/library/ms648009(v=vs.85).aspx
@@ -637,7 +636,7 @@ const VS_FIXEDFILEINFO *pe_resource_get_fixedfileinfo(const pe_ctx_t *ctx, const
637636
break;
638637
}
639638

640-
const char16_t *szkey = LIBPE_PTR_ADD(data_ptr, sizeof(VS_VERSIONINFO_HEAD));
639+
const uint16_t *szkey = LIBPE_PTR_ADD(data_ptr, sizeof(VS_VERSIONINFO_HEAD));
641640

642641
// char key[256];
643642
// mbstate_t state = {0};
@@ -653,7 +652,7 @@ const VS_FIXEDFILEINFO *pe_resource_get_fixedfileinfo(const pe_ctx_t *ctx, const
653652
}
654653
// printf("\n%s\n", key);
655654

656-
int info_offset = (key_size*sizeof(char16_t)) + sizeof(VS_VERSIONINFO_HEAD);
655+
int info_offset = (key_size*sizeof(uint16_t)) + sizeof(VS_VERSIONINFO_HEAD);
657656
// Align to next 32bit/4byte
658657
info_offset += 4-(info_offset%4);
659658

src/peres.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141
#include <string.h>
4242
#include <sys/types.h>
4343
#include <sys/stat.h>
44-
#include <uchar.h>
4544
#include <unistd.h>
4645
#include <wchar.h>
4746

src/pestr.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636

3737
#include "common.h"
3838
#include <ctype.h>
39+
#include <wchar.h>
3940
#include <wctype.h>
4041
#include <errno.h>
4142
#include <limits.h>

0 commit comments

Comments
 (0)