summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-10-05 10:06:06 -0700
committerAlex Crichton <alex@alexcrichton.com>2014-10-05 10:06:06 -0700
commita5b82f08b6aad3b38d9a80df98a13252e700e72d (patch)
treec3d6d2de7869ed9f46e7d7f323bb94b815f5bb0f /src
parenta7ef29e8369ca9c578ccb48bfc26bc5478d563fe (diff)
downloadssh2-rs-a5b82f08b6aad3b38d9a80df98a13252e700e72d.zip
Update to rust master
Diffstat (limited to 'src')
-rw-r--r--src/channel.rs10
-rw-r--r--src/lib.rs6
-rw-r--r--src/session.rs8
3 files changed, 12 insertions, 12 deletions
diff --git a/src/channel.rs b/src/channel.rs
index a3a0567..3301610 100644
--- a/src/channel.rs
+++ b/src/channel.rs
@@ -188,8 +188,8 @@ impl<'a> Channel<'a> {
/// Groups of substreams may be flushed by passing on of the following
/// constants
///
- /// * FlushExtendedData - Flush all extended data substreams
- /// * FlushAll - Flush all substreams
+ /// * FLUSH_EXTENDED_DATA - Flush all extended data substreams
+ /// * FLUSH_ALL - Flush all substreams
pub fn flush_stream(&mut self, stream_id: uint) -> Result<(), Error> {
unsafe {
self.sess.rc(raw::libssh2_channel_flush_ex(self.raw,
@@ -199,7 +199,7 @@ impl<'a> Channel<'a> {
/// Flush the stderr buffers.
pub fn flush_stderr(&mut self) -> Result<(), Error> {
- self.flush_stream(::ExtendedDataStderr)
+ self.flush_stream(::EXTENDED_DATA_STDERR)
}
/// Write data to a channel stream.
@@ -221,7 +221,7 @@ impl<'a> Channel<'a> {
/// Write data to the channel stderr stream.
pub fn write_stderr(&mut self, data: &[u8]) -> Result<(), Error> {
- self.write_stream(::ExtendedDataStderr, data)
+ self.write_stream(::EXTENDED_DATA_STDERR, data)
}
/// Get the remote exit signal.
@@ -302,7 +302,7 @@ impl<'a> Channel<'a> {
/// Read from the stderr stream .
pub fn read_stderr(&mut self, data: &mut [u8]) -> Result<uint, Error> {
- self.read_stream(::ExtendedDataStderr, data)
+ self.read_stream(::EXTENDED_DATA_STDERR, data)
}
/// Set an environment variable in the remote channel's process space.
diff --git a/src/lib.rs b/src/lib.rs
index 37e1bca..1a524ad 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -200,11 +200,11 @@ pub enum MethodType {
/// When passed to `Channel::flush_stream`, flushes all extended data
/// substreams.
-pub static FlushExtendedData: uint = -1;
+pub static FLUSH_EXTENDED_DATA: uint = -1;
/// When passed to `Channel::flush_stream`, flushes all substream.
-pub static FlushAll: uint = -2;
+pub static FLUSH_ALL: uint = -2;
/// Stream ID of the stderr channel for stream-related methods on `Channel`
-pub static ExtendedDataStderr: uint = 1;
+pub static EXTENDED_DATA_STDERR: uint = 1;
#[allow(missing_doc)]
pub enum HashType {
diff --git a/src/session.rs b/src/session.rs
index 9707a77..96f8a32 100644
--- a/src/session.rs
+++ b/src/session.rs
@@ -575,14 +575,14 @@ fn mkstat(stat: &libc::stat) -> io::FileStat {
// FileStat times are in milliseconds
fn mktime(secs: u64, nsecs: u64) -> u64 { secs * 1000 + nsecs / 1000000 }
- #[cfg(not(target_os = "linux"), not(target_os = "android"))]
+ #[cfg(all(not(target_os = "linux"), not(target_os = "android")))]
fn flags(stat: &libc::stat) -> u64 { stat.st_flags as u64 }
- #[cfg(target_os = "linux")] #[cfg(target_os = "android")]
+ #[cfg(any(target_os = "linux", target_os = "android"))]
fn flags(_stat: &libc::stat) -> u64 { 0 }
- #[cfg(not(target_os = "linux"), not(target_os = "android"))]
+ #[cfg(all(not(target_os = "linux"), not(target_os = "android")))]
fn gen(stat: &libc::stat) -> u64 { stat.st_gen as u64 }
- #[cfg(target_os = "linux")] #[cfg(target_os = "android")]
+ #[cfg(any(target_os = "linux", target_os = "android"))]
fn gen(_stat: &libc::stat) -> u64 { 0 }
io::FileStat {