diff --git a/src/core/atomic.d b/src/core/atomic.d index f58bda63be..9cddc7c440 100644 --- a/src/core/atomic.d +++ b/src/core/atomic.d @@ -37,9 +37,9 @@ private template HeadUnshared(T) { static if( is( T U : shared(U*) ) ) - alias shared(U)* HeadUnshared; + alias HeadUnshared = shared(U)*; else - alias T HeadUnshared; + alias HeadUnshared = T; } } @@ -143,7 +143,7 @@ version( CoreDdoc ) } deprecated("Please use MemoryOrder instead.") - alias MemoryOrder msync; + alias msync = MemoryOrder; /** * Inserts a full load/store memory fence (on platforms that need it). This ensures @@ -324,7 +324,7 @@ else version( AsmX86_32 ) } deprecated("Please use MemoryOrder instead.") - alias MemoryOrder msync; + alias msync = MemoryOrder; private @@ -785,7 +785,7 @@ else version( AsmX86_64 ) } deprecated("Please use MemoryOrder instead.") - alias MemoryOrder msync; + alias msync = MemoryOrder; private diff --git a/src/core/demangle.d b/src/core/demangle.d index 9f7ececbb5..fcf7808103 100644 --- a/src/core/demangle.d +++ b/src/core/demangle.d @@ -1884,12 +1884,12 @@ version(unittest) template staticIota(int x) { - template Seq(T...){ alias T Seq; } + template Seq(T...){ alias Seq = T; } static if (x == 0) - alias Seq!() staticIota; + alias staticIota = Seq!(); else - alias Seq!(staticIota!(x - 1), x - 1) staticIota; + alias staticIota = Seq!(staticIota!(x - 1), x - 1); } } unittest diff --git a/src/core/math.d b/src/core/math.d index 84ad38e803..ca455635b2 100644 --- a/src/core/math.d +++ b/src/core/math.d @@ -1,4 +1,4 @@ -// Written in the D programming language. +// Written in the D programming language. /** * Builtin mathematical intrinsics diff --git a/src/core/memory.d b/src/core/memory.d index 667505f866..f438d376fa 100644 --- a/src/core/memory.d +++ b/src/core/memory.d @@ -232,7 +232,7 @@ struct GC * size = The size of the block, calculated from base. * attr = Attribute bits set on the memory block. */ - alias BlkInfo_ BlkInfo; + alias BlkInfo = BlkInfo_; /** diff --git a/src/core/runtime.d b/src/core/runtime.d index 78d6fa2bee..ceda0c542c 100644 --- a/src/core/runtime.d +++ b/src/core/runtime.d @@ -31,9 +31,9 @@ extern(C) int rt_term(); private { - alias bool function() ModuleUnitTester; - alias bool function(Object) CollectHandler; - alias Throwable.TraceInfo function( void* ptr ) TraceHandler; + alias ModuleUnitTester = bool function(); + alias CollectHandler = bool function(Object); + alias TraceHandler = Throwable.TraceInfo function( void* ptr ); extern (C) void rt_setCollectHandler( CollectHandler h ); extern (C) CollectHandler rt_getCollectHandler(); @@ -41,7 +41,7 @@ private extern (C) void rt_setTraceHandler( TraceHandler h ); extern (C) TraceHandler rt_getTraceHandler(); - alias void delegate( Throwable ) ExceptionHandler; + alias ExceptionHandler = void delegate( Throwable ); extern (C) void* thread_stackBottom(); diff --git a/src/core/simd.d b/src/core/simd.d index 84161cd6b0..adff67f836 100644 --- a/src/core/simd.d +++ b/src/core/simd.d @@ -33,34 +33,34 @@ template Vector(T) /* __vector is compiler magic, hide it behind a template. * The compiler will reject T's that don't work. */ - alias __vector(T) Vector; + alias Vector = __vector(T); } /* Handy aliases */ -static if (is(Vector!(void[16]))) alias Vector!(void[16]) void16; /// -static if (is(Vector!(double[2]))) alias Vector!(double[2]) double2; /// -static if (is(Vector!(float[4]))) alias Vector!(float[4]) float4; /// -static if (is(Vector!(byte[16]))) alias Vector!(byte[16]) byte16; /// -static if (is(Vector!(ubyte[16]))) alias Vector!(ubyte[16]) ubyte16; /// -static if (is(Vector!(short[8]))) alias Vector!(short[8]) short8; /// -static if (is(Vector!(ushort[8]))) alias Vector!(ushort[8]) ushort8; /// -static if (is(Vector!(int[4]))) alias Vector!(int[4]) int4; /// -static if (is(Vector!(uint[4]))) alias Vector!(uint[4]) uint4; /// -static if (is(Vector!(long[2]))) alias Vector!(long[2]) long2; /// -static if (is(Vector!(ulong[2]))) alias Vector!(ulong[2]) ulong2; /// - -static if (is(Vector!(void[32]))) alias Vector!(void[32]) void32; /// -static if (is(Vector!(double[4]))) alias Vector!(double[4]) double4; /// -static if (is(Vector!(float[8]))) alias Vector!(float[8]) float8; /// -static if (is(Vector!(byte[32]))) alias Vector!(byte[32]) byte32; /// -static if (is(Vector!(ubyte[32]))) alias Vector!(ubyte[32]) ubyte32; /// -static if (is(Vector!(short[16]))) alias Vector!(short[16]) short16; /// -static if (is(Vector!(ushort[16]))) alias Vector!(ushort[16]) ushort16; /// -static if (is(Vector!(int[8]))) alias Vector!(int[8]) int8; /// -static if (is(Vector!(uint[8]))) alias Vector!(uint[8]) uint8; /// -static if (is(Vector!(long[4]))) alias Vector!(long[4]) long4; /// -static if (is(Vector!(ulong[4]))) alias Vector!(ulong[4]) ulong4; /// +static if (is(Vector!(void[16]))) alias void16 = Vector!(void[16]); /// +static if (is(Vector!(double[2]))) alias double2 = Vector!(double[2]); /// +static if (is(Vector!(float[4]))) alias float4 = Vector!(float[4]); /// +static if (is(Vector!(byte[16]))) alias byte16 = Vector!(byte[16]); /// +static if (is(Vector!(ubyte[16]))) alias ubyte16 = Vector!(ubyte[16]); /// +static if (is(Vector!(short[8]))) alias short8 = Vector!(short[8]); /// +static if (is(Vector!(ushort[8]))) alias ushort8 = Vector!(ushort[8]); /// +static if (is(Vector!(int[4]))) alias int4 = Vector!(int[4]); /// +static if (is(Vector!(uint[4]))) alias uint4 = Vector!(uint[4]); /// +static if (is(Vector!(long[2]))) alias long2 = Vector!(long[2]); /// +static if (is(Vector!(ulong[2]))) alias ulong2 = Vector!(ulong[2]); /// + +static if (is(Vector!(void[32]))) alias void32 = Vector!(void[32]); /// +static if (is(Vector!(double[4]))) alias double4 = Vector!(double[4]); /// +static if (is(Vector!(float[8]))) alias float8 = Vector!(float[8]); /// +static if (is(Vector!(byte[32]))) alias byte32 = Vector!(byte[32]); /// +static if (is(Vector!(ubyte[32]))) alias ubyte32 = Vector!(ubyte[32]); /// +static if (is(Vector!(short[16]))) alias short16 = Vector!(short[16]); /// +static if (is(Vector!(ushort[16]))) alias ushort16 = Vector!(ushort[16]); /// +static if (is(Vector!(int[8]))) alias int8 = Vector!(int[8]); /// +static if (is(Vector!(uint[8]))) alias uint8 = Vector!(uint[8]); /// +static if (is(Vector!(long[4]))) alias long4 = Vector!(long[4]); /// +static if (is(Vector!(ulong[4]))) alias ulong4 = Vector!(ulong[4]); /// version ( D_SIMD ) { diff --git a/src/core/stdc/complex.d b/src/core/stdc/complex.d index fedf295541..9b987826a1 100644 --- a/src/core/stdc/complex.d +++ b/src/core/stdc/complex.d @@ -17,8 +17,8 @@ extern (C): nothrow: @nogc: -alias creal complex; -alias ireal imaginary; +alias complex = creal; +alias imaginary = ireal; cdouble cacos(cdouble z); cfloat cacosf(cfloat z); diff --git a/src/core/stdc/config.d b/src/core/stdc/config.d index 14efecd92d..f981a34d3c 100644 --- a/src/core/stdc/config.d +++ b/src/core/stdc/config.d @@ -47,18 +47,18 @@ version( Windows ) * cpp_xxxx. */ - alias __c_long cpp_long; - alias __c_ulong cpp_ulong; + alias cpp_long = __c_long; + alias cpp_ulong = __c_ulong; - alias int c_long; - alias uint c_ulong; + alias c_long = int; + alias c_ulong = uint; } else { static if( (void*).sizeof > int.sizeof ) { - alias long c_long; - alias ulong c_ulong; + alias c_long = long; + alias c_ulong = ulong; } else { @@ -78,11 +78,11 @@ else alias lng this; } - alias __c_long cpp_long; - alias __c_ulong cpp_ulong; + alias cpp_long = __c_long; + alias cpp_ulong = __c_ulong; - alias int c_long; - alias uint c_ulong; + alias c_long = int; + alias c_ulong = uint; } } @@ -104,37 +104,37 @@ version( DigitalMars ) alias ld this; } - alias __c_long_double c_long_double; + alias c_long_double = __c_long_double; } else version( X86 ) { - alias real c_long_double; + alias c_long_double = real; } else version( X86_64 ) { version( linux ) - alias real c_long_double; + alias c_long_double = real; else version( FreeBSD ) - alias real c_long_double; + alias c_long_double = real; else version( OSX ) - alias real c_long_double; + alias c_long_double = real; } } else version( GNU ) - alias real c_long_double; + alias c_long_double = real; else version( LDC ) { version( X86 ) - alias real c_long_double; + alias c_long_double = real; else version( X86_64 ) - alias real c_long_double; + alias c_long_double = real; } else version( SDC ) { version( X86 ) - alias real c_long_double; + alias c_long_double = real; else version( X86_64 ) - alias real c_long_double; + alias c_long_double = real; } static assert(is(c_long_double), "c_long_double needs to be declared for this platform/architecture."); diff --git a/src/core/stdc/fenv.d b/src/core/stdc/fenv.d index 5138441c97..6898d912be 100644 --- a/src/core/stdc/fenv.d +++ b/src/core/stdc/fenv.d @@ -138,8 +138,8 @@ else version ( OSX ) { version ( BigEndian ) { - alias uint fenv_t; - alias uint fexcept_t; + alias fenv_t = uint; + alias fexcept_t = uint; } version ( LittleEndian ) { @@ -151,7 +151,7 @@ else version ( OSX ) byte[8] __reserved; } - alias ushort fexcept_t; + alias fexcept_t = ushort; } } else version ( FreeBSD ) @@ -166,7 +166,7 @@ else version ( FreeBSD ) byte[16] __other; } - alias ushort fexcept_t; + alias fexcept_t = ushort; } else version( Android ) { @@ -182,7 +182,7 @@ else version( Android ) byte[16] __other; } - alias ushort fexcept_t; + alias fexcept_t = ushort; } else { @@ -207,7 +207,7 @@ else version( Solaris ) c_ulong __fsr; } - alias int fexcept_t; + alias fexcept_t = int; } else { diff --git a/src/core/stdc/inttypes.d b/src/core/stdc/inttypes.d index 9b36259909..0963cd32ae 100644 --- a/src/core/stdc/inttypes.d +++ b/src/core/stdc/inttypes.d @@ -26,7 +26,7 @@ struct imaxdiv_t rem; } -private alias immutable(char)* _cstr; +private alias _cstr = immutable(char)*; enum _cstr PRId8 = "hhd"; enum _cstr PRId16 = "hd"; diff --git a/src/core/stdc/math.d b/src/core/stdc/math.d index 03533b90c4..6219a7fc9f 100644 --- a/src/core/stdc/math.d +++ b/src/core/stdc/math.d @@ -18,8 +18,8 @@ extern (C): nothrow: @nogc: -alias float float_t; -alias double double_t; +alias float_t = float; +alias double_t = double; enum double HUGE_VAL = double.infinity; enum double HUGE_VALF = float.infinity; diff --git a/src/core/stdc/signal.d b/src/core/stdc/signal.d index 0312b37295..8705303037 100644 --- a/src/core/stdc/signal.d +++ b/src/core/stdc/signal.d @@ -18,9 +18,9 @@ nothrow: @nogc: // this should be volatile -alias int sig_atomic_t; +alias sig_atomic_t = int; -private alias void function(int) sigfn_t; +private alias sigfn_t = void function(int); version( Posix ) { diff --git a/src/core/stdc/stdarg.d b/src/core/stdc/stdarg.d index c2a2c17bd6..483d198a18 100644 --- a/src/core/stdc/stdarg.d +++ b/src/core/stdc/stdarg.d @@ -18,7 +18,7 @@ version( X86 ) /********************* * The argument pointer type. */ - alias char* va_list; + alias va_list = char*; /********** * Initialize ap. @@ -87,7 +87,7 @@ else version (Windows) // Win64 /********************* * The argument pointer type. */ - alias char* va_list; + alias va_list = char*; /********** * Initialize ap. @@ -213,7 +213,7 @@ else version (X86_64) } else static if (U.length == 1) { // Arg is passed in one register - alias U[0] T1; + alias T1 = U[0]; static if (is(T1 == double) || is(T1 == float) || isVectorType!(T1)) { // Passed in XMM register if (ap.offset_fpregs < (6 * 8 + 16 * 8)) @@ -244,8 +244,8 @@ else version (X86_64) } else static if (U.length == 2) { // Arg is passed in two registers - alias U[0] T1; - alias U[1] T2; + alias T1 = U[0]; + alias T2 = U[1]; auto p = cast(void*)&parmn + 8; // Both must be in registers, or both on stack, hence 4 cases diff --git a/src/core/stdc/stddef.d b/src/core/stdc/stddef.d index 57f893e519..b3db4e4098 100644 --- a/src/core/stdc/stddef.d +++ b/src/core/stdc/stddef.d @@ -21,9 +21,9 @@ nothrow: version( Windows ) { - alias wchar wchar_t; + alias wchar_t = wchar; } else { - alias dchar wchar_t; + alias wchar_t = dchar; } diff --git a/src/core/stdc/stdio.d b/src/core/stdc/stdio.d index 730544b8c2..f6d1eafc0e 100644 --- a/src/core/stdc/stdio.d +++ b/src/core/stdc/stdio.d @@ -180,7 +180,7 @@ enum version( CRuntime_DigitalMars ) { - alias int fpos_t; //check this + alias fpos_t = int; //check this struct _iobuf { @@ -194,11 +194,11 @@ version( CRuntime_DigitalMars ) char* __tmpnum; } - alias shared(_iobuf) FILE; + alias FILE = shared(_iobuf); } else version( CRuntime_Microsoft ) { - alias int fpos_t; //check this + alias fpos_t = int; //check this struct _iobuf { @@ -212,11 +212,11 @@ else version( CRuntime_Microsoft ) char* _tmpfname; } - alias shared(_iobuf) FILE; + alias FILE = shared(_iobuf); } else version( linux ) { - alias int fpos_t; //this is probably wrong, fix this + alias fpos_t = int; //this is probably wrong, fix this struct _IO_FILE { @@ -243,12 +243,12 @@ else version( linux ) void* _lock; } - alias _IO_FILE _iobuf; //remove later - alias shared(_IO_FILE) FILE; + alias _iobuf = _IO_FILE; //remove later + alias FILE = shared(_IO_FILE); } else version( OSX ) { - alias int fpos_t; //check this + alias fpos_t = int; //check this struct __sFILE { @@ -279,12 +279,12 @@ else version( OSX ) fpos_t _offset; } - alias __sFILE _iobuf; //remove later - alias shared(__sFILE) FILE; + alias _iobuf = __sFILE; //remove later + alias FILE = shared(__sFILE); } else version( FreeBSD ) { - alias int fpos_t; //check this + alias fpos_t = int; //check this struct __sFILE { @@ -321,12 +321,12 @@ else version( FreeBSD ) __mbstate_t _mbstate; } - alias __sFILE _iobuf; //remove later - alias shared(__sFILE) FILE; + alias _iobuf = __sFILE; //remove later + alias FILE = shared(__sFILE); } else version (Solaris) { - alias int fpos_t; //check this + alias fpos_t = int; //check this struct _iobuf { @@ -343,11 +343,11 @@ else version (Solaris) // __filler:10 } - alias shared(_iobuf) FILE; + alias FILE = shared(_iobuf); } else version( Android ) { - alias off_t fpos_t; + alias fpos_t = off_t; struct __sFILE { @@ -378,8 +378,8 @@ else version( Android ) fpos_t _offset; } - alias __sFILE _iobuf; //remove later - alias shared(__sFILE) FILE; + alias _iobuf = __sFILE; //remove later + alias FILE = shared(__sFILE); } else { @@ -483,9 +483,9 @@ else version( OSX ) private extern shared FILE* __stdoutp; private extern shared FILE* __stderrp; - alias __stdinp stdin; - alias __stdoutp stdout; - alias __stderrp stderr; + alias stdin = __stdinp; + alias stdout = __stdoutp; + alias stderr = __stderrp; } else version( FreeBSD ) { @@ -500,9 +500,9 @@ else version( FreeBSD ) private extern shared FILE* __stdoutp; private extern shared FILE* __stderrp; - alias __stdinp stdin; - alias __stdoutp stdout; - alias __stderrp stderr; + alias stdin = __stdinp; + alias stdout = __stdoutp; + alias stderr = __stderrp; } else version (Solaris) { @@ -570,40 +570,40 @@ version (MinGW) // Prefer the MinGW versions over the MSVC ones, as the latter don't handle // reals at all. int __mingw_fprintf(FILE* stream, in char* format, ...); - alias __mingw_fprintf fprintf; + alias fprintf = __mingw_fprintf; int __mingw_fscanf(FILE* stream, in char* format, ...); - alias __mingw_fscanf fscanf; + alias fscanf = __mingw_fscanf; int __mingw_sprintf(char* s, in char* format, ...); - alias __mingw_sprintf sprintf; + alias sprintf = __mingw_sprintf; int __mingw_sscanf(in char* s, in char* format, ...); - alias __mingw_sscanf sscanf; + alias sscanf = __mingw_sscanf; int __mingw_vfprintf(FILE* stream, in char* format, va_list arg); - alias __mingw_vfprintf vfprintf; + alias vfprintf = __mingw_vfprintf; int __mingw_vfscanf(FILE* stream, in char* format, va_list arg); - alias __mingw_vfscanf vfscanf; + alias vfscanf = __mingw_vfscanf; int __mingw_vsprintf(char* s, in char* format, va_list arg); - alias __mingw_vsprintf vsprintf; + alias vsprintf = __mingw_vsprintf; int __mingw_vsscanf(in char* s, in char* format, va_list arg); - alias __mingw_vsscanf vsscanf; + alias vsscanf = __mingw_vsscanf; int __mingw_vprintf(in char* format, va_list arg); - alias __mingw_vprintf vprintf; + alias vprintf = __mingw_vprintf; int __mingw_vscanf(in char* format, va_list arg); - alias __mingw_vscanf vscanf; + alias vscanf = __mingw_vscanf; int __mingw_printf(in char* format, ...); - alias __mingw_printf printf; + alias printf = __mingw_printf; int __mingw_scanf(in char* format, ...); - alias __mingw_scanf scanf; + alias scanf = __mingw_scanf; } else { @@ -668,12 +668,12 @@ version( MinGW ) pure int ferror(FILE* stream) { return stream._flag&_IOERR; } } int __mingw_snprintf(char* s, size_t n, in char* fmt, ...); - alias __mingw_snprintf _snprintf; - alias __mingw_snprintf snprintf; + alias _snprintf = __mingw_snprintf; + alias snprintf = __mingw_snprintf; int __mingw_vsnprintf(char* s, size_t n, in char* format, va_list arg); - alias __mingw_vsnprintf _vsnprintf; - alias __mingw_vsnprintf vsnprintf; + alias _vsnprintf = __mingw_vsnprintf; + alias vsnprintf = __mingw_vsnprintf; } else version( CRuntime_DigitalMars ) { @@ -686,10 +686,10 @@ else version( CRuntime_DigitalMars ) pure int ferror(FILE* stream) { return stream._flag&_IOERR; } } int _snprintf(char* s, size_t n, in char* fmt, ...); - alias _snprintf snprintf; + alias snprintf = _snprintf; int _vsnprintf(char* s, size_t n, in char* format, va_list arg); - alias _vsnprintf vsnprintf; + alias vsnprintf = _vsnprintf; } else version( CRuntime_Microsoft ) { @@ -703,10 +703,10 @@ else version( CRuntime_Microsoft ) pure int fileno(FILE* stream) { return stream._file; } } int _snprintf(char* s, size_t n, in char* fmt, ...); - alias _snprintf snprintf; + alias snprintf = _snprintf; int _vsnprintf(char* s, size_t n, in char* format, va_list arg); - alias _vsnprintf vsnprintf; + alias vsnprintf = _vsnprintf; uint _set_output_format(uint format); enum _TWO_DIGIT_EXPONENT = 1; diff --git a/src/core/stdc/stdlib.d b/src/core/stdc/stdlib.d index 785b31b5bb..9745a76e83 100644 --- a/src/core/stdc/stdlib.d +++ b/src/core/stdc/stdlib.d @@ -20,7 +20,7 @@ extern (C): /* Placed outside @nogc in order to not constrain what the callback does. */ -alias int function(in void*, in void*) _compare_fp_t; +alias _compare_fp_t = int function(in void*, in void*); void* bsearch(in void* key, in void* base, size_t nmemb, size_t size, _compare_fp_t compar); void qsort(void* base, size_t nmemb, size_t size, _compare_fp_t compar); @@ -81,7 +81,7 @@ version (CRuntime_Microsoft) else version (MinGW) { real __mingw_strtold(in char* nptr, char** endptr); - alias __mingw_strtold strtold; + alias strtold = __mingw_strtold; } else version (Android) { @@ -101,8 +101,8 @@ else version(Android) { import core.sys.posix.stdlib: lrand48, srand48; - alias core.sys.posix.stdlib.lrand48 rand; - alias core.sys.posix.stdlib.srand48 srand; + alias rand = core.sys.posix.stdlib.lrand48; + alias srand = core.sys.posix.stdlib.srand48; } else { diff --git a/src/core/stdc/tgmath.d b/src/core/stdc/tgmath.d index 99462a3936..d92f4bd5fb 100644 --- a/src/core/stdc/tgmath.d +++ b/src/core/stdc/tgmath.d @@ -23,317 +23,317 @@ nothrow: version( FreeBSD ) { - alias core.stdc.math.acos acos; - alias core.stdc.math.acosf acos; - alias core.stdc.math.acosl acos; + alias acos = core.stdc.math.acos; + alias acos = core.stdc.math.acosf; + alias acos = core.stdc.math.acosl; - alias core.stdc.complex.cacos acos; - alias core.stdc.complex.cacosf acos; - alias core.stdc.complex.cacosl acos; + alias acos = core.stdc.complex.cacos; + alias acos = core.stdc.complex.cacosf; + alias acos = core.stdc.complex.cacosl; - alias core.stdc.math.asin asin; - alias core.stdc.math.asinf asin; - alias core.stdc.math.asinl asin; + alias asin = core.stdc.math.asin; + alias asin = core.stdc.math.asinf; + alias asin = core.stdc.math.asinl; - alias core.stdc.complex.casin asin; - alias core.stdc.complex.casinf asin; - alias core.stdc.complex.casinl asin; + alias asin = core.stdc.complex.casin; + alias asin = core.stdc.complex.casinf; + alias asin = core.stdc.complex.casinl; - alias core.stdc.math.atan atan; - alias core.stdc.math.atanf atan; - alias core.stdc.math.atanl atan; + alias atan = core.stdc.math.atan; + alias atan = core.stdc.math.atanf; + alias atan = core.stdc.math.atanl; - alias core.stdc.complex.catan atan; - alias core.stdc.complex.catanf atan; - alias core.stdc.complex.catanl atan; + alias atan = core.stdc.complex.catan; + alias atan = core.stdc.complex.catanf; + alias atan = core.stdc.complex.catanl; - alias core.stdc.math.atan2 atan2; - alias core.stdc.math.atan2f atan2; - alias core.stdc.math.atan2l atan2; + alias atan2 = core.stdc.math.atan2; + alias atan2 = core.stdc.math.atan2f; + alias atan2 = core.stdc.math.atan2l; - alias core.stdc.math.cos cos; - alias core.stdc.math.cosf cos; - alias core.stdc.math.cosl cos; + alias cos = core.stdc.math.cos; + alias cos = core.stdc.math.cosf; + alias cos = core.stdc.math.cosl; - alias core.stdc.complex.ccos cos; - alias core.stdc.complex.ccosf cos; - alias core.stdc.complex.ccosl cos; + alias cos = core.stdc.complex.ccos; + alias cos = core.stdc.complex.ccosf; + alias cos = core.stdc.complex.ccosl; - alias core.stdc.math.sin sin; - alias core.stdc.math.sinf sin; - alias core.stdc.math.sinl sin; + alias sin = core.stdc.math.sin; + alias sin = core.stdc.math.sinf; + alias sin = core.stdc.math.sinl; - alias core.stdc.complex.csin csin; - alias core.stdc.complex.csinf csin; - alias core.stdc.complex.csinl csin; + alias csin = core.stdc.complex.csin; + alias csin = core.stdc.complex.csinf; + alias csin = core.stdc.complex.csinl; - alias core.stdc.math.tan tan; - alias core.stdc.math.tanf tan; - alias core.stdc.math.tanl tan; + alias tan = core.stdc.math.tan; + alias tan = core.stdc.math.tanf; + alias tan = core.stdc.math.tanl; - alias core.stdc.complex.ctan tan; - alias core.stdc.complex.ctanf tan; - alias core.stdc.complex.ctanl tan; + alias tan = core.stdc.complex.ctan; + alias tan = core.stdc.complex.ctanf; + alias tan = core.stdc.complex.ctanl; - alias core.stdc.math.acosh acosh; - alias core.stdc.math.acoshf acosh; - alias core.stdc.math.acoshl acosh; + alias acosh = core.stdc.math.acosh; + alias acosh = core.stdc.math.acoshf; + alias acosh = core.stdc.math.acoshl; - alias core.stdc.complex.cacosh acosh; - alias core.stdc.complex.cacoshf acosh; - alias core.stdc.complex.cacoshl acosh; + alias acosh = core.stdc.complex.cacosh; + alias acosh = core.stdc.complex.cacoshf; + alias acosh = core.stdc.complex.cacoshl; - alias core.stdc.math.asinh asinh; - alias core.stdc.math.asinhf asinh; - alias core.stdc.math.asinhl asinh; + alias asinh = core.stdc.math.asinh; + alias asinh = core.stdc.math.asinhf; + alias asinh = core.stdc.math.asinhl; - alias core.stdc.complex.casinh asinh; - alias core.stdc.complex.casinhf asinh; - alias core.stdc.complex.casinhl asinh; + alias asinh = core.stdc.complex.casinh; + alias asinh = core.stdc.complex.casinhf; + alias asinh = core.stdc.complex.casinhl; - alias core.stdc.math.atanh atanh; - alias core.stdc.math.atanhf atanh; - alias core.stdc.math.atanhl atanh; + alias atanh = core.stdc.math.atanh; + alias atanh = core.stdc.math.atanhf; + alias atanh = core.stdc.math.atanhl; - alias core.stdc.complex.catanh atanh; - alias core.stdc.complex.catanhf atanh; - alias core.stdc.complex.catanhl atanh; + alias atanh = core.stdc.complex.catanh; + alias atanh = core.stdc.complex.catanhf; + alias atanh = core.stdc.complex.catanhl; - alias core.stdc.math.cosh cosh; - alias core.stdc.math.coshf cosh; - alias core.stdc.math.coshl cosh; + alias cosh = core.stdc.math.cosh; + alias cosh = core.stdc.math.coshf; + alias cosh = core.stdc.math.coshl; - alias core.stdc.complex.ccosh cosh; - alias core.stdc.complex.ccoshf cosh; - alias core.stdc.complex.ccoshl cosh; + alias cosh = core.stdc.complex.ccosh; + alias cosh = core.stdc.complex.ccoshf; + alias cosh = core.stdc.complex.ccoshl; - alias core.stdc.math.sinh sinh; - alias core.stdc.math.sinhf sinh; - alias core.stdc.math.sinhl sinh; + alias sinh = core.stdc.math.sinh; + alias sinh = core.stdc.math.sinhf; + alias sinh = core.stdc.math.sinhl; - alias core.stdc.complex.csinh sinh; - alias core.stdc.complex.csinhf sinh; - alias core.stdc.complex.csinhl sinh; + alias sinh = core.stdc.complex.csinh; + alias sinh = core.stdc.complex.csinhf; + alias sinh = core.stdc.complex.csinhl; - alias core.stdc.math.tanh tanh; - alias core.stdc.math.tanhf tanh; - alias core.stdc.math.tanhl tanh; + alias tanh = core.stdc.math.tanh; + alias tanh = core.stdc.math.tanhf; + alias tanh = core.stdc.math.tanhl; - alias core.stdc.complex.ctanh tanh; - alias core.stdc.complex.ctanhf tanh; - alias core.stdc.complex.ctanhl tanh; + alias tanh = core.stdc.complex.ctanh; + alias tanh = core.stdc.complex.ctanhf; + alias tanh = core.stdc.complex.ctanhl; - alias core.stdc.math.exp exp; - alias core.stdc.math.expf exp; - alias core.stdc.math.expl exp; + alias exp = core.stdc.math.exp; + alias exp = core.stdc.math.expf; + alias exp = core.stdc.math.expl; - alias core.stdc.complex.cexp exp; - alias core.stdc.complex.cexpf exp; - alias core.stdc.complex.cexpl exp; + alias exp = core.stdc.complex.cexp; + alias exp = core.stdc.complex.cexpf; + alias exp = core.stdc.complex.cexpl; - alias core.stdc.math.exp2 exp2; - alias core.stdc.math.exp2f exp2; - alias core.stdc.math.exp2l exp2; + alias exp2 = core.stdc.math.exp2; + alias exp2 = core.stdc.math.exp2f; + alias exp2 = core.stdc.math.exp2l; - alias core.stdc.math.expm1 expm1; - alias core.stdc.math.expm1f expm1; - alias core.stdc.math.expm1l expm1; + alias expm1 = core.stdc.math.expm1; + alias expm1 = core.stdc.math.expm1f; + alias expm1 = core.stdc.math.expm1l; - alias core.stdc.math.frexp frexp; - alias core.stdc.math.frexpf frexp; - alias core.stdc.math.frexpl frexp; + alias frexp = core.stdc.math.frexp; + alias frexp = core.stdc.math.frexpf; + alias frexp = core.stdc.math.frexpl; - alias core.stdc.math.ilogb ilogb; - alias core.stdc.math.ilogbf ilogb; - alias core.stdc.math.ilogbl ilogb; + alias ilogb = core.stdc.math.ilogb; + alias ilogb = core.stdc.math.ilogbf; + alias ilogb = core.stdc.math.ilogbl; - alias core.stdc.math.ldexp ldexp; - alias core.stdc.math.ldexpf ldexp; - alias core.stdc.math.ldexpl ldexp; + alias ldexp = core.stdc.math.ldexp; + alias ldexp = core.stdc.math.ldexpf; + alias ldexp = core.stdc.math.ldexpl; - alias core.stdc.math.log log; - alias core.stdc.math.logf log; - alias core.stdc.math.logl log; + alias log = core.stdc.math.log; + alias log = core.stdc.math.logf; + alias log = core.stdc.math.logl; - alias core.stdc.complex.clog log; - alias core.stdc.complex.clogf log; - alias core.stdc.complex.clogl log; + alias log = core.stdc.complex.clog; + alias log = core.stdc.complex.clogf; + alias log = core.stdc.complex.clogl; - alias core.stdc.math.log10 log10; - alias core.stdc.math.log10f log10; - alias core.stdc.math.log10l log10; + alias log10 = core.stdc.math.log10; + alias log10 = core.stdc.math.log10f; + alias log10 = core.stdc.math.log10l; - alias core.stdc.math.log1p log1p; - alias core.stdc.math.log1pf log1p; - alias core.stdc.math.log1pl log1p; + alias log1p = core.stdc.math.log1p; + alias log1p = core.stdc.math.log1pf; + alias log1p = core.stdc.math.log1pl; - alias core.stdc.math.log2 log2; - alias core.stdc.math.log2f log2; - alias core.stdc.math.log2l log2; + alias log2 = core.stdc.math.log2; + alias log2 = core.stdc.math.log2f; + alias log2 = core.stdc.math.log2l; - alias core.stdc.math.logb logb; - alias core.stdc.math.logbf logb; - alias core.stdc.math.logbl logb; + alias logb = core.stdc.math.logb; + alias logb = core.stdc.math.logbf; + alias logb = core.stdc.math.logbl; - alias core.stdc.math.modf modf; - alias core.stdc.math.modff modf; + alias modf = core.stdc.math.modf; + alias modf = core.stdc.math.modff; // alias core.stdc.math.modfl modf; - alias core.stdc.math.scalbn scalbn; - alias core.stdc.math.scalbnf scalbn; - alias core.stdc.math.scalbnl scalbn; + alias scalbn = core.stdc.math.scalbn; + alias scalbn = core.stdc.math.scalbnf; + alias scalbn = core.stdc.math.scalbnl; - alias core.stdc.math.scalbln scalbln; - alias core.stdc.math.scalblnf scalbln; - alias core.stdc.math.scalblnl scalbln; + alias scalbln = core.stdc.math.scalbln; + alias scalbln = core.stdc.math.scalblnf; + alias scalbln = core.stdc.math.scalblnl; - alias core.stdc.math.cbrt cbrt; - alias core.stdc.math.cbrtf cbrt; - alias core.stdc.math.cbrtl cbrt; + alias cbrt = core.stdc.math.cbrt; + alias cbrt = core.stdc.math.cbrtf; + alias cbrt = core.stdc.math.cbrtl; - alias core.stdc.math.fabs fabs; - alias core.stdc.math.fabsf fabs; - alias core.stdc.math.fabsl fabs; + alias fabs = core.stdc.math.fabs; + alias fabs = core.stdc.math.fabsf; + alias fabs = core.stdc.math.fabsl; - alias core.stdc.complex.cabs fabs; - alias core.stdc.complex.cabsf fabs; - alias core.stdc.complex.cabsl fabs; + alias fabs = core.stdc.complex.cabs; + alias fabs = core.stdc.complex.cabsf; + alias fabs = core.stdc.complex.cabsl; - alias core.stdc.math.hypot hypot; - alias core.stdc.math.hypotf hypot; - alias core.stdc.math.hypotl hypot; + alias hypot = core.stdc.math.hypot; + alias hypot = core.stdc.math.hypotf; + alias hypot = core.stdc.math.hypotl; - alias core.stdc.math.pow pow; - alias core.stdc.math.powf pow; - alias core.stdc.math.powl pow; + alias pow = core.stdc.math.pow; + alias pow = core.stdc.math.powf; + alias pow = core.stdc.math.powl; - alias core.stdc.complex.cpow pow; - alias core.stdc.complex.cpowf pow; - alias core.stdc.complex.cpowl pow; + alias pow = core.stdc.complex.cpow; + alias pow = core.stdc.complex.cpowf; + alias pow = core.stdc.complex.cpowl; - alias core.stdc.math.sqrt sqrt; - alias core.stdc.math.sqrtf sqrt; - alias core.stdc.math.sqrtl sqrt; + alias sqrt = core.stdc.math.sqrt; + alias sqrt = core.stdc.math.sqrtf; + alias sqrt = core.stdc.math.sqrtl; - alias core.stdc.complex.csqrt sqrt; - alias core.stdc.complex.csqrtf sqrt; - alias core.stdc.complex.csqrtl sqrt; + alias sqrt = core.stdc.complex.csqrt; + alias sqrt = core.stdc.complex.csqrtf; + alias sqrt = core.stdc.complex.csqrtl; - alias core.stdc.math.erf erf; - alias core.stdc.math.erff erf; - alias core.stdc.math.erfl erf; + alias erf = core.stdc.math.erf; + alias erf = core.stdc.math.erff; + alias erf = core.stdc.math.erfl; - alias core.stdc.math.erfc erfc; - alias core.stdc.math.erfcf erfc; - alias core.stdc.math.erfcl erfc; + alias erfc = core.stdc.math.erfc; + alias erfc = core.stdc.math.erfcf; + alias erfc = core.stdc.math.erfcl; - alias core.stdc.math.lgamma lgamma; - alias core.stdc.math.lgammaf lgamma; - alias core.stdc.math.lgammal lgamma; + alias lgamma = core.stdc.math.lgamma; + alias lgamma = core.stdc.math.lgammaf; + alias lgamma = core.stdc.math.lgammal; - alias core.stdc.math.tgamma tgamma; - alias core.stdc.math.tgammaf tgamma; - alias core.stdc.math.tgammal tgamma; + alias tgamma = core.stdc.math.tgamma; + alias tgamma = core.stdc.math.tgammaf; + alias tgamma = core.stdc.math.tgammal; - alias core.stdc.math.ceil ceil; - alias core.stdc.math.ceilf ceil; - alias core.stdc.math.ceill ceil; + alias ceil = core.stdc.math.ceil; + alias ceil = core.stdc.math.ceilf; + alias ceil = core.stdc.math.ceill; - alias core.stdc.math.floor floor; - alias core.stdc.math.floorf floor; - alias core.stdc.math.floorl floor; + alias floor = core.stdc.math.floor; + alias floor = core.stdc.math.floorf; + alias floor = core.stdc.math.floorl; - alias core.stdc.math.nearbyint nearbyint; - alias core.stdc.math.nearbyintf nearbyint; - alias core.stdc.math.nearbyintl nearbyint; + alias nearbyint = core.stdc.math.nearbyint; + alias nearbyint = core.stdc.math.nearbyintf; + alias nearbyint = core.stdc.math.nearbyintl; - alias core.stdc.math.rint rint; - alias core.stdc.math.rintf rint; - alias core.stdc.math.rintl rint; + alias rint = core.stdc.math.rint; + alias rint = core.stdc.math.rintf; + alias rint = core.stdc.math.rintl; - alias core.stdc.math.lrint lrint; - alias core.stdc.math.lrintf lrint; - alias core.stdc.math.lrintl lrint; + alias lrint = core.stdc.math.lrint; + alias lrint = core.stdc.math.lrintf; + alias lrint = core.stdc.math.lrintl; - alias core.stdc.math.llrint llrint; - alias core.stdc.math.llrintf llrint; - alias core.stdc.math.llrintl llrint; + alias llrint = core.stdc.math.llrint; + alias llrint = core.stdc.math.llrintf; + alias llrint = core.stdc.math.llrintl; - alias core.stdc.math.round round; - alias core.stdc.math.roundf round; - alias core.stdc.math.roundl round; + alias round = core.stdc.math.round; + alias round = core.stdc.math.roundf; + alias round = core.stdc.math.roundl; - alias core.stdc.math.lround lround; - alias core.stdc.math.lroundf lround; - alias core.stdc.math.lroundl lround; + alias lround = core.stdc.math.lround; + alias lround = core.stdc.math.lroundf; + alias lround = core.stdc.math.lroundl; - alias core.stdc.math.llround llround; - alias core.stdc.math.llroundf llround; - alias core.stdc.math.llroundl llround; + alias llround = core.stdc.math.llround; + alias llround = core.stdc.math.llroundf; + alias llround = core.stdc.math.llroundl; - alias core.stdc.math.trunc trunc; - alias core.stdc.math.truncf trunc; - alias core.stdc.math.truncl trunc; + alias trunc = core.stdc.math.trunc; + alias trunc = core.stdc.math.truncf; + alias trunc = core.stdc.math.truncl; - alias core.stdc.math.fmod fmod; - alias core.stdc.math.fmodf fmod; - alias core.stdc.math.fmodl fmod; + alias fmod = core.stdc.math.fmod; + alias fmod = core.stdc.math.fmodf; + alias fmod = core.stdc.math.fmodl; - alias core.stdc.math.remainder remainder; - alias core.stdc.math.remainderf remainder; - alias core.stdc.math.remainderl remainder; + alias remainder = core.stdc.math.remainder; + alias remainder = core.stdc.math.remainderf; + alias remainder = core.stdc.math.remainderl; - alias core.stdc.math.remquo remquo; - alias core.stdc.math.remquof remquo; - alias core.stdc.math.remquol remquo; + alias remquo = core.stdc.math.remquo; + alias remquo = core.stdc.math.remquof; + alias remquo = core.stdc.math.remquol; - alias core.stdc.math.copysign copysign; - alias core.stdc.math.copysignf copysign; - alias core.stdc.math.copysignl copysign; + alias copysign = core.stdc.math.copysign; + alias copysign = core.stdc.math.copysignf; + alias copysign = core.stdc.math.copysignl; // alias core.stdc.math.nan nan; // alias core.stdc.math.nanf nan; // alias core.stdc.math.nanl nan; - alias core.stdc.math.nextafter nextafter; - alias core.stdc.math.nextafterf nextafter; - alias core.stdc.math.nextafterl nextafter; + alias nextafter = core.stdc.math.nextafter; + alias nextafter = core.stdc.math.nextafterf; + alias nextafter = core.stdc.math.nextafterl; - alias core.stdc.math.nexttoward nexttoward; - alias core.stdc.math.nexttowardf nexttoward; - alias core.stdc.math.nexttowardl nexttoward; + alias nexttoward = core.stdc.math.nexttoward; + alias nexttoward = core.stdc.math.nexttowardf; + alias nexttoward = core.stdc.math.nexttowardl; - alias core.stdc.math.fdim fdim; - alias core.stdc.math.fdimf fdim; - alias core.stdc.math.fdiml fdim; + alias fdim = core.stdc.math.fdim; + alias fdim = core.stdc.math.fdimf; + alias fdim = core.stdc.math.fdiml; - alias core.stdc.math.fmax fmax; - alias core.stdc.math.fmaxf fmax; - alias core.stdc.math.fmaxl fmax; + alias fmax = core.stdc.math.fmax; + alias fmax = core.stdc.math.fmaxf; + alias fmax = core.stdc.math.fmaxl; - alias core.stdc.math.fmin fmin; - alias core.stdc.math.fmin fmin; - alias core.stdc.math.fminl fmin; + alias fmin = core.stdc.math.fmin; + alias fmin = core.stdc.math.fmin; + alias fmin = core.stdc.math.fminl; - alias core.stdc.math.fma fma; - alias core.stdc.math.fmaf fma; - alias core.stdc.math.fmal fma; + alias fma = core.stdc.math.fma; + alias fma = core.stdc.math.fmaf; + alias fma = core.stdc.math.fmal; - alias core.stdc.complex.carg carg; - alias core.stdc.complex.cargf carg; - alias core.stdc.complex.cargl carg; + alias carg = core.stdc.complex.carg; + alias carg = core.stdc.complex.cargf; + alias carg = core.stdc.complex.cargl; - alias core.stdc.complex.cimag cimag; - alias core.stdc.complex.cimagf cimag; - alias core.stdc.complex.cimagl cimag; + alias cimag = core.stdc.complex.cimag; + alias cimag = core.stdc.complex.cimagf; + alias cimag = core.stdc.complex.cimagl; - alias core.stdc.complex.conj conj; - alias core.stdc.complex.conjf conj; - alias core.stdc.complex.conjl conj; + alias conj = core.stdc.complex.conj; + alias conj = core.stdc.complex.conjf; + alias conj = core.stdc.complex.conjl; - alias core.stdc.complex.cproj cproj; - alias core.stdc.complex.cprojf cproj; - alias core.stdc.complex.cprojl cproj; + alias cproj = core.stdc.complex.cproj; + alias cproj = core.stdc.complex.cprojf; + alias cproj = core.stdc.complex.cprojl; // alias core.stdc.complex.creal creal; // alias core.stdc.complex.crealf creal; @@ -341,317 +341,317 @@ version( FreeBSD ) } else { - alias core.stdc.math.acos acos; - alias core.stdc.math.acosf acos; - alias core.stdc.math.acosl acos; + alias acos = core.stdc.math.acos; + alias acos = core.stdc.math.acosf; + alias acos = core.stdc.math.acosl; - alias core.stdc.complex.cacos acos; - alias core.stdc.complex.cacosf acos; - alias core.stdc.complex.cacosl acos; + alias acos = core.stdc.complex.cacos; + alias acos = core.stdc.complex.cacosf; + alias acos = core.stdc.complex.cacosl; - alias core.stdc.math.asin asin; - alias core.stdc.math.asinf asin; - alias core.stdc.math.asinl asin; + alias asin = core.stdc.math.asin; + alias asin = core.stdc.math.asinf; + alias asin = core.stdc.math.asinl; - alias core.stdc.complex.casin asin; - alias core.stdc.complex.casinf asin; - alias core.stdc.complex.casinl asin; + alias asin = core.stdc.complex.casin; + alias asin = core.stdc.complex.casinf; + alias asin = core.stdc.complex.casinl; - alias core.stdc.math.atan atan; - alias core.stdc.math.atanf atan; - alias core.stdc.math.atanl atan; + alias atan = core.stdc.math.atan; + alias atan = core.stdc.math.atanf; + alias atan = core.stdc.math.atanl; - alias core.stdc.complex.catan atan; - alias core.stdc.complex.catanf atan; - alias core.stdc.complex.catanl atan; + alias atan = core.stdc.complex.catan; + alias atan = core.stdc.complex.catanf; + alias atan = core.stdc.complex.catanl; - alias core.stdc.math.atan2 atan2; - alias core.stdc.math.atan2f atan2; - alias core.stdc.math.atan2l atan2; + alias atan2 = core.stdc.math.atan2; + alias atan2 = core.stdc.math.atan2f; + alias atan2 = core.stdc.math.atan2l; - alias core.stdc.math.cos cos; - alias core.stdc.math.cosf cos; - alias core.stdc.math.cosl cos; + alias cos = core.stdc.math.cos; + alias cos = core.stdc.math.cosf; + alias cos = core.stdc.math.cosl; - alias core.stdc.complex.ccos cos; - alias core.stdc.complex.ccosf cos; - alias core.stdc.complex.ccosl cos; + alias cos = core.stdc.complex.ccos; + alias cos = core.stdc.complex.ccosf; + alias cos = core.stdc.complex.ccosl; - alias core.stdc.math.sin sin; - alias core.stdc.math.sinf sin; - alias core.stdc.math.sinl sin; + alias sin = core.stdc.math.sin; + alias sin = core.stdc.math.sinf; + alias sin = core.stdc.math.sinl; - alias core.stdc.complex.csin csin; - alias core.stdc.complex.csinf csin; - alias core.stdc.complex.csinl csin; + alias csin = core.stdc.complex.csin; + alias csin = core.stdc.complex.csinf; + alias csin = core.stdc.complex.csinl; - alias core.stdc.math.tan tan; - alias core.stdc.math.tanf tan; - alias core.stdc.math.tanl tan; + alias tan = core.stdc.math.tan; + alias tan = core.stdc.math.tanf; + alias tan = core.stdc.math.tanl; - alias core.stdc.complex.ctan tan; - alias core.stdc.complex.ctanf tan; - alias core.stdc.complex.ctanl tan; + alias tan = core.stdc.complex.ctan; + alias tan = core.stdc.complex.ctanf; + alias tan = core.stdc.complex.ctanl; - alias core.stdc.math.acosh acosh; - alias core.stdc.math.acoshf acosh; - alias core.stdc.math.acoshl acosh; + alias acosh = core.stdc.math.acosh; + alias acosh = core.stdc.math.acoshf; + alias acosh = core.stdc.math.acoshl; - alias core.stdc.complex.cacosh acosh; - alias core.stdc.complex.cacoshf acosh; - alias core.stdc.complex.cacoshl acosh; + alias acosh = core.stdc.complex.cacosh; + alias acosh = core.stdc.complex.cacoshf; + alias acosh = core.stdc.complex.cacoshl; - alias core.stdc.math.asinh asinh; - alias core.stdc.math.asinhf asinh; - alias core.stdc.math.asinhl asinh; + alias asinh = core.stdc.math.asinh; + alias asinh = core.stdc.math.asinhf; + alias asinh = core.stdc.math.asinhl; - alias core.stdc.complex.casinh asinh; - alias core.stdc.complex.casinhf asinh; - alias core.stdc.complex.casinhl asinh; + alias asinh = core.stdc.complex.casinh; + alias asinh = core.stdc.complex.casinhf; + alias asinh = core.stdc.complex.casinhl; - alias core.stdc.math.atanh atanh; - alias core.stdc.math.atanhf atanh; - alias core.stdc.math.atanhl atanh; + alias atanh = core.stdc.math.atanh; + alias atanh = core.stdc.math.atanhf; + alias atanh = core.stdc.math.atanhl; - alias core.stdc.complex.catanh atanh; - alias core.stdc.complex.catanhf atanh; - alias core.stdc.complex.catanhl atanh; + alias atanh = core.stdc.complex.catanh; + alias atanh = core.stdc.complex.catanhf; + alias atanh = core.stdc.complex.catanhl; - alias core.stdc.math.cosh cosh; - alias core.stdc.math.coshf cosh; - alias core.stdc.math.coshl cosh; + alias cosh = core.stdc.math.cosh; + alias cosh = core.stdc.math.coshf; + alias cosh = core.stdc.math.coshl; - alias core.stdc.complex.ccosh cosh; - alias core.stdc.complex.ccoshf cosh; - alias core.stdc.complex.ccoshl cosh; + alias cosh = core.stdc.complex.ccosh; + alias cosh = core.stdc.complex.ccoshf; + alias cosh = core.stdc.complex.ccoshl; - alias core.stdc.math.sinh sinh; - alias core.stdc.math.sinhf sinh; - alias core.stdc.math.sinhl sinh; + alias sinh = core.stdc.math.sinh; + alias sinh = core.stdc.math.sinhf; + alias sinh = core.stdc.math.sinhl; - alias core.stdc.complex.csinh sinh; - alias core.stdc.complex.csinhf sinh; - alias core.stdc.complex.csinhl sinh; + alias sinh = core.stdc.complex.csinh; + alias sinh = core.stdc.complex.csinhf; + alias sinh = core.stdc.complex.csinhl; - alias core.stdc.math.tanh tanh; - alias core.stdc.math.tanhf tanh; - alias core.stdc.math.tanhl tanh; + alias tanh = core.stdc.math.tanh; + alias tanh = core.stdc.math.tanhf; + alias tanh = core.stdc.math.tanhl; - alias core.stdc.complex.ctanh tanh; - alias core.stdc.complex.ctanhf tanh; - alias core.stdc.complex.ctanhl tanh; + alias tanh = core.stdc.complex.ctanh; + alias tanh = core.stdc.complex.ctanhf; + alias tanh = core.stdc.complex.ctanhl; - alias core.stdc.math.exp exp; - alias core.stdc.math.expf exp; - alias core.stdc.math.expl exp; + alias exp = core.stdc.math.exp; + alias exp = core.stdc.math.expf; + alias exp = core.stdc.math.expl; - alias core.stdc.complex.cexp exp; - alias core.stdc.complex.cexpf exp; - alias core.stdc.complex.cexpl exp; + alias exp = core.stdc.complex.cexp; + alias exp = core.stdc.complex.cexpf; + alias exp = core.stdc.complex.cexpl; - alias core.stdc.math.exp2 exp2; - alias core.stdc.math.exp2f exp2; - alias core.stdc.math.exp2l exp2; + alias exp2 = core.stdc.math.exp2; + alias exp2 = core.stdc.math.exp2f; + alias exp2 = core.stdc.math.exp2l; - alias core.stdc.math.expm1 expm1; - alias core.stdc.math.expm1f expm1; - alias core.stdc.math.expm1l expm1; + alias expm1 = core.stdc.math.expm1; + alias expm1 = core.stdc.math.expm1f; + alias expm1 = core.stdc.math.expm1l; - alias core.stdc.math.frexp frexp; - alias core.stdc.math.frexpf frexp; - alias core.stdc.math.frexpl frexp; + alias frexp = core.stdc.math.frexp; + alias frexp = core.stdc.math.frexpf; + alias frexp = core.stdc.math.frexpl; - alias core.stdc.math.ilogb ilogb; - alias core.stdc.math.ilogbf ilogb; - alias core.stdc.math.ilogbl ilogb; + alias ilogb = core.stdc.math.ilogb; + alias ilogb = core.stdc.math.ilogbf; + alias ilogb = core.stdc.math.ilogbl; - alias core.stdc.math.ldexp ldexp; - alias core.stdc.math.ldexpf ldexp; - alias core.stdc.math.ldexpl ldexp; + alias ldexp = core.stdc.math.ldexp; + alias ldexp = core.stdc.math.ldexpf; + alias ldexp = core.stdc.math.ldexpl; - alias core.stdc.math.log log; - alias core.stdc.math.logf log; - alias core.stdc.math.logl log; + alias log = core.stdc.math.log; + alias log = core.stdc.math.logf; + alias log = core.stdc.math.logl; - alias core.stdc.complex.clog log; - alias core.stdc.complex.clogf log; - alias core.stdc.complex.clogl log; + alias log = core.stdc.complex.clog; + alias log = core.stdc.complex.clogf; + alias log = core.stdc.complex.clogl; - alias core.stdc.math.log10 log10; - alias core.stdc.math.log10f log10; - alias core.stdc.math.log10l log10; + alias log10 = core.stdc.math.log10; + alias log10 = core.stdc.math.log10f; + alias log10 = core.stdc.math.log10l; - alias core.stdc.math.log1p log1p; - alias core.stdc.math.log1pf log1p; - alias core.stdc.math.log1pl log1p; + alias log1p = core.stdc.math.log1p; + alias log1p = core.stdc.math.log1pf; + alias log1p = core.stdc.math.log1pl; - alias core.stdc.math.log2 log2; - alias core.stdc.math.log2f log2; - alias core.stdc.math.log2l log2; + alias log2 = core.stdc.math.log2; + alias log2 = core.stdc.math.log2f; + alias log2 = core.stdc.math.log2l; - alias core.stdc.math.logb logb; - alias core.stdc.math.logbf logb; - alias core.stdc.math.logbl logb; + alias logb = core.stdc.math.logb; + alias logb = core.stdc.math.logbf; + alias logb = core.stdc.math.logbl; - alias core.stdc.math.modf modf; - alias core.stdc.math.modff modf; - alias core.stdc.math.modfl modf; + alias modf = core.stdc.math.modf; + alias modf = core.stdc.math.modff; + alias modf = core.stdc.math.modfl; - alias core.stdc.math.scalbn scalbn; - alias core.stdc.math.scalbnf scalbn; - alias core.stdc.math.scalbnl scalbn; + alias scalbn = core.stdc.math.scalbn; + alias scalbn = core.stdc.math.scalbnf; + alias scalbn = core.stdc.math.scalbnl; - alias core.stdc.math.scalbln scalbln; - alias core.stdc.math.scalblnf scalbln; - alias core.stdc.math.scalblnl scalbln; + alias scalbln = core.stdc.math.scalbln; + alias scalbln = core.stdc.math.scalblnf; + alias scalbln = core.stdc.math.scalblnl; - alias core.stdc.math.cbrt cbrt; - alias core.stdc.math.cbrtf cbrt; - alias core.stdc.math.cbrtl cbrt; + alias cbrt = core.stdc.math.cbrt; + alias cbrt = core.stdc.math.cbrtf; + alias cbrt = core.stdc.math.cbrtl; - alias core.stdc.math.fabs fabs; - alias core.stdc.math.fabsf fabs; - alias core.stdc.math.fabsl fabs; + alias fabs = core.stdc.math.fabs; + alias fabs = core.stdc.math.fabsf; + alias fabs = core.stdc.math.fabsl; - alias core.stdc.complex.cabs fabs; - alias core.stdc.complex.cabsf fabs; - alias core.stdc.complex.cabsl fabs; + alias fabs = core.stdc.complex.cabs; + alias fabs = core.stdc.complex.cabsf; + alias fabs = core.stdc.complex.cabsl; - alias core.stdc.math.hypot hypot; - alias core.stdc.math.hypotf hypot; - alias core.stdc.math.hypotl hypot; + alias hypot = core.stdc.math.hypot; + alias hypot = core.stdc.math.hypotf; + alias hypot = core.stdc.math.hypotl; - alias core.stdc.math.pow pow; - alias core.stdc.math.powf pow; - alias core.stdc.math.powl pow; + alias pow = core.stdc.math.pow; + alias pow = core.stdc.math.powf; + alias pow = core.stdc.math.powl; - alias core.stdc.complex.cpow pow; - alias core.stdc.complex.cpowf pow; - alias core.stdc.complex.cpowl pow; + alias pow = core.stdc.complex.cpow; + alias pow = core.stdc.complex.cpowf; + alias pow = core.stdc.complex.cpowl; - alias core.stdc.math.sqrt sqrt; - alias core.stdc.math.sqrtf sqrt; - alias core.stdc.math.sqrtl sqrt; + alias sqrt = core.stdc.math.sqrt; + alias sqrt = core.stdc.math.sqrtf; + alias sqrt = core.stdc.math.sqrtl; - alias core.stdc.complex.csqrt sqrt; - alias core.stdc.complex.csqrtf sqrt; - alias core.stdc.complex.csqrtl sqrt; + alias sqrt = core.stdc.complex.csqrt; + alias sqrt = core.stdc.complex.csqrtf; + alias sqrt = core.stdc.complex.csqrtl; - alias core.stdc.math.erf erf; - alias core.stdc.math.erff erf; - alias core.stdc.math.erfl erf; + alias erf = core.stdc.math.erf; + alias erf = core.stdc.math.erff; + alias erf = core.stdc.math.erfl; - alias core.stdc.math.erfc erfc; - alias core.stdc.math.erfcf erfc; - alias core.stdc.math.erfcl erfc; + alias erfc = core.stdc.math.erfc; + alias erfc = core.stdc.math.erfcf; + alias erfc = core.stdc.math.erfcl; - alias core.stdc.math.lgamma lgamma; - alias core.stdc.math.lgammaf lgamma; - alias core.stdc.math.lgammal lgamma; + alias lgamma = core.stdc.math.lgamma; + alias lgamma = core.stdc.math.lgammaf; + alias lgamma = core.stdc.math.lgammal; - alias core.stdc.math.tgamma tgamma; - alias core.stdc.math.tgammaf tgamma; - alias core.stdc.math.tgammal tgamma; + alias tgamma = core.stdc.math.tgamma; + alias tgamma = core.stdc.math.tgammaf; + alias tgamma = core.stdc.math.tgammal; - alias core.stdc.math.ceil ceil; - alias core.stdc.math.ceilf ceil; - alias core.stdc.math.ceill ceil; + alias ceil = core.stdc.math.ceil; + alias ceil = core.stdc.math.ceilf; + alias ceil = core.stdc.math.ceill; - alias core.stdc.math.floor floor; - alias core.stdc.math.floorf floor; - alias core.stdc.math.floorl floor; + alias floor = core.stdc.math.floor; + alias floor = core.stdc.math.floorf; + alias floor = core.stdc.math.floorl; - alias core.stdc.math.nearbyint nearbyint; - alias core.stdc.math.nearbyintf nearbyint; - alias core.stdc.math.nearbyintl nearbyint; + alias nearbyint = core.stdc.math.nearbyint; + alias nearbyint = core.stdc.math.nearbyintf; + alias nearbyint = core.stdc.math.nearbyintl; - alias core.stdc.math.rint rint; - alias core.stdc.math.rintf rint; - alias core.stdc.math.rintl rint; + alias rint = core.stdc.math.rint; + alias rint = core.stdc.math.rintf; + alias rint = core.stdc.math.rintl; - alias core.stdc.math.lrint lrint; - alias core.stdc.math.lrintf lrint; - alias core.stdc.math.lrintl lrint; + alias lrint = core.stdc.math.lrint; + alias lrint = core.stdc.math.lrintf; + alias lrint = core.stdc.math.lrintl; - alias core.stdc.math.llrint llrint; - alias core.stdc.math.llrintf llrint; - alias core.stdc.math.llrintl llrint; + alias llrint = core.stdc.math.llrint; + alias llrint = core.stdc.math.llrintf; + alias llrint = core.stdc.math.llrintl; - alias core.stdc.math.round round; - alias core.stdc.math.roundf round; - alias core.stdc.math.roundl round; + alias round = core.stdc.math.round; + alias round = core.stdc.math.roundf; + alias round = core.stdc.math.roundl; - alias core.stdc.math.lround lround; - alias core.stdc.math.lroundf lround; - alias core.stdc.math.lroundl lround; + alias lround = core.stdc.math.lround; + alias lround = core.stdc.math.lroundf; + alias lround = core.stdc.math.lroundl; - alias core.stdc.math.llround llround; - alias core.stdc.math.llroundf llround; - alias core.stdc.math.llroundl llround; + alias llround = core.stdc.math.llround; + alias llround = core.stdc.math.llroundf; + alias llround = core.stdc.math.llroundl; - alias core.stdc.math.trunc trunc; - alias core.stdc.math.truncf trunc; - alias core.stdc.math.truncl trunc; + alias trunc = core.stdc.math.trunc; + alias trunc = core.stdc.math.truncf; + alias trunc = core.stdc.math.truncl; - alias core.stdc.math.fmod fmod; - alias core.stdc.math.fmodf fmod; - alias core.stdc.math.fmodl fmod; + alias fmod = core.stdc.math.fmod; + alias fmod = core.stdc.math.fmodf; + alias fmod = core.stdc.math.fmodl; - alias core.stdc.math.remainder remainder; - alias core.stdc.math.remainderf remainder; - alias core.stdc.math.remainderl remainder; + alias remainder = core.stdc.math.remainder; + alias remainder = core.stdc.math.remainderf; + alias remainder = core.stdc.math.remainderl; - alias core.stdc.math.remquo remquo; - alias core.stdc.math.remquof remquo; - alias core.stdc.math.remquol remquo; + alias remquo = core.stdc.math.remquo; + alias remquo = core.stdc.math.remquof; + alias remquo = core.stdc.math.remquol; - alias core.stdc.math.copysign copysign; - alias core.stdc.math.copysignf copysign; - alias core.stdc.math.copysignl copysign; + alias copysign = core.stdc.math.copysign; + alias copysign = core.stdc.math.copysignf; + alias copysign = core.stdc.math.copysignl; - alias core.stdc.math.nan nan; - alias core.stdc.math.nanf nan; - alias core.stdc.math.nanl nan; + alias nan = core.stdc.math.nan; + alias nan = core.stdc.math.nanf; + alias nan = core.stdc.math.nanl; - alias core.stdc.math.nextafter nextafter; - alias core.stdc.math.nextafterf nextafter; - alias core.stdc.math.nextafterl nextafter; + alias nextafter = core.stdc.math.nextafter; + alias nextafter = core.stdc.math.nextafterf; + alias nextafter = core.stdc.math.nextafterl; - alias core.stdc.math.nexttoward nexttoward; - alias core.stdc.math.nexttowardf nexttoward; - alias core.stdc.math.nexttowardl nexttoward; + alias nexttoward = core.stdc.math.nexttoward; + alias nexttoward = core.stdc.math.nexttowardf; + alias nexttoward = core.stdc.math.nexttowardl; - alias core.stdc.math.fdim fdim; - alias core.stdc.math.fdimf fdim; - alias core.stdc.math.fdiml fdim; + alias fdim = core.stdc.math.fdim; + alias fdim = core.stdc.math.fdimf; + alias fdim = core.stdc.math.fdiml; - alias core.stdc.math.fmax fmax; - alias core.stdc.math.fmaxf fmax; - alias core.stdc.math.fmaxl fmax; + alias fmax = core.stdc.math.fmax; + alias fmax = core.stdc.math.fmaxf; + alias fmax = core.stdc.math.fmaxl; - alias core.stdc.math.fmin fmin; - alias core.stdc.math.fmin fmin; - alias core.stdc.math.fminl fmin; + alias fmin = core.stdc.math.fmin; + alias fmin = core.stdc.math.fmin; + alias fmin = core.stdc.math.fminl; - alias core.stdc.math.fma fma; - alias core.stdc.math.fmaf fma; - alias core.stdc.math.fmal fma; + alias fma = core.stdc.math.fma; + alias fma = core.stdc.math.fmaf; + alias fma = core.stdc.math.fmal; - alias core.stdc.complex.carg carg; - alias core.stdc.complex.cargf carg; - alias core.stdc.complex.cargl carg; + alias carg = core.stdc.complex.carg; + alias carg = core.stdc.complex.cargf; + alias carg = core.stdc.complex.cargl; - alias core.stdc.complex.cimag cimag; - alias core.stdc.complex.cimagf cimag; - alias core.stdc.complex.cimagl cimag; + alias cimag = core.stdc.complex.cimag; + alias cimag = core.stdc.complex.cimagf; + alias cimag = core.stdc.complex.cimagl; - alias core.stdc.complex.conj conj; - alias core.stdc.complex.conjf conj; - alias core.stdc.complex.conjl conj; + alias conj = core.stdc.complex.conj; + alias conj = core.stdc.complex.conjf; + alias conj = core.stdc.complex.conjl; - alias core.stdc.complex.cproj cproj; - alias core.stdc.complex.cprojf cproj; - alias core.stdc.complex.cprojl cproj; + alias cproj = core.stdc.complex.cproj; + alias cproj = core.stdc.complex.cprojf; + alias cproj = core.stdc.complex.cprojl; // alias core.stdc.complex.creal creal; // alias core.stdc.complex.crealf creal; diff --git a/src/core/stdc/time.d b/src/core/stdc/time.d index 0c47c64533..d427bae46e 100644 --- a/src/core/stdc/time.d +++ b/src/core/stdc/time.d @@ -60,8 +60,8 @@ version ( Posix ) } else { - alias c_long time_t; - alias c_long clock_t; + alias time_t = c_long; + alias clock_t = c_long; } version( Windows ) diff --git a/src/core/stdc/wchar_.d b/src/core/stdc/wchar_.d index bb39b1db13..8bc2decce3 100644 --- a/src/core/stdc/wchar_.d +++ b/src/core/stdc/wchar_.d @@ -24,8 +24,8 @@ extern (C): nothrow: @nogc: -alias int mbstate_t; -alias wchar_t wint_t; +alias mbstate_t = int; +alias wint_t = wchar_t; enum wchar_t WEOF = 0xFFFF; diff --git a/src/core/stdc/wctype.d b/src/core/stdc/wctype.d index d431b74ebb..cfe662648c 100644 --- a/src/core/stdc/wctype.d +++ b/src/core/stdc/wctype.d @@ -19,8 +19,8 @@ extern (C): nothrow: @nogc: -alias wchar_t wctrans_t; -alias wchar_t wctype_t; +alias wctrans_t = wchar_t; +alias wctype_t = wchar_t; pure int iswalnum(wint_t wc); pure int iswalpha(wint_t wc); diff --git a/src/core/sys/freebsd/dlfcn.d b/src/core/sys/freebsd/dlfcn.d index bcb41a44f7..89d429c4eb 100644 --- a/src/core/sys/freebsd/dlfcn.d +++ b/src/core/sys/freebsd/dlfcn.d @@ -68,7 +68,7 @@ static if (__BSD_VISIBLE) int __dlfunc_dummy; }; - alias void function(__dlfunc_arg) dlfunc_t; + alias dlfunc_t = void function(__dlfunc_arg); /* * Structures, returned by the RTLD_DI_SERINFO dlinfo() request. @@ -87,7 +87,7 @@ static if (__BSD_VISIBLE) private template __externC(RT, P...) { - alias extern(C) RT function(P) nothrow @nogc __externC; + alias __externC = extern(C) RT function(P) nothrow @nogc; } /* XSI functions first. */ diff --git a/src/core/sys/freebsd/sys/elf32.d b/src/core/sys/freebsd/sys/elf32.d index 4a55a0c001..6ed8c00152 100644 --- a/src/core/sys/freebsd/sys/elf32.d +++ b/src/core/sys/freebsd/sys/elf32.d @@ -13,15 +13,15 @@ nothrow: import core.stdc.stdint; public import core.sys.freebsd.sys.elf_common; -alias uint16_t Elf32_Half; -alias uint32_t Elf32_Word; -alias int32_t Elf32_Sword; -alias uint64_t Elf32_Lword; -alias uint32_t Elf32_Addr; -alias uint32_t Elf32_Off; -alias Elf32_Word Elf32_Hashelt; -alias Elf32_Word Elf32_Size; -alias Elf32_Sword Elf32_Ssize; +alias Elf32_Half = uint16_t; +alias Elf32_Word = uint32_t; +alias Elf32_Sword = int32_t; +alias Elf32_Lword = uint64_t; +alias Elf32_Addr = uint32_t; +alias Elf32_Off = uint32_t; +alias Elf32_Hashelt = Elf32_Word; +alias Elf32_Size = Elf32_Word; +alias Elf32_Ssize = Elf32_Sword; struct Elf32_Ehdr { @@ -97,7 +97,7 @@ extern (D) auto ELF32_R_INFO(S, T)(S sym, T type) { return (sym << 8) + (type & 0xff); } } -alias Elf_Note Elf32_Nhdr; +alias Elf32_Nhdr = Elf_Note; struct Elf32_Move { @@ -178,7 +178,7 @@ struct Elf32_Vernaux Elf32_Word vna_next; } -alias Elf32_Half Elf32_Versym; +alias Elf32_Versym = Elf32_Half; struct Elf32_Syminfo { diff --git a/src/core/sys/freebsd/sys/elf64.d b/src/core/sys/freebsd/sys/elf64.d index d3c189ebd6..30cc96ff6f 100644 --- a/src/core/sys/freebsd/sys/elf64.d +++ b/src/core/sys/freebsd/sys/elf64.d @@ -13,17 +13,17 @@ nothrow: import core.stdc.stdint; public import core.sys.freebsd.sys.elf_common; -alias uint16_t Elf64_Half; -alias uint32_t Elf64_Word; -alias int32_t Elf64_Sword; -alias uint64_t Elf64_Lword; -alias uint64_t Elf64_Xword; -alias int64_t Elf64_Sxword; -alias uint64_t Elf64_Addr; -alias uint64_t Elf64_Off; -alias Elf64_Word Elf64_Hashelt; -alias Elf64_Xword Elf64_Size; -alias Elf64_Sxword Elf64_Ssize; +alias Elf64_Half = uint16_t; +alias Elf64_Word = uint32_t; +alias Elf64_Sword = int32_t; +alias Elf64_Lword = uint64_t; +alias Elf64_Xword = uint64_t; +alias Elf64_Sxword = int64_t; +alias Elf64_Addr = uint64_t; +alias Elf64_Off = uint64_t; +alias Elf64_Hashelt = Elf64_Word; +alias Elf64_Size = Elf64_Xword; +alias Elf64_Ssize = Elf64_Sxword; struct Elf64_Ehdr { @@ -103,7 +103,7 @@ extern (D) auto ELF64_R_TYPE_INFO(D, T)(D d, T t) { return cast(Elf64_Xword) d << 8 + cast(Elf64_Xword) t; } } -alias Elf_Note Elf64_Nhdr; +alias Elf64_Nhdr = Elf_Note; struct Elf64_Move { @@ -184,7 +184,7 @@ struct Elf64_Vernaux Elf64_Word vna_next; } -alias Elf64_Half Elf64_Versym; +alias Elf64_Versym = Elf64_Half; struct Elf64_Syminfo { diff --git a/src/core/sys/freebsd/sys/elf_common.d b/src/core/sys/freebsd/sys/elf_common.d index fb8fcba1a4..fc1987c72d 100644 --- a/src/core/sys/freebsd/sys/elf_common.d +++ b/src/core/sys/freebsd/sys/elf_common.d @@ -435,7 +435,7 @@ enum STV_ELIMINATE = 6; enum STN_UNDEF = 0; enum VER_DEF_CURRENT = 1; -alias VER_NDX VER_DEF_IDX; +alias VER_DEF_IDX = VER_NDX; enum VER_FLG_BASE = 0x1; enum VER_FLG_WEAK = 0x2; @@ -443,7 +443,7 @@ enum VER_FLG_WEAK = 0x2; enum VER_NEED_CURRENT = 1; enum VER_NEED_WEAK = 32768; enum VER_NEED_HIDDEN = VER_NDX_HIDDEN; -alias VER_NDX VER_NEED_IDX; +alias VER_NEED_IDX = VER_NDX; enum VER_NDX_LOCAL = 0; enum VER_NDX_GLOBAL = 1; diff --git a/src/core/sys/freebsd/sys/link_elf.d b/src/core/sys/freebsd/sys/link_elf.d index 840b5ac6eb..104fb4a8f6 100644 --- a/src/core/sys/freebsd/sys/link_elf.d +++ b/src/core/sys/freebsd/sys/link_elf.d @@ -42,7 +42,7 @@ struct link_map void* l_ld; link_map* l_next, l_prev; } -alias link_map Link_map; +alias Link_map = link_map; enum { @@ -71,7 +71,7 @@ struct dl_phdr_info }; -private alias extern(C) int function(dl_phdr_info*, size_t, void*) __dl_iterate_hdr_callback; +private alias __dl_iterate_hdr_callback = extern(C) int function(dl_phdr_info*, size_t, void*); extern int dl_iterate_phdr(__dl_iterate_hdr_callback, void*); extern int _rtld_addr_phdr(const void*, dl_phdr_info*); extern int _rtld_get_stack_prot(); diff --git a/src/core/sys/linux/dlfcn.d b/src/core/sys/linux/dlfcn.d index 4cb45293a7..65efaee39f 100644 --- a/src/core/sys/linux/dlfcn.d +++ b/src/core/sys/linux/dlfcn.d @@ -214,7 +214,7 @@ static if (__USE_GNU) { enum RTLD_NEXT = cast(void *)-1L; enum RTLD_DEFAULT = cast(void *)0; - alias c_long Lmid_t; + alias Lmid_t = c_long; enum LM_ID_BASE = 0; enum LM_ID_NEWLM = -1; } diff --git a/src/core/sys/linux/elf.d b/src/core/sys/linux/elf.d index 2dd7068d19..97e3075cb4 100644 --- a/src/core/sys/linux/elf.d +++ b/src/core/sys/linux/elf.d @@ -12,30 +12,30 @@ nothrow: import core.stdc.stdint; -alias uint16_t Elf32_Half; -alias uint16_t Elf64_Half; +alias Elf32_Half = uint16_t; +alias Elf64_Half = uint16_t; -alias uint32_t Elf32_Word; -alias int32_t Elf32_Sword; -alias uint32_t Elf64_Word; -alias int32_t Elf64_Sword; +alias Elf32_Word = uint32_t; +alias Elf32_Sword = int32_t; +alias Elf64_Word = uint32_t; +alias Elf64_Sword = int32_t; -alias uint64_t Elf32_Xword; -alias int64_t Elf32_Sxword; -alias uint64_t Elf64_Xword; -alias int64_t Elf64_Sxword; +alias Elf32_Xword = uint64_t; +alias Elf32_Sxword = int64_t; +alias Elf64_Xword = uint64_t; +alias Elf64_Sxword = int64_t; -alias uint32_t Elf32_Addr; -alias uint64_t Elf64_Addr; +alias Elf32_Addr = uint32_t; +alias Elf64_Addr = uint64_t; -alias uint32_t Elf32_Off; -alias uint64_t Elf64_Off; +alias Elf32_Off = uint32_t; +alias Elf64_Off = uint64_t; -alias uint16_t Elf32_Section; -alias uint16_t Elf64_Section; +alias Elf32_Section = uint16_t; +alias Elf64_Section = uint16_t; -alias Elf32_Half Elf32_Versym; -alias Elf64_Half Elf64_Versym; +alias Elf32_Versym = Elf32_Half; +alias Elf64_Versym = Elf64_Half; enum EI_NIDENT = 16; @@ -366,9 +366,9 @@ extern (D) auto ELF32_ST_BIND(T)(T val) { return cast(ubyte)val >> 4; } auto ELF32_ST_TYPE(T)(T val) { return val & 0xf; } auto ELF32_ST_INFO(B, T)(B bind, T type) { return (bind << 4) + (type & 0xf); } - alias ELF32_ST_BIND ELF64_ST_BIND; - alias ELF32_ST_TYPE ELF64_ST_TYPE; - alias ELF32_ST_INFO ELF64_ST_INFO; + alias ELF64_ST_BIND = ELF32_ST_BIND; + alias ELF64_ST_TYPE = ELF32_ST_TYPE; + alias ELF64_ST_INFO = ELF32_ST_INFO; } enum STB_LOCAL = 0; @@ -400,7 +400,7 @@ enum STN_UNDEF = 0; extern (D) { auto ELF32_ST_VISIBILITY(O)(O o) { return o & 0x03; } - alias ELF32_ST_VISIBILITY ELF64_ST_VISIBILITY; + alias ELF64_ST_VISIBILITY = ELF32_ST_VISIBILITY; } enum STV_DEFAULT = 0; enum STV_INTERNAL = 1; @@ -882,9 +882,9 @@ extern (D) auto ELF32_M_INFO(S, SZ)(S sym, SZ size) { return (sym << 8) + cast(ubye)size; } } -alias ELF32_M_SYM ELF64_M_SYM; -alias ELF32_M_SIZE ELF64_M_SIZE; -alias ELF32_M_INFO ELF64_M_INFO; +alias ELF64_M_SYM = ELF32_M_SYM; +alias ELF64_M_SIZE = ELF32_M_SIZE; +alias ELF64_M_INFO = ELF32_M_INFO; enum EF_CPU32 = 0x00810000; enum R_68K_NONE = 0; @@ -1396,7 +1396,7 @@ enum LL_EXPORTS = (1 << 3); enum LL_DELAY_LOAD = (1 << 4); enum LL_DELTA = (1 << 5); -alias Elf32_Addr Elf32_Conflict; +alias Elf32_Conflict = Elf32_Addr; enum EF_PARISC_TRAPNIL = 0x00010000; enum EF_PARISC_EXT = 0x00020000; diff --git a/src/core/sys/linux/link.d b/src/core/sys/linux/link.d index 2a384070ca..e6fe5ac29f 100644 --- a/src/core/sys/linux/link.d +++ b/src/core/sys/linux/link.d @@ -18,50 +18,50 @@ import core.sys.linux.elf; version (X86) { // http://sourceware.org/git/?p=glibc.git;a=blob;f=bits/elfclass.h - alias __WORDSIZE __ELF_NATIVE_CLASS; - alias uint32_t Elf_Symndx; + alias __ELF_NATIVE_CLASS = __WORDSIZE; + alias Elf_Symndx = uint32_t; } else version (X86_64) { // http://sourceware.org/git/?p=glibc.git;a=blob;f=bits/elfclass.h - alias __WORDSIZE __ELF_NATIVE_CLASS; - alias uint32_t Elf_Symndx; + alias __ELF_NATIVE_CLASS = __WORDSIZE; + alias Elf_Symndx = uint32_t; } else version (MIPS32) { // http://sourceware.org/git/?p=glibc.git;a=blob;f=bits/elfclass.h - alias __WORDSIZE __ELF_NATIVE_CLASS; - alias uint32_t Elf_Symndx; + alias __ELF_NATIVE_CLASS = __WORDSIZE; + alias Elf_Symndx = uint32_t; } else version (MIPS64) { // http://sourceware.org/git/?p=glibc.git;a=blob;f=bits/elfclass.h - alias __WORDSIZE __ELF_NATIVE_CLASS; - alias uint32_t Elf_Symndx; + alias __ELF_NATIVE_CLASS = __WORDSIZE; + alias Elf_Symndx = uint32_t; } else version (PPC) { // http://sourceware.org/git/?p=glibc.git;a=blob;f=bits/elfclass.h - alias __WORDSIZE __ELF_NATIVE_CLASS; - alias uint32_t Elf_Symndx; + alias __ELF_NATIVE_CLASS = __WORDSIZE; + alias Elf_Symndx = uint32_t; } else version (PPC64) { // http://sourceware.org/git/?p=glibc.git;a=blob;f=bits/elfclass.h - alias __WORDSIZE __ELF_NATIVE_CLASS; - alias uint32_t Elf_Symndx; + alias __ELF_NATIVE_CLASS = __WORDSIZE; + alias Elf_Symndx = uint32_t; } else version (ARM) { // http://sourceware.org/git/?p=glibc.git;a=blob;f=bits/elfclass.h - alias __WORDSIZE __ELF_NATIVE_CLASS; - alias uint32_t Elf_Symndx; + alias __ELF_NATIVE_CLASS = __WORDSIZE; + alias Elf_Symndx = uint32_t; } else version (AArch64) { // http://sourceware.org/git/?p=glibc.git;a=blob;f=bits/elfclass.h - alias __WORDSIZE __ELF_NATIVE_CLASS; - alias uint32_t Elf_Symndx; + alias __ELF_NATIVE_CLASS = __WORDSIZE; + alias Elf_Symndx = uint32_t; } else static assert(0, "unimplemented"); @@ -149,7 +149,7 @@ struct dl_phdr_info void *dlpi_tls_data; } -private alias extern(C) int function(dl_phdr_info*, size_t, void *) __Callback; +private alias __Callback = extern(C) int function(dl_phdr_info*, size_t, void *); extern int dl_iterate_phdr(__Callback __callback, void*__data); diff --git a/src/core/sys/osx/mach/kern_return.d b/src/core/sys/osx/mach/kern_return.d index 54fe4d7dfe..cc6fe581eb 100644 --- a/src/core/sys/osx/mach/kern_return.d +++ b/src/core/sys/osx/mach/kern_return.d @@ -16,7 +16,7 @@ module core.sys.osx.mach.kern_return; version (OSX): extern (C): -alias int kern_return_t; +alias kern_return_t = int; enum : kern_return_t { diff --git a/src/core/sys/osx/mach/port.d b/src/core/sys/osx/mach/port.d index 40538e6d36..f28382399e 100644 --- a/src/core/sys/osx/mach/port.d +++ b/src/core/sys/osx/mach/port.d @@ -22,6 +22,6 @@ version( X86_64 ) version = i386; version( i386 ) { - alias uint natural_t; - alias natural_t mach_port_t; + alias natural_t = uint; + alias mach_port_t = natural_t; } diff --git a/src/core/sys/osx/mach/semaphore.d b/src/core/sys/osx/mach/semaphore.d index d133c71639..900ac17deb 100644 --- a/src/core/sys/osx/mach/semaphore.d +++ b/src/core/sys/osx/mach/semaphore.d @@ -19,12 +19,12 @@ extern (C): public import core.sys.osx.mach.kern_return; public import core.sys.osx.mach.port; -alias mach_port_t task_t; -alias mach_port_t thread_t; -alias mach_port_t semaphore_t; -alias int sync_policy_t; +alias task_t = mach_port_t; +alias thread_t = mach_port_t; +alias semaphore_t = mach_port_t; +alias sync_policy_t = int; -alias int clock_res_t; +alias clock_res_t = int; struct mach_timespec_t { uint tv_sec; diff --git a/src/core/sys/osx/mach/thread_act.d b/src/core/sys/osx/mach/thread_act.d index 51d04cf07d..274b288f3a 100644 --- a/src/core/sys/osx/mach/thread_act.d +++ b/src/core/sys/osx/mach/thread_act.d @@ -26,10 +26,10 @@ version( X86_64 ) version = i386; version( i386 ) { - alias mach_port_t thread_act_t; - alias void thread_state_t; - alias int thread_state_flavor_t; - alias natural_t mach_msg_type_number_t; + alias thread_act_t = mach_port_t; + alias thread_state_t = void; + alias thread_state_flavor_t = int; + alias mach_msg_type_number_t = natural_t; enum { @@ -117,8 +117,8 @@ version( i386 ) x86_THREAD_STATE_COUNT = cast(mach_msg_type_number_t)( x86_thread_state_t.sizeof / int.sizeof ), } - alias x86_THREAD_STATE MACHINE_THREAD_STATE; - alias x86_THREAD_STATE_COUNT MACHINE_THREAD_STATE_COUNT; + alias MACHINE_THREAD_STATE = x86_THREAD_STATE; + alias MACHINE_THREAD_STATE_COUNT = x86_THREAD_STATE_COUNT; mach_port_t mach_thread_self(); kern_return_t thread_suspend(thread_act_t); diff --git a/src/core/sys/posix/arpa/inet.d b/src/core/sys/posix/arpa/inet.d index dbef235492..349e8c1f99 100644 --- a/src/core/sys/posix/arpa/inet.d +++ b/src/core/sys/posix/arpa/inet.d @@ -51,8 +51,8 @@ int inet_pton(int, in char*, void*); version( linux ) { - alias uint16_t in_port_t; - alias uint32_t in_addr_t; + alias in_port_t = uint16_t; + alias in_addr_t = uint32_t; struct in_addr { @@ -76,8 +76,8 @@ version( linux ) } else version( OSX ) { - alias uint16_t in_port_t; - alias uint32_t in_addr_t; + alias in_port_t = uint16_t; + alias in_addr_t = uint32_t; struct in_addr { @@ -101,8 +101,8 @@ else version( OSX ) } else version( FreeBSD ) { - alias uint16_t in_port_t; - alias uint32_t in_addr_t; + alias in_port_t = uint16_t; + alias in_addr_t = uint32_t; struct in_addr { @@ -126,7 +126,7 @@ else version( FreeBSD ) } else version( Android ) { - alias uint32_t in_addr_t; + alias in_addr_t = uint32_t; struct in_addr { diff --git a/src/core/sys/posix/dirent.d b/src/core/sys/posix/dirent.d index aecf26a9b2..8a2346559b 100644 --- a/src/core/sys/posix/dirent.d +++ b/src/core/sys/posix/dirent.d @@ -74,7 +74,7 @@ version( linux ) static if( __USE_FILE_OFFSET64 ) { dirent* readdir64(DIR*); - alias readdir64 readdir; + alias readdir = readdir64; } else { @@ -138,7 +138,7 @@ else version( FreeBSD ) char[256] d_name; } - alias void* DIR; + alias DIR = void*; dirent* readdir(DIR*); } @@ -163,7 +163,7 @@ else version (Solaris) static if (__USE_LARGEFILE64) { dirent* readdir64(DIR*); - alias readdir64 readdir; + alias readdir = readdir64; } else { @@ -229,7 +229,7 @@ version( linux ) static if( __USE_LARGEFILE64 ) { int readdir64_r(DIR*, dirent*, dirent**); - alias readdir64_r readdir_r; + alias readdir_r = readdir64_r; } else { @@ -249,7 +249,7 @@ else version (Solaris) static if (__USE_LARGEFILE64) { int readdir64_r(DIR*, dirent*, dirent**); - alias readdir64_r readdir_r; + alias readdir_r = readdir64_r; } else { diff --git a/src/core/sys/posix/fcntl.d b/src/core/sys/posix/fcntl.d index bf93f2df81..0c159dc45a 100644 --- a/src/core/sys/posix/fcntl.d +++ b/src/core/sys/posix/fcntl.d @@ -236,10 +236,10 @@ version( linux ) static if( __USE_FILE_OFFSET64 ) { int creat64(in char*, mode_t); - alias creat64 creat; + alias creat = creat64; int open64(in char*, int, ...); - alias open64 open; + alias open = open64; } else { @@ -445,8 +445,8 @@ else version (Solaris) static if (__USE_LARGEFILE64) { - alias creat creat64; - alias open open64; + alias creat64 = creat; + alias open64 = open; } } else @@ -454,10 +454,10 @@ else version (Solaris) static if (__USE_LARGEFILE64) { int creat64(in char*, mode_t); - alias creat64 creat; + alias creat = creat64; int open64(in char*, int, ...); - alias open64 open; + alias open = open64; } else { diff --git a/src/core/sys/posix/poll.d b/src/core/sys/posix/poll.d index 30c817f347..4acfd0fd2a 100644 --- a/src/core/sys/posix/poll.d +++ b/src/core/sys/posix/poll.d @@ -57,7 +57,7 @@ version( linux ) short revents; } - alias c_ulong nfds_t; + alias nfds_t = c_ulong; enum { @@ -84,7 +84,7 @@ else version( OSX ) short revents; }; - alias uint nfds_t; + alias nfds_t = uint; enum { @@ -111,7 +111,7 @@ else version( OSX ) } else version( FreeBSD ) { - alias uint nfds_t; + alias nfds_t = uint; struct pollfd { @@ -152,7 +152,7 @@ else version( Android ) short revents; } - alias uint nfds_t; + alias nfds_t = uint; enum { diff --git a/src/core/sys/posix/pthread.d b/src/core/sys/posix/pthread.d index ca21f160fe..b8d7e70fdf 100644 --- a/src/core/sys/posix/pthread.d +++ b/src/core/sys/posix/pthread.d @@ -275,7 +275,7 @@ version( Posix ) version( linux ) { - alias void function(void*) _pthread_cleanup_routine; + alias _pthread_cleanup_routine = void function(void*); struct _pthread_cleanup_buffer { @@ -305,7 +305,7 @@ version( linux ) } else version( OSX ) { - alias void function(void*) _pthread_cleanup_routine; + alias _pthread_cleanup_routine = void function(void*); struct _pthread_cleanup_buffer { @@ -340,7 +340,7 @@ else version( OSX ) } else version( FreeBSD ) { - alias void function(void*) _pthread_cleanup_routine; + alias _pthread_cleanup_routine = void function(void*); struct _pthread_cleanup_info { @@ -367,7 +367,7 @@ else version( FreeBSD ) } else version (Solaris) { - alias void function(void*) _pthread_cleanup_routine; + alias _pthread_cleanup_routine = void function(void*); caddr_t _getfp(); @@ -396,7 +396,7 @@ else version (Solaris) } else version( Android ) { - alias void function(void*) __pthread_cleanup_func_t; + alias __pthread_cleanup_func_t = void function(void*); struct __pthread_cleanup_t { diff --git a/src/core/sys/posix/semaphore.d b/src/core/sys/posix/semaphore.d index 2291626a82..0f0019d426 100644 --- a/src/core/sys/posix/semaphore.d +++ b/src/core/sys/posix/semaphore.d @@ -42,7 +42,7 @@ int sem_wait(sem_t*); version( linux ) { - private alias int __atomic_lock_t; + private alias __atomic_lock_t = int; private struct _pthread_fastlock { @@ -61,7 +61,7 @@ version( linux ) } else version( OSX ) { - alias int sem_t; + alias sem_t = int; enum SEM_FAILED = cast(sem_t*) null; } diff --git a/src/core/sys/posix/setjmp.d b/src/core/sys/posix/setjmp.d index 645433dd1c..cd5e3f2939 100644 --- a/src/core/sys/posix/setjmp.d +++ b/src/core/sys/posix/setjmp.d @@ -44,7 +44,7 @@ version( linux ) //enum JB_PC = 7; //enum JB_SIZE = 64; - alias long[8] __jmp_buf; + alias __jmp_buf = long[8]; } else version( X86 ) { @@ -56,23 +56,23 @@ version( linux ) //enum JB_PC = 5; //enum JB_SIZE = 24; - alias int[6] __jmp_buf; + alias __jmp_buf = int[6]; } else version ( SPARC ) { - alias int[3] __jmp_buf; + alias __jmp_buf = int[3]; } else version (ARM) { - alias int[64] __jmp_buf; + alias __jmp_buf = int[64]; } else version (PPC) { - alias int[64 + (12*4)] __jmp_buf; + alias __jmp_buf = int[64 + (12*4)]; } else version (PPC64) { - alias long[64] __jmp_buf; + alias __jmp_buf = long[64]; } else version (MIPS) { @@ -127,9 +127,9 @@ version( linux ) sigset_t __saved_mask; } - alias __jmp_buf_tag[1] jmp_buf; + alias jmp_buf = __jmp_buf_tag[1]; - alias _setjmp setjmp; // see XOpen block + alias setjmp = _setjmp; // see XOpen block void longjmp(ref jmp_buf, int); } else version( FreeBSD ) @@ -152,7 +152,7 @@ else version( FreeBSD ) } else static assert(0); - alias _jmp_buf[1] jmp_buf; + alias jmp_buf = _jmp_buf[1]; int setjmp(ref jmp_buf); void longjmp(ref jmp_buf, int); @@ -169,7 +169,7 @@ else version( Android ) static assert(false, "Architecture not supported."); } - alias c_long[_JBLEN] jmp_buf; + alias jmp_buf = c_long[_JBLEN]; int setjmp(ref jmp_buf); void longjmp(ref jmp_buf, int); @@ -187,10 +187,10 @@ void siglongjmp(sigjmp_buf, int); version( linux ) { - alias jmp_buf sigjmp_buf; + alias sigjmp_buf = jmp_buf; int __sigsetjmp(sigjmp_buf, int); - alias __sigsetjmp sigsetjmp; + alias sigsetjmp = __sigsetjmp; void siglongjmp(sigjmp_buf, int); } else version( FreeBSD ) @@ -216,14 +216,14 @@ else version( FreeBSD ) } else static assert(0); - alias _sigjmp_buf[1] sigjmp_buf; + alias sigjmp_buf = _sigjmp_buf[1]; int sigsetjmp(ref sigjmp_buf); void siglongjmp(ref sigjmp_buf, int); } else version( Android ) { - alias c_long[_JBLEN + 1] sigjmp_buf; + alias sigjmp_buf = c_long[_JBLEN + 1]; int sigsetjmp(ref sigjmp_buf, int); void siglongjmp(ref sigjmp_buf, int); diff --git a/src/core/sys/posix/signal.d b/src/core/sys/posix/signal.d index 1893008215..575a64a109 100644 --- a/src/core/sys/posix/signal.d +++ b/src/core/sys/posix/signal.d @@ -85,14 +85,14 @@ int raise(int sig); (defined in core.stdc.signal) version( Posix ) { - private alias void function(int) sigfn_t; - private alias void function(int, siginfo_t*, void*) sigactfn_t; + private alias sigfn_t = void function(int); + private alias sigactfn_t = void function(int, siginfo_t*, void*); // nothrow versions nothrow @nogc { - private alias void function(int) sigfn_t2; - private alias void function(int, siginfo_t*, void*) sigactfn_t2; + private alias sigfn_t2 = void function(int); + private alias sigactfn_t2 = void function(int, siginfo_t*, void*); } enum @@ -114,8 +114,8 @@ version( Posix ) private int _sigrtmin() { return cast(int) sysconf(_SC_SIGRT_MIN); } private int _sigrtmax() { return cast(int) sysconf(_SC_SIGRT_MAX); } - alias _sigrtmin SIGRTMIN; - alias _sigrtmax SIGRTMAX; + alias SIGRTMIN = _sigrtmin; + alias SIGRTMAX = _sigrtmax; } else { @@ -125,8 +125,8 @@ version( Posix ) int __libc_current_sigrtmax(); } - alias __libc_current_sigrtmin SIGRTMIN; - alias __libc_current_sigrtmax SIGRTMAX; + alias SIGRTMIN = __libc_current_sigrtmin; + alias SIGRTMAX = __libc_current_sigrtmax; } } @@ -701,7 +701,7 @@ else version( OSX ) { enum SIG_HOLD = cast(sigfn_t2) 5; - alias uint sigset_t; + alias sigset_t = uint; // pid_t (defined in core.sys.types) //SIGABRT (defined in core.stdc.signal) @@ -929,7 +929,7 @@ else version( Android ) version (X86) { - alias c_ulong sigset_t; + alias sigset_t = c_ulong; enum int LONG_BIT = 32; } else @@ -1852,7 +1852,7 @@ else version (Solaris) c_long tv_nsec; } - alias timespec timestruc_t; + alias timestruc_t = timespec; } else version( Android ) { diff --git a/src/core/sys/posix/stdio.d b/src/core/sys/posix/stdio.d index 357d8e8ac2..47a165efdf 100644 --- a/src/core/sys/posix/stdio.d +++ b/src/core/sys/posix/stdio.d @@ -106,21 +106,21 @@ version( linux ) static if( __USE_FILE_OFFSET64 ) { int fgetpos64(FILE*, fpos_t *); - alias fgetpos64 fgetpos; + alias fgetpos = fgetpos64; FILE* fopen64(in char*, in char*); - alias fopen64 fopen; + alias fopen = fopen64; FILE* freopen64(in char*, in char*, FILE*); - alias freopen64 freopen; + alias freopen = freopen64; int fseek(FILE*, c_long, int); int fsetpos64(FILE*, in fpos_t*); - alias fsetpos64 fsetpos; + alias fsetpos = fsetpos64; FILE* tmpfile64(); - alias tmpfile64 tmpfile; + alias tmpfile = tmpfile64; } else { @@ -164,7 +164,7 @@ version( linux ) static if( __USE_FILE_OFFSET64 ) { int fseeko64(FILE*, off_t, int); - alias fseeko64 fseeko; + alias fseeko = fseeko64; } else { @@ -174,7 +174,7 @@ version( linux ) static if( __USE_FILE_OFFSET64 ) { off_t ftello64(FILE*); - alias ftello64 ftello; + alias ftello = ftello64; } else { diff --git a/src/core/sys/posix/stdlib.d b/src/core/sys/posix/stdlib.d index bd9dfb5b51..3e3aa4072f 100644 --- a/src/core/sys/posix/stdlib.d +++ b/src/core/sys/posix/stdlib.d @@ -251,7 +251,7 @@ version( linux ) static if( __USE_LARGEFILE64 ) { int mkstemp64(char*); - alias mkstemp64 mkstemp; + alias mkstemp = mkstemp64; } else { @@ -403,14 +403,14 @@ else version( Solaris ) int mkstemp(char*); static if ( __USE_LARGEFILE64 ) - alias mkstemp mkstemp64; + alias mkstemp64 = mkstemp; } else { int mkstemp64(char*); static if ( __USE_LARGEFILE64 ) - alias mkstemp64 mkstemp; + alias mkstemp = mkstemp64; else int mkstemp(char*); } diff --git a/src/core/sys/posix/sys/resource.d b/src/core/sys/posix/sys/resource.d index 6f79c46163..d3a31fd1de 100644 --- a/src/core/sys/posix/sys/resource.d +++ b/src/core/sys/posix/sys/resource.d @@ -84,9 +84,9 @@ version (linux) } static if (__USE_FILE_OFFSET64) - alias ulong rlim_t; + alias rlim_t = ulong; else - alias c_ulong rlim_t; + alias rlim_t = c_ulong; static if (__USE_FILE_OFFSET64) enum RLIM_INFINITY = 0xffffffffffffffffUL; @@ -142,7 +142,7 @@ else version (OSX) PRIO_USER = 2, } - alias ulong rlim_t; + alias rlim_t = ulong; enum { @@ -184,7 +184,7 @@ else version (FreeBSD) PRIO_USER = 2, } - alias long rlim_t; + alias rlim_t = long; enum { @@ -205,7 +205,7 @@ else version (FreeBSD) timeval ru_utime; timeval ru_stime; c_long ru_maxrss; - alias ru_ixrss ru_first; + alias ru_first = ru_ixrss; c_long ru_ixrss; c_long ru_idrss; c_long ru_isrss; @@ -219,7 +219,7 @@ else version (FreeBSD) c_long ru_nsignals; c_long ru_nvcsw; c_long ru_nivcsw; - alias ru_nivcsw ru_last; + alias ru_last = ru_nivcsw; } enum @@ -242,7 +242,7 @@ else version (Solaris) PRIO_USER = 2, } - alias c_ulong rlim_t; + alias rlim_t = c_ulong; enum : c_long { @@ -297,7 +297,7 @@ else version (Android) PRIO_USER = 2, } - alias c_ulong rlim_t; + alias rlim_t = c_ulong; enum RLIM_INFINITY = cast(c_ulong)(~0UL); enum diff --git a/src/core/sys/posix/sys/select.d b/src/core/sys/posix/sys/select.d index 0bb5d08c9c..2649e1fa80 100644 --- a/src/core/sys/posix/sys/select.d +++ b/src/core/sys/posix/sys/select.d @@ -52,7 +52,7 @@ version( linux ) { private { - alias c_long __fd_mask; + alias __fd_mask = c_long; enum uint __NFDBITS = 8 * __fd_mask.sizeof; extern (D) auto __FDELT( int d ) @@ -173,7 +173,7 @@ else version( FreeBSD ) { private { - alias c_ulong __fd_mask; + alias __fd_mask = c_ulong; enum _NFDBITS = __fd_mask.sizeof * 8; } @@ -222,7 +222,7 @@ else version (Solaris) { private { - alias c_long fds_mask; + alias fds_mask = c_long; enum _NBBY = 8; enum FD_NFDBITS = fds_mask.sizeof * _NBBY; @@ -265,7 +265,7 @@ else version( Android ) { private { - alias c_ulong __fd_mask; + alias __fd_mask = c_ulong; enum uint __NFDBITS = 8 * __fd_mask.sizeof; extern (D) auto __FDELT( int d ) diff --git a/src/core/sys/posix/sys/shm.d b/src/core/sys/posix/sys/shm.d index 458a5e937c..2959910405 100644 --- a/src/core/sys/posix/sys/shm.d +++ b/src/core/sys/posix/sys/shm.d @@ -56,9 +56,9 @@ version( linux ) enum SHM_RND = 0x02000; // 020000 int __getpagesize(); - alias __getpagesize SHMLBA; + alias SHMLBA = __getpagesize; - alias c_ulong shmatt_t; + alias shmatt_t = c_ulong; struct shmid_ds { @@ -88,7 +88,7 @@ else version( FreeBSD ) enum SHM_RND = 0x02000; // 020000 enum SHMLBA = 1 << 12; // PAGE_SIZE = (1< - alias int timer_t; + alias clockid_t = int; // + alias timer_t = int; int clock_getres(clockid_t, timespec*); int clock_gettime(clockid_t, timespec*); @@ -264,8 +264,8 @@ else version (Solaris) enum TIMER_ABSOLUTE = 0x1; - alias int clockid_t; - alias int timer_t; + alias clockid_t = int; + alias timer_t = int; int clock_getres(clockid_t, timespec*); int clock_gettime(clockid_t, timespec*); @@ -297,8 +297,8 @@ else version( Android ) version(X86) { - alias int clockid_t; - alias int timer_t; + alias clockid_t = int; + alias timer_t = int; } else { @@ -410,7 +410,7 @@ else version (Solaris) tm* getdate(in char*); char* __strptime_dontzero(in char*, in char*, tm*); - alias __strptime_dontzero strptime; + alias strptime = __strptime_dontzero; } else version( Android ) { diff --git a/src/core/sys/posix/ucontext.d b/src/core/sys/posix/ucontext.d index 14d773a7b3..52fd367549 100644 --- a/src/core/sys/posix/ucontext.d +++ b/src/core/sys/posix/ucontext.d @@ -101,9 +101,9 @@ version( linux ) enum NGREG = 23; - alias c_long greg_t; - alias greg_t[NGREG] gregset_t; - alias _libc_fpstate* fpregset_t; + alias greg_t = c_long; + alias gregset_t = greg_t[NGREG]; + alias fpregset_t = _libc_fpstate*; } struct mcontext_t @@ -171,9 +171,9 @@ version( linux ) enum NGREG = 19; - alias int greg_t; - alias greg_t[NGREG] gregset_t; - alias _libc_fpstate* fpregset_t; + alias greg_t = int; + alias gregset_t = greg_t[NGREG]; + alias fpregset_t = _libc_fpstate*; } struct mcontext_t @@ -201,8 +201,8 @@ version( linux ) enum NGREG = 32; enum NFPREG = 32; - alias ulong greg_t; - alias greg_t[NGREG] gregset_t; + alias greg_t = ulong; + alias gregset_t = greg_t[NGREG]; struct fpregset_t { @@ -280,8 +280,8 @@ version( linux ) enum NGREG = 32; enum NFPREG = 32; - alias ulong greg_t; - alias greg_t[NGREG] gregset_t; + alias greg_t = ulong; + alias gregset_t = greg_t[NGREG]; struct fpregset_t { @@ -331,8 +331,8 @@ version( linux ) { enum NGREG = 48; - alias c_ulong greg_t; - alias greg_t[NGREG] gregset_t; + alias greg_t = c_ulong; + alias gregset_t = greg_t[NGREG]; struct fpregset_t { @@ -397,9 +397,9 @@ version( linux ) enum NFPREG = 33; enum NVRREG = 34; - alias c_ulong greg_t; - alias greg_t[NGREG] gregset_t; - alias double[NFPREG] fpregset_t; + alias greg_t = c_ulong; + alias gregset_t = greg_t[NGREG]; + alias fpregset_t = double[NFPREG]; struct vscr_t { @@ -504,7 +504,7 @@ version( linux ) } //alias elf_fpregset_t fpregset_t; - alias sigcontext mcontext_t; + alias mcontext_t = sigcontext; struct ucontext_t { @@ -518,7 +518,7 @@ version( linux ) } else version (AArch64) { - alias int greg_t; + alias greg_t = int; struct sigcontext { ulong fault_address; @@ -531,7 +531,7 @@ version( linux ) align(16) ubyte[4096] __reserved; } - alias sigcontext mcontext_t; + alias mcontext_t = sigcontext; struct ucontext_t { @@ -550,9 +550,9 @@ else version( FreeBSD ) // version( X86_64 ) { - alias long __register_t; - alias uint __uint32_t; - alias ushort __uint16_t; + alias __register_t = long; + alias __uint32_t = uint; + alias __uint16_t = ushort; struct mcontext_t { __register_t mc_onstack; @@ -601,7 +601,7 @@ else version( FreeBSD ) } else version( X86 ) { - alias int __register_t; + alias __register_t = int; struct mcontext_t { @@ -657,20 +657,20 @@ else version( FreeBSD ) } else version ( Solaris ) { - alias uint[4] upad128_t; + alias upad128_t = uint[4]; version ( X86_64 ) { enum _NGREG = 28; - alias long greg_t; + alias greg_t = long; } else version ( X86 ) { enum _NGREG = 19; - alias int greg_t; + alias greg_t = int; } - alias greg_t[_NGREG] gregset_t; + alias gregset_t = greg_t[_NGREG]; version ( X86_64 ) { diff --git a/src/core/sys/posix/unistd.d b/src/core/sys/posix/unistd.d index ef37ef1af6..efccf05fa4 100644 --- a/src/core/sys/posix/unistd.d +++ b/src/core/sys/posix/unistd.d @@ -98,7 +98,7 @@ version( linux ) static if( __USE_FILE_OFFSET64 ) { off_t lseek64(int, off_t, int) @trusted; - alias lseek64 lseek; + alias lseek = lseek64; } else { @@ -107,7 +107,7 @@ version( linux ) static if( __USE_LARGEFILE64 ) { int ftruncate64(int, off_t) @trusted; - alias ftruncate64 ftruncate; + alias ftruncate = ftruncate64; } else { @@ -124,20 +124,20 @@ else version( Solaris ) version ( D_LP64 ) { off_t lseek(int, off_t, int) @trusted; - alias lseek lseek64; + alias lseek64 = lseek; int ftruncate(int, off_t) @trusted; - alias ftruncate ftruncate64; + alias ftruncate64 = ftruncate; } else { static if( __USE_LARGEFILE64 ) { off64_t lseek64(int, off64_t, int) @trusted; - alias lseek64 lseek; + alias lseek = lseek64; int ftruncate64(int, off64) @trusted; - alias ftruncate64 ftruncate; + alias ftruncate = ftruncate64; } else { @@ -1036,16 +1036,16 @@ version( linux ) static if( __USE_FILE_OFFSET64 ) { int lockf64(int, int, off_t) @trusted; - alias lockf64 lockf; + alias lockf = lockf64; ssize_t pread64(int, void*, size_t, off_t); - alias pread64 pread; + alias pread = pread64; ssize_t pwrite64(int, in void*, size_t, off_t); - alias pwrite64 pwrite; + alias pwrite = pwrite64; int truncate64(in char*, off_t); - alias truncate64 truncate; + alias truncate = truncate64; } else { @@ -1149,32 +1149,32 @@ else version( Solaris ) version (D_LP64) { int lockf(int, int, off_t); - alias lockf lockf64; + alias lockf64 = lockf; ssize_t pread(int, void*, size_t, off_t); - alias pread pread64; + alias pread64 = pread; ssize_t pwrite(int, in void*, size_t, off_t); - alias pwrite pwrite64; + alias pwrite64 = pwrite; int truncate(in char*, off_t); - alias truncate truncate64; + alias truncate64 = truncate; } else { static if( __USE_FILE_OFFSET64 ) { int lockf64(int, int, off64_t); - alias lockf64 lockf; + alias lockf = lockf64; ssize_t pread64(int, void*, size_t, off64_t); - alias pread64 pread; + alias pread = pread64; ssize_t pwrite64(int, in void*, size_t, off_t); - alias pwrite64 pwrite; + alias pwrite = pwrite64; int truncate64(in char*, off_t); - alias truncate64 truncate; + alias truncate = truncate64; } else { diff --git a/src/core/sys/solaris/sys/types.d b/src/core/sys/solaris/sys/types.d index 0ec7f26955..cf33dd8362 100644 --- a/src/core/sys/solaris/sys/types.d +++ b/src/core/sys/solaris/sys/types.d @@ -19,6 +19,6 @@ version (Solaris): nothrow: @nogc: -alias short pri_t; +alias pri_t = short; enum P_MYID = -1; diff --git a/src/core/sys/windows/com.d b/src/core/sys/windows/com.d index 215a55fa9d..d63d5782f7 100644 --- a/src/core/sys/windows/com.d +++ b/src/core/sys/windows/com.d @@ -7,7 +7,7 @@ import core.atomic; import core.sys.windows.windows; //import std.string; -alias WCHAR OLECHAR; +alias OLECHAR = WCHAR; alias LPOLESTR = OLECHAR*; alias LPCOLESTR = OLECHAR*; diff --git a/src/core/sys/windows/dbghelp.d b/src/core/sys/windows/dbghelp.d index 6c55c3c8c0..49a870cee3 100644 --- a/src/core/sys/windows/dbghelp.d +++ b/src/core/sys/windows/dbghelp.d @@ -15,7 +15,7 @@ version (Windows): import core.sys.windows.windows; -alias CHAR TCHAR; +alias TCHAR = CHAR; /* enum ADDRESS_MODE : DWORD @@ -179,30 +179,30 @@ struct API_VERSION extern(System) { - alias BOOL function(HANDLE hProcess, DWORD64 lpBaseAddress, PVOID lpBuffer, DWORD nSize, LPDWORD lpNumberOfBytesRead) ReadProcessMemoryProc64; - alias PVOID function(HANDLE hProcess, DWORD64 AddrBase) FunctionTableAccessProc64; - alias DWORD64 function(HANDLE hProcess, DWORD64 Address) GetModuleBaseProc64; - alias DWORD64 function(HANDLE hProcess, HANDLE hThread, ADDRESS64 *lpaddr) TranslateAddressProc64; + alias ReadProcessMemoryProc64 = BOOL function(HANDLE hProcess, DWORD64 lpBaseAddress, PVOID lpBuffer, DWORD nSize, LPDWORD lpNumberOfBytesRead); + alias FunctionTableAccessProc64 = PVOID function(HANDLE hProcess, DWORD64 AddrBase); + alias GetModuleBaseProc64 = DWORD64 function(HANDLE hProcess, DWORD64 Address); + alias TranslateAddressProc64 = DWORD64 function(HANDLE hProcess, HANDLE hThread, ADDRESS64 *lpaddr); - alias BOOL function(HANDLE hProcess, PCSTR UserSearchPath, bool fInvadeProcess) SymInitializeFunc; - alias BOOL function(HANDLE hProcess) SymCleanupFunc; - alias DWORD function(DWORD SymOptions) SymSetOptionsFunc; - alias DWORD function() SymGetOptionsFunc; - alias PVOID function(HANDLE hProcess, DWORD64 AddrBase) SymFunctionTableAccess64Func; - alias BOOL function(DWORD MachineType, HANDLE hProcess, HANDLE hThread, STACKFRAME64 *StackFrame, PVOID ContextRecord, + alias SymInitializeFunc = BOOL function(HANDLE hProcess, PCSTR UserSearchPath, bool fInvadeProcess); + alias SymCleanupFunc = BOOL function(HANDLE hProcess); + alias SymSetOptionsFunc = DWORD function(DWORD SymOptions); + alias SymGetOptionsFunc = DWORD function(); + alias SymFunctionTableAccess64Func = PVOID function(HANDLE hProcess, DWORD64 AddrBase); + alias StackWalk64Func = BOOL function(DWORD MachineType, HANDLE hProcess, HANDLE hThread, STACKFRAME64 *StackFrame, PVOID ContextRecord, ReadProcessMemoryProc64 ReadMemoryRoutine, FunctionTableAccessProc64 FunctoinTableAccess, - GetModuleBaseProc64 GetModuleBaseRoutine, TranslateAddressProc64 TranslateAddress) StackWalk64Func; - alias BOOL function(HANDLE hProcess, DWORD64 dwAddr, PDWORD pdwDisplacement, IMAGEHLP_LINE64 *line) SymGetLineFromAddr64Func; - alias DWORD64 function(HANDLE hProcess, DWORD64 dwAddr) SymGetModuleBase64Func; - alias BOOL function(HANDLE hProcess, DWORD64 dwAddr, IMAGEHLP_MODULE64 *ModuleInfo) SymGetModuleInfo64Func; - alias BOOL function(HANDLE hProcess, DWORD64 Address, DWORD64 *Displacement, IMAGEHLP_SYMBOL64 *Symbol) SymGetSymFromAddr64Func; - alias DWORD function(PCTSTR DecoratedName, PTSTR UnDecoratedName, DWORD UndecoratedLength, DWORD Flags) UnDecorateSymbolNameFunc; - alias DWORD64 function(HANDLE hProcess, HANDLE hFile, PCSTR ImageName, PCSTR ModuleName, DWORD64 BaseOfDll, DWORD SizeOfDll) SymLoadModule64Func; - alias BOOL function(HANDLE HProcess, PTSTR SearchPath, DWORD SearchPathLength) SymGetSearchPathFunc; - alias BOOL function(HANDLE hProcess, DWORD64 Address) SymUnloadModule64Func; - alias BOOL function(HANDLE hProcess, ULONG ActionCode, ulong CallbackContext, ulong UserContext) PSYMBOL_REGISTERED_CALLBACK64; - alias BOOL function(HANDLE hProcess, PSYMBOL_REGISTERED_CALLBACK64 CallbackFunction, ulong UserContext) SymRegisterCallback64Func; - alias API_VERSION* function() ImagehlpApiVersionFunc; + GetModuleBaseProc64 GetModuleBaseRoutine, TranslateAddressProc64 TranslateAddress); + alias SymGetLineFromAddr64Func = BOOL function(HANDLE hProcess, DWORD64 dwAddr, PDWORD pdwDisplacement, IMAGEHLP_LINE64 *line); + alias SymGetModuleBase64Func = DWORD64 function(HANDLE hProcess, DWORD64 dwAddr); + alias SymGetModuleInfo64Func = BOOL function(HANDLE hProcess, DWORD64 dwAddr, IMAGEHLP_MODULE64 *ModuleInfo); + alias SymGetSymFromAddr64Func = BOOL function(HANDLE hProcess, DWORD64 Address, DWORD64 *Displacement, IMAGEHLP_SYMBOL64 *Symbol); + alias UnDecorateSymbolNameFunc = DWORD function(PCTSTR DecoratedName, PTSTR UnDecoratedName, DWORD UndecoratedLength, DWORD Flags); + alias SymLoadModule64Func = DWORD64 function(HANDLE hProcess, HANDLE hFile, PCSTR ImageName, PCSTR ModuleName, DWORD64 BaseOfDll, DWORD SizeOfDll); + alias SymGetSearchPathFunc = BOOL function(HANDLE HProcess, PTSTR SearchPath, DWORD SearchPathLength); + alias SymUnloadModule64Func = BOOL function(HANDLE hProcess, DWORD64 Address); + alias PSYMBOL_REGISTERED_CALLBACK64 = BOOL function(HANDLE hProcess, ULONG ActionCode, ulong CallbackContext, ulong UserContext); + alias SymRegisterCallback64Func = BOOL function(HANDLE hProcess, PSYMBOL_REGISTERED_CALLBACK64 CallbackFunction, ulong UserContext); + alias ImagehlpApiVersionFunc = API_VERSION* function(); } struct DbgHelp diff --git a/src/core/sys/windows/dll.d b/src/core/sys/windows/dll.d index b5e2201217..d098cd3b54 100644 --- a/src/core/sys/windows/dll.d +++ b/src/core/sys/windows/dll.d @@ -40,9 +40,9 @@ version( Windows ) extern __gshared byte _tls_start; extern __gshared byte _tls_end; extern __gshared void* __xl_a; - alias _tls_start _tlsstart; - alias _tls_end _tlsend; - alias __xl_a _tls_callbacks_a; + alias _tlsstart = _tls_start; + alias _tlsend = _tls_end; + alias _tls_callbacks_a = __xl_a; } extern __gshared int _tls_index; } @@ -226,7 +226,7 @@ private: return true; } - alias bool BOOLEAN; + alias BOOLEAN = bool; struct UNICODE_STRING { diff --git a/src/core/sys/windows/stacktrace.d b/src/core/sys/windows/stacktrace.d index 9f9a0e7b10..a6525023e4 100644 --- a/src/core/sys/windows/stacktrace.d +++ b/src/core/sys/windows/stacktrace.d @@ -26,7 +26,7 @@ debug(PRINTF) import core.stdc.stdio; extern(Windows) void RtlCaptureContext(CONTEXT* ContextRecord); extern(Windows) DWORD GetEnvironmentVariableA(LPCSTR lpName, LPSTR pBuffer, DWORD nSize); -extern(Windows) alias USHORT function(ULONG FramesToSkip, ULONG FramesToCapture, PVOID *BackTrace, PULONG BackTraceHash) RtlCaptureStackBackTraceFunc; +extern(Windows) alias RtlCaptureStackBackTraceFunc = USHORT function(ULONG FramesToSkip, ULONG FramesToCapture, PVOID *BackTrace, PULONG BackTraceHash); private __gshared RtlCaptureStackBackTraceFunc RtlCaptureStackBackTrace; private __gshared immutable bool initialized; diff --git a/src/core/sys/windows/threadaux.d b/src/core/sys/windows/threadaux.d index 17c7dd0246..f94f4f7051 100644 --- a/src/core/sys/windows/threadaux.d +++ b/src/core/sys/windows/threadaux.d @@ -48,7 +48,7 @@ private: wchar* Buffer; } // process or thread ID, documentation says it is a HANDLE, but it's actually the ID (a DWORD) - alias size_t PTID; + alias PTID = size_t; struct _SYSTEM_PROCESS_INFORMATION { @@ -261,7 +261,7 @@ private: } // execute function on the TLS for the given thread - alias extern(C) void function() externCVoidFunc; + alias externCVoidFunc = extern(C) void function(); static void impersonate_thread( uint id, externCVoidFunc fn ) { impersonate_thread(id, () => fn()); @@ -293,11 +293,11 @@ private: public: // forward as few symbols as possible into the "global" name space - alias thread_aux.getTEB getTEB; - alias thread_aux.getThreadStackBottom getThreadStackBottom; - alias thread_aux.OpenThreadHandle OpenThreadHandle; - alias thread_aux.enumProcessThreads enumProcessThreads; - alias thread_aux.impersonate_thread impersonate_thread; + alias getTEB = thread_aux.getTEB; + alias getThreadStackBottom = thread_aux.getThreadStackBottom; + alias OpenThreadHandle = thread_aux.OpenThreadHandle; + alias enumProcessThreads = thread_aux.enumProcessThreads; + alias impersonate_thread = thread_aux.impersonate_thread; // get the start of the TLS memory of the thread with the given handle void* GetTlsDataAddress( HANDLE hnd ) nothrow diff --git a/src/core/sys/windows/windows.d b/src/core/sys/windows/windows.d index 81097bf666..885d3d96d5 100644 --- a/src/core/sys/windows/windows.d +++ b/src/core/sys/windows/windows.d @@ -17,168 +17,188 @@ extern (Windows): nothrow: //@nogc: - alias uint ULONG; - alias ULONG *PULONG; - alias ushort USHORT; - alias USHORT *PUSHORT; - alias ubyte UCHAR; - alias UCHAR *PUCHAR; - alias char *PSZ; - - alias void VOID; - alias char CHAR; - alias short SHORT; - alias int LONG; - - alias long LONGLONG; - alias ulong ULONGLONG; - - alias CHAR* LPCH, LPSTR, PCH, PSTR; - alias const(CHAR)* LPCCH, LPCSTR, PCCH, PCSTR; - - alias wchar WCHAR; - alias WCHAR* LPWCH, LPWSTR, PWCH, PWSTR; - alias const(WCHAR)* LPCWCH, LPCWSTR, PCWCH, PCWSTR; - - alias CHAR* LPTCH, LPTSTR, PTCH, PTSTR; - alias const(CHAR)* LPCTCH, LPCTSTR, PCTCH, PCTSTR; - - alias uint DWORD; - alias ulong DWORD64; - alias int BOOL; - alias ubyte BYTE; - alias ushort WORD; - alias float FLOAT; - alias FLOAT* PFLOAT; - alias BOOL* LPBOOL, PBOOL; - alias BYTE* LPBYTE, PBYTE; - alias int* LPINT, PINT; - alias WORD* LPWORD, PWORD; - alias int* LPLONG; - alias DWORD* LPDWORD, PDWORD; - alias void* LPVOID; - alias const(void)* LPCVOID; - - alias int INT; - alias uint UINT; - alias uint* PUINT; - - alias size_t SIZE_T; + alias ULONG = uint; + alias PULONG = ULONG*; + alias USHORT = ushort; + alias PUSHORT = USHORT*; + alias UCHAR = ubyte; + alias PUCHAR = UCHAR*; + alias PSZ = char*; + + alias VOID = void; + alias CHAR = char; + alias SHORT = short; + alias LONG = int; + + alias LONGLONG = long; + alias ULONGLONG = ulong; + + alias LPCH = CHAR*; + alias LPSTR = CHAR*; + alias PCH = CHAR*; + alias PSTR = CHAR*; + alias LPCCH = const(CHAR)*; + alias LPCSTR = const(CHAR)*; + alias PCCH = const(CHAR)*; + alias PCSTR = const(CHAR)*; + + alias WCHAR = wchar; + alias LPWCH = WCHAR*; + alias LPWSTR = WCHAR*; + alias PWCH = WCHAR*; + alias PWSTR = WCHAR*; + alias LPCWCH = const(WCHAR)*; + alias LPCWSTR = const(WCHAR)*; + alias PCWCH = const(WCHAR)*; + alias PCWSTR = const(WCHAR)*; + + alias LPTCH = CHAR*; + alias LPTSTR = CHAR*; + alias PTCH = CHAR*; + alias PTSTR = CHAR*; + alias LPCTCH = const(CHAR)*; + alias LPCTSTR = const(CHAR)*; + alias PCTCH = const(CHAR)*; + alias PCTSTR = const(CHAR)*; + + alias DWORD = uint; + alias DWORD64 = ulong; + alias BOOL = int; + alias BYTE = ubyte; + alias WORD = ushort; + alias FLOAT = float; + alias PFLOAT = FLOAT*; + alias LPBOOL = BOOL*; + alias PBOOL = BOOL*; + alias LPBYTE = BYTE*; + alias PBYTE = BYTE*; + alias LPINT = int*; + alias PINT = int*; + alias LPWORD = WORD*; + alias PWORD = WORD*; + alias LPLONG = int*; + alias LPDWORD = DWORD*; + alias PDWORD = DWORD*; + alias LPVOID = void*; + alias LPCVOID = const(void)*; + + alias INT = int; + alias UINT = uint; + alias PUINT = uint*; + + alias SIZE_T = size_t; // ULONG_PTR must be able to store a pointer as an integral type version (Win64) { - alias long INT_PTR; - alias ulong UINT_PTR; - alias long LONG_PTR; - alias ulong ULONG_PTR; - alias long * PINT_PTR; - alias ulong * PUINT_PTR; - alias long * PLONG_PTR; - alias ulong * PULONG_PTR; + alias INT_PTR = long; + alias UINT_PTR = ulong; + alias LONG_PTR = long; + alias ULONG_PTR = ulong; + alias PINT_PTR = long*; + alias PUINT_PTR = ulong*; + alias PLONG_PTR = long*; + alias PULONG_PTR = ulong*; } else // Win32 { - alias int INT_PTR; - alias uint UINT_PTR; - alias int LONG_PTR; - alias uint ULONG_PTR; - alias int * PINT_PTR; - alias uint * PUINT_PTR; - alias int * PLONG_PTR; - alias uint * PULONG_PTR; -} - - alias ULONG_PTR DWORD_PTR; - - alias void *HANDLE; - alias void *PVOID; - alias HANDLE HGLOBAL; - alias HANDLE HLOCAL; - alias LONG HRESULT; - alias LONG SCODE; - alias HANDLE HINSTANCE; - alias HINSTANCE HMODULE; - alias HANDLE HWND; - alias HANDLE* PHANDLE; - - alias HANDLE HGDIOBJ; - alias HANDLE HACCEL; - alias HANDLE HBITMAP; - alias HANDLE HBRUSH; - alias HANDLE HCOLORSPACE; - alias HANDLE HDC; - alias HANDLE HGLRC; - alias HANDLE HDESK; - alias HANDLE HENHMETAFILE; - alias HANDLE HFONT; - alias HANDLE HICON; - alias HANDLE HMENU; - alias HANDLE HMETAFILE; - alias HANDLE HPALETTE; - alias HANDLE HPEN; - alias HANDLE HRGN; - alias HANDLE HRSRC; - alias HANDLE HSTR; - alias HANDLE HTASK; - alias HANDLE HWINSTA; - alias HANDLE HKL; - alias HICON HCURSOR; - - alias HANDLE HKEY; - alias HKEY *PHKEY; - alias DWORD ACCESS_MASK; - alias ACCESS_MASK *PACCESS_MASK; - alias ACCESS_MASK REGSAM; + alias INT_PTR = int; + alias UINT_PTR = uint; + alias LONG_PTR = int; + alias ULONG_PTR = uint; + alias PINT_PTR = int*; + alias PUINT_PTR = uint*; + alias PLONG_PTR = int*; + alias PULONG_PTR = uint*; +} + + alias DWORD_PTR = ULONG_PTR; + + alias HANDLE = void*; + alias PVOID = void*; + alias HGLOBAL = HANDLE; + alias HLOCAL = HANDLE; + alias HRESULT = LONG; + alias SCODE = LONG; + alias HINSTANCE = HANDLE; + alias HMODULE = HINSTANCE; + alias HWND = HANDLE; + alias PHANDLE = HANDLE*; + + alias HGDIOBJ = HANDLE; + alias HACCEL = HANDLE; + alias HBITMAP = HANDLE; + alias HBRUSH = HANDLE; + alias HCOLORSPACE = HANDLE; + alias HDC = HANDLE; + alias HGLRC = HANDLE; + alias HDESK = HANDLE; + alias HENHMETAFILE = HANDLE; + alias HFONT = HANDLE; + alias HICON = HANDLE; + alias HMENU = HANDLE; + alias HMETAFILE = HANDLE; + alias HPALETTE = HANDLE; + alias HPEN = HANDLE; + alias HRGN = HANDLE; + alias HRSRC = HANDLE; + alias HSTR = HANDLE; + alias HTASK = HANDLE; + alias HWINSTA = HANDLE; + alias HKL = HANDLE; + alias HCURSOR = HICON; + + alias HKEY = HANDLE; + alias PHKEY = HKEY*; + alias ACCESS_MASK = DWORD; + alias PACCESS_MASK = ACCESS_MASK*; + alias REGSAM = ACCESS_MASK; version (Win64) - alias INT_PTR function() FARPROC; + alias FARPROC = INT_PTR function(); else - alias int function() FARPROC; + alias FARPROC = int function(); - alias UINT_PTR WPARAM; - alias LONG_PTR LPARAM; - alias LONG_PTR LRESULT; + alias WPARAM = UINT_PTR; + alias LPARAM = LONG_PTR; + alias LRESULT = LONG_PTR; - alias DWORD COLORREF; - alias DWORD *LPCOLORREF; - alias WORD ATOM; + alias COLORREF = DWORD; + alias LPCOLORREF = DWORD*; + alias ATOM = WORD; version (all) { // Properly prototyped versions - alias INT_PTR function(HWND, UINT, WPARAM, LPARAM) DLGPROC; - alias VOID function(HWND, UINT, UINT_PTR, DWORD) TIMERPROC; - alias BOOL function(HDC, LPARAM, int) GRAYSTRINGPROC; - alias BOOL function(HWND, LPARAM) WNDENUMPROC; - alias LRESULT function(int code, WPARAM wParam, LPARAM lParam) HOOKPROC; - alias VOID function(HWND, UINT, ULONG_PTR, LRESULT) SENDASYNCPROC; - alias BOOL function(HWND, LPCSTR, HANDLE) PROPENUMPROCA; - alias BOOL function(HWND, LPCWSTR, HANDLE) PROPENUMPROCW; - alias BOOL function(HWND, LPSTR, HANDLE, ULONG_PTR) PROPENUMPROCEXA; - alias BOOL function(HWND, LPWSTR, HANDLE, ULONG_PTR) PROPENUMPROCEXW; - alias int function(LPSTR lpch, int ichCurrent, int cch, int code) - EDITWORDBREAKPROCA; - alias int function(LPWSTR lpch, int ichCurrent, int cch, int code) - EDITWORDBREAKPROCW; - alias BOOL function(HDC hdc, LPARAM lData, WPARAM wData, int cx, int cy) - DRAWSTATEPROC; + alias DLGPROC = INT_PTR function(HWND, UINT, WPARAM, LPARAM); + alias TIMERPROC = VOID function(HWND, UINT, UINT_PTR, DWORD); + alias GRAYSTRINGPROC = BOOL function(HDC, LPARAM, int); + alias WNDENUMPROC = BOOL function(HWND, LPARAM); + alias HOOKPROC = LRESULT function(int code, WPARAM wParam, LPARAM lParam); + alias SENDASYNCPROC = VOID function(HWND, UINT, ULONG_PTR, LRESULT); + alias PROPENUMPROCA = BOOL function(HWND, LPCSTR, HANDLE); + alias PROPENUMPROCW = BOOL function(HWND, LPCWSTR, HANDLE); + alias PROPENUMPROCEXA = BOOL function(HWND, LPSTR, HANDLE, ULONG_PTR); + alias PROPENUMPROCEXW = BOOL function(HWND, LPWSTR, HANDLE, ULONG_PTR); + alias EDITWORDBREAKPROCA = int function(LPSTR lpch, int ichCurrent, int cch, int code); + alias EDITWORDBREAKPROCW = int function(LPWSTR lpch, int ichCurrent, int cch, int code); + alias DRAWSTATEPROC = BOOL function(HDC hdc, LPARAM lData, WPARAM wData, int cx, int cy); } else { - alias FARPROC DLGPROC; - alias FARPROC TIMERPROC; - alias FARPROC GRAYSTRINGPROC; - alias FARPROC WNDENUMPROC; - alias FARPROC HOOKPROC; - alias FARPROC SENDASYNCPROC; - alias FARPROC EDITWORDBREAKPROCA; - alias FARPROC EDITWORDBREAKPROCW; - alias FARPROC PROPENUMPROCA; - alias FARPROC PROPENUMPROCW; - alias FARPROC PROPENUMPROCEXA; - alias FARPROC PROPENUMPROCEXW; - alias FARPROC DRAWSTATEPROC; + alias DLGPROC = FARPROC; + alias TIMERPROC = FARPROC; + alias GRAYSTRINGPROC = FARPROC; + alias WNDENUMPROC = FARPROC; + alias HOOKPROC = FARPROC; + alias SENDASYNCPROC = FARPROC; + alias EDITWORDBREAKPROCA = FARPROC; + alias EDITWORDBREAKPROCW = FARPROC; + alias PROPENUMPROCA = FARPROC; + alias PROPENUMPROCW = FARPROC; + alias PROPENUMPROCEXA = FARPROC; + alias PROPENUMPROCEXW = FARPROC; + alias DRAWSTATEPROC = FARPROC; } extern (D) pure @nogc @@ -341,7 +361,7 @@ union LARGE_INTEGER } long QuadPart; } -alias LARGE_INTEGER* PLARGE_INTEGER; +alias PLARGE_INTEGER = LARGE_INTEGER*; union ULARGE_INTEGER { @@ -352,7 +372,7 @@ union ULARGE_INTEGER } ulong QuadPart; } -alias ULARGE_INTEGER* PULARGE_INTEGER; +alias PULARGE_INTEGER = ULARGE_INTEGER*; struct OVERLAPPED { ULONG_PTR Internal; @@ -366,7 +386,7 @@ struct OVERLAPPED { } HANDLE hEvent; } -alias OVERLAPPED* LPOVERLAPPED; +alias LPOVERLAPPED = OVERLAPPED*; struct SECURITY_ATTRIBUTES { DWORD nLength; @@ -374,13 +394,15 @@ struct SECURITY_ATTRIBUTES { BOOL bInheritHandle; } -alias SECURITY_ATTRIBUTES* PSECURITY_ATTRIBUTES, LPSECURITY_ATTRIBUTES; +alias PSECURITY_ATTRIBUTES = SECURITY_ATTRIBUTES*; +alias LPSECURITY_ATTRIBUTES = SECURITY_ATTRIBUTES*; struct FILETIME { DWORD dwLowDateTime; DWORD dwHighDateTime; } -alias FILETIME* PFILETIME, LPFILETIME; +alias PFILETIME = FILETIME*; +alias LPFILETIME = FILETIME*; struct WIN32_FIND_DATA { DWORD dwFileAttributes; @@ -415,7 +437,7 @@ struct _LIST_ENTRY _LIST_ENTRY *Flink; _LIST_ENTRY *Blink; } -alias _LIST_ENTRY LIST_ENTRY; +alias LIST_ENTRY = _LIST_ENTRY; struct _RTL_CRITICAL_SECTION_DEBUG { @@ -427,7 +449,7 @@ struct _RTL_CRITICAL_SECTION_DEBUG DWORD ContentionCount; DWORD[2] Spare; } -alias _RTL_CRITICAL_SECTION_DEBUG RTL_CRITICAL_SECTION_DEBUG; +alias RTL_CRITICAL_SECTION_DEBUG = _RTL_CRITICAL_SECTION_DEBUG; struct _RTL_CRITICAL_SECTION { @@ -444,7 +466,7 @@ struct _RTL_CRITICAL_SECTION HANDLE LockSemaphore; ULONG_PTR SpinCount; // force size on 64-bit systems when packed } -alias _RTL_CRITICAL_SECTION CRITICAL_SECTION; +alias CRITICAL_SECTION = _RTL_CRITICAL_SECTION; enum @@ -469,7 +491,7 @@ struct WIN32_FILE_ATTRIBUTE_DATA DWORD nFileSizeHigh; DWORD nFileSizeLow; } -alias WIN32_FILE_ATTRIBUTE_DATA* LPWIN32_FILE_ATTRIBUTE_DATA; +alias LPWIN32_FILE_ATTRIBUTE_DATA = WIN32_FILE_ATTRIBUTE_DATA*; export @nogc { @@ -540,7 +562,7 @@ struct MEMORYSTATUS { DWORD dwTotalVirtual; DWORD dwAvailVirtual; }; -alias MEMORYSTATUS *LPMEMORYSTATUS; +alias LPMEMORYSTATUS = MEMORYSTATUS*; @nogc { @@ -768,7 +790,7 @@ struct MEMORY_BASIC_INFORMATION { DWORD Protect; DWORD Type; } -alias MEMORY_BASIC_INFORMATION* PMEMORY_BASIC_INFORMATION; +alias PMEMORY_BASIC_INFORMATION = MEMORY_BASIC_INFORMATION*; enum { @@ -1213,7 +1235,7 @@ version (Win64) ULONGLONG Low; LONGLONG High; } - alias M128A* PM128A; + alias PM128A = M128A*; struct XMM_SAVE_AREA32 { @@ -1234,7 +1256,7 @@ version (Win64) M128A[16] XmmRegisters; BYTE[96] Reserved4; } - alias XMM_SAVE_AREA32 PXMM_SAVE_AREA32; + alias PXMM_SAVE_AREA32 = XMM_SAVE_AREA32; align(16) struct CONTEXT // sizeof(1232) { @@ -1562,7 +1584,7 @@ struct SYSTEM_INFO WORD wProcessorRevision; } -alias SYSTEM_INFO* LPSYSTEM_INFO; +alias LPSYSTEM_INFO = SYSTEM_INFO*; @nogc { @@ -2068,7 +2090,9 @@ struct RECT LONG right; LONG bottom; } -alias RECT* PRECT, NPRECT, LPRECT; +alias PRECT = RECT*; +alias NPRECT = RECT*; +alias LPRECT = RECT*; struct PAINTSTRUCT { HDC hdc; @@ -2078,7 +2102,9 @@ struct PAINTSTRUCT { BOOL fIncUpdate; BYTE[32] rgbReserved; } -alias PAINTSTRUCT* PPAINTSTRUCT, NPPAINTSTRUCT, LPPAINTSTRUCT; +alias PPAINTSTRUCT = PAINTSTRUCT*; +alias NPPAINTSTRUCT = PAINTSTRUCT*; +alias LPPAINTSTRUCT = PAINTSTRUCT*; // flags for GetDCEx() @@ -2281,7 +2307,7 @@ struct RGBQUAD { BYTE rgbRed; BYTE rgbReserved; } -alias RGBQUAD* LPRGBQUAD; +alias LPRGBQUAD = RGBQUAD*; struct BITMAPINFOHEADER { @@ -2297,13 +2323,15 @@ struct BITMAPINFOHEADER DWORD biClrUsed; DWORD biClrImportant; } -alias BITMAPINFOHEADER* LPBITMAPINFOHEADER, PBITMAPINFOHEADER; +alias LPBITMAPINFOHEADER = BITMAPINFOHEADER*; +alias PBITMAPINFOHEADER = BITMAPINFOHEADER*; struct BITMAPINFO { BITMAPINFOHEADER bmiHeader; RGBQUAD[1] bmiColors; } -alias BITMAPINFO* LPBITMAPINFO, PBITMAPINFO; +alias LPBITMAPINFO = BITMAPINFO*; +alias PBITMAPINFO = BITMAPINFO*; struct PALETTEENTRY { BYTE peRed; @@ -2311,14 +2339,17 @@ struct PALETTEENTRY { BYTE peBlue; BYTE peFlags; } -alias PALETTEENTRY* PPALETTEENTRY, LPPALETTEENTRY; +alias PPALETTEENTRY = PALETTEENTRY*; +alias LPPALETTEENTRY = PALETTEENTRY*; struct LOGPALETTE { WORD palVersion; WORD palNumEntries; PALETTEENTRY[1] palPalEntry; } -alias LOGPALETTE* PLOGPALETTE, NPLOGPALETTE, LPLOGPALETTE; +alias PLOGPALETTE = LOGPALETTE*; +alias NPLOGPALETTE = LOGPALETTE*; +alias LPLOGPALETTE = LOGPALETTE*; /* Pixel format descriptor flags */ enum : DWORD @@ -2386,7 +2417,8 @@ struct PIXELFORMATDESCRIPTOR DWORD dwVisibleMask; DWORD dwDamageMask; } -alias PIXELFORMATDESCRIPTOR* PPIXELFORMATDESCRIPTOR, LPPIXELFORMATDESCRIPTOR; +alias PPIXELFORMATDESCRIPTOR = PIXELFORMATDESCRIPTOR*; +alias LPPIXELFORMATDESCRIPTOR = PIXELFORMATDESCRIPTOR*; export @nogc { @@ -2453,7 +2485,9 @@ struct POINT LONG x; LONG y; } -alias POINT* PPOINT, NPPOINT, LPPOINT; +alias PPOINT = POINT*; +alias NPPOINT = POINT*; +alias LPPOINT = POINT*; export @nogc @@ -2472,7 +2506,7 @@ export HMODULE GetModuleHandleA(LPCSTR lpModuleName); export HMODULE GetModuleHandleW(LPCWSTR lpModuleName); } -alias LRESULT function (HWND, UINT, WPARAM, LPARAM) WNDPROC; +alias WNDPROC = LRESULT function(HWND, UINT, WPARAM, LPARAM); struct WNDCLASSEXA { UINT cbSize; @@ -2490,7 +2524,9 @@ struct WNDCLASSEXA { /* Win 4.0 */ HICON hIconSm; } -alias WNDCLASSEXA* PWNDCLASSEXA, NPWNDCLASSEXA, LPWNDCLASSEXA; +alias PWNDCLASSEXA = WNDCLASSEXA*; +alias NPWNDCLASSEXA = WNDCLASSEXA*; +alias LPWNDCLASSEXA = WNDCLASSEXA*; struct WNDCLASSA { @@ -2505,8 +2541,10 @@ struct WNDCLASSA { LPCSTR lpszMenuName; LPCSTR lpszClassName; } -alias WNDCLASSA* PWNDCLASSA, NPWNDCLASSA, LPWNDCLASSA; -alias WNDCLASSA WNDCLASS; +alias PWNDCLASSA = WNDCLASSA*; +alias NPWNDCLASSA = WNDCLASSA*; +alias LPWNDCLASSA = WNDCLASSA*; +alias WNDCLASS = WNDCLASSA; struct WNDCLASSEXW { @@ -2539,7 +2577,9 @@ struct WNDCLASSW { LPCWSTR lpszMenuName; LPCWSTR lpszClassName; } -alias WNDCLASSW* PWNDCLASSW, NPWNDCLASSW, LPWNDCLASSW; +alias PWNDCLASSW = WNDCLASSW*; +alias NPWNDCLASSW = WNDCLASSW*; +alias LPWNDCLASSW = WNDCLASSW*; /* @@ -2820,7 +2860,9 @@ struct MSG { DWORD time; POINT pt; } -alias MSG* PMSG, NPMSG, LPMSG; +alias PMSG = MSG*; +alias NPMSG = MSG*; +alias LPMSG = MSG*; export @nogc { @@ -3145,7 +3187,7 @@ enum export @nogc LRESULT SendMessageA(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); -alias UINT function (HWND, UINT, WPARAM, LPARAM) LPOFNHOOKPROC; +alias LPOFNHOOKPROC = UINT function(HWND, UINT, WPARAM, LPARAM); struct OPENFILENAMEA { DWORD lStructSize; @@ -3169,7 +3211,7 @@ struct OPENFILENAMEA { LPOFNHOOKPROC lpfnHook; LPCSTR lpTemplateName; } -alias OPENFILENAMEA *LPOPENFILENAMEA; +alias LPOPENFILENAMEA = OPENFILENAMEA*; struct OPENFILENAMEW { DWORD lStructSize; @@ -3193,7 +3235,7 @@ struct OPENFILENAMEW { LPOFNHOOKPROC lpfnHook; LPCWSTR lpTemplateName; } -alias OPENFILENAMEW *LPOPENFILENAMEW; +alias LPOPENFILENAMEW = OPENFILENAMEW*; @nogc { @@ -3225,7 +3267,9 @@ struct BITMAP WORD bmBitsPixel; LPVOID bmBits; } -alias BITMAP* PBITMAP, NPBITMAP, LPBITMAP; +alias PBITMAP = BITMAP*; +alias NPBITMAP = BITMAP*; +alias LPBITMAP = BITMAP*; @nogc { @@ -3253,7 +3297,9 @@ struct LOGFONTA BYTE lfPitchAndFamily; CHAR[32] lfFaceName; } -alias LOGFONTA* PLOGFONTA, NPLOGFONTA, LPLOGFONTA; +alias PLOGFONTA = LOGFONTA*; +alias NPLOGFONTA = LOGFONTA*; +alias LPLOGFONTA = LOGFONTA*; @nogc { @@ -3305,17 +3351,17 @@ align (2) struct DLGTEMPLATE { short cx; short cy; } -alias DLGTEMPLATE *LPDLGTEMPLATEA; -alias DLGTEMPLATE *LPDLGTEMPLATEW; +alias LPDLGTEMPLATEA = DLGTEMPLATE*; +alias LPDLGTEMPLATEW = DLGTEMPLATE*; -alias LPDLGTEMPLATEA LPDLGTEMPLATE; +alias LPDLGTEMPLATE = LPDLGTEMPLATEA; -alias DLGTEMPLATE *LPCDLGTEMPLATEA; -alias DLGTEMPLATE *LPCDLGTEMPLATEW; +alias LPCDLGTEMPLATEA = DLGTEMPLATE*; +alias LPCDLGTEMPLATEW = DLGTEMPLATE*; -alias LPCDLGTEMPLATEA LPCDLGTEMPLATE; +alias LPCDLGTEMPLATE = LPCDLGTEMPLATEA; export @nogc int DialogBoxParamA(HINSTANCE hInstance, LPCSTR lpTemplateName, @@ -3384,7 +3430,9 @@ struct LOGPEN POINT lopnWidth; COLORREF lopnColor; } -alias LOGPEN* PLOGPEN, NPLOGPEN, LPLOGPEN; +alias PLOGPEN = LOGPEN*; +alias NPLOGPEN = LOGPEN*; +alias LPLOGPEN = LOGPEN*; enum { @@ -3488,7 +3536,7 @@ struct COORD { SHORT X; SHORT Y; } -alias COORD *PCOORD; +alias PCOORD = COORD*; struct SMALL_RECT { SHORT Left; @@ -3496,7 +3544,7 @@ struct SMALL_RECT { SHORT Right; SHORT Bottom; } -alias SMALL_RECT *PSMALL_RECT; +alias PSMALL_RECT = SMALL_RECT*; struct KEY_EVENT_RECORD { BOOL bKeyDown; @@ -3509,7 +3557,7 @@ struct KEY_EVENT_RECORD { } DWORD dwControlKeyState; } -alias KEY_EVENT_RECORD *PKEY_EVENT_RECORD; +alias PKEY_EVENT_RECORD = KEY_EVENT_RECORD*; // // ControlKeyState flags @@ -3534,7 +3582,7 @@ struct MOUSE_EVENT_RECORD { DWORD dwControlKeyState; DWORD dwEventFlags; } -alias MOUSE_EVENT_RECORD *PMOUSE_EVENT_RECORD; +alias PMOUSE_EVENT_RECORD = MOUSE_EVENT_RECORD*; // // ButtonState flags @@ -3561,17 +3609,17 @@ enum struct WINDOW_BUFFER_SIZE_RECORD { COORD dwSize; } -alias WINDOW_BUFFER_SIZE_RECORD *PWINDOW_BUFFER_SIZE_RECORD; +alias PWINDOW_BUFFER_SIZE_RECORD = WINDOW_BUFFER_SIZE_RECORD*; struct MENU_EVENT_RECORD { UINT dwCommandId; } -alias MENU_EVENT_RECORD *PMENU_EVENT_RECORD; +alias PMENU_EVENT_RECORD = MENU_EVENT_RECORD*; struct FOCUS_EVENT_RECORD { BOOL bSetFocus; } -alias FOCUS_EVENT_RECORD *PFOCUS_EVENT_RECORD; +alias PFOCUS_EVENT_RECORD = FOCUS_EVENT_RECORD*; struct INPUT_RECORD { WORD EventType; @@ -3583,7 +3631,7 @@ struct INPUT_RECORD { FOCUS_EVENT_RECORD FocusEvent; } } -alias INPUT_RECORD *PINPUT_RECORD; +alias PINPUT_RECORD = INPUT_RECORD*; // // EventType flags: @@ -3605,7 +3653,7 @@ struct CHAR_INFO { } WORD Attributes; } -alias CHAR_INFO *PCHAR_INFO; +alias PCHAR_INFO = CHAR_INFO*; // // Attributes flags: @@ -3630,13 +3678,13 @@ struct CONSOLE_SCREEN_BUFFER_INFO { SMALL_RECT srWindow; COORD dwMaximumWindowSize; } -alias CONSOLE_SCREEN_BUFFER_INFO *PCONSOLE_SCREEN_BUFFER_INFO; +alias PCONSOLE_SCREEN_BUFFER_INFO = CONSOLE_SCREEN_BUFFER_INFO*; struct CONSOLE_CURSOR_INFO { DWORD dwSize; BOOL bVisible; } -alias CONSOLE_CURSOR_INFO *PCONSOLE_CURSOR_INFO; +alias PCONSOLE_CURSOR_INFO = CONSOLE_CURSOR_INFO*; enum { @@ -3709,7 +3757,7 @@ UINT GetConsoleOutputCP(); BOOL SetConsoleOutputCP(UINT wCodePageID); } -alias BOOL function(DWORD CtrlType) PHANDLER_ROUTINE; +alias PHANDLER_ROUTINE = BOOL function(DWORD CtrlType); enum { @@ -3860,8 +3908,8 @@ struct STARTUPINFO_W HANDLE hStdError; } -alias STARTUPINFO *LPSTARTUPINFO; -alias STARTUPINFO_W *LPSTARTUPINFO_W; +alias LPSTARTUPINFO = STARTUPINFO*; +alias LPSTARTUPINFO_W = STARTUPINFO_W*; struct PROCESS_INFORMATION { @@ -3871,7 +3919,7 @@ struct PROCESS_INFORMATION DWORD dwThreadId; } -alias PROCESS_INFORMATION *LPPROCESS_INFORMATION; +alias LPPROCESS_INFORMATION = PROCESS_INFORMATION*; export @nogc { diff --git a/src/core/thread.d b/src/core/thread.d index 7b13083652..7b88aff26e 100644 --- a/src/core/thread.d +++ b/src/core/thread.d @@ -1,4 +1,4 @@ -/** +/** * The thread module provides support for thread creation and management. * * Copyright: Copyright Sean Kelly 2005 - 2012. @@ -52,11 +52,11 @@ version = StackGrowsDown; */ version(Posix) { - alias core.sys.posix.unistd.getpid getpid; + alias getpid = core.sys.posix.unistd.getpid; } else version (Windows) { - alias core.sys.windows.windows.GetCurrentProcessId getpid; + alias getpid = core.sys.windows.windows.GetCurrentProcessId; } @@ -139,7 +139,7 @@ private extern (C) void rt_moduleTlsCtor(); extern (C) void rt_moduleTlsDtor(); - alias void delegate() gc_atom; + alias gc_atom = void delegate(); extern (C) void function(scope gc_atom) gc_atomic; } @@ -161,7 +161,7 @@ version( Windows ) const DWORD TLS_OUT_OF_INDEXES = 0xFFFFFFFF; const CREATE_SUSPENDED = 0x00000004; - extern (Windows) alias uint function(void*) btex_fptr; + extern (Windows) alias btex_fptr = uint function(void*); extern (C) uintptr_t _beginthreadex(void*, uint, btex_fptr, void*, uint, uint*); // @@ -1332,13 +1332,13 @@ private: // version( Windows ) { - alias uint TLSKey; - alias uint ThreadAddr; + alias TLSKey = uint; + alias ThreadAddr = uint; } else version( Posix ) { - alias pthread_key_t TLSKey; - alias pthread_t ThreadAddr; + alias TLSKey = pthread_key_t; + alias ThreadAddr = pthread_t; } @@ -2699,8 +2699,8 @@ enum ScanType tls, /// TLS data is being scanned. } -alias void delegate(void*, void*) nothrow ScanAllThreadsFn; /// The scanning function. -alias void delegate(ScanType, void*, void*) nothrow ScanAllThreadsTypeFn; /// ditto +alias ScanAllThreadsFn = void delegate(void*, void*) nothrow; /// The scanning function. +alias ScanAllThreadsTypeFn = void delegate(ScanType, void*, void*) nothrow; /// ditto /** * The main entry point for garbage collection. The supplied delegate @@ -2986,7 +2986,7 @@ enum IsMarked : int unknown, /// Address is not managed by the GC. } -alias int delegate( void* addr ) nothrow IsMarkedDg; /// The isMarked callback function. +alias IsMarkedDg = int delegate( void* addr ) nothrow; /// The isMarked callback function. /** * This routine allows the runtime to process any special per-thread handling @@ -4426,7 +4426,7 @@ private: // Thus, it should not have any effects on OSes not implementing // exception chain verification. - alias void function() fp_t; // Actual signature not relevant. + alias fp_t = void function(); // Actual signature not relevant. static struct EXCEPTION_REGISTRATION { EXCEPTION_REGISTRATION* next; // sehChainEnd if last one. diff --git a/src/core/time.d b/src/core/time.d index 99cd6d0477..3288bc02b7 100644 --- a/src/core/time.d +++ b/src/core/time.d @@ -109,7 +109,7 @@ struct mach_timebase_info_data_t uint denom; } -alias mach_timebase_info_data_t* mach_timebase_info_t; +alias mach_timebase_info_t = mach_timebase_info_data_t*; kern_return_t mach_timebase_info(mach_timebase_info_t); @@ -1108,8 +1108,8 @@ public: static assert(!is(typeof(d.split("hnsecs", "seconds", "msecs")()))); static assert(!is(typeof(d.split("seconds", "hnecs", "msecs")()))); static assert(!is(typeof(d.split("seconds", "msecs", "msecs")()))); - alias _TypeTuple!("nsecs", "hnsecs", "usecs", "msecs", "seconds", - "minutes", "hours", "days", "weeks") timeStrs; + alias timeStrs = _TypeTuple!("nsecs", "hnsecs", "usecs", "msecs", "seconds", + "minutes", "hours", "days", "weeks"); foreach(i, str; timeStrs[1 .. $]) static assert(!is(typeof(d.split!(timeStrs[i - 1], str)()))); @@ -1613,7 +1613,7 @@ private: if (_hnsecs == 0) return "0 hnsecs"; - template TT(T...) { alias T TT; } + template TT(T...) { alias TT = T; } alias units = TT!("weeks", "days", "hours", "minutes", "seconds", "msecs", "usecs"); long hnsecs = _hnsecs; string res; uint pos; @@ -4351,7 +4351,7 @@ version(unittest) const(char)* numToStringz(long value) @safe pure nothrow /+ A copy of std.typecons.TypeTuple. +/ private template _TypeTuple(TList...) { - alias TList _TypeTuple; + alias _TypeTuple = TList; } diff --git a/src/core/vararg.d b/src/core/vararg.d index ba9397f379..5e1fad8066 100644 --- a/src/core/vararg.d +++ b/src/core/vararg.d @@ -21,7 +21,7 @@ version( X86 ) /** * The base vararg list type. */ - alias char* va_list; + alias va_list = char*; /** * This function initializes the supplied argument pointer for subsequent diff --git a/src/etc/linux/memoryerror.d b/src/etc/linux/memoryerror.d index 25d6714eca..4781b8e84f 100644 --- a/src/etc/linux/memoryerror.d +++ b/src/etc/linux/memoryerror.d @@ -124,7 +124,7 @@ private: __gshared sigaction_t old_sigaction; -alias typeof(ucontext_t.init.uc_mcontext.gregs[0]) RegType; +alias RegType = typeof(ucontext_t.init.uc_mcontext.gregs[0]); version (X86_64) { diff --git a/src/gc/bits.d b/src/gc/bits.d index 5d93ec8079..7e99b79153 100644 --- a/src/gc/bits.d +++ b/src/gc/bits.d @@ -35,7 +35,7 @@ else version (D_InlineAsm_X86) struct GCBits { - alias size_t wordtype; + alias wordtype = size_t; enum BITS_PER_WORD = (wordtype.sizeof * 8); enum BITS_SHIFT = (wordtype.sizeof == 8 ? 6 : 5); diff --git a/src/gc/gc.d b/src/gc/gc.d index e7c6ebf80e..e289bf0f83 100644 --- a/src/gc/gc.d +++ b/src/gc/gc.d @@ -129,7 +129,7 @@ private } -alias GC gc_t; +alias gc_t = GC; /* ======================= Leak Detector =========================== */ @@ -1367,7 +1367,7 @@ enum } -alias ubyte Bins; +alias Bins = ubyte; struct List diff --git a/src/gc/os.d b/src/gc/os.d index 7a8ec41cfe..0a1bc22920 100644 --- a/src/gc/os.d +++ b/src/gc/os.d @@ -18,7 +18,7 @@ version (Windows) { import core.sys.windows.windows; - alias int pthread_t; + alias pthread_t = int; pthread_t pthread_self() nothrow { diff --git a/src/gc/proxy.d b/src/gc/proxy.d index d529e92e77..0e8753a678 100644 --- a/src/gc/proxy.d +++ b/src/gc/proxy.d @@ -22,9 +22,9 @@ private version = GCCLASS; version( GCCLASS ) - alias GC gc_t; + alias gc_t = GC; else - alias GC* gc_t; + alias gc_t = GC*; __gshared gc_t _gc; diff --git a/src/object_.d b/src/object_.d index 195f2c2c6d..3767ab3310 100644 --- a/src/object_.d +++ b/src/object_.d @@ -43,23 +43,23 @@ private version(D_LP64) { - alias ulong size_t; - alias long ptrdiff_t; + alias size_t = ulong; + alias ptrdiff_t = long; } else { - alias uint size_t; - alias int ptrdiff_t; + alias size_t = uint; + alias ptrdiff_t = int; } -alias ptrdiff_t sizediff_t; //For backwards compatibility only. +alias sizediff_t = ptrdiff_t; //For backwards compatibility only. -alias size_t hash_t; //For backwards compatibility only. -alias bool equals_t; //For backwards compatibility only. +alias hash_t = size_t; //For backwards compatibility only. +alias equals_t = bool; //For backwards compatibility only. -alias immutable(char)[] string; -alias immutable(wchar)[] wstring; -alias immutable(dchar)[] dstring; +alias string = immutable(char)[]; +alias wstring = immutable(wchar)[]; +alias dstring = immutable(dchar)[]; /** * All D class objects inherit from Object. @@ -192,7 +192,7 @@ struct Interface * or instance by using the .classinfo property. * A pointer to this appears as the first entry in the class's vtbl[]. */ -alias TypeInfo_Class Classinfo; +alias Classinfo = TypeInfo_Class; /** * Array of pairs giving the offset and type information for each @@ -736,7 +736,7 @@ class TypeInfo_Delegate : TypeInfo override @property size_t tsize() nothrow pure const { - alias int delegate() dg; + alias dg = int delegate(); return dg.sizeof; } @@ -747,7 +747,7 @@ class TypeInfo_Delegate : TypeInfo override @property size_t talign() nothrow pure const { - alias int delegate() dg; + alias dg = int delegate(); return dg.alignof; } @@ -894,7 +894,7 @@ class TypeInfo_Class : TypeInfo } } -alias TypeInfo_Class ClassInfo; +alias ClassInfo = TypeInfo_Class; class TypeInfo_Interface : TypeInfo { @@ -1396,7 +1396,7 @@ class Throwable : Object } -alias Throwable.TraceInfo function(void* ptr) TraceHandler; +alias TraceHandler = Throwable.TraceInfo function(void* ptr); private __gshared TraceHandler traceHandler = null; @@ -1757,8 +1757,8 @@ unittest // Monitor /////////////////////////////////////////////////////////////////////////////// -alias Object.Monitor IMonitor; -alias void delegate(Object) DEvent; +alias IMonitor = Object.Monitor; +alias DEvent = void delegate(Object); // NOTE: The dtor callback feature is only supported for monitors that are not // supplied by the user. The assumption is that any object with a user- @@ -2368,7 +2368,7 @@ pure nothrow unittest } deprecated("Please use destroy instead of clear.") -alias destroy clear; +alias clear = destroy; /++ Destroys the given object and puts it in an invalid state. It's used to diff --git a/src/rt/aApply.d b/src/rt/aApply.d index 9b6962f1c9..bcbc0b28da 100644 --- a/src/rt/aApply.d +++ b/src/rt/aApply.d @@ -21,7 +21,7 @@ private import rt.util.utf; /* 1 argument versions */ // dg is D, but _aApplycd() is C -extern (D) alias int delegate(void *) dg_t; +extern (D) alias dg_t = int delegate(void *); extern (C) int _aApplycd1(in char[] aa, dg_t dg) { int result; @@ -459,7 +459,7 @@ unittest /* 2 argument versions */ // dg is D, but _aApplycd2() is C -extern (D) alias int delegate(void *, void *) dg2_t; +extern (D) alias dg2_t = int delegate(void *, void *); extern (C) int _aApplycd2(in char[] aa, dg2_t dg) { int result; diff --git a/src/rt/aApplyR.d b/src/rt/aApplyR.d index 130fd2d555..4ba69fa5ac 100644 --- a/src/rt/aApplyR.d +++ b/src/rt/aApplyR.d @@ -26,7 +26,7 @@ private import rt.util.utf; /* 1 argument versions */ // dg is D, but _aApplyRcd() is C -extern (D) alias int delegate(void *) dg_t; +extern (D) alias dg_t = int delegate(void *); extern (C) int _aApplyRcd1(in char[] aa, dg_t dg) { int result; @@ -488,7 +488,7 @@ unittest /* 2 argument versions */ // dg is D, but _aApplyRcd2() is C -extern (D) alias int delegate(void *, void *) dg2_t; +extern (D) alias dg2_t = int delegate(void *, void *); extern (C) int _aApplyRcd2(in char[] aa, dg2_t dg) { int result; diff --git a/src/rt/aaA.d b/src/rt/aaA.d index cf4f139436..d4ddd54a22 100644 --- a/src/rt/aaA.d +++ b/src/rt/aaA.d @@ -49,7 +49,7 @@ static immutable size_t[] prime_list = [ * Although DMD will return types of Array in registers, * gcc will not, so we instead use a 'long'. */ -alias void[] ArrayRet_t; +alias ArrayRet_t = void[]; struct Array { @@ -533,7 +533,7 @@ unittest // Test for Issue 10381 * 'apply' for associative arrays - to support foreach */ // dg is D, but _aaApply() is C -extern (D) alias int delegate(void *) dg_t; +extern (D) alias dg_t = int delegate(void *); int _aaApply(AA aa, in size_t keysize, dg_t dg) { @@ -559,7 +559,7 @@ int _aaApply(AA aa, in size_t keysize, dg_t dg) } // dg is D, but _aaApply2() is C -extern (D) alias int delegate(void *, void *) dg2_t; +extern (D) alias dg2_t = int delegate(void *, void *); int _aaApply2(AA aa, in size_t keysize, dg2_t dg) { diff --git a/src/rt/arraydouble.d b/src/rt/arraydouble.d index 8c3fe68328..2ed2ab55f3 100644 --- a/src/rt/arraydouble.d +++ b/src/rt/arraydouble.d @@ -35,10 +35,10 @@ nothrow: } else { - alias core.cpuid.mmx mmx; - alias core.cpuid.sse sse; - alias core.cpuid.sse2 sse2; - alias core.cpuid.amd3dnow amd3dnow; + alias mmx = core.cpuid.mmx; + alias sse = core.cpuid.sse; + alias sse2 = core.cpuid.sse2; + alias amd3dnow = core.cpuid.amd3dnow; } //version = log; @@ -46,7 +46,7 @@ else /* Performance figures measured by Burton Radons */ -alias double T; +alias T = double; extern (C) @trusted nothrow: diff --git a/src/rt/arrayfloat.d b/src/rt/arrayfloat.d index 0df5639b22..c0d116100d 100644 --- a/src/rt/arrayfloat.d +++ b/src/rt/arrayfloat.d @@ -34,15 +34,15 @@ nothrow: } else { - alias core.cpuid.mmx mmx; - alias core.cpuid.sse sse; - alias core.cpuid.sse2 sse2; - alias core.cpuid.amd3dnow amd3dnow; + alias mmx = core.cpuid.mmx; + alias sse = core.cpuid.sse; + alias sse2 = core.cpuid.sse2; + alias amd3dnow = core.cpuid.amd3dnow; } //version = log; -alias float T; +alias T = float; extern (C) @trusted nothrow: diff --git a/src/rt/arrayint.d b/src/rt/arrayint.d index 7597e20a13..ec482cab88 100644 --- a/src/rt/arrayint.d +++ b/src/rt/arrayint.d @@ -52,25 +52,25 @@ else } else { - alias core.cpuid.mmx mmx; - alias core.cpuid.sse sse; - alias core.cpuid.sse2 sse2; + alias mmx = core.cpuid.mmx; + alias sse = core.cpuid.sse; + alias sse2 = core.cpuid.sse2; } - alias core.cpuid.sse3 sse3; - alias core.cpuid.sse41 sse41; - alias core.cpuid.sse42 sse42; - alias core.cpuid.sse4a sse4a; - alias core.cpuid.avx avx; - alias core.cpuid.avx2 avx2; - alias core.cpuid.amd3dnow amd3dnow; - alias core.cpuid.amd3dnowExt and3dnowExt; - alias core.cpuid.amdMmx amdMmx; - alias core.cpuid.has3dnowPrefetch has3dnowPrefetch; + alias sse3 = core.cpuid.sse3; + alias sse41 = core.cpuid.sse41; + alias sse42 = core.cpuid.sse42; + alias sse4a = core.cpuid.sse4a; + alias avx = core.cpuid.avx; + alias avx2 = core.cpuid.avx2; + alias amd3dnow = core.cpuid.amd3dnow; + alias and3dnowExt = core.cpuid.amd3dnowExt; + alias amdMmx = core.cpuid.amdMmx; + alias has3dnowPrefetch = core.cpuid.has3dnowPrefetch; } //version = log; -alias int T; +alias T = int; extern (C) @trusted nothrow: diff --git a/src/rt/arrayreal.d b/src/rt/arrayreal.d index 0201675470..78e9ca8840 100644 --- a/src/rt/arrayreal.d +++ b/src/rt/arrayreal.d @@ -34,15 +34,15 @@ nothrow: } else { - alias core.cpuid.mmx mmx; - alias core.cpuid.sse sse; - alias core.cpuid.sse2 sse2; - alias core.cpuid.amd3dnow amd3dnow; + alias mmx = core.cpuid.mmx; + alias sse = core.cpuid.sse; + alias sse2 = core.cpuid.sse2; + alias amd3dnow = core.cpuid.amd3dnow; } //version = log; -alias real T; +alias T = real; extern (C) @trusted nothrow: diff --git a/src/rt/arrayshort.d b/src/rt/arrayshort.d index 5073dc92fc..138f3152e2 100644 --- a/src/rt/arrayshort.d +++ b/src/rt/arrayshort.d @@ -35,15 +35,15 @@ nothrow: } else { - alias core.cpuid.mmx mmx; - alias core.cpuid.sse sse; - alias core.cpuid.sse2 sse2; - alias core.cpuid.sse2 sse2; + alias mmx = core.cpuid.mmx; + alias sse = core.cpuid.sse; + alias sse2 = core.cpuid.sse2; + alias sse2 = core.cpuid.sse2; } //version = log; -alias short T; +alias T = short; extern (C) @trusted nothrow: diff --git a/src/rt/deh_win32.d b/src/rt/deh_win32.d index a6e04cc52b..52d05c9186 100644 --- a/src/rt/deh_win32.d +++ b/src/rt/deh_win32.d @@ -153,7 +153,8 @@ struct CONTEXT { BYTE[MAXIMUM_SUPPORTED_EXTENSION] ExtendedRegisters; } -alias CONTEXT* PCONTEXT, LPCONTEXT; +alias PCONTEXT = CONTEXT*; +alias LPCONTEXT = CONTEXT*; struct EXCEPTION_RECORD { DWORD ExceptionCode; @@ -163,13 +164,15 @@ struct EXCEPTION_RECORD { DWORD NumberParameters; DWORD[EXCEPTION_MAXIMUM_PARAMETERS] ExceptionInformation; } -alias EXCEPTION_RECORD* PEXCEPTION_RECORD, LPEXCEPTION_RECORD; +alias PEXCEPTION_RECORD = EXCEPTION_RECORD*; +alias LPEXCEPTION_RECORD = EXCEPTION_RECORD*; struct EXCEPTION_POINTERS { PEXCEPTION_RECORD ExceptionRecord; PCONTEXT ContextRecord; } -alias EXCEPTION_POINTERS* PEXCEPTION_POINTERS, LPEXCEPTION_POINTERS; +alias PEXCEPTION_POINTERS = EXCEPTION_POINTERS*; +alias LPEXCEPTION_POINTERS = EXCEPTION_POINTERS*; enum EXCEPTION_UNWIND = 6; // Flag to indicate if the system is unwinding /+ Values used by Microsoft for Itanium and Win64 are: @@ -288,11 +291,11 @@ each function which uses exceptions. extern(C) { alias - EXCEPTION_DISPOSITION function ( + LanguageSpecificHandler = EXCEPTION_DISPOSITION function( EXCEPTION_RECORD *exceptionRecord, DEstablisherFrame *frame, CONTEXT *context, - void *dispatcherContext) LanguageSpecificHandler; + void *dispatcherContext); } @@ -564,7 +567,7 @@ EXCEPTION_DISPOSITION _d_framehandler( // Jump to catch block. Does not return. { uint catch_esp; - alias void function() fp_t; // generic function pointer + alias fp_t = void function(); // generic function pointer fp_t catch_addr = cast(fp_t)(pcb.code); catch_esp = regebp - handlerTable.espoffset - fp_t.sizeof; asm diff --git a/src/rt/deh_win64_posix.d b/src/rt/deh_win64_posix.d index 2efe3b4109..f4e33aac3a 100644 --- a/src/rt/deh_win64_posix.d +++ b/src/rt/deh_win64_posix.d @@ -29,7 +29,7 @@ extern (C) void _d_createTrace(Object o, void* context); } -alias int function() fp_t; // function pointer in ambient memory model +alias fp_t = int function(); // function pointer in ambient memory model // DHandlerInfo table is generated by except_gentables() in eh.c diff --git a/src/rt/dmain2.d b/src/rt/dmain2.d index fe584732c3..5fd8c8652c 100644 --- a/src/rt/dmain2.d +++ b/src/rt/dmain2.d @@ -66,9 +66,9 @@ extern (C) void gc_setProxy(void* p); void gc_clrProxy(); - alias void* function() gcGetFn; - alias void function(void*) gcSetFn; - alias void function() gcClrFn; + alias gcGetFn = void* function(); + alias gcSetFn = void function(void*); + alias gcClrFn = void function(); } version (Windows) @@ -137,7 +137,7 @@ extern(C) __gshared char[][] _d_main_args = null; // be fine to leave it as __gshared. extern (C) __gshared bool rt_trapExceptions = true; -alias void delegate(Throwable) ExceptionHandler; +alias ExceptionHandler = void delegate(Throwable); /** * Keep track of how often rt_init/rt_term were called. @@ -232,7 +232,7 @@ extern (C) CArgs rt_cArgs() * Its purpose is to wrap the D main() * function and catch any unhandled exceptions. */ -private alias extern(C) int function(char[][] args) MainFunc; +private alias MainFunc = extern(C) int function(char[][] args); extern (C) int _d_run_main(int argc, char **argv, MainFunc mainFunc) { @@ -505,7 +505,7 @@ private void printThrowable(Throwable t) auto user32 = LoadLibraryW("user32.dll"); if (user32) { - alias typeof(&MessageBoxW) PMessageBoxW; + alias PMessageBoxW = typeof(&MessageBoxW); auto pMessageBoxW = cast(PMessageBoxW) GetProcAddress(user32, "MessageBoxW"); if (pMessageBoxW) diff --git a/src/rt/lifetime.d b/src/rt/lifetime.d index a31f78f0e5..2d3f13d6e8 100644 --- a/src/rt/lifetime.d +++ b/src/rt/lifetime.d @@ -26,7 +26,7 @@ import core.exception : onOutOfMemoryError, onFinalizeError; private { - alias bool function(Object) CollectHandler; + alias CollectHandler = bool function(Object); __gshared CollectHandler collectHandler = null; extern (C) void _d_monitordelete(Object h, bool det); @@ -125,7 +125,7 @@ extern (C) void _d_delinterface(void** p) // used for deletion -private extern (D) alias void function (Object) fp_t; +private extern (D) alias fp_t = void function(Object); /** diff --git a/src/rt/monitor_.d b/src/rt/monitor_.d index 09317aceef..590ae2b0a7 100644 --- a/src/rt/monitor_.d +++ b/src/rt/monitor_.d @@ -44,8 +44,8 @@ private } // This is what the monitor reference in Object points to - alias Object.Monitor IMonitor; - alias void delegate(Object) DEvent; + alias IMonitor = Object.Monitor; + alias DEvent = void delegate(Object); version( Windows ) { diff --git a/src/rt/qsort.d b/src/rt/qsort.d index e0cef2db45..ed5009be19 100644 --- a/src/rt/qsort.d +++ b/src/rt/qsort.d @@ -20,7 +20,7 @@ private import core.stdc.stdlib; version (linux) { - alias extern (C) int function(const void *, const void *, void *) Cmp; + alias Cmp = extern(C) int function(const void *, const void *, void *); extern (C) void qsort_r(void *base, size_t nmemb, size_t size, Cmp cmp, void *arg); extern (C) void[] _adSort(void[] a, TypeInfo ti) @@ -35,7 +35,7 @@ version (linux) } else version (FreeBSD) { - alias extern (C) int function(void *, const void *, const void *) Cmp; + alias Cmp = extern(C) int function(void *, const void *, const void *); extern (C) void qsort_r(void *base, size_t nmemb, size_t size, void *thunk, Cmp cmp); extern (C) void[] _adSort(void[] a, TypeInfo ti) @@ -50,7 +50,7 @@ else version (FreeBSD) } else version (OSX) { - alias extern (C) int function(void *, const void *, const void *) Cmp; + alias Cmp = extern(C) int function(void *, const void *, const void *); extern (C) void qsort_r(void *base, size_t nmemb, size_t size, void *thunk, Cmp cmp); extern (C) void[] _adSort(void[] a, TypeInfo ti) diff --git a/src/rt/sections_android.d b/src/rt/sections_android.d index 0950cb96a8..c18c17346d 100644 --- a/src/rt/sections_android.d +++ b/src/rt/sections_android.d @@ -91,11 +91,12 @@ void scanTLSRanges(void[]* rng, scope void delegate(void* pbeg, void* pend) noth dg(rng.ptr, rng.ptr + rng.length); } -/* NOTE: The Bionic C library does not allow storing thread-local data - * in the normal .tbss/.tdata ELF sections. So instead we roll our - * own by simply putting tls into the non-tls .data/.bss sections - * and using the _tlsstart/_tlsend symbols as delimiters of the tls - * data. +/* NOTE: The Bionic C library ignores thread-local data stored in the normal + * .tbss/.tdata ELF sections, which are marked with the SHF_TLS/STT_TLS + * flags. So instead we roll our own by keeping TLS data in the + * .tdata/.tbss sections but removing the SHF_TLS/STT_TLS flags, and + * access the TLS data using this function and the _tlsstart/_tlsend + * symbols as delimiters. * * This function is called by the code emitted by the compiler. It * is expected to translate an address in the TLS static data to diff --git a/src/rt/sections_linux.d b/src/rt/sections_linux.d index 8d528d2923..7ed0fe133e 100644 --- a/src/rt/sections_linux.d +++ b/src/rt/sections_linux.d @@ -27,7 +27,7 @@ import rt.minfo; import rt.util.container.array; import rt.util.container.hashtab; -alias DSO SectionGroup; +alias SectionGroup = DSO; struct DSO { static int opApply(scope int delegate(ref DSO) dg) diff --git a/src/rt/tlsgc.d b/src/rt/tlsgc.d index e6da2e9a09..fd660d4457 100644 --- a/src/rt/tlsgc.d +++ b/src/rt/tlsgc.d @@ -53,7 +53,7 @@ void destroy(void* data) .free(data); } -alias void delegate(void* pstart, void* pend) nothrow ScanDg; +alias ScanDg = void delegate(void* pstart, void* pend) nothrow; /** * GC scan hook, called FOR each thread. Can be used to scan @@ -65,7 +65,7 @@ void scan(void* data, scope ScanDg dg) nothrow rt.sections.scanTLSRanges((cast(Data*)data).tlsRanges, dg); } -alias int delegate(void* addr) nothrow IsMarkedDg; +alias IsMarkedDg = int delegate(void* addr) nothrow; /** * GC sweep hook, called FOR each thread. Can be used to free diff --git a/src/rt/trace.d b/src/rt/trace.d index 59dfb85650..dae69f1987 100644 --- a/src/rt/trace.d +++ b/src/rt/trace.d @@ -23,12 +23,12 @@ private import rt.util.string; version (CRuntime_Microsoft) - alias core.stdc.stdlib._strtoui64 strtoull; + alias strtoull = core.stdc.stdlib._strtoui64; } extern (C): -alias long timer_t; +alias timer_t = long; ///////////////////////////////////// // diff --git a/src/rt/typeinfo/ti_delegate.d b/src/rt/typeinfo/ti_delegate.d index 0150e1058a..7c2b287ef8 100644 --- a/src/rt/typeinfo/ti_delegate.d +++ b/src/rt/typeinfo/ti_delegate.d @@ -17,7 +17,7 @@ private import rt.util.hash; // delegate -alias void delegate(int) dg; +alias dg = void delegate(int); class TypeInfo_D : TypeInfo { diff --git a/src/rt/util/container/array.d b/src/rt/util/container/array.d index 7c9c2127a6..089bac1e9e 100644 --- a/src/rt/util/container/array.d +++ b/src/rt/util/container/array.d @@ -76,7 +76,7 @@ struct Array(T) return _ptr[a .. b]; } - alias length opDollar; + alias opDollar = length; void insertBack()(auto ref T val) { diff --git a/src/rt/util/utf.d b/src/rt/util/utf.d index 28b1941ad9..f5b9463da7 100644 --- a/src/rt/util/utf.d +++ b/src/rt/util/utf.d @@ -731,7 +731,7 @@ wstring toUTF16(in char[] s) return cast(wstring)r; } -alias const(wchar)* wptr; +alias wptr = const(wchar)*; /** ditto */ wptr toUTF16z(in char[] s) {