Skip to content

Commit fc9a7de

Browse files
committed
Auto merge of rust-lang#275 - lemonrock:SC_HOSTNAME_MAX, r=alexcrichton
Added _SC_HOST_NAME_MAX for FreeBSD, DragonFly, BitRig and Linux (glibc and musl) I'd have liked to also add NetBSD and OpenBSD, but I can't find where _SC_HOST_NAME_MAX is defined.
2 parents 8adb9c5 + f365111 commit fc9a7de

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

src/unix/bsd/freebsdlike/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -643,6 +643,7 @@ pub const _SC_SEM_NSEMS_MAX: ::c_int = 49;
643643
pub const _SC_SEM_VALUE_MAX: ::c_int = 50;
644644
pub const _SC_SIGQUEUE_MAX: ::c_int = 51;
645645
pub const _SC_TIMER_MAX: ::c_int = 52;
646+
pub const _SC_HOST_NAME_MAX: ::c_int = 72;
646647

647648
pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = 0 as *mut _;
648649
pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = 0 as *mut _;

src/unix/bsd/openbsdlike/bitrig.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,7 @@ pub const _SC_REALTIME_SIGNALS : ::c_int = 64;
262262
pub const _SC_RTSIG_MAX : ::c_int = 66;
263263
pub const _SC_SIGQUEUE_MAX : ::c_int = 70;
264264
pub const _SC_TIMER_MAX : ::c_int = 93;
265+
pub const _SC_HOST_NAME_MAX: ::c_int = 33;
265266

266267
pub const FD_SETSIZE: usize = 1024;
267268

src/unix/notbsd/linux/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,7 @@ pub const _SC_XBS5_LPBIG_OFFBIG: ::c_int = 128;
339339
pub const _SC_XOPEN_LEGACY: ::c_int = 129;
340340
pub const _SC_XOPEN_REALTIME: ::c_int = 130;
341341
pub const _SC_XOPEN_REALTIME_THREADS: ::c_int = 131;
342+
pub const _SC_HOST_NAME_MAX: ::c_int = 180;
342343

343344
pub const RLIM_SAVED_MAX: ::rlim_t = RLIM_INFINITY;
344345
pub const RLIM_SAVED_CUR: ::rlim_t = RLIM_INFINITY;

0 commit comments

Comments
 (0)