Code maintenance for Qt 5:

- Added some more includes needed by MinGW-w64

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6860 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2013-10-21 11:00:49 +00:00
parent 3a72b27632
commit 9095e9bd75
31 changed files with 44 additions and 3 deletions

View File

@ -45,6 +45,7 @@
#include <unistd.h> #include <unistd.h>
#include <stdio.h> #include <stdio.h>
#include <fstream> #include <fstream>
#include <time.h>
//*********** //***********
//#define FIM_DEBUG 1 //#define FIM_DEBUG 1

View File

@ -36,6 +36,7 @@
#include <fstream> #include <fstream>
#include <sys/stat.h> #include <sys/stat.h>
#include <errno.h> #include <errno.h>
#include <time.h>
#include <openssl/sha.h> #include <openssl/sha.h>
#include <util/rsthreads.h> #include <util/rsthreads.h>

View File

@ -21,6 +21,8 @@
* *
*/ */
#include <time.h>
#include "dbase/fistore.h" #include "dbase/fistore.h"
#include "retroshare/rsexpr.h" #include "retroshare/rsexpr.h"
#include "retroshare/rsfiles.h" #include "retroshare/rsfiles.h"

View File

@ -62,6 +62,7 @@
#include "serialiser/rsconfigitems.h" #include "serialiser/rsconfigitems.h"
#include <stdio.h> #include <stdio.h>
#include <unistd.h> /* for (u)sleep() */ #include <unistd.h> /* for (u)sleep() */
#include <time.h>
/****** /******
* #define CONTROL_DEBUG 1 * #define CONTROL_DEBUG 1

View File

@ -36,6 +36,7 @@
#include "ft/ftsearch.h" #include "ft/ftsearch.h"
#include "util/rsdir.h" #include "util/rsdir.h"
#include <retroshare/rsturtle.h> #include <retroshare/rsturtle.h>
#include <time.h>
/* For Thread Behaviour */ /* For Thread Behaviour */
const uint32_t DMULTIPLEX_MIN = 10; /* 1ms sleep */ const uint32_t DMULTIPLEX_MIN = 10; /* 1ms sleep */

View File

@ -34,6 +34,7 @@
#include "util/rsdir.h" #include "util/rsdir.h"
#include <stdio.h> #include <stdio.h>
#include <unistd.h> /* for (u)sleep() */ #include <unistd.h> /* for (u)sleep() */
#include <time.h>
/****** /******
* #define DEBUG_ELIST 1 * #define DEBUG_ELIST 1

View File

@ -1,6 +1,7 @@
#include "ftfilecreator.h" #include "ftfilecreator.h"
#include <errno.h> #include <errno.h>
#include <stdio.h> #include <stdio.h>
#include <time.h>
#include <util/rsdiscspace.h> #include <util/rsdiscspace.h>
#include <util/rsdir.h> #include <util/rsdir.h>

View File

@ -8,6 +8,7 @@
#include "util/rsdir.h" #include "util/rsdir.h"
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include <time.h>
/******** /********
* #define DEBUG_FT_FILE_PROVIDER 1 * #define DEBUG_FT_FILE_PROVIDER 1

View File

@ -25,6 +25,7 @@
#include <unistd.h> /* for (u)sleep() */ #include <unistd.h> /* for (u)sleep() */
#include <iostream> #include <iostream>
#include <time.h>
#include "util/rsdebug.h" #include "util/rsdebug.h"
#include "util/rsdir.h" #include "util/rsdir.h"
#include "retroshare/rstypes.h" #include "retroshare/rstypes.h"

View File

@ -27,6 +27,8 @@
* #define FT_DEBUG 1 * #define FT_DEBUG 1
*****/ *****/
#include <time.h>
#include "retroshare/rsturtle.h" #include "retroshare/rsturtle.h"
#include "fttransfermodule.h" #include "fttransfermodule.h"

View File

@ -92,7 +92,7 @@ static void locking_function(int mode, int n, const char */*file*/, int /*line*/
*/ */
static unsigned long id_function(void) static unsigned long id_function(void)
{ {
#ifdef WINDOWS_SYS #if defined( WINDOWS_SYS) && !defined(WIN_PTHREADS_H)
return (unsigned long) pthread_self().p; return (unsigned long) pthread_self().p;
#else #else
return (unsigned long) pthread_self(); return (unsigned long) pthread_self();

View File

@ -27,6 +27,7 @@
#include <iomanip> #include <iomanip>
#include <stdio.h> #include <stdio.h>
#include <openssl/sha.h> #include <openssl/sha.h>
#include <time.h>
#include "pqi/p3dhtmgr.h" #include "pqi/p3dhtmgr.h"
#include "pqi/p3peermgr.h" #include "pqi/p3peermgr.h"

View File

@ -23,6 +23,8 @@
* *
*/ */
#include <time.h>
#include "p3historymgr.h" #include "p3historymgr.h"
#include "serialiser/rshistoryitems.h" #include "serialiser/rshistoryitems.h"
#include "serialiser/rsconfigitems.h" #include "serialiser/rsconfigitems.h"

View File

@ -23,6 +23,8 @@
* *
*/ */
#include <time.h>
#include "pqi/p3netmgr.h" #include "pqi/p3netmgr.h"
#include "pqi/p3peermgr.h" #include "pqi/p3peermgr.h"

View File

@ -28,6 +28,7 @@
#include "util/rsdebug.h" #include "util/rsdebug.h"
#include "util/rsstring.h" #include "util/rsstring.h"
#include <stdlib.h> #include <stdlib.h>
#include <time.h>
const int pqihandlerzone = 34283; const int pqihandlerzone = 34283;
static const int PQI_HANDLER_NB_PRIORITY_LEVELS = 10 ; static const int PQI_HANDLER_NB_PRIORITY_LEVELS = 10 ;

View File

@ -26,6 +26,7 @@
#include <iostream> #include <iostream>
#include <fstream> #include <fstream>
#include <time.h>
#include "util/rsdebug.h" #include "util/rsdebug.h"
#include "util/rsstring.h" #include "util/rsstring.h"

View File

@ -25,6 +25,7 @@
*/ */
#include <stdexcept> #include <stdexcept>
#include <time.h>
#include "serialiser/rsbaseserial.h" #include "serialiser/rsbaseserial.h"
#include "serialiser/rsmsgitems.h" #include "serialiser/rsmsgitems.h"
#include "serialiser/rstlvbase.h" #include "serialiser/rstlvbase.h"

View File

@ -25,6 +25,7 @@
#include <list> #include <list>
#include <string> #include <string>
#include <time.h>
//#include "serialiser/rsdsdvitems.h" //#include "serialiser/rsdsdvitems.h"
#include "services/p3dsdv.h" #include "services/p3dsdv.h"

View File

@ -28,6 +28,10 @@
#include "services/p3service.h" #include "services/p3service.h"
#include <iomanip> #include <iomanip>
#ifdef WINDOWS_SYS
#include <time.h>
#endif
/***** /*****
* #define SERV_DEBUG 1 * #define SERV_DEBUG 1
****/ ****/

View File

@ -31,6 +31,7 @@
#include <map> #include <map>
#include <list> #include <list>
#include <string> #include <string>
#include <time.h>
#include "pqi/p3linkmgr.h" #include "pqi/p3linkmgr.h"

View File

@ -32,6 +32,7 @@ static const int kInitStreamTable = 5;
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <time.h>
#include "udp/udpstack.h" #include "udp/udpstack.h"
#include "tcpstream.h" #include "tcpstream.h"

View File

@ -25,6 +25,7 @@
#include "udprelay.h" #include "udprelay.h"
#include <iostream> #include <iostream>
#include <time.h>
/* /*
* #define DEBUG_UDP_RELAY 1 * #define DEBUG_UDP_RELAY 1

View File

@ -25,6 +25,7 @@
#include "tcponudp/udpstunner.h" #include "tcponudp/udpstunner.h"
#include <iostream> #include <iostream>
#include <time.h>
#include "util/rsrandom.h" #include "util/rsrandom.h"
#include "util/rsprint.h" #include "util/rsprint.h"

View File

@ -13,6 +13,7 @@
#include <vector> #include <vector>
#include <algorithm> #include <algorithm>
#include <stdio.h> #include <stdio.h>
#include <time.h>
const time_t MAX_TIME_BEFORE_RETRY = 300 ; /* seconds before retrying an ip address */ const time_t MAX_TIME_BEFORE_RETRY = 300 ; /* seconds before retrying an ip address */
const time_t MAX_KEEP_DNS_ENTRY = 3600 ; /* seconds during which a DNS entry is considered valid */ const time_t MAX_KEEP_DNS_ENTRY = 3600 ; /* seconds during which a DNS entry is considered valid */

View File

@ -14,6 +14,7 @@
#include <vector> #include <vector>
#include <algorithm> #include <algorithm>
#include <stdio.h> #include <stdio.h>
#include <time.h>
const uint32_t MAX_IP_STORE = 300; /* seconds ip address timeout */ const uint32_t MAX_IP_STORE = 300; /* seconds ip address timeout */

View File

@ -29,6 +29,7 @@
#include <map> #include <map>
#include <stdio.h> #include <stdio.h>
#include <time.h>
const int RS_DEBUG_STDERR = 1; /* stuff goes to stderr */ const int RS_DEBUG_STDERR = 1; /* stuff goes to stderr */
const int RS_DEBUG_LOGFILE = 2; /* stuff goes to logfile */ const int RS_DEBUG_LOGFILE = 2; /* stuff goes to logfile */

View File

@ -25,6 +25,7 @@
#include <iostream> #include <iostream>
#include <stdexcept> #include <stdexcept>
#include <time.h>
#include "retroshare/rsfiles.h" #include "retroshare/rsfiles.h"
#include "retroshare/rsiface.h" #include "retroshare/rsiface.h"
#include "retroshare/rsinit.h" #include "retroshare/rsinit.h"
@ -32,6 +33,8 @@
#include <util/rsthreads.h> #include <util/rsthreads.h>
#ifndef WIN32 #ifndef WIN32
#include <sys/statvfs.h> #include <sys/statvfs.h>
#else
#include <wtypes.h>
#endif #endif
#define DELAY_BETWEEN_CHECKS 2 #define DELAY_BETWEEN_CHECKS 2

View File

@ -16,8 +16,13 @@ RsMutex RSRandom::rndMtx("RSRandom") ;
// have anyway) // have anyway)
// //
#ifdef WINDOWS_SYS #ifdef WINDOWS_SYS
#include <time.h>
#ifdef WIN_PTHREADS_H
static bool auto_seed = RSRandom::seed( (time(NULL) + ((uint32_t) pthread_self())*0x1293fe)^0x18e34a12 ) ;
#else
static bool auto_seed = RSRandom::seed( (time(NULL) + ((uint32_t) pthread_self().p)*0x1293fe)^0x18e34a12 ) ; static bool auto_seed = RSRandom::seed( (time(NULL) + ((uint32_t) pthread_self().p)*0x1293fe)^0x18e34a12 ) ;
#endif #endif
#endif
bool RSRandom::seed(uint32_t s) bool RSRandom::seed(uint32_t s)
{ {

View File

@ -28,8 +28,8 @@
#include <vector> #include <vector>
#include <stdarg.h> #include <stdarg.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdint.h>
#endif #endif
#include <stdint.h>
#include <stdio.h> #include <stdio.h>
namespace librs { namespace util { namespace librs { namespace util {

View File

@ -29,7 +29,7 @@
#include <unistd.h> /* for usleep() */ #include <unistd.h> /* for usleep() */
#include <errno.h> /* for usleep() */ #include <errno.h> /* for usleep() */
#include <iostream> #include <iostream>
#include <time.h>
#ifdef RSMUTEX_DEBUG #ifdef RSMUTEX_DEBUG
#include <stdio.h> #include <stdio.h>

View File

@ -18,6 +18,7 @@
***************************************************************************/ ***************************************************************************/
#include <iostream> #include <iostream>
#include <time.h>
#include <QStringList> #include <QStringList>
#include <QRegExp> #include <QRegExp>
#include <QApplication> #include <QApplication>