Article View: gnu.utils.bug
Article #899minor fixes for gnu tar 1.11.1
From: Randy Wright
Date: Mon, 12 Oct 1992 15:05
Date: Mon, 12 Oct 1992 15:05
270 lines
7735 bytes
7735 bytes
Hi. Just ported Gnu tar 1.11.1 to a Convex over the weekend, using
gcc 2.2.2 and gnumake 3.62. The following minor inconveniences
were noted and are fixed by the attached diffs.
(1) Makefile.in
(a) Should use "$(YACC)" instead of "yacc" so that one may use
Bison or yacc as desired.
(b) My diff below doesn't show it, but I see 9, rather than 8,
shift/reduce conflicts in getdate.y - using either Bison or
BSD yacc. Perhaps the comment `getdate.y has 8 shift/reduce
conflicts' should be updated?
(2) names.c
Added `#ifdef _POSIX_SOURCE' test which defines the existing
pre-processor symbols HAVE_GETPWUID and HAVE_GETGRGID. Also
added equivalent HAVE_GETPWNAM and HAVE_GETGRNAM. This change
is to suppress potential conflict between extern declaration of
these functions within name.c and POSIX-mandated extern
declaration, which may include argument prototypes, in the
system's <pwd.h> and <grp.h>
(3) buffer.c create.c diffarch.c extract.c list.c port.c update.c
Same minor change to all of these. The use of <sys/file.h>
if defined(BSD42) is overridden by definition of _POSIX_SOURCE.
In a POSIX environment, even one such as ConvexOS based on
BSD42, the use of <fcntl.h> is a better choice.
The rest of this message, past the signature, is diff's to accomplish
the above above changes.
--
Randy Wright Usmail: Convex Computers
Phone: (214) 497-4868 3000 Waterview Pky. M/S DV4
Email: rwright@convex.com P.O. Box 833851
Richardson, TX 75083-3851
-------diffs follow-------
RCS file: RCS/Makefile.in,v
retrieving revision 1.1
diff -c -r1.1 Makefile.in
*** /tmp/,RCSt1021547 Mon Oct 12 09:51:14 1992
--- Makefile.in Mon Oct 12 09:45:50 1992
***************
*** 142,148 ****
tar.o fnmatch.o: fnmatch.h
getdate.c: getdate.y
! yacc getdate.y
mv y.tab.c getdate.c
# getdate.y has 8 shift/reduce conflicts.
--- 142,148 ----
tar.o fnmatch.o: fnmatch.h
getdate.c: getdate.y
! $(YACC) $<
mv y.tab.c getdate.c
# getdate.y has 8 shift/reduce conflicts.
===================================================================
RCS file: RCS/buffer.c,v
retrieving revision 1.1
diff -c -r1.1 buffer.c
*** /tmp/,RCSt1021547 Mon Oct 12 09:51:14 1992
--- buffer.c Mon Oct 12 09:47:51 1992
***************
*** 38,44 ****
#include <sys/mtio.h>
#endif
! #ifdef BSD42
#include <sys/file.h>
#else
#ifndef V7
--- 38,44 ----
#include <sys/mtio.h>
#endif
! #if defined(BSD42) && !defined(_POSIX_SOURCE)
#include <sys/file.h>
#else
#ifndef V7
===================================================================
RCS file: RCS/create.c,v
retrieving revision 1.1
diff -c -r1.1 create.c
*** /tmp/,RCSt1021547 Mon Oct 12 09:51:15 1992
--- create.c Mon Oct 12 09:47:53 1992
***************
*** 33,39 ****
extern int errno;
#endif
! #ifdef BSD42
#include <sys/file.h>
#else
#ifndef V7
--- 33,39 ----
extern int errno;
#endif
! #if defined(BSD42) && !defined(_POSIX_SOURCE)
#include <sys/file.h>
#else
#ifndef V7
===================================================================
RCS file: RCS/diffarch.c,v
retrieving revision 1.1
diff -c -r1.1 diffarch.c
*** /tmp/,RCSt1021547 Mon Oct 12 09:51:16 1992
--- diffarch.c Mon Oct 12 09:47:54 1992
***************
*** 30,36 ****
#endif
#include <sys/types.h>
! #ifdef BSD42
#include <sys/file.h>
#else
#ifndef V7
--- 30,36 ----
#endif
#include <sys/types.h>
! #if defined(BSD42) && !defined(_POSIX_SOURCE)
#include <sys/file.h>
#else
#ifndef V7
===================================================================
RCS file: RCS/extract.c,v
retrieving revision 1.1
diff -c -r1.1 extract.c
*** /tmp/,RCSt1021547 Mon Oct 12 09:51:17 1992
--- extract.c Mon Oct 12 09:47:56 1992
***************
*** 32,38 ****
#include <time.h>
time_t time();
! #ifdef BSD42
#include <sys/file.h>
#else
#ifndef V7
--- 32,38 ----
#include <time.h>
time_t time();
! #if defined(BSD42) && !defined(_POSIX_SOURCE)
#include <sys/file.h>
#else
#ifndef V7
===================================================================
RCS file: RCS/list.c,v
retrieving revision 1.1
diff -c -r1.1 list.c
*** /tmp/,RCSt1021547 Mon Oct 12 09:51:17 1992
--- list.c Mon Oct 12 09:47:57 1992
***************
*** 34,40 ****
#endif
#include <time.h>
! #ifdef BSD42
#include <sys/file.h>
#else
#ifndef V7
--- 34,40 ----
#endif
#include <time.h>
! #if defined(BSD42) && !defined(_POSIX_SOURCE)
#include <sys/file.h>
#else
#ifndef V7
===================================================================
RCS file: RCS/names.c,v
retrieving revision 1.1
diff -c -r1.1 names.c
*** /tmp/,RCSt1021547 Mon Oct 12 09:51:18 1992
--- names.c Mon Oct 12 09:49:50 1992
***************
*** 45,50 ****
--- 45,57 ----
#define myuid ( my_uid < 0? (my_uid = getuid()): my_uid )
#define mygid ( my_gid < 0? (my_gid = getgid()): my_gid )
+ #ifdef _POSIX_SOURCE
+ #define HAVE_GETPWUID
+ #define HAVE_GETPWNAM
+ #define HAVE_GETGRGID
+ #define HAVE_GETGRNAM
+ #endif
+
/*
* Look up a user or group name from a uid/gid, maintaining a cache.
* FIXME, for now it's a one-entry cache.
***************
*** 78,84 ****
--- 85,93 ----
char uname[TUNMLEN];
{
struct passwd *pw;
+ #ifndef HAVE_GETPWNAM
extern struct passwd *getpwnam();
+ #endif
if (uname[0] != saveuname[0] /* Quick test w/o proc call */
|| 0!=strncmp(uname, saveuname, TUNMLEN)) {
***************
*** 121,127 ****
--- 130,138 ----
char gname[TUNMLEN];
{
struct group *gr;
+ #ifndef HAVE_GETGRNAM
extern struct group *getgrnam();
+ #endif
if (gname[0] != savegname[0] /* Quick test w/o proc call */
|| 0!=strncmp(gname, savegname, TUNMLEN)) {
===================================================================
RCS file: RCS/port.c,v
retrieving revision 1.1
diff -c -r1.1 port.c
*** /tmp/,RCSt1021547 Mon Oct 12 09:51:19 1992
--- port.c Mon Oct 12 09:47:58 1992
***************
*** 25,31 ****
extern int errno;
#endif
! #ifdef BSD42
#include <sys/file.h>
#else
#ifndef V7
--- 25,31 ----
extern int errno;
#endif
! #if defined(BSD42) && !defined(_POSIX_SOURCE)
#include <sys/file.h>
#else
#ifndef V7
===================================================================
RCS file: RCS/update.c,v
retrieving revision 1.1
diff -c -r1.1 update.c
*** /tmp/,RCSt1021547 Mon Oct 12 09:51:19 1992
--- update.c Mon Oct 12 09:48:00 1992
***************
*** 35,41 ****
#include <sys/mtio.h>
#endif
! #ifdef BSD42
#include <sys/file.h>
#else
#ifndef V7
--- 35,41 ----
#include <sys/mtio.h>
#endif
! #if defined(BSD42) && !defined(_POSIX_SOURCE)
#include <sys/file.h>
#else
#ifndef V7
--
Randy Wright Usmail: Convex Computers
Phone: (214) 497-4868 3000 Waterview Pky. M/S DV4
Email: rwright@convex.com P.O. Box 833851
Richardson, TX 75083-3851
Technical Details
Message-ID:
<9210121505.AA08753@dhostwo.convex.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!convex!darwin.sura.net!spool.mu.edu!agate!usenet.ins.cwru.edu!magnus.acs.ohio-state.edu!cis.ohio-state.edu!dhostwo.convex.com!rwrightShow Full Headers
Complete Article Headers
Newsgroups: gnu.utils.bug Path: arc1-ca.pugleaf.net!sparky!uunet!convex!darwin.sura.net!spool.mu.edu!agate!usenet.ins.cwru.edu!magnus.acs.ohio-state.edu!cis.ohio-state.edu!dhostwo.convex.com!rwright From: rwright@dhostwo.convex.com (Randy Wright) Subject: minor fixes for gnu tar 1.11.1 Message-ID: <9210121505.AA08753@dhostwo.convex.com> Sender: gnulists@ai.mit.edu Reply-To: rwright@convex.com Organization: Convex Computer Corporation Distribution: gnu Date: Mon, 12 Oct 1992 15:05:49 GMT Approved: bug-gnu-utils@prep.ai.mit.edu Lines: 271