license cleanup - Mailing list pgsql-patches
| From | Neil Conway |
|---|---|
| Subject | license cleanup |
| Date | |
| Msg-id | 41602311.3030507@samurai.com Whole thread Raw |
| Responses |
Re: license cleanup
Re: license cleanup |
| List | pgsql-patches |
This patch cleans up the licensing terms on some imported BSD-licensed
files in the source tree:
- src/port/qsort.c is from NetBSD, and still contained the old 4-clause
BSD license. The NetBSD folks have updated the BSD licensing terms in
their CVS code, so I upgraded our copy to the latest CVS copy (I just
merged the licensing fixes, no other substantive changes were made).
- src/port/crypt.c is also from NetBSD, so I updated the licensing terms
in a similar fashion. I also merged another upstream change: a bunch of
static read-only arrays were const-ified.
- src/port/memcmp.c was imported from NetBSD, but whoever imported it
didn't also include the licensing terms (which is not good, needless to
say). I added the copyright blurb from the current version of the file
in NetBSD CVS.
There is a bunch more license cleanup of this kind that can be done, but
this is a start.
I was also going to update the licenses on files imported from FreeBSD,
but apparently they haven't bothered fixing their files to reflect the
3-clause Berkeley license. Of course the fact they haven't done this
doesn't matter (the license change applies anyway); do people think it
is worth modifying the licenses on these imported files anyway?
Barring any objections I intend to apply this patch on Tuesday.
-Neil
Index: src/port/crypt.c
===================================================================
RCS file: /Users/neilc/local/cvs/pgsql-server/src/port/crypt.c,v
retrieving revision 1.8
diff -c -r1.8 crypt.c
*** src/port/crypt.c 27 Sep 2004 19:16:02 -0000 1.8
--- src/port/crypt.c 3 Oct 2004 15:18:44 -0000
***************
*** 11,32 ****
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
! * notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
! * notice, this list of conditions and the following disclaimer in the
! * documentation and/or other materials provided with the distribution.
! * 3. All advertising materials mentioning features or use of this software
! * must display the following acknowledgement:
! * This product includes software developed by the University of
! * California, Berkeley and its contributors.
! * 4. Neither the name of the University nor the names of its contributors
! * may be used to endorse or promote products derived from this software
! * without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
! * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
--- 11,28 ----
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
! * notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
! * notice, this list of conditions and the following disclaimer in the
! * documentation and/or other materials provided with the distribution.
! * 3. Neither the name of the University nor the names of its contributors
! * may be used to endorse or promote products derived from this software
! * without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
! * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
***************
*** 36,50 ****
* SUCH DAMAGE.
*/
- #if defined(LIBC_SCCS) && !defined(lint)
- #if 0
- static char sccsid[] = "@(#)crypt.c 8.1.1.1 (Berkeley) 8/18/93";
-
- #else
- __RCSID("$NetBSD: crypt.c,v 1.18 2001/03/01 14:37:35 wiz Exp $");
- #endif
- #endif /* not lint */
-
#include "pg_config.h"
#include <stddef.h>
--- 32,37 ----
***************
*** 339,345 ****
/* ===== (mostly) Standard DES Tables ==================== */
! static unsigned char IP[] = { /* initial permutation */
58, 50, 42, 34, 26, 18, 10, 2,
60, 52, 44, 36, 28, 20, 12, 4,
62, 54, 46, 38, 30, 22, 14, 6,
--- 326,332 ----
/* ===== (mostly) Standard DES Tables ==================== */
! static const unsigned char IP[] = { /* initial permutation */
58, 50, 42, 34, 26, 18, 10, 2,
60, 52, 44, 36, 28, 20, 12, 4,
62, 54, 46, 38, 30, 22, 14, 6,
***************
*** 352,358 ****
/* The final permutation is the inverse of IP - no table is necessary */
! static unsigned char ExpandTr[] = { /* expansion operation */
32, 1, 2, 3, 4, 5,
4, 5, 6, 7, 8, 9,
8, 9, 10, 11, 12, 13,
--- 339,345 ----
/* The final permutation is the inverse of IP - no table is necessary */
! static const unsigned char ExpandTr[] = { /* expansion operation */
32, 1, 2, 3, 4, 5,
4, 5, 6, 7, 8, 9,
8, 9, 10, 11, 12, 13,
***************
*** 363,369 ****
28, 29, 30, 31, 32, 1,
};
! static unsigned char PC1[] = { /* permuted choice table 1 */
57, 49, 41, 33, 25, 17, 9,
1, 58, 50, 42, 34, 26, 18,
10, 2, 59, 51, 43, 35, 27,
--- 350,356 ----
28, 29, 30, 31, 32, 1,
};
! static const unsigned char PC1[] = { /* permuted choice table 1 */
57, 49, 41, 33, 25, 17, 9,
1, 58, 50, 42, 34, 26, 18,
10, 2, 59, 51, 43, 35, 27,
***************
*** 375,386 ****
21, 13, 5, 28, 20, 12, 4,
};
! static unsigned char Rotates[] = { /* PC1 rotation schedule */
1, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 1,
};
/* note: each "row" of PC2 is left-padded with bits that make it invertible */
! static unsigned char PC2[] = { /* permuted choice table 2 */
9, 18, 14, 17, 11, 24, 1, 5,
22, 25, 3, 28, 15, 6, 21, 10,
35, 38, 23, 19, 12, 4, 26, 8,
--- 362,373 ----
21, 13, 5, 28, 20, 12, 4,
};
! static const unsigned char Rotates[] = { /* PC1 rotation schedule */
1, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 1,
};
/* note: each "row" of PC2 is left-padded with bits that make it invertible */
! static const unsigned char PC2[] = { /* permuted choice table 2 */
9, 18, 14, 17, 11, 24, 1, 5,
22, 25, 3, 28, 15, 6, 21, 10,
35, 38, 23, 19, 12, 4, 26, 8,
***************
*** 392,398 ****
0, 0, 46, 42, 50, 36, 29, 32,
};
! static unsigned char S[8][64] = { /* 48->32 bit substitution tables */
/* S[1] */
{14, 4, 13, 1, 2, 15, 11, 8, 3, 10, 6, 12, 5, 9, 0, 7,
0, 15, 7, 4, 14, 2, 13, 1, 10, 6, 12, 11, 9, 5, 3, 8,
--- 379,385 ----
0, 0, 46, 42, 50, 36, 29, 32,
};
! static const unsigned char S[8][64] = { /* 48->32 bit substitution tables */
/* S[1] */
{14, 4, 13, 1, 2, 15, 11, 8, 3, 10, 6, 12, 5, 9, 0, 7,
0, 15, 7, 4, 14, 2, 13, 1, 10, 6, 12, 11, 9, 5, 3, 8,
***************
*** 435,441 ****
2, 1, 14, 7, 4, 10, 8, 13, 15, 12, 9, 0, 3, 5, 6, 11}
};
! static unsigned char P32Tr[] = { /* 32-bit permutation function */
16, 7, 20, 21,
29, 12, 28, 17,
1, 15, 23, 26,
--- 422,428 ----
2, 1, 14, 7, 4, 10, 8, 13, 15, 12, 9, 0, 3, 5, 6, 11}
};
! static const unsigned char P32Tr[] = { /* 32-bit permutation function */
16, 7, 20, 21,
29, 12, 28, 17,
1, 15, 23, 26,
***************
*** 446,452 ****
22, 11, 4, 25,
};
! static unsigned char CIFP[] = { /* compressed/interleaved permutation */
1, 2, 3, 4, 17, 18, 19, 20,
5, 6, 7, 8, 21, 22, 23, 24,
9, 10, 11, 12, 25, 26, 27, 28,
--- 433,439 ----
22, 11, 4, 25,
};
! static const unsigned char CIFP[] = { /* compressed/interleaved permutation */
1, 2, 3, 4, 17, 18, 19, 20,
5, 6, 7, 8, 21, 22, 23, 24,
9, 10, 11, 12, 25, 26, 27, 28,
***************
*** 458,464 ****
45, 46, 47, 48, 61, 62, 63, 64,
};
! static unsigned char itoa64[] = /* 0..63 => ascii-64 */
"./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
--- 445,451 ----
45, 46, 47, 48, 61, 62, 63, 64,
};
! static const unsigned char itoa64[] = /* 0..63 => ascii-64 */
"./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
Index: src/port/memcmp.c
===================================================================
RCS file: /Users/neilc/local/cvs/pgsql-server/src/port/memcmp.c,v
retrieving revision 1.5
diff -c -r1.5 memcmp.c
*** src/port/memcmp.c 29 Aug 2004 04:13:12 -0000 1.5
--- src/port/memcmp.c 3 Oct 2004 15:24:53 -0000
***************
*** 4,19 ****
* compares memory bytes
*
* Portions Copyright (c) 1996-2004, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql-server/src/port/memcmp.c,v 1.4 2003/11/29 19:52:13 pgsql Exp $
*
* This file was taken from NetBSD and is used by SunOS because memcmp
! * on that platform does not properly compare negative bytes.
*
! *-------------------------------------------------------------------------
*/
#include <string.h>
--- 4,49 ----
* compares memory bytes
*
* Portions Copyright (c) 1996-2004, PostgreSQL Global Development Group
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql-server/src/port/memcmp.c,v 1.4 2003/11/29 19:52:13 pgsql Exp $
*
* This file was taken from NetBSD and is used by SunOS because memcmp
! * on that platform does not properly compare negative bytes. The
! * NetBSD copyright terms follow.
! */
!
! /*-
! * Copyright (c) 1990, 1993
! * The Regents of the University of California. All rights reserved.
! *
! * This code is derived from software contributed to Berkeley by
! * Chris Torek.
! *
! * Redistribution and use in source and binary forms, with or without
! * modification, are permitted provided that the following conditions
! * are met:
! * 1. Redistributions of source code must retain the above copyright
! * notice, this list of conditions and the following disclaimer.
! * 2. Redistributions in binary form must reproduce the above copyright
! * notice, this list of conditions and the following disclaimer in the
! * documentation and/or other materials provided with the distribution.
! * 3. Neither the name of the University nor the names of its contributors
! * may be used to endorse or promote products derived from this software
! * without specific prior written permission.
*
! * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
! * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
! * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
! * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
! * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
! * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
! * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
! * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
! * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
! * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
! * SUCH DAMAGE.
*/
#include <string.h>
Index: src/port/qsort.c
===================================================================
RCS file: /Users/neilc/local/cvs/pgsql-server/src/port/qsort.c,v
retrieving revision 1.4
diff -c -r1.4 qsort.c
*** src/port/qsort.c 29 Nov 2003 19:52:13 -0000 1.4
--- src/port/qsort.c 3 Oct 2004 15:03:38 -0000
***************
*** 1,12 ****
/*
! * Copied from NetBSD CVS, 2002-07-19, bjm
! * Add do ... while() macro fix
! * Remove __inline, _DIAGASSERTs, __P
*
* $PostgreSQL: /cvsroot/pgsql-server/src/port/qsort.c,v 1.3 2002/09/04 20:31:48 momjian Exp $
*/
! /* $NetBSD: qsort.c,v 1.12 1999/09/20 04:39:40 lukem Exp $ */
/*-
* Copyright (c) 1992, 1993
--- 1,12 ----
/*
! * Modifications from vanilla NetBSD sources:
! * Add do ... while() macro fix
! * Remove __inline, _DIAGASSERTs, __P
*
* $PostgreSQL: /cvsroot/pgsql-server/src/port/qsort.c,v 1.3 2002/09/04 20:31:48 momjian Exp $
*/
! /* $NetBSD: qsort.c,v 1.13 2003/08/07 16:43:42 agc Exp $ */
/*-
* Copyright (c) 1992, 1993
***************
*** 16,37 ****
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
! * notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
! * notice, this list of conditions and the following disclaimer in the
! * documentation and/or other materials provided with the distribution.
! * 3. All advertising materials mentioning features or use of this software
! * must display the following acknowledgement:
! * This product includes software developed by the University of
! * California, Berkeley and its contributors.
! * 4. Neither the name of the University nor the names of its contributors
! * may be used to endorse or promote products derived from this software
! * without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
! * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
--- 16,33 ----
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
! * notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
! * notice, this list of conditions and the following disclaimer in the
! * documentation and/or other materials provided with the distribution.
! * 3. Neither the name of the University nor the names of its contributors
! * may be used to endorse or promote products derived from this software
! * without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
! * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
pgsql-patches by date: