projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fchdir: avoid extra chdir and fix test
[gnulib.git]
/
lib
/
canonicalize-lgpl.c
diff --git
a/lib/canonicalize-lgpl.c
b/lib/canonicalize-lgpl.c
index
c2164e0
..
1574ec1
100644
(file)
--- a/
lib/canonicalize-lgpl.c
+++ b/
lib/canonicalize-lgpl.c
@@
-1,5
+1,5
@@
/* Return the canonical absolute name of a given file.
/* Return the canonical absolute name of a given file.
- Copyright (C) 1996-201
0
Free Software Foundation, Inc.
+ Copyright (C) 1996-201
1
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
This file is part of the GNU C Library.
This program is free software: you can redistribute it and/or modify
@@
-16,6
+16,7
@@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#ifndef _LIBC
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#ifndef _LIBC
+# define _GL_USE_STDLIB_ALLOC 1
# include <config.h>
#endif
# include <config.h>
#endif
@@
-51,6
+52,12
@@
# include "pathmax.h"
# include "malloca.h"
# if HAVE_GETCWD
# include "pathmax.h"
# include "malloca.h"
# if HAVE_GETCWD
+# if IN_RELOCWRAPPER
+ /* When building the relocatable program wrapper, use the system's getcwd
+ function, not the gnulib override, otherwise we would get a link error.
+ */
+# undef getcwd
+# endif
# ifdef VMS
/* We want the directory in Unix syntax, not in VMS syntax. */
# define __getcwd(buf, max) getcwd (buf, max, 0)
# ifdef VMS
/* We want the directory in Unix syntax, not in VMS syntax. */
# define __getcwd(buf, max) getcwd (buf, max, 0)
@@
-62,8
+69,6
@@
# endif
# define __readlink readlink
# define __set_errno(e) errno = (e)
# endif
# define __readlink readlink
# define __set_errno(e) errno = (e)
-/* Use the system functions, not the gnulib overrides in this file. */
-# undef malloc
# ifndef MAXSYMLINKS
# ifdef SYMLOOP_MAX
# define MAXSYMLINKS SYMLOOP_MAX
# ifndef MAXSYMLINKS
# ifdef SYMLOOP_MAX
# define MAXSYMLINKS SYMLOOP_MAX