[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Patches for GNU tar 1.13.25
From: |
Bruce Lilly |
Subject: |
Patches for GNU tar 1.13.25 |
Date: |
Sat, 03 Aug 2002 12:40:14 -0400 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.8) Gecko/20020204 |
The attached patch addresses most of the issues
when compiling GNU tar 1.13.25 on an AT&T 3B1.
1. One of the system headers defines index as strchr
for BSD compatibility; unfortunately that causes
problems when an integer variable named index is
used as ... an index.
2. Several files use size_t, pid_t, etc. w/o including
<sys/types.h>.
3. Some symlink() code is not wrapped in an #ifdef
HAVE_SYMLINK wrapper.
Other issues:
1. configure is broken (surprise, surprise, surprise).
ls should not be used to test for file existence;
moreover if ls prints "a.exe not found" that should
not be construed as evidence that a file named "a.exe"
*does* exist... The correct way to portably test for
file existence is:
for file in a.out conftest a.exe conftest.exe a* conftest*
do if test -f $file
then
whatever
fi
done
In this specific case test -x might be more appropriate.
1a. configure relies on peculiar sed expressions, at least
one of which (with nested \(...\)) is apparently not
used. Ideally, only portable expressions should be used.
1b. It is necessary to tell configure --build=m68k-motorola-sysv
which isn't true, but config.guess / config.sub seem to
be broken.
2. A number of additional library functions will be required
to link the executable on a 3b1.
Best regards,
Bruce Lilly
*** intl/dcigettext.c.o Thu Aug 1 20:21:00 2002
--- intl/dcigettext.c Thu Aug 1 20:21:18 2002
***************
*** 94,99 ****
--- 94,101 ----
# define __libc_rwlock_unlock(NAME)
#endif
+ #undef index
+
/* Alignment of types. */
#if defined __GNUC__ && __GNUC__ >= 2
# define alignof(TYPE) __alignof__ (TYPE)
*** lib/dirname.h.orig Sat Aug 3 07:36:12 2002
--- lib/dirname.h Sat Aug 3 07:36:16 2002
***************
*** 17,22 ****
--- 17,24 ----
#ifndef DIRNAME_H_
# define DIRNAME_H_ 1
+ #include <sys/types.h>
+
# ifndef PARAMS
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
# define PARAMS(Args) Args
*** lib/unicodeio.h.or Sat Aug 3 10:05:16 2002
--- lib/unicodeio.h Sat Aug 3 10:05:31 2002
***************
*** 19,24 ****
--- 19,25 ----
#ifndef UNICODEIO_H
# define UNICODEIO_H
+ # include <sys/types.h>
# include <stdio.h>
# ifndef PARAMS
*** lib/waitpid.c.orig Sat Aug 3 10:23:48 2002
--- lib/waitpid.c Sat Aug 3 10:24:07 2002
***************
*** 20,25 ****
--- 20,27 ----
# include <config.h>
#endif
+ #include <sys/types.h>
+
#include <errno.h>
#ifndef errno
extern int errno;
*** src/extract.c.orig Sat Aug 3 11:16:10 2002
--- src/extract.c Sat Aug 3 11:16:48 2002
***************
*** 1259,1264 ****
--- 1259,1265 ----
unlink_error (source);
else if (valid_source && link (valid_source, source) == 0)
;
+ #ifdef HAVE_SYMLINK
else if (symlink (ds->target, source) != 0)
symlink_error (ds->target, source);
else
***************
*** 1268,1273 ****
--- 1269,1275 ----
st.st_gid = ds->gid;
set_stat (source, &st, 0, 0, 0, SYMTYPE);
}
+ #endif
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Patches for GNU tar 1.13.25,
Bruce Lilly <=