diff --git a/LICENSE_STDLIB b/LICENSE_STDLIB new file mode 100644 index 000000000..e01d69c8e --- /dev/null +++ b/LICENSE_STDLIB @@ -0,0 +1,20 @@ +Copyright (c) 2022 Christoffer Lernö and contributors + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md index 0aa7d5e4a..543f40755 100644 --- a/README.md +++ b/README.md @@ -221,3 +221,8 @@ c3c compile main.c3 ``` The generated binary will be called `a.out`. + +#### Licensing + +The C3 compiler is licensed under LGPL 3.0, the standard library itself is +MIT licensed. \ No newline at end of file diff --git a/resources/lib/std/array.c3 b/resources/lib/std/array.c3 index 74b858931..3285de1d7 100644 --- a/resources/lib/std/array.c3 +++ b/resources/lib/std/array.c3 @@ -1,3 +1,6 @@ +// Copyright (c) 2021 Christoffer Lerno. All rights reserved. +// Use of this source code is governed by the MIT license +// a copy of which can be found in the LICENSE_STDLIB file. module std::array; import std::mem; diff --git a/resources/lib/std/atomic.c3 b/resources/lib/std/atomic.c3 index ea778e589..faa3a2771 100644 --- a/resources/lib/std/atomic.c3 +++ b/resources/lib/std/atomic.c3 @@ -1,2 +1,5 @@ +// Copyright (c) 2021 Christoffer Lerno. All rights reserved. +// Use of this source code is governed by the MIT license +// a copy of which can be found in the LICENSE_STDLIB file. module std::atomic; diff --git a/resources/lib/std/builtin.c3 b/resources/lib/std/builtin.c3 index 6af2c8a31..ee5396538 100644 --- a/resources/lib/std/builtin.c3 +++ b/resources/lib/std/builtin.c3 @@ -1,3 +1,6 @@ +// Copyright (c) 2021 Christoffer Lerno. All rights reserved. +// Use of this source code is governed by the MIT license +// a copy of which can be found in the LICENSE_STDLIB file. module std::builtin; /* enum TypeKind diff --git a/resources/lib/std/cinterop.c3 b/resources/lib/std/cinterop.c3 index e0a3d5f56..4c24c2c61 100644 --- a/resources/lib/std/cinterop.c3 +++ b/resources/lib/std/cinterop.c3 @@ -1,3 +1,6 @@ +// Copyright (c) 2021 Christoffer Lerno. All rights reserved. +// Use of this source code is governed by the MIT license +// a copy of which can be found in the LICENSE_STDLIB file. module std::cinterop; const C_INT_SIZE = ${C_INT_SIZE}; diff --git a/resources/lib/std/env.c3 b/resources/lib/std/env.c3 index e04eee38a..e458c8cbd 100644 --- a/resources/lib/std/env.c3 +++ b/resources/lib/std/env.c3 @@ -1,3 +1,6 @@ +// Copyright (c) 2021 Christoffer Lerno. All rights reserved. +// Use of this source code is governed by the MIT license +// a copy of which can be found in the LICENSE_STDLIB file. module std::env; enum CompilerOptLevel diff --git a/resources/lib/std/hash/adler32.c3 b/resources/lib/std/hash/adler32.c3 index 43e160a95..52f65563c 100644 --- a/resources/lib/std/hash/adler32.c3 +++ b/resources/lib/std/hash/adler32.c3 @@ -1,3 +1,6 @@ +// Copyright (c) 2021 Christoffer Lerno. All rights reserved. +// Use of this source code is governed by the MIT license +// a copy of which can be found in the LICENSE_STDLIB file. module std::hash::adler32; private const uint ADLER_CONST = 65521; diff --git a/resources/lib/std/hash/crc32.c3 b/resources/lib/std/hash/crc32.c3 index 6e4e9c496..e33471fcc 100644 --- a/resources/lib/std/hash/crc32.c3 +++ b/resources/lib/std/hash/crc32.c3 @@ -1,3 +1,6 @@ +// Copyright (c) 2021 Christoffer Lerno. All rights reserved. +// Use of this source code is governed by the MIT license +// a copy of which can be found in the LICENSE_STDLIB file. module std::hash::crc32; struct Crc32 diff --git a/resources/lib/std/hash/crc64.c3 b/resources/lib/std/hash/crc64.c3 index a8cf76786..f18ffba86 100644 --- a/resources/lib/std/hash/crc64.c3 +++ b/resources/lib/std/hash/crc64.c3 @@ -1,3 +1,6 @@ +// Copyright (c) 2021 Christoffer Lerno. All rights reserved. +// Use of this source code is governed by the MIT license +// a copy of which can be found in the LICENSE_STDLIB file. module std::hash::crc64; struct Crc64 diff --git a/resources/lib/std/io.c3 b/resources/lib/std/io.c3 index 9d6f3f3f9..c20a93006 100644 --- a/resources/lib/std/io.c3 +++ b/resources/lib/std/io.c3 @@ -1,3 +1,6 @@ +// Copyright (c) 2021 Christoffer Lerno. All rights reserved. +// Use of this source code is governed by the MIT license +// a copy of which can be found in the LICENSE_STDLIB file. module std::io; import std::mem; import libc; diff --git a/resources/lib/std/libc.c3 b/resources/lib/std/libc.c3 index f0dbc78a7..28222fee0 100644 --- a/resources/lib/std/libc.c3 +++ b/resources/lib/std/libc.c3 @@ -1,3 +1,6 @@ +// Copyright (c) 2021 Christoffer Lerno. All rights reserved. +// Use of this source code is governed by the MIT license +// a copy of which can be found in the LICENSE_STDLIB file. module libc; // stdlib diff --git a/resources/lib/std/linkedlist.c3 b/resources/lib/std/linkedlist.c3 index c77f20474..cfd4e30ba 100644 --- a/resources/lib/std/linkedlist.c3 +++ b/resources/lib/std/linkedlist.c3 @@ -1,3 +1,6 @@ +// Copyright (c) 2021 Christoffer Lerno. All rights reserved. +// Use of this source code is governed by the MIT license +// a copy of which can be found in the LICENSE_STDLIB file. module std::array::linkedlist; import std::mem; diff --git a/resources/lib/std/list.c3 b/resources/lib/std/list.c3 index 89cf3400a..cf4972ddd 100644 --- a/resources/lib/std/list.c3 +++ b/resources/lib/std/list.c3 @@ -1,3 +1,6 @@ +// Copyright (c) 2021 Christoffer Lerno. All rights reserved. +// Use of this source code is governed by the MIT license +// a copy of which can be found in the LICENSE_STDLIB file. module std::array::list; import std::mem; diff --git a/resources/lib/std/math.c3 b/resources/lib/std/math.c3 index 7d5c19825..8384e4a7a 100644 --- a/resources/lib/std/math.c3 +++ b/resources/lib/std/math.c3 @@ -1,3 +1,6 @@ +// Copyright (c) 2021 Christoffer Lerno. All rights reserved. +// Use of this source code is governed by the MIT license +// a copy of which can be found in the LICENSE_STDLIB file. module std::math; // TODO Define these using quad precision. diff --git a/resources/lib/std/mem.c3 b/resources/lib/std/mem.c3 index 7e058a07d..1a03bad5e 100644 --- a/resources/lib/std/mem.c3 +++ b/resources/lib/std/mem.c3 @@ -1,3 +1,6 @@ +// Copyright (c) 2021 Christoffer Lerno. All rights reserved. +// Use of this source code is governed by the MIT license +// a copy of which can be found in the LICENSE_STDLIB file. module std::mem; extern fn void* _malloc(usize bytes) @extname("malloc"); diff --git a/resources/lib/std/runtime.c3 b/resources/lib/std/runtime.c3 index 81ed609d4..463d83749 100644 --- a/resources/lib/std/runtime.c3 +++ b/resources/lib/std/runtime.c3 @@ -1,3 +1,6 @@ +// Copyright (c) 2021 Christoffer Lerno. All rights reserved. +// Use of this source code is governed by the MIT license +// a copy of which can be found in the LICENSE_STDLIB file. module std::runtime; struct VirtualAny