summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-07-02 11:11:39 +0000
committerkazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-07-02 11:11:39 +0000
commitad0169421f0477821578bbccd74460d585729770 (patch)
tree1ce0d71070a29dadc496be1c1720477b082b3c5b
parent482bbde6e25620b340e28423c08e3cee941c438b (diff)
downloadruby-ad0169421f0477821578bbccd74460d585729770.tar.gz
Use PRI_PIDT_PREFIX for results of getpid()
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63827 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--mjit.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mjit.c b/mjit.c
index faa31da2a4..87d5d09f48 100644
--- a/mjit.c
+++ b/mjit.c
@@ -268,7 +268,7 @@ real_ms_time(void)
static int
sprint_uniq_filename(char *str, size_t size, unsigned long id, const char *prefix, const char *suffix)
{
- return snprintf(str, size, "%s/%sp%luu%lu%s", tmp_dir, prefix, (unsigned long) getpid(), id, suffix);
+ return snprintf(str, size, "%s/%sp%"PRI_PIDT_PREFIX"uu%lu%s", tmp_dir, prefix, getpid(), id, suffix);
}
/* Return an unique file name in /tmp with PREFIX and SUFFIX and
@@ -422,7 +422,7 @@ exec_process(const char *path, char *const argv[])
: waitpid(pid, &stat, 0);
if (r == -1) {
if (errno == EINTR) continue;
- fprintf(stderr, "[%d] waitpid(%"PRI_PIDT_PREFIX"d): %s (SIGCHLD=%d,%u)\n",
+ fprintf(stderr, "[%"PRI_PIDT_PREFIX"d] waitpid(%"PRI_PIDT_PREFIX"d): %s (SIGCHLD=%d,%u)\n",
getpid(), pid, strerror(errno),
RUBY_SIGCHLD, SIGCHLD_LOSSY);
break;