From: Bruno Haible Date: Wed, 8 Jun 2005 19:29:26 +0000 (+0000) Subject: Avoid gcc warning on mingw. X-Git-Tag: v0.15~505 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e3c5f6e22d6697dce968486670cd1af7783f91ce;p=thirdparty%2Fgettext.git Avoid gcc warning on mingw. --- diff --git a/gettext-tools/lib/ChangeLog b/gettext-tools/lib/ChangeLog index 406c04b94..a0693a0e6 100644 --- a/gettext-tools/lib/ChangeLog +++ b/gettext-tools/lib/ChangeLog @@ -1,3 +1,8 @@ +2005-06-08 Bruno Haible + + * canonicalize.c (__realpath): Avoid gcc warnings on platforms that + don't support symbolic links. + 2005-06-08 Bruno Haible * binary-io.h (fileno): Undefine before defining it. Avoids a gcc diff --git a/gettext-tools/lib/binary-io.h b/gettext-tools/lib/binary-io.h index d9892d33b..d9748ee25 100644 --- a/gettext-tools/lib/binary-io.h +++ b/gettext-tools/lib/binary-io.h @@ -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__ diff --git a/gettext-tools/lib/canonicalize.c b/gettext-tools/lib/canonicalize.c index 921ede13b..588e84a4f 100644 --- a/gettext-tools/lib/canonicalize.c +++ b/gettext-tools/lib/canonicalize.c @@ -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) {