diff options
author | joseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d> | 2013-05-18 00:51:47 +0000 |
---|---|---|
committer | joseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d> | 2013-05-18 00:51:47 +0000 |
commit | eab7f6089510455a9b26643c64da331749a15650 (patch) | |
tree | e069c5f33da7c0cffbb68f47ec07b1b10b6789e4 /libc/locale | |
parent | f9b341f7c8c64a0df8707b3cf29b425a25a52d12 (diff) |
Merge changes between r22954 and r23097 from /fsf/trunk.
git-svn-id: svn://svn.eglibc.org/trunk@23098 7b3dc134-2b1b-0410-93df-9e9f96275f8d
Diffstat (limited to 'libc/locale')
29 files changed, 43 insertions, 14 deletions
diff --git a/libc/locale/C-collate.c b/libc/locale/C-collate.c index a5c02af8a..6c7edf074 100644 --- a/libc/locale/C-collate.c +++ b/libc/locale/C-collate.c @@ -17,6 +17,7 @@ <http://www.gnu.org/licenses/>. */ #include <endian.h> +#include <stdint.h> #include "localeinfo.h" static const char collseqmb[] = diff --git a/libc/locale/C-ctype.c b/libc/locale/C-ctype.c index 1d8f17895..0b8c8b24f 100644 --- a/libc/locale/C-ctype.c +++ b/libc/locale/C-ctype.c @@ -18,6 +18,7 @@ #include "localeinfo.h" #include <endian.h> +#include <stdint.h> #include <gnu/option-groups.h> #if __OPTION_EGLIBC_LOCALE_CODE diff --git a/libc/locale/C-time.c b/libc/locale/C-time.c index a19623f56..6f76deb6e 100644 --- a/libc/locale/C-time.c +++ b/libc/locale/C-time.c @@ -16,6 +16,7 @@ License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ +#include <stdint.h> #include "localeinfo.h" /* This table's entries are taken from POSIX.2 Table 2-11 diff --git a/libc/locale/C-translit.h b/libc/locale/C-translit.h index d7ec7784b..98f66e28f 100644 --- a/libc/locale/C-translit.h +++ b/libc/locale/C-translit.h @@ -1,3 +1,5 @@ +#include <stdint.h> + #define NTRANSLIT 1355 static const uint32_t translit_from_idx[] = { diff --git a/libc/locale/loadarchive.c b/libc/locale/loadarchive.c index dd70c15bd..70136dcf9 100644 --- a/libc/locale/loadarchive.c +++ b/libc/locale/loadarchive.c @@ -25,6 +25,7 @@ #include <string.h> #include <fcntl.h> #include <unistd.h> +#include <stdint.h> #include <sys/mman.h> #include <sys/stat.h> #include <sys/param.h> diff --git a/libc/locale/programs/3level.h b/libc/locale/programs/3level.h index dd5c915c7..419c3fd6e 100644 --- a/libc/locale/programs/3level.h +++ b/libc/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/libc/locale/programs/charmap-dir.c b/libc/locale/programs/charmap-dir.c index 694b7ed77..9a9c2e210 100644 --- a/libc/locale/programs/charmap-dir.c +++ b/libc/locale/programs/charmap-dir.c @@ -123,9 +123,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; @@ -170,10 +170,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/libc/locale/programs/charmap.c b/libc/locale/programs/charmap.c index fd9263117..6ce9b18e2 100644 --- a/libc/locale/programs/charmap.c +++ b/libc/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/libc/locale/programs/charmap.h b/libc/locale/programs/charmap.h index 287a7a667..57a345dea 100644 --- a/libc/locale/programs/charmap.h +++ b/libc/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/libc/locale/programs/ld-address.c b/libc/locale/programs/ld-address.c index 1f90768d4..291e7b787 100644 --- a/libc/locale/programs/ld-address.c +++ b/libc/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/libc/locale/programs/ld-collate.c b/libc/locale/programs/ld-collate.c index c3b6091da..63ac79fc8 100644 --- a/libc/locale/programs/ld-collate.c +++ b/libc/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/libc/locale/programs/ld-ctype.c b/libc/locale/programs/ld-ctype.c index 8f95037d2..e37a35e95 100644 --- a/libc/locale/programs/ld-ctype.c +++ b/libc/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/libc/locale/programs/ld-identification.c b/libc/locale/programs/ld-identification.c index 00ed3f777..23d5294eb 100644 --- a/libc/locale/programs/ld-identification.c +++ b/libc/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/libc/locale/programs/ld-measurement.c b/libc/locale/programs/ld-measurement.c index 27337225c..5be54e739 100644 --- a/libc/locale/programs/ld-measurement.c +++ b/libc/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/libc/locale/programs/ld-messages.c b/libc/locale/programs/ld-messages.c index 3dcf4387b..23769cf2b 100644 --- a/libc/locale/programs/ld-messages.c +++ b/libc/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 <gnu/option-groups.h> diff --git a/libc/locale/programs/ld-monetary.c b/libc/locale/programs/ld-monetary.c index 78e95e392..ec8622302 100644 --- a/libc/locale/programs/ld-monetary.c +++ b/libc/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/libc/locale/programs/ld-name.c b/libc/locale/programs/ld-name.c index 2ad67cddf..efc541e47 100644 --- a/libc/locale/programs/ld-name.c +++ b/libc/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/libc/locale/programs/ld-numeric.c b/libc/locale/programs/ld-numeric.c index dde2c30f7..093a04951 100644 --- a/libc/locale/programs/ld-numeric.c +++ b/libc/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/libc/locale/programs/ld-paper.c b/libc/locale/programs/ld-paper.c index abaed5c58..595a60054 100644 --- a/libc/locale/programs/ld-paper.c +++ b/libc/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/libc/locale/programs/ld-telephone.c b/libc/locale/programs/ld-telephone.c index e453c6eab..3e71a36eb 100644 --- a/libc/locale/programs/ld-telephone.c +++ b/libc/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/libc/locale/programs/ld-time.c b/libc/locale/programs/ld-time.c index 2fafb4bab..e6c9e3973 100644 --- a/libc/locale/programs/ld-time.c +++ b/libc/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/libc/locale/programs/linereader.c b/libc/locale/programs/linereader.c index 4c47b15c9..bd06b2b02 100644 --- a/libc/locale/programs/linereader.c +++ b/libc/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/libc/locale/programs/locale.c b/libc/locale/programs/locale.c index 8dc528c11..14d34e693 100644 --- a/libc/locale/programs/locale.c +++ b/libc/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/libc/locale/programs/locarchive.c b/libc/locale/programs/locarchive.c index 4cd1ac259..1a8a69653 100644 --- a/libc/locale/programs/locarchive.c +++ b/libc/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/libc/locale/programs/locfile.c b/libc/locale/programs/locfile.c index 8c08de37c..80d0f7735 100644 --- a/libc/locale/programs/locfile.c +++ b/libc/locale/programs/locfile.c @@ -360,7 +360,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; @@ -383,7 +383,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. */ @@ -397,7 +397,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) @@ -412,7 +412,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 @@ -756,9 +756,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) { @@ -835,9 +835,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); @@ -856,14 +856,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/libc/locale/programs/locfile.h b/libc/locale/programs/locfile.h index 6a22c6de6..f20122fa4 100644 --- a/libc/locale/programs/locfile.h +++ b/libc/locale/programs/locfile.h @@ -18,6 +18,7 @@ #ifndef _LOCFILE_H #define _LOCFILE_H 1 +#include <stdint.h> #include <sys/uio.h> #include "obstack.h" diff --git a/libc/locale/programs/repertoire.c b/libc/locale/programs/repertoire.c index bc65672db..be77b3e44 100644 --- a/libc/locale/programs/repertoire.c +++ b/libc/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/libc/locale/programs/simple-hash.c b/libc/locale/programs/simple-hash.c index d65b6fb3f..30b1508bd 100644 --- a/libc/locale/programs/simple-hash.c +++ b/libc/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/libc/locale/programs/simple-hash.h b/libc/locale/programs/simple-hash.h index 644d015ff..2ee22253e 100644 --- a/libc/locale/programs/simple-hash.h +++ b/libc/locale/programs/simple-hash.h @@ -20,6 +20,7 @@ #include <inttypes.h> #include <obstack.h> +#include <stdint.h> typedef struct hash_table { |