Skip to content

Commit 500365e

Browse files
committed
Change FD_SETSIZE to c_int
1 parent 90cb774 commit 500365e

File tree

15 files changed

+29
-29
lines changed

15 files changed

+29
-29
lines changed

src/fuchsia/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ s! {
380380
}
381381

382382
pub struct fd_set {
383-
fds_bits: [::c_ulong; FD_SETSIZE / ULONG_SIZE],
383+
fds_bits: [::c_ulong; FD_SETSIZE as usize / ULONG_SIZE],
384384
}
385385

386386
pub struct tm {
@@ -1827,7 +1827,7 @@ pub const SS_DISABLE: ::c_int = 2;
18271827

18281828
pub const PATH_MAX: ::c_int = 4096;
18291829

1830-
pub const FD_SETSIZE: usize = 1024;
1830+
pub const FD_SETSIZE: ::c_int = 1024;
18311831

18321832
pub const EPOLLIN: ::c_int = 0x1;
18331833
pub const EPOLLPRI: ::c_int = 0x2;

src/unix/aix/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2140,7 +2140,7 @@ pub const POWER_8: ::c_int = 0x10000;
21402140
pub const POWER_9: ::c_int = 0x20000;
21412141

21422142
// sys/time.h
2143-
pub const FD_SETSIZE: usize = 65534;
2143+
pub const FD_SETSIZE: ::c_int = 65534;
21442144
pub const TIMEOFDAY: ::c_int = 9;
21452145
pub const CLOCK_REALTIME: ::clockid_t = TIMEOFDAY as clockid_t;
21462146
pub const CLOCK_MONOTONIC: ::clockid_t = 10;

src/unix/bsd/apple/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4364,7 +4364,7 @@ pub const OS_SIGNPOST_INTERVAL_END: ::os_signpost_type_t = 0x02;
43644364
pub const MINSIGSTKSZ: ::size_t = 32768;
43654365
pub const SIGSTKSZ: ::size_t = 131072;
43664366

4367-
pub const FD_SETSIZE: usize = 1024;
4367+
pub const FD_SETSIZE: ::c_int = 1024;
43684368

43694369
pub const ST_NOSUID: ::c_ulong = 2;
43704370

src/unix/bsd/freebsdlike/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1204,7 +1204,7 @@ pub const SCHED_FIFO: ::c_int = 1;
12041204
pub const SCHED_OTHER: ::c_int = 2;
12051205
pub const SCHED_RR: ::c_int = 3;
12061206

1207-
pub const FD_SETSIZE: usize = 1024;
1207+
pub const FD_SETSIZE: ::c_int = 1024;
12081208

12091209
pub const ST_NOSUID: ::c_ulong = 2;
12101210

src/unix/bsd/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@ s! {
5959
pub struct fd_set {
6060
#[cfg(all(target_pointer_width = "64",
6161
any(target_os = "freebsd", target_os = "dragonfly")))]
62-
fds_bits: [i64; FD_SETSIZE / 64],
62+
fds_bits: [i64; FD_SETSIZE as usize / 64],
6363
#[cfg(not(all(target_pointer_width = "64",
6464
any(target_os = "freebsd", target_os = "dragonfly"))))]
65-
fds_bits: [i32; FD_SETSIZE / 32],
65+
fds_bits: [i32; FD_SETSIZE as usize / 32],
6666
}
6767

6868
pub struct tm {

src/unix/bsd/netbsdlike/netbsd/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1860,7 +1860,7 @@ pub const _SC_SCHED_RT_TS: ::c_int = 2001;
18601860
pub const _SC_SCHED_PRI_MIN: ::c_int = 2002;
18611861
pub const _SC_SCHED_PRI_MAX: ::c_int = 2003;
18621862

1863-
pub const FD_SETSIZE: usize = 0x100;
1863+
pub const FD_SETSIZE: ::c_int = 0x100;
18641864

18651865
pub const ST_NOSUID: ::c_ulong = 8;
18661866

src/unix/bsd/netbsdlike/openbsd/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1374,7 +1374,7 @@ pub const _SC_AVPHYS_PAGES: ::c_int = 501;
13741374
pub const _SC_NPROCESSORS_CONF: ::c_int = 502;
13751375
pub const _SC_NPROCESSORS_ONLN: ::c_int = 503;
13761376

1377-
pub const FD_SETSIZE: usize = 1024;
1377+
pub const FD_SETSIZE: ::c_int = 1024;
13781378

13791379
pub const SCHED_FIFO: ::c_int = 1;
13801380
pub const SCHED_OTHER: ::c_int = 2;

src/unix/haiku/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1100,7 +1100,7 @@ pub const SA_ONESHOT: ::c_int = SA_RESETHAND;
11001100
pub const SS_ONSTACK: ::c_int = 0x1;
11011101
pub const SS_DISABLE: ::c_int = 0x2;
11021102

1103-
pub const FD_SETSIZE: usize = 1024;
1103+
pub const FD_SETSIZE: ::c_int = 1024;
11041104

11051105
pub const RTLD_LOCAL: ::c_int = 0x0;
11061106
pub const RTLD_NOW: ::c_int = 0x1;

src/unix/hurd/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1084,7 +1084,7 @@ pub const SHM_UNLOCK: ::c_int = 12;
10841084
pub const STDIN_FILENO: ::c_int = 0;
10851085
pub const STDOUT_FILENO: ::c_int = 1;
10861086
pub const STDERR_FILENO: ::c_int = 2;
1087-
pub const __FD_SETSIZE: usize = 256;
1087+
pub const __FD_SETSIZE: ::c_int = 256;
10881088
pub const R_OK: ::c_int = 4;
10891089
pub const W_OK: ::c_int = 2;
10901090
pub const X_OK: ::c_int = 1;
@@ -1129,7 +1129,7 @@ pub const PDP_ENDIAN: usize = 3412;
11291129
pub const BYTE_ORDER: usize = 1234;
11301130

11311131
// sys/select.h
1132-
pub const FD_SETSIZE: usize = 256;
1132+
pub const FD_SETSIZE: ::c_int = 256;
11331133
pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 32;
11341134
pub const __SIZEOF_PTHREAD_ATTR_T: usize = 32;
11351135
pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 28;
@@ -1452,8 +1452,8 @@ pub const _POSIX_MQ_OPEN_MAX: usize = 8;
14521452
pub const _POSIX_MQ_PRIO_MAX: usize = 32;
14531453
pub const _POSIX_NAME_MAX: usize = 14;
14541454
pub const _POSIX_NGROUPS_MAX: usize = 8;
1455-
pub const _POSIX_OPEN_MAX: usize = 20;
1456-
pub const _POSIX_FD_SETSIZE: usize = 20;
1455+
pub const _POSIX_OPEN_MAX: ::c_int = 20;
1456+
pub const _POSIX_FD_SETSIZE: ::c_int = 20;
14571457
pub const _POSIX_PATH_MAX: usize = 256;
14581458
pub const _POSIX_PIPE_BUF: usize = 512;
14591459
pub const _POSIX_RE_DUP_MAX: usize = 255;

src/unix/linux_like/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ s! {
8989
}
9090

9191
pub struct fd_set {
92-
fds_bits: [::c_ulong; FD_SETSIZE / ULONG_SIZE],
92+
fds_bits: [::c_ulong; FD_SETSIZE as usize / ULONG_SIZE],
9393
}
9494

9595
pub struct tm {
@@ -1069,7 +1069,7 @@ pub const PATH_MAX: ::c_int = 4096;
10691069

10701070
pub const UIO_MAXIOV: ::c_int = 1024;
10711071

1072-
pub const FD_SETSIZE: usize = 1024;
1072+
pub const FD_SETSIZE: ::c_int = 1024;
10731073

10741074
pub const EPOLLIN: ::c_int = 0x1;
10751075
pub const EPOLLPRI: ::c_int = 0x2;

0 commit comments

Comments
 (0)