Skip to content

Commit

Permalink
NO_REF: Fix compile issue with latest boost (thank to blackjackshellac).
Browse files Browse the repository at this point in the history
  • Loading branch information
Glib Dzevo committed May 8, 2019
1 parent 43a995a commit 5f1479a
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 28 deletions.
12 changes: 6 additions & 6 deletions pCloudCC/control_tools.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,16 @@ enum command_ids_ {
};


int start_crypto(const char * pass) {
void start_crypto(const char * pass) {
int ret;
char* errm;
if (SendCall(STARTCRYPTO, pass, &ret, &errm))
std::cout << "Start Crypto failed. return is " << ret<< " and message is "<<errm << std::endl;
else
std::cout << "Crypto started. "<< std::endl;
free(errm);
free(errm);
}
int stop_crypto(){
void stop_crypto(){
int ret;
char* errm;
if (SendCall(STOPCRYPTO, "", &ret, &errm))
Expand All @@ -48,7 +48,7 @@ int stop_crypto(){
std::cout << "Crypto Stopped. "<< std::endl;
free(errm);
}
int finalize(){
void finalize(){
int ret;
char* errm;
if (SendCall(FINALIZE, "", &ret, &errm))
Expand Down Expand Up @@ -77,7 +77,7 @@ void process_commands()
}
}

int daemonize(bool do_commands) {
void daemonize(bool do_commands) {
pid_t pid, sid;

pid = fork();
Expand Down Expand Up @@ -112,4 +112,4 @@ int daemonize(bool do_commands) {

}

}
}
10 changes: 5 additions & 5 deletions pCloudCC/control_tools.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@
#ifndef CONTROL_TOOLS_H
#define CONTROL_TOOLS_H
namespace control_tools {
int start_crypto(const char * pass);
int stop_crypto();
int finalize();
int daemonize(bool do_commands);
void start_crypto(const char * pass);
void stop_crypto();
void finalize();
void daemonize(bool do_commands);
void process_commands();
}

#endif //CONTROL_TOOLS_H
#endif //CONTROL_TOOLS_H
6 changes: 3 additions & 3 deletions pCloudCC/lib/pclsync/gitcommit.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#ifndef _GITCOMMIT_H
#define _GITCOMMIT_H

#define GIT_PREV_COMMIT_ID "6339ebce20a8b853dd78b80e075ab25e1f413f73"
#define GIT_PREV_COMMIT_DATE "2018-03-15 15:36:43 +0200"
#define GIT_COMMIT_DATE "2018-03-26 18:43:25 +0300"
#define GIT_PREV_COMMIT_ID "1850db4446c928a8b3078cc84057c2fe88e4cbbc"
#define GIT_PREV_COMMIT_DATE "2018-04-16 19:11:00 +0200"
#define GIT_COMMIT_DATE "2019-05-09 00:45:00 +0300"

#endif
2 changes: 2 additions & 0 deletions pCloudCC/lib/pclsync/pcompat.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@

#define P_OS_ID 7

#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif

#else

Expand Down
10 changes: 5 additions & 5 deletions pCloudCC/lib/pclsync/pcompiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,23 +45,23 @@
#endif
#endif

#ifndef __has_builtin
#ifndef PSYNC_HAS_BUILTIN
#if defined(__GNUC__)
#define __has_builtin(x) 1
#define PSYNC_HAS_BUILTIN(x) 1
#else
#define __has_builtin(x) 0
#define PSYNC_HAS_BUILTIN(x) 0
#endif
#endif

#if __has_builtin(__builtin_expect)
#if PSYNC_HAS_BUILTIN(__builtin_expect)
#define likely(expr) __builtin_expect(!!(expr), 1)
#define unlikely(expr) __builtin_expect(!!(expr), 0)
#else
#define likely(expr) (expr)
#define unlikely(expr) (expr)
#endif

#if __has_builtin(__builtin_prefetch)
#if PSYNC_HAS_BUILTIN(__builtin_prefetch)
#define psync_prefetch(expr) __builtin_prefetch(expr)
#elif defined(_MSC_VER)
#define psync_prefetch(expr) _mm_prefetch((char *)(expr), _MM_HINT_T0)
Expand Down
3 changes: 2 additions & 1 deletion pCloudCC/pclsync_lib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ int clib::pclsync_lib::statrt_crypto (const char* pass, void * rep) {
int clib::pclsync_lib::stop_crypto (const char* path, void * rep) {
psync_crypto_stop();
get_lib().crypto_on_ = false;
return 0;
}
int clib::pclsync_lib::finalize (const char* path, void * rep) {
psync_destroy();
Expand All @@ -241,7 +242,7 @@ int clib::pclsync_lib::list_sync_folders (const char* path, void * rep) {
psync_folder_list_t * folders = psync_get_sync_list();
rep =psync_malloc(sizeof(folders));
memcpy(rep, folders, sizeof(folders));

return 0;
}
static const std::string client_name = "Console Client v.2.1.0";
int clib::pclsync_lib::init()//std::string& username, std::string& password, std::string* crypto_pass, int setup_crypto, int usesrypto_userpass)
Expand Down
8 changes: 4 additions & 4 deletions pCloudCC/pclsync_lib_c.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ int init() {
else return 0;
}

int statrt_crypto (const char* pass) {
void statrt_crypto (const char* pass) {
cc::pclsync_lib::statrt_crypto (pass, NULL);
}
int stop_crypto () {
void stop_crypto () {
cc::pclsync_lib::stop_crypto (NULL, NULL);
}
int finalize () {
void finalize () {
cc::pclsync_lib::finalize(NULL, NULL);
}
void set_status_callback(status_callback_t c) {
Expand All @@ -47,4 +47,4 @@ int unlinklib() {

#ifdef __cplusplus
}
#endif
#endif
8 changes: 4 additions & 4 deletions pCloudCC/pclsync_lib_c.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ extern "C" {
typedef void (*status_callback_t)(int status, const char * stat_string);

int init();
int statrt_crypto (const char* pass);
int stop_crypto ();
int finalize ();
void statrt_crypto (const char* pass);
void stop_crypto ();
void finalize ();
char * get_token();
void set_status_callback(status_callback_t);
int logout();
Expand All @@ -21,4 +21,4 @@ extern "C" {

#ifdef __cplusplus
};
#endif
#endif

0 comments on commit 5f1479a

Please sign in to comment.