mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-16 18:10:11 +00:00
Update.
1999-05-02 H.J. Lu <hjl@gnu.org> * timezone/zic.c (dolink): Remove the symlink destination first. * catgets/open_catalog.c (__open_catalog): Set catalog->status to "nonexisting" if failed to open the file.
This commit is contained in:
parent
a97d1494f7
commit
4e720dd60d
@ -1,3 +1,10 @@
|
||||
1999-05-02 H.J. Lu <hjl@gnu.org>
|
||||
|
||||
* timezone/zic.c (dolink): Remove the symlink destination first.
|
||||
|
||||
* catgets/open_catalog.c (__open_catalog): Set catalog->status
|
||||
to "nonexisting" if failed to open the file.
|
||||
|
||||
1999-05-01 Ulrich Drepper <drepper@cygnus.com>
|
||||
|
||||
* string/bits/string2.h: Only use __builtin_memset for egcs 1.1 and
|
||||
|
@ -183,7 +183,10 @@ __open_catalog (__nl_catd catalog)
|
||||
|
||||
/* Avoid dealing with directories and block devices */
|
||||
if (fd < 0)
|
||||
goto unlock_return;
|
||||
{
|
||||
catalog->status = nonexisting;
|
||||
goto unlock_return;
|
||||
}
|
||||
|
||||
if (__fxstat (_STAT_VER, fd, &st) < 0)
|
||||
{
|
||||
|
@ -621,6 +621,16 @@ const char * const tofile;
|
||||
symlinkcontents = ecatalloc(symlinkcontents, "../");
|
||||
symlinkcontents = ecatalloc(symlinkcontents, fromname);
|
||||
|
||||
result = unlink(toname);
|
||||
if (result != 0 && errno != ENOENT) {
|
||||
const char *e = strerror(errno);
|
||||
|
||||
(void) fprintf(stderr,
|
||||
_("%s: Can't unlink %s: %s\n"),
|
||||
progname, toname, e);
|
||||
(void) exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
result = symlink(symlinkcontents, toname);
|
||||
if (result == 0)
|
||||
warning(_("hard link failed, symbolic link used"));
|
||||
|
Loading…
Reference in New Issue
Block a user