@@ -127,7 +127,7 @@ SVSemaphore::SVSemaphore() {
127
127
semaphore_ = CreateSemaphore (0 , 0 , 10 , 0 );
128
128
#elif defined(__APPLE__)
129
129
char name[50 ];
130
- snprintf (name, sizeof (name), " %d " , random ());
130
+ snprintf (name, sizeof (name), " %ld " , random ());
131
131
sem_unlink (name);
132
132
semaphore_ = sem_open (name, O_CREAT , S_IWUSR, 0 );
133
133
if (semaphore_ == SEM_FAILED) {
@@ -296,14 +296,11 @@ static std::string ScrollViewCommand(std::string scrollview_path) {
296
296
// this unnecessary.
297
297
// Also the path has to be separated by ; on windows and : otherwise.
298
298
#ifdef _WIN32
299
- const char * cmd_template = " -Djava.library.path=%s -cp %s/ScrollView.jar;"
300
- " %s/piccolo2d-core-3.0.jar:%s/piccolo2d-extras-3.0.jar"
301
- " com.google.scrollview.ScrollView" ;
299
+ const char * cmd_template = " -Djava.library.path=%s -jar %s/ScrollView.jar" ;
300
+
302
301
#else
303
302
const char * cmd_template = " -c \" trap 'kill %%1' 0 1 2 ; java "
304
- " -Xms1024m -Xmx2048m -Djava.library.path=%s -cp %s/ScrollView.jar:"
305
- " %s/piccolo2d-core-3.0.jar:%s/piccolo2d-extras-3.0.jar"
306
- " com.google.scrollview.ScrollView"
303
+ " -Xms1024m -Xmx2048m -jar %s/ScrollView.jar"
307
304
" & wait\" " ;
308
305
#endif
309
306
int cmdlen = strlen (cmd_template) + 4 *strlen (scrollview_path.c_str ()) + 1 ;
@@ -374,7 +371,7 @@ static int GetAddrInfo(const char* hostname, int port,
374
371
struct addrinfo ** address) {
375
372
#if defined(__linux__)
376
373
char port_str[40 ];
377
- snprintf (port_str, 40 , " %d " , port);
374
+ snprintf (port_str, 40 , " %ld " , port);
378
375
return getaddrinfo (hostname, port_str, NULL , address);
379
376
#else
380
377
return GetAddrInfoNonLinux (hostname, port, address);
0 commit comments