swift-server / swift-server/async-http-client

Windows version

Open
#926 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Swift
Stars
1.1k
Forks
156
PR merge metrics
No merged PRs in 30d

Description

This file does not compile on Windows using clang. Swift comes bundled with clang. Though I disabled the bundled LLVM files that Swift adds to the path environment variable, to use my already installed clang version.

#if __APPLE__
    #include <xlocale.h>
#elif __linux__
    #include <locale.h>
#endif

The errors are about strptime_l and locale_t. The former doesn't exist on Windows, the latter is only available as _locale_t.

Is the clang version that is bundled with Swift a modified version of clang that adds this? As the target is unknown rather than pc.
Or is it a known issue?

clang version 21.1.6
Target: x86_64-unknown-windows-msvc
Thread model: posix
Build config: +assertions

My clang version:

clang version 22.1.8 (https://github.com/llvm/llvm-project ca7933e47d3a3451d81e72ac174dcb5aa28b59d1)
Target: x86_64-pc-windows-msvc
Thread model: posix

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no source file or test; start by locating the shown conditional include block and reproducing the build with x86_64-unknown-windows-msvc. Done means the Windows clang build no longer fails on strptime_l and locale_t, with the Windows-specific behavior verified.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, swift
Domain
networking, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.