mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-18 09:40:05 +02:00
96 lines
2.4 KiB
Diff
96 lines
2.4 KiB
Diff
Index: Canvas.cpp
|
|
===================================================================
|
|
--- numptyphysics-0.2-157/Canvas.cpp (revision 157)
|
|
+++ numptyphysics-0.2-157/Canvas.cpp (working copy)
|
|
@@ -26,7 +26,7 @@
|
|
#define Window X11Window //oops
|
|
#define Font X11Font //oops
|
|
#include <SDL/SDL_syswm.h>
|
|
-#ifndef WIN32
|
|
+#if (!defined(WIN32) && !defined(__HAIKU__))
|
|
#include <X11/X.h>
|
|
#include <X11/Xlib.h>
|
|
#endif
|
|
@@ -753,8 +753,8 @@
|
|
SDL_VERSION( &sys.version );
|
|
SDL_GetWMInfo( &sys );
|
|
|
|
-#if !defined(WIN32) && !(defined(__APPLE__) && defined(__MACH__))
|
|
- /* No X11 stuff on Windows and Mac OS X */
|
|
+#if !defined(WIN32) && !defined(__HAIKU__) && !(defined(__APPLE__) && defined(__MACH__))
|
|
+ /* No X11 stuff on Windows, Haiku and Mac OS X */
|
|
|
|
// take focus...
|
|
XEvent ev = { 0 };
|
|
@@ -840,7 +840,11 @@
|
|
|
|
int Canvas::writeBMP( const char* filename ) const
|
|
{
|
|
-#pragma pack(push,1)
|
|
+#ifdef __HAIKU__
|
|
+#pragma pack(1)
|
|
+#else
|
|
+#pragma pack(1,push)
|
|
+#endif
|
|
typedef struct {
|
|
unsigned short int type; /* Magic identifier */
|
|
unsigned int size; /* File size in bytes */
|
|
@@ -861,7 +865,11 @@
|
|
} BMPINFOHEADER;
|
|
int check_BMPHEADER[(sizeof(BMPHEADER)==14)-1];
|
|
int check_BMPINFOHEADER[(sizeof(BMPINFOHEADER)==40)-1];
|
|
+#ifdef __HAIKU__
|
|
+#pragma pack()
|
|
+#else
|
|
#pragma pack(pop)
|
|
+#endif
|
|
|
|
int w = width();
|
|
int h = height();
|
|
Index: configure.in
|
|
===================================================================
|
|
--- numptyphysics-0.2-157/configure.in (revision 157)
|
|
+++ numptyphysics-0.2-157/configure.in (working copy)
|
|
@@ -77,6 +77,7 @@
|
|
AC_CHECK_LIB(stdc++, main)
|
|
AC_CHECK_LIB(X11, main)
|
|
AC_CHECK_LIB(z, main)
|
|
+AC_CHECK_LIB(network, socket)
|
|
|
|
|
|
AC_CONFIG_FILES([Makefile])
|
|
Index: happyhttp.cpp
|
|
===================================================================
|
|
--- numptyphysics-0.2-157/happyhttp.cpp (revision 157)
|
|
+++ numptyphysics-0.2-157/happyhttp.cpp (working copy)
|
|
@@ -28,7 +28,7 @@
|
|
#include "happyhttp.h"
|
|
|
|
#ifndef WIN32
|
|
-// #include <sys/types.h>
|
|
+
|
|
#include <sys/socket.h>
|
|
#include <netinet/in.h>
|
|
#include <arpa/inet.h>
|
|
@@ -41,6 +41,10 @@
|
|
#define vsnprintf _vsnprintf
|
|
#endif
|
|
|
|
+#ifdef __HAIKU__
|
|
+ #include <sys/select.h>
|
|
+#endif
|
|
+
|
|
#include <cstdio>
|
|
#include <cstring>
|
|
#include <cstdarg>
|
|
@@ -278,6 +282,9 @@
|
|
#ifdef WIN32
|
|
if( m_Sock >= 0 )
|
|
::closesocket( m_Sock );
|
|
+#elif __HAIKU__
|
|
+// need to figure this part out for Haiku still
|
|
+//
|
|
#else
|
|
if( m_Sock >= 0 )
|
|
::close( m_Sock );
|