From X512 <danger_mail@xxxxxxx>:
X512 has uploaded this change for review. (
https://review.haiku-os.org/c/haiku/+/2396 ;)
Change subject: Fix clang error return-type-c-linkage
......................................................................
Fix clang error return-type-c-linkage
C functions can't return struct.
Change-Id: I7780185e7d0508502998faaf44c95ef09cc566f8
---
M src/kits/interface/Rect.cpp
M src/kits/support/String.cpp
2 files changed, 6 insertions(+), 60 deletions(-)
git pull ssh://git.haiku-os.org:22/haiku refs/changes/96/2396/1
diff --git a/src/kits/interface/Rect.cpp b/src/kits/interface/Rect.cpp
index 3c9a0d6..a77786a 100644
--- a/src/kits/interface/Rect.cpp
+++ b/src/kits/interface/Rect.cpp
@@ -332,62 +332,4 @@
}
-#elif __GNUC__ >= 4
-// TODO: remove this when new GCC 4 packages have to be built anyway
-
-
-extern "C" BRect
-_ZN5BRect11InsetByCopyE6BPoint(BRect* self, BPoint point)
-{
- BRect copy(*self);
- copy.InsetBy(point);
- return copy;
-}
-
-
-extern "C" BRect
-_ZN5BRect11InsetByCopyEff(BRect* self, float dx, float dy)
-{
- BRect copy(*self);
- copy.InsetBy(dx, dy);
- return copy;
-}
-
-
-extern "C" BRect
-_ZN5BRect12OffsetByCopyE6BPoint(BRect* self, BPoint point)
-{
- BRect copy(*self);
- copy.OffsetBy(point);
- return copy;
-}
-
-
-extern "C" BRect
-_ZN5BRect12OffsetByCopyEff(BRect* self, float dx, float dy)
-{
- BRect copy(*self);
- copy.OffsetBy(dx, dy);
- return copy;
-}
-
-
-extern "C" BRect
-_ZN5BRect12OffsetToCopyE6BPoint(BRect* self, BPoint point)
-{
- BRect copy(*self);
- copy.OffsetTo(point);
- return copy;
-}
-
-
-extern "C" BRect
-_ZN5BRect12OffsetToCopyEff(BRect* self, float dx, float dy)
-{
- BRect copy(*self);
- copy.OffsetTo(dx, dy);
- return copy;
-}
-
-
-#endif // __GNUC__ >= 4
+#endif
diff --git a/src/kits/support/String.cpp b/src/kits/support/String.cpp
index 9bdfcbb..c2b7e20 100644
--- a/src/kits/support/String.cpp
+++ b/src/kits/support/String.cpp
@@ -2700,6 +2700,7 @@
// #pragma mark - backwards compatibility
+#if __GNUC__ == 2
/*! Translates to (missing const):
BString& BString::operator<<(BString& string)
@@ -2710,6 +2711,8 @@
return self->operator<<(string);
}
+#endif
+
#if __GNUC__ > 3
@@ -2783,13 +2786,14 @@
}
-
+/*
extern "C" BStringRef
_ZN7BStringixEi(BString* self, int32 index)
{
return BStringRef(*self, index);
}
+*/
#endif
--
To view, visit https://review.haiku-os.org/c/haiku/+/2396
To unsubscribe, or for help writing mail filters, visit
https://review.haiku-os.org/settings
Gerrit-Project: haiku
Gerrit-Branch: master
Gerrit-Change-Id: I7780185e7d0508502998faaf44c95ef09cc566f8
Gerrit-Change-Number: 2396
Gerrit-PatchSet: 1
Gerrit-Owner: X512 <danger_mail@xxxxxxx>
Gerrit-MessageType: newchange