home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / unix / bsd / 4229 < prev    next >
Encoding:
Text File  |  1992-08-16  |  1.9 KB  |  60 lines

  1. Newsgroups: comp.unix.bsd
  2. Path: sparky!uunet!ferkel.ucsb.edu!taco!gatech!darwin.sura.net!mojo.eng.umd.edu!pandora.pix.com!news
  3. From: news@pix.com (The News Subsystem)
  4. Subject: make(1) bug
  5. Message-ID: <Bt3044.Fzp@pix.com>
  6. Sender: news@pix.com (The News Subsystem)
  7. Nntp-Posting-Host: pandora.pix.com
  8. Organization: Pix -- The company with no adult supervision.
  9. Date: Sun, 16 Aug 1992 14:55:15 GMT
  10. Lines: 48
  11.  
  12. This article was posted to comp.bugs.4bsd many moons ago,
  13. but is still relevant.  The bug is in the 386bsd make, might
  14. be applicable to BSDI's system also.
  15.  
  16.  
  17. From: jfw@eddie.mit.edu (John Woods)
  18. Newsgroups: comp.bugs.4bsd
  19. Subject: Bug in make (4.3Reno/NET2)
  20. Message-ID: <1992Mar17.052343.7513@eddie.mit.edu>
  21. Date: 17 Mar 92 05:23:43 GMT
  22. Sender: news@eddie.mit.edu (Usenet News)
  23. Reply-To: jfw@eddie.mit.edu (John Woods)
  24. Organization: MIT EECS/ECF Facility, Cambridge Mass
  25. Lines: 32
  26.  
  27.  
  28. There is a bug in the new make from 4.3Reno and also present in the Net2
  29. release (as found on uunet).  A command line argument consisting of a lone
  30. dash (-) causes an infinite loop ("make - make" was an excellent test case).
  31.  
  32. I believe the following patch fixes the bug; it still represents what I
  33. would call unwarranted chumminess with the library.  The fix is to keep
  34. getopt() from being asked to re-examine the - argument, which it will
  35. again call an error and not advance optind past...
  36.  
  37. *** main.c.orig    Mon Mar 16 20:19:13 1992
  38. --- main.c    Mon Mar 16 20:20:52 1992
  39. ***************
  40. *** 280,286 ****
  41.               if (!**argv)
  42.                   Punt("illegal (null) argument.");
  43.               if (**argv == '-') {
  44. !                 optind = 0;
  45.                   goto rearg;
  46.               }
  47.               (void)Lst_AtEnd(create, (ClientData)*argv);
  48. --- 280,289 ----
  49.               if (!**argv)
  50.                   Punt("illegal (null) argument.");
  51.               if (**argv == '-') {
  52. !                 if ((*argv)[1])
  53. !                     optind = 0;    /* -flag... */
  54. !                 else
  55. !                     optind = 1;    /* - */
  56.                   goto rearg;
  57.               }
  58.               (void)Lst_AtEnd(create, (ClientData)*argv);
  59.  
  60.