home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!elroy.jpl.nasa.gov!swrinde!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!cs.huji.ac.il!amoss
- From: amoss@cs.huji.ac.il (Amos Shapira)
- Newsgroups: gnu.utils.bug
- Subject: small fixes to compile gtar-1.11 on SGI Irix 4.0.4
- Message-ID: <9209111305.AA21613@cs.huji.ac.il>
- Date: 11 Sep 92 17:05:22 GMT
- Sender: gnulists@ai.mit.edu
- Distribution: gnu
- Organization: GNUs Not Usenet
- Lines: 189
- Approved: bug-gnu-utils@prep.ai.mit.edu
-
- Hello,
-
- Here are some differences in compiling gtar 1.11 on SGI Indigo's running
- Irix 4.0.4 (should be the same for all SGI platforms).
-
- 1. The configure script, for some reason, doesn't recognize that there IS
- a valloc function provided.
-
- 2. Though you don't give this much importance, it would be nice if on SGI's
- the DEF_AR_FILE will be /dev/tape.
-
- The following configure command (from csh) will make it run:
-
- env DEFS=-DHAVE_VALLOC DEF_AR_FILE=/dev/tape ./configure
-
- 3. There are some mel-declerations in the sources, the attached patch will
- fix this. I recompiled the same source on Sun4's (SunOS 4.1.1) after dropping
- them in and it passed without any problems.
-
- Cheers, and thanks for the effort.
-
- --Amos Shapira
-
- CS System Group, Hebrew University, Jerusalem, Israel
- amoss@cs.huji.ac.il
- ----------------------------------------------------------------------
- diff -cr tar-1.11/create.c tar-1.11-huji/create.c
- *** tar-1.11/create.c Tue Sep 8 21:53:02 1992
- --- tar-1.11-huji/create.c Fri Sep 11 13:26:13 1992
- ***************
- *** 41,46 ****
- --- 41,50 ----
- #endif
- #endif
-
- + #ifdef sgi
- + #include <utime.h> /* for utimbuf */
- + #endif
- +
- #include "tar.h"
- #include "port.h"
-
- ***************
- *** 574,580 ****
- --- 578,588 ----
- msg_perror ("cannot remove %s", p);
- }
- if (f_atime_preserve)
- + #ifdef sgi
- + utime (p, (struct utimbuf *)restore_times);
- + #else
- utime (p, restore_times);
- + #endif
- return;
-
- /*
- ***************
- *** 594,600 ****
- --- 602,612 ----
- if(f>=0)
- (void)close(f);
- if (f_atime_preserve)
- + #ifdef sgi
- + utime (p, (struct utimbuf *)restore_times);
- + #else
- utime (p, restore_times);
- + #endif
- return;
- }
-
- ***************
- *** 727,733 ****
- --- 739,749 ----
- if(f_multivol)
- save_name = 0;
- if (f_atime_preserve)
- + #ifdef sgi
- + utime (p, (struct utimbuf *)restore_times);
- + #else
- utime (p, restore_times);
- + #endif
- return;
- }
-
- ***************
- *** 786,792 ****
- --- 802,812 ----
- closedir(dirp);
- free(namebuf);
- if (f_atime_preserve)
- + #ifdef sgi
- + utime (p, (struct utimbuf *)restore_times);
- + #else
- utime (p, restore_times);
- + #endif
- return;
- }
-
- diff -cr tar-1.11/extract.c tar-1.11-huji/extract.c
- *** tar-1.11/extract.c Tue Sep 8 22:09:11 1992
- --- tar-1.11-huji/extract.c Fri Sep 11 13:29:28 1992
- ***************
- *** 53,59 ****
- #include "tar.h"
- #include "port.h"
-
- ! #if defined(_POSIX_VERSION)
- #include <utime.h>
- #endif
-
- --- 53,59 ----
- #include "tar.h"
- #include "port.h"
-
- ! #if defined(_POSIX_VERSION) || defined(sgi)
- #include <utime.h>
- #endif
-
- ***************
- *** 485,492 ****
- --- 485,497 ----
- acc_upd_times[0]=hstat.st_atime;
- else acc_upd_times[0] = now; /* Accessed now */
- acc_upd_times[1] = hstat.st_mtime; /* Mod'd */
- + #ifdef sgi
- if (utime(skipcrud + current_file_name,
- + (struct utimbuf *)acc_upd_times) < 0) {
- + #else
- + if (utime(skipcrud + current_file_name,
- acc_upd_times) < 0) {
- + #endif
- msg_perror("couldn't change access and modification times of %s",skipcrud + current_file_name);
- }
- }
- ***************
- *** 802,808 ****
- --- 807,818 ----
- acc_upd_times[0]=saved_dir_info_head -> atime;
- else acc_upd_times[0] = now; /* Accessed now */
- acc_upd_times[1] = saved_dir_info_head -> mtime; /* Mod'd */
- + #ifdef sgi
- + if (utime(saved_dir_info_head -> path,
- + (struct utimbuf *)acc_upd_times) < 0) {
- + #else
- if (utime(saved_dir_info_head -> path, acc_upd_times) < 0) {
- + #endif
- msg_perror("couldn't change access and modification times of %s",
- saved_dir_info_head -> path);
- }
- diff -cr tar-1.11/names.c tar-1.11-huji/names.c
- *** tar-1.11/names.c Tue Jul 16 08:45:05 1991
- --- tar-1.11-huji/names.c Fri Sep 11 13:31:18 1992
- ***************
- *** 30,35 ****
- --- 30,38 ----
-
- #ifndef NONAMES
- /* Whole module goes away if NONAMES defined. Otherwise... */
- + #ifdef sgi
- + #include <stdio.h> /* for struct __file_s */
- + #endif
- #include <pwd.h>
- #include <grp.h>
-
- ***************
- *** 58,64 ****
- --- 61,69 ----
- int uid;
- {
- struct passwd *pw;
- + #if !defined(sgi)
- extern struct passwd *getpwuid ();
- + #endif
-
- if (uid != saveuid) {
- saveuid = uid;
- ***************
- *** 97,103 ****
- --- 102,110 ----
- int gid;
- {
- struct group *gr;
- + #if !defined(sgi)
- extern struct group *getgrgid ();
- + #endif
-
- if (gid != savegid) {
- savegid = gid;
- ----------------------------------------------------------------------
-