summaryrefslogtreecommitdiff
path: root/locale/programs
diff options
context:
space:
mode:
Diffstat (limited to 'locale/programs')
-rw-r--r--locale/programs/3level.h2
-rw-r--r--locale/programs/charmap-dir.c8
-rw-r--r--locale/programs/charmap.c1
-rw-r--r--locale/programs/charmap.h1
-rw-r--r--locale/programs/ld-address.c1
-rw-r--r--locale/programs/ld-collate.c1
-rw-r--r--locale/programs/ld-ctype.c1
-rw-r--r--locale/programs/ld-identification.c1
-rw-r--r--locale/programs/ld-measurement.c1
-rw-r--r--locale/programs/ld-messages.c1
-rw-r--r--locale/programs/ld-monetary.c1
-rw-r--r--locale/programs/ld-name.c1
-rw-r--r--locale/programs/ld-numeric.c1
-rw-r--r--locale/programs/ld-paper.c1
-rw-r--r--locale/programs/ld-telephone.c1
-rw-r--r--locale/programs/ld-time.c1
-rw-r--r--locale/programs/linereader.c1
-rw-r--r--locale/programs/locale.c1
-rw-r--r--locale/programs/locarchive.c1
-rw-r--r--locale/programs/locfile.c20
-rw-r--r--locale/programs/locfile.h1
-rw-r--r--locale/programs/repertoire.c1
-rw-r--r--locale/programs/simple-hash.c1
-rw-r--r--locale/programs/simple-hash.h1
24 files changed, 37 insertions, 14 deletions
diff --git a/locale/programs/3level.h b/locale/programs/3level.h
index c8ed119ffd..9b8b1b96ad 100644
--- a/locale/programs/3level.h
+++ b/locale/programs/3level.h
@@ -15,6 +15,8 @@
You should have received a copy of the GNU General Public License
along with this program; if not, see <http://www.gnu.org/licenses/>. */
+#include <stdint.h>
+
/* Construction of sparse 3-level tables.
See wchar-lookup.h or coll-lookup.h for their structure and the
meaning of p and q.
diff --git a/locale/programs/charmap-dir.c b/locale/programs/charmap-dir.c
index 03d0cb1109..3edf72080a 100644
--- a/locale/programs/charmap-dir.c
+++ b/locale/programs/charmap-dir.c
@@ -121,9 +121,9 @@ charmap_readdir (CHARMAP_DIR *cdir)
else
#endif
{
- struct stat statbuf;
+ struct stat64 statbuf;
- if (stat (cdir->pathname, &statbuf) < 0)
+ if (stat64 (cdir->pathname, &statbuf) < 0)
continue;
mode = statbuf.st_mode;
@@ -167,10 +167,10 @@ fopen_uncompressed (const char *pathname, const char *compressor)
pfd = open (pathname, O_RDONLY);
if (pfd >= 0)
{
- struct stat statbuf;
+ struct stat64 statbuf;
int fd[2];
- if (fstat (pfd, &statbuf) >= 0
+ if (fstat64 (pfd, &statbuf) >= 0
&& S_ISREG (statbuf.st_mode)
&& pipe (fd) >= 0)
{
diff --git a/locale/programs/charmap.c b/locale/programs/charmap.c
index fd9263117c..6ce9b18e2b 100644
--- a/locale/programs/charmap.c
+++ b/locale/programs/charmap.c
@@ -27,6 +27,7 @@
#include <stdlib.h>
#include <string.h>
#include <error.h>
+#include <stdint.h>
#include "localedef.h"
#include "linereader.h"
diff --git a/locale/programs/charmap.h b/locale/programs/charmap.h
index 287a7a6670..57a345dea9 100644
--- a/locale/programs/charmap.h
+++ b/locale/programs/charmap.h
@@ -20,6 +20,7 @@
#include <obstack.h>
#include <stdbool.h>
+#include <stdint.h>
#include "repertoire.h"
#include "simple-hash.h"
diff --git a/locale/programs/ld-address.c b/locale/programs/ld-address.c
index bb50395c5e..39b9a836f4 100644
--- a/locale/programs/ld-address.c
+++ b/locale/programs/ld-address.c
@@ -23,6 +23,7 @@
#include <error.h>
#include <langinfo.h>
#include <string.h>
+#include <stdint.h>
#include <sys/uio.h>
#include <assert.h>
diff --git a/locale/programs/ld-collate.c b/locale/programs/ld-collate.c
index aa9eb4ad6a..6894a7c181 100644
--- a/locale/programs/ld-collate.c
+++ b/locale/programs/ld-collate.c
@@ -23,6 +23,7 @@
#include <error.h>
#include <stdlib.h>
#include <wchar.h>
+#include <stdint.h>
#include <sys/param.h>
#include "localedef.h"
diff --git a/locale/programs/ld-ctype.c b/locale/programs/ld-ctype.c
index 23880bad27..8be7fce887 100644
--- a/locale/programs/ld-ctype.c
+++ b/locale/programs/ld-ctype.c
@@ -29,6 +29,7 @@
#include <string.h>
#include <wchar.h>
#include <wctype.h>
+#include <stdint.h>
#include <sys/uio.h>
#include "localedef.h"
diff --git a/locale/programs/ld-identification.c b/locale/programs/ld-identification.c
index ca69ded0e2..2589675390 100644
--- a/locale/programs/ld-identification.c
+++ b/locale/programs/ld-identification.c
@@ -23,6 +23,7 @@
#include <langinfo.h>
#include <stdlib.h>
#include <string.h>
+#include <stdint.h>
#include <sys/uio.h>
#include <assert.h>
diff --git a/locale/programs/ld-measurement.c b/locale/programs/ld-measurement.c
index 005df4ac32..4aa0ea99a7 100644
--- a/locale/programs/ld-measurement.c
+++ b/locale/programs/ld-measurement.c
@@ -22,6 +22,7 @@
#include <error.h>
#include <langinfo.h>
#include <string.h>
+#include <stdint.h>
#include <sys/uio.h>
#include <assert.h>
diff --git a/locale/programs/ld-messages.c b/locale/programs/ld-messages.c
index 833adb43a0..f1b9f93f26 100644
--- a/locale/programs/ld-messages.c
+++ b/locale/programs/ld-messages.c
@@ -23,6 +23,7 @@
#include <sys/types.h>
#include <regex.h>
#include <string.h>
+#include <stdint.h>
#include <sys/uio.h>
#include <assert.h>
diff --git a/locale/programs/ld-monetary.c b/locale/programs/ld-monetary.c
index aed175aee9..4dfca3dd7b 100644
--- a/locale/programs/ld-monetary.c
+++ b/locale/programs/ld-monetary.c
@@ -24,6 +24,7 @@
#include <limits.h>
#include <stdlib.h>
#include <string.h>
+#include <stdint.h>
#include <sys/uio.h>
#include <assert.h>
diff --git a/locale/programs/ld-name.c b/locale/programs/ld-name.c
index de44775056..207bf0194e 100644
--- a/locale/programs/ld-name.c
+++ b/locale/programs/ld-name.c
@@ -21,6 +21,7 @@
#include <langinfo.h>
#include <string.h>
+#include <stdint.h>
#include <sys/uio.h>
#include <assert.h>
diff --git a/locale/programs/ld-numeric.c b/locale/programs/ld-numeric.c
index b864b0e74a..929409cb7a 100644
--- a/locale/programs/ld-numeric.c
+++ b/locale/programs/ld-numeric.c
@@ -21,6 +21,7 @@
#include <langinfo.h>
#include <string.h>
+#include <stdint.h>
#include <sys/uio.h>
#include <assert.h>
diff --git a/locale/programs/ld-paper.c b/locale/programs/ld-paper.c
index 32285ded83..c6239dfd9d 100644
--- a/locale/programs/ld-paper.c
+++ b/locale/programs/ld-paper.c
@@ -22,6 +22,7 @@
#include <error.h>
#include <langinfo.h>
#include <string.h>
+#include <stdint.h>
#include <sys/uio.h>
#include <assert.h>
diff --git a/locale/programs/ld-telephone.c b/locale/programs/ld-telephone.c
index 172ad577a2..4452750921 100644
--- a/locale/programs/ld-telephone.c
+++ b/locale/programs/ld-telephone.c
@@ -22,6 +22,7 @@
#include <error.h>
#include <langinfo.h>
#include <string.h>
+#include <stdint.h>
#include <sys/uio.h>
#include <assert.h>
diff --git a/locale/programs/ld-time.c b/locale/programs/ld-time.c
index 94486476db..45e36c6719 100644
--- a/locale/programs/ld-time.c
+++ b/locale/programs/ld-time.c
@@ -24,6 +24,7 @@
#include <stdlib.h>
#include <string.h>
#include <wchar.h>
+#include <stdint.h>
#include <sys/uio.h>
#include <assert.h>
diff --git a/locale/programs/linereader.c b/locale/programs/linereader.c
index 7fde46a449..4773d4cac4 100644
--- a/locale/programs/linereader.c
+++ b/locale/programs/linereader.c
@@ -26,6 +26,7 @@
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
+#include <stdint.h>
#include "localedef.h"
#include "charmap.h"
diff --git a/locale/programs/locale.c b/locale/programs/locale.c
index 8dc528c115..14d34e693d 100644
--- a/locale/programs/locale.c
+++ b/locale/programs/locale.c
@@ -36,6 +36,7 @@
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
+#include <stdint.h>
#include <sys/mman.h>
#include <sys/stat.h>
diff --git a/locale/programs/locarchive.c b/locale/programs/locarchive.c
index 70dce9bfd5..d31472d908 100644
--- a/locale/programs/locarchive.c
+++ b/locale/programs/locarchive.c
@@ -34,6 +34,7 @@
#include <string.h>
#include <time.h>
#include <unistd.h>
+#include <stdint.h>
#include <sys/mman.h>
#include <sys/param.h>
#include <sys/stat.h>
diff --git a/locale/programs/locfile.c b/locale/programs/locfile.c
index 10c3dc99b9..3cbd6f1314 100644
--- a/locale/programs/locfile.c
+++ b/locale/programs/locfile.c
@@ -355,7 +355,7 @@ siblings_uncached (const char *output_path)
{
size_t len;
char *base, *p;
- struct stat output_stat;
+ struct stat64 output_stat;
DIR *dirp;
int nelems;
const char **elems;
@@ -378,7 +378,7 @@ siblings_uncached (const char *output_path)
len = p - base;
/* Get the properties of output_path. */
- if (lstat (output_path, &output_stat) < 0 || !S_ISDIR (output_stat.st_mode))
+ if (lstat64 (output_path, &output_stat) < 0 || !S_ISDIR (output_stat.st_mode))
return NULL;
/* Iterate through the directories in base directory. */
@@ -392,7 +392,7 @@ siblings_uncached (const char *output_path)
struct dirent64 *other_dentry;
const char *other_name;
char *other_path;
- struct stat other_stat;
+ struct stat64 other_stat;
other_dentry = readdir64 (dirp);
if (other_dentry == NULL)
@@ -407,7 +407,7 @@ siblings_uncached (const char *output_path)
other_path[len] = '/';
strcpy (other_path + len + 1, other_name);
- if (lstat (other_path, &other_stat) >= 0
+ if (lstat64 (other_path, &other_stat) >= 0
&& S_ISDIR (other_stat.st_mode)
&& other_stat.st_uid == output_stat.st_uid
&& other_stat.st_gid == output_stat.st_gid
@@ -580,9 +580,9 @@ write_locale_data (const char *output_path, int catidx, const char *category,
fd = -2;
if (strcmp (category, "LC_MESSAGES") == 0)
{
- struct stat st;
+ struct stat64 st;
- if (stat (fname, &st) < 0)
+ if (stat64 (fname, &st) < 0)
{
if (mkdir (fname, 0777) >= 0)
{
@@ -659,9 +659,9 @@ failure while writing data for category `%s'"), category));
other_paths = siblings (output_path);
if (other_paths != NULL)
{
- struct stat fname_stat;
+ struct stat64 fname_stat;
- if (lstat (fname, &fname_stat) >= 0
+ if (lstat64 (fname, &fname_stat) >= 0
&& S_ISREG (fname_stat.st_mode))
{
const char *fname_tail = fname + strlen (output_path);
@@ -680,14 +680,14 @@ failure while writing data for category `%s'"), category));
const char *other_path = *other_p;
size_t other_path_len = strlen (other_path);
char *other_fname;
- struct stat other_fname_stat;
+ struct stat64 other_fname_stat;
other_fname =
(char *) xmalloc (other_path_len + strlen (fname_tail) + 1);
memcpy (other_fname, other_path, other_path_len);
strcpy (other_fname + other_path_len, fname_tail);
- if (lstat (other_fname, &other_fname_stat) >= 0
+ if (lstat64 (other_fname, &other_fname_stat) >= 0
&& S_ISREG (other_fname_stat.st_mode)
/* Consider only files on the same device.
Otherwise hard linking won't work anyway. */
diff --git a/locale/programs/locfile.h b/locale/programs/locfile.h
index 4165a7212b..83bf421ece 100644
--- a/locale/programs/locfile.h
+++ b/locale/programs/locfile.h
@@ -18,6 +18,7 @@
#ifndef _LOCFILE_H
#define _LOCFILE_H 1
+#include <stdint.h>
#include <sys/uio.h>
#include "linereader.h"
diff --git a/locale/programs/repertoire.c b/locale/programs/repertoire.c
index bc65672dba..be77b3e44e 100644
--- a/locale/programs/repertoire.c
+++ b/locale/programs/repertoire.c
@@ -27,6 +27,7 @@
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
+#include <stdint.h>
#include "localedef.h"
#include "linereader.h"
diff --git a/locale/programs/simple-hash.c b/locale/programs/simple-hash.c
index d65b6fb3f0..30b1508bdb 100644
--- a/locale/programs/simple-hash.c
+++ b/locale/programs/simple-hash.c
@@ -24,6 +24,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <stdint.h>
#include <sys/types.h>
#if HAVE_OBSTACK
diff --git a/locale/programs/simple-hash.h b/locale/programs/simple-hash.h
index 644d015fff..2ee22253e1 100644
--- a/locale/programs/simple-hash.h
+++ b/locale/programs/simple-hash.h
@@ -20,6 +20,7 @@
#include <inttypes.h>
#include <obstack.h>
+#include <stdint.h>
typedef struct hash_table
{