DOS/Windows patches, take 2

Eli Zaretskii eliz@delorie.com
Sun May 14 23:59:00 GMT 2000


Here are the patches for the ld subdirectory:


2000-05-14  Eli Zaretskii  <eliz@is.elta.co.il>

	* ldmain.c: Include filenames.h.
	(set_scripts_dir): Support backslashes in program name.


*** ./ld/ldmain.c.orig	Wed Mar  1 19:54:42 2000
--- ./ld/ldmain.c	Fri May 12 18:38:42 2000
*************** Software Foundation, 59 Temple Place - S
*** 27,32 ****
--- 27,33 ----
  #include "libiberty.h"
  #include "progress.h"
  #include "bfdlink.h"
+ #include "filenames.h"
  
  #include "ld.h"
  #include "ldmain.h"
*************** set_scripts_dir ()
*** 567,572 ****
--- 568,578 ----
  
    /* Look for "ldscripts" in the dir where our binary is.  */
    end = strrchr (program_name, '/');
+ #ifdef HAVE_DOS_BASED_FILE_SYSTEM
+   /* We could have \foo\bar, or /foo\bar.  */
+   if (end == NULL || strchr (end, '\\'))
+     end = strrchr (program_name, '\\');
+ #endif
  
    if (end == NULL)
      {



More information about the Binutils mailing list