You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by an...@apache.org on 2022/02/16 14:55:50 UTC

[mynewt-nimble] branch master updated: babblesim: Remove local libc

This is an automated email from the ASF dual-hosted git repository.

andk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git


The following commit(s) were added to refs/heads/master by this push:
     new b0c69ce  babblesim: Remove local libc
b0c69ce is described below

commit b0c69ce9d443b2be3a6871d4d722e2292b62b051
Author: Andrzej Kaczmarek <an...@codecoup.pl>
AuthorDate: Wed Feb 16 12:55:48 2022 +0100

    babblesim: Remove local libc
    
    This does not seem to be used anymore.
---
 babblesim/libc/LICENSE       | 133 -------------------------------------------
 babblesim/libc/pkg.yml       |  28 ---------
 babblesim/libc/src/strlcat.c |  30 ----------
 babblesim/libc/src/strlcpy.c |  26 ---------
 4 files changed, 217 deletions(-)

diff --git a/babblesim/libc/LICENSE b/babblesim/libc/LICENSE
deleted file mode 100644
index b791574..0000000
--- a/babblesim/libc/LICENSE
+++ /dev/null
@@ -1,133 +0,0 @@
-Baselibc is based on klibc 1.5.23 and tinyprintf modules.
-None of the GPL-licensed parts of klibc are used.
-
-Baselibc is licensed under the BSD license:
-
-Copyright (c) 2012 Petteri Aimonen <jpa at blc.mail.kapsi.fi>
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-    * Redistributions of source code must retain the above copyright
-      notice, this list of conditions and the following disclaimer.
-    * 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.
-    * Neither the name of Kustaa Nyholm or SpareTimeLabs 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 COPYRIGHT HOLDERS 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 COPYRIGHT HOLDER 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.
-
-The original licenses of the modules are included below:
-
------------------- Tinyprintf license ------------------
-
-Copyright (c) 2004,2012 Kustaa Nyholm / SpareTimeLabs
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-    * Redistributions of source code must retain the above copyright
-      notice, this list of conditions and the following disclaimer.
-    * 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.
-    * Neither the name of Kustaa Nyholm or SpareTimeLabs 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 COPYRIGHT HOLDERS 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 COPYRIGHT HOLDER 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.
-
-------------------- klibc license -------------------------
-This license applies to all files in directory and its subdirectories,
-unless otherwise noted in individual files.
-
-
-Some files are derived from files derived from the include/ directory
-of the Linux kernel, and are licensed under the terms of the GNU
-General Public License, version 2, as released by the Free Software
-Foundation, Inc.; incorporated herein by reference.
-[These files are not included in the baselibc.]
-
-                                -----
-
-Some files are derived from files copyrighted by the Regents of The
-University of California, and are available under the following
-license:
-
-Note: The advertising clause in the license appearing on BSD Unix
-files was officially rescinded by the Director of the Office of
-Technology Licensing of the University of California on July 22
-1999. He states that clause 3 is "hereby deleted in its entirety."
-
- * Copyright (c)
- *      The Regents of the University of California.  All rights reserved.
- *
- * 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. 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)
- * 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.
-
-For all remaining files [of klibc], the following license applies:
-
- * 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:
- *
- * Any copyright notice(s) 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.
-
diff --git a/babblesim/libc/pkg.yml b/babblesim/libc/pkg.yml
deleted file mode 100644
index 297bfa9..0000000
--- a/babblesim/libc/pkg.yml
+++ /dev/null
@@ -1,28 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#  http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-pkg.name: babblesim/libc
-pkg.type: sdk
-pkg.description: Functions from apache-mynewt-core/libc that not exists in Linux system.
-pkg.author: "Codecoup"
-pkg.homepage: "http://mynewt.apache.org/"
-pkg.keywords:
-
-pkg.deps:
-  - "@apache-mynewt-core/kernel/os"
diff --git a/babblesim/libc/src/strlcat.c b/babblesim/libc/src/strlcat.c
deleted file mode 100644
index 6d95087..0000000
--- a/babblesim/libc/src/strlcat.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * strlcat.c
- */
-
-#include <string.h>
-
-size_t strlcat(char *dst, const char *src, size_t size)
-{
-	size_t bytes = 0;
-	char *q = dst;
-	const char *p = src;
-	char ch;
-
-	while (bytes < size && *q) {
-		q++;
-		bytes++;
-	}
-	if (bytes == size)
-		return (bytes + strlen(src));
-
-	while ((ch = *p++)) {
-		if (bytes + 1 < size)
-			*q++ = ch;
-
-		bytes++;
-	}
-
-	*q = '\0';
-	return bytes;
-}
diff --git a/babblesim/libc/src/strlcpy.c b/babblesim/libc/src/strlcpy.c
deleted file mode 100644
index 3ec8fd2..0000000
--- a/babblesim/libc/src/strlcpy.c
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * strlcpy.c
- */
-
-#include <string.h>
-
-size_t strlcpy(char *dst, const char *src, size_t size)
-{
-	size_t bytes = 0;
-	char *q = dst;
-	const char *p = src;
-	char ch;
-
-	while ((ch = *p++)) {
-		if (bytes + 1 < size)
-			*q++ = ch;
-
-		bytes++;
-	}
-
-	/* If size == 0 there is no space for a final null... */
-	if (size)
-		*q = '\0';
-
-	return bytes;
-}