mirror of
https://github.com/AGWA/git-crypt.git
synced 2025-12-25 20:34:15 -08:00
Lay groundwork for Windows support
Move Unix-specific code to util-unix.cpp, and place Windows equivalents in util-win32.cpp. Most of the Windows functions are just stubs at the moment, and we need a build system that works on Windows.
This commit is contained in:
@@ -82,13 +82,7 @@ try {
|
||||
* General initialization
|
||||
*/
|
||||
|
||||
// The following two lines are essential for achieving good performance:
|
||||
std::ios_base::sync_with_stdio(false);
|
||||
std::cin.tie(0);
|
||||
|
||||
std::cin.exceptions(std::ios_base::badbit);
|
||||
std::cout.exceptions(std::ios_base::badbit);
|
||||
|
||||
init_std_streams();
|
||||
ERR_load_crypto_strings();
|
||||
|
||||
/*
|
||||
@@ -186,11 +180,7 @@ try {
|
||||
std::cerr << "git-crypt: GPG error: " << e.message << std::endl;
|
||||
return 1;
|
||||
} catch (const System_error& e) {
|
||||
std::cerr << "git-crypt: " << e.action << ": ";
|
||||
if (!e.target.empty()) {
|
||||
std::cerr << e.target << ": ";
|
||||
}
|
||||
std::cerr << strerror(e.error) << std::endl;
|
||||
std::cerr << "git-crypt: System error: " << e.message() << std::endl;
|
||||
return 1;
|
||||
} catch (const Crypto_error& e) {
|
||||
std::cerr << "git-crypt: Crypto error: " << e.where << ": " << e.message << std::endl;
|
||||
|
||||
Reference in New Issue
Block a user