Missing comment block at the top of streamutil.h and receivelog.h

Started by Michael Paquierover 11 years ago7 messages
#1Michael Paquier
michael.paquier@gmail.com
1 attachment(s)

Hi all,

As mentioned in $subject, the header files in src/bin/pg_basebackup do
not have a comment block at the top and do not have any copyright
text.
Any reason for that? Shouldn't we have something for consistency with
the other files like in the patch attached?

Regards,
--
Michael

Attachments:

20140824_missing_cpright_headers.patchtext/x-patch; charset=US-ASCII; name=20140824_missing_cpright_headers.patchDownload
diff --git a/src/bin/pg_basebackup/receivelog.h b/src/bin/pg_basebackup/receivelog.h
index 72f8245..cd02d99 100644
--- a/src/bin/pg_basebackup/receivelog.h
+++ b/src/bin/pg_basebackup/receivelog.h
@@ -1,3 +1,16 @@
+/*-------------------------------------------------------------------------
+ *
+ * receivelog.h
+ *
+ * Author: Magnus Hagander <magnus@hagander.net>
+ *
+ * Portions Copyright (c) 1996-2014, PostgreSQL Global Development Group
+ *
+ * IDENTIFICATION
+ *		  src/bin/pg_basebackup/receivelog.h
+ *-------------------------------------------------------------------------
+ */
+
 #include "libpq-fe.h"
 
 #include "access/xlogdefs.h"
diff --git a/src/bin/pg_basebackup/streamutil.h b/src/bin/pg_basebackup/streamutil.h
index c36a37b..a37d9cd 100644
--- a/src/bin/pg_basebackup/streamutil.h
+++ b/src/bin/pg_basebackup/streamutil.h
@@ -1,3 +1,16 @@
+/*-------------------------------------------------------------------------
+ *
+ * streamutil.h
+ *
+ * Author: Magnus Hagander <magnus@hagander.net>
+ *
+ * Portions Copyright (c) 1996-2014, PostgreSQL Global Development Group
+ *
+ * IDENTIFICATION
+ *		  src/bin/pg_basebackup/streamutil.h
+ *-------------------------------------------------------------------------
+ */
+
 #include "libpq-fe.h"
 
 extern const char *progname;
#2Robert Haas
robertmhaas@gmail.com
In reply to: Michael Paquier (#1)
Re: Missing comment block at the top of streamutil.h and receivelog.h

On Sat, Aug 23, 2014 at 11:59 PM, Michael Paquier
<michael.paquier@gmail.com> wrote:

As mentioned in $subject, the header files in src/bin/pg_basebackup do
not have a comment block at the top and do not have any copyright
text.
Any reason for that? Shouldn't we have something for consistency with
the other files like in the patch attached?

Probably that's a good idea, but do we really need Author: tags? I
know we have those in a few places, but certainly not everywhere, and
as time goes by they tend to be less accurate reflections of who wrote
the latest code (as opposed to the original code). Furthermore, every
time we include them, it tends to increase the demand to add even more
of them because, hey, everybody likes to be acknowledged.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#3Magnus Hagander
magnus@hagander.net
In reply to: Robert Haas (#2)
Re: Missing comment block at the top of streamutil.h and receivelog.h

On Tue, Aug 26, 2014 at 11:03 PM, Robert Haas <robertmhaas@gmail.com> wrote:

On Sat, Aug 23, 2014 at 11:59 PM, Michael Paquier
<michael.paquier@gmail.com> wrote:

As mentioned in $subject, the header files in src/bin/pg_basebackup do
not have a comment block at the top and do not have any copyright
text.
Any reason for that? Shouldn't we have something for consistency with
the other files like in the patch attached?

Probably that's a good idea, but do we really need Author: tags? I
know we have those in a few places, but certainly not everywhere, and
as time goes by they tend to be less accurate reflections of who wrote
the latest code (as opposed to the original code). Furthermore, every
time we include them, it tends to increase the demand to add even more
of them because, hey, everybody likes to be acknowledged.

Given that I'm the one named in it - nah, just drop it.

--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#4Michael Paquier
michael.paquier@gmail.com
In reply to: Magnus Hagander (#3)
1 attachment(s)
Re: Missing comment block at the top of streamutil.h and receivelog.h

On Wed, Aug 27, 2014 at 6:10 AM, Magnus Hagander <magnus@hagander.net> wrote:

On Tue, Aug 26, 2014 at 11:03 PM, Robert Haas <robertmhaas@gmail.com> wrote:

Probably that's a good idea, but do we really need Author: tags? I
know we have those in a few places, but certainly not everywhere, and
as time goes by they tend to be less accurate reflections of who wrote
the latest code (as opposed to the original code). Furthermore, every
time we include them, it tends to increase the demand to add even more
of them because, hey, everybody likes to be acknowledged.

Given that I'm the one named in it - nah, just drop it.

Updated patch updated without any Author tag. Perhaps you want to drop
it in all the *.c files in src/bin/pg_basebackup?
Regards,
--
Michael

Attachments:

20140827_missing_cpright_headers_v2.patchtext/x-patch; charset=US-ASCII; name=20140827_missing_cpright_headers_v2.patchDownload
diff --git a/src/bin/pg_basebackup/receivelog.h b/src/bin/pg_basebackup/receivelog.h
index 72f8245..0e2b772 100644
--- a/src/bin/pg_basebackup/receivelog.h
+++ b/src/bin/pg_basebackup/receivelog.h
@@ -1,3 +1,14 @@
+/*-------------------------------------------------------------------------
+ *
+ * receivelog.h
+ *
+ * Portions Copyright (c) 1996-2014, PostgreSQL Global Development Group
+ *
+ * IDENTIFICATION
+ *		  src/bin/pg_basebackup/receivelog.h
+ *-------------------------------------------------------------------------
+ */
+
 #include "libpq-fe.h"
 
 #include "access/xlogdefs.h"
diff --git a/src/bin/pg_basebackup/streamutil.h b/src/bin/pg_basebackup/streamutil.h
index c36a37b..7257b26 100644
--- a/src/bin/pg_basebackup/streamutil.h
+++ b/src/bin/pg_basebackup/streamutil.h
@@ -1,3 +1,14 @@
+/*-------------------------------------------------------------------------
+ *
+ * streamutil.h
+ *
+ * Portions Copyright (c) 1996-2014, PostgreSQL Global Development Group
+ *
+ * IDENTIFICATION
+ *		  src/bin/pg_basebackup/streamutil.h
+ *-------------------------------------------------------------------------
+ */
+
 #include "libpq-fe.h"
 
 extern const char *progname;
#5Fujii Masao
masao.fujii@gmail.com
In reply to: Michael Paquier (#4)
Re: Missing comment block at the top of streamutil.h and receivelog.h

On Wed, Aug 27, 2014 at 10:34 AM, Michael Paquier
<michael.paquier@gmail.com> wrote:

On Wed, Aug 27, 2014 at 6:10 AM, Magnus Hagander <magnus@hagander.net> wrote:

On Tue, Aug 26, 2014 at 11:03 PM, Robert Haas <robertmhaas@gmail.com> wrote:

Probably that's a good idea, but do we really need Author: tags? I
know we have those in a few places, but certainly not everywhere, and
as time goes by they tend to be less accurate reflections of who wrote
the latest code (as opposed to the original code). Furthermore, every
time we include them, it tends to increase the demand to add even more
of them because, hey, everybody likes to be acknowledged.

Given that I'm the one named in it - nah, just drop it.

Updated patch updated without any Author tag.

I think that it's better to add an include guard like

#ifndef RECEIVELOG_H
#define RECEIVELOG_H
...
#endif

Regards,

--
Fujii Masao

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#6Michael Paquier
michael.paquier@gmail.com
In reply to: Fujii Masao (#5)
1 attachment(s)
Re: Missing comment block at the top of streamutil.h and receivelog.h

On Wed, Aug 27, 2014 at 12:31 PM, Fujii Masao <masao.fujii@gmail.com> wrote:

On Wed, Aug 27, 2014 at 10:34 AM, Michael Paquier
<michael.paquier@gmail.com> wrote:
I think that it's better to add an include guard like

#ifndef RECEIVELOG_H
#define RECEIVELOG_H
...
#endif

Oh indeed, that was missing as well! Please see attached.
--
Michael

Attachments:

20140827_missing_cpright_headers_v3.patchtext/x-patch; charset=US-ASCII; name=20140827_missing_cpright_headers_v3.patchDownload
diff --git a/src/bin/pg_basebackup/receivelog.h b/src/bin/pg_basebackup/receivelog.h
index 72f8245..36eb1e1 100644
--- a/src/bin/pg_basebackup/receivelog.h
+++ b/src/bin/pg_basebackup/receivelog.h
@@ -1,3 +1,17 @@
+/*-------------------------------------------------------------------------
+ *
+ * receivelog.h
+ *
+ * Portions Copyright (c) 1996-2014, PostgreSQL Global Development Group
+ *
+ * IDENTIFICATION
+ *		  src/bin/pg_basebackup/receivelog.h
+ *-------------------------------------------------------------------------
+ */
+
+#ifndef RECEIVELOG_H
+#define RECEIVELOG_H
+
 #include "libpq-fe.h"
 
 #include "access/xlogdefs.h"
@@ -18,3 +32,5 @@ extern bool ReceiveXlogStream(PGconn *conn,
 				  int standby_message_timeout,
 				  char *partial_suffix,
 				  int fsync_interval);
+
+#endif	/* RECEIVELOG_H */
diff --git a/src/bin/pg_basebackup/streamutil.h b/src/bin/pg_basebackup/streamutil.h
index c36a37b..8c6691f 100644
--- a/src/bin/pg_basebackup/streamutil.h
+++ b/src/bin/pg_basebackup/streamutil.h
@@ -1,3 +1,17 @@
+/*-------------------------------------------------------------------------
+ *
+ * streamutil.h
+ *
+ * Portions Copyright (c) 1996-2014, PostgreSQL Global Development Group
+ *
+ * IDENTIFICATION
+ *		  src/bin/pg_basebackup/streamutil.h
+ *-------------------------------------------------------------------------
+ */
+
+#ifndef STREAMUTIL_H
+#define STREAMUTIL_H
+
 #include "libpq-fe.h"
 
 extern const char *progname;
@@ -22,3 +36,5 @@ extern bool feTimestampDifferenceExceeds(int64 start_time, int64 stop_time,
 							 int msec);
 extern void fe_sendint64(int64 i, char *buf);
 extern int64 fe_recvint64(char *buf);
+
+#endif	/* STREAMUTIL_H */
#7Fujii Masao
masao.fujii@gmail.com
In reply to: Michael Paquier (#6)
Re: Missing comment block at the top of streamutil.h and receivelog.h

On Wed, Aug 27, 2014 at 2:07 PM, Michael Paquier
<michael.paquier@gmail.com> wrote:

On Wed, Aug 27, 2014 at 12:31 PM, Fujii Masao <masao.fujii@gmail.com> wrote:

On Wed, Aug 27, 2014 at 10:34 AM, Michael Paquier
<michael.paquier@gmail.com> wrote:
I think that it's better to add an include guard like

#ifndef RECEIVELOG_H
#define RECEIVELOG_H
...
#endif

Oh indeed, that was missing as well! Please see attached.

Thanks! Applied.

Regards,

--
Fujii Masao

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers