Ops the mailing system doesn't accept files. That's diff output for the patch:


Only in which-2.20-src_fixed/src/which/2.20/which-2.20-src: .deps
Only in which-2.20-src_fixed/src/which/2.20/which-2.20-src: Makefile
Only in which-2.20-src_fixed/src/which/2.20/which-2.20-src: Tb02.patch
Only in which-2.20-src_fixed/src/which/2.20/which-2.20-src: config.h
Only in which-2.20-src_fixed/src/which/2.20/which-2.20-src: config.log
Only in which-2.20-src_fixed/src/which/2.20/which-2.20-src: config.status
Only in which-2.20-src_fixed/src/which/2.20/which-2.20-src: maintMakefile
Only in which-2.20-src_fixed/src/which/2.20/which-2.20-src: stamp-h1
Only in which-2.20-src_fixed/src/which/2.20/which-2.20-src/tilde: .deps
Only in which-2.20-src_fixed/src/which/2.20/which-2.20-src/tilde: Makefile
diff -crB which-2.20-src/src/which/2.20/which-2.20-src/which.c 
which-2.20-src_fixed/src/which/2.20/which-2.20-src/which.c
*** which-2.20-src/src/which/2.20/which-2.20-src/which.c        Sun Aug 10 
14:07:18 2008
--- which-2.20-src_fixed/src/which/2.20/which-2.20-src/which.c  Sun Oct 16 
15:49:31 2011
***************
*** 713,718 ****
--- 713,727 ----
    {
      int found_something = 0;
  
+       {
+               char *p = *argv;
+               char intruder = (DIR_SEPARATOR == '/' ? '\\' : '/');
+               for (; *p; p++) {
+                       if (*p == intruder) {
+                               *p = DIR_SEPARATOR;
+                       }
+               }
+       }
      if (!*argv)
        continue;
  

-----Messaggio originale-----
Da: Alessandro Carioni [mailto:zcari...@gmail.com] 
Inviato: martedì 25 ottobre 2011 17.08
A: 'gnuwin32-users@lists.sourceforge.net'
Oggetto: R: [GnuWin32-Users] which command


The problem of the current version (2.20) of “which” command is this: in 
Windows the directory separator character is ‘\’, but many users fond of Linux 
accidentally use character ‘/’ instead. When that happens, the command abruptly 
stops, and the OS signals a segmentation fault error. Therefore in the main 
loop of the program, where the command line is handled, I take every argument 
and I substitute the wrong dir separator with the correct one as pointed out by 
macro DIR_SEPARATOR. The code is this:

        {
                char *p = *argv;
                char intruder = (DIR_SEPARATOR == '/' ? '\\' : '/');
                for (; *p; p++) {
                        if (*p == intruder) {
                                *p = DIR_SEPARATOR;
                        }
                }
        }


I hope it could work.
Regards

-----Messaggio originale-----
Da: GnuWin32 [mailto:gnuwi...@gmail.com]
Inviato: lunedì 24 ottobre 2011 18.28
A: gnuwin32-users@lists.sourceforge.net
Oggetto: Re: [GnuWin32-Users] which command

Yes, here, or in the Bugs Tracker
(http://sourceforge.net/tracker/?group_id=23617&atid=379173).

-----Oorspronkelijk bericht-----
From: acari...@email.it
Sent: Monday, October 24, 2011 11:16 AM
To: gnuwin32-users@lists.sourceforge.net
Subject: [GnuWin32-Users] which command

Hi, I have a (possible) bug fix for the which command (version 2.20), but I 
don’t know how to submit the patch. May I post it here?

Regards


--
Caselle da 1GB, trasmetti allegati fino a 3GB e in piu' IMAP, POP3 e SMTP 
autenticato? GRATIS solo con Email.it: http://www.email.it/f

Sponsor:
Vuoi arredare casa con stile? MisterCupido.com realizza perfette Riproduzioni 
d'Opere d'Arte! Scopri subito le nostre migliori proposte in offerta!
Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=11451&d=20111024




--
Caselle da 1GB, trasmetti allegati fino a 3GB e in piu' IMAP, POP3 e SMTP 
autenticato? GRATIS solo con Email.it http://www.email.it/f

Sponsor:
Sviluppa il tuo business e trova nuovi clienti con il Direct Email Marketing di 
Email.it, la strategia vincente per rafforzare la notorieta'della tua impresa!
Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=11848&d=24-10

------------------------------------------------------------------------------
The demand for IT networking professionals continues to grow, and the demand 
for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn about Cisco 
certifications, training, and career opportunities.
http://p.sf.net/sfu/cisco-dev2dev
_______________________________________________
GnuWin32-Users mailing list
GnuWin32-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gnuwin32-users 


------------------------------------------------------------------------------
The demand for IT networking professionals continues to grow, and the demand 
for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn about Cisco 
certifications, training, and career opportunities. 
http://p.sf.net/sfu/cisco-dev2dev
_______________________________________________
GnuWin32-Users mailing list
GnuWin32-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gnuwin32-users
------------------------------------------------------------------------------
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn 
about Cisco certifications, training, and career opportunities. 
http://p.sf.net/sfu/cisco-dev2dev
_______________________________________________
GnuWin32-Users mailing list
GnuWin32-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gnuwin32-users

Reply via email to