🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by James Clark Mon, 11 Jan 1993 22:55
time 1.4 incorrectly declares execvp
#1297
Author: 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);
      }
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads