mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-23 00:01:21 -04:00
Add Haiku support
This commit is contained in:
parent
febea809b1
commit
34758be52a
14 changed files with 80 additions and 4 deletions
|
@ -104,6 +104,12 @@ freebsd-* {
|
||||||
openbsd-* {
|
openbsd-* {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
################################# Haiku ##########################################
|
||||||
|
|
||||||
|
haiku-* {
|
||||||
|
DESTDIR = lib
|
||||||
|
}
|
||||||
|
|
||||||
################################### COMMON stuff ##################################
|
################################### COMMON stuff ##################################
|
||||||
################################### COMMON stuff ##################################
|
################################### COMMON stuff ##################################
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
#include <sys/select.h>
|
||||||
|
|
||||||
/***
|
/***
|
||||||
* #define UDP_ENABLE_BROADCAST 1
|
* #define UDP_ENABLE_BROADCAST 1
|
||||||
|
|
|
@ -13,7 +13,7 @@ static bool auto_seed = bdRandom::seed( (time(NULL) + ((uint32_t) pthread_self()
|
||||||
#else
|
#else
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
static bool auto_seed = bdRandom::seed( (time(NULL) + pthread_mach_thread_np(pthread_self())*0x1293fe + (getpid()^0x113ef76b))^0x18e34a12 ) ;
|
static bool auto_seed = bdRandom::seed( (time(NULL) + pthread_mach_thread_np(pthread_self())*0x1293fe + (getpid()^0x113ef76b))^0x18e34a12 ) ;
|
||||||
#elif defined(__FreeBSD__)
|
#elif defined(__FreeBSD__) || (__HAIKU__)
|
||||||
// since this is completely insecure anyway, just kludge for now
|
// since this is completely insecure anyway, just kludge for now
|
||||||
static bool auto_seed = bdRandom::seed(time(NULL));
|
static bool auto_seed = bdRandom::seed(time(NULL));
|
||||||
#elif defined(__OpenBSD__)
|
#elif defined(__OpenBSD__)
|
||||||
|
|
|
@ -314,6 +314,19 @@ openbsd-* {
|
||||||
CONFIG += upnp_libupnp
|
CONFIG += upnp_libupnp
|
||||||
}
|
}
|
||||||
|
|
||||||
|
################################# Haiku ##########################################
|
||||||
|
|
||||||
|
haiku-* {
|
||||||
|
|
||||||
|
QMAKE_CXXFLAGS *= -Dfseeko64=fseeko -Dftello64=ftello -Dstat64=stat -Dstatvfs64=statvfs -Dfopen64=fopen
|
||||||
|
OPENPGPSDK_DIR = ../../openpgpsdk/src
|
||||||
|
INCLUDEPATH *= $${OPENPGPSDK_DIR} ../openpgpsdk
|
||||||
|
DEFINES *= NO_SQLCIPHER
|
||||||
|
CONFIG += release
|
||||||
|
CONFIG += upnp_libupnp
|
||||||
|
DESTDIR = lib
|
||||||
|
}
|
||||||
|
|
||||||
################################### COMMON stuff ##################################
|
################################### COMMON stuff ##################################
|
||||||
|
|
||||||
# openpgpsdk
|
# openpgpsdk
|
||||||
|
|
|
@ -55,6 +55,11 @@ int errno;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef __HAIKU__
|
||||||
|
#include <sys/sockio.h>
|
||||||
|
#define IFF_RUNNING 0x0001
|
||||||
|
#endif
|
||||||
|
|
||||||
/********************************** WINDOWS/UNIX SPECIFIC PART ******************/
|
/********************************** WINDOWS/UNIX SPECIFIC PART ******************/
|
||||||
#ifndef WINDOWS_SYS
|
#ifndef WINDOWS_SYS
|
||||||
|
|
||||||
|
|
|
@ -38,6 +38,7 @@
|
||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
|
|
||||||
#include <sys/poll.h>
|
#include <sys/poll.h>
|
||||||
|
#include <errno.h>
|
||||||
|
|
||||||
//socket blocking/options.
|
//socket blocking/options.
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
|
|
@ -117,6 +117,7 @@ bool RsLoginHandler::tryAutoLogin(const RsPeerId& ssl_id,std::string& ssl_passwd
|
||||||
std::cerr << "RsTryAutoLogin()" << std::endl;
|
std::cerr << "RsTryAutoLogin()" << std::endl;
|
||||||
|
|
||||||
/******************************** WINDOWS/UNIX SPECIFIC PART ******************/
|
/******************************** WINDOWS/UNIX SPECIFIC PART ******************/
|
||||||
|
#ifndef __HAIKU__
|
||||||
#ifndef WINDOWS_SYS /* UNIX */
|
#ifndef WINDOWS_SYS /* UNIX */
|
||||||
#if defined(UBUNTU) || defined(__FreeBSD__) || defined(__OpenBSD__)
|
#if defined(UBUNTU) || defined(__FreeBSD__) || defined(__OpenBSD__)
|
||||||
|
|
||||||
|
@ -348,6 +349,7 @@ bool RsLoginHandler::tryAutoLogin(const RsPeerId& ssl_id,std::string& ssl_passwd
|
||||||
LocalFree(DataOut.pbData);
|
LocalFree(DataOut.pbData);
|
||||||
|
|
||||||
return isDecrypt;
|
return isDecrypt;
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
/******************************** WINDOWS/UNIX SPECIFIC PART ******************/
|
/******************************** WINDOWS/UNIX SPECIFIC PART ******************/
|
||||||
|
|
||||||
|
@ -360,6 +362,7 @@ bool RsLoginHandler::enableAutoLogin(const RsPeerId& ssl_id,const std::string& s
|
||||||
std::cerr << "RsStoreAutoLogin()" << std::endl;
|
std::cerr << "RsStoreAutoLogin()" << std::endl;
|
||||||
|
|
||||||
/******************************** WINDOWS/UNIX SPECIFIC PART ******************/
|
/******************************** WINDOWS/UNIX SPECIFIC PART ******************/
|
||||||
|
#ifndef __HAIKU__
|
||||||
#ifndef WINDOWS_SYS /* UNIX */
|
#ifndef WINDOWS_SYS /* UNIX */
|
||||||
#if defined(UBUNTU) || defined(__FreeBSD__) || defined(__OpenBSD__)
|
#if defined(UBUNTU) || defined(__FreeBSD__) || defined(__OpenBSD__)
|
||||||
if(GNOME_KEYRING_RESULT_OK == gnome_keyring_store_password_sync(&my_schema, NULL, (gchar*)("RetroShare password for SSL Id "+ssl_id.toStdString()).c_str(),(gchar*)ssl_passwd.c_str(),"RetroShare SSL Id",ssl_id.toStdString().c_str(),NULL))
|
if(GNOME_KEYRING_RESULT_OK == gnome_keyring_store_password_sync(&my_schema, NULL, (gchar*)("RetroShare password for SSL Id "+ssl_id.toStdString()).c_str(),(gchar*)ssl_passwd.c_str(),"RetroShare SSL Id",ssl_id.toStdString().c_str(),NULL))
|
||||||
|
@ -518,6 +521,7 @@ bool RsLoginHandler::enableAutoLogin(const RsPeerId& ssl_id,const std::string& s
|
||||||
/******************************** WINDOWS/UNIX SPECIFIC PART ******************/
|
/******************************** WINDOWS/UNIX SPECIFIC PART ******************/
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
bool RsLoginHandler::clearAutoLogin(const RsPeerId& ssl_id)
|
bool RsLoginHandler::clearAutoLogin(const RsPeerId& ssl_id)
|
||||||
|
|
|
@ -35,6 +35,7 @@ static const int kInitStreamTable = 5;
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
#include "udp/udpstack.h"
|
#include "udp/udpstack.h"
|
||||||
|
#include "pqi/pqinetwork.h"
|
||||||
#include "tcpstream.h"
|
#include "tcpstream.h"
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
@ -42,6 +43,7 @@ static const int kInitStreamTable = 5;
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#define DEBUG_TOU_INTERFACE 1
|
#define DEBUG_TOU_INTERFACE 1
|
||||||
|
#define EUSERS 87
|
||||||
|
|
||||||
struct TcpOnUdp_t
|
struct TcpOnUdp_t
|
||||||
{
|
{
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
// Includes for directory creation.
|
// Includes for directory creation.
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <sys/fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "util/rsdir.h"
|
#include "util/rsdir.h"
|
||||||
|
|
|
@ -75,7 +75,7 @@ void sockaddr_clear(struct sockaddr_in *addr)
|
||||||
|
|
||||||
bool rsGetHostByName(const std::string& hostname, in_addr& returned_addr)
|
bool rsGetHostByName(const std::string& hostname, in_addr& returned_addr)
|
||||||
{
|
{
|
||||||
#if defined(WINDOWS_SYS) || defined(__APPLE__)
|
#if defined(WINDOWS_SYS) || defined(__APPLE__) || defined(__HAIKU__)
|
||||||
hostent *result = gethostbyname(hostname.c_str()) ;
|
hostent *result = gethostbyname(hostname.c_str()) ;
|
||||||
#else
|
#else
|
||||||
RsTemporaryMemory mem(8192) ;
|
RsTemporaryMemory mem(8192) ;
|
||||||
|
|
|
@ -94,6 +94,10 @@ win32 {
|
||||||
|
|
||||||
openbsd-* {
|
openbsd-* {
|
||||||
LIBXML2_DIR = /usr/local/include/libxml2
|
LIBXML2_DIR = /usr/local/include/libxml2
|
||||||
|
}
|
||||||
|
|
||||||
|
haiku-* {
|
||||||
|
LIBXML2_DIR = pkg-config --cflags libxml-2.0
|
||||||
|
|
||||||
INCLUDEPATH += $${LIBXML2_DIR}
|
INCLUDEPATH += $${LIBXML2_DIR}
|
||||||
|
|
||||||
|
|
|
@ -237,6 +237,24 @@ freebsd-* {
|
||||||
LIBS += -lsqlite3
|
LIBS += -lsqlite3
|
||||||
}
|
}
|
||||||
|
|
||||||
|
##################################### Haiku ######################################
|
||||||
|
|
||||||
|
haiku-* {
|
||||||
|
PRE_TARGETDEPS *= ../../libretroshare/src/lib/libretroshare.a
|
||||||
|
PRE_TARGETDEPS *= ../../openpgpsdk/src/lib/libops.a
|
||||||
|
|
||||||
|
LIBS *= ../../libretroshare/src/lib/libretroshare.a
|
||||||
|
LIBS *= ../../openpgpsdk/src/lib/libops.a -lbz2 -lbsd
|
||||||
|
LIBS *= -lssl -lcrypto -lnetwork
|
||||||
|
LIBS *= -lgpgme
|
||||||
|
LIBS *= -lupnp
|
||||||
|
LIBS *= -lz
|
||||||
|
LIBS *= -lixml
|
||||||
|
|
||||||
|
LIBS += ../../supportlibs/pegmarkdown/lib/libpegmarkdown.a
|
||||||
|
LIBS += -lsqlite3
|
||||||
|
}
|
||||||
|
|
||||||
##################################### OpenBSD ######################################
|
##################################### OpenBSD ######################################
|
||||||
|
|
||||||
openbsd-* {
|
openbsd-* {
|
||||||
|
|
|
@ -85,6 +85,8 @@
|
||||||
#define OS_OPENBSD
|
#define OS_OPENBSD
|
||||||
#elif defined(__GNU_HURD__)
|
#elif defined(__GNU_HURD__)
|
||||||
#define OS_HURD
|
#define OS_HURD
|
||||||
|
#elif defined(__HAIKU__)
|
||||||
|
#define OS_HAIKU
|
||||||
#elif defined(WIN32_PLATFORM_PSPC)
|
#elif defined(WIN32_PLATFORM_PSPC)
|
||||||
#define OS_WINCE_POCKETPC
|
#define OS_WINCE_POCKETPC
|
||||||
#elif defined(WIN32_PLATFORM_WFSP)
|
#elif defined(WIN32_PLATFORM_WFSP)
|
||||||
|
@ -101,7 +103,7 @@
|
||||||
#define OS_BSD
|
#define OS_BSD
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_HURD) || defined(OS_BSD)
|
#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_HURD) || defined(OS_BSD) || defined(OS_HAIKU)
|
||||||
#define OS_POSIX
|
#define OS_POSIX
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -133,6 +133,26 @@ openbsd-* {
|
||||||
LIBS *= -rdynamic
|
LIBS *= -rdynamic
|
||||||
}
|
}
|
||||||
|
|
||||||
|
##################################### Haiku ######################################
|
||||||
|
|
||||||
|
haiku-* {
|
||||||
|
QMAKE_CXXFLAGS *= -D_BSD_SOURCE
|
||||||
|
|
||||||
|
PRE_TARGETDEPS *= ../../libretroshare/src/lib/libretroshare.a
|
||||||
|
PRE_TARGETDEPS *= ../../openpgpsdk/src/lib/libops.a
|
||||||
|
|
||||||
|
LIBS *= ../../libretroshare/src/lib/libretroshare.a
|
||||||
|
LIBS *= ../../openpgpsdk/src/lib/libops.a -lbz2 -lbsd
|
||||||
|
LIBS *= -lssl -lcrypto -lnetwork
|
||||||
|
LIBS *= -lgpgme
|
||||||
|
LIBS *= -lupnp
|
||||||
|
LIBS *= -lz
|
||||||
|
LIBS *= -lixml
|
||||||
|
|
||||||
|
LIBS += ../../supportlibs/pegmarkdown/lib/libpegmarkdown.a
|
||||||
|
LIBS += -lsqlite3
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
############################## Common stuff ######################################
|
############################## Common stuff ######################################
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue