home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: gnu.utils.bug
- Path: sparky!uunet!cis.ohio-state.edu!jclark.com!jjc
- From: jjc@jclark.com (James Clark)
- Subject: time 1.4 incorrectly declares execvp
- Message-ID: <9301112255.AA17059@jclark.com>
- Sender: gnulists@ai.mit.edu
- Organization: GNUs Not Usenet
- Distribution: gnu
- Date: Mon, 11 Jan 1993 22:55:33 GMT
- Approved: bug-gnu-utils@prep.ai.mit.edu
- Lines: 40
-
- In time 1.4, time.c declares execvp() incorrectly. POSIX says the type
- of the second argument is `char *const *' not `const char **'.
-
- *** time.c~ Mon Jan 11 22:45:35 1993
- --- time.c Mon Jan 11 22:51:08 1993
- ***************
- *** 81,87 ****
- #endif
-
- #ifndef _POSIX_VERSION
- ! int execvp P_((const char *, const char **));
- int fork P_((void));
- void _exit P_((int));
- #endif /* !_POSIX_VERSION */
- --- 81,87 ----
- #endif
-
- #ifndef _POSIX_VERSION
- ! int execvp P_((const char *, char *const *));
- int fork P_((void));
- void _exit P_((int));
- #endif /* !_POSIX_VERSION */
- ***************
- *** 637,643 ****
- error (1, errno, "cannot fork");
- else if (pid == 0)
- { /* If child. */
- ! execvp (cmd[0], (const char **) cmd);
- error (0, errno, "cannot run %s", cmd[0]);
- _exit (errno == ENOENT ? 127 : 126);
- }
- --- 637,643 ----
- error (1, errno, "cannot fork");
- else if (pid == 0)
- { /* If child. */
- ! execvp (cmd[0], (char *const *) cmd);
- error (0, errno, "cannot run %s", cmd[0]);
- _exit (errno == ENOENT ? 127 : 126);
- }
-
-