Opened 11 years ago

Closed 9 years ago

#2191 closed enhancement (fixed)

Updated posix & bsd license headers

Reported by: ekdahl Owned by: nobody
Priority: normal Milestone: R1
Component: System Version:
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: yes Platform: All

Description

Attached is a patch that updates the posix headers' licence headers according to the coding guidelines.

Attachments (3)

bsd_license_headers.diff (3.8 KB) - added by ekdahl 11 years ago.
Updated to hrev26976
posix_license_headers_new_null_h.diff (37.7 KB) - added by ekdahl 11 years ago.
With rewritten null.h
posix_license_headers.diff (36.1 KB) - added by ekdahl 11 years ago.
New patch

Download all attachments as: .zip

Change History (16)

Changed 11 years ago by ekdahl

Attachment: bsd_license_headers.diff added

Updated to hrev26976

comment:1 Changed 11 years ago by ekdahl

Summary: Updated posix license headersUpdated posix & bsd license headers

I've updated the patches to the current revision. Is there any interest in them or should I just drop them?

comment:2 Changed 11 years ago by axeld

Thanks for your work! There is just a minor problem; while our coding style guide mentions "Public headers should always be copyrighted to "Haiku Inc." and don't list any authors.", this does not mean that you can deliberately change such headers. Especially "Copyright Marcus Overhagen" is not the same as "Copyright Haiku, Authors Marcus Overhagen".

Maybe you can just ask him if he is okay to be removed from that header (and such make it look like the others). If not, I would at least volunteer to rewrite the null.h header :-))

comment:3 in reply to:  2 ; Changed 11 years ago by ekdahl

Replying to axeld:

Thanks for your work! There is just a minor problem; while our coding style guide mentions "Public headers should always be copyrighted to "Haiku Inc." and don't list any authors.", this does not mean that you can deliberately change such headers. Especially "Copyright Marcus Overhagen" is not the same as "Copyright Haiku, Authors Marcus Overhagen".

Maybe you can just ask him if he is okay to be removed from that header (and such make it look like the others). If not, I would at least volunteer to rewrite the null.h header :-))

Ok, so here's a new version with a rewritten null.h header then. But its hard to rewrite a such small header without getting a strong resemblance to the old one :)

BTW, some coding style questions struck me:

Whats the preferred header guard style, _NULL_H_, _NULL_H or NULL_H? I've seen all variants but no mention in the guidelines.

Should there be any indenting for preprocessor code?

#ifndef NULL #define NULL 0 #endif or #ifndef NULL # define NULL 0 #endif or #ifndef NULL

#define NULL 0

#endif (but with tabs)?

Changed 11 years ago by ekdahl

With rewritten null.h

comment:4 in reply to:  3 Changed 11 years ago by ekdahl

Replying to ekdahl:

Should there be any indenting for preprocessor code?

#ifndef NULL #define NULL 0 #endif or #ifndef NULL # define NULL 0 #endif or #ifndef NULL

#define NULL 0

#endif (but with tabs)?

Hmm, seems all my newlines disappeared on the trac page, but it looks alright in the email at least.

comment:5 Changed 11 years ago by axeld

It wasn't just null.h, though. You can use \{\{\{/\}\}\} to have correct newlines :-) In any case, I usually do it this way, and that's also what you'll find in 95% our sources:

#ifndef NULL
#	define NULL 0
#endif

The header guards follow at least one rule: local/(very) private headers use NAME_H, public or shared system headers use at least _NAME_H (as the underscore is generally a reserved namespace for the operating system, not just Haiku). If it's _NAME_H_ or _NAME_H I don't really care, I would just follow what the majority of the other POSIX headers does.

comment:6 Changed 11 years ago by marcusoverhagen

Hi,

Axel is correct, you can't simply remove a copyright and replace it with a different one. Adding an author list will not heal this error.

Regarding the 3 posix headers with copyright attribution to me, I'll clear those up for sake of conformity myself (this afternoon).

But I still see a problem. The Copyright headers usually mention a year for example in wchar.t it's 2002. Looking at http://svn.berlios.de/viewcvs/haiku/haiku/trunk/headers/posix/wchar.h?rev=25433&view=log I see that this file has been worked on in 2002, 2003, 2005, 2006, 2007 and 2008.

Thus, instead of doing

  • Copyright (C) 2002 Marcus Overhagen

+ Copyright 2002 Haiku Inc. All Rights Reserved.

I think I'll have to add + Copyright 2002-2003, 2005-2008 Haiku Inc. All Rights Reserved.

or

+ Copyright 2002, 2003, 2005-2008 Haiku Inc. All Rights Reserved.

what do you guys think?

comment:7 Changed 11 years ago by axeld

I think while it's legally more correct, I also think that this can be pretty much neglected in practice. Having the first and the last year is at least the most interesting part of it, else we could probably also only mention the current year - earlier versions will carry the earlier copyright, and the document as is is clearly not copyrighted in a previous year.

So much for the logic, but I'm not a lawyer :-)

I would suggest we just keep the current practice of mentioning the first and the last year of changes.

comment:8 Changed 11 years ago by monni

I think mentioning current year (the day copyright holder(s) were altered) as first year in range would be legal-wise clearest case. This is from previous experience on similar case. As far as law goes copyright doesn't end even though years mentioned in the copyright statement don't include current year...

I partly agree in what axeld said about current practice being to include the last year of change, but I think better wording would be to change/add "end" year when file is modified next time (excluding changes to copyright statement), if and only if it already includes Haiku Inc. (or OpenBeOS) in copyright statement.

Changed 11 years ago by ekdahl

Attachment: posix_license_headers.diff added

New patch

comment:9 Changed 11 years ago by ekdahl

I've now added a new patch that doesn't touch the files which were copyrighted to Marcus. This is hopefully the last version :)

comment:10 Changed 11 years ago by mmu_man

Actually, the licence name also should be fixed. I discussed this with Richard M Stallman at RMLL, and as he said, "MIT Licence" is misleading. See: http://www.gnu.org/licenses/license-list.html#X11License We should really check this, decide which we use, either X11 or BSD-revised, and use the correct name. Hmm that should likely be a separate ticket I suppose.

comment:11 Changed 10 years ago by axeld

Owner: changed from axeld to nobody
Version: R1/pre-alpha1

comment:12 Changed 9 years ago by mmadia

Has a Patch: set

comment:13 Changed 9 years ago by scottmc

Resolution: fixed
Status: newclosed

Fixed in hrev39288 and hrev39291.

Note: See TracTickets for help on using tickets.