Skip to content

Workaround Azure images not supporting rustup self update #1510

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

Merged
merged 5 commits into from
Sep 13, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ci/azure-install-rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ steps:
- script: |
@echo on
if not defined TOOLCHAIN set TOOLCHAIN=nightly
rustup update %TOOLCHAIN%-%TARGET%
rustup update --no-self-update %TOOLCHAIN%-%TARGET%
rustup default %TOOLCHAIN%-%TARGET%
displayName: Install rust (windows)
condition: eq( variables['Agent.OS'], 'Windows_NT' )
Expand Down
4 changes: 0 additions & 4 deletions ci/style.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
//! * No trailing whitespace
//! * No tabs
//! * 80-character lines
//! * `extern` instead of `extern "C"`
//! * Specific module layout:
//! 1. use directives
//! 2. typedefs
Expand Down Expand Up @@ -126,9 +125,6 @@ fn check_style(file: &str, path: &Path, err: &mut Errors) {
if line.len() > 80 {
err.error(path, i, "line longer than 80 chars");
}
if line.contains("extern \"C\"") {
err.error(path, i, "use `extern` instead of `extern \"C\"");
}
if line.contains("#[cfg(") && !line.contains(" if ")
&& !(line.contains("target_endian") ||
line.contains("target_arch"))
Expand Down
112 changes: 80 additions & 32 deletions src/cloudabi/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,16 +115,20 @@ pub const SOCK_STREAM: ::c_int = 130;
pub enum FILE {}
impl ::Copy for FILE {}
impl ::Clone for FILE {
fn clone(&self) -> FILE { *self }
fn clone(&self) -> FILE {
*self
}
}
#[cfg_attr(feature = "extra_traits", derive(Debug))]
pub enum fpos_t {} // TODO: fill this out with a struct
impl ::Copy for fpos_t {}
impl ::Clone for fpos_t {
fn clone(&self) -> fpos_t { *self }
fn clone(&self) -> fpos_t {
*self
}
}

extern {
extern "C" {
pub fn isalnum(c: c_int) -> c_int;
pub fn isalpha(c: c_int) -> c_int;
pub fn iscntrl(c: c_int) -> c_int;
Expand All @@ -139,28 +143,44 @@ extern {
pub fn tolower(c: c_int) -> c_int;
pub fn toupper(c: c_int) -> c_int;
pub fn fopen(filename: *const c_char, mode: *const c_char) -> *mut FILE;
pub fn freopen(filename: *const c_char, mode: *const c_char,
file: *mut FILE) -> *mut FILE;
pub fn freopen(
filename: *const c_char,
mode: *const c_char,
file: *mut FILE,
) -> *mut FILE;
pub fn fflush(file: *mut FILE) -> c_int;
pub fn fclose(file: *mut FILE) -> c_int;
pub fn remove(filename: *const c_char) -> c_int;
pub fn rename(oldname: *const c_char, newname: *const c_char) -> c_int;
pub fn tmpfile() -> *mut FILE;
pub fn setvbuf(stream: *mut FILE, buffer: *mut c_char, mode: c_int,
size: size_t) -> c_int;
pub fn setvbuf(
stream: *mut FILE,
buffer: *mut c_char,
mode: c_int,
size: size_t,
) -> c_int;
pub fn setbuf(stream: *mut FILE, buf: *mut c_char);
pub fn getchar() -> c_int;
pub fn putchar(c: c_int) -> c_int;
pub fn fgetc(stream: *mut FILE) -> c_int;
pub fn fgets(buf: *mut c_char, n: c_int, stream: *mut FILE) -> *mut c_char;
pub fn fgets(buf: *mut c_char, n: c_int, stream: *mut FILE)
-> *mut c_char;
pub fn fputc(c: c_int, stream: *mut FILE) -> c_int;
pub fn fputs(s: *const c_char, stream: *mut FILE) -> c_int;
pub fn puts(s: *const c_char) -> c_int;
pub fn ungetc(c: c_int, stream: *mut FILE) -> c_int;
pub fn fread(ptr: *mut c_void, size: size_t, nobj: size_t,
stream: *mut FILE) -> size_t;
pub fn fwrite(ptr: *const c_void, size: size_t, nobj: size_t,
stream: *mut FILE) -> size_t;
pub fn fread(
ptr: *mut c_void,
size: size_t,
nobj: size_t,
stream: *mut FILE,
) -> size_t;
pub fn fwrite(
ptr: *const c_void,
size: size_t,
nobj: size_t,
stream: *mut FILE,
) -> size_t;
pub fn fseek(stream: *mut FILE, offset: c_long, whence: c_int) -> c_int;
pub fn ftell(stream: *mut FILE) -> c_long;
pub fn rewind(stream: *mut FILE);
Expand All @@ -171,28 +191,44 @@ extern {
pub fn perror(s: *const c_char);
pub fn atoi(s: *const c_char) -> c_int;
pub fn strtod(s: *const c_char, endp: *mut *mut c_char) -> c_double;
pub fn strtol(s: *const c_char, endp: *mut *mut c_char,
base: c_int) -> c_long;
pub fn strtoul(s: *const c_char, endp: *mut *mut c_char,
base: c_int) -> c_ulong;
pub fn strtol(
s: *const c_char,
endp: *mut *mut c_char,
base: c_int,
) -> c_long;
pub fn strtoul(
s: *const c_char,
endp: *mut *mut c_char,
base: c_int,
) -> c_ulong;
pub fn calloc(nobj: size_t, size: size_t) -> *mut c_void;
pub fn malloc(size: size_t) -> *mut c_void;
pub fn realloc(p: *mut c_void, size: size_t) -> *mut c_void;
pub fn free(p: *mut c_void);
pub fn abort() -> !;
pub fn exit(status: c_int) -> !;
pub fn _exit(status: c_int) -> !;
pub fn atexit(cb: extern fn()) -> c_int;
pub fn atexit(cb: extern "C" fn()) -> c_int;
pub fn system(s: *const c_char) -> c_int;
pub fn getenv(s: *const c_char) -> *mut c_char;
pub fn getline (lineptr: *mut *mut c_char, n: *mut size_t,
stream: *mut FILE) -> ssize_t;
pub fn getline(
lineptr: *mut *mut c_char,
n: *mut size_t,
stream: *mut FILE,
) -> ssize_t;

pub fn strcpy(dst: *mut c_char, src: *const c_char) -> *mut c_char;
pub fn strncpy(dst: *mut c_char, src: *const c_char,
n: size_t) -> *mut c_char;
pub fn strncpy(
dst: *mut c_char,
src: *const c_char,
n: size_t,
) -> *mut c_char;
pub fn strcat(s: *mut c_char, ct: *const c_char) -> *mut c_char;
pub fn strncat(s: *mut c_char, ct: *const c_char, n: size_t) -> *mut c_char;
pub fn strncat(
s: *mut c_char,
ct: *const c_char,
n: size_t,
) -> *mut c_char;
pub fn strcmp(cs: *const c_char, ct: *const c_char) -> c_int;
pub fn strncmp(cs: *const c_char, ct: *const c_char, n: size_t) -> c_int;
pub fn strcoll(cs: *const c_char, ct: *const c_char) -> c_int;
Expand All @@ -204,23 +240,35 @@ extern {
pub fn strpbrk(cs: *const c_char, ct: *const c_char) -> *mut c_char;
pub fn strstr(cs: *const c_char, ct: *const c_char) -> *mut c_char;
pub fn strcasecmp(s1: *const c_char, s2: *const c_char) -> c_int;
pub fn strncasecmp(s1: *const c_char, s2: *const c_char,
n: size_t) -> c_int;
pub fn strncasecmp(
s1: *const c_char,
s2: *const c_char,
n: size_t,
) -> c_int;
pub fn strlen(cs: *const c_char) -> size_t;
pub fn strnlen(cs: *const c_char, maxlen: size_t) -> size_t;
pub fn strerror(n: c_int) -> *mut c_char;
pub fn strtok(s: *mut c_char, t: *const c_char) -> *mut c_char;
pub fn strxfrm(s: *mut c_char, ct: *const c_char, n: size_t) -> size_t;
pub fn wcslen(buf: *const wchar_t) -> size_t;
pub fn wcstombs(dest: *mut c_char, src: *const wchar_t,
n: size_t) -> ::size_t;
pub fn wcstombs(
dest: *mut c_char,
src: *const wchar_t,
n: size_t,
) -> ::size_t;

pub fn memchr(cx: *const c_void, c: c_int, n: size_t) -> *mut c_void;
pub fn memcmp(cx: *const c_void, ct: *const c_void, n: size_t) -> c_int;
pub fn memcpy(dest: *mut c_void, src: *const c_void,
n: size_t) -> *mut c_void;
pub fn memmove(dest: *mut c_void, src: *const c_void,
n: size_t) -> *mut c_void;
pub fn memcpy(
dest: *mut c_void,
src: *const c_void,
n: size_t,
) -> *mut c_void;
pub fn memmove(
dest: *mut c_void,
src: *const c_void,
n: size_t,
) -> *mut c_void;
pub fn memset(dest: *mut c_void, c: c_int, n: size_t) -> *mut c_void;

pub fn abs(i: c_int) -> c_int;
Expand Down Expand Up @@ -259,7 +307,7 @@ extern {
pub fn pthread_create(
native: *mut ::pthread_t,
attr: *const ::pthread_attr_t,
f: extern fn(*mut ::c_void) -> *mut ::c_void,
f: extern "C" fn(*mut ::c_void) -> *mut ::c_void,
value: *mut ::c_void,
) -> ::c_int;
pub fn pthread_detach(thread: ::pthread_t) -> ::c_int;
Expand All @@ -270,7 +318,7 @@ extern {
) -> ::c_int;
pub fn pthread_key_create(
key: *mut pthread_key_t,
dtor: ::Option<unsafe extern fn(*mut ::c_void)>,
dtor: ::Option<unsafe extern "C" fn(*mut ::c_void)>,
) -> ::c_int;
pub fn pthread_key_delete(key: pthread_key_t) -> ::c_int;
pub fn pthread_setspecific(
Expand Down
40 changes: 8 additions & 32 deletions src/fixed_width_ints.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,43 +2,19 @@
//!
//! These aliases are deprecated: use the Rust types instead.

#[deprecated(
since = "0.2.55",
note = "Use i8 instead."
)]
#[deprecated(since = "0.2.55", note = "Use i8 instead.")]
pub type int8_t = i8;
#[deprecated(
since = "0.2.55",
note = "Use i16 instead."
)]
#[deprecated(since = "0.2.55", note = "Use i16 instead.")]
pub type int16_t = i16;
#[deprecated(
since = "0.2.55",
note = "Use i32 instead."
)]
#[deprecated(since = "0.2.55", note = "Use i32 instead.")]
pub type int32_t = i32;
#[deprecated(
since = "0.2.55",
note = "Use i64 instead."
)]
#[deprecated(since = "0.2.55", note = "Use i64 instead.")]
pub type int64_t = i64;
#[deprecated(
since = "0.2.55",
note = "Use u8 instead."
)]
#[deprecated(since = "0.2.55", note = "Use u8 instead.")]
pub type uint8_t = u8;
#[deprecated(
since = "0.2.55",
note = "Use u16 instead."
)]
#[deprecated(since = "0.2.55", note = "Use u16 instead.")]
pub type uint16_t = u16;
#[deprecated(
since = "0.2.55",
note = "Use u32 instead."
)]
#[deprecated(since = "0.2.55", note = "Use u32 instead.")]
pub type uint32_t = u32;
#[deprecated(
since = "0.2.55",
note = "Use u64 instead."
)]
#[deprecated(since = "0.2.55", note = "Use u64 instead.")]
pub type uint64_t = u64;
2 changes: 1 addition & 1 deletion src/fuchsia/align.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,5 +138,5 @@ macro_rules! expand_align {
}
}
}
}
};
}
Loading