]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Avoid gcc warning on mingw.
authorBruno Haible <bruno@clisp.org>
Wed, 8 Jun 2005 19:29:26 +0000 (19:29 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:12:37 +0000 (12:12 +0200)
gettext-tools/lib/ChangeLog
gettext-tools/lib/binary-io.h
gettext-tools/lib/canonicalize.c

index 406c04b94758643c5802d4557c4c437758c6db48..a0693a0e6e1607a58b6435633dcb64ad55142704 100644 (file)
@@ -1,3 +1,8 @@
+2005-06-08  Bruno Haible  <bruno@clisp.org>
+
+       * canonicalize.c (__realpath): Avoid gcc warnings on platforms that
+       don't support symbolic links.
+
 2005-06-08  Bruno Haible  <bruno@clisp.org>
 
        * binary-io.h (fileno): Undefine before defining it. Avoids a gcc
index d9892d33b4fdeb11c78a8c5f83d6657c41e9bb0c..d9748ee25245a9098ddfce02e390ace4b2500f56 100644 (file)
@@ -1,5 +1,5 @@
 /* Binary mode I/O.
-   Copyright (C) 2001, 2003 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -39,6 +39,7 @@
 #if O_BINARY
 # if !(defined __EMX__ || defined __DJGPP__ || defined __CYGWIN__)
 #  define setmode _setmode
+#  undef fileno
 #  define fileno _fileno
 # endif
 # if defined __DJGPP__ || defined __CYGWIN__
index 921ede13b225077abdd5e46a85361664c08d1ee9..588e84a4f3fdc8c6b4e35e7678596d810ef0b766 100644 (file)
@@ -1,5 +1,5 @@
 /* Return the canonical absolute name of a given file.
-   Copyright (C) 1996-2003 Free Software Foundation, Inc.
+   Copyright (C) 1996-2003, 2005 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -104,7 +104,9 @@ __realpath (const char *name, char *resolved)
   char *rpath, *dest, *extra_buf = NULL;
   const char *start, *end, *rpath_limit;
   long int path_max;
+#ifdef S_ISLNK
   int num_links = 0;
+#endif
 
   if (name == NULL)
     {
@@ -164,7 +166,6 @@ __realpath (const char *name, char *resolved)
 #else
       struct stat st;
 #endif
-      int n;
 
       /* Skip sequence of multiple path-separators.  */
       while (*start == '/')
@@ -238,6 +239,7 @@ __realpath (const char *name, char *resolved)
            {
              char *buf;
              size_t len;
+             int n;
 
              if (++num_links > MAXSYMLINKS)
                {