]> sourceware.org Git - glibc.git/blobdiff - locale/programs/charmap-dir.c
Use *stat64 instead of *stat in installed programs
[glibc.git] / locale / programs / charmap-dir.c
index e192eddde3d95cab48876f95ceeb858e12c4a655..3edf72080afddef6e4d582f1e5cb6ab60ca63bfc 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2000-2013 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    This program is free software; you can redistribute it and/or modify
@@ -12,8 +12,7 @@
    GNU General Public License for more details.
 
    You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software Foundation,
-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #include <dirent.h>
 #include <errno.h>
@@ -122,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;
@@ -168,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)
         {
@@ -264,8 +263,8 @@ charmap_aliases (const char *directory, const char *name)
       char *alias = NULL;
       char junk[BUFSIZ];
 
-      if (fscanf (stream, " <code_set_name> %as", &alias) == 1
-          || fscanf (stream, "%% alias %as", &alias) == 1)
+      if (fscanf (stream, " <code_set_name> %ms", &alias) == 1
+          || fscanf (stream, "%% alias %ms", &alias) == 1)
         {
           aliases = (char **) xrealloc (aliases,
                                         (naliases + 2) * sizeof (char *));
This page took 0.030822 seconds and 5 git commands to generate.