home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / gnu / utils / bug / 1564 < prev    next >
Encoding:
Text File  |  1992-09-11  |  4.9 KB  |  202 lines

  1. Path: sparky!uunet!elroy.jpl.nasa.gov!swrinde!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!cs.huji.ac.il!amoss
  2. From: amoss@cs.huji.ac.il (Amos Shapira)
  3. Newsgroups: gnu.utils.bug
  4. Subject: small fixes to compile gtar-1.11 on SGI Irix 4.0.4
  5. Message-ID: <9209111305.AA21613@cs.huji.ac.il>
  6. Date: 11 Sep 92 17:05:22 GMT
  7. Sender: gnulists@ai.mit.edu
  8. Distribution: gnu
  9. Organization: GNUs Not Usenet
  10. Lines: 189
  11. Approved: bug-gnu-utils@prep.ai.mit.edu
  12.  
  13. Hello,
  14.  
  15. Here are some differences in compiling gtar 1.11 on SGI Indigo's running
  16. Irix 4.0.4 (should be the same for all SGI platforms).
  17.  
  18. 1. The configure script, for some reason, doesn't recognize that there IS
  19.    a valloc function provided.
  20.  
  21. 2. Though you don't give this much importance, it would be nice if on SGI's
  22.    the DEF_AR_FILE will be /dev/tape.
  23.  
  24. The following configure command (from csh) will make it run:
  25.  
  26. env DEFS=-DHAVE_VALLOC DEF_AR_FILE=/dev/tape ./configure
  27.  
  28. 3. There are some mel-declerations in the sources, the attached patch will
  29. fix this.  I recompiled the same source on Sun4's (SunOS 4.1.1) after dropping
  30. them in and it passed without any problems.
  31.  
  32. Cheers, and thanks for the effort.
  33.  
  34. --Amos Shapira
  35.  
  36. CS System Group, Hebrew University, Jerusalem, Israel
  37. amoss@cs.huji.ac.il
  38. ----------------------------------------------------------------------
  39. diff -cr tar-1.11/create.c tar-1.11-huji/create.c
  40. *** tar-1.11/create.c    Tue Sep  8 21:53:02 1992
  41. --- tar-1.11-huji/create.c    Fri Sep 11 13:26:13 1992
  42. ***************
  43. *** 41,46 ****
  44. --- 41,50 ----
  45.   #endif
  46.   #endif
  47.   
  48. + #ifdef sgi
  49. + #include <utime.h>    /* for utimbuf */
  50. + #endif
  51.   #include "tar.h"
  52.   #include "port.h"
  53.   
  54. ***************
  55. *** 574,580 ****
  56. --- 578,588 ----
  57.                 msg_perror ("cannot remove %s", p);
  58.             }
  59.           if (f_atime_preserve)
  60. + #ifdef sgi
  61. +           utime (p, (struct utimbuf *)restore_times);
  62. + #else
  63.             utime (p, restore_times);
  64. + #endif
  65.           return;
  66.   
  67.           /*
  68. ***************
  69. *** 594,600 ****
  70. --- 602,612 ----
  71.           if(f>=0)
  72.               (void)close(f);
  73.           if (f_atime_preserve)
  74. + #ifdef sgi
  75. +           utime (p, (struct utimbuf *)restore_times);
  76. + #else
  77.             utime (p, restore_times);
  78. + #endif
  79.               return;
  80.       }
  81.   
  82. ***************
  83. *** 727,733 ****
  84. --- 739,749 ----
  85.               if(f_multivol)
  86.                   save_name = 0;
  87.               if (f_atime_preserve)
  88. + #ifdef sgi
  89. +               utime (p, (struct utimbuf *)restore_times);
  90. + #else
  91.                 utime (p, restore_times);
  92. + #endif
  93.                return;
  94.           }
  95.   
  96. ***************
  97. *** 786,792 ****
  98. --- 802,812 ----
  99.           closedir(dirp);
  100.           free(namebuf);
  101.           if (f_atime_preserve)
  102. + #ifdef sgi
  103. +           utime (p, (struct utimbuf *)restore_times);
  104. + #else
  105.             utime (p, restore_times);
  106. + #endif
  107.           return;
  108.       }
  109.   
  110. diff -cr tar-1.11/extract.c tar-1.11-huji/extract.c
  111. *** tar-1.11/extract.c    Tue Sep  8 22:09:11 1992
  112. --- tar-1.11-huji/extract.c    Fri Sep 11 13:29:28 1992
  113. ***************
  114. *** 53,59 ****
  115.   #include "tar.h"
  116.   #include "port.h"
  117.   
  118. ! #if defined(_POSIX_VERSION)
  119.   #include <utime.h>
  120.   #endif
  121.   
  122. --- 53,59 ----
  123.   #include "tar.h"
  124.   #include "port.h"
  125.   
  126. ! #if defined(_POSIX_VERSION) || defined(sgi)
  127.   #include <utime.h>
  128.   #endif
  129.   
  130. ***************
  131. *** 485,492 ****
  132. --- 485,497 ----
  133.                   acc_upd_times[0]=hstat.st_atime;
  134.               else acc_upd_times[0] = now;             /* Accessed now */
  135.               acc_upd_times[1] = hstat.st_mtime; /* Mod'd */
  136. + #ifdef sgi
  137.               if (utime(skipcrud + current_file_name,
  138. +                   (struct utimbuf *)acc_upd_times) < 0) {
  139. + #else
  140. +             if (utime(skipcrud + current_file_name,
  141.                     acc_upd_times) < 0) {
  142. + #endif
  143.                 msg_perror("couldn't change access and modification times of %s",skipcrud + current_file_name);
  144.               }
  145.           }
  146. ***************
  147. *** 802,808 ****
  148. --- 807,818 ----
  149.       acc_upd_times[0]=saved_dir_info_head -> atime;
  150.         else acc_upd_times[0] = now; /* Accessed now */
  151.         acc_upd_times[1] = saved_dir_info_head -> mtime; /* Mod'd */
  152. + #ifdef sgi
  153. +       if (utime(saved_dir_info_head -> path,
  154. +         (struct utimbuf *)acc_upd_times) < 0) {
  155. + #else
  156.         if (utime(saved_dir_info_head -> path, acc_upd_times) < 0) {
  157. + #endif
  158.       msg_perror("couldn't change access and modification times of %s",
  159.              saved_dir_info_head -> path);
  160.         }
  161. diff -cr tar-1.11/names.c tar-1.11-huji/names.c
  162. *** tar-1.11/names.c    Tue Jul 16 08:45:05 1991
  163. --- tar-1.11-huji/names.c    Fri Sep 11 13:31:18 1992
  164. ***************
  165. *** 30,35 ****
  166. --- 30,38 ----
  167.   
  168.   #ifndef NONAMES
  169.   /* Whole module goes away if NONAMES defined.  Otherwise... */
  170. + #ifdef sgi
  171. + #include <stdio.h>    /* for struct __file_s */
  172. + #endif
  173.   #include <pwd.h>
  174.   #include <grp.h>
  175.   
  176. ***************
  177. *** 58,64 ****
  178. --- 61,69 ----
  179.       int    uid;
  180.   {
  181.       struct passwd    *pw;
  182. + #if !defined(sgi)
  183.       extern struct passwd *getpwuid ();
  184. + #endif
  185.   
  186.       if (uid != saveuid) {
  187.           saveuid = uid;
  188. ***************
  189. *** 97,103 ****
  190. --- 102,110 ----
  191.       int    gid;
  192.   {
  193.       struct group    *gr;
  194. + #if !defined(sgi)
  195.       extern struct group *getgrgid ();
  196. + #endif
  197.   
  198.       if (gid != savegid) {
  199.           savegid = gid;
  200. ----------------------------------------------------------------------
  201.