Skip to content

Fix libpsl-native to build and pass tests on FreeBSD - #2

Merged
Aditya Patwardhan (adityapatwardhan) merged 2 commits into
PowerShell:masterfrom
mateusrodrigues:libpsl-freebsd
Feb 5, 2019
Merged

Aditya Patwardhan (adityapatwardhan) merged 2 commits into
PowerShell:masterfrom
mateusrodrigues:libpsl-freebsd

Conversation

@mateusrodrigues

@mateusrodrigues Mateus Rodrigues de Morais (mateusrodrigues) commented Jul 3, 2018 •

Copy link
Copy Markdown
Contributor

Moving this PR from PowerShell/#7208 as requested by Aditya Patwardhan (@adityapatwardhan)

The only change necessary after all was in file getuserfrompid.cpp, since isfile.cpp is following a PathExists implementation and was correct in the first place as tests were previously fixed.

With changes from this PR, all tests are passing on FreeBSD.

@iSazonov

Copy link
Copy Markdown
Contributor

After merging PowerShell/PowerShell#7129 we will no longer use src/isfile.cpp.

@adityapatwardhan

Copy link
Copy Markdown
Member

I am working on a CI system for this repo. We should take this change once that is in place.

Mateus Rodrigues de Morais (@mateusrodrigues) Thank you for your PR.

@adityapatwardhan

Copy link
Copy Markdown
Member

Mateus Rodrigues de Morais (@mateusrodrigues) I have enable CI now and hence rebased your PR.


return GetPwUid(oldp.kp_eproc.e_ucred.cr_uid);

#elif defined(__FreeBSD__)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of this can the following work?

#elif (defined(__APPLE__) && defined(__MACH__)) || defined(__FreeBSD__)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The return statement is the only one that really changes from macOS' implementation. I rewrote the ifdefs to replace only the return section.

@XVilka

Copy link
Copy Markdown

Is this PR abandoned?

@adityapatwardhan
Aditya Patwardhan (adityapatwardhan) merged commit 6de9504 into PowerShell:master Feb 5, 2019
@adityapatwardhan

Copy link
Copy Markdown
Member

Mateus Rodrigues de Morais (@mateusrodrigues) Thank you for your contribution

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.

4 participants