Commit Graph

138 Commits

Author SHA1 Message Date
Ingo Weinhold
f38eff6aa2 Added a few more functions to the host platform BeOS compatibility layer:
* thread related functions,
* semaphore related functions,
* atomic_*() functions,
* readv_pos(), writev_pos().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20858 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-27 12:11:30 +00:00
Ingo Weinhold
4f4e5272fc Under Linux it is now possible to emulate the BeOS attribute support via
xattrs. It can be enabled with the configure switch "--use-xattr". Note
that the amount of data stored in attributes may be limited by the used
file system -- e.g. AFAIK ext3 has a limit of one block (usually 4 KB)
for all attributes of a file, which might not suffice. XFS should be
fine, as should ReiserFS 3.6 (or any FS which stores attributes in
hidden files).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20609 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-08 02:19:01 +00:00
Ingo Weinhold
055fa4f22f Assigning values to errno would not work; the next invocation would
overwrite them with the host platform errno again. We do now track
changes and use a hopefully reasonable strategy for updating the host
errno.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20608 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-08 02:04:21 +00:00
Ingo Weinhold
a9bf6ecbab libroot_build.so:
* Reorganized sources a bit:
  - The descriptor support is in a separate file now.
  - Disentangled the attribute support from the other stuff.
* Removed broken xattr use for attribute support.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20606 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-07 19:01:21 +00:00
Ingo Weinhold
c26c2ab28a Fixed TARGET_PLATFORM r5 build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20498 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-01 13:41:19 +00:00
Ingo Weinhold
b8ba8f58d7 Added the disk device API to the libbe_haiku.so, so that libtracker.so builds
again for target libbe_test. Added respective syscall stubs and other functions
to libhaikucompat.a.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20447 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-03-28 15:20:08 +00:00
Ingo Weinhold
69b1f76d66 FreeBSD build platform support. Original patches courtesy of
Samuel Rodriguez Perez, somewhat hacked by myself.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19392 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-11-29 18:08:00 +00:00
Axel Dörfler
bae87c9140 Added a new type for the vector icon format 'VICN' or B_VECTOR_ICON_TYPE.
It's hopefully now used everywhere instead of B_RAW_TYPE where appropriate.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19219 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-11-07 02:46:25 +00:00
Axel Dörfler
2b88f9a235 Build fix for R5.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19206 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-11-04 18:10:13 +00:00
Axel Dörfler
71a0a68ad0 * BeOS also gives back B_BAD_VALUE on shared libraries when doing BAppFileInfo::SetVersionInfo()
* Furthermore, this call crashes when called with a NULL version info
* Fixed some typos that should have proven problematic under R5/BONE.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19205 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-11-04 17:38:21 +00:00
Axel Dörfler
3f5affa07f BeOS returns B_BAD_VALUE for some things on shared libraries.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19204 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-11-04 17:22:04 +00:00
Axel Dörfler
e89f143e3c * The build's UpdateMimeInfoThread can now also run on BeOS (which obviously returns
B_NAME_NOT_FOUND instead of B_ENTRY_NOT_FOUND for all missing types).
* Also, BMimeType::GuessMimeType() doesn't seem to work at all under BeOS.
* The build's MIME updater no longer ignores the error from DoMimeUpdate() - so that
  you'll now may get error messages during the build.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19202 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-11-04 16:58:39 +00:00
Axel Dörfler
2a105bc1e6 Added support for setting the vector icons under Linux - not yet tested, though.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19200 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-11-04 16:22:03 +00:00
Axel Dörfler
8ac8898872 Fixed some minor warnings in the Linux build environment.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19110 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-10-24 13:24:40 +00:00
DarkWyrm
57cbc95a2f Need to actually *build* libhaikucompat on non-Haiku platforms. :D
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18376 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-03 18:25:26 +00:00
Jérôme Duval
7f20062d97 BAppFileInfo::SetSupportedTypes now works even when there is no signature
A consequence is the FileType tracker addon (which hasn't a signature) has now its attributes set on Linux builds


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17642 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-05-29 23:04:25 +00:00
Axel Dörfler
01fdd314e5 Some GCC 4.1.0 related build fixes (under Linux/PPC).
Doesn't build yet, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17500 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-05-17 20:54:12 +00:00
Ingo Weinhold
aa8265a5be Fixed copy'n'paste error. It caused update_mime_info() to remove the signature
of an object file, if the file's resources didn't specify supported
types. Both under Haiku itself and for the Linux build. This finally closes
bug 170 (AboutHaiku not being startable from Deskbar when built under
Linux).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17354 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-05-07 17:53:13 +00:00
Ingo Weinhold
b1970bb8d8 When only the app version_info was contained in the resources/attribute we
read from (and the system version_info missing) GetVersionInfo() always
failed. Given that rc only writes the app version_info, mimeset never
created a BEOS:APP_VERSION attribute (nor ones for supported types icons).
The version attribute was usually created nevertheless, as a side effect
of the subsequent setversion invocation.

Under Linux the attribute emulation can accidentially pick up the
attributes of an earlier deleted node that had the the same node ID as the
file in question, which in this case could cause an invalid
BEOS:APP_VERSION attribute (the app version_info part at least).

Now GetVersionInfo() doesn't fail anymore, when only one info could be
read (the other one is zeroed). Not sure, if that is what BeOS does, but
it shouldn't harm. This fixes bug #100.

Also made SetVersionInfo() zero out what couldn't be read before writing it
back.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16320 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-10 02:24:34 +00:00
Ingo Weinhold
1621d9945f Tried to improve the attribute support under non-BeOS compatible
build platforms a bit. Generally extended attributes seem to be
supported up to a very limited size per node, thus a one-to-one
mapping isn't a good idea, but I figured, they could at least
help to recognize when and attribute directory doesn't belong to
a node (in case the original node had been removed and the a new
one created with the same node ID).
The implementation should ensure that, but I can't really test
it, since ReiserFS 3.6 under my SuSE Linux 9.2 installation
apparently doesn't support extended attributes. So it's disabled
for the time being.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16228 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-04 01:55:49 +00:00
Axel Dörfler
9f8734ebea FreeBSD doesn't have strnlen(), and therefore couldn't compile our strlcat.c.
Sorry, that was the problem actually reported by Alexander Deynichenko...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16216 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-03 12:24:15 +00:00
Axel Dörfler
1ee28f024a Too more FreeBSD build fixes by Alexander Deynichenko.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16139 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-29 17:45:52 +00:00
Ingo Weinhold
9ff556c32a Even better use the type guaranteed to be the correct one for the platform.
Thanks to John Drinkwater for pointing that out.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16132 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-28 22:51:09 +00:00
Ingo Weinhold
b4598d95e6 Fixed nasty bug in BAppFileInfo::_ReadData(). When an attribute
or resource to be read did not exist and the method was told to
allocate a buffer, it would try to allocate the buffer with an
uninitialized size value. This basically concerned SetSupportedTypes()
and methods using that one (IsSupportedType(), Supports()).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16131 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-28 22:34:36 +00:00
Ingo Weinhold
15285cb04d Good deal of hackery to get update_mime_info() to work on the host
platform to the extend we need it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16129 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-28 22:00:16 +00:00
Ingo Weinhold
58b53fd940 Added BApplication dummy class.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16128 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-28 21:57:02 +00:00
Ingo Weinhold
e9bd9044fd Dummy BApplication class. So we don't have to #ifdef it out in tools we
to build for the build platform.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16127 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-28 21:56:38 +00:00
Ingo Weinhold
9c2d48f374 Fixed bug already fixed in the Haiku version.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16126 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-28 21:55:29 +00:00
Ingo Weinhold
de3b6032e7 There's even a constant for the ELF executable type.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16125 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-28 21:05:54 +00:00
Ingo Weinhold
0b537029e3 Synchronized the MIME stuff in the build platform support libbe with
the current Haiku libbe.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16124 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-28 20:20:27 +00:00
Axel Dörfler
1956c146ea bfs_shell now also builds under Linux/PPC, not tested yet, though.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15868 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-08 13:19:12 +00:00
Ingo Weinhold
74e7fd417e This should finally fix the spurious "No such file or directory" errors
reported from our build tools under Linux. As it seems Linux does not
translate dirent::d_ino for mount points (BeOS and Haiku do), which
caused us not to find a mount point entry in its parent directory.
Thanks to Vampyre for the hint.
Fixes bugs #73 and #76.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15726 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-29 18:25:29 +00:00
Ingo Weinhold
90b6f0e5fe Replaced a few lstat()s with stat()s where symlinks to directories would
be legal. This might even fix the bug that build tools like xres or
settype couldn't find an existing file under Linux (was never able to
reproduce that one, though).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14900 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-13 17:22:25 +00:00
Ingo Weinhold
87c9daae2b _debuggerAssert() was missing for debug build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14899 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-13 17:17:00 +00:00
Ingo Weinhold
677aaae187 HaikuBuildCompatibility.h has been renamed to BeOSBuildCompatibility.h.
Should fix the build under Linux.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14763 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-07 20:42:06 +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
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
Ingo Weinhold
a8bd76eb3f Required for the build under Linux. Defines dl_iterate_phdr() which is a Linux specific glibc dependency.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11604 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-06 16:49:13 +00:00