ruby-changes:51616
From: kazu <ko1@a...>
Date: Mon, 2 Jul 2018 20:11:46 +0900 (JST)
Subject: [ruby-changes:51616] kazu:r63827 (trunk): Use PRI_PIDT_PREFIX for results of getpid()
kazu 2018-07-02 20:11:39 +0900 (Mon, 02 Jul 2018) New Revision: 63827 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=63827 Log: Use PRI_PIDT_PREFIX for results of getpid() Modified files: trunk/mjit.c Index: mjit.c =================================================================== --- mjit.c (revision 63826) +++ mjit.c (revision 63827) @@ -268,7 +268,7 @@ real_ms_time(void) https://github.com/ruby/ruby/blob/trunk/mjit.c#L268 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 *con https://github.com/ruby/ruby/blob/trunk/mjit.c#L422 : 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; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/