mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-04 15:15:15 -04:00
Modified libretroshare to compile under MacOSX.
1) b64.c used c++ functions -> b64.cc 2) OSX will use miniupnpc for now -> modified #defines. 3) change in openssl fn signature? 4) updated build file for OSX. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2344 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
4a5bd60880
commit
56e9536336
7 changed files with 62 additions and 17 deletions
|
@ -1,5 +1,5 @@
|
|||
//Linux and macos implementation
|
||||
#ifndef WINDOWS_SYS
|
||||
//Linux only
|
||||
#if !defined(WINDOWS_SYS) && !defined(__APPLE__)
|
||||
|
||||
/* This stuff is actually C */
|
||||
|
||||
|
@ -429,8 +429,8 @@ bool upnphandler::getExternalAddress(struct sockaddr_in &addr)
|
|||
|
||||
|
||||
|
||||
|
||||
#ifdef WINDOWS_SYS
|
||||
// Windows / Mac version.
|
||||
#if defined(WINDOWS_SYS) || defined(__APPLE__)
|
||||
|
||||
/* This stuff is actually C */
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
//Linux and macos implementation
|
||||
#ifndef WINDOWS_SYS
|
||||
//Linux only...
|
||||
#if !defined(WINDOWS_SYS) && !defined(__APPLE__)
|
||||
|
||||
#ifndef _RS_UPNP_IFACE_H
|
||||
#define _RS_UPNP_IFACE_H
|
||||
|
@ -86,8 +86,8 @@ int CtrlPointCallbackEventHandler(Upnp_EventType ,void* , void*);
|
|||
|
||||
|
||||
|
||||
#if defined(WINDOWS_SYS) || defined(__APPLE__)
|
||||
|
||||
#ifdef WINDOWS_SYS
|
||||
//windows implementation
|
||||
#ifndef _RS_UPNP_IFACE_H
|
||||
#define _RS_UPNP_IFACE_H
|
||||
|
|
|
@ -107,7 +107,7 @@ void ListRedirections(struct UPNPUrls * urls,
|
|||
* 2 - get extenal ip address
|
||||
* 3 - Add port mapping
|
||||
* 4 - get this port mapping from the IGD */
|
||||
bool SetRedirectAndTest(struct UPNPUrls * urls,
|
||||
int SetRedirectAndTest(struct UPNPUrls * urls,
|
||||
struct IGDdatas * data,
|
||||
const char * iaddr,
|
||||
const char * iport,
|
||||
|
@ -209,7 +209,7 @@ bool SetRedirectAndTest(struct UPNPUrls * urls,
|
|||
return ok;
|
||||
}
|
||||
|
||||
bool TestRedirect(struct UPNPUrls * urls,
|
||||
int TestRedirect(struct UPNPUrls * urls,
|
||||
struct IGDdatas * data,
|
||||
const char * iaddr,
|
||||
const char * iport,
|
||||
|
@ -261,7 +261,7 @@ bool TestRedirect(struct UPNPUrls * urls,
|
|||
|
||||
|
||||
|
||||
bool
|
||||
int
|
||||
RemoveRedirect(struct UPNPUrls * urls,
|
||||
struct IGDdatas * data,
|
||||
const char * eport,
|
||||
|
|
|
@ -21,6 +21,13 @@
|
|||
#include <miniupnpc.h>
|
||||
#include <upnpcommands.h>
|
||||
|
||||
/* Ensure linking names are okay on OSX platform. (C interface) */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/* protofix() checks if protocol is "UDP" or "TCP"
|
||||
* returns NULL if not */
|
||||
const char * protofix(const char * proto);
|
||||
|
@ -33,24 +40,28 @@ void GetConnectionStatus(struct UPNPUrls * urls,
|
|||
void ListRedirections(struct UPNPUrls * urls,
|
||||
struct IGDdatas * data);
|
||||
|
||||
bool SetRedirectAndTest(struct UPNPUrls * urls,
|
||||
int SetRedirectAndTest(struct UPNPUrls * urls,
|
||||
struct IGDdatas * data,
|
||||
const char * iaddr,
|
||||
const char * iport,
|
||||
const char * eport,
|
||||
const char * proto);
|
||||
|
||||
bool TestRedirect(struct UPNPUrls * urls,
|
||||
int TestRedirect(struct UPNPUrls * urls,
|
||||
struct IGDdatas * data,
|
||||
const char * iaddr,
|
||||
const char * iport,
|
||||
const char * eport,
|
||||
const char * proto);
|
||||
|
||||
bool RemoveRedirect(struct UPNPUrls * urls,
|
||||
int RemoveRedirect(struct UPNPUrls * urls,
|
||||
struct IGDdatas * data,
|
||||
const char * eport,
|
||||
const char * proto);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/* EOF */
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue