Commit Graph

238 Commits

Author SHA1 Message Date
Ingo Weinhold
15af38b288 Removed pointless comment.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15864 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-08 04:54:47 +00:00
Ingo Weinhold
262e0a636b We use the same strategy for computing the system time as on x86 now.
The time base conversion factor is the 32 bit value
  2^32 * 1000000 / time base frequency,
so the system time can be computed by
  system time = time base * conversion factor / 2^32.
The expression in system_time() looks more complicated now, but is
actually much faster (factor 2.5 on my Mac mini). I'm positively
surprised, how good the assembly looks, that GCC 4 generates. There's
not that much potential for optimization by hand-coding the function.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15863 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-07 23:05:56 +00:00
Ingo Weinhold
b264ddab5d Corrected copyright. :-)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15858 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-07 20:27:13 +00:00
Stephan Aßmus
34a9556215 Made our glue code compatible to BeOS again. IOW executables compiled for Haiku will
now run under BeOS as well (as long as they don't use any functions that are not
available under R5).
The solution is a bit messy, but we have to live with it :-)
The runtime loader now patches the __gRuntimeLoader symbol in libroot.so to point
to its exported structure instead of passing it to the init functions as an
argument.
(Hax0red by axeld and bonefish on stippi's assimilated machine -- resistence is futile)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15848 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-06 03:48:11 +00:00
Jérôme Duval
8f9f676b46 we don't use atomic_get64 to read a read-only area, not authorized and throw a VM fault
this fix #83 partially


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15845 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-05 15:09:50 +00:00
Ingo Weinhold
e55e1a0e66 Implemented the PPC specific RTC support. We search for an "rtc"
device in the Open Firmware implementation of boot loader and
pass its path to the kernel, where it's opened and used for
getting/setting the real time. The expensive atomic_*64() on PPC
32-bit make things a bit more complicated. Moreover, missing
64 bit multiplication and division instructions won't really
allow system_time() to be anywhere near as fast as on x86. :-/


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15837 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-04 04:55:04 +00:00
Ingo Weinhold
09bb4e9ac5 The real_time_data structure contains an architecture specific
substructure now (that's the only member actually). The system time
offset is therefore accessed via architecture specific accessor
functions.
Note, that this commit breaks the PPC build. Since I want to rename at
least one file I've already changed, I can't avoid that.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15835 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-04 02:17:59 +00:00
Ingo Weinhold
481b133143 Added missing wrappers for hypot() and hypotf(), fixing bug #75.
I wouldn't be surprised, if more wrappers are still missing.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15709 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-29 02:01:55 +00:00
Axel Dörfler
78f2557c8f Found and fixed number one app_server crashing bug: our Hoard backend didn't
support unsbrk(), and that is actually called quite often in Hoard, resulting
in out of memory quite fast.
We don't shrink the heap (yet), but at least we can reuse the memory that
was freed by Hoard (it doesn't just remove bytes from the end, it will also
free up smaller parts in the middle).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15655 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-22 11:42:02 +00:00
Ingo Weinhold
6e040d83ea Added __swap_{float,double} for PPC. They are probably horribly
suboptimal (if working at all) -- review is appreciated.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15486 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-11 13:26:50 +00:00
Ingo Weinhold
d85fe0ec25 Compatibility functions. Actually not needed for PPC Haiku, but it's
easier to define them for now, since they are used unconditionally e.g.
in the Tracker sources.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15485 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-11 13:25:00 +00:00
Ingo Weinhold
fe14a904a8 * Implemented [sig]{set,long}jmp() for PPC. No idea, if it is any good,
but it compiles at least. :-)
* Pulled the architecture specific part out of <posix/setjmp.h> into
  <posix/arch/<arch>/arch_setjmp.h>.
* Moved setjmp_save_sigs.c from the x86 specific implementation into a
  "generic" sibling directory, since it is reusable (and actually used
  by the PPC implementation).
* Added generic/longjmp_return.c containing a function __longjmp_return,
  which is invoked at the end of siglongjmp(), resetting the signal mask
  and validating the return value. It is used by the PPC implementation,
  and should also be used by the x86 implementation, but I'll leave that
  to someone who's motivated enough to also test it. :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15479 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-10 22:56:52 +00:00
Ingo Weinhold
901f399036 * Removed libroot/posix/math completely and added the respective
functions from glibc 2.3.2. Adding those one by one is extremely
  boring and time-consuming work. We should probably just remove the
  math stuff again, add a verbatim copy of the glibc directories, and
  shuffle things around afterwards.
* Note that for x86 holds sizeof(long double) == 96. I removed the
  generic 128 bit long double functions that were in use before and
  added respective 96 bit versions to arch/x86 (or left them out, if
  they weren't used). For PPC the System V ABI spec supplement specifies
  sizeof(long double) == 128, but I had trouble configuring gcc to
  actually use that setting (looks like there simply is no support for
  TI mode for PPC 32). So we have to live with sizeof(long double) ==
  sizeof(double) == 64 for the time being.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15477 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-10 20:39:04 +00:00
Axel Dörfler
4f9b08dffa Obviously, atan.c is needed after all. This should fix the build again.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15456 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-09 20:48:44 +00:00
Ingo Weinhold
e695fe845d Removed atan.c. For PPC we're using the glibc implementation, for
x86 the Haiku image still builds, so it is apparently not used. I
guess it would be best to abandon our posix_math.o completely and
use the glibc math implementations instead.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15446 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-09 14:23:30 +00:00
Ingo Weinhold
379f146735 Added more missing math functions for PPC from glibc 2.3.2.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15445 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-09 14:16:39 +00:00
Ingo Weinhold
7c360a1007 Removed the x86 specific __compare_and_swap() implementation and
added a generic implementation using atomic_test_and_set().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15444 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-09 14:11:44 +00:00
Ingo Weinhold
0799002097 Added an unimplemented __arch_init_time() for PPC.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15443 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-09 14:09:42 +00:00
Ingo Weinhold
8e17108ffa Add some more PPC math functions from glibc 2.3.2.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15406 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-08 00:27:03 +00:00
Ingo Weinhold
c1437015dd Moved architecture independent sources into new subdirectory "generic".
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15405 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-07 23:14:51 +00:00
Ingo Weinhold
c729b01278 The <arch_config.h> header is needed in <syscalls.h>, since we're using
the atomic functions related macros.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15404 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-07 23:11:02 +00:00
Ingo Weinhold
e616992242 Fixed compilation with our PPC compiler.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15403 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-07 22:42:57 +00:00
Ingo Weinhold
8b150d6067 Added PPC specific and some generic glibc headers. Taken from
glibc 2.3.2, which seems to be the version used in other places,
though I also found older files.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15402 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-07 22:41:39 +00:00
Ingo Weinhold
2034e20826 Added building of an empty posix_arch_ppc.o to make the build
system happy for the time being. We need real setjmp()/longjmp()
implementations for PPC eventually, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15401 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-07 22:37:25 +00:00
Ingo Weinhold
353d20c0c5 * libroot and the runtime loader are no longer built with kernel rules.
* New rule Ld, analogously to KernelLd.
* Added StaticLibrary parameter for supplying additional objects.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15191 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-27 13:31:50 +00:00
Ingo Weinhold
38f6264454 Reorganized building of kernel, boot loader, and libroot.
Each component is built in the respective subdirectory now
and no longer in src/system/Jamfile.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15184 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-27 00:27:19 +00:00
Axel Dörfler
bf9979bdaa This should fix the build of libroot.so, patch by Korli.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15067 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-22 14:16:20 +00:00
Jérôme Duval
ef0635bd49 added some more glibc functions
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15064 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-21 21:41:39 +00:00
Jérôme Duval
5412911f7f added some x86 glibc functions (more to come)
we might miss some wrappers for some ieee754 functions (to check)
hope nothing is broken


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14968 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-16 18:33:51 +00:00
Axel Dörfler
589f2f5a7f Made it a bit clearer how settings parsing works in the kernel, so that Ingo
hopefully doesn't see the need to "fix" it anymore :)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14961 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-16 17:06:44 +00:00
Axel Dörfler
10fbb5f7fd The driver settings in the boot loader overwrote the settings for later kernel use;
they could not be parsed again by the kernel, and thus, safemode was not working
anymore (as it was queried by the SMP stuff).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14960 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-16 17:01:45 +00:00
Ingo Weinhold
9818fa6bc3 add_variable() just threw away the freshly copied environment (makes me
wonder why things worked nevertheless with the old gcc). We now also use
realloc() instead of malloc()+memcpy(), and check add_variable()'s
return code.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14957 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-16 15:12:19 +00:00
Ingo Weinhold
c5f20ef053 Added finitef() implementation. Won't work yet, since __fpclassifyf() is
not implemented.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14911 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-14 12:28:21 +00:00
Ingo Weinhold
ef9b2fc28b Added temporary implementation of strxfrm().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14909 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-14 12:07:29 +00:00
Axel Dörfler
0c0bf02aac setjmp() is now an assembly stub that doesn't create a stack frame but just
jump to sigsetjmp(). I'm a bit irritated that the previous version didn't
run as expected, but it now does.
This needs some more investigation.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14901 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-13 17:46:40 +00:00
Axel Dörfler
4e766dd482 * header cleanup, but there is still a lot more to do...
* added round(), roundf(), and roundl() implementations.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14891 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-13 13:22:47 +00:00
Axel Dörfler
6065411b88 ualarm()'s arguments are actually useconds_t, too.
Fixed implementation of ualarm() to support larger values.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14890 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-13 13:20:25 +00:00
Ingo Weinhold
758b1d0e05 Fixes that make Haiku build with gcc 4. Mainly out of the following
categories:
* Missing includes (like <stdlib.h> and <string.h>).
* Linking against $(TARGET_LIBSTDC++) instead of libstdc++.r4.so.
* Local variables shadowing parameters.
* Default parameters in function definitions (as opposed to function
  declarations).
* All C++ stuff (nothrow, map, set, vector, min, max,...) must be imported
  explicitly from the std:: namespace now.
* "new (sometype)[...]" must read "new sometype[...]", even if sometype is
  something like "const char *".
* __FUNCTION__ is no longer a string literal (but a string expression), i.e.
  'printf(__FUNCTION__ ": ...\n")' is invalid code.
* A type cast results in a non-lvalue. E.g. "(char *)buffer += bytes"
  is an invalid expression.
* "friend class SomeClass" only works when SomeClass is known before.
  Otherwise the an inner class with that name is considered as friend.
  gcc 4 is much pickier about scopes.
* gcc 4 is generally stricter with respect to type conversions in C.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14878 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-12 23:27:14 +00:00
Ingo Weinhold
ca9e5772c3 * Reintroduced third LinkAgainst parameter <mapLibs>, defaulting to true.
Library names are now mapped for all targets but "host" (not only for
  "haiku") -- added one more level of indirection to achieve that.
  (TARGET_LIBRARY_NAME_MAP -> *_LIBRARY_NAME_MAP_*).
* Renamed build/HaikuBuildCompatibility.h to BeOSBuildCompatibility.h
  (auto-included when compiling something that uses the Be API for platform
  "host" on anon-BeOS platform), and introduced build/HaikuBuildCompatibility.h,
  which can be included when compiling something that can be built for both,
  Haiku and BeOS compatible platforms.
* Introduced libhaikucompat.a, a library that adds a few functions existing
  under Haiku, but not under BeOS.
* New rule AddSubDirSupportedPlatforms.
* Renamed libopenbeos.so to libbe_haiku.so.
* Introduced new target platform "libbe_test", which is basically equivalent
  to a BeOS compatible host platform target, with the exception, that instead
  of the host platform's libbe.so a special build of Haiku's libbe.so
  (libbe_haiku.so (formerly known as libopenbeos.so)) is used. Furthermore
  Haiku's public app, interface, storage, and support kit headers are used
  when compiling. This replaces the less nice way in which the test app server
  and applications for this test environment were built.
  When building for platform "libbe_test", the library name "be" is
  autotranslated to "libbe_haiku.so". Thus most applications don't need
  special fiddling when them building them for the app server test environment;
  usually an "AddSubDirSupportedPlatforms libbe_test ;" will suffice.
* Reduced the dependencies of <syscalls.h> and fixed problems caused by this
  (e.g. source files not including the needed headers directly).



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14749 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-07 16:07:25 +00:00
Axel Dörfler
6efb3f085f Added statvfs.h header and implemented statvfs() and fstatvfs() - both untested, though.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14746 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-07 13:47:55 +00:00
Axel Dörfler
c713cfe2bb Fixed __strerror_r() - this closes bug #66.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14723 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-06 23:36:59 +00:00
Jérôme Duval
3ef41e42cd added fgetpos fsetpos
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14716 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-05 17:58:15 +00:00
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