* Added several R4.5 compatibility exports - they are now only compiled when GCC

2.95 is used.
* Added empty _klock_node_() syscall for compatibility - all R5 syscalls are now
  also only compiled with GCC 2.95.
* This should fix bug #403.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17011 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2006-04-05 10:48:47 +00:00
parent 04a5721e65
commit 805cb76ed8
3 changed files with 44 additions and 16 deletions
+16 -9
View File
@@ -6,19 +6,19 @@
* Marc Flerackers ([email protected])
* Stephan Aßmus <[email protected]>
* Michael Lotz <[email protected]>
*
* Description:
* BShape encapsulates a Postscript-style "path"
*/
#include <stdlib.h>
#include <string.h>
/*! BShape encapsulates a Postscript-style "path" */
#include <Shape.h>
#include <Message.h>
#include <Point.h>
#include <Rect.h>
#include <Errors.h>
#include <Message.h>
#include <new>
#include <stdlib.h>
#include <string.h>
// NOTE: changing these defines will break Painter,
@@ -491,12 +491,19 @@ BShape::AllocatePts(int32 count)
}
// #pragma mark -
// R4.5 compatibility
// #pragma mark - R4.5 compatibility
#if __GNUC__ < 3
extern "C" BShape*
__6BShapeR6BShape(void* self, BShape& copyFrom)
{
return new (self) BShape(copyFrom);
// we need to instantiate the object in the provided memory
}
extern "C" BRect
Bounds__6BShape(BShape *self)
{
+17 -7
View File
@@ -1726,13 +1726,6 @@ BSlider::_MaxPosition() const
}
extern "C"
void _ReservedSlider4__7BSlider(BSlider *slider, int32 minimum, int32 maximum)
{
slider->BSlider::SetLimits(minimum, maximum);
}
void BSlider::_ReservedSlider5() {}
void BSlider::_ReservedSlider6() {}
void BSlider::_ReservedSlider7() {}
@@ -1749,3 +1742,20 @@ BSlider::operator=(const BSlider &)
return *this;
}
// #pragma mark - R4.5 compatibility
#if __GNUC__ < 3
extern "C"
void _ReservedSlider4__7BSlider(BSlider *slider, int32 minimum, int32 maximum)
{
slider->BSlider::SetLimits(minimum, maximum);
}
extern "C" void _ReservedSlider1__7BSlider() {}
extern "C" void _ReservedSlider2__7BSlider() {}
extern "C" void _ReservedSlider3__7BSlider() {}
#endif // __GNUC__ < 3
@@ -3,6 +3,8 @@
* Distributed under the terms of the MIT License.
*/
#if __GNUC__ < 3
// This file includes some known R5 syscalls
// ToDo: maybe they should indeed do something...
@@ -13,6 +15,7 @@
int _kset_mon_limit_(int num);
int _kset_fd_limit_(int num);
int _klock_node_(int fd);
int _kget_cpu_state_(int cpuNum);
int _kset_cpu_state_(int cpuNum, int state);
@@ -31,6 +34,13 @@ _kset_fd_limit_(int num)
}
int
_klock_node_(int fd)
{
return B_ERROR;
}
int
_kget_cpu_state_(int cpuNum)
{
@@ -44,3 +54,4 @@ _kset_cpu_state_(int cpuNum, int state)
return _kern_set_cpu_enabled(cpuNum, state != 0);
}
#endif // __GNUC__ < 3