mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Add Haiku support
This commit is contained in:
parent
febea809b1
commit
34758be52a
@ -104,6 +104,12 @@ freebsd-* {
|
||||
openbsd-* {
|
||||
}
|
||||
|
||||
################################# Haiku ##########################################
|
||||
|
||||
haiku-* {
|
||||
DESTDIR = lib
|
||||
}
|
||||
|
||||
################################### COMMON stuff ##################################
|
||||
################################### COMMON stuff ##################################
|
||||
|
||||
|
@ -32,6 +32,7 @@
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
#include <sys/select.h>
|
||||
|
||||
/***
|
||||
* #define UDP_ENABLE_BROADCAST 1
|
||||
|
@ -13,7 +13,7 @@ static bool auto_seed = bdRandom::seed( (time(NULL) + ((uint32_t) pthread_self()
|
||||
#else
|
||||
#ifdef __APPLE__
|
||||
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
|
||||
static bool auto_seed = bdRandom::seed(time(NULL));
|
||||
#elif defined(__OpenBSD__)
|
||||
|
@ -314,6 +314,19 @@ openbsd-* {
|
||||
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 ##################################
|
||||
|
||||
# openpgpsdk
|
||||
|
@ -55,6 +55,11 @@ int errno;
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __HAIKU__
|
||||
#include <sys/sockio.h>
|
||||
#define IFF_RUNNING 0x0001
|
||||
#endif
|
||||
|
||||
/********************************** WINDOWS/UNIX SPECIFIC PART ******************/
|
||||
#ifndef WINDOWS_SYS
|
||||
|
||||
|
@ -38,6 +38,7 @@
|
||||
#include <arpa/inet.h>
|
||||
|
||||
#include <sys/poll.h>
|
||||
#include <errno.h>
|
||||
|
||||
//socket blocking/options.
|
||||
#include <fcntl.h>
|
||||
|
@ -117,6 +117,7 @@ bool RsLoginHandler::tryAutoLogin(const RsPeerId& ssl_id,std::string& ssl_passwd
|
||||
std::cerr << "RsTryAutoLogin()" << std::endl;
|
||||
|
||||
/******************************** WINDOWS/UNIX SPECIFIC PART ******************/
|
||||
#ifndef __HAIKU__
|
||||
#ifndef WINDOWS_SYS /* UNIX */
|
||||
#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);
|
||||
|
||||
return isDecrypt;
|
||||
#endif
|
||||
#endif
|
||||
/******************************** WINDOWS/UNIX SPECIFIC PART ******************/
|
||||
|
||||
@ -360,6 +362,7 @@ bool RsLoginHandler::enableAutoLogin(const RsPeerId& ssl_id,const std::string& s
|
||||
std::cerr << "RsStoreAutoLogin()" << std::endl;
|
||||
|
||||
/******************************** WINDOWS/UNIX SPECIFIC PART ******************/
|
||||
#ifndef __HAIKU__
|
||||
#ifndef WINDOWS_SYS /* UNIX */
|
||||
#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))
|
||||
@ -518,6 +521,7 @@ bool RsLoginHandler::enableAutoLogin(const RsPeerId& ssl_id,const std::string& s
|
||||
/******************************** WINDOWS/UNIX SPECIFIC PART ******************/
|
||||
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
bool RsLoginHandler::clearAutoLogin(const RsPeerId& ssl_id)
|
||||
|
@ -35,6 +35,7 @@ static const int kInitStreamTable = 5;
|
||||
#include <time.h>
|
||||
|
||||
#include "udp/udpstack.h"
|
||||
#include "pqi/pqinetwork.h"
|
||||
#include "tcpstream.h"
|
||||
#include <vector>
|
||||
#include <iostream>
|
||||
@ -42,6 +43,7 @@ static const int kInitStreamTable = 5;
|
||||
#include <errno.h>
|
||||
|
||||
#define DEBUG_TOU_INTERFACE 1
|
||||
#define EUSERS 87
|
||||
|
||||
struct TcpOnUdp_t
|
||||
{
|
||||
|
@ -27,7 +27,7 @@
|
||||
// Includes for directory creation.
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/fcntl.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.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)
|
||||
{
|
||||
#if defined(WINDOWS_SYS) || defined(__APPLE__)
|
||||
#if defined(WINDOWS_SYS) || defined(__APPLE__) || defined(__HAIKU__)
|
||||
hostent *result = gethostbyname(hostname.c_str()) ;
|
||||
#else
|
||||
RsTemporaryMemory mem(8192) ;
|
||||
|
@ -94,6 +94,10 @@ win32 {
|
||||
|
||||
openbsd-* {
|
||||
LIBXML2_DIR = /usr/local/include/libxml2
|
||||
}
|
||||
|
||||
haiku-* {
|
||||
LIBXML2_DIR = pkg-config --cflags libxml-2.0
|
||||
|
||||
INCLUDEPATH += $${LIBXML2_DIR}
|
||||
|
||||
|
@ -237,6 +237,24 @@ freebsd-* {
|
||||
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-* {
|
||||
|
@ -85,6 +85,8 @@
|
||||
#define OS_OPENBSD
|
||||
#elif defined(__GNU_HURD__)
|
||||
#define OS_HURD
|
||||
#elif defined(__HAIKU__)
|
||||
#define OS_HAIKU
|
||||
#elif defined(WIN32_PLATFORM_PSPC)
|
||||
#define OS_WINCE_POCKETPC
|
||||
#elif defined(WIN32_PLATFORM_WFSP)
|
||||
@ -101,7 +103,7 @@
|
||||
#define OS_BSD
|
||||
#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
|
||||
#endif
|
||||
|
||||
|
@ -133,6 +133,26 @@ openbsd-* {
|
||||
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 ######################################
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user