[libc-commits] [libc] [libc] Add stubs for 'strftime' function (PR #106631)

Joseph Huber via libc-commits libc-commits at lists.llvm.org
Fri Aug 30 17:37:19 PDT 2024


================
@@ -0,0 +1,25 @@
+//===-- Implementation of strftime function -------------------------------===//
+//
+// 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 "src/time/strftime.h"
+#include "src/__support/common.h"
+#include "src/__support/macros/config.h"
+#include "src/time/time_utils.h"
+
+namespace LIBC_NAMESPACE_DECL {
+
+using LIBC_NAMESPACE::time_utils::TimeConstants;
+
+LLVM_LIBC_FUNCTION(size_t, strftime,
+                   (char *__restrict, size_t, const char *__restrict,
+                    const struct tm *)) {
+  // TODO: Implement this for the default locale.
----------------
jhuber6 wrote:

ENOSYS isn't a generic errno value, so probably can't use it for all implementations.

https://github.com/llvm/llvm-project/pull/106631


More information about the libc-commits mailing list