tech-pkg archive

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

Re: archivers/gtar-base issue on NetBSD 5



On Sun, Mar 02, 2014 at 09:59:21AM +0900, OBATA Akio wrote:
 > >at-func.c:77:27: error: macro "readlink" requires 3 arguments, but only 1 
 > >given
 > [...]
 > 
 > My local patch:
 > 
 > --- gnu/at-func.c.orig  2013-06-29 05:54:23.000000000 +0000
 > +++ gnu/at-func.c
 > @@ -43,7 +43,7 @@
 >        return FUNC_FAIL;                         \
 >      }
 >  #else
 > -# define CALL_FUNC(F) (AT_FUNC_F1 (F AT_FUNC_POST_FILE_ARGS))
 > +# define CALL_FUNC(F) (AT_FUNC_F1)(F AT_FUNC_POST_FILE_ARGS)
 >  # define VALIDATE_FLAG(F) /* empty */
 >  #endif

It's caused by a bad interaction between the unclean cpp hacks used
by SSP and the unclean cpp hacks used by at-func.c.

My (hackier) local patch for coreutils, which uses the same broken gnu
code and has the same problem:

--- lib/readlinkat.c~   2013-12-04 14:53:33.000000000 +0000
+++ lib/readlinkat.c
@@ -34,6 +34,8 @@
    then readlink/restore_cwd.  If either the save_cwd or the restore_cwd
    fails, then give a diagnostic and exit nonzero.  */
 
+#undef readlink
+
 #define AT_FUNC_NAME readlinkat
 #define AT_FUNC_F1 readlink
 #define AT_FUNC_POST_FILE_PARAM_DECLS , char *buf, size_t len


-- 
David A. Holland
dholland%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index