bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Translator support for GNU tar


From: Alfred M. Szmidt
Subject: Re: Translator support for GNU tar
Date: Fri, 20 Jun 2003 00:25:35 +0200

   I really appreciate any feedback, even about the changelog (My english
   sucks and I guess I made some mistakes). :)

Here you go.

   2003-06-19  Marco Gerards  <metgerards@student.han.nl>

           * configure.ac: Check for hurd.h.
           * src/common.h (dump_translator_option): New variable.
           (trans_stat): New prototype.
           * compare.c: Include hurd.h when compiling for the Hurd.

Since including hurd.h is a conditonal you should write it like that.
The same goes for each bit that is only used when an specific macro is
defined.  For example:

  * compare [HAVE_HURD_H]: ....

   diff -upr tar-1.13.25/src/create.c tar-1.13.25_hurd/src/create.c
   --- tar-1.13.25/src/create.c 2001-08-29 23:21:02.000000000 +0200
   +++ tar-1.13.25_hurd/src/create.c    2003-06-19 19:27:32.000000000 +0200
   @@ -38,6 +40,11 @@ struct utimbuf
    #include "common.h"
    #include <hash.h>

   +#if HAVE_HURD_H
   +# include <hurd.h>
   +# include <argz.h>

Isn't argz.h a glibc specific header only?  If so make an seperate
autoconf check for it (HAVE_ARGZ_H).

   diff -upr tar-1.13.25/src/tar.c tar-1.13.25_hurd/src/tar.c
   --- tar-1.13.25/src/tar.c    2001-09-21 02:11:27.000000000 +0200
   +++ tar-1.13.25_hurd/src/tar.c       2003-06-19 19:27:32.000000000 +0200
   @@ -227,6 +227,9 @@ static struct option long_options[] =
      {"newer-mtime", required_argument, 0, NEWER_MTIME_OPTION},
      {"null", no_argument, 0, NULL_OPTION},
      {"no-anchored", no_argument, 0, NO_ANCHORED_OPTION},
   +#if HAVE_HURD_H
   +  {"no-deref-trans", no_argument, 0, 'a'},
   +#endif

Making system specific options that exist on one system but not on the
other is bad since it will create unportable version of the same
version of the program.  For example, I have a backup script on
GNU/Hurd and GNU/Linux, on one system it will barf on the other one it
will work.  Better make it an no-op, that way it will work on all
platforms, but won't do anything usefull on platforms that don't
support translators.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]