From 78edc7687e47364d5594772d5aae9aeb152baaf6 Mon Sep 17 00:00:00 2001 From: thunder2 Date: Tue, 9 Oct 2012 23:07:51 +0000 Subject: [PATCH] Fixed compile of libretroshare on Windows. The corrected pro files are not included. Moved the includes of rswin.h from the header files to the c files. git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-gxs-b1@5655 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- libretroshare/src/dbase/fimonitor.cc | 1 + libretroshare/src/ft/ftfileprovider.cc | 8 ++++---- libretroshare/src/pgp/pgphandler.cc | 1 + libretroshare/src/pqi/authgpg.h | 1 - libretroshare/src/pqi/authssl.cc | 4 ++++ libretroshare/src/pqi/authssl.h | 2 -- libretroshare/src/pqi/pqinetwork.cc | 6 ++++-- libretroshare/src/pqi/pqinetwork.h | 2 -- libretroshare/src/pqi/pqissl.h | 2 -- libretroshare/src/pqi/pqissludp.h | 2 -- libretroshare/src/pqi/sslfns.h | 2 -- libretroshare/src/rsserver/rsinit.cc | 4 +++- libretroshare/src/tcponudp/tou.h | 2 -- libretroshare/src/tcponudp/udpstunner.h | 4 ---- libretroshare/src/util/folderiterator.h | 1 - libretroshare/src/util/rsnet.h | 2 -- libretroshare/src/util/rsthreads.h | 4 ---- 17 files changed, 17 insertions(+), 31 deletions(-) diff --git a/libretroshare/src/dbase/fimonitor.cc b/libretroshare/src/dbase/fimonitor.cc index 9b81c9652..84f101f13 100644 --- a/libretroshare/src/dbase/fimonitor.cc +++ b/libretroshare/src/dbase/fimonitor.cc @@ -23,6 +23,7 @@ #ifdef WINDOWS_SYS #include "util/rsstring.h" +#include "util/rswin.h" #endif #include "dbase/fimonitor.h" diff --git a/libretroshare/src/ft/ftfileprovider.cc b/libretroshare/src/ft/ftfileprovider.cc index 05907d7dd..b64153055 100644 --- a/libretroshare/src/ft/ftfileprovider.cc +++ b/libretroshare/src/ft/ftfileprovider.cc @@ -1,3 +1,7 @@ +#ifdef WINDOWS_SYS +#include "util/rswin.h" +#endif // WINDOWS_SYS + #include "ftfileprovider.h" #include "ftchunkmap.h" @@ -5,10 +9,6 @@ #include #include -#ifdef WINDOWS_SYS -#include "util/rswin.h" -#endif // WINDOWS_SYS - /******** * #define DEBUG_FT_FILE_PROVIDER 1 * #define DEBUG_TRANSFERS 1 // TO GET TIMESTAMPS of DATA READING diff --git a/libretroshare/src/pgp/pgphandler.cc b/libretroshare/src/pgp/pgphandler.cc index 327f794ec..6160d7fba 100644 --- a/libretroshare/src/pgp/pgphandler.cc +++ b/libretroshare/src/pgp/pgphandler.cc @@ -8,6 +8,7 @@ #ifdef WINDOWS_SYS #include "util/rsstring.h" +#include "util/rswin.h" #endif extern "C" { diff --git a/libretroshare/src/pqi/authgpg.h b/libretroshare/src/pqi/authgpg.h index e4576cb4b..6b32a8991 100644 --- a/libretroshare/src/pqi/authgpg.h +++ b/libretroshare/src/pqi/authgpg.h @@ -39,7 +39,6 @@ #ifndef RS_GPG_AUTH_HEADER #define RS_GPG_AUTH_HEADER -#include "util/rswin.h" #include #include #include "util/rsthreads.h" diff --git a/libretroshare/src/pqi/authssl.cc b/libretroshare/src/pqi/authssl.cc index d610c5068..1098a44d4 100644 --- a/libretroshare/src/pqi/authssl.cc +++ b/libretroshare/src/pqi/authssl.cc @@ -28,6 +28,10 @@ * */ +#ifdef WINDOWS_SYS +#include "util/rswin.h" +#endif // WINDOWS_SYS + #include "authssl.h" #include "sslfns.h" #include "cleanupxpgp.h" diff --git a/libretroshare/src/pqi/authssl.h b/libretroshare/src/pqi/authssl.h index 5f1c27e85..c975b5a1c 100644 --- a/libretroshare/src/pqi/authssl.h +++ b/libretroshare/src/pqi/authssl.h @@ -39,8 +39,6 @@ * */ -#include "util/rswin.h" - #include #include diff --git a/libretroshare/src/pqi/pqinetwork.cc b/libretroshare/src/pqi/pqinetwork.cc index 080b6fd35..3a59a2351 100644 --- a/libretroshare/src/pqi/pqinetwork.cc +++ b/libretroshare/src/pqi/pqinetwork.cc @@ -23,8 +23,10 @@ * */ - - +#ifdef WINDOWS_SYS +#include "util/rswin.h" +#include +#endif // WINDOWS_SYS #include "pqi/pqinetwork.h" #include "util/rsnet.h" diff --git a/libretroshare/src/pqi/pqinetwork.h b/libretroshare/src/pqi/pqinetwork.h index 52cb4f6d5..10bdcdb7e 100644 --- a/libretroshare/src/pqi/pqinetwork.h +++ b/libretroshare/src/pqi/pqinetwork.h @@ -45,12 +45,10 @@ #else -#include "util/rswin.h" #include "util/rsnet.h" /* more generic networking header */ #include -#include typedef int socklen_t; //typedef unsigned long in_addr_t; diff --git a/libretroshare/src/pqi/pqissl.h b/libretroshare/src/pqi/pqissl.h index b32eec8c9..988ae1e0d 100644 --- a/libretroshare/src/pqi/pqissl.h +++ b/libretroshare/src/pqi/pqissl.h @@ -28,8 +28,6 @@ #ifndef MRK_PQI_SSL_HEADER #define MRK_PQI_SSL_HEADER -#include "util/rswin.h" - #include // operating system specific network header. diff --git a/libretroshare/src/pqi/pqissludp.h b/libretroshare/src/pqi/pqissludp.h index f5044fbd4..f07632dd4 100644 --- a/libretroshare/src/pqi/pqissludp.h +++ b/libretroshare/src/pqi/pqissludp.h @@ -28,8 +28,6 @@ #ifndef MRK_PQI_SSL_UDP_HEADER #define MRK_PQI_SSL_UDP_HEADER -#include "util/rswin.h" - #include // operating system specific network header. diff --git a/libretroshare/src/pqi/sslfns.h b/libretroshare/src/pqi/sslfns.h index f4c693f7e..98e3b2c0e 100644 --- a/libretroshare/src/pqi/sslfns.h +++ b/libretroshare/src/pqi/sslfns.h @@ -33,8 +33,6 @@ /******************** notify of new Cert **************************/ -#include "util/rswin.h" - #include #include #include diff --git a/libretroshare/src/rsserver/rsinit.cc b/libretroshare/src/rsserver/rsinit.cc index 0a1cce5e9..ce7091ef5 100644 --- a/libretroshare/src/rsserver/rsinit.cc +++ b/libretroshare/src/rsserver/rsinit.cc @@ -28,9 +28,11 @@ #include -// for locking instances #ifndef WINDOWS_SYS +// for locking instances #include +#else +#include "util/rswin.h" #endif #include "util/rsdebug.h" diff --git a/libretroshare/src/tcponudp/tou.h b/libretroshare/src/tcponudp/tou.h index 0c2522764..da72bb85d 100644 --- a/libretroshare/src/tcponudp/tou.h +++ b/libretroshare/src/tcponudp/tou.h @@ -40,10 +40,8 @@ #include #else - #include "util/rswin.h" #include #include - #include #include // #include typedef int socklen_t; diff --git a/libretroshare/src/tcponudp/udpstunner.h b/libretroshare/src/tcponudp/udpstunner.h index 74b07b517..1f55f241b 100644 --- a/libretroshare/src/tcponudp/udpstunner.h +++ b/libretroshare/src/tcponudp/udpstunner.h @@ -25,10 +25,6 @@ * */ -#ifdef WINDOWS_SYS -#include "util/rswin.h" -#endif - #ifndef WINDOWS_SYS #include #endif diff --git a/libretroshare/src/util/folderiterator.h b/libretroshare/src/util/folderiterator.h index bfddc6b74..8007db1a1 100644 --- a/libretroshare/src/util/folderiterator.h +++ b/libretroshare/src/util/folderiterator.h @@ -6,7 +6,6 @@ #include #ifdef WINDOWS_SYS - #include "util/rswin.h" #include #include #include diff --git a/libretroshare/src/util/rsnet.h b/libretroshare/src/util/rsnet.h index c8442f1c6..15bf5749a 100644 --- a/libretroshare/src/util/rsnet.h +++ b/libretroshare/src/util/rsnet.h @@ -44,10 +44,8 @@ #else -#include "util/rswin.h" #include -#include #include /* for ssize_t */ //typedef uint32_t socklen_t; diff --git a/libretroshare/src/util/rsthreads.h b/libretroshare/src/util/rsthreads.h index 7cd81a294..204fdd630 100644 --- a/libretroshare/src/util/rsthreads.h +++ b/libretroshare/src/util/rsthreads.h @@ -27,10 +27,6 @@ */ -#ifdef WINDOWS_SYS -#include "util/rswin.h" -#endif - #include #include #include