[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug-gettext] [PATCH 3/3] Print a uid_t value portably
From: |
Jonas 'Sortie' Termansen |
Subject: |
[bug-gettext] [PATCH 3/3] Print a uid_t value portably |
Date: |
Tue, 26 Aug 2014 16:41:13 +0200 |
--
The ideal solution would be to cast to uintmax_t and printf as %ju instead.
However, this file isn't using stdint.h or inttypes.h at the moment and I
don't know what compatibility restrictions gettext has.
---
gettext-tools/src/msginit.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gettext-tools/src/msginit.c b/gettext-tools/src/msginit.c
index b3ef6d7..02f5a65 100644
--- a/gettext-tools/src/msginit.c
+++ b/gettext-tools/src/msginit.c
@@ -1059,7 +1059,7 @@ get_user_pwd ()
if (userpasswd != NULL)
return userpasswd;
if (errno != 0)
- error (EXIT_FAILURE, errno, "getpwuid(\"%d\")", getuid ());
+ error (EXIT_FAILURE, errno, "getpwuid(\"%llu\")", (unsigned long
long)getuid ());
#endif
return NULL;
--
2.0.0