Re: NEW TAR

From: Barry Bouwsma <freebsd-misuser_at_remove-NOSPAM-to-reply.NOSPAM.dyndns.dk>
Date: Thu, 29 Jul 2004 13:59:20 +0200 (CEST)
[introduced to freebsd-stable_at_ , don't bother replying directly to me]

On Sat, 17 Jul 2004 10:37:28 -0700, Tim Kientzle proclaimed:

> By default, /usr/bin/tar is now a symlink pointing
> to /usr/bin/bsdtar.
  [in -current]

[...]

>   * Portability:  gtar is portable to many different Unix and non-Unix
>     systems.  bsdtar supports standard file formats that are widely
>     supported by other implementations.  There are efforts to port
>     bsdtar to other platforms.

Would it be possible to include patches similar to (or based
upon) the following diffs, in order to get `bsdtar' to compile
cleanly under my (older) 4.x -- based on checking out HEAD of
libarchive and bsdtar from the CVS repository?  (I haven't looked
for source otherwise, sorry; this is to make an future MFC more
compatible with older 4.x)


--- bsdtar_platform.h-ORIG	Sun Jul 25 10:51:11 2004
+++ bsdtar_platform.h	Sun Jul 25 11:48:16 2004
_at__at_ -43,8 +43,10 _at__at_
 #define	HAVE_CHFLAGS		1
 #define	ARCHIVE_STAT_MTIME_NANOS(st)	(st)->st_mtimespec.tv_nsec
 
+#if __FreeBSD_version >= 450002 /* nl_langinfo introduced */
 /* nl_langinfo supports D_MD_ORDER (FreeBSD extension) */
 #define HAVE_NL_LANGINFO_D_MD_ORDER	1
+#endif
 
 #if __FreeBSD__ > 4
 #define	HAVE_GETOPT_LONG	1



--- write.c-ORIG	Sun Jul 25 10:51:11 2004
+++ write.c	Sun Jul 25 11:56:30 2004
_at__at_ -52,6 +52,13 _at__at_
 
 #include "bsdtar.h"
 
+/* #if __FreeBSD_version < ???    XXX  not present in my 4.x ... */
+#ifndef _ID_T_DECLARED
+typedef	__int64_t	id_t;
+#define _ID_T_DECLARED
+#endif  /* XXXX HACK   how to do this right?  what about other OSen??  */
+
+
 /* Fixed size of uname/gname caches. */
 #define	name_cache_size 101
 

As you see, I'm not sure how to best handle id_t above.
My source may be outdated, being some ten days old.


thanks,
barry bouwsma
Received on Thu Jul 29 2004 - 10:00:00 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:03 UTC