[libc-commits] [libc] [libc] Add `dlfcn.h` placeholder (PR #97501)
via libc-commits
libc-commits at lists.llvm.org
Sat Jul 6 03:13:48 PDT 2024
================
@@ -0,0 +1,19 @@
+//===-- Implementation of delerror ----------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "dlerror.h"
+
+#include "src/__support/common.h"
+
+namespace LIBC_NAMESPACE {
+
+LLVM_LIBC_FUNCTION(char *, dlerror, ()) {
+ return const_cast<char *>("unsupported");
----------------
overmighty wrote:
Not sure if that `const_cast` is fine. Despite the non-const `char *` return type, POSIX does state that "The application shall not modify the string returned": https://pubs.opengroup.org/onlinepubs/9699919799/functions/dlerror.html.
https://github.com/llvm/llvm-project/pull/97501
More information about the libc-commits
mailing list