projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
gdb: add target_ops::supports_displaced_step
[deliverable/binutils-gdb.git]
/
libiberty
/
getpwd.c
diff --git
a/libiberty/getpwd.c
b/libiberty/getpwd.c
index e57ef47e947d67fa46eda615d2ff356e2d75a48c..fa5c132fd6b6e48c11efe723dfc492635ddc1522 100644
(file)
--- a/
libiberty/getpwd.c
+++ b/
libiberty/getpwd.c
@@
-39,10
+39,6
@@
extern int errno;
#include <limits.h>
#endif
#include <limits.h>
#endif
-/* Prototype these in case the system headers don't provide them. */
-extern char *getpwd ();
-extern char *getwd ();
-
#include "libiberty.h"
/* Virtually every UN*X system now in common use (except for pre-4.3-tahoe
#include "libiberty.h"
/* Virtually every UN*X system now in common use (except for pre-4.3-tahoe
@@
-50,6
+46,8
@@
extern char *getwd ();
the few exceptions to the general rule here. */
#if !defined(HAVE_GETCWD) && defined(HAVE_GETWD)
the few exceptions to the general rule here. */
#if !defined(HAVE_GETCWD) && defined(HAVE_GETWD)
+/* Prototype in case the system headers doesn't provide it. */
+extern char *getwd ();
#define getcwd(buf,len) getwd(buf)
#endif
#define getcwd(buf,len) getwd(buf)
#endif
@@
-86,7
+84,7
@@
getpwd (void)
&& dotstat.st_dev == pwdstat.st_dev))
/* The shortcut didn't work. Try the slow, ``sure'' way. */
&& dotstat.st_dev == pwdstat.st_dev))
/* The shortcut didn't work. Try the slow, ``sure'' way. */
- for (s = GUESSPATHLEN; !
getcwd (p = xmalloc (
s), s); s *= 2)
+ for (s = GUESSPATHLEN; !
getcwd (p = XNEWVEC (char,
s), s); s *= 2)
{
int e = errno;
free (p);
{
int e = errno;
free (p);
@@
-119,7
+117,7
@@
getpwd (void)
static char *pwd = 0;
if (!pwd)
static char *pwd = 0;
if (!pwd)
- pwd = getcwd (
xmalloc (
MAXPATHLEN + 1), MAXPATHLEN + 1
+ pwd = getcwd (
XNEWVEC (char,
MAXPATHLEN + 1), MAXPATHLEN + 1
#ifdef VMS
, 0
#endif
#ifdef VMS
, 0
#endif
This page took
0.024355 seconds
and
4
git commands to generate.