Commit Graph

1522 Commits

Author SHA1 Message Date
bors
0bfcd7a1b8 Auto merge of #617 - Mic92:dirfd, r=alexcrichton
Add dirfd on netbsd

follow up of https://github.com/rust-lang/libc/pull/571
2017-06-14 14:06:36 +00:00
Jörg Thalheim
2c8ad9b0c3
Add dirfd on netbsd 2017-06-14 07:52:56 +01:00
bors
c25d657029 Auto merge of #611 - vityafx:add-pthread-priority-functions, r=alexcrichton
Add schedule params & priority pthread functions

Fixes #609. Provides bindings to `pthread_getschedparam`, `pthread_setschedparam` and `pthread_setschedprio` functions.

P.S. My first PR in such a project.
P.P.S. `libc-test` crashed at building stage with a lot of errors, so I hope `travis` will do a check.
P.P.P.S. These functions are tested to work on Linux (Ubuntu 14.04) with my own crate. I will release it next week, it provides ability to control thread schedule policies and priorities.
2017-06-13 15:19:36 +00:00
bors
539e50c4a9 Auto merge of #571 - Mic92:dirfd, r=alexcrichton
add dirfd on unix
2017-06-13 14:04:16 +00:00
Victor Polevoy
fbec8eb48c Move pthread_setschedprio into the linux submodule 2017-06-13 14:49:19 +03:00
Victor Polevoy
a75fef0b89 Disable pthread_setschedprio for android 2017-06-13 13:56:31 +03:00
Victor Polevoy
192a245a47 Move pthread_setschedprio to not-bsd 2017-06-13 13:54:52 +03:00
Victor Polevoy
84c20a1c9b Build fix for non-bsd 2017-06-13 11:17:18 +03:00
Jörg Thalheim
59008790e1
add dirfd on unix 2017-06-13 08:02:31 +01:00
bors
70f2986087 Auto merge of #612 - shawnanastasio:master, r=alexcrichton
Add unix seteuid()

Adds prototype for unix seteuid() as defined [here](http://pubs.opengroup.org/onlinepubs/009695399/functions/seteuid.html).
2017-06-13 02:42:37 +00:00
Razican
f5554af07a Bumped version number 2017-06-11 12:22:08 +02:00
Shawn Anastasio
4340d17e3f Add unix seteuid()
Adds prototype for unix seteuid() as defined here: http://pubs.opengroup.org/onlinepubs/009695399/functions/seteuid.html
2017-06-09 23:52:30 -05:00
Victor Polevoy
cb03e6236c Add schedule params & priority pthread functions 2017-06-09 18:21:26 +03:00
bors
439a4d7d4b Auto merge of #608 - Uplifting:unix, r=alexcrichton
add a number of linux syscalls

vfork, wait4, getresuid, getresgid, personality, vhangup,
swapon, swapoff, getdomainname, setdomainname, iopl, ioperm
2017-06-08 15:56:42 +00:00
Andrew Salmon
4e0e06e370 move some functions not in android 2017-06-07 20:19:42 -07:00
Andrew Salmon
553c5dc877 sys/io.h only in linux x86_64
Make changes to reflect this
2017-06-07 19:27:14 -07:00
Andrew Salmon
c98b9f7d4e add a number of syscalls
vfork, wait4, getresuid, getresgid, personality, vhangup,
swapon, swapoff, getdomainname, setdomainname, iopl, ioperm
2017-06-07 16:26:42 -07:00
bors
5e208ed9b2 Auto merge of #607 - humenda:master, r=alexcrichton
Add x86_64 module to uclibc/mod.rs
2017-06-04 17:59:28 +00:00
Sebastian Humenda
4d3ea348b0 Add x86_64 module to uclibc/mod.rs 2017-06-04 10:14:54 +02:00
bors
f74d134a2f Auto merge of #591 - humenda:master, r=alexcrichton
Add experimental L4re support

This PR introduces a UNIX-alike target for the l4re microkernel
operating system. While this system is not a UNIX system at all, it is
easiest to use the POSIX interface and hence benefit from common
definitions.

This version is a very early draft, only the basic data types have been
verified and most of the complex data types (structs and unions) have
not been ported yet.

Thanks to TobiasSchaffner for providing his patched version, to verify some assumptions.
2017-06-01 19:14:07 +00:00
Sebastian Humenda
09a04d8e71 Add experimental L4re support
This commit introduces a UNIX-alike target for the l4re microkernel
operating system. While this system is not a UNIX system at all, it is
easiest to use the POSIX interface and hence benefit from common
definitions.

This version is a very early draft, only the basic data types have been
verified and most of the complex data types (structs and unions) have
not been ported yet.
2017-06-01 16:37:08 +02:00
bors
80e1422851 Auto merge of #599 - xd009642:master, r=alexcrichton
Adding missing structs from linux/user.h

Adding structs from linux/user.h (or sys/user.h depending on OS version). This adds the linux user_regs_struct and user struct from sys/user.h into libc for x86 and x86_64. Also, bumping the version number.

As an aside, I was wondering if this was also the right place to add the bit offsets for the [EFLAGS register ](https://en.wikibooks.org/wiki/X86_Assembly/X86_Architecture#EFLAGS_Register)? These aren't defined anywhere in the linux system libraries instead the definition seems to just be in the x86 and x86_64 documentation but they are useful for anyone looking to interpret eflags. If libc is the right place for these constants I'd like the opportunity to add them before it's merged in. :)
2017-05-30 13:57:31 +00:00
Daniel McKenna
6acbf873db Fixed issues in test and struct names.
Fixed the issues that prevented the libc_tests that are generated from passing. Also, fixed struct names and types to be representative of the linux source files.
2017-05-29 18:27:27 +01:00
bors
3c28e47459 Auto merge of #606 - kubo39:add-SC_NPROCESSORS_CONF-to-linux, r=alexcrichton
Add _SC_NPROCESSORS_CONF on Linux
2017-05-29 04:01:28 +00:00
Hiroki Noda
b83505c8ea Add _SC_NPROCESSORS_CONF on Linux 2017-05-29 08:47:04 +09:00
bors
69da605692 Auto merge of #605 - Uplifting:unix, r=alexcrichton
fill out common unix syscalls

i'm expecting a few build failures, particularly from brk/sbrk.
2017-05-28 17:09:31 +00:00
Andrew Salmon
f1b62c3f4a move functions to linux
hopefully that fixes build errors
2017-05-27 23:38:38 -07:00
Andrew Salmon
68eebe3471 add ::timeval to settimeofday 2017-05-27 16:00:06 -07:00
Andrew Salmon
83ba532c10 make modifications for proper build. 2017-05-27 15:57:53 -07:00
bors
f1fc19f10f Auto merge of #604 - Uplifting:posix, r=alexcrichton
Fill in sys/sem.h as well as getitimer and setitimer

struct semun is not implemented and neither is semtimedop.
2017-05-27 04:25:55 +00:00
Andrew Salmon
27c693ea68 add unix utilities assumed portable (expecting build failures) 2017-05-26 16:47:29 -07:00
Andrew Salmon
6fb7c90ad0 sys/times.h, setreuid/setregid, and sigpending 2017-05-26 15:24:54 -07:00
bors
30b0ecc2e4 Auto merge of #602 - Razican:unistd_sync, r=alexcrichton
Added the sync() function from unistd.h

This fixes #601.
2017-05-26 20:58:38 +00:00
Andrew Salmon
eaaa277dc3 remove semid_ds 2017-05-26 13:30:20 -07:00
Andrew Salmon
41f9e7c43f remove struct fields because build failure 2017-05-26 13:24:11 -07:00
Andrew Salmon
35f262a7b7 Merge branch 'posix' of https://github.com/Uplifting/libc into posix 2017-05-26 13:12:01 -07:00
Andrew Salmon
8239c0af1e fix overflow lines
overflow lines caused style build failure
2017-05-26 13:11:03 -07:00
Andrew Salmon
d3535f6549 Merge branch 'master' into posix 2017-05-26 15:54:51 -04:00
Andrew Salmon
0f93f370e4 typo in sem_flg
somehow i didn't catch this on my machine...oversight
2017-05-26 12:54:03 -07:00
Andrew Salmon
bc48202e14 remove getitimer and setitimer
_GNU_SOURCE works differently than other libraries and creates
function pointer issues
2017-05-26 12:47:53 -07:00
Razican
406b01a811 Fixed targets without the sync() function 2017-05-26 17:52:12 +02:00
Andrew Salmon
548e4cf187 fill out sys/sem.h
semget, semop, semctl; semtimedop not implemented and struct semun not defined
2017-05-26 04:35:40 -07:00
Andrew Salmon
e976c370f8 add getitimer and setitimer
also struct itimerval, which is necessary for the implementation
2017-05-26 04:07:01 -07:00
bors
229bd66d9c Auto merge of #603 - Uplifting:master, r=alexcrichton
Add gmtime()

Also slightly modified argument name for localtime.
2017-05-25 23:06:24 +00:00
Alex Crichton
c0cf28091e Fix docs on nightly 2017-05-25 16:06:01 -07:00
Andrew Salmon
7efffc1d65 Add gmtime()
Also slightly modified argument name for localtime.
2017-05-25 15:14:19 -07:00
Razican
b993a9bf4c Added the sync() function from unistd.h 2017-05-25 14:42:59 +02:00
Daniel McKenna
3522d8b529 Updated cargo.lock
Forgot to update cargo.lock before prior commit.
2017-05-24 18:33:18 +01:00
Daniel McKenna
ca117fee87 Fixed style issues and reverted version number.
Fixed trailing whitespace in x86.rs and reverted the minor version number in the Cargo.toml
2017-05-24 17:25:03 +01:00
Daniel McKenna
9766d50f4a Updated cargo.lock and toml for release. 2017-05-23 17:23:10 +01:00