From f5e48e94a2f4d4bbd6e5628c7f2afafc6dbcc459 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Thu, 7 Mar 2024 17:28:52 -0500 Subject: build: Build mlibc + add distclean target Signed-off-by: Ian Moffett --- lib/mlibc/options/glibc/generic/string.cpp | 32 ------------------------------ 1 file changed, 32 deletions(-) delete mode 100644 lib/mlibc/options/glibc/generic/string.cpp (limited to 'lib/mlibc/options/glibc/generic/string.cpp') diff --git a/lib/mlibc/options/glibc/generic/string.cpp b/lib/mlibc/options/glibc/generic/string.cpp deleted file mode 100644 index 19f77c7..0000000 --- a/lib/mlibc/options/glibc/generic/string.cpp +++ /dev/null @@ -1,32 +0,0 @@ -#ifndef _GNU_SOURCE -# define _GNU_SOURCE -#endif -#include -#include - -/* This is a bit of a weird detail of the GNU implementation and C's lack of - * overloading and strictness: GNU takes const char * and returns a char * so - * that it autocasts to your desired constness, this function never actually - * modifies the string. - */ -char *__mlibc_gnu_basename_c(const char *path) { - char *basename_component = strrchr(path, '/'); - if (!basename_component) { - return const_cast(path); - } - return basename_component + 1; -} - - -/* GNU exposes these overloads, and as a result, we should probably have them - * checked, to make sure we actually match expectations. - */ -static_assert( - std::is_same_v, - "C++ overloads broken" -); - -static_assert( - std::is_same_v, - "C++ overloads broken" -); -- cgit v1.2.3