Skip to content

Commit

Permalink
druntime: Add version(GNU) definitions of c_long and c_ulong
Browse files Browse the repository at this point in the history
  • Loading branch information
ibuclaw committed Jan 19, 2025
1 parent d115713 commit 308fcc0
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion druntime/src/core/stdc/config.d
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,26 @@ else version (TVOS)
else version (WatchOS)
version = Darwin;

version (Windows)
version (GNU)
{
import gcc.builtins;

alias __builtin_clong c_long;
alias __builtin_culong c_ulong;

enum __c_long : __builtin_clong;
enum __c_ulong : __builtin_culong;

alias __c_long cpp_long;
alias __c_ulong cpp_ulong;

enum __c_longlong : __builtin_clonglong;
enum __c_ulonglong : __builtin_culonglong;

alias __c_longlong cpp_longlong;
alias __c_ulonglong cpp_ulonglong;
}
else version (Windows)
{
enum __c_long : int;
enum __c_ulong : uint;
Expand Down

0 comments on commit 308fcc0

Please sign in to comment.