Skip to content

Improve dsktool portability and fix some issues#4

Open
Robert-van-Engelen wants to merge 3 commits intonataliapc:masterfrom
Robert-van-Engelen:master
Open

Improve dsktool portability and fix some issues#4
Robert-van-Engelen wants to merge 3 commits intonataliapc:masterfrom
Robert-van-Engelen:master

Conversation

@Robert-van-Engelen
Copy link

This PR improves dsktool portability and fixes some issues:

  • update dsktool/Makefile to compile dsktool on Linux and MacOS without warnings and errors
  • update dsktool/dsktool.c to remove deprecated malloc.h since malloc/free are declared in stdlib.h
  • update dsktool/dsktool.c to fix char signedness issues (char may or may not be signed, no assumptions should be made)

I've tested dsktool on Linux and MacOS using a 720K MSX .dsk image created with WebMSX for my ForthMSX project.

I've not tested on Windows. However, I do not expect problems, because these source code changes are minimal and follow the C/C++ standard.

malloc.h is deprecated, malloc/free are declared in stdlib.h
nothing is specifically C++ in dsktool.c
comment out STATIC because this prevents linking on some systems like MacOS
reason: char may or may not be signed, no assumption should be made
fix: change char comparisons
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant