tech@mandoc.bsd.lv
 help / color / mirror / Atom feed
* Re: call for testing: mandoc-1.13.2 release candidate
       [not found] ` <20141211124155.GA6788@iris.usta.de>
@ 2014-12-11 17:22   ` Thomas Klausner
  2014-12-11 17:56     ` Ingo Schwarze
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Klausner @ 2014-12-11 17:22 UTC (permalink / raw)
  To: tech

On Thu, Dec 11, 2014 at 01:41:55PM +0100, Ingo Schwarze wrote:
> Before the formal release, i'd like to give you the chance to test
> the release candidate on your platforms:
> 
>   http://mdocml.bsd.lv/snapshots/Tmp/mdocml-1.13.2rc1.tar.gz

On NetBSD it compiles without warnings.

On Smart OS (Illumos):

cc -g -W -Wall -Wstrict-prototypes -Wno-unused-parameter -Wwrite-strings   -c -o compat_fts.o compat_fts.c
compat_fts.c: In function 'fts_open':
compat_fts.c:96:2: warning: implicit declaration of function 'MAX' [-Wimplicit-function-declaration]
compat_fts.c: In function 'fts_build':
compat_fts.c:410:47: warning: variable 'nostat' set but not used [-Wunused-but-set-variable]
compat_fts.c: In function 'fts_safe_changedir':
compat_fts.c:807:45: error: 'O_DIRECTORY' undeclared (first use in this function)
compat_fts.c:807:45: note: each undeclared identifier is reported only once for each function it appears in


 Thomas
--
 To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: call for testing: mandoc-1.13.2 release candidate
  2014-12-11 17:22   ` call for testing: mandoc-1.13.2 release candidate Thomas Klausner
@ 2014-12-11 17:56     ` Ingo Schwarze
  2014-12-11 17:59       ` Thomas Klausner
  0 siblings, 1 reply; 4+ messages in thread
From: Ingo Schwarze @ 2014-12-11 17:56 UTC (permalink / raw)
  To: Thomas Klausner; +Cc: tech

Hi Thomas,

Thomas Klausner wrote on Thu, Dec 11, 2014 at 06:22:04PM +0100:

> On Smart OS (Illumos):
> 
> cc -g -W -Wall -Wstrict-prototypes -Wno-unused-parameter -Wwrite-strings   -c -o compat_fts.o compat_fts.c
> compat_fts.c: In function 'fts_open':
> compat_fts.c:96:2: warning: implicit declaration of function 'MAX' [-Wimplicit-function-declaration]
> compat_fts.c: In function 'fts_build':
> compat_fts.c:410:47: warning: variable 'nostat' set but not used [-Wunused-but-set-variable]
> compat_fts.c: In function 'fts_safe_changedir':
> compat_fts.c:807:45: error: 'O_DIRECTORY' undeclared (first use in this function)
> compat_fts.c:807:45: note: each undeclared identifier is reported only once for each function it appears in

This should fix these problems; does it?

Thanks,
  Ingo


Index: compat_fts.c
===================================================================
RCS file: /home/cvs/mdocml/mdocml/compat_fts.c,v
retrieving revision 1.5
diff -u -p -r1.5 compat_fts.c
--- compat_fts.c	11 Dec 2014 09:05:01 -0000	1.5
+++ compat_fts.c	11 Dec 2014 17:53:43 -0000
@@ -62,6 +62,10 @@ static unsigned short	 fts_stat(FTS *, F
 static int	 fts_safe_changedir(FTS *, FTSENT *, int, const char *);
 
 #define	ISDOT(a)	(a[0] == '.' && (!a[1] || (a[1] == '.' && !a[2])))
+#define	MAX(a,b)	(((a)>(b))?(a):(b))
+#ifndef	O_DIRECTORY
+#define	O_DIRECTORY	0
+#endif
 
 #define	CLR(opt)	(sp->fts_options &= ~(opt))
 #define	ISSET(opt)	(sp->fts_options & (opt))
@@ -407,7 +411,7 @@ fts_build(FTS *sp)
 	DIR *dirp;
 	void *oldaddr;
 	size_t dlen, len, maxlen;
-	int nitems, cderrno, descend, level, nlinks, nostat, doadjust;
+	int nitems, cderrno, descend, level, doadjust;
 	int saved_errno;
 	char *cp;
 
@@ -425,14 +429,6 @@ fts_build(FTS *sp)
 	}
 
 	/*
-	 * Nlinks is the number of possible entries of type directory in the
-	 * directory if we're cheating on stat calls, 0 if we're not doing
-	 * any stat calls at all, -1 if we're doing stats on everything.
-	 */
-	nlinks = -1;
-	nostat = 0;
-
-	/*
 	 * If we're going to need to stat anything or we want to descend
 	 * and stay in the directory, chdir.  If this fails we keep going,
 	 * but set a flag so we don't chdir after the post-order visit.
@@ -449,8 +445,7 @@ fts_build(FTS *sp)
 	 */
 	cderrno = 0;
 	if (fts_safe_changedir(sp, cur, dirfd(dirp), NULL)) {
-		if (nlinks)
-			cur->fts_errno = errno;
+		cur->fts_errno = errno;
 		cur->fts_flags |= FTS_DONTCHDIR;
 		descend = 0;
 		cderrno = errno;
@@ -545,21 +540,9 @@ mem1:				saved_errno = errno;
 		}
 
 		if (cderrno) {
-			if (nlinks) {
-				p->fts_info = FTS_NS;
-				p->fts_errno = cderrno;
-			} else
-				p->fts_info = FTS_NSOK;
+			p->fts_info = FTS_NS;
+			p->fts_errno = cderrno;
 			p->fts_accpath = cur->fts_accpath;
-		} else if (nlinks == 0
-#ifdef DT_DIR
-		    || (nostat &&
-		    dp->d_type != DT_DIR && dp->d_type != DT_UNKNOWN)
-#endif
-		    ) {
-			p->fts_accpath =
-			    ISSET(FTS_NOCHDIR) ? p->fts_path : p->fts_name;
-			p->fts_info = FTS_NSOK;
 		} else {
 			/* Build a file name for fts_stat to stat. */
 			if (ISSET(FTS_NOCHDIR)) {
@@ -569,11 +552,6 @@ mem1:				saved_errno = errno;
 				p->fts_accpath = p->fts_name;
 			/* Stat it. */
 			p->fts_info = fts_stat(sp, p);
-
-			/* Decrement link count if applicable. */
-			if (nlinks > 0 && (p->fts_info == FTS_D ||
-			    p->fts_info == FTS_DC || p->fts_info == FTS_DOT))
-				--nlinks;
 		}
 
 		/* We walk in directory order so "ls -f" doesn't get upset. */
--
 To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: call for testing: mandoc-1.13.2 release candidate
  2014-12-11 17:56     ` Ingo Schwarze
@ 2014-12-11 17:59       ` Thomas Klausner
  2014-12-11 18:54         ` Ingo Schwarze
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Klausner @ 2014-12-11 17:59 UTC (permalink / raw)
  To: Ingo Schwarze; +Cc: tech

On Thu, Dec 11, 2014 at 06:56:36PM +0100, Ingo Schwarze wrote:
> Hi Thomas,
> 
> Thomas Klausner wrote on Thu, Dec 11, 2014 at 06:22:04PM +0100:
> 
> > On Smart OS (Illumos):
> > 
> > cc -g -W -Wall -Wstrict-prototypes -Wno-unused-parameter -Wwrite-strings   -c -o compat_fts.o compat_fts.c
> > compat_fts.c: In function 'fts_open':
> > compat_fts.c:96:2: warning: implicit declaration of function 'MAX' [-Wimplicit-function-declaration]
> > compat_fts.c: In function 'fts_build':
> > compat_fts.c:410:47: warning: variable 'nostat' set but not used [-Wunused-but-set-variable]
> > compat_fts.c: In function 'fts_safe_changedir':
> > compat_fts.c:807:45: error: 'O_DIRECTORY' undeclared (first use in this function)
> > compat_fts.c:807:45: note: each undeclared identifier is reported only once for each function it appears in
> 
> This should fix these problems; does it?

Yes, it does.
(I'm still missing a 'make test' target :) )
 Thomas
--
 To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: call for testing: mandoc-1.13.2 release candidate
  2014-12-11 17:59       ` Thomas Klausner
@ 2014-12-11 18:54         ` Ingo Schwarze
  0 siblings, 0 replies; 4+ messages in thread
From: Ingo Schwarze @ 2014-12-11 18:54 UTC (permalink / raw)
  To: Thomas Klausner; +Cc: tech

Hi Thomas,

Thomas Klausner wrote on Thu, Dec 11, 2014 at 06:59:17PM +0100:
> On Thu, Dec 11, 2014 at 06:56:36PM +0100, Ingo Schwarze wrote:

>> This should fix these problems; does it?

> Yes, it does.

Thanks for checking!

> (I'm still missing a 'make test' target :) )

As i said in Sofia, slide 53:

  http://www.openbsd.org/papers/eurobsdcon2014-mandoc-slides.pdf

  "A regression suite does exist.
  Tightly tied into the OpenBSD regression system.
  It would be useful to get it running elsewhere.
  Do not copy and change it: A maintenance nightmare would ensue!

  Not at all for portable make(1), it requires:
  in assignments: ?= += !=
  in variable expansion: :C :M :S
  control statements: .if .else .for
  in conditionals: defined() empty() target()
  BSD make(1) modules:
    bsd.subdir.mk bsd.obj.mk bsd.regress.mk bsd.prog.mk bsd.own.nk

  This list is incomplete.
  Not sure yet how to proceed..."

Yours,
  Ingo
--
 To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-12-11 18:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <sfid-H20141211-134218-+039.82-1@spamfilter.osbf.lua>
     [not found] ` <20141211124155.GA6788@iris.usta.de>
2014-12-11 17:22   ` call for testing: mandoc-1.13.2 release candidate Thomas Klausner
2014-12-11 17:56     ` Ingo Schwarze
2014-12-11 17:59       ` Thomas Klausner
2014-12-11 18:54         ` Ingo Schwarze

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).