diff options
| author | Paul Eggert | 2019-07-07 12:29:27 -0700 |
|---|---|---|
| committer | Paul Eggert | 2019-07-07 12:33:35 -0700 |
| commit | 8f522efe9a963cd3523ea6863f9bd44881cdf6b7 (patch) | |
| tree | 10ba28c937e142395bcc4d81580d24fa334e1227 /src/filelock.c | |
| parent | bda8a57141e6cb5455e1246c6ab394791fd6c582 (diff) | |
| download | emacs-8f522efe9a963cd3523ea6863f9bd44881cdf6b7.tar.gz emacs-8f522efe9a963cd3523ea6863f9bd44881cdf6b7.zip | |
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.c | 8 |
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 | |||
| 429 | lock_file_1 (char *lfname, bool force) | 429 | lock_file_1 (char *lfname, bool force) |
| 430 | { | 430 | { |
| 431 | /* Call this first because it can GC. */ | 431 | /* Call this first because it can GC. */ |
| 432 | printmax_t boot = get_boot_time (); | 432 | intmax_t boot = get_boot_time (); |
| 433 | 433 | ||
| 434 | Lisp_Object luser_name = Fuser_login_name (Qnil); | 434 | Lisp_Object luser_name = Fuser_login_name (Qnil); |
| 435 | char const *user_name = STRINGP (luser_name) ? SSDATA (luser_name) : ""; | 435 | char const *user_name = STRINGP (luser_name) ? SSDATA (luser_name) : ""; |
| 436 | Lisp_Object lhost_name = Fsystem_name (); | 436 | Lisp_Object lhost_name = Fsystem_name (); |
| 437 | char const *host_name = STRINGP (lhost_name) ? SSDATA (lhost_name) : ""; | 437 | char const *host_name = STRINGP (lhost_name) ? SSDATA (lhost_name) : ""; |
| 438 | char lock_info_str[MAX_LFINFO + 1]; | 438 | char lock_info_str[MAX_LFINFO + 1]; |
| 439 | printmax_t pid = getpid (); | 439 | intmax_t pid = getpid (); |
| 440 | 440 | ||
| 441 | if (boot) | 441 | if (boot) |
| 442 | { | 442 | { |
| 443 | if (sizeof lock_info_str | 443 | if (sizeof lock_info_str |
| 444 | <= snprintf (lock_info_str, sizeof lock_info_str, | 444 | <= snprintf (lock_info_str, sizeof lock_info_str, |
| 445 | "%s@%s.%"pMd":%"pMd, | 445 | "%s@%s.%"PRIdMAX":%"PRIdMAX, |
| 446 | user_name, host_name, pid, boot)) | 446 | user_name, host_name, pid, boot)) |
| 447 | return ENAMETOOLONG; | 447 | return ENAMETOOLONG; |
| 448 | } | 448 | } |
| 449 | else if (sizeof lock_info_str | 449 | else if (sizeof lock_info_str |
| 450 | <= snprintf (lock_info_str, sizeof lock_info_str, | 450 | <= snprintf (lock_info_str, sizeof lock_info_str, |
| 451 | "%s@%s.%"pMd, | 451 | "%s@%s.%"PRIdMAX, |
| 452 | user_name, host_name, pid)) | 452 | user_name, host_name, pid)) |
| 453 | return ENAMETOOLONG; | 453 | return ENAMETOOLONG; |
| 454 | 454 | ||