Article View: gnu.utils.bug
Article #364Suggested change to ranlib.c
From: xochitl!argon!cheeks
Date: Mon, 14 Aug 1989 20:31
Date: Mon, 14 Aug 1989 20:31
67 lines
1849 bytes
1849 bytes
I'd like to suggest the following change to ranlib.c which enables the -v
switch to be passed on to ar.
*** ranlib.c.orig Fri Mar 10 14:05:29 1989
--- ranlib.c Thu Aug 10 11:17:52 1989
***************
*** 4,9 ****
--- 4,10 ----
#include <ar.h>
#include <sys/time.h>
#include <sys/file.h>
+ #include <fcntl.h>
#include <stdio.h>
void touch_symdefs ();
***************
*** 17,34 ****
int argc;
char **argv;
{
! int i;
int touch = 0;
if (argv[1][0] == '-' && argv[1][1] == 't' && argv[1][2] == '\0')
touch_symdefs (argc - 2, argv + 2);
else
! for (i = 1; i < argc; i++)
{
int pid = fork ();
if (pid == 0)
{
! execl (prog, prog, "rs", argv[i], 0);
perror (prog);
exit (1);
}
--- 18,44 ----
int argc;
char **argv;
{
! int i, j;
int touch = 0;
+ char *args;
if (argv[1][0] == '-' && argv[1][1] == 't' && argv[1][2] == '\0')
touch_symdefs (argc - 2, argv + 2);
else
! if (argv[1][0] == '-' && argv[1][1] == 'v' && argv[1][2] == '\0') {
! args = "rsv";
! j = 1;
! }
! else {
! args = "rs";
! j = 0;
! }
! for (i = j + 1; i < argc; i++)
{
int pid = fork ();
if (pid == 0)
{
! execl (prog, prog, args, argv[i], 0);
perror (prog);
exit (1);
}
Mark Costlow
..texsun!xochitl!cheeks
Technical Details
Message-ID:
<8908142032.AA00443@xochitl.uucp>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!watmath!uunet!tut.cis.ohio-state.edu!CENTRAL.SUN.COM!xochitl!argon!cheeksShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watmath!uunet!tut.cis.ohio-state.edu!CENTRAL.SUN.COM!xochitl!argon!cheeks From: xochitl!argon!cheeks@CENTRAL.SUN.COM Newsgroups: gnu.utils.bug Subject: Suggested change to ranlib.c Message-ID: <8908142032.AA00443@xochitl.uucp> Date: 14 Aug 89 20:31:08 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 67