Skip to content

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

Merged
adityapatwardhan merged 2 commits intoPowerShell:masterfrom
mateusrodrigues:libpsl-freebsd
Feb 5, 2019
Merged

Fix libpsl-native to build and pass tests on FreeBSD#2
adityapatwardhan merged 2 commits intoPowerShell:masterfrom
mateusrodrigues:libpsl-freebsd

Conversation

@mateusrodrigues
Copy link
Copy Markdown
Contributor

@mateusrodrigues mateusrodrigues commented Jul 3, 2018

Moving this PR from PowerShell/#7208 as requested by @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

iSazonov commented Jul 3, 2018

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.

@mateusrodrigues Thank you for your PR.

@adityapatwardhan
Copy link
Copy Markdown
Member

@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

XVilka commented Feb 5, 2019

Is this PR abandoned?

@adityapatwardhan adityapatwardhan merged commit 6de9504 into PowerShell:master Feb 5, 2019
@adityapatwardhan
Copy link
Copy Markdown
Member

@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