From 883be3772ef5846a806a662d2087b1935b247444 Mon Sep 17 00:00:00 2001 From: Miguel de Icaza Date: Wed, 24 Feb 1999 21:26:49 +0000 Subject: [PATCH] 1999-02-24 Miguel de Icaza * util.c: Test for glibc/linux and if so, do not use getwd, but getcwd as on this system it is better than popen ("pwd"). --- src/ChangeLog | 5 +++++ src/util.c | 10 ++++++++++ 2 files changed, 15 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 60555a6fc..a52eddad4 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +1999-02-24 Miguel de Icaza + + * util.c: Test for glibc/linux and if so, do not use getwd, but + getcwd as on this system it is better than popen ("pwd"). + 1999-02-18 Federico Mena Quintero * setup.c: Declare extern int tree_panel_visible for the GNOME diff --git a/src/util.c b/src/util.c index 8b5eeafad..ec9c5ce23 100644 --- a/src/util.c +++ b/src/util.c @@ -776,6 +776,16 @@ char *strip_ctrl_codes (char *s) #endif /* VFS_STANDALONE */ +/* + * Ok, on systems running glibc, getcwd does not use popen pwd on + * Linux at least + */ +#ifdef __GLIBC__ +# ifdef linux +# undef HAVE_GETWD +# endif +#endif + /* getwd is better than getcwd, the later uses a popen ("pwd"); */ char *get_current_wd (char *buffer, int size) {