Fix windows gnu build.
This commit is contained in:
parent
a13b8e279e
commit
a004549b97
4
build.rs
4
build.rs
@ -580,7 +580,7 @@ fn compile(p: &Path, target: &Target, out_dir: &Path,
|
||||
let mut out_path = out_dir.clone().join(p.file_name().unwrap());
|
||||
out_path.set_extension(target.obj_ext);
|
||||
if need_run(&p, &out_path, includes_modified) {
|
||||
let cmd = if target.env() != "msvc" || ext != "asm" {
|
||||
let cmd = if target.os() != WINDOWS || ext != "asm" {
|
||||
cc(p, ext, target, &out_path)
|
||||
} else {
|
||||
yasm(p, target.arch(), &out_path)
|
||||
@ -624,7 +624,7 @@ fn cc(file: &Path, ext: &str, target: &Target, out_dir: &Path) -> Command {
|
||||
}
|
||||
if target.os() != "none" &&
|
||||
target.os() != "redox" &&
|
||||
target.env() != "msvc" {
|
||||
target.os() != "windows" {
|
||||
let _ = c.flag("-fstack-protector");
|
||||
}
|
||||
|
||||
|
@ -62,11 +62,15 @@
|
||||
#include <inttypes.h>
|
||||
|
||||
#if defined(OPENSSL_WINDOWS)
|
||||
#if defined(_MSC_VER)
|
||||
#pragma warning(push, 3)
|
||||
#endif
|
||||
#include <immintrin.h>
|
||||
#include <intrin.h>
|
||||
#if defined(_MSC_VER)
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "internal.h"
|
||||
|
||||
|
@ -27,6 +27,9 @@
|
||||
/* OS X's C ABI prefixes functions with underscore. */
|
||||
#define C_ABI(x) _ ## x
|
||||
#define HIDDEN .private_extern
|
||||
#elif defined(__MINGW32__) || defined(__MINGW64__)
|
||||
#define C_ABI(x) x
|
||||
#define HIDDEN
|
||||
#else
|
||||
#define C_ABI(x) x
|
||||
#define HIDDEN .hidden
|
||||
|
@ -45,7 +45,9 @@ long GFp_sysrand_chunk(void *buf, size_t len);
|
||||
|
||||
#include <limits.h>
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma warning(push, 3)
|
||||
#endif
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
@ -56,7 +58,9 @@ long GFp_sysrand_chunk(void *buf, size_t len);
|
||||
#include <ntsecapi.h>
|
||||
#undef SystemFunction036
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
long GFp_sysrand_chunk(void *out, size_t requested) {
|
||||
if (requested > ULONG_MAX) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user