home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / gnu / utils / bug / 2371 < prev    next >
Encoding:
Text File  |  1993-01-11  |  1.4 KB  |  53 lines

  1. Newsgroups: gnu.utils.bug
  2. Path: sparky!uunet!cis.ohio-state.edu!jclark.com!jjc
  3. From: jjc@jclark.com (James Clark)
  4. Subject: time 1.4 incorrectly declares execvp
  5. Message-ID: <9301112255.AA17059@jclark.com>
  6. Sender: gnulists@ai.mit.edu
  7. Organization: GNUs Not Usenet
  8. Distribution: gnu
  9. Date: Mon, 11 Jan 1993 22:55:33 GMT
  10. Approved: bug-gnu-utils@prep.ai.mit.edu
  11. Lines: 40
  12.  
  13. In time 1.4, time.c declares execvp() incorrectly. POSIX says the type
  14. of the second argument is `char *const *' not `const char **'.
  15.  
  16. *** time.c~    Mon Jan 11 22:45:35 1993
  17. --- time.c    Mon Jan 11 22:51:08 1993
  18. ***************
  19. *** 81,87 ****
  20.   #endif
  21.   
  22.   #ifndef _POSIX_VERSION
  23. ! int execvp P_((const char *, const char **));
  24.   int fork P_((void));
  25.   void _exit P_((int));
  26.   #endif /* !_POSIX_VERSION */
  27. --- 81,87 ----
  28.   #endif
  29.   
  30.   #ifndef _POSIX_VERSION
  31. ! int execvp P_((const char *, char *const *));
  32.   int fork P_((void));
  33.   void _exit P_((int));
  34.   #endif /* !_POSIX_VERSION */
  35. ***************
  36. *** 637,643 ****
  37.       error (1, errno, "cannot fork");
  38.     else if (pid == 0)
  39.       {                /* If child. */
  40. !       execvp (cmd[0], (const char **) cmd);
  41.         error (0, errno, "cannot run %s", cmd[0]);
  42.         _exit (errno == ENOENT ? 127 : 126);
  43.       }
  44. --- 637,643 ----
  45.       error (1, errno, "cannot fork");
  46.     else if (pid == 0)
  47.       {                /* If child. */
  48. !       execvp (cmd[0], (char *const *) cmd);
  49.         error (0, errno, "cannot run %s", cmd[0]);
  50.         _exit (errno == ENOENT ? 127 : 126);
  51.       }
  52.  
  53.