summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/unix/stream_peer_tcp_posix.cpp8
-rw-r--r--platform/haiku/detect.py2
-rw-r--r--platform/haiku/os_haiku.cpp76
-rw-r--r--platform/haiku/os_haiku.h3
4 files changed, 85 insertions, 4 deletions
diff --git a/drivers/unix/stream_peer_tcp_posix.cpp b/drivers/unix/stream_peer_tcp_posix.cpp
index 2db7d9f6ec..f65eb694d6 100644
--- a/drivers/unix/stream_peer_tcp_posix.cpp
+++ b/drivers/unix/stream_peer_tcp_posix.cpp
@@ -206,8 +206,12 @@ Error StreamPeerTCPPosix::write(const uint8_t* p_data,int p_bytes, int &r_sent,
while (data_to_send) {
- // TODO: handle MSG_NOSIGNAL on __HAIKU__
- int sent_amount = send(sockfd, offset, data_to_send, 0);
+ // TODO: haiku does not have MSG_NOSIGNAL
+#ifdef __HAIKU__
+ int sent_amount = send(sockfd, offset, data_to_send, 0);
+#else
+ int sent_amount = send(sockfd, offset, data_to_send, MSG_NOSIGNAL);
+#endif
//printf("Sent TCP data of %d bytes, errno %d\n", sent_amount, errno);
if (sent_amount == -1) {
diff --git a/platform/haiku/detect.py b/platform/haiku/detect.py
index 5dad2af033..b443469d8d 100644
--- a/platform/haiku/detect.py
+++ b/platform/haiku/detect.py
@@ -41,4 +41,4 @@ def configure(env):
env.Append(CPPFLAGS = ['-DDEBUG_METHODS_ENABLED'])
env.Append(CPPFLAGS = ['-DUNIX_ENABLED'])
- env.Append(LIBS = ['be'])
+ env.Append(LIBS = ['be', 'z', 'network', 'bnetapi'])
diff --git a/platform/haiku/os_haiku.cpp b/platform/haiku/os_haiku.cpp
index 8841306b7a..4d45bb3333 100644
--- a/platform/haiku/os_haiku.cpp
+++ b/platform/haiku/os_haiku.cpp
@@ -1,5 +1,81 @@
#include "os_haiku.h"
+OS_Haiku::OS_Haiku() {
+
+};
+
+void OS_Haiku::run() {
+
+}
+
String OS_Haiku::get_name() {
return "Haiku";
}
+
+void OS_Haiku::delete_main_loop() {
+
+}
+
+int OS_Haiku::get_video_driver_count() const {
+
+}
+
+const char* OS_Haiku::get_video_driver_name(int p_driver) const {
+
+}
+
+OS::VideoMode OS_Haiku::get_default_video_mode() const {
+
+}
+
+void OS_Haiku::initialize(const VideoMode& p_desired, int p_video_driver, int p_audio_driver) {
+
+}
+
+void OS_Haiku::finalize() {
+
+}
+
+void OS_Haiku::set_main_loop(MainLoop* p_main_loop) {
+
+}
+
+MainLoop* OS_Haiku::get_main_loop() const {
+
+}
+
+bool OS_Haiku::can_draw() const {
+
+}
+
+Point2 OS_Haiku::get_mouse_pos() const {
+
+}
+
+int OS_Haiku::get_mouse_button_state() const {
+
+}
+
+void OS_Haiku::set_cursor_shape(CursorShape p_shape) {
+
+}
+
+void OS_Haiku::set_window_title(const String& p_title) {
+
+}
+
+Size2 OS_Haiku::get_window_size() const {
+
+}
+
+void OS_Haiku::set_video_mode(const VideoMode& p_video_mode, int p_screen) {
+
+}
+
+OS::VideoMode OS_Haiku::get_video_mode(int p_screen) const {
+
+}
+
+void OS_Haiku::get_fullscreen_mode_list(List<VideoMode> *p_list, int p_screen) const {
+
+}
diff --git a/platform/haiku/os_haiku.h b/platform/haiku/os_haiku.h
index ee1283f018..7e3cf84579 100644
--- a/platform/haiku/os_haiku.h
+++ b/platform/haiku/os_haiku.h
@@ -1,6 +1,7 @@
#ifndef OS_HAIKU_H
#define OS_HAIKU_H
+#include "os/os.h"
#include "drivers/unix/os_unix.h"
@@ -24,7 +25,7 @@ public:
virtual String get_name();
- virtual MainLoop *get_main_loop() const;
+ virtual MainLoop* get_main_loop() const;
virtual bool can_draw() const;
virtual Point2 get_mouse_pos() const;