changeset 3026:88fa1f27ac1a

[project @ 1997-06-04 17:18:50 by jwe]
author jwe
date Wed, 04 Jun 1997 17:18:50 +0000
parents 5a9dd0a68b1d
children 888a3f5a1cdd
files kpathsea/ChangeLog kpathsea/progname.c
diffstat 2 files changed, 10 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/kpathsea/ChangeLog
+++ b/kpathsea/ChangeLog
@@ -1,8 +1,10 @@
+Wed Jun  4 12:14:38 1997  John W. Eaton  <jwe@bevo.che.wisc.edu>
+
+	* progname.c (selfdir): Handle dir/exename case here.
+	Patch from Karl Berry  <karl@cs.umb.edu>.
+
 Tue Jun  3 23:48:22 1997  John W. Eaton  <jwe@bevo.che.wisc.edu>
 
-	* absolute.c (kpse_absolute_p): Recognize foo/bar as an
-	explicit_relative file name.
-
 	* common.ac: (program_invocation_name): AC_TRY_LINK only requires
 	function body.  Add declaration for program_invocation_name so gcc
 	won't complain about undeclared variable.
--- a/kpathsea/progname.c
+++ b/kpathsea/progname.c
@@ -404,6 +404,11 @@
     }
 #endif /* not AMIGA */
   }
+  
+  /* If argv0 is somehow dir/exename, `self' will still be NULL.  */
+  if (!self)
+    self = concat3 (".", DIR_SEP_STRING, argv0);
+    
   ret = my_dirname (remove_dots (expand_symlinks (self)));
 
   free (self);