Skip to content

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
#[cfg(windows)]
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