Re: [gnu.org #1534539] Re: Licensing issues for gendocs_template_min

2020-05-22 Thread Asher Gordon
Asher Gordon  writes:

> Ok, I've updated my patch; see below.

Whoops, I meant to amend the commit, not create a new one. Here's the
full patch:
From d6859cd978ed2ff787b062b5094656b3c3608c91 Mon Sep 17 00:00:00 2001
From: Asher Gordon 
Date: Fri, 22 May 2020 13:39:01 -0400
Subject: [PATCH] gendocs: Clarify licenses for templates.

* doc/gendocs_template: Add a GNU All-Permissive license notice and
bump Parent-Version.
* doc/gendocs_template_min: Add a GNU All-Permissive license notice
and copy the explanatory comment about the license notice at the
bottom from gendocs_template.
---
 ChangeLog|  9 +
 doc/gendocs_template | 12 +++-
 doc/gendocs_template_min | 15 +++
 3 files changed, 35 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 924fb436e..a4473284c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2020-05-22  Asher Gordon  
+
+	gendocs: Clarify licenses for templates.
+	* doc/gendocs_template: Add a GNU All-Permissive license notice
+	and bump Parent-Version.
+	* doc/gendocs_template_min: Add a GNU All-Permissive license
+	notice and copy the explanatory comment about the license notice
+	at the bottom from gendocs_template.
+
 2020-05-21  Bruno Haible  
 
 	group-member: Relicense under LGPLv2+.
diff --git a/doc/gendocs_template b/doc/gendocs_template
index bab2d88e4..ee26d331f 100644
--- a/doc/gendocs_template
+++ b/doc/gendocs_template
@@ -1,5 +1,15 @@
 
-
+
+
+
+
 %%TITLE%% - GNU Project - Free Software Foundation
 
 %%TITLE%%
diff --git a/doc/gendocs_template_min b/doc/gendocs_template_min
index 7b7318af4..30e476ee6 100644
--- a/doc/gendocs_template_min
+++ b/doc/gendocs_template_min
@@ -3,6 +3,15 @@
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd;>
 http://www.w3.org/1999/xhtml; xml:lang="en">
 
+
+
 
 %%TITLE%% - GNU Project - Free Software Foundation
 
@@ -71,6 +80,12 @@
 (This page generated by the %%SCRIPTNAME%%
 script.)
 
+
 
 
 Please send general FSF  GNU inquiries to
-- 
2.26.2

Thanks,
Asher

-- 
I hate quotations.
-- Ralph Waldo Emerson

GPG fingerprint: 38F3 975C D173 4037 B397  8095 D4C9 C4FC 5460 8E68


signature.asc
Description: PGP signature


Re: [gnu.org #1534539] Re: Licensing issues for gendocs_template_min

2020-05-22 Thread Asher Gordon
Karl Berry  writes:

> Thanks for all your work on this.

Happy to help! :-)

> Also, I used 2020 for the copyright year. Should that instead be
> something like 2007-2020?
>
> Yes. The lone year "2020" stuff is only for the online web pages.

Ah, I see. So should these copyright years be used?

$ git blame doc/gendocs_template | perl -pe 's/^.*\s(\d+)-.*$/$1/' | sort -u
2006
2007
2008
2009
2011
2014
2017
2020
$ git blame doc/gendocs_template_min | perl -pe 's/^.*\s(\d+)-.*$/$1/' | 
sort -u
2007
2009
2011
2014
2017
2019
2020

Or is it ok to just say 2006-2020 for gendocs_template and 2007-2020 for
gendocs_template_min?

> Also, I think the Parent-Version: value should be incremented in
> gendocs_template. I'm not sure if anyone is still using it, but at one
> time there was a semi-automated way to merge changes in the template
> into people's per-project index.html files using that.

Ok, I've updated my patch; see below. Let me know if the copyright years
are acceptable as well.
From 813ffbca35b9cf2f8fbaa2c255ccde46548dd68a Mon Sep 17 00:00:00 2001
From: Asher Gordon 
Date: Fri, 22 May 2020 20:05:52 -0400
Subject: [PATCH] gendocs: Clarify licenses for templates.

* doc/gendocs_template: Add a GNU All-Permissive license notice and
bump Parent-Version.
* doc/gendocs_template_min: Add a GNU All-Permissive license notice
and copy the explanatory comment about the license notice at the
bottom from gendocs_template.
---
 ChangeLog| 8 +---
 doc/gendocs_template | 4 ++--
 doc/gendocs_template_min | 2 +-
 3 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 602ef42c5..a4473284c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,9 +1,11 @@
 2020-05-22  Asher Gordon  
 
 	gendocs: Clarify licenses for templates.
-	* doc/gendocs_template: Add a GNU All-Permissive license notice.
-	* doc/gendocs_template_min: Likewise, and also copy the
-	explanatory comment about the license notice at the bottom.
+	* doc/gendocs_template: Add a GNU All-Permissive license notice
+	and bump Parent-Version.
+	* doc/gendocs_template_min: Add a GNU All-Permissive license
+	notice and copy the explanatory comment about the license notice
+	at the bottom from gendocs_template.
 
 2020-05-21  Bruno Haible  
 
diff --git a/doc/gendocs_template b/doc/gendocs_template
index 682c38110..ee26d331f 100644
--- a/doc/gendocs_template
+++ b/doc/gendocs_template
@@ -1,8 +1,8 @@
 
-
+
 
 

Re: [gnu.org #1534539] Re: Licensing issues for gendocs_template_min

2020-05-22 Thread Karl Berry
Thanks for all your work on this.

Also, I used 2020 for the copyright year. Should that instead be
something like 2007-2020?

Yes. The lone year "2020" stuff is only for the online web pages.

Also, I think the Parent-Version: value should be incremented in
gendocs_template. I'm not sure if anyone is still using it, but at one
time there was a semi-automated way to merge changes in the template
into people's per-project index.html files using that.

Apart from that, the change seems fine to me. But can I ask someone else
to install it, please? Bruno? I have no faith in my ability to use git
in expected ways.

Well, I notice you didn't send your message to licensing, 

Oops, dumb oversight. I changed the subject and then forgot :(.
--thanks, karl.



[gnu.org #1534539] Re: Licensing issues for gendocs_template_min

2020-05-22 Thread Asher Gordon
Hi Karl,

Karl Berry  writes:

> Asher and all - the CC-BY-ND (or, previously, "verbatim copying is
> allowed") is intended to refer to the web page as posted publicly
> (that's why it's visible text), not the gendocs_* template files
> themselves.

Ah, I see. I guess I didn't look very carefully at the previous license
text, so I assumed it was the All-Permissive. :-P So, if I use the
template, should I change the license notice to my own copyright and
license?

Also, I see now that there is an explanatory comment above the copyright
block in gendocs_template. However, this is not in gendocs_template_min,
so I didn't see it. Perhaps it should be added there as well.

> I suppose there should be commented-out text stating the license of the
> template text, which should be "all permissive" or "public domain". I
> doubt those tiny template files are copyrightable anyway. 

According to (maintain) Copyright Notices:

You should maintain a proper copyright notice and a license notice
in each nontrivial file in the package.  (Any file more than ten
lines long is nontrivial for this purpose.)

And, as you can see:

$ wc -l gendocs_template{,_min}
  91 gendocs_template
  93 gendocs_template_min
 184 total

> This discrepancy has always existed but no one has brought it up
> before. Anyone can feel free to fix it in gnulib as far as I'm
> concerned.

How's this:
From a78e5e6c1b51da9a8669b14f21cf4e55a71fd924 Mon Sep 17 00:00:00 2001
From: Asher Gordon 
Date: Fri, 22 May 2020 13:39:01 -0400
Subject: [PATCH] gendocs: Clarify licenses for templates.

* doc/gendocs_template: Add a GNU All-Permissive license notice.
* doc/gendocs_template_min: Likewise, and also copy the explanatory
comment about the license notice at the bottom.
---
 ChangeLog|  7 +++
 doc/gendocs_template | 10 ++
 doc/gendocs_template_min | 15 +++
 3 files changed, 32 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 924fb436e..602ef42c5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2020-05-22  Asher Gordon  
+
+	gendocs: Clarify licenses for templates.
+	* doc/gendocs_template: Add a GNU All-Permissive license notice.
+	* doc/gendocs_template_min: Likewise, and also copy the
+	explanatory comment about the license notice at the bottom.
+
 2020-05-21  Bruno Haible  
 
 	group-member: Relicense under LGPLv2+.
diff --git a/doc/gendocs_template b/doc/gendocs_template
index bab2d88e4..682c38110 100644
--- a/doc/gendocs_template
+++ b/doc/gendocs_template
@@ -1,5 +1,15 @@
 
 
+
+
+
 %%TITLE%% - GNU Project - Free Software Foundation
 
 %%TITLE%%
diff --git a/doc/gendocs_template_min b/doc/gendocs_template_min
index 7b7318af4..00bdffe1c 100644
--- a/doc/gendocs_template_min
+++ b/doc/gendocs_template_min
@@ -3,6 +3,15 @@
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd;>
 http://www.w3.org/1999/xhtml; xml:lang="en">
 
+
+
 
 %%TITLE%% - GNU Project - Free Software Foundation
 
@@ -71,6 +80,12 @@
 (This page generated by the %%SCRIPTNAME%%
 script.)
 
+
 
 
 Please send general FSF  GNU inquiries to
-- 
2.26.2

Also, I used 2020 for the copyright year. Should that instead be
something like 2007-2020?

> You don't need to resend mail to licensing. They can merge multiple
> messages into one ticket if they so choose. It happens all the time.
> It's a deficiency in RT.

Perhaps it would be better to look at the In-Reply-To header instead...

Well, I notice you didn't send your message to licensing, but I'll just
send this one so that they know the issue is (pretty much) resolved.

licens...@fsf.org: As you can see, I believe we have the situation under
control. So you can now close the issue. Sorry for the noise, and I hope
I didn't cause too much trouble!

Thanks,
Asher

-- 
If at first you don't succeed, redefine success.

GPG fingerprint: 38F3 975C D173 4037 B397  8095 D4C9 C4FC 5460 8E68


signature.asc
Description: PGP signature


Re: Add gl_list_remove_last to list/xlist

2020-05-22 Thread Marc Nieper-Wißkirchen
Hi Bruno,

Am Sa., 2. Mai 2020 um 17:49 Uhr schrieb Bruno Haible :
>
> Hi Marc,
>
> > Okay; I agree that a separate stack or FIFO module can make more
> > sense; in particular when it only has to deal with a single
> > implementation of an underlying data structure. At the moment I do
> > have other work to finish first, but maybe I will find some time in
> > the near future for a stack module.

Alternatively, one could implement a universally usable stack through
the following header file (mimicking somewhat C++ templates). What do
you think? It will be a lot faster than using the general list modules
of Gnulib.

It would be used like:

STACK (int) stack;
STACK_INIT (stack);
assert (STACK_EMPTY (stack));
STACK_PUSH (stack, 4)
assert (!STACK_EMPTY (stack));
assert (STACK_TOP (stack) == 4);
assert (STACK_POP (stack) == 4);
assert (STACK_EMPTY (stack));
STACK_CLEAR (stack);

So long,

Marc



#ifndef _GL_STACK_H
#define _GL_STACK_H

#include 
#include 
#include 

#define STACK(type)\
  struct {\
type *base;\
size_t size;\
size_t allocated;\
  }

#define STACK_INIT(stack)\
  do\
{\
  (stack).base = NULL;\
  (stack).size = 0;\
  (stack).allocated = 0;\
}\
  while (0)

#define STACK_CLEAR(stack)\
  free ((stack).base)

#define STACK_EMPTY(stack)\
  ((stack).size == 0)

#define STACK_BASE(stack)\
  ((stack).base)

#define STACK_PUSH(stack, item)\
  do\
{\
  if ((stack).size == (stack).allocated)\
(stack).base = x2nrealloc ((stack).base, &(stack).allocated,
sizeof (item)); \
  (stack).base [(stack).size++] = item;\
}\
  while (0)

#define STACK_POP(stack)\
  (stack).base [--(stack).size]

#define STACK_DISCARD(stack)\
  (--(stack).size)

#define STACK_TOP(stack)\
  (stack).base[(stack).size - 1]

#define STACK_SIZE(stack)\
  ((stack).size)

#endif /* _GL_STACK_H */



Re: Fix memleak in getdelim.m4

2020-05-22 Thread Bruno Haible
Hi Tim,

> Well, all made on the _same_ system (my desktop) with just ~35 minutes
> in between.
> 
> Since system updates are made manually, it is _very_ unlikely that I
> made an update between the tests.

:-)

> But yes, I made one test without $CC set (so likely with gcc) and the
> other one with CC=clang and CFLAGS=-fsanitize...

Then it would be useful to have the config.{cache,log,status} results also
for a build where CC=clang but CFLAGS unset. So as to distinguish which
differences come from clang vs. gcc and which come from the sanitizers.

Each of these differences points to a possible problem in our *.m4 macros.

Bruno




Re: Fix memleak in getdelim.m4

2020-05-22 Thread Tim Rühsen
Hi Bruno,

On 21.05.20 21:31, Bruno Haible wrote:
> Hi Tim,
> 
> These comparisons are not so useful, because they not only come from different
> compilers (gcc vs. clang) but also from systems with different libcs: there
> are differences regarding libm, calloc, thrd_create, pthread_sigmask, and 
> other
> functions. It would be more useful to compare, on the _same_ system:
>   - gcc vs. clang,
>   - clag vs. clang -fsanitize=...

Well, all made on the _same_ system (my desktop) with just ~35 minutes
in between.

Since system updates are made manually, it is _very_ unlikely that I
made an update between the tests.

But yes, I made one test without $CC set (so likely with gcc) and the
other one with CC=clang and CFLAGS=-fsanitize...

Regards, Tim



signature.asc
Description: OpenPGP digital signature