summaryrefslogtreecommitdiff
path: root/src/unix/bsd
Commit message (Collapse)AuthorAgeFilesLines
* Auto merge of #605 - Uplifting:unix, r=alexcrichtonbors2017-05-283-1/+6
|\ | | | | | | | | | | fill out common unix syscalls i'm expecting a few build failures, particularly from brk/sbrk.
| * add ::timeval to settimeofdayAndrew Salmon2017-05-273-3/+3
| |
| * make modifications for proper build.Andrew Salmon2017-05-273-1/+6
| |
* | Fixed targets without the sync() functionRazican2017-05-261-0/+2
|/
* Add AT_FDCWD for FreeBSDLee Bousfield2017-05-151-0/+2
|
* Add XATTR flagsLee Bousfield2017-05-071-0/+7
|
* Add xattr functions for OSXLee Bousfield2017-05-071-0/+21
|
* Add RTLD_NEXT and RTLD_SELF to *BSDLee Bousfield2017-04-301-0/+2
|
* Expose B460800 & B921600 on netbsdBryant Mairs2017-04-191-0/+3
|
* Don't expose B460800 & B921600 on dragonflyBryant Mairs2017-04-192-2/+3
| | | | | These constants aren't available from the system headers so don't expose them here.
* Expose CRTSCTS on freebsd and dragonflyBryant Mairs2017-04-191-0/+2
|
* Add const socket protocol for divert rule ipfw on FreeBSDNorbytus2017-04-061-0/+2
|
* Auto merge of #559 - superriva:superriva-patch-1, r=alexcrichtonbors2017-04-041-0/+76
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add IPC,SHM,MSG for Freebsd INFO for the patch: FREEBSD [https://github.com/freebsd/freebsd] /sys/sys/_types.h typedef long __key_t; /sys/sys/types.h typedef __key_t key_t; /sys/sys/ipc.h #define IPC_CREAT 001000 #define IPC_EXCL 002000 #define IPC_NOWAIT 004000 #define IPC_PRIVATE (key_t)0 #define IPC_RMID 0 #define IPC_SET 1 #define IPC_STAT 2 #define IPC_INFO 3 #define IPC_R 000400 #define IPC_W 000200 #define IPC_M 010000 struct ipc_perm { uid_t cuid; gid_t cgid; uid_t uid; gid_t gid; mode_t mode; unsigned short seq; key_t key; }; key_t ftok(const char *, int); /sys/sys/msg.h #define MSG_NOERROR 010000 typedef unsigned long msglen_t; typedef unsigned long msgqnum_t; struct msqid_ds { struct ipc_perm msg_perm; struct msg *msg_first; struct msg *msg_last; msglen_t msg_cbytes; msgqnum_t msg_qnum; msglen_t msg_qbytes; pid_t msg_lspid; pid_t msg_lrpid; time_t msg_stime; time_t msg_rtime; time_t msg_ctime; }; struct msg { struct msg *msg_next; long msg_type; u_short msg_ts; short msg_spot; struct label *label; }; struct msginfo { int msgmax, msgmni, msgmnb, msgtql, msgssz, msgseg; }; int msgctl(int, int, struct msqid_ds *); int msgget(key_t, int); ssize_t msgrcv(int, void *, size_t, long, int); int msgsnd(int, const void *, size_t, int); /sys/sys/shm.h #define SHM_RDONLY 010000 #define SHM_RND 020000 #define SHMLBA PAGE_SIZE #define SHM_R (IPC_R) #define SHM_W (IPC_W) #define SHM_LOCK 11 #define SHM_UNLOCK 12 #define SHM_STAT 13 #define SHM_INFO 14 typedef unsigned int shmatt_t; struct shmid_ds { struct ipc_perm shm_perm; size_t shm_segsz; pid_t shm_lpid; pid_t shm_cpid; shmatt_t shm_nattch; time_t shm_atime; time_t shm_dtime; time_t shm_ctime; }; void *shmat(int, const void *, int); int shmget(key_t, size_t, int); int shmctl(int, int, struct shmid_ds *); int shmdt(const void *); /sys/security/mac/mac_internal.h #define MAC_MAX_SLOTS 4 struct label { int l_flags; intptr_t l_perpolicy[MAC_MAX_SLOTS]; };
| * Add IPC,SHM,MSG for Freebsdsuperriva2017-04-041-0/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | INFO for the patch: FREEBSD [https://github.com/freebsd/freebsd] /sys/sys/_types.h typedef long __key_t; /sys/sys/types.h typedef __key_t key_t; /sys/sys/ipc.h struct ipc_perm { uid_t cuid; gid_t cgid; uid_t uid; gid_t gid; mode_t mode; unsigned short seq; key_t key; }; key_t ftok(const char *, int); /sys/sys/msg.h typedef unsigned long msglen_t; typedef unsigned long msgqnum_t; struct msqid_ds { struct ipc_perm msg_perm; struct msg *msg_first; struct msg *msg_last; msglen_t msg_cbytes; msgqnum_t msg_qnum; msglen_t msg_qbytes; pid_t msg_lspid; pid_t msg_lrpid; time_t msg_stime; time_t msg_rtime; time_t msg_ctime; }; struct msg { struct msg *msg_next; long msg_type; u_short msg_ts; short msg_spot; struct label *label; }; struct msginfo { int msgmax, msgmni, msgmnb, msgtql, msgssz, msgseg; }; int msgctl(int, int, struct msqid_ds *); int msgget(key_t, int); ssize_t msgrcv(int, void *, size_t, long, int); int msgsnd(int, const void *, size_t, int); /sys/sys/shm.h typedef unsigned int shmatt_t; struct shmid_ds { struct ipc_perm shm_perm; size_t shm_segsz; pid_t shm_lpid; pid_t shm_cpid; shmatt_t shm_nattch; time_t shm_atime; time_t shm_dtime; time_t shm_ctime; }; void *shmat(int, const void *, int); int shmget(key_t, size_t, int); int shmctl(int, int, struct shmid_ds *); int shmdt(const void *); /sys/security/mac/mac_internal.h struct label { int l_flags; intptr_t l_perpolicy[MAC_MAX_SLOTS]; }; Update mod.rs Update mod.rs Update mod.rs Update mod.rs Update mod.rs Update mod.rs Update mod.rs Update mod.rs Update mod.rs Update build.rs Update mod.rs Update mod.rs Update build.rs Update mod.rs Update build.rs Update mod.rs Update mod.rs Update mod.rs Update mod.rs Update mod.rs Update mod.rs Update mod.rs Update mod.rs Update mod.rs Update mod.rs Update mod.rs Update mod.rs Update mod.rs Update mod.rs Update mod.rs Update mod.rs Update mod.rs Update mod.rs Update mod.rs Update build.rs Update build.rs Update mod.rs Update mod.rs
* | add AT_* constantsJörg Thalheim2017-03-254-0/+23
|/
* Add FIONREAD for apple/b64Geoff Cant2017-03-241-0/+2
|
* add fdopendirJörg Thalheim2017-03-242-0/+4
|
* move *at family to unixJörg Thalheim2017-03-203-89/+12
|
* Add support for the `accept4` system call for FreeBSD* & NetBSD*Alexander Schlarb2017-03-032-0/+7
|
* Auto merge of #543 - berkowski:socket_constants, r=alexcrichtonbors2017-03-017-15/+436
|\ | | | | | | | | | | | | | | | | | | Adds many socket related constants Started off adding a few constants to help cleaning up some `nix-rust/nix` issues. Went a little.. further. Adds lots of socket-related constants (`PF_*`, `MSG_*`, `AF_*`, `SO_*`, `SOL_*`, etc.) to linux/bsd flavors. Added constants to `bsd/frebsdlike/dragonfly` for completeness, though they aren't covered by CI. Did not touch `notbsd/linux/s390x.rs`
| * Added #[doc(hidden)] to AF_MAX, PF_MAX, others.Zac Berkowitz2017-03-012-0/+6
| |
| * Added socket constants for appleZac Berkowitz2017-03-011-10/+116
| |
| * Cleaned up unused socket constants.Zac Berkowitz2017-03-011-9/+0
| |
| * Added many socket-related constants to BSDZac Berkowitz2017-03-016-5/+323
| |
* | Auto merge of #538 - malbarbo:ci-android, r=alexcrichtonbors2017-03-011-1/+70
|\ \ | |/ |/| | | | | | | | | | | | | | | Add and fix tests for {i686, aarch64}-linux-android targets I think that these changes do not breaks compatibility. There are some types and constants changes to i686 and aarch64, but I see these changes as bug fixes instead of breaking changes. Also the type time64_t was remove from aarch64 because it is not defined in this arch. Fixes #536
| * Fix styleMarco A L Barbosa2017-02-271-1/+2
| |
| * Fix missing prefix ::Marco A L Barbosa2017-02-271-14/+14
| |
| * Merge branch 'master' into ci-androidMarco A L Barbosa2017-02-273-0/+84
| |\
| * | Remove cfg_if from src/unix/mod.rsMarco A L Barbosa2017-02-271-0/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | - Copy 17 functions definitions from src/unix/mod.rs to src/unix/bsd/mod.rs src/unix/haiku/mod.rs src/unix/notbsd/linux/mod.rs and src/unix/solaris/mod.rs - Add some functions to android that was cfged out - Remove cf* and tc* functions implementations for android (they are available with api >= 12, which was release in 2011)
* | | Add OXTABS and ONOEOT for BSD systemsBryant Mairs2017-02-281-0/+2
| |/ |/|
* | Auto merge of #537 - Susurrus:master, r=alexcrichtonbors2017-02-241-0/+4
|\ \ | | | | | | | | | | | | | | | Add ppoll() for all unix platforms I'm unsure of whether there is support in OS X for this, and I can't find anything online (so I'm betting there isn't), but I'm going to let this run through CI to confirm.
| * | Fix path for nfds_tBryant Mairs2017-02-241-1/+1
| | |
| * | Expose ppoll on some BSDsBryant Mairs2017-02-241-0/+4
| |/
* | Auto merge of #530 - berkowski:baud_constants, r=alexcrichtonbors2017-02-243-0/+80
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added baudrate constants. Addresses #528, adding baudrate constants for `bsd` and `notbsd` flavors of `unix`. Passes `libc-test` locally on ubuntu 14.04 LTS with the additional (uncommitted) entries into in `build.rs`: ``` cfg.skip_const( move |name| { match name { # ... snip ... "PTRACE_O_SUSPEND_SECCOMP" | "CLONE_NEWCGROUP" | "NETLINK_LIST_MEMBERSHIPS" | "NETLINK_LISTEN_ALL_NSID" | "NETLINK_CAP_ACK" | "PR_CAP_AMBIENT_CLEAR_ALL" | "PR_CAP_AMBIENT_LOWER" | "PR_CAP_AMBIENT_RAISE" | "PR_CAP_AMBIENT_IS_SET" | "PR_CAP_AMBIENT" | "PR_FP_MODE_FRE" | "PR_FP_MODE_FR" | "PR_GET_FP_MODE" | "PR_SET_FP_MODE" | "PR_MPX_DISABLE_MANAGEMENT" | "PR_MPX_ENABLE_MANAGEMENT" | "PR_GET_THP_DISABLE" | "PR_SET_THP_DISABLE" | "PR_SET_MM_MAP_SIZE" | "PR_GET_MM_MAP_SIZE" | "PR_SET_MM_MAP" | "NLM_F_DUMP_FILTERED" | "EPOLLEXCLUSIVE" => true, _ => false, } }); ``` I'm assuming this is because I'm stuck using `linux-libc-dev:3.13.0-24.46` for the moment and those constants are defined in newer versions.
| * Added baudrate constants.Zac Berkowitz2017-02-203-0/+80
| |
* | Add jail functions and constants for FreeBSDRyan Moeller2017-02-211-0/+30
|/
* Added *_setpshared and *_getpshared bindingsMike Lubinets2017-02-162-0/+16
|
* Make WIFCONTINUED signature on FreeBSD consistent with MacOS and LinuxRadu Popescu2017-02-131-2/+2
|
* Add AF_UNSPEC from Apple socket.hDouman2017-02-071-0/+1
|
* Auto merge of #512 - dumbbell:support-aarch64-unknown-freebsd, r=alexcrichtonbors2017-02-032-0/+33
|\ | | | | | | Add types for `aarch64-unknown-freebsd`
| * Add types for `aarch64-unknown-freebsd`Jean-Sébastien Pédron2017-02-032-0/+33
| | | | | | | | `aarch64.rs` was copied and adapted from `x86_64.rs`.
* | Add IPPROTO_ICMP and IPPROTO_ICMPV6 system constantsTyler Julian2017-02-013-0/+6
| |
* | Adding missing WIFCONTINUED function on FreeBSD systemsRadu Popescu2017-02-011-0/+4
| |
* | add pipe2 to non-OSX BSD'sJack O'Connor2017-01-252-0/+2
| | | | | | | | https://github.com/rust-lang/libc/pull/501
* | Update mod.rsJohannes Lundberg2017-01-141-1/+0
| |
* | Added some DragonFly-only constants.johalun2017-01-141-0/+7
| |
* | Added defines from ttycom.h for dragonfly and freebsd.johalun2017-01-133-1/+68
| |
* | Auto merge of #489 - zackw:add-waitid, r=alexcrichtonbors2017-01-103-0/+41
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add waitid and related constants and types. [`waitid`](http://pubs.opengroup.org/onlinepubs/9699919799/functions/waitid.html) is a variation on `waitpid` with a marginally more convenient way of reporting the status, and a couple of handy additional features, such as the ability to peek at an exit status without consuming it. It's in POSIX.1-2008 and should be available on all supported Unixes. Along with it come the type `idtype_t` and the constants `WEXITED`, `WSTOPPED`, `WCONTINUED`, and `WNOWAIT`. The constants were already defined for unix/notbsd platforms. The patch is currently incomplete: I'm pushing it to get CI to test platforms I don't have. Todo list is * [x] Add a definition of `siginfo_t` to all platforms that don't have it. * [x] Verify that the new constants are consistent for all \*BSD platforms. * [x] Verify that `idtype_t` is consistent across the board. * [x] Add `link_name` annotations for `waitid` if/as necessary.
| * | Remove remaining copy of the comment about idtype_t being an enum.Zack Weinberg2017-01-101-5/+0
| | |
| * | Changes requested by reviewersZack Weinberg2017-01-102-15/+0
| | |