diff --git a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/fsync/4-1.c b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/fsync/4-1.c index b57a876524..87f51e9b3b 100644 --- a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/fsync/4-1.c +++ b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/fsync/4-1.c @@ -34,8 +34,8 @@ int main() int total_size = 1024; int fd; - snprintf(tmpfname, sizeof(tmpfname), "/tmp/pts_fsync_4_1_%d", - getpid()); + snprintf(tmpfname, sizeof(tmpfname), "/tmp/pts_fsync_4_1_%ld", + (long)getpid()); unlink(tmpfname); fd = open(tmpfname, O_CREAT | O_RDWR | O_EXCL, S_IRUSR | S_IWUSR); diff --git a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/1-1.c b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/1-1.c index b06c6ca6d9..623f1ffdf2 100644 --- a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/1-1.c +++ b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/1-1.c @@ -45,8 +45,8 @@ int main() char * ch; data = (char *) malloc(total_size); - snprintf(tmpfname, sizeof(tmpfname), "/tmp/pts_mmap_1_1_%d", - getpid()); + snprintf(tmpfname, sizeof(tmpfname), "/tmp/pts_mmap_1_1_%ld", + (long)getpid()); unlink(tmpfname); fd = open(tmpfname, O_CREAT | O_RDWR | O_EXCL, S_IRUSR | S_IWUSR); diff --git a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/1-2.c b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/1-2.c index 482765012f..a18d14c192 100644 --- a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/1-2.c +++ b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/1-2.c @@ -37,8 +37,8 @@ int main() int fd; off_t off = 0; - snprintf(tmpfname, sizeof(tmpfname), "pts_mmap_1_2_%d", - getpid()); + snprintf(tmpfname, sizeof(tmpfname), "pts_mmap_1_2_%ld", + (long)getpid()); /* Create shared object */ shm_unlink(tmpfname); diff --git a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/10-1.c b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/10-1.c index ae651d51e3..c251670a76 100644 --- a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/10-1.c +++ b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/10-1.c @@ -51,8 +51,8 @@ int main() total_size = 1024; size = total_size; - snprintf(tmpfname, sizeof(tmpfname), "/tmp/pts_mmap_10_1_%d", - getpid()); + snprintf(tmpfname, sizeof(tmpfname), "/tmp/pts_mmap_10_1_%ld", + (long)getpid()); unlink(tmpfname); fd = open(tmpfname, O_CREAT | O_RDWR | O_EXCL, S_IRUSR | S_IWUSR); diff --git a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/11-1.c b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/11-1.c index ed184a1759..cffc9d7ce3 100644 --- a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/11-1.c +++ b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/11-1.c @@ -54,8 +54,8 @@ int main() total_size = 3 * page_size; size = page_size; - snprintf(tmpfname, sizeof(tmpfname), "/tmp/pts_mmap_11_1_%d", - getpid()); + snprintf(tmpfname, sizeof(tmpfname), "/tmp/pts_mmap_11_1_%ld", + (long)getpid()); unlink(tmpfname); fd = open(tmpfname, O_CREAT | O_RDWR | O_EXCL, S_IRUSR | S_IWUSR); diff --git a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/11-2.c b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/11-2.c index 4ea16becea..ed945748e5 100644 --- a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/11-2.c +++ b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/11-2.c @@ -72,8 +72,8 @@ int main() sigaction(SIGBUS, &sa, NULL); /* Create tmp file */ - snprintf(tmpfname, sizeof(tmpfname), "/tmp/pts_mmap_11_2_%d", - getpid()); + snprintf(tmpfname, sizeof(tmpfname), "/tmp/pts_mmap_11_2_%ld", + (long)getpid()); unlink(tmpfname); fd = open(tmpfname, O_CREAT | O_RDWR | O_EXCL, S_IRUSR | S_IWUSR); diff --git a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/11-3.c b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/11-3.c index 7b3d26fc3c..b0a1c9b986 100644 --- a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/11-3.c +++ b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/11-3.c @@ -73,8 +73,8 @@ int main() sa.sa_handler = sigbus_handler; sigaction(SIGBUS, &sa, NULL); - snprintf(tmpfname, sizeof(tmpfname), "pts_mmap_11_3_%d", - getpid()); + snprintf(tmpfname, sizeof(tmpfname), "pts_mmap_11_3_%ld", + (long)getpid()); /* Create shared object */ shm_unlink(tmpfname); fd = shm_open(tmpfname, O_RDWR|O_CREAT|O_EXCL, S_IRUSR|S_IWUSR); diff --git a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/11-4.c b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/11-4.c index 0fc5dfe0af..3b4492669f 100644 --- a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/11-4.c +++ b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/11-4.c @@ -69,8 +69,8 @@ int main() /* mmap will create a partial page */ len = page_size / 2; - snprintf(tmpfname, sizeof(tmpfname), "/tmp/pts_mmap_11_5_%d", - getpid()); + snprintf(tmpfname, sizeof(tmpfname), "/tmp/pts_mmap_11_5_%ld", + (long)getpid()); child = fork(); if (child == 0) { diff --git a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/11-5.c b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/11-5.c index 2925b11edd..a8f04659ad 100644 --- a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/11-5.c +++ b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/11-5.c @@ -69,8 +69,8 @@ int main() /* mmap will create a partial page */ len = page_size / 2; - snprintf(tmpfname, sizeof(tmpfname), "pts_mmap_11_5_%d", - getpid()); + snprintf(tmpfname, sizeof(tmpfname), "pts_mmap_11_5_%ld", + (long)getpid()); child = fork(); if (child == 0) { diff --git a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/12-1.c b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/12-1.c index 483515f237..3880b6b053 100644 --- a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/12-1.c +++ b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/12-1.c @@ -52,8 +52,8 @@ int main() total_size = 1024; size = total_size; - snprintf(tmpfname, sizeof(tmpfname), "/tmp/pts_mmap_12_1_%d", - getpid()); + snprintf(tmpfname, sizeof(tmpfname), "/tmp/pts_mmap_12_1_%ld", + (long)getpid()); unlink(tmpfname); fd = open(tmpfname, O_CREAT | O_RDWR | O_EXCL, S_IRUSR | S_IWUSR); diff --git a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/13-1.c b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/13-1.c index 18578b6753..6393d01514 100644 --- a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/13-1.c +++ b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/13-1.c @@ -59,8 +59,8 @@ int main() char *ch; - snprintf(tmpfname, sizeof(tmpfname), "/tmp/pts_mmap_13_1_%d", - getpid()); + snprintf(tmpfname, sizeof(tmpfname), "/tmp/pts_mmap_13_1_%ld", + (long)getpid()); unlink(tmpfname); fd = open(tmpfname, O_CREAT | O_RDWR | O_EXCL, S_IRUSR | S_IWUSR); diff --git a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/14-1.c b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/14-1.c index d0ded03d6e..e790a79a6f 100644 --- a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/14-1.c +++ b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/14-1.c @@ -54,8 +54,8 @@ int main() char *ch; - snprintf(tmpfname, sizeof(tmpfname), "/tmp/pts_mmap_14_1_%d", - getpid()); + snprintf(tmpfname, sizeof(tmpfname), "/tmp/pts_mmap_14_1_%ld", + (long)getpid()); unlink(tmpfname); fd = open(tmpfname, O_CREAT | O_RDWR | O_EXCL, S_IRUSR | S_IWUSR); diff --git a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/18-1.c b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/18-1.c index b65b90ae7d..1489e7c1c7 100644 --- a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/18-1.c +++ b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/18-1.c @@ -75,8 +75,8 @@ int main() return PTS_UNRESOLVED; } - snprintf(tmpfname, sizeof(tmpfname), "pts_mmap_18_1_%d", - getpid()); + snprintf(tmpfname, sizeof(tmpfname), "pts_mmap_18_1_%ld", + (long)getpid()); /* Create shared object */ shm_unlink(tmpfname); diff --git a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/21-1.c b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/21-1.c index d0ba52c27d..36032b257d 100644 --- a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/21-1.c +++ b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/21-1.c @@ -44,8 +44,8 @@ int main() total_size = 1024; size = total_size; - snprintf(tmpfname, sizeof(tmpfname), "/tmp/pts_mmap_21_1_%d", - getpid()); + snprintf(tmpfname, sizeof(tmpfname), "/tmp/pts_mmap_21_1_%ld", + (long)getpid()); unlink(tmpfname); fd = open(tmpfname, O_CREAT | O_RDWR | O_EXCL, S_IRUSR | S_IWUSR); diff --git a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/24-1.c b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/24-1.c index 9f0d0ec3af..55f706af89 100644 --- a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/24-1.c +++ b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/24-1.c @@ -51,8 +51,8 @@ int main() size_t mapped_size = 0; - snprintf(tmpfname, sizeof(tmpfname), "pts_mmap_25_1_%d", - getpid()); + snprintf(tmpfname, sizeof(tmpfname), "pts_mmap_25_1_%ld", + (long)getpid()); /* Create shared object */ shm_unlink(tmpfname); diff --git a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/27-1.c b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/27-1.c index 1a8e1d37b2..ac8ae8a901 100644 --- a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/27-1.c +++ b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/27-1.c @@ -62,8 +62,8 @@ int main() #endif data = (char *) malloc(total_size); - snprintf(tmpfname, sizeof(tmpfname), "/tmp/pts_mmap_27_1_%d", - getpid()); + snprintf(tmpfname, sizeof(tmpfname), "/tmp/pts_mmap_27_1_%ld", + (long)getpid()); unlink(tmpfname); fd = open(tmpfname, O_CREAT | O_RDWR | O_EXCL, S_IRUSR | S_IWUSR); diff --git a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/28-1.c b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/28-1.c index c19b0bbb40..bef85b4a96 100644 --- a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/28-1.c +++ b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/28-1.c @@ -62,8 +62,8 @@ int main() return PTS_UNRESOLVED; } - snprintf(tmpfname, sizeof(tmpfname), "pts_mmap_28_1_%d", - getpid()); + snprintf(tmpfname, sizeof(tmpfname), "pts_mmap_28_1_%ld", + (long)getpid()); /* Create shared object */ shm_unlink(tmpfname); shm_fd = shm_open(tmpfname, O_RDWR|O_CREAT|O_EXCL, S_IRUSR|S_IWUSR); diff --git a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/3-1.c b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/3-1.c index 3818592ed4..4eda8331bb 100644 --- a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/3-1.c +++ b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/3-1.c @@ -73,10 +73,10 @@ int main() /* Size of the file */ total_size = 2 * page_size; - snprintf(tmpfname, sizeof(tmpfname), "/tmp/pts_mmap_3_1_%d", - getpid()); - snprintf(tmpfname2, sizeof(tmpfname2), "/tmp/pts_mmap_3_1_2_%d", - getpid()); + snprintf(tmpfname, sizeof(tmpfname), "/tmp/pts_mmap_3_1_%ld", + (long)getpid()); + snprintf(tmpfname2, sizeof(tmpfname2), "/tmp/pts_mmap_3_1_2_%ld", + (long)getpid()); data = (char *) malloc(total_size); unlink(tmpfname); unlink(tmpfname2); diff --git a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/31-1.c b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/31-1.c index 3c660c0118..2486b0d7e2 100644 --- a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/31-1.c +++ b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/31-1.c @@ -52,8 +52,8 @@ int main() long page_size = sysconf(_SC_PAGE_SIZE); - snprintf(tmpfname, sizeof(tmpfname), "/tmp/pts_mmap_31_1_%d", - getpid()); + snprintf(tmpfname, sizeof(tmpfname), "/tmp/pts_mmap_31_1_%ld", + (long)getpid()); unlink(tmpfname); fd = open(tmpfname, O_CREAT | O_RDWR | O_EXCL, S_IRUSR | S_IWUSR); diff --git a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/5-1.c b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/5-1.c index 4228fd9b6a..c5773edb0e 100644 --- a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/5-1.c +++ b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/5-1.c @@ -48,8 +48,8 @@ int main() int prot; off_t off = 0; - snprintf(tmpfname, sizeof(tmpfname), "/tmp/pts_mmap_5_1_%d", - getpid()); + snprintf(tmpfname, sizeof(tmpfname), "/tmp/pts_mmap_5_1_%ld", + (long)getpid()); unlink(tmpfname); fd = open(tmpfname, O_CREAT | O_RDWR | O_EXCL, S_IRUSR | S_IWUSR); diff --git a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/6-4.c b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/6-4.c index c8384c4e78..09b692e050 100644 --- a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/6-4.c +++ b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/6-4.c @@ -46,8 +46,8 @@ int main() off_t off = 0; int prot; - snprintf(tmpfname, sizeof(tmpfname), "/tmp/pts_mmap_6_4_%d", - getpid()); + snprintf(tmpfname, sizeof(tmpfname), "/tmp/pts_mmap_6_4_%ld", + (long)getpid()); /* Create a tmp file, set the content as 'a' */ unlink(tmpfname); diff --git a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/6-5.c b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/6-5.c index 097e026c3a..dd6ad557c3 100644 --- a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/6-5.c +++ b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/6-5.c @@ -48,8 +48,8 @@ int main() /* Create the file */ - snprintf(tmpfname, sizeof(tmpfname), "/tmp/pts_mmap_6_5_%d", - getpid()); + snprintf(tmpfname, sizeof(tmpfname), "/tmp/pts_mmap_6_5_%ld", + (long)getpid()); unlink(tmpfname); fd = open(tmpfname, O_CREAT | O_RDWR | O_EXCL, S_IRUSR | S_IWUSR); diff --git a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/6-6.c b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/6-6.c index debd1867ee..fe43c4201a 100644 --- a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/6-6.c +++ b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/6-6.c @@ -46,8 +46,8 @@ int main() int prot; /* Create the tmp file */ - snprintf(tmpfname, sizeof(tmpfname), "/tmp/pts_mmap_6_6_%d", - getpid()); + snprintf(tmpfname, sizeof(tmpfname), "/tmp/pts_mmap_6_6_%ld", + (long)getpid()); unlink(tmpfname); fd = open(tmpfname, O_CREAT | O_RDWR | O_EXCL, S_IRUSR | S_IWUSR); diff --git a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/7-1.c b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/7-1.c index 7938f5f7ae..d08e5118a8 100644 --- a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/7-1.c +++ b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/7-1.c @@ -58,8 +58,8 @@ int main() char * ch; - snprintf(tmpfname, sizeof(tmpfname), "/tmp/pts_mmap_7_1_%d", - getpid()); + snprintf(tmpfname, sizeof(tmpfname), "/tmp/pts_mmap_7_1_%ld", + (long)getpid()); unlink(tmpfname); fd = open(tmpfname, O_CREAT | O_RDWR | O_EXCL, S_IRUSR | S_IWUSR); diff --git a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/7-2.c b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/7-2.c index bd294d95e2..63a76c495d 100644 --- a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/7-2.c +++ b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/7-2.c @@ -58,8 +58,8 @@ int main() char * ch; - snprintf(tmpfname, sizeof(tmpfname), "/tmp/pts_mmap_7_2_%d", - getpid()); + snprintf(tmpfname, sizeof(tmpfname), "/tmp/pts_mmap_7_2_%ld", + (long)getpid()); unlink(tmpfname); fd = open(tmpfname, O_CREAT | O_RDWR | O_EXCL, S_IRUSR | S_IWUSR); diff --git a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/7-3.c b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/7-3.c index 5f5b8df79d..e7ce26fea7 100644 --- a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/7-3.c +++ b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/7-3.c @@ -60,8 +60,8 @@ int main() int exit_stat; /* Create shared object */ - snprintf(tmpfname, sizeof(tmpfname), "pts_mmap_7_3_%d", - getpid()); + snprintf(tmpfname, sizeof(tmpfname), "pts_mmap_7_3_%ld", + (long)getpid()); shm_unlink(tmpfname); shm_fd = shm_open(tmpfname, O_RDWR|O_CREAT|O_EXCL, S_IRUSR|S_IWUSR); if(shm_fd == -1) diff --git a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/7-4.c b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/7-4.c index 4e31899d97..ed96c0fd69 100644 --- a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/7-4.c +++ b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/7-4.c @@ -60,8 +60,8 @@ int main() int exit_stat; /* Create shared object */ - snprintf(tmpfname, sizeof(tmpfname), "pts_mmap_7_4_%d", - getpid()); + snprintf(tmpfname, sizeof(tmpfname), "pts_mmap_7_4_%ld", + (long)getpid()); shm_unlink(tmpfname); shm_fd = shm_open(tmpfname, O_RDWR|O_CREAT|O_EXCL, S_IRUSR|S_IWUSR); if(shm_fd == -1) diff --git a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/9-1.c b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/9-1.c index 1138c9eb1e..2534d47029 100644 --- a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/9-1.c +++ b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/mmap/9-1.c @@ -54,8 +54,8 @@ int main() /* Create tmp file */ - snprintf(tmpfname, sizeof(tmpfname), "/tmp/pts_mmap_9_1_%d", - getpid()); + snprintf(tmpfname, sizeof(tmpfname), "/tmp/pts_mmap_9_1_%ld", + (long)getpid()); unlink(tmpfname); fd = open(tmpfname, O_CREAT | O_RDWR | O_EXCL, S_IRUSR | S_IWUSR); diff --git a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_close/1-1.c b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_close/1-1.c index 63f1c5d258..63d981689e 100644 --- a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_close/1-1.c +++ b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_close/1-1.c @@ -30,7 +30,7 @@ int main() sem_t *mysemp; char semname[20]; - sprintf(semname, "/" FUNCTION "_" TEST "_%d", getpid()); + sprintf(semname, "/" FUNCTION "_" TEST "_%ld", (long)getpid()); mysemp = sem_open(semname, O_CREAT, 0700, 1) ; if (mysemp == SEM_FAILED) { diff --git a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_close/2-1.c b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_close/2-1.c index 0145b3a5c3..1b56c6807d 100644 --- a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_close/2-1.c +++ b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_close/2-1.c @@ -30,7 +30,7 @@ int main() sem_t *mysemp; char semname[20]; - sprintf(semname, "/" FUNCTION "_" TEST "_%d", getpid()); + sprintf(semname, "/" FUNCTION "_" TEST "_%ld", (long)getpid()); mysemp = sem_open(semname, O_CREAT, 0777, 1); diff --git a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_close/3-1.c b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_close/3-1.c index 38238af762..29773fc5c6 100644 --- a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_close/3-1.c +++ b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_close/3-1.c @@ -32,7 +32,7 @@ int main() sem_t *mysemp; char semname[20]; - sprintf(semname, "/" FUNCTION "_" TEST "_%d", getpid()); + sprintf(semname, "/" FUNCTION "_" TEST "_%ld", (long)getpid()); mysemp = sem_open(semname, O_CREAT, 0444, 1) ; if (mysemp == SEM_FAILED) { diff --git a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_getvalue/1-1.c b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_getvalue/1-1.c index 1b7b9d17fd..7fd17df079 100644 --- a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_getvalue/1-1.c +++ b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_getvalue/1-1.c @@ -33,7 +33,7 @@ int main() { sem_t *mysemp; int val; - sprintf(semname, "/" FUNCTION "_" TEST "_%d", getpid()); + sprintf(semname, "/" FUNCTION "_" TEST "_%ld", (long)getpid()); mysemp = sem_open(semname, O_CREAT, 0777, 1); diff --git a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_getvalue/2-1.c b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_getvalue/2-1.c index c0291182bd..86ee52feca 100644 --- a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_getvalue/2-1.c +++ b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_getvalue/2-1.c @@ -30,7 +30,7 @@ int main() { sem_t *mysemp; int val; - sprintf(semname, "/" FUNCTION "_" TEST "_%d", getpid()); + sprintf(semname, "/" FUNCTION "_" TEST "_%ld", (long)getpid()); mysemp = sem_open(semname, O_CREAT, 0777, 1); diff --git a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_getvalue/4-1.c b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_getvalue/4-1.c index 19208571f8..f27b3a4318 100644 --- a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_getvalue/4-1.c +++ b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_getvalue/4-1.c @@ -32,7 +32,7 @@ int main() { sem_t *mysemp; int val; - sprintf(semname, "/" FUNCTION "_" TEST "_%d", getpid()); + sprintf(semname, "/" FUNCTION "_" TEST "_%ld", (long)getpid()); mysemp = sem_open(semname, O_CREAT, 0777, 1); diff --git a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_getvalue/5-1.c b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_getvalue/5-1.c index c77b19cdc2..837f34c899 100644 --- a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_getvalue/5-1.c +++ b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_getvalue/5-1.c @@ -31,7 +31,7 @@ int main() { sem_t *mysemp; int val; - sprintf(semname, "/" FUNCTION "_" TEST "_%d", getpid()); + sprintf(semname, "/" FUNCTION "_" TEST "_%ld", (long)getpid()); mysemp = sem_open(semname, O_CREAT, 0777, 4); diff --git a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_open/1-1.c b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_open/1-1.c index b9f98c0900..7179276b04 100644 --- a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_open/1-1.c +++ b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_open/1-1.c @@ -30,7 +30,7 @@ int main() sem_t *mysemp; char semname[50]; - sprintf(semname, "/" FUNCTION "_" TEST "_%d", getpid()); + sprintf(semname, "/" FUNCTION "_" TEST "_%ld", (long)getpid()); mysemp = sem_open(semname, O_CREAT, 0777, 1); diff --git a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_open/1-2.c b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_open/1-2.c index cb54292a70..0aa01f0542 100644 --- a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_open/1-2.c +++ b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_open/1-2.c @@ -30,7 +30,7 @@ int main() sem_t *mysemp; char semname[50]; - sprintf(semname, "/" FUNCTION "_" TEST "_%d", getpid()); + sprintf(semname, "/" FUNCTION "_" TEST "_%ld", (long)getpid()); mysemp = sem_open(semname, O_CREAT, 0777, 1); diff --git a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_open/1-3.c b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_open/1-3.c index d11bf5aa86..eacddb5e06 100644 --- a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_open/1-3.c +++ b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_open/1-3.c @@ -31,7 +31,7 @@ int main() char semname[50]; int lock_status; - sprintf(semname, "/" FUNCTION "_" TEST "_%d", getpid()); + sprintf(semname, "/" FUNCTION "_" TEST "_%ld", (long)getpid()); mysemp = sem_open(semname, O_CREAT, 0777, 1); if( mysemp == SEM_FAILED || mysemp == NULL ) { diff --git a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_open/1-4.c b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_open/1-4.c index fb29038114..143f64a6ab 100644 --- a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_open/1-4.c +++ b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_open/1-4.c @@ -30,7 +30,7 @@ int main() sem_t *mysemp; char semname[20]; - sprintf(semname, "/" FUNCTION "_" TEST "_%d", getpid()); + sprintf(semname, "/" FUNCTION "_" TEST "_%ld", (long)getpid()); mysemp = sem_open(semname, O_CREAT, 0777, 1); if( mysemp == SEM_FAILED || mysemp == NULL ) { diff --git a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_open/10-1.c b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_open/10-1.c index 949bf106d6..e0f5af9aa4 100644 --- a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_open/10-1.c +++ b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_open/10-1.c @@ -32,7 +32,7 @@ int main() char semname[50]; int val; - sprintf(semname, "/" FUNCTION "_" TEST "_%d", getpid()); + sprintf(semname, "/" FUNCTION "_" TEST "_%ld", (long)getpid()); mysemp = sem_open(semname, O_CREAT, 0777, 5); if ( mysemp == SEM_FAILED ) { diff --git a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_open/2-1.c b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_open/2-1.c index d0b5817e36..aa3a87cf37 100644 --- a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_open/2-1.c +++ b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_open/2-1.c @@ -32,7 +32,7 @@ int main() sem_t *mysemp; char semname[50]; - sprintf(semname, "/" FUNCTION "_" TEST "_%d", getpid()); + sprintf(semname, "/" FUNCTION "_" TEST "_%ld", (long)getpid()); mysemp = sem_open(semname, O_CREAT, 0777, 0); if ( mysemp == SEM_FAILED ) { diff --git a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_open/2-2.c b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_open/2-2.c index bbd6e4d604..6af639cd65 100644 --- a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_open/2-2.c +++ b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_open/2-2.c @@ -31,7 +31,7 @@ int main() sem_t *mysemp; char semname[50]; - sprintf(semname, "/" FUNCTION "_" TEST "_%d", getpid()); + sprintf(semname, "/" FUNCTION "_" TEST "_%ld", (long)getpid()); mysemp = sem_open(semname, O_CREAT|O_EXCL, 0777, 1); diff --git a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_open/3-1.c b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_open/3-1.c index 8a3e02e1c5..eb8bad43e5 100644 --- a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_open/3-1.c +++ b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_open/3-1.c @@ -71,7 +71,7 @@ int main() } } - sprintf(semname, "/" FUNCTION "_" TEST "_%d", getpid()); + sprintf(semname, "/" FUNCTION "_" TEST "_%ld", (long)getpid()); /*Trying to open the first Sem with read mode */ mysemp = sem_open(semname, O_CREAT, 0444, 1); diff --git a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_open/4-1.c b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_open/4-1.c index 321960a8aa..01fd5686ec 100644 --- a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_open/4-1.c +++ b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_open/4-1.c @@ -31,7 +31,7 @@ int main() sem_t *mysemp; char semname[50]; - sprintf(semname, "/" FUNCTION "_" TEST "_%d", getpid()); + sprintf(semname, "/" FUNCTION "_" TEST "_%ld", (long)getpid()); /*Trying to open the first Sem */ mysemp = sem_open(semname, O_CREAT, 0444, 1); diff --git a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_open/6-1.c b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_open/6-1.c index 6775e08291..306b791dc0 100644 --- a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_open/6-1.c +++ b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_open/6-1.c @@ -29,7 +29,7 @@ int main() char semname[50]; - sprintf(semname, "/" FUNCTION "_" TEST "_%d", getpid()); + sprintf(semname, "/" FUNCTION "_" TEST "_%ld", (long)getpid()); mysemp = sem_open(semname, 0); diff --git a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_post/1-1.c b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_post/1-1.c index b8a80d1fd4..0a3ddae1f9 100644 --- a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_post/1-1.c +++ b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_post/1-1.c @@ -32,7 +32,7 @@ int main() { char semname[20]; int val; - sprintf(semname, "/" FUNCTION "_" TEST "_%d", getpid()); + sprintf(semname, "/" FUNCTION "_" TEST "_%ld", (long)getpid()); /* Initial value of Semaphore is 0 */ mysemp = sem_open(semname, O_CREAT, 0777, 0); diff --git a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_post/1-2.c b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_post/1-2.c index a6695a5c24..2b637d1058 100644 --- a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_post/1-2.c +++ b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_post/1-2.c @@ -32,7 +32,7 @@ int main() { char semname[20]; int val; - sprintf(semname, "/" FUNCTION "_" TEST "_%d", getpid()); + sprintf(semname, "/" FUNCTION "_" TEST "_%ld", (long)getpid()); /* Initial value of Semaphore is unlocked */ mysemp = sem_open(semname, O_CREAT, 0777, 2); diff --git a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_post/2-1.c b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_post/2-1.c index 13a45d3ca6..3a0883e704 100644 --- a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_post/2-1.c +++ b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_post/2-1.c @@ -31,7 +31,7 @@ int main() { sem_t *mysemp; char semname[20]; - sprintf(semname, "/" FUNCTION "_" TEST "_%d", getpid()); + sprintf(semname, "/" FUNCTION "_" TEST "_%ld", (long)getpid()); /* Initial value of Semaphore is 0 */ mysemp = sem_open(semname, O_CREAT, 0777, 1); diff --git a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_post/4-1.c b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_post/4-1.c index bf22f93e48..ebfc3be596 100644 --- a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_post/4-1.c +++ b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_post/4-1.c @@ -30,7 +30,7 @@ int main() { sem_t *mysemp; char semname[20]; - sprintf(semname, "/" FUNCTION "_" TEST "_%d", getpid()); + sprintf(semname, "/" FUNCTION "_" TEST "_%ld", (long)getpid()); /* Initial value of Semaphore is 0 */ mysemp = sem_open(semname, O_CREAT, 0777, 0); diff --git a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_post/5-1.c b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_post/5-1.c index ae80d0d7a1..6f7871b5e2 100644 --- a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_post/5-1.c +++ b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_post/5-1.c @@ -46,7 +46,7 @@ int main() { char semname[20]; int val; - sprintf(semname, "/" FUNCTION "_" TEST "_%d", getpid()); + sprintf(semname, "/" FUNCTION "_" TEST "_%ld", (long)getpid()); gsemp = sem_open(semname, O_CREAT, 0777, SEMINITVAL); if( gsemp == SEM_FAILED || gsemp == NULL ) { diff --git a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_post/6-1.c b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_post/6-1.c index f4ca2d3539..5aed51eb95 100644 --- a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_post/6-1.c +++ b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_post/6-1.c @@ -49,7 +49,7 @@ int main() { struct sigaction act; int val; - sprintf(semname, "/" FUNCTION "_" TEST "_%d", getpid()); + sprintf(semname, "/" FUNCTION "_" TEST "_%ld", (long)getpid()); gsemp = sem_open(semname, O_CREAT, 0777, SEMINITVAL); diff --git a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_post/8-1.c b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_post/8-1.c index d94536de93..ca3b729d7e 100644 --- a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_post/8-1.c +++ b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_post/8-1.c @@ -117,7 +117,7 @@ int main() int retval = PTS_UNRESOLVED; int status; - snprintf(semname, 20, "/" TEST "_%d", getpid()); + snprintf(semname, 20, "/" TEST "_%ld", (long)getpid()); /* Initial value of Semaphore is 1 */ sem = sem_open(semname, O_CREAT, 0777, 1); if( sem == SEM_FAILED || sem == NULL ) { @@ -125,7 +125,7 @@ int main() return PTS_UNRESOLVED; } - snprintf(semname_1, 20, "/" TEST "_%d_1", getpid()); + snprintf(semname_1, 20, "/" TEST "_%ld_1", (long)getpid()); sem_1 = sem_open(semname_1, O_CREAT, 0777, val); if( sem_1 == SEM_FAILED || sem_1 == NULL ) { perror(ERROR_PREFIX "sem_open: sem_1"); @@ -159,7 +159,7 @@ int main() retval = PTS_UNRESOLVED; goto clean_up; } - fprintf(stderr, "P: child_1:%d forked\n", c_1); + fprintf(stderr, "P: child_1:%ld forked\n", (long)c_1); sleep(1); c_2 = fork(); @@ -174,7 +174,7 @@ int main() retval = PTS_UNRESOLVED; goto clean_up; } - fprintf(stderr, "P: child_2: %d forked\n", c_2); + fprintf(stderr, "P: child_2: %ld forked\n", (long)c_2); /* Make sure the two children has been waiting */ /*do { @@ -189,7 +189,7 @@ int main() /* Child 3 */ child_fn(priority - 1, 3); } - fprintf(stderr, "P: child_3: %d forked\n", c_3); + fprintf(stderr, "P: child_3: %ld forked\n", (long)c_3); /* Make sure child 3 has been waiting for the lock */ /*do { @@ -221,15 +221,15 @@ int main() retval = PTS_PASS; goto clean_up; } - printf("Test Fail: Expect child_1: %d, got %d\n", - c_1, ret_pid); + printf("Test Fail: Expect child_1: %ld, got %ld\n", + (long)c_1, (long)ret_pid); retval = PTS_FAIL; goto clean_up; } else { - printf("Test Fail: Expect child_3: %d, got %d\n", - c_3, ret_pid); + printf("Test Fail: Expect child_3: %ld, got %ld\n", + (long)c_3, (long)ret_pid); retval = PTS_FAIL; sem_post(sem); while((wait(NULL) > 0)); @@ -238,8 +238,8 @@ int main() } else { - printf("Test Fail: Expect child_2: %d, got %d\n", - c_2, ret_pid); + printf("Test Fail: Expect child_2: %ld, got %ld\n", + (long)c_2, (long)ret_pid); retval = PTS_FAIL; sem_post(sem); sem_post(sem); diff --git a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_unlink/1-1.c b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_unlink/1-1.c index 9db5150f7c..9924a4c7f5 100644 --- a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_unlink/1-1.c +++ b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_unlink/1-1.c @@ -31,7 +31,7 @@ int main() { sem_t *mysemp; char semname[20]; - sprintf(semname, "/" FUNCTION "_" TEST "_%d", getpid()); + sprintf(semname, "/" FUNCTION "_" TEST "_%ld", (long)getpid()); /* Initial value of Semaphore is 1 */ mysemp = sem_open(semname, O_CREAT,0,1); diff --git a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_unlink/2-1.c b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_unlink/2-1.c index 33f36aab38..d83ea7608b 100644 --- a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_unlink/2-1.c +++ b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_unlink/2-1.c @@ -31,7 +31,7 @@ int main() { sem_t *mysemp; char semname[20]; - sprintf(semname, "/" FUNCTION "_" TEST "_%d", getpid()); + sprintf(semname, "/" FUNCTION "_" TEST "_%ld", (long)getpid()); /* Initial value of Semaphore is 1 */ mysemp = sem_open(semname, O_CREAT,0,1); diff --git a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_wait/1-1.c b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_wait/1-1.c index 0b5ca0609d..8d041d732c 100644 --- a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_wait/1-1.c +++ b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_wait/1-1.c @@ -32,7 +32,7 @@ int main() { char semname[20]; int val; - sprintf(semname, "/" FUNCTION "_" TEST "_%d", getpid()); + sprintf(semname, "/" FUNCTION "_" TEST "_%ld", (long)getpid()); /* Initial value of Semaphore is 1 */ mysemp = sem_open(semname, O_CREAT, 0777, 1); diff --git a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_wait/1-2.c b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_wait/1-2.c index be122ca3dc..f409dc9ec2 100644 --- a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_wait/1-2.c +++ b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_wait/1-2.c @@ -34,7 +34,7 @@ int main() { int value = 10; int val; - sprintf(semname, "/" FUNCTION "_" TEST "_%d", getpid()); + sprintf(semname, "/" FUNCTION "_" TEST "_%ld", (long)getpid()); /* Initial value of Semaphore is 10 */ mysemp = sem_open(semname, O_CREAT, 0777, value); diff --git a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_wait/11-1.c b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_wait/11-1.c index 8d8ea6d7c8..8a3f47621a 100644 --- a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_wait/11-1.c +++ b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_wait/11-1.c @@ -32,7 +32,7 @@ int main() { char semname[20]; int val; - sprintf(semname, "/" FUNCTION "_" TEST "_%d", getpid()); + sprintf(semname, "/" FUNCTION "_" TEST "_%ld", (long)getpid()); /* Initial value of Semaphore is 1 */ mysemp = sem_open(semname, O_CREAT, 0777, 1); diff --git a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_wait/12-1.c b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_wait/12-1.c index 9047987e51..f97f9ac4bf 100644 --- a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_wait/12-1.c +++ b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_wait/12-1.c @@ -31,7 +31,7 @@ int main() { sem_t *mysemp; char semname[20]; - sprintf(semname, "/" FUNCTION "_" TEST "_%d", getpid()); + sprintf(semname, "/" FUNCTION "_" TEST "_%ld", (long)getpid()); /* Initial value of Semaphore is 1 */ mysemp = sem_open(semname, O_CREAT, 0777, 0); diff --git a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_wait/3-1.c b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_wait/3-1.c index 6792a03a9d..ddc606adb8 100644 --- a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_wait/3-1.c +++ b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_wait/3-1.c @@ -33,7 +33,7 @@ int main() char semname[20]; int val; - sprintf(semname, "/" FUNCTION "_" TEST "_%d", getpid()); + sprintf(semname, "/" FUNCTION "_" TEST "_%ld", (long)getpid()); mysemp = sem_open(semname, O_CREAT, 0, 1); if( mysemp == SEM_FAILED || mysemp == NULL ) { diff --git a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_wait/5-1.c b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_wait/5-1.c index 494ca630ac..b2808b3015 100644 --- a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_wait/5-1.c +++ b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_wait/5-1.c @@ -31,7 +31,7 @@ int main() { sem_t *mysemp; char semname[20]; - sprintf(semname, "/" FUNCTION "_" TEST "_%d", getpid()); + sprintf(semname, "/" FUNCTION "_" TEST "_%ld", (long)getpid()); /* Initial value of Semaphore is 0 Locked */ mysemp = sem_open(semname, O_CREAT, 0777, 0); diff --git a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_wait/7-1.c b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_wait/7-1.c index 5a832aa99b..714773a6ce 100644 --- a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_wait/7-1.c +++ b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_wait/7-1.c @@ -39,7 +39,7 @@ int main() char semname[20]; int pid, status; - sprintf(semname, "/" FUNCTION "_" TEST "_%d", getpid()); + sprintf(semname, "/" FUNCTION "_" TEST "_%ld", (long)getpid()); mysemp = sem_open(semname, O_CREAT, 0, 1); if( mysemp == SEM_FAILED || mysemp == NULL ) { diff --git a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/shm_open/23-1.c b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/shm_open/23-1.c index 789161c016..cd51ec39f8 100644 --- a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/shm_open/23-1.c +++ b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/shm_open/23-1.c @@ -83,7 +83,7 @@ int main() { int i, pid, result_fd; char semname[20]; - snprintf(semname, 20, "/sem23-1_%d", getpid()); + snprintf(semname, 20, "/sem23-1_%ld", (long)getpid()); sem = sem_open(semname, O_CREAT, 0777, 1); if( sem == SEM_FAILED || sem == NULL ) { perror("error at sem_open");