Commit Graph

696 Commits

Author SHA1 Message Date
Jérôme Duval
d05775b3bd added seteuid and setegid
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14701 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-04 16:38:40 +00:00
Ingo Weinhold
571bb2b2a6 Simplified the x86 syscall interface a bit. We no longer pass a pointer
to the parameters nor the number of parameters; the kernel is able to
get both without problems.

The syscall functions in libroot (_kern_*()) are now self-contained
(they don't "jmp" to separate code anymore), which at least
theoretically allows gdb to print a stack trace with the syscall
function on the top when a thread is currently performing a syscall.
Practically it doesn't work yet, though, since those functions are
frameless (i.e. create no stack frame) which needs special support
I haven't implemented yet.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14661 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-03 14:36:46 +00:00
Jérôme Duval
687193750c added drand48, erand48, lrand48, nrand48, mrand48, jrand48, srand48,
seed48, and lcong48 functions
fixed bug #63


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14645 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-02 14:29:50 +00:00
Axel Dörfler
0e1358bd5c Applied a patch from Alexander Deynichenko: added missing signal definitions.
That also includes some XSI signals, SIGPOLL and SIGVTALRM, dunno if we will every support
those in a useful way.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14593 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-31 12:39:29 +00:00
Axel Dörfler
4d9b4412bd Added memccpy() - not there in BeOS, but part of the POSIX specs.
Contributed by Alexander Deynichenko.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14592 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-31 12:18:55 +00:00
Ingo Weinhold
338b8dc301 Merged changes from branch build_system_redesign at revision 14573.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14574 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-29 16:27:43 +00:00
Jérôme Duval
0c7b6e66e8 added ctype.c, from glibc version 2.2.5
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14548 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-27 22:34:12 +00:00
Axel Dörfler
f3bb653937 Simplified sigsuspend() a bit.
Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14460 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-20 18:38:30 +00:00
Axel Dörfler
da6d1a7022 fs_mount_volume() now returns a dev_t as well - changed mount/mountvolume to take
that into account as well (they were reporting an error even though everything
went fine).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14450 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-20 13:03:50 +00:00
Jérôme Duval
a26988784a added _fseek for R5 compatibility
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14365 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-12 15:52:35 +00:00
Jérôme Duval
42848b0907 added index and rindex to libroot.so
R5 ftp and telnet commands now run on Haiku


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14362 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-12 13:05:03 +00:00
Axel Dörfler
eddf43dd76 Added missing clock() function.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14329 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-06 17:33:10 +00:00
Jérôme Duval
ab38c90461 added a libroot sigpending, kernel support isn't implemented
(fixed partly bug #49)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14181 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-09-13 16:12:20 +00:00
Jérôme Duval
04b831a692 added pause() (kernel support is lacking though)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14130 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-09-08 13:06:49 +00:00
Jérôme Duval
96e6579454 added a libroot sigsuspend, kernel support isn't implemented
(fixed partly bug #48)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14129 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-09-08 12:26:16 +00:00
Jérôme Duval
e96ac99568 improves style
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14118 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-09-05 18:01:48 +00:00
Jérôme Duval
e5ee1dad6a added sigaddset, sigismember, sigdelset to libroot.so from inline versions in signal.h
moved static inline to extern inline to allow this change
please someone review this (ie are they platform dependent functions ?)
should fix bug #47


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14103 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-09-02 11:53:43 +00:00
Axel Dörfler
61a1551551 Added empty function stubs for __fpclassify[fl](); they currently pretend that every number
is a normal one - maybe someone finds the time to implement them for real before I do :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14046 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-08-22 01:34:32 +00:00
Marcus Overhagen
cc33b4a1ca This adds the required functions to libroot.so and fixes DEBUG build.
Unfortunately, they are pretty broken, so I added them into floatmath.c


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14019 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-08-21 01:30:46 +00:00
Marcus Overhagen
794df3bf25 This removes the inline assembly code for find_thread
from OS.h, sorry for triggering a complete rebuild.
To avoid doing a syscall for find_thread(0), the assembly
version is now in libroot. For BeOS R5 compatibility, 
_kfind_thread_ is retained. This will fix some compile 
problems, and provides a cleaner OS.h for future Haiku
versions.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14014 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-08-20 23:57:11 +00:00
Jérôme Duval
16c05905ae forgot this one
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13992 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-08-19 15:24:08 +00:00
Jérôme Duval
19664a737a added UFC crypt library (LGPL)
provides crypt() to libroot, untested


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13991 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-08-19 15:17:43 +00:00
Axel Dörfler
13d77a4cde Now fills in the machine field with something more appropriate (currently mimics
BeOS behaviour). Maybe we want to have some different values here later on.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13926 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-08-09 22:58:58 +00:00
Jérôme Duval
b1c123994c Updated to tzcode2005j.tar.gz
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13561 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-08 23:49:29 +00:00
Ingo Weinhold
a406236dc2 New error codes:
- B_SHUTDOWN_CANCELLED: The shutdown process was cancelled (most likely by
  the user).
- B_SHUTTING_DOWN: An operation cannot be performed, since the system is
  shutting down (e.g. BApplication creation).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13413 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-03 16:50:29 +00:00
Jérôme Duval
9d69de4c3d inline functions aren't inlined when we have -g / -O0
we filter them for this directory
hopefully this fixes Darkwyrm's build problem


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13152 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-15 15:02:06 +00:00
Axel Dörfler
e7281ecba6 Fixed a bug in next_argument(): it could read after the terminating
null byte, and add junk as arguments. Thanks to Korli for testing.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13134 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-14 23:40:43 +00:00
Axel Dörfler
43ed6aa0db The "shebang" handler is supposed to parse arguments, too - we now do that.
Also, when the line is too long, E2BIG is returned.
Thanks to Korli who pointed me to this: http://homepages.cwi.nl/~aeb/std/shebang/


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13114 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-14 12:39:06 +00:00
Axel Dörfler
be22452f3b Apparently, both load_image() and exec*() support running scripts. We do that
now as well.
Also, both functions will now test if the executable exists and is valid; that
way, load_image()/exec*() can catch many errors without having to create a new
team (or erase the current one - an exec*("my invalid app") might now return
with an error).
The runtime linker now exports a function to test executables that is aware
of the search paths, and will also check user permissions upfront.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13113 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-14 11:23:29 +00:00
Jérôme Duval
adf47eb76d we mimic R5 : getgroups return 0
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13108 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-14 00:08:21 +00:00
Axel Dörfler
183dee22cb Unlike R5, receive_data() could return an error code under Haiku - this
can now only happen if the thread is killed.
_user_receive_data() will now longer pass B_CAN_INTERRUPT to receive_data(),
but B_KILL_CAN_INTERRUPT - this should fix the problem Stefano experienced
with this function, even if I couldn't reproduce it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13075 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-12 11:14:37 +00:00
Michael Lotz
128e8d23fa Add more missing float math (modf and modff).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12923 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-01 20:03:12 +00:00
Axel Dörfler
12e1714d54 Fixed stupid bug in copy_environ_to_heap_if_needed(): it copied the
environment, but it didn't set the "environ" to the new array, and
thus throwing away the copy again.
GCC no longer crashes because of this, and runs through without help :)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12914 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-31 01:59:01 +00:00
Axel Dörfler
ac5af8f1b4 The maximum allocation size we've configured our allocator is 1 GB. Instead
of running into an assert() later on, we now back out early in this case.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12902 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-30 14:10:06 +00:00
Axel Dörfler
1b22c05ae8 Fixed warning I introduced before.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12887 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-29 11:33:45 +00:00
Axel Dörfler
2e95dad4b9 strerror() no longer reports "Unknown Application Error" for positive values,
instead it now says "No Error".


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12885 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-29 10:51:47 +00:00
Axel Dörfler
9f8298d908 Added empty functions for _k{get|set}_cpu_state_().
That makes Pulse to build and even run (but with no visible output) on Haiku.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12865 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-28 13:57:02 +00:00
Axel Dörfler
ff229e1ebb The buffer passed over from the boot loader is now null terminated.
load_driver_settings() now accepts absolute paths as well.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12808 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-25 13:35:46 +00:00
Axel Dörfler
bad54f6fa4 Added symbol exports for _kset_mon_limit_() and _kset_fd_limit_().
Don't do anything yet, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12768 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-22 23:50:01 +00:00
Axel Dörfler
97c5bef4a1 Added missing assembly functions for __swap_float() and __swap_double().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12767 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-22 23:16:55 +00:00
Axel Dörfler
fe9bc5ae27 Added sqrt() and sqrtf() assembly versions.
Still they are not yet really used.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12731 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-19 14:13:22 +00:00
Axel Dörfler
62f9753de5 Added public domain versions of sin() and cos() (taken from glibc).
Not yet used, though - we probably need to rearrange the source files a bit.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12727 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-18 22:19:35 +00:00
Andrew Bachmann
dfdc5e411e use "national" math (fixes copysign/drem)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12720 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-18 20:43:52 +00:00
Axel Dörfler
4393552b4d The heap is now located at 384 MB, and creates a reserved range that spans over the
following 1152 MB - that area only guarantees that the heap can grow this much before
the application need the memory for something else. And even then, the heap range
is reused from top-to-bottom, allowing for maximum heap usage. Of course, if the
memory after the heap range is not claimed yet, it can still be claimed by the heap,
too. Added new syscall to create the reserved range.
Fixed a bug in vm_delete_areas(): when it removed reserved areas, the area list
could get messed up.
Fixed a bug in resize_area(): resized areas could never be deleted (missing vm_put_area())!
resize_area() now supports reserved regions (but not perfectly yet, see ToDo items).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12692 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-16 22:15:13 +00:00
Axel Dörfler
718b5114e0 This should fix the build after all the kernel/system renaming.
If anything is still broken (and was not before :)), please shout.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12361 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-04-13 13:59:17 +00:00
Axel Dörfler
5af32e7526 Renamed src/kernel to src/system.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12359 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-04-13 13:06:35 +00:00