[libc-commits] [libc] [libc] Add `ctime_s` (PR #110676)

Rajveer Singh Bharadwaj via libc-commits libc-commits at lists.llvm.org
Sat Nov 23 10:29:19 PST 2024


================
@@ -0,0 +1,25 @@
+//===-- Implementation header of ctime_s ------------------------*- C++ -*-===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_LIBC_SRC_TIME_CTIME_S_H
+#define LLVM_LIBC_SRC_TIME_CTIME_S_H
+
+#define __STDC_WANT_LIB_EXT1__ 1
+
+#include "hdr/types/rsize_t.h"
+#include "hdr/types/time_t.h"
+#include "src/__support/macros/config.h"
+#include "stdint.h"
----------------
Rajveer100 wrote:

After making this change, code doesn't compile, since the test file uses the header which previously defined `__STDC_WANT_LIB_EXT1__` which you now suggest to move to the source file.

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


More information about the libc-commits mailing list