Skip to content

Commit 3de62ef

Browse files
committed
define TMP_MAX differently for openbsdlike
1 parent 0f8571b commit 3de62ef

File tree

4 files changed

+6
-1
lines changed

4 files changed

+6
-1
lines changed

src/unix/bsd/openbsdlike/bitrig.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,8 @@ pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 2;
215215
pub const HW_AVAILCPU: ::c_int = 25;
216216
pub const KERN_PROC_ARGS: ::c_int = 55;
217217

218+
pub const TMP_MAX : ::c_uint = 0x7fffffff;
219+
218220
extern {
219221
pub fn getnameinfo(sa: *const ::sockaddr,
220222
salen: ::socklen_t,

src/unix/bsd/openbsdlike/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ pub const BUFSIZ : ::c_uint = 1024;
5757
pub const FOPEN_MAX : ::c_uint = 20;
5858
pub const FILENAME_MAX : ::c_uint = 1024;
5959
pub const L_tmpnam : ::c_uint = 1024;
60-
pub const TMP_MAX : ::c_uint = 308915776;
6160
pub const O_RDONLY : ::c_int = 0;
6261
pub const O_WRONLY : ::c_int = 1;
6362
pub const O_RDWR : ::c_int = 2;

src/unix/bsd/openbsdlike/netbsd.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,8 @@ pub const NOTE_PCTRLMASK: ::uint32_t = 0xf0000000;
320320

321321
pub const CRTSCTS: ::tcflag_t = 0x00010000;
322322

323+
pub const TMP_MAX : ::c_uint = 308915776;
324+
323325
extern {
324326
pub fn getnameinfo(sa: *const ::sockaddr,
325327
salen: ::socklen_t,

src/unix/bsd/openbsdlike/openbsd.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,8 @@ pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 2;
214214

215215
pub const KERN_PROC_ARGS: ::c_int = 55;
216216

217+
pub const TMP_MAX : ::c_uint = 0x7fffffff;
218+
217219
// syscall numbers
218220
pub const SYS_getentropy: ::c_int = 7;
219221

0 commit comments

Comments
 (0)