Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Improve windows support #120

Open
wants to merge 68 commits into
base: master
Choose a base branch
from

Conversation

auterium
Copy link
Contributor

@auterium auterium commented Jan 3, 2020

This PR includes:

  • Basic logging support for Windows. Regular, PG-based, logging support crashes under Windows at runtime, so using eprintln!() we can at least avoid crashes and write to PG log.
  • Side effects of logs under Windows: notify back to the client any messages that should be sent back
  • Soundess in &[T] support: only execute unsafe code inside unsafe blocks; safe code moved out of unsafe blocks
  • Document how to use correct rustflags for Windows builds (pointing to postgres.lib)

auterium and others added 30 commits December 25, 2019 03:29
fn main() {
const LIB_NAME: &str = env!("CARGO_PKG_NAME");
let lib_name = env!("CARGO_PKG_NAME").replace("-", "_");
Copy link
Contributor Author

Choose a reason for hiding this comment

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

When building, the resulting files will always use underscores, so we need to replace dashes with underscores, otherwise there's a mismatch

else {
panic!("Cannot mix Option and non-Option arguments.");
}
if !optional_args.iter().any(|&x| x) { " STRICT" }
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This allows for mixing Option with non-Option arguments.

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.

2 participants