ps3dev / ps3toolchain

A script to autobuild an open source toolchain for the PS3.
BSD 2-Clause "Simplified" License
280 stars 92 forks source link

Replace access() #91

Closed bucanero closed 4 years ago

bucanero commented 4 years ago

This is a proposed newlib patch with an emulated implementation of access()

access.c is based on @crystalct file: https://github.com/crystalct/PS3LibrariesUpdate/blob/master/src/access.c

bucanero commented 4 years ago

the proper way to test this change would be to rebuild the whole toolchain, and then create a test app that calls access() , right?

Edit: well, I went ahead and rebuilt everything from scratch, and tested a sample psl1ght app, calling access() to some files and everything worked as expected. (maybe there was a shorter/faster way to test it 😅 )

miigotu commented 4 years ago

I can't test for now, sorry. My laptop took a shit and I don't have a backup lappy

zeldin commented 4 years ago

The contents look fine, but I would suggest making this as a PR against newlib-1.20.0-PS3 and then updating the patch based on that. That makes it easier to track changes and is how development was made on newlib-1.19.0.

bucanero commented 4 years ago

@zeldin alright, I'm making a PR to newlib-1.20.0-PS3 with these changes, and then if everything looks good both PRs can be merged: https://github.com/ps3dev/newlib-1.20.0-PS3/pull/1

@miigotu oops, that's too bad, I hope you can fix your laptop!

thanks for the help 👍

miigotu commented 4 years ago

@zeldin submodules have come a long way since we tried it last time. What do you think about trying them out again using the *-PS3 libs in a new branch off-master?

zeldin commented 4 years ago

@miigotu You mean building newlib from a submodule instead of dist archive + patch? Yes, that would be more convenient for development. Feel free to create the branch, I can try it out next week when my vacation starts... :smile_cat:

miigotu commented 4 years ago

I'll try lol. But first I have to try and get this 12 year old laptop set up to use until my new one comes lol...

zeldin commented 4 years ago

Rather than merging this PR, I simply regenerated the patch from the newlib-1.20.0-PS3 repo. The two patches generated identical results when applied to the unpatched newlib sources, save a minor whitespace difference in syscalls.c.

bucanero commented 4 years ago

perfect, then I can close this PR since the newlib patch is already updated. 👍 thanks @zeldin and @miigotu for the help !

btw, if there's no reason against Markdown files, I'd like to submit a PR with an updated README.md for the ps3toolchain repo, adding building instructions for macOS users.