| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| |
| |
| | |
fill out common unix syscalls
i'm expecting a few build failures, particularly from brk/sbrk.
|
| | |
|
| | |
|
|/ |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
These constants aren't available from the system headers so don't expose
them here.
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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];
};
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|/ |
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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`
|
| | |
|
| | |
|
| | |
|
| | |
|
|\ \
| |/
|/|
| |
| |
| |
| |
| |
| |
| | |
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
|
| | |
|
| | |
|
| |\ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
- 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 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.
|
| | | |
|
| |/ |
|
|\ \
| |/
|/|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
|
|/ |
|
| |
|
| |
|
| |
|
|\
| |
| |
| | |
Add types for `aarch64-unknown-freebsd`
|
| |
| |
| |
| | |
`aarch64.rs` was copied and adapted from `x86_64.rs`.
|
| | |
|
| | |
|
| |
| |
| |
| | |
https://github.com/rust-lang/libc/pull/501
|
| | |
|
| | |
|
| | |
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | | |
|
| | | |
|