@@ -822,9 +822,9 @@ pub fn mkstemp<P: ?Sized + NixPath>(template: &P) -> Result<(RawFd, PathBuf)> {
822
822
}
823
823
824
824
/// Variable names for `pathconf`
825
- // Note: POSIX 1003.1-2008 requires all of these symbols to be
826
- // supported, but Rust's libc does not yet define them all for all
827
- // platforms
825
+ ///
826
+ /// Note: POSIX 1003.1-2008 standardizes all of these variables, but some OSes
827
+ /// choose not to implement variables that cannot change at runtime.
828
828
#[ derive( Clone , Copy , Debug , Eq , Hash , PartialEq ) ]
829
829
#[ repr( i32 ) ]
830
830
pub enum PathconfVar {
@@ -889,6 +889,8 @@ pub enum PathconfVar {
889
889
/// unsupported (for option variables)
890
890
/// - `Err(x)`: an error occurred
891
891
///
892
+ /// # Referencces
893
+ ///
892
894
/// http://pubs.opengroup.org/onlinepubs/9699919799/functions/pathconf.html
893
895
pub fn fpathconf ( fd : RawFd , var : PathconfVar ) -> Result < Option < c_long > > {
894
896
let raw = unsafe {
@@ -911,12 +913,12 @@ pub fn fpathconf(fd: RawFd, var: PathconfVar) -> Result<Option<c_long>> {
911
913
/// Returns the value of a path-dependent configurable system variable. Most
912
914
/// supported variables also have associated compile-time constants, but POSIX
913
915
/// allows their values to change at runtime. There are generally two types of
914
- /// pathconf variables: options and limits. See pathconf(3) for more details.
916
+ /// ` pathconf` variables: options and limits. See pathconf(3) for more details.
915
917
///
916
918
/// # Parameters
917
919
///
918
920
/// - `path`: Lookup the value of `var` for this file or directory
919
- /// - `var`: The pathconf variable to lookup
921
+ /// - `var`: The ` pathconf` variable to lookup
920
922
///
921
923
/// # Returns
922
924
///
@@ -927,6 +929,8 @@ pub fn fpathconf(fd: RawFd, var: PathconfVar) -> Result<Option<c_long>> {
927
929
/// unsupported (for option variables)
928
930
/// - `Err(x)`: an error occurred
929
931
///
932
+ /// # Referencces
933
+ ///
930
934
/// http://pubs.opengroup.org/onlinepubs/9699919799/functions/pathconf.html
931
935
pub fn pathconf < P : ?Sized + NixPath > ( path : & P , var : PathconfVar ) -> Result < Option < c_long > > {
932
936
let raw = try!( path. with_nix_path ( |cstr| {
@@ -947,8 +951,9 @@ pub fn pathconf<P: ?Sized + NixPath>(path: &P, var: PathconfVar) -> Result<Optio
947
951
}
948
952
949
953
/// Variable names for `sysconf`
950
- // Note: All of these symbols are standardized by POSIX 1003.1-2008, but haven't
951
- // been implemented by all platforms.
954
+ ///
955
+ /// Note: All of these symbols are standardized by POSIX 1003.1-2008, but haven't
956
+ /// been implemented by all platforms.
952
957
#[ derive( Clone , Copy , Debug , Eq , Hash , PartialEq ) ]
953
958
#[ repr( i32 ) ]
954
959
pub enum SysconfVar {
@@ -1229,6 +1234,8 @@ _XOPEN_VERSION = libc::_SC_XOPEN_VERSION,
1229
1234
/// unsupported (for option variables)
1230
1235
/// - Err(x): an error occurred
1231
1236
///
1237
+ /// # Referencces
1238
+ ///
1232
1239
/// http://pubs.opengroup.org/onlinepubs/9699919799/functions/sysconf.html
1233
1240
pub fn sysconf ( var : SysconfVar ) -> Result < Option < c_long > > {
1234
1241
let raw = unsafe {
0 commit comments