🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.utils.bug
Article #1297

time 1.4 incorrectly declares execvp

#1297
From: James Clark
Date: Mon, 11 Jan 1993 22:55
39 lines
1526 bytes
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);
      }
Technical Details
Message-ID: <9301112255.AA17059@jclark.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!jclark.com!jjc

Show Full Headers
Complete Article Headers
Newsgroups: gnu.utils.bug
Path: arc1-ca.pugleaf.net!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