ranlib.c 483 B

123456789101112131415161718192021222324252627
  1. /* Dummy ranlib program for GNU. All it does is
  2. `ar rs LIBRARY' for each library specified. */
  3. /* The makefile generates a -D switch to define AR_PROG
  4. as the location of the GNU AR program. */
  5. char *prog = AR_PROG;
  6. main (argc, argv)
  7. int argc;
  8. char **argv;
  9. {
  10. int i;
  11. for (i = 1; i < argc; i++)
  12. {
  13. int pid = fork ();
  14. if (pid == 0)
  15. {
  16. execl (prog, prog, "rs", argv[i], 0);
  17. perror (prog);
  18. exit (1);
  19. }
  20. wait (0);
  21. }
  22. exit (0);
  23. }