Skip to content

Commit

Permalink
Switch from off64_t to off_t (#247)
Browse files Browse the repository at this point in the history
  • Loading branch information
ConiKost authored Jun 22, 2024
1 parent ce51cc1 commit 78e7875
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ endif()
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -fomit-frame-pointer -mstackrealign -fno-strict-aliasing")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -fomit-frame-pointer -mstackrealign -fno-strict-aliasing")

if (UNIX)
add_definitions(-D_FILE_OFFSET_BITS=64)
endif ()

set(PCEM_VERSION_STRING "vNext" CACHE STRING "PCem Version String")
set(PCEM_DISPLAY_ENGINE "wxWidgets" CACHE STRING "PCem Display Engine")
set(PCEM_DEFINES ${PCEM_DEFINES} PCEM_VERSION_STRING="${PCEM_VERSION_STRING}")
Expand Down
4 changes: 2 additions & 2 deletions src/wx-ui/wx-config.c
Original file line number Diff line number Diff line change
Expand Up @@ -1337,7 +1337,7 @@ static device_t *hdd_controller_selected_get_device(void *hdlg) {
return NULL;
}

static void check_hd_type(void *hdlg, off64_t sz) {
static void check_hd_type(void *hdlg, off_t sz) {
int c;

hd_new_type = 0;
Expand Down Expand Up @@ -2037,7 +2037,7 @@ static int hd_new(void *hdlg, int drive) {

static int hd_file(void *hdlg, int drive) {
if (!getfile(hdlg, "Hard disc image (*.img;*.vhd)|*.img;*.vhd|All files (*.*)|*.*", "")) {
off64_t sz;
off_t sz;
FILE *f = fopen64(openfilestring, "rb");
if (!f) {
wx_messagebox(hdlg, "Can't open file for read", "PCem error", WX_MB_OK);
Expand Down

0 comments on commit 78e7875

Please sign in to comment.