Closed steen-lund closed 1 year ago
Since you had to change ReqToolsBase to be a global variable you probably don't have gcc inlines installed. If so you can use mine: https://www.dropbox.com/scl/fi/1sgbewgjl1vwb294w5tbq/reqtools-includes.7z?dl=0&rlkey=sua6pyxzp20jl943xhzoh0njc
The other issues should be fixed by: https://github.com/salass00/smb2fs/commit/aea8df5a3e1f0eef5c426da77c58fefc78c54715 https://github.com/salass00/smb2fs/commit/cc75fadac6a7b624b865998a430342709cd33f1b
The MAX_URL_SIZE already includes space for the NUL-terminator. That's why the overflow check above is "strlen() >= MAX_URL_SIZE" instead of "> MAX_URL_SIZE".
I used the gcc glue code from the developer archive on Aminet, but I will grab yours instead, it looks better and more recent.
Your own changes looks good.
A few minor changes I had to make in order to cross compile using Bebbo's gcc.
Made room for the null terminator in the string buffer for the URL. Made some explicit casts that the compiler complained about. Made ReqToolsBase a global variable to make the linker happy.