]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Print a uid_t value portably
authorJonas 'Sortie' Termansen <sortie@maxsi.org>
Wed, 27 Aug 2014 10:07:29 +0000 (12:07 +0200)
committerDaiki Ueno <ueno@gnu.org>
Thu, 28 Aug 2014 01:05:18 +0000 (10:05 +0900)
gettext-tools/src/ChangeLog
gettext-tools/src/msginit.c

index 2164d230b0059facfdc325e2c37ebbfb9caf59be..a228a5d2972c0393987d49ca10f8c513d1071313 100644 (file)
@@ -1,3 +1,9 @@
+2014-08-28  Jonas 'Sortie' Termansen <sortie@maxsi.org>  (tiny change)
+
+       * msginit.c: Include <stdint.h>.
+       (get_user_pwd): Cast uid_t value into uintmax_t and print it with
+       '%ju' format directive.
+
 2014-08-27  Jonas 'Sortie' Termansen <sortie@maxsi.org>  (tiny change)
 
        * msgfilter.c (process_message): Use proper format directive for
index b3ef6d765c9f1ef0bdf154343385738dffc3d82d..951aa2e0cfde635b977e28295ebe464e47a377c5 100644 (file)
@@ -26,6 +26,7 @@
 #include <getopt.h>
 #include <limits.h>
 #include <locale.h>
+#include <stdint.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -1059,7 +1060,7 @@ get_user_pwd ()
   if (userpasswd != NULL)
     return userpasswd;
   if (errno != 0)
-    error (EXIT_FAILURE, errno, "getpwuid(\"%d\")", getuid ());
+    error (EXIT_FAILURE, errno, "getpwuid(%ju)", (uintmax_t) getuid ());
 #endif
 
   return NULL;