summaryrefslogtreecommitdiff
path: root/src/filelock.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2019-07-07 12:29:27 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2019-07-07 12:33:35 -0700
commit8f522efe9a963cd3523ea6863f9bd44881cdf6b7 (patch)
tree10ba28c937e142395bcc4d81580d24fa334e1227 /src/filelock.c
parentbda8a57141e6cb5455e1246c6ab394791fd6c582 (diff)
downloademacs-8f522efe9a963cd3523ea6863f9bd44881cdf6b7.tar.gz
Remove printmax_t etc.
printmax_t etc. were needed only for platforms that lacked support for printing intmax_t. These platforms are now so obsolete that they are no longer practical porting targets. * src/image.c (gs_load): Fix unlikely buffer overrun discovered while making these changes. It was introduced in 2011-07-17T00:34:43!eggert@cs.ucla.edu. * src/lisp.h (printmax_t, uprintmax_t, pMd, pMu, pMx): Remove. All uses replaced by their standard counterparts intmax_t, uintmax_t, PRIdMAX, PRIuMAX, PRIxMAX.
Diffstat (limited to 'src/filelock.c')
-rw-r--r--src/filelock.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/filelock.c b/src/filelock.c
index b1f7d9dce61..46349a63e4a 100644
--- a/src/filelock.c
+++ b/src/filelock.c
@@ -429,26 +429,26 @@ static int
lock_file_1 (char *lfname, bool force)
{
/* Call this first because it can GC. */
- printmax_t boot = get_boot_time ();
+ intmax_t boot = get_boot_time ();
Lisp_Object luser_name = Fuser_login_name (Qnil);
char const *user_name = STRINGP (luser_name) ? SSDATA (luser_name) : "";
Lisp_Object lhost_name = Fsystem_name ();
char const *host_name = STRINGP (lhost_name) ? SSDATA (lhost_name) : "";
char lock_info_str[MAX_LFINFO + 1];
- printmax_t pid = getpid ();
+ intmax_t pid = getpid ();
if (boot)
{
if (sizeof lock_info_str
<= snprintf (lock_info_str, sizeof lock_info_str,
- "%s@%s.%"pMd":%"pMd,
+ "%s@%s.%"PRIdMAX":%"PRIdMAX,
user_name, host_name, pid, boot))
return ENAMETOOLONG;
}
else if (sizeof lock_info_str
<= snprintf (lock_info_str, sizeof lock_info_str,
- "%s@%s.%"pMd,
+ "%s@%s.%"PRIdMAX,
user_name, host_name, pid))
return ENAMETOOLONG;