Michael Jones f9c2377fb6
[libc][NFC] Cleanup time.h (#122027)
While working on strftime I noticed some constants were being defined in
unexpected places. One thing led to another, and I ended up doing a
major cleanup of the time functions.

What's included:
All uses of <time.h> in /src and /test removed (except for LibcTest.cpp)
The various time constants have been moved to time_constants.h, and the
`time_constants` namespace.
struct tm gets its own type indirection header now.
2025-01-08 12:28:50 -08:00

23 lines
686 B
C++

//===-- Implementation header of mktime -------------------------*- 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_MKTIME_H
#define LLVM_LIBC_SRC_TIME_MKTIME_H
#include "hdr/types/struct_tm.h"
#include "hdr/types/time_t.h"
#include "src/__support/macros/config.h"
namespace LIBC_NAMESPACE_DECL {
time_t mktime(struct tm *t1);
} // namespace LIBC_NAMESPACE_DECL
#endif // LLVM_LIBC_SRC_TIME_MKTIME_H