Skip to content

Commit 6acb461

Browse files
author
Glib Dzevo
committed
NO_REF: Fix compile issue with latest boost (thank to blackjackshellac).
1 parent 43a995a commit 6acb461

File tree

7 files changed

+28
-25
lines changed

7 files changed

+28
-25
lines changed

pCloudCC/control_tools.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,16 @@ enum command_ids_ {
3030
};
3131

3232

33-
int start_crypto(const char * pass) {
33+
void start_crypto(const char * pass) {
3434
int ret;
3535
char* errm;
3636
if (SendCall(STARTCRYPTO, pass, &ret, &errm))
3737
std::cout << "Start Crypto failed. return is " << ret<< " and message is "<<errm << std::endl;
3838
else
3939
std::cout << "Crypto started. "<< std::endl;
40-
free(errm);
40+
free(errm);
4141
}
42-
int stop_crypto(){
42+
void stop_crypto(){
4343
int ret;
4444
char* errm;
4545
if (SendCall(STOPCRYPTO, "", &ret, &errm))
@@ -48,7 +48,7 @@ int stop_crypto(){
4848
std::cout << "Crypto Stopped. "<< std::endl;
4949
free(errm);
5050
}
51-
int finalize(){
51+
void finalize(){
5252
int ret;
5353
char* errm;
5454
if (SendCall(FINALIZE, "", &ret, &errm))
@@ -77,7 +77,7 @@ void process_commands()
7777
}
7878
}
7979

80-
int daemonize(bool do_commands) {
80+
void daemonize(bool do_commands) {
8181
pid_t pid, sid;
8282

8383
pid = fork();
@@ -112,4 +112,4 @@ int daemonize(bool do_commands) {
112112

113113
}
114114

115-
}
115+
}

pCloudCC/control_tools.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@
2828
#ifndef CONTROL_TOOLS_H
2929
#define CONTROL_TOOLS_H
3030
namespace control_tools {
31-
int start_crypto(const char * pass);
32-
int stop_crypto();
33-
int finalize();
34-
int daemonize(bool do_commands);
31+
void start_crypto(const char * pass);
32+
void stop_crypto();
33+
void finalize();
34+
void daemonize(bool do_commands);
3535
void process_commands();
3636
}
3737

38-
#endif //CONTROL_TOOLS_H
38+
#endif //CONTROL_TOOLS_H

pCloudCC/lib/pclsync/pcompat.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,9 @@
9292

9393
#define P_OS_ID 7
9494

95+
#ifndef _GNU_SOURCE
9596
#define _GNU_SOURCE
97+
#endif
9698

9799
#else
98100

pCloudCC/lib/pclsync/pcompiler.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,23 +45,23 @@
4545
#endif
4646
#endif
4747

48-
#ifndef __has_builtin
48+
#ifndef PSYNC_HAS_BUILTIN
4949
#if defined(__GNUC__)
50-
#define __has_builtin(x) 1
50+
#define PSYNC_HAS_BUILTIN(x) 1
5151
#else
52-
#define __has_builtin(x) 0
52+
#define PSYNC_HAS_BUILTIN(x) 0
5353
#endif
5454
#endif
5555

56-
#if __has_builtin(__builtin_expect)
56+
#if PSYNC_HAS_BUILTIN(__builtin_expect)
5757
#define likely(expr) __builtin_expect(!!(expr), 1)
5858
#define unlikely(expr) __builtin_expect(!!(expr), 0)
5959
#else
6060
#define likely(expr) (expr)
6161
#define unlikely(expr) (expr)
6262
#endif
6363

64-
#if __has_builtin(__builtin_prefetch)
64+
#if PSYNC_HAS_BUILTIN(__builtin_prefetch)
6565
#define psync_prefetch(expr) __builtin_prefetch(expr)
6666
#elif defined(_MSC_VER)
6767
#define psync_prefetch(expr) _mm_prefetch((char *)(expr), _MM_HINT_T0)

pCloudCC/pclsync_lib.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,7 @@ int clib::pclsync_lib::statrt_crypto (const char* pass, void * rep) {
232232
int clib::pclsync_lib::stop_crypto (const char* path, void * rep) {
233233
psync_crypto_stop();
234234
get_lib().crypto_on_ = false;
235+
return 0;
235236
}
236237
int clib::pclsync_lib::finalize (const char* path, void * rep) {
237238
psync_destroy();
@@ -241,7 +242,7 @@ int clib::pclsync_lib::list_sync_folders (const char* path, void * rep) {
241242
psync_folder_list_t * folders = psync_get_sync_list();
242243
rep =psync_malloc(sizeof(folders));
243244
memcpy(rep, folders, sizeof(folders));
244-
245+
return 0;
245246
}
246247
static const std::string client_name = "Console Client v.2.1.0";
247248
int clib::pclsync_lib::init()//std::string& username, std::string& password, std::string* crypto_pass, int setup_crypto, int usesrypto_userpass)

pCloudCC/pclsync_lib_c.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ int init() {
1414
else return 0;
1515
}
1616

17-
int statrt_crypto (const char* pass) {
17+
void statrt_crypto (const char* pass) {
1818
cc::pclsync_lib::statrt_crypto (pass, NULL);
1919
}
20-
int stop_crypto () {
20+
void stop_crypto () {
2121
cc::pclsync_lib::stop_crypto (NULL, NULL);
2222
}
23-
int finalize () {
23+
void finalize () {
2424
cc::pclsync_lib::finalize(NULL, NULL);
2525
}
2626
void set_status_callback(status_callback_t c) {
@@ -47,4 +47,4 @@ int unlinklib() {
4747

4848
#ifdef __cplusplus
4949
}
50-
#endif
50+
#endif

pCloudCC/pclsync_lib_c.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ extern "C" {
1010
typedef void (*status_callback_t)(int status, const char * stat_string);
1111

1212
int init();
13-
int statrt_crypto (const char* pass);
14-
int stop_crypto ();
15-
int finalize ();
13+
void statrt_crypto (const char* pass);
14+
void stop_crypto ();
15+
void finalize ();
1616
char * get_token();
1717
void set_status_callback(status_callback_t);
1818
int logout();
@@ -21,4 +21,4 @@ extern "C" {
2121

2222
#ifdef __cplusplus
2323
};
24-
#endif
24+
#endif

0 commit comments

Comments
 (0)