+2019-03-26 Iain Buclaw <ibuclaw@gdcproject.org>
+
+ * libdruntime/Makefile.am (DRUNTIME_DSOURCES_DARWIN): Add
+ core/sys/darwin/crt_externs.d.
+ (DRUNTIME_DSOURCES_FREEBSD): Add core/sys/freebsd/unistd.d.
+ (DRUNTIME_DSOURCES_POSIX): Add core/sys/posix/spawn.d.
+ * libdruntime/Makefile.in: Regenerate.
+
2019-03-23 Johannes Pfau <johannespfau@gmail.com>
* configure.ac: Update autotool version comment.
-bbfb58e8a921cabdd0002a40bf63fe35ed7c77e8
+b9564bef1147c797842e6c1a804f2c3565c64ac1
The first line of this file holds the git revision number of the last
merge done from the dlang/druntime repository.
DRUNTIME_DSOURCES_BIONIC = core/sys/bionic/fcntl.d \
core/sys/bionic/unistd.d
-DRUNTIME_DSOURCES_DARWIN = core/sys/darwin/dlfcn.d \
- core/sys/darwin/execinfo.d core/sys/darwin/mach/dyld.d \
- core/sys/darwin/mach/getsect.d core/sys/darwin/mach/kern_return.d \
- core/sys/darwin/mach/loader.d core/sys/darwin/mach/port.d \
- core/sys/darwin/mach/semaphore.d core/sys/darwin/mach/thread_act.d \
- core/sys/darwin/netinet/in_.d core/sys/darwin/pthread.d \
- core/sys/darwin/sys/cdefs.d core/sys/darwin/sys/event.d \
- core/sys/darwin/sys/mman.d
+DRUNTIME_DSOURCES_DARWIN = core/sys/darwin/crt_externs.d \
+ core/sys/darwin/dlfcn.d core/sys/darwin/execinfo.d \
+ core/sys/darwin/mach/dyld.d core/sys/darwin/mach/getsect.d \
+ core/sys/darwin/mach/kern_return.d core/sys/darwin/mach/loader.d \
+ core/sys/darwin/mach/port.d core/sys/darwin/mach/semaphore.d \
+ core/sys/darwin/mach/thread_act.d core/sys/darwin/netinet/in_.d \
+ core/sys/darwin/pthread.d core/sys/darwin/sys/cdefs.d \
+ core/sys/darwin/sys/event.d core/sys/darwin/sys/mman.d
DRUNTIME_DSOURCES_DRAGONFLYBSD = core/sys/dragonflybsd/dlfcn.d \
core/sys/dragonflybsd/execinfo.d core/sys/dragonflybsd/netinet/in_.d \
core/sys/freebsd/sys/elf64.d core/sys/freebsd/sys/elf_common.d \
core/sys/freebsd/sys/event.d core/sys/freebsd/sys/link_elf.d \
core/sys/freebsd/sys/mman.d core/sys/freebsd/sys/mount.d \
- core/sys/freebsd/time.d
+ core/sys/freebsd/time.d core/sys/freebsd/unistd.d
DRUNTIME_DSOURCES_LINUX = core/sys/linux/config.d \
core/sys/linux/dlfcn.d core/sys/linux/elf.d core/sys/linux/epoll.d \
core/sys/posix/netinet/in_.d core/sys/posix/netinet/tcp.d \
core/sys/posix/poll.d core/sys/posix/pthread.d core/sys/posix/pwd.d \
core/sys/posix/sched.d core/sys/posix/semaphore.d \
- core/sys/posix/setjmp.d core/sys/posix/signal.d core/sys/posix/stdio.d \
- core/sys/posix/stdlib.d core/sys/posix/sys/filio.d \
- core/sys/posix/sys/ioccom.d core/sys/posix/sys/ioctl.d \
- core/sys/posix/sys/ipc.d core/sys/posix/sys/mman.d \
- core/sys/posix/sys/msg.d core/sys/posix/sys/resource.d \
- core/sys/posix/sys/select.d core/sys/posix/sys/shm.d \
- core/sys/posix/sys/socket.d core/sys/posix/sys/stat.d \
- core/sys/posix/sys/statvfs.d core/sys/posix/sys/time.d \
- core/sys/posix/sys/ttycom.d core/sys/posix/sys/types.d \
- core/sys/posix/sys/uio.d core/sys/posix/sys/un.d \
- core/sys/posix/sys/utsname.d core/sys/posix/sys/wait.d \
- core/sys/posix/syslog.d core/sys/posix/termios.d core/sys/posix/time.d \
+ core/sys/posix/setjmp.d core/sys/posix/signal.d core/sys/posix/spawn.d \
+ core/sys/posix/stdio.d core/sys/posix/stdlib.d \
+ core/sys/posix/sys/filio.d core/sys/posix/sys/ioccom.d \
+ core/sys/posix/sys/ioctl.d core/sys/posix/sys/ipc.d \
+ core/sys/posix/sys/mman.d core/sys/posix/sys/msg.d \
+ core/sys/posix/sys/resource.d core/sys/posix/sys/select.d \
+ core/sys/posix/sys/shm.d core/sys/posix/sys/socket.d \
+ core/sys/posix/sys/stat.d core/sys/posix/sys/statvfs.d \
+ core/sys/posix/sys/time.d core/sys/posix/sys/ttycom.d \
+ core/sys/posix/sys/types.d core/sys/posix/sys/uio.d \
+ core/sys/posix/sys/un.d core/sys/posix/sys/utsname.d \
+ core/sys/posix/sys/wait.d core/sys/posix/syslog.d \
+ core/sys/posix/termios.d core/sys/posix/time.d \
core/sys/posix/ucontext.d core/sys/posix/unistd.d \
core/sys/posix/utime.d
core/sys/posix/pthread.lo core/sys/posix/pwd.lo \
core/sys/posix/sched.lo core/sys/posix/semaphore.lo \
core/sys/posix/setjmp.lo core/sys/posix/signal.lo \
- core/sys/posix/stdio.lo core/sys/posix/stdlib.lo \
- core/sys/posix/sys/filio.lo core/sys/posix/sys/ioccom.lo \
- core/sys/posix/sys/ioctl.lo core/sys/posix/sys/ipc.lo \
- core/sys/posix/sys/mman.lo core/sys/posix/sys/msg.lo \
- core/sys/posix/sys/resource.lo core/sys/posix/sys/select.lo \
- core/sys/posix/sys/shm.lo core/sys/posix/sys/socket.lo \
- core/sys/posix/sys/stat.lo core/sys/posix/sys/statvfs.lo \
- core/sys/posix/sys/time.lo core/sys/posix/sys/ttycom.lo \
- core/sys/posix/sys/types.lo core/sys/posix/sys/uio.lo \
- core/sys/posix/sys/un.lo core/sys/posix/sys/utsname.lo \
- core/sys/posix/sys/wait.lo core/sys/posix/syslog.lo \
- core/sys/posix/termios.lo core/sys/posix/time.lo \
- core/sys/posix/ucontext.lo core/sys/posix/unistd.lo \
- core/sys/posix/utime.lo
+ core/sys/posix/spawn.lo core/sys/posix/stdio.lo \
+ core/sys/posix/stdlib.lo core/sys/posix/sys/filio.lo \
+ core/sys/posix/sys/ioccom.lo core/sys/posix/sys/ioctl.lo \
+ core/sys/posix/sys/ipc.lo core/sys/posix/sys/mman.lo \
+ core/sys/posix/sys/msg.lo core/sys/posix/sys/resource.lo \
+ core/sys/posix/sys/select.lo core/sys/posix/sys/shm.lo \
+ core/sys/posix/sys/socket.lo core/sys/posix/sys/stat.lo \
+ core/sys/posix/sys/statvfs.lo core/sys/posix/sys/time.lo \
+ core/sys/posix/sys/ttycom.lo core/sys/posix/sys/types.lo \
+ core/sys/posix/sys/uio.lo core/sys/posix/sys/un.lo \
+ core/sys/posix/sys/utsname.lo core/sys/posix/sys/wait.lo \
+ core/sys/posix/syslog.lo core/sys/posix/termios.lo \
+ core/sys/posix/time.lo core/sys/posix/ucontext.lo \
+ core/sys/posix/unistd.lo core/sys/posix/utime.lo
@DRUNTIME_OS_UNIX_TRUE@am__objects_7 = $(am__objects_6)
-am__objects_8 = core/sys/darwin/dlfcn.lo core/sys/darwin/execinfo.lo \
+am__objects_8 = core/sys/darwin/crt_externs.lo \
+ core/sys/darwin/dlfcn.lo core/sys/darwin/execinfo.lo \
core/sys/darwin/mach/dyld.lo core/sys/darwin/mach/getsect.lo \
core/sys/darwin/mach/kern_return.lo \
core/sys/darwin/mach/loader.lo core/sys/darwin/mach/port.lo \
core/sys/freebsd/sys/elf_common.lo \
core/sys/freebsd/sys/event.lo core/sys/freebsd/sys/link_elf.lo \
core/sys/freebsd/sys/mman.lo core/sys/freebsd/sys/mount.lo \
- core/sys/freebsd/time.lo
+ core/sys/freebsd/time.lo core/sys/freebsd/unistd.lo
@DRUNTIME_OS_FREEBSD_TRUE@am__objects_15 = $(am__objects_14)
am__objects_16 = core/sys/netbsd/dlfcn.lo core/sys/netbsd/execinfo.lo \
core/sys/netbsd/sys/elf.lo core/sys/netbsd/sys/elf32.lo \
core/sys/posix/pthread.t.lo core/sys/posix/pwd.t.lo \
core/sys/posix/sched.t.lo core/sys/posix/semaphore.t.lo \
core/sys/posix/setjmp.t.lo core/sys/posix/signal.t.lo \
- core/sys/posix/stdio.t.lo core/sys/posix/stdlib.t.lo \
- core/sys/posix/sys/filio.t.lo core/sys/posix/sys/ioccom.t.lo \
- core/sys/posix/sys/ioctl.t.lo core/sys/posix/sys/ipc.t.lo \
- core/sys/posix/sys/mman.t.lo core/sys/posix/sys/msg.t.lo \
- core/sys/posix/sys/resource.t.lo \
+ core/sys/posix/spawn.t.lo core/sys/posix/stdio.t.lo \
+ core/sys/posix/stdlib.t.lo core/sys/posix/sys/filio.t.lo \
+ core/sys/posix/sys/ioccom.t.lo core/sys/posix/sys/ioctl.t.lo \
+ core/sys/posix/sys/ipc.t.lo core/sys/posix/sys/mman.t.lo \
+ core/sys/posix/sys/msg.t.lo core/sys/posix/sys/resource.t.lo \
core/sys/posix/sys/select.t.lo core/sys/posix/sys/shm.t.lo \
core/sys/posix/sys/socket.t.lo core/sys/posix/sys/stat.t.lo \
core/sys/posix/sys/statvfs.t.lo core/sys/posix/sys/time.t.lo \
core/sys/posix/time.t.lo core/sys/posix/ucontext.t.lo \
core/sys/posix/unistd.t.lo core/sys/posix/utime.t.lo
@DRUNTIME_OS_UNIX_TRUE@am__DEPENDENCIES_8 = $(am__DEPENDENCIES_7)
-am__DEPENDENCIES_9 = core/sys/darwin/dlfcn.t.lo \
- core/sys/darwin/execinfo.t.lo core/sys/darwin/mach/dyld.t.lo \
+am__DEPENDENCIES_9 = core/sys/darwin/crt_externs.t.lo \
+ core/sys/darwin/dlfcn.t.lo core/sys/darwin/execinfo.t.lo \
+ core/sys/darwin/mach/dyld.t.lo \
core/sys/darwin/mach/getsect.t.lo \
core/sys/darwin/mach/kern_return.t.lo \
core/sys/darwin/mach/loader.t.lo \
core/sys/freebsd/sys/event.t.lo \
core/sys/freebsd/sys/link_elf.t.lo \
core/sys/freebsd/sys/mman.t.lo core/sys/freebsd/sys/mount.t.lo \
- core/sys/freebsd/time.t.lo
+ core/sys/freebsd/time.t.lo core/sys/freebsd/unistd.t.lo
@DRUNTIME_OS_FREEBSD_TRUE@am__DEPENDENCIES_16 = \
@DRUNTIME_OS_FREEBSD_TRUE@ $(am__DEPENDENCIES_15)
am__DEPENDENCIES_17 = core/sys/netbsd/dlfcn.t.lo \
core/sys/posix/poll.t.o core/sys/posix/pthread.t.o \
core/sys/posix/pwd.t.o core/sys/posix/sched.t.o \
core/sys/posix/semaphore.t.o core/sys/posix/setjmp.t.o \
- core/sys/posix/signal.t.o core/sys/posix/stdio.t.o \
- core/sys/posix/stdlib.t.o core/sys/posix/sys/filio.t.o \
- core/sys/posix/sys/ioccom.t.o core/sys/posix/sys/ioctl.t.o \
- core/sys/posix/sys/ipc.t.o core/sys/posix/sys/mman.t.o \
- core/sys/posix/sys/msg.t.o core/sys/posix/sys/resource.t.o \
- core/sys/posix/sys/select.t.o core/sys/posix/sys/shm.t.o \
- core/sys/posix/sys/socket.t.o core/sys/posix/sys/stat.t.o \
- core/sys/posix/sys/statvfs.t.o core/sys/posix/sys/time.t.o \
- core/sys/posix/sys/ttycom.t.o core/sys/posix/sys/types.t.o \
- core/sys/posix/sys/uio.t.o core/sys/posix/sys/un.t.o \
- core/sys/posix/sys/utsname.t.o core/sys/posix/sys/wait.t.o \
- core/sys/posix/syslog.t.o core/sys/posix/termios.t.o \
- core/sys/posix/time.t.o core/sys/posix/ucontext.t.o \
- core/sys/posix/unistd.t.o core/sys/posix/utime.t.o
+ core/sys/posix/signal.t.o core/sys/posix/spawn.t.o \
+ core/sys/posix/stdio.t.o core/sys/posix/stdlib.t.o \
+ core/sys/posix/sys/filio.t.o core/sys/posix/sys/ioccom.t.o \
+ core/sys/posix/sys/ioctl.t.o core/sys/posix/sys/ipc.t.o \
+ core/sys/posix/sys/mman.t.o core/sys/posix/sys/msg.t.o \
+ core/sys/posix/sys/resource.t.o core/sys/posix/sys/select.t.o \
+ core/sys/posix/sys/shm.t.o core/sys/posix/sys/socket.t.o \
+ core/sys/posix/sys/stat.t.o core/sys/posix/sys/statvfs.t.o \
+ core/sys/posix/sys/time.t.o core/sys/posix/sys/ttycom.t.o \
+ core/sys/posix/sys/types.t.o core/sys/posix/sys/uio.t.o \
+ core/sys/posix/sys/un.t.o core/sys/posix/sys/utsname.t.o \
+ core/sys/posix/sys/wait.t.o core/sys/posix/syslog.t.o \
+ core/sys/posix/termios.t.o core/sys/posix/time.t.o \
+ core/sys/posix/ucontext.t.o core/sys/posix/unistd.t.o \
+ core/sys/posix/utime.t.o
@DRUNTIME_OS_UNIX_TRUE@am__DEPENDENCIES_36 = $(am__DEPENDENCIES_35)
-am__DEPENDENCIES_37 = core/sys/darwin/dlfcn.t.o \
- core/sys/darwin/execinfo.t.o core/sys/darwin/mach/dyld.t.o \
- core/sys/darwin/mach/getsect.t.o \
+am__DEPENDENCIES_37 = core/sys/darwin/crt_externs.t.o \
+ core/sys/darwin/dlfcn.t.o core/sys/darwin/execinfo.t.o \
+ core/sys/darwin/mach/dyld.t.o core/sys/darwin/mach/getsect.t.o \
core/sys/darwin/mach/kern_return.t.o \
core/sys/darwin/mach/loader.t.o core/sys/darwin/mach/port.t.o \
core/sys/darwin/mach/semaphore.t.o \
core/sys/freebsd/sys/event.t.o \
core/sys/freebsd/sys/link_elf.t.o \
core/sys/freebsd/sys/mman.t.o core/sys/freebsd/sys/mount.t.o \
- core/sys/freebsd/time.t.o
+ core/sys/freebsd/time.t.o core/sys/freebsd/unistd.t.o
@DRUNTIME_OS_FREEBSD_TRUE@am__DEPENDENCIES_44 = \
@DRUNTIME_OS_FREEBSD_TRUE@ $(am__DEPENDENCIES_43)
am__DEPENDENCIES_45 = core/sys/netbsd/dlfcn.t.o \
DRUNTIME_DSOURCES_BIONIC = core/sys/bionic/fcntl.d \
core/sys/bionic/unistd.d
-DRUNTIME_DSOURCES_DARWIN = core/sys/darwin/dlfcn.d \
- core/sys/darwin/execinfo.d core/sys/darwin/mach/dyld.d \
- core/sys/darwin/mach/getsect.d core/sys/darwin/mach/kern_return.d \
- core/sys/darwin/mach/loader.d core/sys/darwin/mach/port.d \
- core/sys/darwin/mach/semaphore.d core/sys/darwin/mach/thread_act.d \
- core/sys/darwin/netinet/in_.d core/sys/darwin/pthread.d \
- core/sys/darwin/sys/cdefs.d core/sys/darwin/sys/event.d \
- core/sys/darwin/sys/mman.d
+DRUNTIME_DSOURCES_DARWIN = core/sys/darwin/crt_externs.d \
+ core/sys/darwin/dlfcn.d core/sys/darwin/execinfo.d \
+ core/sys/darwin/mach/dyld.d core/sys/darwin/mach/getsect.d \
+ core/sys/darwin/mach/kern_return.d core/sys/darwin/mach/loader.d \
+ core/sys/darwin/mach/port.d core/sys/darwin/mach/semaphore.d \
+ core/sys/darwin/mach/thread_act.d core/sys/darwin/netinet/in_.d \
+ core/sys/darwin/pthread.d core/sys/darwin/sys/cdefs.d \
+ core/sys/darwin/sys/event.d core/sys/darwin/sys/mman.d
DRUNTIME_DSOURCES_DRAGONFLYBSD = core/sys/dragonflybsd/dlfcn.d \
core/sys/dragonflybsd/execinfo.d core/sys/dragonflybsd/netinet/in_.d \
core/sys/freebsd/sys/elf64.d core/sys/freebsd/sys/elf_common.d \
core/sys/freebsd/sys/event.d core/sys/freebsd/sys/link_elf.d \
core/sys/freebsd/sys/mman.d core/sys/freebsd/sys/mount.d \
- core/sys/freebsd/time.d
+ core/sys/freebsd/time.d core/sys/freebsd/unistd.d
DRUNTIME_DSOURCES_LINUX = core/sys/linux/config.d \
core/sys/linux/dlfcn.d core/sys/linux/elf.d core/sys/linux/epoll.d \
core/sys/posix/netinet/in_.d core/sys/posix/netinet/tcp.d \
core/sys/posix/poll.d core/sys/posix/pthread.d core/sys/posix/pwd.d \
core/sys/posix/sched.d core/sys/posix/semaphore.d \
- core/sys/posix/setjmp.d core/sys/posix/signal.d core/sys/posix/stdio.d \
- core/sys/posix/stdlib.d core/sys/posix/sys/filio.d \
- core/sys/posix/sys/ioccom.d core/sys/posix/sys/ioctl.d \
- core/sys/posix/sys/ipc.d core/sys/posix/sys/mman.d \
- core/sys/posix/sys/msg.d core/sys/posix/sys/resource.d \
- core/sys/posix/sys/select.d core/sys/posix/sys/shm.d \
- core/sys/posix/sys/socket.d core/sys/posix/sys/stat.d \
- core/sys/posix/sys/statvfs.d core/sys/posix/sys/time.d \
- core/sys/posix/sys/ttycom.d core/sys/posix/sys/types.d \
- core/sys/posix/sys/uio.d core/sys/posix/sys/un.d \
- core/sys/posix/sys/utsname.d core/sys/posix/sys/wait.d \
- core/sys/posix/syslog.d core/sys/posix/termios.d core/sys/posix/time.d \
+ core/sys/posix/setjmp.d core/sys/posix/signal.d core/sys/posix/spawn.d \
+ core/sys/posix/stdio.d core/sys/posix/stdlib.d \
+ core/sys/posix/sys/filio.d core/sys/posix/sys/ioccom.d \
+ core/sys/posix/sys/ioctl.d core/sys/posix/sys/ipc.d \
+ core/sys/posix/sys/mman.d core/sys/posix/sys/msg.d \
+ core/sys/posix/sys/resource.d core/sys/posix/sys/select.d \
+ core/sys/posix/sys/shm.d core/sys/posix/sys/socket.d \
+ core/sys/posix/sys/stat.d core/sys/posix/sys/statvfs.d \
+ core/sys/posix/sys/time.d core/sys/posix/sys/ttycom.d \
+ core/sys/posix/sys/types.d core/sys/posix/sys/uio.d \
+ core/sys/posix/sys/un.d core/sys/posix/sys/utsname.d \
+ core/sys/posix/sys/wait.d core/sys/posix/syslog.d \
+ core/sys/posix/termios.d core/sys/posix/time.d \
core/sys/posix/ucontext.d core/sys/posix/unistd.d \
core/sys/posix/utime.d
core/sys/posix/semaphore.lo: core/sys/posix/$(am__dirstamp)
core/sys/posix/setjmp.lo: core/sys/posix/$(am__dirstamp)
core/sys/posix/signal.lo: core/sys/posix/$(am__dirstamp)
+core/sys/posix/spawn.lo: core/sys/posix/$(am__dirstamp)
core/sys/posix/stdio.lo: core/sys/posix/$(am__dirstamp)
core/sys/posix/stdlib.lo: core/sys/posix/$(am__dirstamp)
core/sys/posix/sys/$(am__dirstamp):
core/sys/darwin/$(am__dirstamp):
@$(MKDIR_P) core/sys/darwin
@: > core/sys/darwin/$(am__dirstamp)
+core/sys/darwin/crt_externs.lo: core/sys/darwin/$(am__dirstamp)
core/sys/darwin/dlfcn.lo: core/sys/darwin/$(am__dirstamp)
core/sys/darwin/execinfo.lo: core/sys/darwin/$(am__dirstamp)
core/sys/darwin/mach/$(am__dirstamp):
core/sys/freebsd/sys/mman.lo: core/sys/freebsd/sys/$(am__dirstamp)
core/sys/freebsd/sys/mount.lo: core/sys/freebsd/sys/$(am__dirstamp)
core/sys/freebsd/time.lo: core/sys/freebsd/$(am__dirstamp)
+core/sys/freebsd/unistd.lo: core/sys/freebsd/$(am__dirstamp)
core/sys/netbsd/$(am__dirstamp):
@$(MKDIR_P) core/sys/netbsd
@: > core/sys/netbsd/$(am__dirstamp)
alias errno = __errno_location;
}
}
+else version (OpenBSD)
+{
+ // https://github.com/openbsd/src/blob/master/include/errno.h
+ extern (C)
+ {
+ ref int __errno();
+ alias errno = __errno;
+ }
+}
+else version (NetBSD)
+{
+ // https://github.com/NetBSD/src/blob/trunk/include/errno.h
+ extern (C)
+ {
+ ref int __errno();
+ alias errno = __errno;
+ }
+}
else version (FreeBSD)
{
extern (C)
}
else version (DragonFlyBSD)
{
- pragma(mangle, "errno") extern int __errno;
- ref int errno() { return __errno;}
+ extern (C)
+ {
+ pragma(mangle, "errno") int __errno;
+ ref int __error() {
+ return __errno;
+ }
+ alias errno = __error;
+ }
}
else version (CRuntime_Bionic)
{
alias uint fexcept_t;
}
+ else version (X86_64)
+ {
+ struct fenv_t
+ {
+ struct _x87
+ {
+ uint __control;
+ uint __status;
+ uint __tag;
+ uint[4] __others;
+ }
+ _x87 __x87;
+
+ uint __mxcsr;
+ }
+
+ alias uint fexcept_t;
+ }
else
{
static assert(false, "Architecture not supported.");
int _old_offset;
ushort _cur_column;
byte _vtable_offset;
- char[1] _shortbuf;
+ char[1] _shortbuf = 0;
void* _lock;
}
{
union fpos_t
{
- char[16] __opaque;
+ char[16] __opaque = 0;
double __align;
}
struct _IO_FILE;
int function(void *) _flush;
/* Formerly used by fgetln/fgetwln; kept for binary compatibility */
- char[__sbuf.sizeof - _flush.sizeof] _lb_unused;
+ char[__sbuf.sizeof - _flush.sizeof] _lb_unused = void;
int _blksize;
char* _ptr;
int _cnt;
char* _base;
- char _flag;
- char _magic;
+ char _flag = 0;
+ char _magic = 0;
ushort __flags; // __orientation:2
// __ionolock:1
// __seekable:1
struct __STDIO_FILE_STRUCT
{
ushort __modeflags;
- char[2] __ungot_width;
+ char[2] __ungot_width = 0;
int __filedes;
char* __bufstart;
char* __bufend;
__STDIO_FILE_STRUCT* __nextopen;
void *__cookie;
_IO_cookie_io_functions_t __gcs;
- wchar_t[2] __ungot;
+ wchar_t[2] __ungot = 0;
mbstate_t __state;
void *__unused;
int __user_locking;
int __count;
union ___value
{
- wint_t __wch;
+ wint_t __wch = 0;
char[4] __wchb;
}
___value __value;
///
union __mbstate_t
{
- char[128] __mbstate8;
+ char[128] __mbstate8 = 0;
int64_t __mbstateL;
}
///
struct mbstate_t
{
- wchar_t __mask;
- wchar_t __wc;
+ wchar_t __mask = 0;
+ wchar_t __wc = 0;
}
}
else
// by checking that locking is not possible. This assumes
// that the underlying implementation is well behaved
// and makes the object non-lockable upon destruction.
- // For example, Bionic doesn't appear to do so, so this test is
- // not run on Android.
+ // The Bionic and Musl C runtimes and DragonFly don't appear to do so, so skip this test.
version (CRuntime_Bionic) {} else
+ version (CRuntime_Musl) {} else
+ version (DragonFlyBSD) {} else
assert(!mtx.tryLock_nothrow());
free(cast(void*) mtx);
--- /dev/null
+/**
+ * D header file for $(LINK2 https://opensource.apple.com/source/Libc/Libc-1244.30.3/include/crt_externs.h.auto.html, libc/crt_externs.h).
+ *
+ * Copyright: Copyright (c) 2018 D Language Foundation
+ * License: $(HTTP www.boost.org/LICENSE_1_0.txt, Boost License 1.0).
+ * Authors: Jacob Carlborg
+ * Source: $(DRUNTIMESRC core/sys/darwin/_crt_externs.d)
+ */
+module core.sys.darwin.crt_externs;
+
+version (CoreDoc)
+{
+ /**
+ * In reality this will be $(REF mach_header, core, sys, darwin, mach, loader)
+ * on 32-bit platforms and $(REF mach_header_64, core, sys, darwin, mach, loader)
+ * 64-bit platforms.
+ */
+ struct MachHeader;
+
+ /**
+ * Returns the program arguments.
+ *
+ * These are the same arguments passed to the C main function:
+ *
+ * ___
+ * extern (C) void main (char** argv, int argc, char** envp) {}
+ * ___
+ *
+ * Same as the above `argv`.
+ *
+ * Return: the program arguments as a pointer to an array of null terminated C
+ * strings
+ */
+ char*** _NSGetArgv();
+
+ /**
+ * Returns the number of program arguments.
+ *
+ * These are the same arguments passed to the C main function:
+ *
+ * ___
+ * extern (C) void main (char** argv, int argc, char** envp) {}
+ * ___
+ *
+ * Same as the above `argc`.
+ *
+ * Return: a pointer to the number of program arguments
+ */
+ int* _NSGetArgc();
+
+ /**
+ * Returns the program environment variables.
+ *
+ * These are the same arguments passed as an array to the C main function:
+ *
+ * ___
+ * extern (C) void main (char** argv, int argc, char** envp) {}
+ * ___
+ *
+ * Same as the above `envp`.
+ *
+ * Return: the program environment variables as a pointer to an array of null
+ * terminated C strings
+ */
+ char*** _NSGetEnviron();
+
+ /**
+ * Returns the full path to the current executable as a pointer to a null
+ * terminated C string.
+ */
+ char** _NSGetProgname();
+
+ /// Returns the Mach-O header of the current executable.
+ MachHeader* _NSGetMachExecuteHeader();
+}
+
+else version (OSX)
+ version = Darwin;
+else version (iOS)
+ version = Darwin;
+else version (TVOS)
+ version = Darwin;
+else version (WatchOS)
+ version = Darwin;
+
+version (Darwin):
+extern(C):
+nothrow:
+@nogc:
+
+import core.sys.darwin.mach.loader : mach_header, mach_header_64;
+
+char*** _NSGetArgv();
+int* _NSGetArgc();
+char*** _NSGetEnviron();
+char** _NSGetProgname();
+
+version (D_LP64)
+ mach_header_64* _NSGetMachExecuteHeader();
+else
+ mach_header* _NSGetMachExecuteHeader();
* Params:
* mhp = the mach header to get the section from
* segname = the name of the segment
- * sectname = the name of the section
+ * section = the name of the section
* fSwap = ?
*
* Returns: a pointer to the section structure or `null` if it doesn't exist
uint cmdsize;
/// The name of this segment.
- char[16] segname;
+ char[16] segname = 0;
/// Memory address of this segment.
uint vmaddr;
uint cmdsize;
/// The name of this segment.
- char[16] segname;
+ char[16] segname = 0;
/// Memory address of this segment.
long vmaddr;
struct section
{
/// The name of this this section.
- char[16] sectname;
+ char[16] sectname = 0;
/// The name of the segment this section belongs to.
- char[16] segname;
+ char[16] segname = 0;
/// The memory address of this section.
uint addr;
struct section_64
{
/// The name of this this section.
- char[16] sectname;
+ char[16] sectname = 0;
/// The name of the segment this section belongs to.
- char[16] segname;
+ char[16] segname = 0;
/// The memory address of this section.
ulong addr;
{
uint cmd;
uint cmdsize;
- char[16] segname;
+ char[16] segname = 0;
uint vmaddr;
uint vmsize;
uint fileoff;
{
uint cmd;
uint cmdsize;
- char[16] segname;
+ char[16] segname = 0;
long vmaddr;
long vmsize;
long fileoff;
struct section
{
- char[16] sectname;
- char[16] segname;
+ char[16] sectname = 0;
+ char[16] segname = 0;
uint addr;
uint size;
uint offset;
struct section_64
{
- char[16] sectname;
- char[16] segname;
+ char[16] sectname = 0;
+ char[16] segname = 0;
ulong addr;
ulong size;
uint offset;
struct ip_opts
{
in_addr ip_dst;
- char[40] ip_opts;
+ char[40] ip_opts = 0;
};
enum IP_OPTIONS = 1;
struct Elf32_Ehdr
{
- char[EI_NIDENT] e_ident;
+ char[EI_NIDENT] e_ident = 0;
Elf32_Half e_type;
Elf32_Half e_machine;
Elf32_Word e_version;
struct Elf64_Ehdr
{
- char[EI_NIDENT] e_ident;
+ char[EI_NIDENT] e_ident = 0;
Elf64_Half e_type;
Elf64_Half e_machine;
Elf64_Word e_version;
*
* Authors: Martin Nowak
*/
-module core.sys.freebsd.pthread;
+module core.sys.freebsd.pthread_np;
version (FreeBSD):
extern (C) nothrow @nogc:
struct Elf32_Ehdr
{
- char[EI_NIDENT] e_ident;
+ char[EI_NIDENT] e_ident = 0;
Elf32_Half e_type;
Elf32_Half e_machine;
Elf32_Word e_version;
struct Elf64_Ehdr
{
- char[EI_NIDENT] e_ident;
+ char[EI_NIDENT] e_ident = 0;
Elf64_Half e_type;
Elf64_Half e_machine;
Elf64_Word e_version;
{
ushort fid_len;
ushort fid_data0;
- char[MAXFIDSZ] fid_data;
+ char[MAXFIDSZ] fid_data = 0;
}
enum MFSNAMELEN = 16;
uint f_namemax;
uid_t f_owner;
fsid_t f_fsid;
- char[80] f_charspare;
- char[MFSNAMELEN] f_fstypename;
- char[MNAMELEN] f_mntfromname;
- char[MNAMELEN] f_mntonname;
+ char[80] f_charspare = 0;
+ char[MFSNAMELEN] f_fstypename = 0;
+ char[MNAMELEN] f_mntfromname = 0;
+ char[MNAMELEN] f_mntonname = 0;
}
struct vfsconf
{
uint vfc_version;
- char[MFSNAMELEN] vfc_name;
+ char[MFSNAMELEN] vfc_name = 0;
vfsops* vfc_vfsops;
int vfc_typenum;
int vfc_refcount;
struct xvfsconf
{
vfsops* vfc_vfsops;
- char[MFSNAMELEN] vfc_name;
+ char[MFSNAMELEN] vfc_name = 0;
int vfc_typenum;
int vfc_refcount;
int vfc_flags;
struct ovfsconf
{
void* vfc_vfsops;
- char[32] vfc_name;
+ char[32] vfc_name = 0;
int vfc_index;
int vfc_refcount;
int vfc_flags;
{
int vc_vers;
fsid_t vc_fsid;
- char[MFSNAMELEN] vc_fstypename;
+ char[MFSNAMELEN] vc_fstypename = 0;
fsctlop_t vc_op;
void* vc_ptr;
size_t vc_len;
--- /dev/null
+//Written in the D programming language
+
+/++
+ D header file for FreeBSD's extensions to POSIX's unistd.h.
+
+ Copyright: Copyright 2018
+ License: $(HTTP www.boost.org/LICENSE_1_0.txt, Boost License 1.0).
+ Authors: $(HTTP jmdavisprog.com, Jonathan M Davis)
+ +/
+module core.sys.freebsd.unistd;
+
+public import core.sys.posix.unistd;
+
+version (FreeBSD):
+extern(C):
+@nogc:
+nothrow:
+
+int getosreldate() pure @trusted;
struct Elf32_Ehdr
{
- char[EI_NIDENT] e_ident;
+ char[EI_NIDENT] e_ident = 0;
Elf32_Half e_type;
Elf32_Half e_machine;
Elf32_Word e_version;
struct Elf64_Ehdr
{
- char[EI_NIDENT] e_ident;
+ char[EI_NIDENT] e_ident = 0;
Elf64_Half e_type;
Elf64_Half e_machine;
Elf64_Word e_version;
EPOLLERR = 0x008,
EPOLLHUP = 0x010,
EPOLLRDHUP = 0x2000, // since Linux 2.6.17
+ EPOLLEXCLUSIVE = 1u << 28, // since Linux 4.5
EPOLLONESHOT = 1u << 30,
EPOLLET = 1u << 31
}
struct ip_opts
{
in_addr ip_dst;
- char[40] ip_opts;
+ char[40] ip_opts = 0;
};
struct ip_mreqn
module core.sys.linux.sched;
+import core.bitop : popcnt;
import core.sys.posix.sched;
import core.sys.posix.config;
import core.sys.posix.sys.types;
return 0;
}
+
+ bool __CPU_ISSET_S(size_t cpu, size_t setsize, cpu_set_t* cpusetp) pure
+ {
+ if (cpu < 8 * setsize)
+ return (cpusetp.__bits[__CPUELT(cpu)] & __CPUMASK(cpu)) != 0;
+ return false;
+ }
+
+ int __CPU_COUNT_S(size_t setsize, cpu_set_t* cpusetp) pure
+ {
+ int s = 0;
+ foreach (i; cpusetp.__bits[0 .. (setsize / cpu_mask.sizeof)])
+ s += popcnt(i);
+ return s;
+ }
}
/// Type for array elements in 'cpu_set_t'.
return __CPU_SET_S(cpu, cpu_set_t.sizeof, cpusetp);
}
+bool CPU_ISSET(size_t cpu, cpu_set_t* cpusetp) pure
+{
+ return __CPU_ISSET_S(cpu, cpu_set_t.sizeof, cpusetp);
+}
+
+int CPU_COUNT(cpu_set_t* cpusetp) pure
+{
+ return __CPU_COUNT_S(cpu_set_t.sizeof, cpusetp);
+}
+
/* Functions */
int sched_setaffinity(pid_t pid, size_t cpusetsize, cpu_set_t *mask);
int sched_getaffinity(pid_t pid, size_t cpusetsize, cpu_set_t *mask);
-
/* Increment event counter. */
int eventfd_write (int fd, eventfd_t value);
-version (X86_Any)
+version (CRuntime_UClibc)
+{
+ version (MIPS_Any)
+ {
+ enum EFD_SEMAPHORE = 1;
+ enum EFD_CLOEXEC = 0x80000; // octal!02000000
+ enum EFD_NONBLOCK = 0x80; // octal!00000200
+ }
+ else version (SPARC_Any)
+ {
+ enum EFD_SEMAPHORE = 1;
+ enum EFD_CLOEXEC = 0x400000;
+ enum EFD_NONBLOCK = 0x004000;
+ }
+ else
+ {
+ enum EFD_SEMAPHORE = 1;
+ enum EFD_CLOEXEC = 0x80000; // octal!02000000
+ enum EFD_NONBLOCK = 0x800; // octal!00004000
+ }
+}
+else version (X86_Any)
{
enum EFD_SEMAPHORE = 1;
enum EFD_CLOEXEC = 0x80000; // octal!2000000
struct Elf32_Ehdr
{
- char[EI_NIDENT] e_ident;
+ char[EI_NIDENT] e_ident = 0;
Elf32_Half e_type;
Elf32_Half e_machine;
Elf32_Word e_version;
struct Elf64_Ehdr
{
- char[EI_NIDENT] e_ident;
+ char[EI_NIDENT] e_ident = 0;
Elf64_Half e_type;
Elf64_Half e_machine;
Elf64_Word e_version;
}
}
}
+else version (CRuntime_Musl)
+{
+ // https://git.musl-libc.org/cgit/musl/tree/include/aio.h
+ struct aiocb
+ {
+ int aio_fildes;
+ int aio_lio_opcode;
+ int aio_reqprio;
+ void* aio_buf; //volatile
+ size_t aio_nbytes;
+ sigevent aio_sigevent;
+ void* __td;
+ int[2] __lock;
+ int __err; //volatile
+ ssize_t __ret;
+ off_t aio_offset;
+ void* __next;
+ void* __prev;
+ ubyte[32-2*(void*).sizeof] __dummy4;
+ }
+}
else version (Darwin)
{
struct aiocb
AIO_ALLDONE
}
}
+else version (CRuntime_Musl)
+{
+ enum
+ {
+ AIO_CANCELED,
+ AIO_NOTCANCELED,
+ AIO_ALLDONE
+ }
+}
else version (Darwin)
{
enum
LIO_NOP
}
}
+else version (CRuntime_Musl)
+{
+ enum
+ {
+ LIO_READ,
+ LIO_WRITE,
+ LIO_NOP
+ }
+}
else version (Darwin)
{
enum
LIO_NOWAIT
}
}
+else version (CRuntime_Musl)
+{
+ enum
+ {
+ LIO_WAIT,
+ LIO_NOWAIT
+ }
+}
else version (Darwin)
{
enum
else
enum __WORDSIZE=32;
}
+else version (CRuntime_Bionic)
+{
+ enum __USE_GNU = false;
+}
else version (Solaris)
{
enum _FILE_OFFSET_BITS = 64;
off_t d_off;
ushort d_reclen;
ubyte d_type;
- char[256] d_name;
+ char[256] d_name = 0;
}
struct DIR
ushort d_reclen;
ushort d_namlen;
ubyte d_type;
- char[1024] d_name;
+ char[1024] d_name = 0;
}
struct DIR
ushort d_reclen;
ubyte d_type;
ubyte d_namlen;
- char[256] d_name;
+ char[256] d_name = 0;
}
alias void* DIR;
ushort d_reclen;
ushort d_namlen;
ubyte d_type;
- char[512] d_name;
+ char[512] d_name = 0;
}
alias void* DIR;
ubyte d_type;
ubyte d_namlen;
ubyte[4] __d_padding;
- char[256] d_name;
+ char[256] d_name = 0;
}
alias void* DIR;
ubyte d_type; /* file type, see blow */
ubyte d_unused1; /* padding, reserved */
uint d_unused2; /* reserved */
- char[256] d_name; /* name, NUL-terminated */
+ char[256] d_name = 0; /* name, NUL-terminated */
}
alias void* DIR;
ino_t d_ino;
off_t d_off;
ushort d_reclen;
- char[1] d_name;
+ char[1] d_name = 0;
}
struct DIR
long d_off;
ushort d_reclen;
ubyte d_type;
- char[256] d_name;
+ char[256] d_name = 0;
}
struct DIR
off_t d_off;
ushort d_reclen;
ubyte d_type;
- char[256] d_name;
+ char[256] d_name = 0;
}
struct DIR
}
ushort d_reclen;
ubyte d_type;
- char[256] d_name;
+ char[256] d_name = 0;
}
struct DIR
enum F_WRLCK = 1;
enum F_UNLCK = 2;
- version (X86)
- {
- enum O_CREAT = 0x40; // octal 0100
- enum O_EXCL = 0x80; // octal 0200
- enum O_NOCTTY = 0x100; // octal 0400
- enum O_TRUNC = 0x200; // octal 01000
+ enum O_CREAT = 0x40; // octal 0100
+ enum O_EXCL = 0x80; // octal 0200
+ enum O_NOCTTY = 0x100; // octal 0400
+ enum O_TRUNC = 0x200; // octal 01000
- enum O_APPEND = 0x400; // octal 02000
- enum O_NONBLOCK = 0x800; // octal 04000
- enum O_SYNC = 0x1000; // octal 010000
- }
- else version (ARM)
- {
- enum O_CREAT = 0x40; // octal 0100
- enum O_EXCL = 0x80; // octal 0200
- enum O_NOCTTY = 0x100; // octal 0400
- enum O_TRUNC = 0x200; // octal 01000
+ enum O_APPEND = 0x400; // octal 02000
+ enum O_NONBLOCK = 0x800; // octal 04000
- enum O_APPEND = 0x400; // octal 02000
- enum O_NONBLOCK = 0x800; // octal 04000
- enum O_SYNC = 0x1000; // octal 010000
- }
- else version (AArch64)
+ version (D_LP64)
{
- enum O_CREAT = 0x40; // octal 0100
- enum O_EXCL = 0x80; // octal 0200
- enum O_NOCTTY = 0x100; // octal 0400
- enum O_TRUNC = 0x200; // octal 01000
-
- enum O_APPEND = 0x400; // octal 02000
- enum O_NONBLOCK = 0x800; // octal 04000
- enum O_SYNC = 0x101000; // octal 04010000
+ enum O_SYNC = 0x101000; // octal 04010000
}
else
{
- static assert(false, "Architecture not supported.");
+ enum O_SYNC = 0x1000; // octal 010000
}
enum O_ACCMODE = 0x3;
{
enum _JBLEN = 32;
}
+ else version (X86_64)
+ {
+ enum _JBLEN = 11;
+ }
else
{
static assert(false, "Architecture not supported.");
}
else version (CRuntime_Bionic)
{
- version (X86)
+ version (D_LP64)
{
struct sigaction_t
{
+ int sa_flags;
union
{
sigfn_t sa_handler;
}
sigset_t sa_mask;
- int sa_flags;
void function() sa_restorer;
}
}
- else version (ARM)
+ else
{
struct sigaction_t
{
void function() sa_restorer;
}
}
- else version (AArch64)
- {
- struct sigaction_t
- {
- int sa_flags;
- union
- {
- sigfn_t sa_handler;
- sigactfn_t sa_sigaction;
- }
-
- sigset_t sa_mask;
- void function() sa_restorer;
- }
- }
- else
- {
- static assert(false, "Architecture not supported.");
- }
}
else version (Darwin)
{
caddr_t __faddr;
timestruc_t __tstamp;
short __syscall;
- char __nsysarg;
- char __fault;
+ char __nsysarg = 0;
+ char __fault = 0;
c_long[8] __sysarg;
int[10] __mstate;
}
version (X86)
{
- alias c_ulong sigset_t;
+ alias uint sigset_t;
enum int LONG_BIT = 32;
}
else version (ARM)
{
- alias c_ulong sigset_t;
+ alias uint sigset_t;
enum int LONG_BIT = 32;
}
else version (AArch64)
struct sigset_t { ulong[1] sig; }
enum int LONG_BIT = 64;
}
+ else version (X86_64)
+ {
+ alias ulong sigset_t;
+ enum int LONG_BIT = 64;
+ }
else
{
static assert(false, "Architecture not supported.");
struct siginfo_t {
int si_signo, si_errno, si_code;
union __si_fields_t {
- char[128 - 2*int.sizeof - long.sizeof] __pad;
+ char[128 - 2*int.sizeof - long.sizeof] __pad = 0;
struct __si_common_t {
union __first_t {
struct __piduid_t {
}
else version (CRuntime_Bionic)
{
- version (X86)
- {
- enum SIGPOLL = 29;
- enum SIGPROF = 27;
- enum SIGSYS = 31;
- enum SIGTRAP = 5;
- enum SIGVTALRM = 26;
- enum SIGXCPU = 24;
- enum SIGXFSZ = 25;
-
- enum SA_ONSTACK = 0x08000000;
- enum SA_RESETHAND = 0x80000000;
- enum SA_RESTART = 0x10000000;
- enum SA_SIGINFO = 4;
- enum SA_NOCLDWAIT = 2;
- enum SA_NODEFER = 0x40000000;
- enum SS_ONSTACK = 1;
- enum SS_DISABLE = 2;
- enum MINSIGSTKSZ = 2048;
- enum SIGSTKSZ = 8192;
-
- struct stack_t
- {
- void* ss_sp;
- int ss_flags;
- size_t ss_size;
- }
- }
- else version (ARM)
- {
- enum SIGPOLL = 29;
- enum SIGPROF = 27;
- enum SIGSYS = 31;
- enum SIGTRAP = 5;
- enum SIGVTALRM = 26;
- enum SIGXCPU = 24;
- enum SIGXFSZ = 25;
-
- enum SA_ONSTACK = 0x08000000;
- enum SA_RESETHAND = 0x80000000;
- enum SA_RESTART = 0x10000000;
- enum SA_SIGINFO = 4;
- enum SA_NOCLDWAIT = 2;
- enum SA_NODEFER = 0x40000000;
- enum SS_ONSTACK = 1;
- enum SS_DISABLE = 2;
- enum MINSIGSTKSZ = 2048;
- enum SIGSTKSZ = 8192;
+ enum SIGPOLL = 29;
+ enum SIGPROF = 27;
+ enum SIGSYS = 31;
+ enum SIGTRAP = 5;
+ enum SIGVTALRM = 26;
+ enum SIGXCPU = 24;
+ enum SIGXFSZ = 25;
- struct stack_t
- {
- void* ss_sp;
- int ss_flags;
- size_t ss_size;
- }
- }
- else version (AArch64)
- {
- enum SIGPOLL = 29;
- enum SIGPROF = 27;
- enum SIGSYS = 31;
- enum SIGTRAP = 5;
- enum SIGVTALRM = 26;
- enum SIGXCPU = 24;
- enum SIGXFSZ = 25;
-
- enum SA_ONSTACK = 0x08000000;
- enum SA_RESETHAND = 0x80000000;
- enum SA_RESTART = 0x10000000;
- enum SA_SIGINFO = 4;
- enum SA_NOCLDWAIT = 2;
- enum SA_NODEFER = 0x40000000;
- enum SS_ONSTACK = 1;
- enum SS_DISABLE = 2;
- enum MINSIGSTKSZ = 2048;
- enum SIGSTKSZ = 8192;
+ enum SA_ONSTACK = 0x08000000;
+ enum SA_RESETHAND = 0x80000000;
+ enum SA_RESTART = 0x10000000;
+ enum SA_SIGINFO = 4;
+ enum SA_NOCLDWAIT = 2;
+ enum SA_NODEFER = 0x40000000;
+ enum SS_ONSTACK = 1;
+ enum SS_DISABLE = 2;
+ enum MINSIGSTKSZ = 2048;
+ enum SIGSTKSZ = 8192;
- struct stack_t
- {
- void* ss_sp;
- int ss_flags;
- size_t ss_size;
- }
- }
- else
+ struct stack_t
{
- static assert(false, "Architecture not supported.");
+ void* ss_sp;
+ int ss_flags;
+ size_t ss_size;
}
enum
int sigev_notify;
void function(sigval) sigev_notify_function;
pthread_attr_t *sigev_notify_attributes;
- char[56 - 3 * long.sizeof] __pad;
+ char[56 - 3 * long.sizeof] __pad = void;
}
}
else version (CRuntime_UClibc)
--- /dev/null
+/**
+ * D header file for spawn.h.
+ *
+ * Copyright: Copyright (C) 2018 by The D Language Foundation, All Rights Reserved
+ * Authors: Petar Kirov
+ * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
+ * Source: $(LINK2 https://github.com/dlang/druntime/blob/master/src/core/sys/posix/spawn.d, _spawn.d)
+ * Standards: The Open Group Base Specifications Issue 6, IEEE Std 1003.1, 2004 Edition
+ */
+module core.sys.posix.spawn;
+
+/*
+Based on the following system headers:
+
+Glibc: https://sourceware.org/git/?p=glibc.git;a=blob;f=posix/spawn.h;hb=HEAD
+
+Bionic libc: https://android.googlesource.com/platform/bionic.git/+/master/libc/include/spawn.h
+
+Musl libc: https://git.musl-libc.org/cgit/musl/tree/include/spawn.h
+
+uClibc: https://git.uclibc.org/uClibc/tree/include/spawn.h
+
+Darwin XNU:
+https://opensource.apple.com/source/xnu/xnu-4570.71.2/libsyscall/wrappers/spawn/spawn.h.auto.html
+https://opensource.apple.com/source/xnu/xnu-4570.71.2/bsd/sys/spawn.h.auto.html
+https://github.com/opensource-apple/xnu (GitHub mirror)
+
+FreeBSD: https://github.com/freebsd/freebsd/blob/master/include/spawn.h
+
+NetBSD: https://github.com/NetBSD/src/blob/trunk/sys/sys/spawn.h
+
+OpenBSD: https://github.com/openbsd/src/blob/master/include/spawn.h
+
+DragonFlyBSD: https://github.com/DragonFlyBSD/DragonFlyBSD/blob/master/include/spawn.h
+
+Solaris: https://github.com/illumos/illumos-gate/blob/master/usr/src/head/spawn.h
+*/
+
+version (OSX) // macOS and iOS only as this API is prohibited on WatchOS and TVOS
+ version = Darwin;
+else version (iOS)
+ version = Darwin;
+
+version (Posix):
+public import core.sys.posix.sys.types : mode_t, pid_t;
+public import core.sys.posix.signal : sigset_t;
+public import core.sys.posix.sched : sched_param;
+
+extern(C):
+@nogc:
+nothrow:
+
+int posix_spawn_file_actions_addclose(posix_spawn_file_actions_t*, int);
+int posix_spawn_file_actions_adddup2(posix_spawn_file_actions_t*, int, int);
+int posix_spawn_file_actions_addopen(posix_spawn_file_actions_t*, int, const char*, int, mode_t);
+int posix_spawn_file_actions_destroy(posix_spawn_file_actions_t*);
+int posix_spawn_file_actions_init(posix_spawn_file_actions_t*);
+int posix_spawnattr_destroy(posix_spawnattr_t*);
+int posix_spawnattr_getflags(const posix_spawnattr_t*, short*);
+int posix_spawnattr_getpgroup(const posix_spawnattr_t*, pid_t*);
+
+version (Darwin)
+{ } // Not supported
+else
+{
+ int posix_spawnattr_getschedparam(const posix_spawnattr_t*, sched_param*);
+ int posix_spawnattr_getschedpolicy(const posix_spawnattr_t*, int*);
+ int posix_spawnattr_setschedparam(posix_spawnattr_t*, const sched_param*);
+ int posix_spawnattr_setschedpolicy(posix_spawnattr_t*, int);
+}
+
+int posix_spawnattr_getsigdefault(const posix_spawnattr_t*, sigset_t*);
+int posix_spawnattr_getsigmask(const posix_spawnattr_t*, sigset_t*);
+int posix_spawnattr_init(posix_spawnattr_t*);
+int posix_spawnattr_setflags(posix_spawnattr_t*, short);
+int posix_spawnattr_setpgroup(posix_spawnattr_t*, pid_t);
+int posix_spawnattr_setsigdefault(posix_spawnattr_t*, const sigset_t*);
+int posix_spawnattr_setsigmask(posix_spawnattr_t*, const sigset_t*);
+int posix_spawn(pid_t*pid, const char* path,
+ const posix_spawn_file_actions_t* file_actions,
+ const posix_spawnattr_t* attrp,
+ const char** argv, const char** envp);
+int posix_spawnp(pid_t* pid, const char* file,
+ const posix_spawn_file_actions_t* file_actions,
+ const posix_spawnattr_t* attrp,
+ const char** argv, const char** envp);
+
+version (linux)
+{
+ version (CRuntime_Glibc)
+ {
+ // Source: https://sourceware.org/git/?p=glibc.git;a=blob;f=posix/spawn.h;hb=HEAD
+ enum
+ {
+ POSIX_SPAWN_RESETIDS = 0x01,
+ POSIX_SPAWN_SETPGROUP = 0x02,
+ POSIX_SPAWN_SETSIGDEF = 0x04,
+ POSIX_SPAWN_SETSIGMASK = 0x08,
+ POSIX_SPAWN_SETSCHEDPARAM = 0x10,
+ POSIX_SPAWN_SETSCHEDULER = 0x20
+ }
+ import core.sys.posix.config : __USE_GNU;
+ static if (__USE_GNU)
+ {
+ enum
+ {
+ POSIX_SPAWN_USEVFORK = 0x40,
+ POSIX_SPAWN_SETSID = 0x80
+ }
+ }
+ struct posix_spawnattr_t
+ {
+ short __flags;
+ pid_t __pgrp;
+ sigset_t __sd;
+ sigset_t __ss;
+ sched_param __sp;
+ int __policy;
+ int[16] __pad;
+ }
+ struct __spawn_action;
+ struct posix_spawn_file_actions_t
+ {
+ int __allocated;
+ int __used;
+ __spawn_action* __actions;
+ int[16] __pad;
+ }
+ }
+ else version (CRuntime_Bionic)
+ {
+ // Source: https://android.googlesource.com/platform/bionic.git/+/master/libc/include/spawn.h
+ enum
+ {
+ POSIX_SPAWN_RESETIDS = 1,
+ POSIX_SPAWN_SETPGROUP = 2,
+ POSIX_SPAWN_SETSIGDEF = 4,
+ POSIX_SPAWN_SETSIGMASK = 8,
+ POSIX_SPAWN_SETSCHEDPARAM = 16,
+ POSIX_SPAWN_SETSCHEDULER = 32
+ }
+ import core.sys.posix.config : __USE_GNU;
+ static if (__USE_GNU)
+ {
+ enum
+ {
+ POSIX_SPAWN_USEVFORK = 64,
+ POSIX_SPAWN_SETSID = 128
+ }
+ }
+ alias posix_spawnattr_t = __posix_spawnattr*;
+ alias posix_spawn_file_actions_t = __posix_spawn_file_actions*;
+ struct __posix_spawnattr;
+ struct __posix_spawn_file_actions;
+ }
+ else version (CRuntime_Musl)
+ {
+ // Source: https://git.musl-libc.org/cgit/musl/tree/include/spawn.h
+ enum
+ {
+ POSIX_SPAWN_RESETIDS = 1,
+ POSIX_SPAWN_SETPGROUP = 2,
+ POSIX_SPAWN_SETSIGDEF = 4,
+ POSIX_SPAWN_SETSIGMASK = 8,
+ POSIX_SPAWN_SETSCHEDPARAM = 16,
+ POSIX_SPAWN_SETSCHEDULER = 32,
+ POSIX_SPAWN_USEVFORK = 64,
+ POSIX_SPAWN_SETSID = 128
+ }
+ struct posix_spawnattr_t
+ {
+ int __flags;
+ pid_t __pgrp;
+ sigset_t __def, __mask;
+ int __prio, __pol;
+ void* __fn;
+ char[64 - (void*).sizeof] __pad = void;
+ }
+ struct posix_spawn_file_actions_t
+ {
+ int[2] __pad0;
+ void* __actions;
+ int[16] __pad;
+ }
+ }
+ else version (CRuntime_UClibc)
+ {
+ // Source: https://git.uclibc.org/uClibc/tree/include/spawn.h
+ enum
+ {
+ POSIX_SPAWN_RESETIDS = 0x01,
+ POSIX_SPAWN_SETPGROUP = 0x02,
+ POSIX_SPAWN_SETSIGDEF = 0x04,
+ POSIX_SPAWN_SETSIGMASK = 0x08,
+ POSIX_SPAWN_SETSCHEDPARAM = 0x10,
+ POSIX_SPAWN_SETSCHEDULER = 0x20
+ }
+ import core.sys.posix.config : __USE_GNU;
+ static if (__USE_GNU)
+ {
+ enum
+ {
+ POSIX_SPAWN_USEVFORK = 0x40,
+ }
+ }
+ struct posix_spawnattr_t
+ {
+ short __flags;
+ pid_t __pgrp;
+ sigset_t __sd;
+ sigset_t __ss;
+ sched_param __sp;
+ int __policy;
+ int[16] __pad;
+ }
+ struct __spawn_action;
+ struct posix_spawn_file_actions_t
+ {
+ int __allocated;
+ int __used;
+ __spawn_action* __actions;
+ int[16] __pad;
+ }
+ }
+ else
+ static assert(0, "Unsupported Linux libc");
+}
+else version (Darwin)
+{
+ // Sources:
+ // https://opensource.apple.com/source/xnu/xnu-4570.71.2/libsyscall/wrappers/spawn/spawn.h.auto.html
+ // https://opensource.apple.com/source/xnu/xnu-4570.71.2/bsd/sys/spawn.h.auto.html
+ enum
+ {
+ POSIX_SPAWN_RESETIDS = 0x01,
+ POSIX_SPAWN_SETPGROUP = 0x02,
+ POSIX_SPAWN_SETSIGDEF = 0x04,
+ POSIX_SPAWN_SETSIGMASK = 0x08,
+ // POSIX_SPAWN_SETSCHEDPARAM = 0x10, // not supported
+ // POSIX_SPAWN_SETSCHEDULER = 0x20, // ditto
+ POSIX_SPAWN_SETEXEC = 0x40,
+ POSIX_SPAWN_START_SUSPENDED = 0x80
+ }
+ alias posix_spawnattr_t = void*;
+ alias posix_spawn_file_actions_t = void*;
+}
+else version (FreeBSD)
+{
+ // Source: https://github.com/freebsd/freebsd/blob/master/include/spawn.h
+ enum
+ {
+ POSIX_SPAWN_RESETIDS = 0x01,
+ POSIX_SPAWN_SETPGROUP = 0x02,
+ POSIX_SPAWN_SETSCHEDPARAM = 0x04,
+ POSIX_SPAWN_SETSCHEDULER = 0x08,
+ POSIX_SPAWN_SETSIGDEF = 0x10,
+ POSIX_SPAWN_SETSIGMASK = 0x20
+ }
+ alias posix_spawnattr_t = void*;
+ alias posix_spawn_file_actions_t = void*;
+}
+else version (NetBSD)
+{
+ // Source: https://github.com/NetBSD/src/blob/trunk/sys/sys/spawn.h
+ enum
+ {
+ POSIX_SPAWN_RESETIDS = 0x01,
+ POSIX_SPAWN_SETPGROUP = 0x02,
+ POSIX_SPAWN_SETSCHEDPARAM = 0x04,
+ POSIX_SPAWN_SETSCHEDULER = 0x08,
+ POSIX_SPAWN_SETSIGDEF = 0x10,
+ POSIX_SPAWN_SETSIGMASK = 0x20,
+ POSIX_SPAWN_RETURNERROR = 0x40 // NetBSD specific
+ }
+ struct posix_spawnattr
+ {
+ short sa_flags;
+ pid_t sa_pgroup;
+ sched_param sa_schedparam;
+ int sa_schedpolicy;
+ sigset_t sa_sigdefault;
+ sigset_t sa_sigmask;
+ }
+ struct posix_spawn_file_actions_entry_t;
+ struct posix_spawn_file_actions
+ {
+ uint size;
+ uint len;
+ posix_spawn_file_actions_entry_t* fae;
+ }
+}
+else version (OpenBSD)
+{
+ // Source: https://github.com/openbsd/src/blob/master/include/spawn.h
+ enum
+ {
+ POSIX_SPAWN_RESETIDS = 0x01,
+ POSIX_SPAWN_SETPGROUP = 0x02,
+ POSIX_SPAWN_SETSCHEDPARAM = 0x04,
+ POSIX_SPAWN_SETSCHEDULER = 0x08,
+ POSIX_SPAWN_SETSIGDEF = 0x10,
+ POSIX_SPAWN_SETSIGMASK = 0x20
+ }
+ alias posix_spawnattr_t = __posix_spawnattr*;
+ alias posix_spawn_file_actions_t = __posix_spawn_file_actions*;
+ struct __posix_spawnattr;
+ struct __posix_spawn_file_actions;
+}
+else version (DragonFlyBSD)
+{
+ // Source: https://github.com/DragonFlyBSD/DragonFlyBSD/blob/master/include/spawn.h
+ enum
+ {
+ POSIX_SPAWN_RESETIDS = 0x01,
+ POSIX_SPAWN_SETPGROUP = 0x02,
+ POSIX_SPAWN_SETSCHEDPARAM = 0x04,
+ POSIX_SPAWN_SETSCHEDULER = 0x08,
+ POSIX_SPAWN_SETSIGDEF = 0x10,
+ POSIX_SPAWN_SETSIGMASK = 0x20
+ }
+ alias posix_spawnattr_t = __posix_spawnattr*;
+ alias posix_spawn_file_actions_t = __posix_spawn_file_actions*;
+ struct __posix_spawnattr;
+ struct __posix_spawn_file_actions;
+}
+else version (Solaris)
+{
+ // Source: https://github.com/illumos/illumos-gate/blob/master/usr/src/head/spawn.h
+ enum
+ {
+ POSIX_SPAWN_RESETIDS = 0x01,
+ POSIX_SPAWN_SETPGROUP = 0x02,
+ POSIX_SPAWN_SETSIGDEF = 0x04,
+ POSIX_SPAWN_SETSIGMASK = 0x08,
+ POSIX_SPAWN_SETSCHEDPARAM = 0x10,
+ POSIX_SPAWN_SETSCHEDULER = 0x20,
+ }
+ version (none)
+ {
+ // Non-portable Solaris extensions.
+ enum
+ {
+ POSIX_SPAWN_SETSIGIGN_NP = 0x0800,
+ POSIX_SPAWN_NOSIGCHLD_NP = 0x1000,
+ POSIX_SPAWN_WAITPID_NP = 0x2000,
+ POSIX_SPAWN_NOEXECERR_NP = 0x4000,
+ }
+ }
+ struct posix_spawnattr_t
+ {
+ void* __spawn_attrp;
+ }
+ struct posix_spawn_file_actions_t
+ {
+ void* __file_attrp;
+ }
+ version (none)
+ {
+ // Non-portable Solaris extensions.
+ alias boolean_t = int;
+ int posix_spawn_file_actions_addclosefrom_np(posix_spawn_file_actions_t* file_actions,
+ int lowfiledes);
+ int posix_spawn_pipe_np(pid_t* pidp, int* fdp, const char* cmd, boolean_t write,
+ posix_spawn_file_actions_t* fact,
+ posix_spawnattr_t* attr);
+ int posix_spawnattr_getsigignore_np(const posix_spawnattr_t* attr, sigset_t* sigignore);
+ int posix_spawnattr_setsigignore_np(posix_spawnattr_t* attr, const sigset_t* sigignore);
+ }
+}
+else
+ static assert(0, "Unsupported OS");
}
else version (CRuntime_Bionic)
{
- // All except ftok are from the linux kernel headers.
- version (X86)
+ // All except ftok are from the linux kernel headers. Latest Bionic headers
+ // don't use this legacy definition anymore, consider updating.
+ version (D_LP64)
{
struct ipc_perm
{
key_t key;
- ushort uid;
- ushort gid;
- ushort cuid;
- ushort cgid;
+ uint uid;
+ uint gid;
+ uint cuid;
+ uint cgid;
mode_t mode;
ushort seq;
}
}
- else version (ARM)
+ else
{
struct ipc_perm
{
ushort seq;
}
}
- else version (AArch64)
- {
- struct ipc_perm
- {
- key_t key;
- uint uid;
- uint gid;
- uint cuid;
- uint cgid;
- mode_t mode;
- ushort seq;
- }
- }
- else
- {
- static assert(false, "Architecture not supported.");
- }
enum IPC_CREAT = 0x0200; // 01000
enum IPC_EXCL = 0x0400; // 02000
enum MAP_SHARED = 0x0001;
enum MAP_PRIVATE = 0x0002;
enum MAP_FIXED = 0x0010;
-
- version (X86)
- {
- enum MAP_ANON = 0x0020;
- }
- else version (ARM)
- {
- enum MAP_ANON = 0x0020;
- }
- else version (AArch64)
- {
- enum MAP_ANON = 0x0020;
- }
- else
- {
- static assert(false, "Architecture not supported.");
- }
+ enum MAP_ANON = 0x0020;
enum MAP_FAILED = cast(void*)-1;
struct msgbuf
{
c_long mtype;
- char[1] mtext;
+ char[1] mtext = 0;
}
int msgctl(int msqid, int cmd, msqid_ds* __buf);
else version (CRuntime_Musl)
{
alias ulong rlim_t;
+
+ int getrlimit(int, rlimit*);
+ int setrlimit(int, in rlimit*);
+ alias getrlimit getrlimit64;
+ alias setrlimit setrlimit64;
+ enum
+ {
+ RUSAGE_SELF = 0,
+ RUSAGE_CHILDREN = -1,
+ RUSAGE_THREAD = 1
+ }
+ struct rusage
+ {
+ timeval ru_utime;
+ timeval ru_stime;
+ c_long ru_maxrss;
+ c_long ru_ixrss;
+ c_long ru_idrss;
+ c_long ru_isrss;
+ c_long ru_minflt;
+ c_long ru_majflt;
+ c_long ru_nswap;
+ c_long ru_inblock;
+ c_long ru_oublock;
+ c_long ru_msgsnd;
+ c_long ru_msgrcv;
+ c_long ru_nsignals;
+ c_long ru_nvcsw;
+ c_long ru_nivcsw;
+ c_long[16] __reserved;
+ }
+
enum
{
RLIMIT_CPU = 0,
RLIMIT_NOFILE = 7,
RLIMIT_AS = 9,
}
- int getrlimit(int, rlimit*);
- int setrlimit(int, in rlimit*);
- alias getrlimit getrlimit64;
- alias setrlimit setrlimit64;
}
else version (CRuntime_UClibc)
{
struct sockaddr
{
sa_family_t sa_family;
- char[14] sa_data;
+ char[14] sa_data = 0;
}
alias double sockaddr_maxalign_t;
struct sockaddr_storage
{
sa_family_t ss_family;
- char[_SS_PAD1SIZE] _ss_pad1;
+ char[_SS_PAD1SIZE] _ss_pad1 = void;
sockaddr_maxalign_t _ss_align;
- char[_SS_PAD2SIZE] _ss_pad2;
+ char[_SS_PAD2SIZE] _ss_pad2 = void;
}
struct msghdr
int cmsg_type;
}
- version (X86)
- {
- alias uint __kernel_size_t;
-
- enum
- {
- SOCK_DGRAM = 2,
- SOCK_SEQPACKET = 5,
- SOCK_STREAM = 1
- }
+ alias size_t __kernel_size_t;
- enum
- {
- SOL_SOCKET = 1
- }
-
- enum
- {
- SO_ACCEPTCONN = 30,
- SO_BROADCAST = 6,
- SO_DEBUG = 1,
- SO_DONTROUTE = 5,
- SO_ERROR = 4,
- SO_KEEPALIVE = 9,
- SO_LINGER = 13,
- SO_OOBINLINE = 10,
- SO_RCVBUF = 8,
- SO_RCVLOWAT = 18,
- SO_RCVTIMEO = 20,
- SO_REUSEADDR = 2,
- SO_SNDBUF = 7,
- SO_SNDLOWAT = 19,
- SO_SNDTIMEO = 21,
- SO_TYPE = 3
- }
- }
- else version (ARM)
+ enum
{
- alias uint __kernel_size_t;
-
- enum
- {
- SOCK_DGRAM = 2,
- SOCK_SEQPACKET = 5,
- SOCK_STREAM = 1
- }
-
- enum
- {
- SOL_SOCKET = 1
- }
-
- enum
- {
- SO_ACCEPTCONN = 30,
- SO_BROADCAST = 6,
- SO_DEBUG = 1,
- SO_DONTROUTE = 5,
- SO_ERROR = 4,
- SO_KEEPALIVE = 9,
- SO_LINGER = 13,
- SO_OOBINLINE = 10,
- SO_RCVBUF = 8,
- SO_RCVLOWAT = 18,
- SO_RCVTIMEO = 20,
- SO_REUSEADDR = 2,
- SO_SNDBUF = 7,
- SO_SNDLOWAT = 19,
- SO_SNDTIMEO = 21,
- SO_TYPE = 3
- }
+ SOCK_DGRAM = 2,
+ SOCK_SEQPACKET = 5,
+ SOCK_STREAM = 1
}
- else version (AArch64)
- {
- alias ulong __kernel_size_t;
-
- enum
- {
- SOCK_DGRAM = 2,
- SOCK_SEQPACKET = 5,
- SOCK_STREAM = 1
- }
- enum
- {
- SOL_SOCKET = 1
- }
-
- enum
- {
- SO_ACCEPTCONN = 30,
- SO_BROADCAST = 6,
- SO_DEBUG = 1,
- SO_DONTROUTE = 5,
- SO_ERROR = 4,
- SO_KEEPALIVE = 9,
- SO_LINGER = 13,
- SO_OOBINLINE = 10,
- SO_RCVBUF = 8,
- SO_RCVLOWAT = 18,
- SO_RCVTIMEO = 20,
- SO_REUSEADDR = 2,
- SO_SNDBUF = 7,
- SO_SNDLOWAT = 19,
- SO_SNDTIMEO = 21,
- SO_TYPE = 3
- }
+ enum
+ {
+ SOL_SOCKET = 1
}
- else
+
+ enum
{
- static assert(false, "Architecture not supported.");
+ SO_ACCEPTCONN = 30,
+ SO_BROADCAST = 6,
+ SO_DEBUG = 1,
+ SO_DONTROUTE = 5,
+ SO_ERROR = 4,
+ SO_KEEPALIVE = 9,
+ SO_LINGER = 13,
+ SO_OOBINLINE = 10,
+ SO_RCVBUF = 8,
+ SO_RCVLOWAT = 18,
+ SO_RCVTIMEO = 20,
+ SO_REUSEADDR = 2,
+ SO_SNDBUF = 7,
+ SO_SNDLOWAT = 19,
+ SO_SNDTIMEO = 21,
+ SO_TYPE = 3
}
enum
}
else version (RISCV_Any)
{
+ private
+ {
+ alias __dev_t = ulong;
+ alias __ino_t = c_ulong;
+ alias __ino64_t = ulong;
+ alias __mode_t = uint;
+ alias __nlink_t = uint;
+ alias __uid_t = uint;
+ alias __gid_t = uint;
+ alias __off_t = c_long;
+ alias __off64_t = long;
+ alias __blksize_t = int;
+ alias __blkcnt_t = c_long;
+ alias __blkcnt64_t = long;
+ alias __timespec = timespec;
+ alias __time_t = time_t;
+ }
struct stat_t
{
- dev_t st_dev;
- ino_t st_ino;
- mode_t st_mode;
- nlink_t st_nlink;
- uid_t st_uid;
- gid_t st_gid;
- dev_t st_rdev;
- dev_t __pad1;
- off_t st_size;
- blksize_t st_blksize;
- int __pad2;
- time_t st_atime;
- c_ulong st_atime_nsec;
- time_t st_mtime;
- c_ulong st_mtime_nsec;
- time_t st_ctime;
- c_ulong st_ctime_nsec;
- int[2] __reserved;
+ __dev_t st_dev;
+
+ static if (__USE_FILE_OFFSET64)
+ {
+ __ino64_t st_ino;
+ }
+ else
+ {
+ __ino_t st_ino;
+ }
+ __mode_t st_mode;
+ __nlink_t st_nlink;
+ __uid_t st_uid;
+ __gid_t st_gid;
+ __dev_t st_rdev;
+ __dev_t __pad1;
+
+ static if (__USE_FILE_OFFSET64)
+ {
+ __off64_t st_size;
+ }
+ else
+ {
+ __off_t st_size;
+ }
+ __blksize_t st_blksize;
+ int __pad2;
+
+ static if (__USE_FILE_OFFSET64)
+ {
+ __blkcnt64_t st_blocks;
+ }
+ else
+ {
+ __blkcnt_t st_blocks;
+ }
+
+ static if (__USE_MISC)
+ {
+ __timespec st_atim;
+ __timespec st_mtim;
+ __timespec st_ctim;
+ extern(D)
+ {
+ @property ref time_t st_atime() { return st_atim.tv_sec; }
+ @property ref time_t st_mtime() { return st_mtim.tv_sec; }
+ @property ref time_t st_ctime() { return st_ctim.tv_sec; }
+ }
+ }
+ else
+ {
+ __time_t st_atime;
+ c_ulong st_atimensec;
+ __time_t st_mtime;
+ c_ulong st_mtimensec;
+ __time_t st_ctime;
+ c_ulong st_ctimensec;
+ }
+ int[2] __unused;
}
}
else version (ARM)
}
blksize_t st_blksize;
blkcnt_t st_blocks;
- char[_ST_FSTYPSZ] st_fstype;
+ char[_ST_FSTYPSZ] st_fstype = 0;
}
static if (__USE_LARGEFILE64) alias stat_t stat64_t;
}
blksize_t st_blksize;
blkcnt_t st_blocks;
- char[_ST_FSTYPSZ] st_fstype;
+ char[_ST_FSTYPSZ] st_fstype = 0;
c_long[8] st_pad4;
}
}
blksize_t st_blksize;
blkcnt64_t st_blocks;
- char[_ST_FSTYPSZ] st_fstype;
+ char[_ST_FSTYPSZ] st_fstype = 0;
c_long[8] st_pad4;
}
uint __unused5;
}
}
+ else version (X86_64)
+ {
+ struct stat_t
+ {
+ ulong st_dev;
+ ulong st_ino;
+ ulong st_nlink;
+ uint st_mode;
+ uid_t st_uid;
+ gid_t st_gid;
+ uint __pad0;
+
+ ulong st_rdev;
+ long st_size;
+ long st_blksize;
+ long st_blocks;
+ long st_atime;
+ ulong st_atime_nsec;
+ long st_mtime;
+ ulong st_mtime_nsec;
+ long st_ctime;
+ ulong st_ctime_nsec;
+ long[3] __pad3;
+ }
+ }
else
{
static assert(false, "Architecture not supported.");
timespec st_atim;
timespec st_mtim;
timespec st_ctim;
- extern(D) @safe @property
+ extern(D) @safe @property inout pure nothrow
{
- ref time_t st_atime() return { return st_atim.tv_sec; }
- ref time_t st_mtime() return { return st_mtim.tv_sec; }
- ref time_t st_ctime() return { return st_ctim.tv_sec; }
+ ref inout(time_t) st_atime() return { return st_atim.tv_sec; }
+ ref inout(time_t) st_mtime() return { return st_mtim.tv_sec; }
+ ref inout(time_t) st_ctime() return { return st_ctim.tv_sec; }
}
long[3] __unused;
}
c_ulong f_namemax;
int f_owner;
int[4] f_spare;
- char[_VFS_NAMELEN] f_fstypename;
- char[_VFS_MNAMELEN] f_mntonname;
- char[_VFS_MNAMELEN] f_mntfromname;
+ char[_VFS_NAMELEN] f_fstypename = 0;
+ char[_VFS_MNAMELEN] f_mntonname = 0;
+ char[_VFS_MNAMELEN] f_mntfromname = 0;
}
enum FFlag
alias c_long time_t;
alias uint uid_t;
- version (X86)
- {
- alias ushort mode_t;
- alias ushort nlink_t;
- }
- else version (X86_64)
- {
- alias ushort mode_t;
- alias uint nlink_t;
- }
- else version (ARM)
- {
- alias ushort mode_t;
- alias ushort nlink_t;
- }
- else version (AArch64)
- {
- alias uint mode_t;
- alias uint nlink_t;
- }
- else version (MIPS32)
+ version (D_LP64)
{
alias uint mode_t;
alias uint nlink_t;
}
else
{
- static assert(false, "Architecture not supported.");
+ alias ushort mode_t;
+ alias ushort nlink_t;
}
}
else version (CRuntime_UClibc)
size_t guard_size;
int sched_policy;
int sched_priority;
- version (D_LP64) char[16] __reserved;
+ version (D_LP64) char[16] __reserved = 0;
}
struct pthread_cond_t
struct utsname
{
- char[utsNameLength] sysname;
- char[utsNameLength] nodename;
- char[utsNameLength] release;
- char[utsNameLength] version_;
+ char[utsNameLength] sysname = 0;
+ char[utsNameLength] nodename = 0;
+ char[utsNameLength] release = 0;
+ char[utsNameLength] version_ = 0;
// TODO Deprecate after version_ has been in an official release.
alias update = version_;
- char[utsNameLength] machine;
+ char[utsNameLength] machine = 0;
- char[utsNameLength] __domainname;
+ char[utsNameLength] __domainname = 0;
}
int uname(utsname* __name);
struct utsname
{
- char[utsNameLength] sysname;
- char[utsNameLength] nodename;
- char[utsNameLength] release;
- char[utsNameLength] version_;
+ char[utsNameLength] sysname = 0;
+ char[utsNameLength] nodename = 0;
+ char[utsNameLength] release = 0;
+ char[utsNameLength] version_ = 0;
// TODO Deprecate after version_ has been in an official release.
alias update = version_;
- char[utsNameLength] machine;
+ char[utsNameLength] machine = 0;
}
int uname(utsname* __name);
struct utsname
{
- char[SYS_NMLN] sysname;
- char[SYS_NMLN] nodename;
- char[SYS_NMLN] release;
- char[SYS_NMLN] version_;
+ char[SYS_NMLN] sysname = 0;
+ char[SYS_NMLN] nodename = 0;
+ char[SYS_NMLN] release = 0;
+ char[SYS_NMLN] version_ = 0;
// TODO Deprecate after version_ has been in an official release.
alias update = version_;
- char[SYS_NMLN] machine;
+ char[SYS_NMLN] machine = 0;
}
int __xuname(int, void*);
struct utsname
{
- char[utsNameLength] sysname;
- char[utsNameLength] nodename;
- char[utsNameLength] release;
- char[utsNameLength] version_;
+ char[utsNameLength] sysname = 0;
+ char[utsNameLength] nodename = 0;
+ char[utsNameLength] release = 0;
+ char[utsNameLength] version_ = 0;
// TODO Deprecate after version_ has been in an official release.
alias update = version_;
- char[utsNameLength] machine;
+ char[utsNameLength] machine = 0;
}
int uname(utsname* __name);
struct utsname
{
- char[utsNameLength] sysname;
- char[utsNameLength] nodename;
- char[utsNameLength] release;
- char[utsNameLength] version_;
+ char[utsNameLength] sysname = 0;
+ char[utsNameLength] nodename = 0;
+ char[utsNameLength] release = 0;
+ char[utsNameLength] version_ = 0;
// TODO Deprecate after version_ has been in an official release.
alias update = version_;
- char[utsNameLength] machine;
+ char[utsNameLength] machine = 0;
}
int uname(utsname* __name);
struct utsname
{
- char[SYS_NMLN] sysname;
- char[SYS_NMLN] nodename;
- char[SYS_NMLN] release;
+ char[SYS_NMLN] sysname = 0;
+ char[SYS_NMLN] nodename = 0;
+ char[SYS_NMLN] release = 0;
// The field name is version but version is a keyword in D.
- char[SYS_NMLN] _version;
- char[SYS_NMLN] machine;
+ char[SYS_NMLN] _version = 0;
+ char[SYS_NMLN] machine = 0;
}
int uname(utsname* __name);
struct utsname
{
- char[SYS_NMLN] sysname;
- char[SYS_NMLN] nodename;
- char[SYS_NMLN] release;
+ char[SYS_NMLN] sysname = 0;
+ char[SYS_NMLN] nodename = 0;
+ char[SYS_NMLN] release = 0;
// The field name is version but version is a keyword in D.
- char[SYS_NMLN] _version;
- char[SYS_NMLN] machine;
- char[SYS_NMLN] domainname;
+ char[SYS_NMLN] _version = 0;
+ char[SYS_NMLN] machine = 0;
+ char[SYS_NMLN] domainname = 0;
}
int uname(utsname*);
struct utsname
{
- char[SYS_NMLN] sysname;
- char[SYS_NMLN] nodename;
- char[SYS_NMLN] release;
- char[SYS_NMLN] _version;
- char[SYS_NMLN] machine;
- char[SYS_NMLN] domainname;
+ char[SYS_NMLN] sysname = 0;
+ char[SYS_NMLN] nodename = 0;
+ char[SYS_NMLN] release = 0;
+ char[SYS_NMLN] _version = 0;
+ char[SYS_NMLN] machine = 0;
+ char[SYS_NMLN] domainname = 0;
}
int uname(utsname*);
struct utsname
{
- char[utsNameLength] sysname;
- char[utsNameLength] nodename;
- char[utsNameLength] release;
- char[utsNameLength] version_;
- char[utsNameLength] machine;
- char[utsNameLength] domainname;
+ char[utsNameLength] sysname = 0;
+ char[utsNameLength] nodename = 0;
+ char[utsNameLength] release = 0;
+ char[utsNameLength] version_ = 0;
+ char[utsNameLength] machine = 0;
+ char[utsNameLength] domainname = 0;
}
int uname(utsname*);
mcontext_t* uc_regs;
}
sigset_t uc_sigmask;
- char[mcontext_t.sizeof + 12] uc_reg_space;
+ char[mcontext_t.sizeof + 12] uc_reg_space = 0;
}
}
else version (PPC64)
ucontext_t* uc_link;
stack_t uc_stack;
sigset_t uc_sigmask;
- char[1024 / 8 - sigset_t.sizeof] __reserved;
+ char[1024 / 8 - sigset_t.sizeof] __reserved = 0;
mcontext_t uc_mcontext;
}
}
struct Elf32_Ehdr
{
- char[EI_NIDENT] e_ident;
+ char[EI_NIDENT] e_ident = 0;
Elf32_Half e_type;
Elf32_Half e_machine;
Elf32_Word e_version;
struct Elf64_Ehdr
{
- char[EI_NIDENT] e_ident;
+ char[EI_NIDENT] e_ident = 0;
Elf64_Half e_type;
Elf64_Half e_machine;
Elf64_Word e_version;
struct pcinfo_t
{
id_t pc_cid; // class id
- char[PC_CLNMSZ] pc_clname; // class name
+ char[PC_CLNMSZ] pc_clname=0;// class name
int[PC_CLINFOSZ] pc_clinfo; // class information
}
version (ANSI) {} else version = Unicode;
pragma(lib, "advapi32");
-import core.sys.windows.windows, core.sys.windows.accctrl;
+import core.sys.windows.accctrl, core.sys.windows.basetyps, core.sys.windows.w32api, core.sys.windows.winnt;
extern (Windows) {
VOID BuildExplicitAccessWithNameA(PEXPLICIT_ACCESS_A, LPSTR, DWORD,
pragma(lib,"uuid");
import core.atomic;
-import core.sys.windows.windows;
+import core.sys.windows.windef /+: HRESULT, LONG, ULONG+/;
//import std.string;
public import core.sys.windows.basetyps : GUID, IID, CLSID;
module core.sys.windows.comcat;
version (Windows):
-import core.sys.windows.windows, core.sys.windows.ole2;
+import core.sys.windows.ole2;
private import core.sys.windows.basetyps, core.sys.windows.cguid, core.sys.windows.objbase, core.sys.windows.unknwn,
core.sys.windows.windef, core.sys.windows.wtypes;
struct CATEGORYINFO {
CATID catid;
LCID lcid;
- OLECHAR[128] szDescription;
+ OLECHAR[128] szDescription = 0;
}
alias CATEGORYINFO* LPCATEGORYINFO;
}
enum {
- DTM_FIRST = 0x10000,
+ DTM_FIRST = 0x1000,
DTM_GETSYSTEMTIME = 0x1001,
DTM_SETSYSTEMTIME = 0x1002,
DTM_GETRANGE = 0x1003,
struct NMCBEDRAGBEGINW {
NMHDR hdr;
int iItemid;
- WCHAR[CBEMAXSTRLEN] szText;
+ WCHAR[CBEMAXSTRLEN] szText = 0;
}
alias NMCBEDRAGBEGINW* LPNMCBEDRAGBEGINW, PNMCBEDRAGBEGINW;
struct NMCBEDRAGBEGINA {
NMHDR hdr;
int iItemid;
- char[CBEMAXSTRLEN] szText;
+ char[CBEMAXSTRLEN] szText = 0;
}
alias NMCBEDRAGBEGINA* LPNMCBEDRAGBEGINA, PNMCBEDRAGBEGINA;
NMHDR hdr;
BOOL fChanged;
int iNewSelection;
- WCHAR[CBEMAXSTRLEN] szText;
+ WCHAR[CBEMAXSTRLEN] szText = 0;
int iWhy;
}
alias NMCBEENDEDITW* LPNMCBEENDEDITW, PNMCBEENDEDITW;
NMHDR hdr;
BOOL fChanged;
int iNewSelection;
- char[CBEMAXSTRLEN] szText;
+ char[CBEMAXSTRLEN] szText = 0;
int iWhy;
}
alias NMCBEENDEDITA* LPNMCBEENDEDITA, PNMCBEENDEDITA;
struct NMTTDISPINFOA {
NMHDR hdr;
LPSTR lpszText;
- char[80] szText;
+ char[80] szText = 0;
HINSTANCE hinst;
UINT uFlags;
LPARAM lParam;
struct NMTTDISPINFOW {
NMHDR hdr;
LPWSTR lpszText;
- WCHAR[80] szText;
+ WCHAR[80] szText = 0;
HINSTANCE hinst;
UINT uFlags;
LPARAM lParam;
struct NMTTDISPINFOA {
NMHDR hdr;
LPSTR lpszText;
- char[80] szText;
+ char[80] szText = 0;
HINSTANCE hinst;
UINT uFlags;
}
struct NMTTDISPINFOW {
NMHDR hdr;
LPWSTR lpszText;
- WCHAR[80] szText;
+ WCHAR[80] szText = 0;
HINSTANCE hinst;
UINT uFlags;
}
int iLink;
UINT state;
UINT stateMask;
- WCHAR[MAX_LINKID_TEXT] szID;
- WCHAR[L_MAX_URL_LENGTH] szUrl;
+ WCHAR[MAX_LINKID_TEXT] szID = 0;
+ WCHAR[L_MAX_URL_LENGTH] szUrl = 0;
}
alias LITEM* PLITEM;
DWORD dwHelpContext;
LONG_PTR lData;
HICON hIcon;
- CHAR[32] szName;
- CHAR[64] szInfo;
- CHAR[128] szHelpFile;
+ CHAR[32] szName = 0;
+ CHAR[64] szInfo = 0;
+ CHAR[128] szHelpFile = 0;
}
alias NEWCPLINFOA* LPNEWCPLINFOA;
DWORD dwHelpContext;
LONG_PTR lData;
HICON hIcon;
- WCHAR[32] szName;
- WCHAR[64] szInfo;
- WCHAR[128] szHelpFile;
+ WCHAR[32] szName = 0;
+ WCHAR[64] szInfo = 0;
+ WCHAR[128] szHelpFile = 0;
}
alias NEWCPLINFOW* LPNEWCPLINFOW;
struct CCSTYLEA {
DWORD flStyle;
DWORD flExtStyle;
- CHAR[CCHCCTEXT] szText;
+ CHAR[CCHCCTEXT] szText = 0;
LANGID lgid;
WORD wReserved1;
}
struct CCSTYLEW {
DWORD flStyle;
DWORD flExtStyle;
- WCHAR[CCHCCTEXT] szText;
+ WCHAR[CCHCCTEXT] szText = 0;
LANGID lgid;
WORD wReserved1;
}
alias CCSTYLEFLAGW* LPCCSTYLEFLAGW;
struct CCINFOA {
- CHAR[CCHCCCLASS] szClass;
+ CHAR[CCHCCCLASS] szClass = 0;
DWORD flOptions;
- CHAR[CCHCCDESC] szDesc;
+ CHAR[CCHCCDESC] szDesc = 0;
UINT cxDefault;
UINT cyDefault;
DWORD flStyleDefault;
DWORD flExtStyleDefault;
DWORD flCtrlTypeMask;
- CHAR[CCHCCTEXT] szTextDefault;
+ CHAR[CCHCCTEXT] szTextDefault = 0;
INT cStyleFlags;
LPCCSTYLEFLAGA aStyleFlags;
LPFNCCSTYLEA lpfnStyle;
alias CCINFOA* LPCCINFOA;
struct CCINFOW {
- WCHAR[CCHCCCLASS] szClass;
+ WCHAR[CCHCCCLASS] szClass = 0;
DWORD flOptions;
- WCHAR[CCHCCDESC] szDesc;
+ WCHAR[CCHCCDESC] szDesc = 0;
UINT cxDefault;
UINT cyDefault;
DWORD flStyleDefault;
DWORD flExtStyleDefault;
DWORD flCtrlTypeMask;
- WCHAR[CCHCCTEXT] szTextDefault;
+ WCHAR[CCHCCTEXT] szTextDefault = 0;
INT cStyleFlags;
LPCCSTYLEFLAGW aStyleFlags;
LPFNCCSTYLEW lpfnStyle;
module core.sys.windows.dbghelp;
version (Windows):
-import core.sys.windows.windows;
+import core.sys.windows.winbase /+: FreeLibrary, GetProcAddress, LoadLibraryA+/;
+import core.sys.windows.windef;
public import core.sys.windows.dbghelp_types;
version (ANSI) {} else version = Unicode;
-import core.sys.windows.windows;
+import core.sys.windows.windef;
+import core.sys.windows.imagehlp /+: ADDRESS_MODE+/;
public import core.sys.windows.winnt : TCHAR;
DWORD CheckSum;
DWORD NumSyms;
SYM_TYPE SymType;
- CHAR[32] ModuleName;
- CHAR[256] ImageName;
- CHAR[256] LoadedImageName;
+ CHAR[32] ModuleName = 0;
+ CHAR[256] ImageName = 0;
+ CHAR[256] LoadedImageName = 0;
// new elements: 07-Jun-2002
version (none)
{
- CHAR[256] LoadedPdbName;
+ CHAR[256] LoadedPdbName = 0;
DWORD CVSig;
- CHAR[MAX_PATH*3] CVData;
+ CHAR[MAX_PATH*3] CVData = 0;
DWORD PdbSig;
GUID PdbSig70;
DWORD PdbAge;
DWORD CheckSum;
DWORD NumSyms;
SYM_TYPE SymType;
- WCHAR[32] ModuleName;
- WCHAR[256] ImageName;
- WCHAR[256] LoadedImageName;
+ WCHAR[32] ModuleName = 0;
+ WCHAR[256] ImageName = 0;
+ WCHAR[256] LoadedImageName = 0;
// new elements: 07-Jun-2002
version (none)
{
- WCHAR[256] LoadedPdbName;
+ WCHAR[256] LoadedPdbName = 0;
DWORD CVSig;
- WCHAR[MAX_PATH*3] CVData;
+ WCHAR[MAX_PATH*3] CVData = 0;
DWORD PdbSig;
GUID PdbSig70;
DWORD PdbAge;
DWORD Size;
DWORD Flags;
DWORD MaxNameLength;
- CHAR[1] Name;
+ CHAR[1] Name = 0;
}
struct IMAGEHLP_SYMBOLW64
{
DWORD Size;
DWORD Flags;
DWORD MaxNameLength;
- WCHAR[1] Name;
+ WCHAR[1] Name = 0;
}
DWORD dbcp_size = DEV_BROADCAST_PORT_A.sizeof;
DWORD dbcp_devicetype;
DWORD dbcp_reserved;
- char _dbcp_name;
+ char _dbcp_name = 0;
char* dbcp_name() return { return &_dbcp_name; }
}
alias DEV_BROADCAST_PORT_A* PDEV_BROADCAST_PORT_A;
DWORD dbcp_size = DEV_BROADCAST_PORT_W.sizeof;
DWORD dbcp_devicetype;
DWORD dbcp_reserved;
- WCHAR _dbcp_name;
+ WCHAR _dbcp_name = 0;
WCHAR* dbcp_name() return { return &_dbcp_name; }
}
alias DEV_BROADCAST_PORT_W* PDEV_BROADCAST_PORT_W;
struct DEV_BROADCAST_USERDEFINED {
DEV_BROADCAST_HDR dbud_dbh;
- char _dbud_szName;
+ char _dbud_szName = 0;
char* dbud_szName() return { return &_dbud_szName; }
}
DWORD dbcc_devicetype;
DWORD dbcc_reserved;
GUID dbcc_classguid;
- WCHAR _dbcc_name;
+ WCHAR _dbcc_name = 0;
WCHAR* dbcc_name() return { return &_dbcc_name; }
}
alias DEV_BROADCAST_DEVICEINTERFACE_W* PDEV_BROADCAST_DEVICEINTERFACE_W;
DWORD dwTime;
HSZ hsz;
HANDLE hTask;
- TCHAR[1] _str;
+ TCHAR[1] _str = 0;
TCHAR* str() return { return _str.ptr; }
}
module core.sys.windows.dll;
version (Windows):
-import core.sys.windows.windows;
+import core.sys.windows.winbase;
+import core.sys.windows.winnt;
import core.stdc.string;
import core.runtime;
/// ---
mixin template SimpleDllMain()
{
- import core.sys.windows.windows : HINSTANCE;
+ import core.sys.windows.windef : HINSTANCE;
extern(Windows)
bool DllMain(HINSTANCE hInstance, uint ulReason, void* reserved)
{
- import core.sys.windows.windows;
+ import core.sys.windows.winnt;
import core.sys.windows.dll :
dll_process_attach, dll_process_detach,
dll_thread_attach, dll_thread_detach;
DWORD cmdtextf;
ULONG cwActual;
ULONG cwBuf;
- wchar[1] rgwz;
+ wchar[1] rgwz = 0;
}
struct OLECMD {
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/
-private import core.sys.windows.windows;
+private import core.sys.windows.basetsd /+: DECLARE_HANDLE, HANDLE+/;
+private import core.sys.windows.windef /+: BOOL, CHAR, DWORD, LPBYTE, LPDWORD+/;
+private import core.sys.windows.winnt /+: LPCSTR, LPSTR, LPVOID, PVOID, VOID+/;
enum {
HSE_VERSION_MAJOR = 2,
struct HSE_VERSION_INFO {
DWORD dwExtensionVersion;
- CHAR[HSE_MAX_EXT_DLL_NAME_LEN] lpszExtensionDesc;
+ CHAR[HSE_MAX_EXT_DLL_NAME_LEN] lpszExtensionDesc = 0;
}
alias HSE_VERSION_INFO* LPHSE_VERSION_INFO;
DWORD dwVersion;
HCONN ConnID;
DWORD dwHttpStatusCode;
- CHAR[HSE_LOG_BUFFER_LEN] lpszLogData;
+ CHAR[HSE_LOG_BUFFER_LEN] lpszLogData = 0;
LPSTR lpszMethod;
LPSTR lpszQueryString;
LPSTR lpszPathInfo;
DWORD cbAvailable;
LPBYTE lpbData;
LPSTR lpszContentType;
- extern(Pascal) BOOL function(HCONN, LPSTR, LPVOID, LPDWORD)
- GetServerVariable;
- extern(Pascal) BOOL function(HCONN, LPVOID, LPDWORD, DWORD) WriteClient;
- extern(Pascal) BOOL function(HCONN, LPVOID, LPDWORD) ReadClient;
- extern(Pascal) BOOL function(HCONN, DWORD, LPVOID, LPDWORD, LPDWORD)
- ServerSupportFunction;
+ extern (Windows) {
+ BOOL function(HCONN, LPSTR, LPVOID, LPDWORD) GetServerVariable;
+ BOOL function(HCONN, LPVOID, LPDWORD, DWORD) WriteClient;
+ BOOL function(HCONN, LPVOID, LPDWORD) ReadClient;
+ BOOL function(HCONN, DWORD, LPVOID, LPDWORD, LPDWORD) ServerSupportFunction;
+ }
}
alias EXTENSION_CONTROL_BLOCK* LPEXTENSION_CONTROL_BLOCK;
-extern (Pascal) {
+extern (Windows) {
alias BOOL function(HSE_VERSION_INFO*) PFN_GETEXTENSIONVERSION;
alias DWORD function(EXTENSION_CONTROL_BLOCK*) PFN_HTTPEXTENSIONPROC;
alias BOOL function(DWORD) PFN_TERMINATEEXTENSION;
}
alias HSE_SEND_HEADER_EX_INFO* LPHSE_SEND_HEADER_EX_INF;
-extern (Pascal) {
+extern (Windows) {
BOOL GetExtensionVersion(HSE_VERSION_INFO*);
DWORD HttpExtensionProc(EXTENSION_CONTROL_BLOCK*);
BOOL TerminateExtension(DWORD);
DWORD Size;
DWORD Flags;
DWORD MaxNameLength;
- CHAR[1] Name;
+ CHAR[1] Name = 0;
}
alias IMAGEHLP_SYMBOL* PIMAGEHLP_SYMBOL;
DWORD CheckSum;
DWORD NumSyms;
SYM_TYPE SymType;
- CHAR[32] ModuleName;
- CHAR[256] ImageName;
- CHAR[256] LoadedImageName;
+ CHAR[32] ModuleName = 0;
+ CHAR[256] ImageName = 0;
+ CHAR[256] LoadedImageName = 0;
}
alias IMAGEHLP_MODULE* PIMAGEHLP_MODULE;
DWORD BaseOfImage;
DWORD CheckSum;
DWORD TimeDateStamp;
- CHAR[MAX_PATH] FileName;
+ CHAR[MAX_PATH] FileName = 0;
BOOLEAN Reparse;
}
alias IMAGEHLP_DEFERRED_SYMBOL_LOAD* PIMAGEHLP_DEFERRED_SYMBOL_LOAD;
struct STYLEBUFA{
DWORD dwStyle;
- CHAR[STYLE_DESCRIPTION_SIZE] szDescription;
+ CHAR[STYLE_DESCRIPTION_SIZE] szDescription = 0;
}
alias STYLEBUFA* PSTYLEBUFA, LPSTYLEBUFA;
struct STYLEBUFW{
DWORD dwStyle;
- WCHAR[STYLE_DESCRIPTION_SIZE] szDescription;
+ WCHAR[STYLE_DESCRIPTION_SIZE] szDescription = 0;
}
alias STYLEBUFW* PSTYLEBUFW, LPSTYLEBUFW;
HBITMAP hbmpChecked;
HBITMAP hbmpUnchecked;
DWORD dwItemData;
- CHAR[IMEMENUITEM_STRING_SIZE] szString;
+ CHAR[IMEMENUITEM_STRING_SIZE] szString = 0;
HBITMAP hbmpItem;
}
alias IMEMENUITEMINFOA* PIMEMENUITEMINFOA, LPIMEMENUITEMINFOA;
HBITMAP hbmpChecked;
HBITMAP hbmpUnchecked;
DWORD dwItemData;
- WCHAR[IMEMENUITEM_STRING_SIZE] szString;
+ WCHAR[IMEMENUITEM_STRING_SIZE] szString = 0;
HBITMAP hbmpItem;
}
alias IMEMENUITEMINFOW* PIMEMENUITEMINFOW, LPIMEMENUITEMINFOW;
struct IP_ADAPTER_INDEX_MAP {
ULONG Index;
- WCHAR[MAX_ADAPTER_NAME] Name;
+ WCHAR[MAX_ADAPTER_NAME] Name = 0;
}
alias IP_ADAPTER_INDEX_MAP* PIP_ADAPTER_INDEX_MAP;
alias MIB_ICMP* PMIB_ICMP;
struct MIB_IFROW {
- WCHAR[MAX_INTERFACE_NAME_LEN] wszName;
+ WCHAR[MAX_INTERFACE_NAME_LEN] wszName = 0;
DWORD dwIndex;
DWORD dwType;
DWORD dwMtu;
}
struct IP_ADDRESS_STRING {
- char[16] String;
+ char[16] String = 0;
}
alias IP_ADDRESS_STRING IP_MASK_STRING;
alias IP_ADDRESS_STRING* PIP_ADDRESS_STRING, PIP_MASK_STRING;
struct IP_ADAPTER_INFO {
IP_ADAPTER_INFO* Next;
DWORD ComboIndex;
- char[MAX_ADAPTER_NAME_LENGTH+4] AdapterName;
- char[MAX_ADAPTER_DESCRIPTION_LENGTH+4] Description;
+ char[MAX_ADAPTER_NAME_LENGTH+4] AdapterName = 0;
+ char[MAX_ADAPTER_DESCRIPTION_LENGTH+4] Description = 0;
UINT AddressLength;
- BYTE[MAX_ADAPTER_ADDRESS_LENGTH] Address;
+ BYTE[MAX_ADAPTER_ADDRESS_LENGTH] Address = 0;
DWORD Index;
UINT Type;
UINT DhcpEnabled;
alias IP_PER_ADAPTER_INFO* PIP_PER_ADAPTER_INFO;
struct FIXED_INFO {
- char[MAX_HOSTNAME_LEN+4] HostName;
- char[MAX_DOMAIN_NAME_LEN+4] DomainName;
+ char[MAX_HOSTNAME_LEN+4] HostName = 0;
+ char[MAX_DOMAIN_NAME_LEN+4] DomainName = 0;
PIP_ADDR_STRING CurrentDnsServer;
IP_ADDR_STRING DnsServerList;
UINT NodeType;
- char[MAX_SCOPE_ID_LEN+4] ScopeId;
+ char[MAX_SCOPE_ID_LEN+4] ScopeId = 0;
UINT EnableRouting;
UINT EnableProxy;
UINT EnableDns;
struct STD_ALERT{
DWORD alrt_timestamp;
- TCHAR[EVLEN+1] alrt_eventname;
- TCHAR[SNLEN+1] alrt_servicename;
+ TCHAR[EVLEN+1] alrt_eventname = 0;
+ TCHAR[SNLEN+1] alrt_servicename = 0;
}
alias STD_ALERT* PSTD_ALERT, LPSTD_ALERT;
}
alias MapiMessage* lpMapiMessage;
-extern (Pascal) {
+extern (Windows) {
ULONG MAPILogon(ULONG_PTR, LPSTR, LPSTR, FLAGS, ULONG, LPLHANDLE);
ULONG MAPISendMail(LHANDLE, ULONG_PTR, lpMapiMessage, FLAGS, ULONG);
ULONG MAPISendDocuments(ULONG_PTR, LPSTR, LPSTR, LPSTR, ULONG);
WORD wMid;
WORD wPid;
MMVERSION vDriverVersion;
- CHAR[MAXPNAMELEN] szPname;
+ CHAR[MAXPNAMELEN] szPname = 0;
DWORD dwFormats;
WORD wChannels;
WORD wReserved1;
WORD wMid;
WORD wPid;
MMVERSION vDriverVersion;
- WCHAR[MAXPNAMELEN] szPname;
+ WCHAR[MAXPNAMELEN] szPname = 0;
DWORD dwFormats;
WORD wChannels;
WORD wReserved1;
WORD wMid;
WORD wPid;
MMVERSION vDriverVersion;
- CHAR[MAXPNAMELEN] szPname;
+ CHAR[MAXPNAMELEN] szPname = 0;
DWORD dwFormats;
WORD wChannels;
WORD wReserved1;
WORD wMid;
WORD wPid;
MMVERSION vDriverVersion;
- WCHAR[MAXPNAMELEN] szPname;
+ WCHAR[MAXPNAMELEN] szPname = 0;
DWORD dwFormats;
WORD wChannels;
WORD wReserved1;
WORD wMid;
WORD wPid;
MMVERSION vDriverVersion;
- CHAR[MAXPNAMELEN] szPname;
+ CHAR[MAXPNAMELEN] szPname = 0;
WORD wTechnology;
WORD wVoices;
WORD wNotes;
WORD wMid;
WORD wPid;
MMVERSION vDriverVersion;
- WCHAR[MAXPNAMELEN] szPname;
+ WCHAR[MAXPNAMELEN] szPname = 0;
WORD wTechnology;
WORD wVoices;
WORD wNotes;
WORD wMid;
WORD wPid;
MMVERSION vDriverVersion;
- CHAR[MAXPNAMELEN] szPname;
+ CHAR[MAXPNAMELEN] szPname = 0;
DWORD dwSupport;
}
alias MIDIINCAPSA* PMIDIINCAPSA, LPMIDIINCAPSA;
WORD wMid;
WORD wPid;
MMVERSION vDriverVersion;
- WCHAR[MAXPNAMELEN] szPname;
+ WCHAR[MAXPNAMELEN] szPname = 0;
DWORD dwSupport;
}
alias MIDIINCAPSW* PMIDIINCAPSW, LPMIDIINCAPSW;
WORD wMid;
WORD wPid;
MMVERSION vDriverVersion;
- CHAR[MAXPNAMELEN] szPname;
+ CHAR[MAXPNAMELEN] szPname = 0;
WORD wTechnology;
WORD wReserved1;
DWORD dwSupport;
WORD wMid;
WORD wPid;
MMVERSION vDriverVersion;
- WCHAR[MAXPNAMELEN] szPname;
+ WCHAR[MAXPNAMELEN] szPname = 0;
WORD wTechnology;
WORD wReserved1;
DWORD dwSupport;
WORD wMid;
WORD wPid;
MMVERSION vDriverVersion;
- CHAR[MAXPNAMELEN] szPname;
+ CHAR[MAXPNAMELEN] szPname = 0;
DWORD fdwSupport;
DWORD cDestinations;
}
WORD wMid;
WORD wPid;
MMVERSION vDriverVersion;
- WCHAR[MAXPNAMELEN] szPname;
+ WCHAR[MAXPNAMELEN] szPname = 0;
DWORD fdwSupport;
DWORD cDestinations;
}
DWORD cChannels;
DWORD cConnections;
DWORD cControls;
- CHAR[MIXER_SHORT_NAME_CHARS] szShortName;
- CHAR[MIXER_LONG_NAME_CHARS] szName;
+ CHAR[MIXER_SHORT_NAME_CHARS] szShortName = 0;
+ CHAR[MIXER_LONG_NAME_CHARS] szName = 0;
struct _Target {
DWORD dwType;
DWORD dwDeviceID;
WORD wMid;
WORD wPid;
MMVERSION vDriverVersion;
- CHAR[MAXPNAMELEN] szPname;
+ CHAR[MAXPNAMELEN] szPname = 0;
}
_Target Target;
}
DWORD cChannels;
DWORD cConnections;
DWORD cControls;
- WCHAR[MIXER_SHORT_NAME_CHARS] szShortName;
- WCHAR[MIXER_LONG_NAME_CHARS] szName;
+ WCHAR[MIXER_SHORT_NAME_CHARS] szShortName = 0;
+ WCHAR[MIXER_LONG_NAME_CHARS] szName = 0;
struct _Target {
DWORD dwType;
DWORD dwDeviceID;
WORD wMid;
WORD wPid;
MMVERSION vDriverVersion;
- WCHAR[MAXPNAMELEN] szPname;
+ WCHAR[MAXPNAMELEN] szPname = 0;
}
_Target Target;
}
DWORD dwControlType;
DWORD fdwControl;
DWORD cMultipleItems;
- CHAR[MIXER_SHORT_NAME_CHARS] szShortName;
- CHAR[MIXER_LONG_NAME_CHARS] szName;
+ CHAR[MIXER_SHORT_NAME_CHARS] szShortName = 0;
+ CHAR[MIXER_LONG_NAME_CHARS] szName = 0;
union _Bounds {
struct {
LONG lMinimum;
DWORD dwControlType;
DWORD fdwControl;
DWORD cMultipleItems;
- WCHAR[MIXER_SHORT_NAME_CHARS] szShortName;
- WCHAR[MIXER_LONG_NAME_CHARS] szName;
+ WCHAR[MIXER_SHORT_NAME_CHARS] szShortName = 0;
+ WCHAR[MIXER_LONG_NAME_CHARS] szName = 0;
union _Bounds {
struct {
LONG lMinimum;
struct MIXERCONTROLDETAILS_LISTTEXTA {
DWORD dwParam1;
DWORD dwParam2;
- CHAR[MIXER_LONG_NAME_CHARS] szName;
+ CHAR[MIXER_LONG_NAME_CHARS] szName = 0;
}
alias MIXERCONTROLDETAILS_LISTTEXTA* PMIXERCONTROLDETAILS_LISTTEXTA, LPMIXERCONTROLDETAILS_LISTTEXTA;
struct MIXERCONTROLDETAILS_LISTTEXTW {
DWORD dwParam1;
DWORD dwParam2;
- WCHAR[MIXER_LONG_NAME_CHARS] szName;
+ WCHAR[MIXER_LONG_NAME_CHARS] szName = 0;
}
alias MIXERCONTROLDETAILS_LISTTEXTW* PMIXERCONTROLDETAILS_LISTTEXTW, LPMIXERCONTROLDETAILS_LISTTEXTW;
struct JOYCAPSA {
WORD wMid;
WORD wPid;
- CHAR[MAXPNAMELEN] szPname;
+ CHAR[MAXPNAMELEN] szPname = 0;
UINT wXmin;
UINT wXmax;
UINT wYmin;
UINT wMaxAxes;
UINT wNumAxes;
UINT wMaxButtons;
- CHAR[MAXPNAMELEN] szRegKey;
- CHAR[MAX_JOYSTICKOEMVXDNAME] szOEMVxD;
+ CHAR[MAXPNAMELEN] szRegKey = 0;
+ CHAR[MAX_JOYSTICKOEMVXDNAME] szOEMVxD = 0;
}
alias JOYCAPSA* PJOYCAPSA, LPJOYCAPSA;
struct JOYCAPSW {
WORD wMid;
WORD wPid;
- WCHAR[MAXPNAMELEN] szPname;
+ WCHAR[MAXPNAMELEN] szPname = 0;
UINT wXmin;
UINT wXmax;
UINT wYmin;
UINT wMaxAxes;
UINT wNumAxes;
UINT wMaxButtons;
- WCHAR[MAXPNAMELEN] szRegKey;
- WCHAR[MAX_JOYSTICKOEMVXDNAME] szOEMVxD;
+ WCHAR[MAXPNAMELEN] szRegKey = 0;
+ WCHAR[MAX_JOYSTICKOEMVXDNAME] szOEMVxD = 0;
}
alias JOYCAPSW* PJOYCAPSW, LPJOYCAPSW;
DWORD fdwSupport;
LPWAVEFORMATEX pwfx;
DWORD cbwfx;
- char[ACMFORMATDETAILS_FORMAT_CHARS] szFormat;
+ char[ACMFORMATDETAILS_FORMAT_CHARS] szFormat = 0;
}
alias ACMFORMATDETAILSA* LPACMFORMATDETAILSA;
DWORD fdwSupport;
LPWAVEFORMATEX pwfx;
DWORD cbwfx;
- WCHAR[ACMFORMATDETAILS_FORMAT_CHARS] szFormat;
+ WCHAR[ACMFORMATDETAILS_FORMAT_CHARS] szFormat = 0;
}
alias ACMFORMATDETAILSW* LPACMFORMATDETAILSW;
DWORD cbFormatSize;
DWORD fdwSupport;
DWORD cStandardFormats;
- char[ACMFORMATTAGDETAILS_FORMATTAG_CHARS] szFormatTag;
+ char[ACMFORMATTAGDETAILS_FORMATTAG_CHARS] szFormatTag = 0;
}
alias ACMFORMATTAGDETAILSA* LPACMFORMATTAGDETAILSA;
DWORD cbFormatSize;
DWORD fdwSupport;
DWORD cStandardFormats;
- WCHAR[ACMFORMATTAGDETAILS_FORMATTAG_CHARS] szFormatTag;
+ WCHAR[ACMFORMATTAGDETAILS_FORMATTAG_CHARS] szFormatTag = 0;
}
alias ACMFORMATTAGDETAILSW* LPACMFORMATTAGDETAILSW;
DWORD cFormatTags;
DWORD cFilterTags;
HICON hicon;
- char[ACMDRIVERDETAILS_SHORTNAME_CHARS] szShortName;
- char[ACMDRIVERDETAILS_LONGNAME_CHARS] szLongName;
- char[ACMDRIVERDETAILS_COPYRIGHT_CHARS] szCopyright;
- char[ACMDRIVERDETAILS_LICENSING_CHARS] szLicensing;
- char[ACMDRIVERDETAILS_FEATURES_CHARS] szFeatures;
+ char[ACMDRIVERDETAILS_SHORTNAME_CHARS] szShortName = 0;
+ char[ACMDRIVERDETAILS_LONGNAME_CHARS] szLongName = 0;
+ char[ACMDRIVERDETAILS_COPYRIGHT_CHARS] szCopyright = 0;
+ char[ACMDRIVERDETAILS_LICENSING_CHARS] szLicensing = 0;
+ char[ACMDRIVERDETAILS_FEATURES_CHARS] szFeatures = 0;
}
alias ACMDRIVERDETAILSA* LPACMDRIVERDETAILSA;
DWORD cFormatTags;
DWORD cFilterTags;
HICON hicon;
- WCHAR[ACMDRIVERDETAILS_SHORTNAME_CHARS] szShortName;
- WCHAR[ACMDRIVERDETAILS_LONGNAME_CHARS] szLongName;
- WCHAR[ACMDRIVERDETAILS_COPYRIGHT_CHARS] szCopyright;
- WCHAR[ACMDRIVERDETAILS_LICENSING_CHARS] szLicensing;
- WCHAR[ACMDRIVERDETAILS_FEATURES_CHARS] szFeatures;
+ WCHAR[ACMDRIVERDETAILS_SHORTNAME_CHARS] szShortName = 0;
+ WCHAR[ACMDRIVERDETAILS_LONGNAME_CHARS] szLongName = 0;
+ WCHAR[ACMDRIVERDETAILS_COPYRIGHT_CHARS] szCopyright = 0;
+ WCHAR[ACMDRIVERDETAILS_LICENSING_CHARS] szLicensing = 0;
+ WCHAR[ACMDRIVERDETAILS_FEATURES_CHARS] szFeatures = 0;
}
alias ACMDRIVERDETAILSW* LPACMDRIVERDETAILSW;
struct RemSNB {
uint ulCntStr;
uint ulCntChar;
- OLECHAR[1] rgString;
+ OLECHAR[1] rgString = 0;
}
enum ADVF {
WORD wReserved2;
WORD wReserved3;
union {
- CHAR cVal;
+ CHAR cVal = 0;
UCHAR bVal;
short iVal;
USHORT uiVal;
version (ANSI) {} else version = Unicode;
-import core.sys.windows.commdlg, core.sys.windows.dlgs, core.sys.windows.ole2, core.sys.windows.prsht, core.sys.windows.shellapi,
- core.sys.windows.windows;
+import core.sys.windows.commdlg, core.sys.windows.dlgs, core.sys.windows.ole2, core.sys.windows.prsht, core.sys.windows.shellapi;
private import core.sys.windows.winbase, core.sys.windows.objidl, core.sys.windows.objfwd, core.sys.windows.winnt;
// FIXME: remove inherited methods from interface definitions
HRSRC hResource;
HGLOBAL hMetaPict;
CLSID clsid;
- WCHAR[MAX_PATH] szIconExe;
+ WCHAR[MAX_PATH] szIconExe = 0;
int cchIconExe;
}
alias OLEUICHANGEICONW* POLEUICHANGEICONW, LPOLEUICHANGEICONW;
HRSRC hResource;
HGLOBAL hMetaPict;
CLSID clsid;
- CHAR[MAX_PATH] szIconExe;
+ CHAR[MAX_PATH] szIconExe = 0;
int cchIconExe;
}
alias OLEUICHANGEICONA* POLEUICHANGEICONA, LPOLEUICHANGEICONA;
DWORD dwSize;
HRASCONN hrasconn;
align {
- WCHAR[RAS_MaxEntryName + 1] szEntryName;
- WCHAR[RAS_MaxDeviceType + 1] szDeviceType;
- WCHAR[RAS_MaxDeviceName + 1] szDeviceName;
+ WCHAR[RAS_MaxEntryName + 1] szEntryName = 0;
+ WCHAR[RAS_MaxDeviceType + 1] szDeviceType = 0;
+ WCHAR[RAS_MaxDeviceName + 1] szDeviceName = 0;
}
//static if (_WIN32_WINNT >= 0x401) {
- WCHAR[MAX_PATH] szPhonebook;
+ WCHAR[MAX_PATH] szPhonebook = 0;
DWORD dwSubEntry;
//}
//static if (_WIN32_WINNT >= 0x500) {
DWORD dwSize;
HRASCONN hrasconn;
align {
- CHAR[RAS_MaxEntryName + 1] szEntryName;
- CHAR[RAS_MaxDeviceType + 1] szDeviceType;
- CHAR[RAS_MaxDeviceName + 1] szDeviceName;
+ CHAR[RAS_MaxEntryName + 1] szEntryName = 0;
+ CHAR[RAS_MaxDeviceType + 1] szDeviceType = 0;
+ CHAR[RAS_MaxDeviceName + 1] szDeviceName = 0;
}
//static if (_WIN32_WINNT >= 0x401) {
- CHAR[MAX_PATH] szPhonebook;
+ CHAR[MAX_PATH] szPhonebook = 0;
DWORD dwSubEntry;
//}
//static if (_WIN32_WINNT >= 0x500) {
DWORD dwSize;
RASCONNSTATE rasconnstate;
DWORD dwError;
- WCHAR[RAS_MaxDeviceType + 1] szDeviceType;
- WCHAR[RAS_MaxDeviceName + 1] szDeviceName;
+ WCHAR[RAS_MaxDeviceType + 1] szDeviceType = 0;
+ WCHAR[RAS_MaxDeviceName + 1] szDeviceName = 0;
static if (_WIN32_WINNT >= 0x401) {
- WCHAR[RAS_MaxPhoneNumber + 1] szPhoneNumber;
+ WCHAR[RAS_MaxPhoneNumber + 1] szPhoneNumber = 0;
}
}
alias RASCONNSTATUSW* LPRASCONNSTATUSW;
DWORD dwSize;
RASCONNSTATE rasconnstate;
DWORD dwError;
- CHAR[RAS_MaxDeviceType + 1] szDeviceType;
- CHAR[RAS_MaxDeviceName + 1] szDeviceName;
+ CHAR[RAS_MaxDeviceType + 1] szDeviceType = 0;
+ CHAR[RAS_MaxDeviceName + 1] szDeviceName = 0;
static if (_WIN32_WINNT >= 0x401) {
- CHAR[RAS_MaxPhoneNumber + 1] szPhoneNumber;
+ CHAR[RAS_MaxPhoneNumber + 1] szPhoneNumber = 0;
}
}
alias RASCONNSTATUSA* LPRASCONNSTATUSA;
align(4):
DWORD dwSize;
align {
- WCHAR[RAS_MaxEntryName + 1] szEntryName;
- WCHAR[RAS_MaxPhoneNumber + 1] szPhoneNumber;
- WCHAR[RAS_MaxCallbackNumber + 1] szCallbackNumber;
- WCHAR[UNLEN + 1] szUserName;
- WCHAR[PWLEN + 1] szPassword;
- WCHAR[DNLEN + 1] szDomain;
+ WCHAR[RAS_MaxEntryName + 1] szEntryName = 0;
+ WCHAR[RAS_MaxPhoneNumber + 1] szPhoneNumber = 0;
+ WCHAR[RAS_MaxCallbackNumber + 1] szCallbackNumber = 0;
+ WCHAR[UNLEN + 1] szUserName = 0;
+ WCHAR[PWLEN + 1] szPassword = 0;
+ WCHAR[DNLEN + 1] szDomain = 0;
}
static if (_WIN32_WINNT >= 0x401) {
DWORD dwSubEntry;
align(4):
DWORD dwSize;
align {
- CHAR[RAS_MaxEntryName + 1] szEntryName;
- CHAR[RAS_MaxPhoneNumber + 1] szPhoneNumber;
- CHAR[RAS_MaxCallbackNumber + 1] szCallbackNumber;
- CHAR[UNLEN + 1] szUserName;
- CHAR[PWLEN + 1] szPassword;
- CHAR[DNLEN + 1] szDomain;
+ CHAR[RAS_MaxEntryName + 1] szEntryName = 0;
+ CHAR[RAS_MaxPhoneNumber + 1] szPhoneNumber = 0;
+ CHAR[RAS_MaxCallbackNumber + 1] szCallbackNumber = 0;
+ CHAR[UNLEN + 1] szUserName = 0;
+ CHAR[PWLEN + 1] szPassword = 0;
+ CHAR[DNLEN + 1] szDomain = 0;
}
static if (_WIN32_WINNT >= 0x401) {
DWORD dwSubEntry;
struct RASENTRYNAMEW {
DWORD dwSize;
- WCHAR[RAS_MaxEntryName + 1] szEntryName;
+ WCHAR[RAS_MaxEntryName + 1] szEntryName = 0;
//static if (_WIN32_WINNT >= 0x500) {
DWORD dwFlags;
- WCHAR[MAX_PATH + 1] szPhonebookPath;
+ WCHAR[MAX_PATH + 1] szPhonebookPath = 0;
//}
}
alias RASENTRYNAMEW* LPRASENTRYNAMEW;
struct RASENTRYNAMEA{
DWORD dwSize;
- CHAR[RAS_MaxEntryName + 1] szEntryName;
+ CHAR[RAS_MaxEntryName + 1] szEntryName = 0;
//static if (_WIN32_WINNT >= 0x500) {
DWORD dwFlags;
- CHAR[MAX_PATH + 1] szPhonebookPath;
+ CHAR[MAX_PATH + 1] szPhonebookPath = 0;
//}
}
alias RASENTRYNAMEA* LPRASENTRYNAMEA;
struct RASAMBW{
DWORD dwSize;
DWORD dwError;
- WCHAR[NETBIOS_NAME_LEN + 1] szNetBiosError;
+ WCHAR[NETBIOS_NAME_LEN + 1] szNetBiosError = 0;
BYTE bLana;
}
alias RASAMBW* LPRASAMBW;
struct RASAMBA{
DWORD dwSize;
DWORD dwError;
- CHAR[NETBIOS_NAME_LEN + 1] szNetBiosError;
+ CHAR[NETBIOS_NAME_LEN + 1] szNetBiosError = 0;
BYTE bLana;
}
alias RASAMBA* LPRASAMBA;
DWORD dwSize;
DWORD dwError;
DWORD dwNetBiosError;
- WCHAR[NETBIOS_NAME_LEN + 1] szNetBiosError;
- WCHAR[NETBIOS_NAME_LEN + 1] szWorkstationName;
+ WCHAR[NETBIOS_NAME_LEN + 1] szNetBiosError = 0;
+ WCHAR[NETBIOS_NAME_LEN + 1] szWorkstationName = 0;
BYTE bLana;
}
alias RASPPPNBFW* LPRASPPPNBFW;
DWORD dwSize;
DWORD dwError;
DWORD dwNetBiosError;
- CHAR[NETBIOS_NAME_LEN + 1] szNetBiosError;
- CHAR[NETBIOS_NAME_LEN + 1] szWorkstationName;
+ CHAR[NETBIOS_NAME_LEN + 1] szNetBiosError = 0;
+ CHAR[NETBIOS_NAME_LEN + 1] szWorkstationName = 0;
BYTE bLana;
}
alias RASPPPNBFA* LPRASPPPNBFA;
struct RASPPPIPXW {
DWORD dwSize;
DWORD dwError;
- WCHAR[RAS_MaxIpxAddress + 1] szIpxAddress;
+ WCHAR[RAS_MaxIpxAddress + 1] szIpxAddress = 0;
}
alias RASPPPIPXW* LPRASPPPIPXW;
struct RASPPPIPXA {
DWORD dwSize;
DWORD dwError;
- CHAR[RAS_MaxIpxAddress + 1] szIpxAddress;
+ CHAR[RAS_MaxIpxAddress + 1] szIpxAddress = 0;
}
alias RASPPPIPXA* LPRASPPPIPXA;
struct RASPPPIPW{
DWORD dwSize;
DWORD dwError;
- WCHAR[RAS_MaxIpAddress + 1] szIpAddress;
+ WCHAR[RAS_MaxIpAddress + 1] szIpAddress = 0;
//#ifndef WINNT35COMPATIBLE
- WCHAR[RAS_MaxIpAddress + 1] szServerIpAddress;
+ WCHAR[RAS_MaxIpAddress + 1] szServerIpAddress = 0;
//#endif
//static if (_WIN32_WINNT >= 0x500) {
DWORD dwOptions;
struct RASPPPIPA{
DWORD dwSize;
DWORD dwError;
- CHAR[RAS_MaxIpAddress + 1] szIpAddress;
+ CHAR[RAS_MaxIpAddress + 1] szIpAddress = 0;
//#ifndef WINNT35COMPATIBLE
- CHAR[RAS_MaxIpAddress + 1] szServerIpAddress;
+ CHAR[RAS_MaxIpAddress + 1] szServerIpAddress = 0;
//#endif
//static if (_WIN32_WINNT >= 0x500) {
DWORD dwOptions;
BOOL fMultilink;
DWORD dwTerminateReason;
DWORD dwServerTerminateReason;
- WCHAR[RAS_MaxReplyMessage] szReplyMessage;
+ WCHAR[RAS_MaxReplyMessage] szReplyMessage = 0;
DWORD dwOptions;
DWORD dwServerOptions;
//}
BOOL fMultilink;
DWORD dwTerminateReason;
DWORD dwServerTerminateReason;
- CHAR[RAS_MaxReplyMessage] szReplyMessage;
+ CHAR[RAS_MaxReplyMessage] szReplyMessage = 0;
DWORD dwOptions;
DWORD dwServerOptions;
//}
struct RASSLIPW{
DWORD dwSize;
DWORD dwError;
- WCHAR[RAS_MaxIpAddress + 1] szIpAddress;
+ WCHAR[RAS_MaxIpAddress + 1] szIpAddress = 0;
}
alias RASSLIPW* LPRASSLIPW;
struct RASSLIPA{
DWORD dwSize;
DWORD dwError;
- CHAR[RAS_MaxIpAddress + 1] szIpAddress;
+ CHAR[RAS_MaxIpAddress + 1] szIpAddress = 0;
}
alias RASSLIPA* LPRASSLIPA;
struct RASDEVINFOW{
DWORD dwSize;
- WCHAR[RAS_MaxDeviceType + 1] szDeviceType;
- WCHAR[RAS_MaxDeviceName + 1] szDeviceName;
+ WCHAR[RAS_MaxDeviceType + 1] szDeviceType = 0;
+ WCHAR[RAS_MaxDeviceName + 1] szDeviceName = 0;
}
alias RASDEVINFOW* LPRASDEVINFOW;
struct RASDEVINFOA{
DWORD dwSize;
- CHAR[RAS_MaxDeviceType + 1] szDeviceType;
- CHAR[RAS_MaxDeviceName + 1] szDeviceName;
+ CHAR[RAS_MaxDeviceType + 1] szDeviceType = 0;
+ CHAR[RAS_MaxDeviceName + 1] szDeviceName = 0;
}
alias RASDEVINFOA* LPRASDEVINFOA;
DWORD dwfOptions;
DWORD dwCountryID;
DWORD dwCountryCode;
- WCHAR[RAS_MaxAreaCode + 1] szAreaCode;
- WCHAR[RAS_MaxPhoneNumber + 1] szLocalPhoneNumber;
+ WCHAR[RAS_MaxAreaCode + 1] szAreaCode = 0;
+ WCHAR[RAS_MaxPhoneNumber + 1] szLocalPhoneNumber = 0;
DWORD dwAlternateOffset;
RASIPADDR ipaddr;
RASIPADDR ipaddrDns;
DWORD dwFrameSize;
DWORD dwfNetProtocols;
DWORD dwFramingProtocol;
- WCHAR[MAX_PATH] szScript;
- WCHAR[MAX_PATH] szAutodialDll;
- WCHAR[MAX_PATH] szAutodialFunc;
- WCHAR[RAS_MaxDeviceType + 1] szDeviceType;
- WCHAR[RAS_MaxDeviceName + 1] szDeviceName;
- WCHAR[RAS_MaxPadType + 1] szX25PadType;
- WCHAR[RAS_MaxX25Address + 1] szX25Address;
- WCHAR[RAS_MaxFacilities + 1] szX25Facilities;
- WCHAR[RAS_MaxUserData + 1] szX25UserData;
+ WCHAR[MAX_PATH] szScript = 0;
+ WCHAR[MAX_PATH] szAutodialDll = 0;
+ WCHAR[MAX_PATH] szAutodialFunc = 0;
+ WCHAR[RAS_MaxDeviceType + 1] szDeviceType = 0;
+ WCHAR[RAS_MaxDeviceName + 1] szDeviceName = 0;
+ WCHAR[RAS_MaxPadType + 1] szX25PadType = 0;
+ WCHAR[RAS_MaxX25Address + 1] szX25Address = 0;
+ WCHAR[RAS_MaxFacilities + 1] szX25Facilities = 0;
+ WCHAR[RAS_MaxUserData + 1] szX25UserData = 0;
DWORD dwChannels;
DWORD dwReserved1;
DWORD dwReserved2;
DWORD dwEncryptionType;
DWORD dwCustomAuthKey;
GUID guidId;
- WCHAR[MAX_PATH] szCustomDialDll;
+ WCHAR[MAX_PATH] szCustomDialDll = 0;
DWORD dwVpnStrategy;
//}
}
DWORD dwfOptions;
DWORD dwCountryID;
DWORD dwCountryCode;
- CHAR[RAS_MaxAreaCode + 1] szAreaCode;
- CHAR[RAS_MaxPhoneNumber + 1] szLocalPhoneNumber;
+ CHAR[RAS_MaxAreaCode + 1] szAreaCode = 0;
+ CHAR[RAS_MaxPhoneNumber + 1] szLocalPhoneNumber = 0;
DWORD dwAlternateOffset;
RASIPADDR ipaddr;
RASIPADDR ipaddrDns;
DWORD dwFrameSize;
DWORD dwfNetProtocols;
DWORD dwFramingProtocol;
- CHAR[MAX_PATH] szScript;
- CHAR[MAX_PATH] szAutodialDll;
- CHAR[MAX_PATH] szAutodialFunc;
- CHAR[RAS_MaxDeviceType + 1] szDeviceType;
- CHAR[RAS_MaxDeviceName + 1] szDeviceName;
- CHAR[RAS_MaxPadType + 1] szX25PadType;
- CHAR[RAS_MaxX25Address + 1] szX25Address;
- CHAR[RAS_MaxFacilities + 1] szX25Facilities;
- CHAR[RAS_MaxUserData + 1] szX25UserData;
+ CHAR[MAX_PATH] szScript = 0;
+ CHAR[MAX_PATH] szAutodialDll = 0;
+ CHAR[MAX_PATH] szAutodialFunc = 0;
+ CHAR[RAS_MaxDeviceType + 1] szDeviceType = 0;
+ CHAR[RAS_MaxDeviceName + 1] szDeviceName = 0;
+ CHAR[RAS_MaxPadType + 1] szX25PadType = 0;
+ CHAR[RAS_MaxX25Address + 1] szX25Address = 0;
+ CHAR[RAS_MaxFacilities + 1] szX25Facilities = 0;
+ CHAR[RAS_MaxUserData + 1] szX25UserData = 0;
DWORD dwChannels;
DWORD dwReserved1;
DWORD dwReserved2;
DWORD dwEncryptionType;
DWORD dwCustomAuthKey;
GUID guidId;
- CHAR[MAX_PATH] szCustomDialDll;
+ CHAR[MAX_PATH] szCustomDialDll = 0;
DWORD dwVpnStrategy;
//}
}
struct RASSUBENTRYW{
DWORD dwSize;
DWORD dwfFlags;
- WCHAR[RAS_MaxDeviceType + 1] szDeviceType;
- WCHAR[RAS_MaxDeviceName + 1] szDeviceName;
- WCHAR[RAS_MaxPhoneNumber + 1] szLocalPhoneNumber;
+ WCHAR[RAS_MaxDeviceType + 1] szDeviceType = 0;
+ WCHAR[RAS_MaxDeviceName + 1] szDeviceName = 0;
+ WCHAR[RAS_MaxPhoneNumber + 1] szLocalPhoneNumber = 0;
DWORD dwAlternateOffset;
}
alias RASSUBENTRYW* LPRASSUBENTRYW;
struct RASSUBENTRYA{
DWORD dwSize;
DWORD dwfFlags;
- CHAR[RAS_MaxDeviceType + 1] szDeviceType;
- CHAR[RAS_MaxDeviceName + 1] szDeviceName;
- CHAR[RAS_MaxPhoneNumber + 1] szLocalPhoneNumber;
+ CHAR[RAS_MaxDeviceType + 1] szDeviceType = 0;
+ CHAR[RAS_MaxDeviceName + 1] szDeviceName = 0;
+ CHAR[RAS_MaxPhoneNumber + 1] szLocalPhoneNumber = 0;
DWORD dwAlternateOffset;
}
alias RASSUBENTRYA* LPRASSUBENTRYA;
struct RASCREDENTIALSW{
DWORD dwSize;
DWORD dwMask;
- WCHAR[UNLEN + 1] szUserName;
- WCHAR[PWLEN + 1] szPassword;
- WCHAR[DNLEN + 1] szDomain;
+ WCHAR[UNLEN + 1] szUserName = 0;
+ WCHAR[PWLEN + 1] szPassword = 0;
+ WCHAR[DNLEN + 1] szDomain = 0;
}
alias RASCREDENTIALSW* LPRASCREDENTIALSW;
struct RASCREDENTIALSA{
DWORD dwSize;
DWORD dwMask;
- CHAR[UNLEN + 1] szUserName;
- CHAR[PWLEN + 1] szPassword;
- CHAR[DNLEN + 1] szDomain;
+ CHAR[UNLEN + 1] szUserName = 0;
+ CHAR[PWLEN + 1] szPassword = 0;
+ CHAR[DNLEN + 1] szDomain = 0;
}
alias RASCREDENTIALSA* LPRASCREDENTIALSA;
DWORD dwSize;
DWORD dwFlags;
DWORD dwDialingLocation;
- WCHAR[RAS_MaxEntryName + 1] szEntry;
+ WCHAR[RAS_MaxEntryName + 1] szEntry = 0;
}
alias RASAUTODIALENTRYW* LPRASAUTODIALENTRYW;
DWORD dwSize;
DWORD dwFlags;
DWORD dwDialingLocation;
- CHAR[RAS_MaxEntryName + 1] szEntry;
+ CHAR[RAS_MaxEntryName + 1] szEntry = 0;
}
alias RASAUTODIALENTRYA* LPRASAUTODIALENTRYA;
//}
alias RASPPPCCP* LPRASPPPCCP;
struct RASEAPUSERIDENTITYW{
- WCHAR[UNLEN + 1] szUserName;
+ WCHAR[UNLEN + 1] szUserName = 0;
DWORD dwSizeofEapInfo;
BYTE[1] pbEapInfo;
}
alias RASEAPUSERIDENTITYW* LPRASEAPUSERIDENTITYW;
struct RASEAPUSERIDENTITYA{
- CHAR[UNLEN + 1] szUserName;
+ CHAR[UNLEN + 1] szUserName = 0;
DWORD dwSizeofEapInfo;
BYTE[1] pbEapInfo;
}
DWORD dwFlags;
LONG xDlg;
LONG yDlg;
- CHAR[RAS_MaxEntryName + 1] szEntry;
+ CHAR[RAS_MaxEntryName + 1] szEntry = 0;
DWORD dwError;
ULONG_PTR reserved;
ULONG_PTR reserved2;
DWORD dwFlags;
LONG xDlg;
LONG yDlg;
- WCHAR[RAS_MaxEntryName + 1] szEntry;
+ WCHAR[RAS_MaxEntryName + 1] szEntry = 0;
DWORD dwError;
ULONG_PTR reserved;
ULONG_PTR reserved2;
DWORD dwSize = RASNOUSERA.sizeof;
DWORD dwFlags;
DWORD dwTimeoutMs;
- CHAR[UNLEN + 1] szUserName;
- CHAR[PWLEN + 1] szPassword;
- CHAR[DNLEN + 1] szDomain;
+ CHAR[UNLEN + 1] szUserName = 0;
+ CHAR[PWLEN + 1] szPassword = 0;
+ CHAR[DNLEN + 1] szDomain = 0;
}
alias RASNOUSERA* LPRASNOUSERA;
DWORD dwSize = RASNOUSERW.sizeof;
DWORD dwFlags;
DWORD dwTimeoutMs;
- WCHAR[UNLEN + 1] szUserName;
- WCHAR[PWLEN + 1] szPassword;
- WCHAR[DNLEN + 1] szDomain;
+ WCHAR[UNLEN + 1] szUserName = 0;
+ WCHAR[PWLEN + 1] szPassword = 0;
+ WCHAR[DNLEN + 1] szDomain = 0;
}
alias RASNOUSERW* LPRASNOUSERW;
}
struct RAS_PARAMETERS {
- CHAR[RASSAPI_MAX_PARAM_KEY_SIZE] P_Key;
+ CHAR[RASSAPI_MAX_PARAM_KEY_SIZE] P_Key = 0;
RAS_PARAMS_FORMAT P_Type;
BYTE P_Attributes;
RAS_PARAMS_VALUE P_Value;
struct RAS_USER_0 {
BYTE bfPrivilege;
- WCHAR[RASSAPI_MAX_PHONENUMBER_SIZE + 1] szPhoneNumber;
+ WCHAR[RASSAPI_MAX_PHONENUMBER_SIZE + 1] szPhoneNumber = 0;
}
alias RAS_USER_0* PRAS_USER_0;
struct RAS_PORT_0 {
- WCHAR[RASSAPI_MAX_PORT_NAME] wszPortName;
- WCHAR[RASSAPI_MAX_DEVICETYPE_NAME] wszDeviceType;
- WCHAR[RASSAPI_MAX_DEVICE_NAME] wszDeviceName;
- WCHAR[RASSAPI_MAX_MEDIA_NAME] wszMediaName;
+ WCHAR[RASSAPI_MAX_PORT_NAME] wszPortName = 0;
+ WCHAR[RASSAPI_MAX_DEVICETYPE_NAME] wszDeviceType = 0;
+ WCHAR[RASSAPI_MAX_DEVICE_NAME] wszDeviceName = 0;
+ WCHAR[RASSAPI_MAX_MEDIA_NAME] wszMediaName = 0;
DWORD reserved;
DWORD Flags;
- WCHAR[UNLEN + 1] wszUserName;
- WCHAR[NETBIOS_NAME_LEN] wszComputer;
+ WCHAR[UNLEN + 1] wszUserName = 0;
+ WCHAR[NETBIOS_NAME_LEN] wszComputer = 0;
DWORD dwStartSessionTime; // seconds from 1/1/1970
- WCHAR[DNLEN + 1] wszLogonDomain;
+ WCHAR[DNLEN + 1] wszLogonDomain = 0;
BOOL fAdvancedServer;
}
alias RAS_PORT_0* PRAS_PORT_0;
struct RAS_PPP_NBFCP_RESULT {
DWORD dwError;
DWORD dwNetBiosError;
- CHAR[NETBIOS_NAME_LEN + 1] szName;
- WCHAR[NETBIOS_NAME_LEN + 1] wszWksta;
+ CHAR[NETBIOS_NAME_LEN + 1] szName = 0;
+ WCHAR[NETBIOS_NAME_LEN + 1] wszWksta = 0;
}
struct RAS_PPP_IPCP_RESULT {
DWORD dwError;
- WCHAR[RAS_IPADDRESSLEN + 1] wszAddress;
+ WCHAR[RAS_IPADDRESSLEN + 1] wszAddress = 0;
}
struct RAS_PPP_IPXCP_RESULT {
DWORD dwError;
- WCHAR[RAS_IPXADDRESSLEN + 1] wszAddress;
+ WCHAR[RAS_IPXADDRESSLEN + 1] wszAddress = 0;
}
struct RAS_PPP_ATCP_RESULT {
DWORD dwError;
- WCHAR[RAS_ATADDRESSLEN + 1] wszAddress;
+ WCHAR[RAS_ATADDRESSLEN + 1] wszAddress = 0;
}
struct RAS_PPP_PROJECTION_RESULT {
COLORREF crTextColor;
BYTE bCharSet;
BYTE bPitchAndFamily;
- char[LF_FACESIZE] szFaceName;
+ char[LF_FACESIZE] szFaceName = 0;
}
struct CHARFORMATW {
UINT cbSize = this.sizeof;
COLORREF crTextColor;
BYTE bCharSet;
BYTE bPitchAndFamily;
- WCHAR[LF_FACESIZE] szFaceName;
+ WCHAR[LF_FACESIZE] szFaceName = 0;
}
struct CHARFORMAT2A {
COLORREF crTextColor;
BYTE bCharSet;
BYTE bPitchAndFamily;
- char[LF_FACESIZE] szFaceName;
+ char[LF_FACESIZE] szFaceName = 0;
WORD wWeight;
SHORT sSpacing;
COLORREF crBackColor;
COLORREF crTextColor;
BYTE bCharSet;
BYTE bPitchAndFamily;
- WCHAR[LF_FACESIZE] szFaceName;
+ WCHAR[LF_FACESIZE] szFaceName = 0;
WORD wWeight;
SHORT sSpacing;
COLORREF crBackColor;
struct SP_ORIGINAL_FILE_INFO_A {
DWORD cbSize = SP_ORIGINAL_FILE_INFO_A.sizeof;
- CHAR[MAX_PATH] OriginalInfName;
- CHAR[MAX_PATH] OriginalCatalogName;
+ CHAR[MAX_PATH] OriginalInfName = 0;
+ CHAR[MAX_PATH] OriginalCatalogName = 0;
}
alias SP_ORIGINAL_FILE_INFO_A* PSP_ORIGINAL_FILE_INFO_A;
struct SP_ORIGINAL_FILE_INFO_W {
DWORD cbSize = SP_ORIGINAL_FILE_INFO_W.sizeof;
- WCHAR[MAX_PATH] OriginalInfName;
- WCHAR[MAX_PATH] OriginalCatalogName;
+ WCHAR[MAX_PATH] OriginalInfName = 0;
+ WCHAR[MAX_PATH] OriginalCatalogName = 0;
}
alias SP_ORIGINAL_FILE_INFO_W* PSP_ORIGINAL_FILE_INFO_W;
WORD DosDate;
WORD DosTime;
WORD DosAttribs;
- CHAR[MAX_PATH] FullTargetName;
+ CHAR[MAX_PATH] FullTargetName = 0;
});
alias FILE_IN_CABINET_INFO_A* PFILE_IN_CABINET_INFO_A;
WORD DosDate;
WORD DosTime;
WORD DosAttribs;
- WCHAR[MAX_PATH] FullTargetName;
+ WCHAR[MAX_PATH] FullTargetName = 0;
});
alias FILE_IN_CABINET_INFO_W* PFILE_IN_CABINET_INFO_W;
mixin AlignedStr!(_alignVal, "SP_DEVICE_INTERFACE_DETAIL_DATA_A", q{
DWORD cbSize = SP_DEVICE_INTERFACE_DETAIL_DATA_A.sizeof;
- CHAR[1] _DevicePath;
+ CHAR[1] _DevicePath = 0;
CHAR* DevicePath() return { return _DevicePath.ptr; }
});
alias SP_DEVICE_INTERFACE_DETAIL_DATA_A* PSP_DEVICE_INTERFACE_DETAIL_DATA_A;
mixin AlignedStr!(_alignVal, "SP_DEVICE_INTERFACE_DETAIL_DATA_W", q{
DWORD cbSize = SP_DEVICE_INTERFACE_DETAIL_DATA_W.sizeof;
- WCHAR[1] _DevicePath;
+ WCHAR[1] _DevicePath = 0;
WCHAR* DevicePath() return { return _DevicePath.ptr; }
});
alias SP_DEVICE_INTERFACE_DETAIL_DATA_W* PSP_DEVICE_INTERFACE_DETAIL_DATA_W;
DWORD cbSize = SP_DEVINFO_LIST_DETAIL_DATA_A.sizeof;
GUID ClassGuid;
HANDLE RemoteMachineHandle;
- CHAR[SP_MAX_MACHINENAME_LENGTH] RemoteMachineName;
+ CHAR[SP_MAX_MACHINENAME_LENGTH] RemoteMachineName = 0;
});
alias SP_DEVINFO_LIST_DETAIL_DATA_A* PSP_DEVINFO_LIST_DETAIL_DATA_A;
DWORD cbSize = SP_DEVINFO_LIST_DETAIL_DATA_W.sizeof;
GUID ClassGuid;
HANDLE RemoteMachineHandle;
- WCHAR[SP_MAX_MACHINENAME_LENGTH] RemoteMachineName;
+ WCHAR[SP_MAX_MACHINENAME_LENGTH] RemoteMachineName = 0;
});
alias SP_DEVINFO_LIST_DETAIL_DATA_W* PSP_DEVINFO_LIST_DETAIL_DATA_W;
HSPFILEQ FileQueue;
ULONG_PTR ClassInstallReserved;
DWORD Reserved;
- CHAR[MAX_PATH] DriverPath;
+ CHAR[MAX_PATH] DriverPath = 0;
}
alias SP_DEVINSTALL_PARAMS_A* PSP_DEVINSTALL_PARAMS_A;
HSPFILEQ FileQueue;
ULONG_PTR ClassInstallReserved;
DWORD Reserved;
- WCHAR[MAX_PATH] DriverPath;
+ WCHAR[MAX_PATH] DriverPath = 0;
}
alias SP_DEVINSTALL_PARAMS_W* PSP_DEVINSTALL_PARAMS_W;
struct SP_SELECTDEVICE_PARAMS_A {
SP_CLASSINSTALL_HEADER ClassInstallHeader;
- CHAR[MAX_TITLE_LEN] Title;
- CHAR[MAX_INSTRUCTION_LEN] Instructions;
- CHAR[MAX_LABEL_LEN] ListLabel;
- CHAR[MAX_SUBTITLE_LEN] SubTitle;
+ CHAR[MAX_TITLE_LEN] Title = 0;
+ CHAR[MAX_INSTRUCTION_LEN] Instructions = 0;
+ CHAR[MAX_LABEL_LEN] ListLabel = 0;
+ CHAR[MAX_SUBTITLE_LEN] SubTitle = 0;
BYTE[2] Reserved;
}
alias SP_SELECTDEVICE_PARAMS_A* PSP_SELECTDEVICE_PARAMS_A;
struct SP_SELECTDEVICE_PARAMS_W {
SP_CLASSINSTALL_HEADER ClassInstallHeader;
- WCHAR[MAX_TITLE_LEN] Title;
- WCHAR[MAX_INSTRUCTION_LEN] Instructions;
- WCHAR[MAX_LABEL_LEN] ListLabel;
- WCHAR[MAX_SUBTITLE_LEN] SubTitle;
+ WCHAR[MAX_TITLE_LEN] Title = 0;
+ WCHAR[MAX_INSTRUCTION_LEN] Instructions = 0;
+ WCHAR[MAX_LABEL_LEN] ListLabel = 0;
+ WCHAR[MAX_SUBTITLE_LEN] SubTitle = 0;
}
alias SP_SELECTDEVICE_PARAMS_W* PSP_SELECTDEVICE_PARAMS_W;
struct SP_TROUBLESHOOTER_PARAMS_A {
SP_CLASSINSTALL_HEADER ClassInstallHeader;
- CHAR[MAX_PATH] ChmFile;
- CHAR[MAX_PATH] HtmlTroubleShooter;
+ CHAR[MAX_PATH] ChmFile = 0;
+ CHAR[MAX_PATH] HtmlTroubleShooter = 0;
}
alias SP_TROUBLESHOOTER_PARAMS_A* PSP_TROUBLESHOOTER_PARAMS_A;
struct SP_TROUBLESHOOTER_PARAMS_W {
SP_CLASSINSTALL_HEADER ClassInstallHeader;
- WCHAR[MAX_PATH] ChmFile;
- WCHAR[MAX_PATH] HtmlTroubleShooter;
+ WCHAR[MAX_PATH] ChmFile = 0;
+ WCHAR[MAX_PATH] HtmlTroubleShooter = 0;
}
alias SP_TROUBLESHOOTER_PARAMS_W* PSP_TROUBLESHOOTER_PARAMS_W;
struct SP_POWERMESSAGEWAKE_PARAMS_A {
SP_CLASSINSTALL_HEADER ClassInstallHeader;
- CHAR[LINE_LEN*2] PowerMessageWake;
+ CHAR[LINE_LEN*2] PowerMessageWake = 0;
}
alias SP_POWERMESSAGEWAKE_PARAMS_A* PSP_POWERMESSAGEWAKE_PARAMS_A;
struct SP_POWERMESSAGEWAKE_PARAMS_W {
SP_CLASSINSTALL_HEADER ClassInstallHeader;
- WCHAR[LINE_LEN*2] PowerMessageWake;
+ WCHAR[LINE_LEN*2] PowerMessageWake = 0;
}
alias SP_POWERMESSAGEWAKE_PARAMS_W* PSP_POWERMESSAGEWAKE_PARAMS_W;
DWORD cbSize = SP_DRVINFO_DATA_V2_A.sizeof;
DWORD DriverType;
ULONG_PTR Reserved;
- CHAR[LINE_LEN] Description;
- CHAR[LINE_LEN] MfgName;
- CHAR[LINE_LEN] ProviderName;
+ CHAR[LINE_LEN] Description = 0;
+ CHAR[LINE_LEN] MfgName = 0;
+ CHAR[LINE_LEN] ProviderName = 0;
FILETIME DriverDate;
DWORDLONG DriverVersion;
});
DWORD cbSize = SP_DRVINFO_DATA_V2_A.sizeof;
DWORD DriverType;
ULONG_PTR Reserved;
- WCHAR[LINE_LEN] Description;
- WCHAR[LINE_LEN] MfgName;
- WCHAR[LINE_LEN] ProviderName;
+ WCHAR[LINE_LEN] Description = 0;
+ WCHAR[LINE_LEN] MfgName = 0;
+ WCHAR[LINE_LEN] ProviderName = 0;
FILETIME DriverDate;
DWORDLONG DriverVersion;
});
DWORD cbSize = SP_DRVINFO_DATA_V1_A.sizeof;
DWORD DriverType;
ULONG_PTR Reserved;
- CHAR[LINE_LEN] Description;
- CHAR[LINE_LEN] MfgName;
- CHAR[LINE_LEN] ProviderName;
+ CHAR[LINE_LEN] Description = 0;
+ CHAR[LINE_LEN] MfgName = 0;
+ CHAR[LINE_LEN] ProviderName = 0;
}
alias SP_DRVINFO_DATA_V1_A* PSP_DRVINFO_DATA_V1_A;
DWORD cbSize = SP_DRVINFO_DATA_V1_W.sizeof;
DWORD DriverType;
ULONG_PTR Reserved;
- WCHAR[LINE_LEN] Description;
- WCHAR[LINE_LEN] MfgName;
- WCHAR[LINE_LEN] ProviderName;
+ WCHAR[LINE_LEN] Description = 0;
+ WCHAR[LINE_LEN] MfgName = 0;
+ WCHAR[LINE_LEN] ProviderName = 0;
}
alias SP_DRVINFO_DATA_V1_W* PSP_DRVINFO_DATA_V1_W;
DWORD CompatIDsOffset;
DWORD CompatIDsLength;
ULONG_PTR Reserved;
- CHAR[LINE_LEN] SectionName;
- CHAR[MAX_PATH] InfFileName;
- CHAR[LINE_LEN] DrvDescription;
- CHAR[1] _HardwareID;
+ CHAR[LINE_LEN] SectionName = 0;
+ CHAR[MAX_PATH] InfFileName = 0;
+ CHAR[LINE_LEN] DrvDescription = 0;
+ CHAR[1] _HardwareID = 0;
CHAR* HardwareID() return { return _HardwareID.ptr; }
});
alias SP_DRVINFO_DETAIL_DATA_A* PSP_DRVINFO_DETAIL_DATA_A;
DWORD CompatIDsOffset;
DWORD CompatIDsLength;
ULONG_PTR Reserved;
- WCHAR[LINE_LEN] SectionName;
- WCHAR[MAX_PATH] InfFileName;
- WCHAR[LINE_LEN] DrvDescription;
- WCHAR[1] _HardwareID;
+ WCHAR[LINE_LEN] SectionName = 0;
+ WCHAR[MAX_PATH] InfFileName = 0;
+ WCHAR[LINE_LEN] DrvDescription = 0;
+ WCHAR[1] _HardwareID = 0;
WCHAR* HardwareID() return { return _HardwareID.ptr; }
});
alias SP_DRVINFO_DETAIL_DATA_W* PSP_DRVINFO_DETAIL_DATA_W;
struct SP_BACKUP_QUEUE_PARAMS_A {
DWORD cbSize = SP_BACKUP_QUEUE_PARAMS_A.sizeof;
- CHAR[MAX_PATH] FullInfPath;
+ CHAR[MAX_PATH] FullInfPath = 0;
INT FilenameOffset;
}
alias SP_BACKUP_QUEUE_PARAMS_A* PSP_BACKUP_QUEUE_PARAMS_A;
struct SP_BACKUP_QUEUE_PARAMS_W {
DWORD cbSize = SP_BACKUP_QUEUE_PARAMS_W.sizeof;
- WCHAR[MAX_PATH] FullInfPath;
+ WCHAR[MAX_PATH] FullInfPath = 0;
INT FilenameOffset;
}
alias SP_BACKUP_QUEUE_PARAMS_W* PSP_BACKUP_QUEUE_PARAMS_W;
UINT uCallbackMessage;
HICON hIcon;
static if (_WIN32_IE >= 0x500) {
- CHAR[128] szTip;
+ CHAR[128] szTip = 0;
DWORD dwState;
DWORD dwStateMask;
- CHAR[256] szInfo;
+ CHAR[256] szInfo = 0;
union {
UINT uTimeout;
UINT uVersion;
}
- CHAR[64] szInfoTitle;
+ CHAR[64] szInfoTitle = 0;
DWORD dwInfoFlags;
} else {
- CHAR[64] szTip;
+ CHAR[64] szTip = 0;
}
static if (_WIN32_IE >= 0x600) {
GUID guidItem;
UINT uCallbackMessage;
HICON hIcon;
static if (_WIN32_IE >= 0x500) {
- WCHAR[128] szTip;
+ WCHAR[128] szTip = 0;
DWORD dwState;
DWORD dwStateMask;
- WCHAR[256] szInfo;
+ WCHAR[256] szInfo = 0;
union {
UINT uTimeout;
UINT uVersion;
}
- WCHAR[64] szInfoTitle;
+ WCHAR[64] szInfoTitle = 0;
DWORD dwInfoFlags;
} else {
- WCHAR[64] szTip;
+ WCHAR[64] szTip = 0;
}
static if (_WIN32_IE >= 0x600) {
GUID guidItem;
HICON hIcon;
int iIcon;
DWORD dwAttributes;
- CHAR[MAX_PATH] szDisplayName;
- CHAR[80] szTypeName;
+ CHAR[MAX_PATH] szDisplayName = 0;
+ CHAR[80] szTypeName = 0;
}
struct SHFILEINFOW {
HICON hIcon;
int iIcon;
DWORD dwAttributes;
- WCHAR[MAX_PATH] szDisplayName;
- WCHAR[80] szTypeName;
+ WCHAR[MAX_PATH] szDisplayName = 0;
+ WCHAR[80] szTypeName = 0;
}
align(1) struct SHQUERYRBINFO {
FILETIME ftLastWriteTime;
DWORD nFileSizeHigh;
DWORD nFileSizeLow;
- CHAR[MAX_PATH] cFileName;
+ CHAR[MAX_PATH] cFileName = 0;
}
alias FILEDESCRIPTORA* LPFILEDESCRIPTORA;
FILETIME ftLastWriteTime;
DWORD nFileSizeHigh;
DWORD nFileSizeLow;
- WCHAR[MAX_PATH] cFileName;
+ WCHAR[MAX_PATH] cFileName = 0;
}
alias FILEDESCRIPTORW* LPFILEDESCRIPTORW;
DWORD dwFlags;
RECT rect;
LPUNKNOWN punkRel;
- OLECHAR[MAX_PATH] strNewFile;
+ OLECHAR[MAX_PATH] strNewFile = 0;
}
alias FVSHOWINFO* LPFVSHOWINFO;
struct EXTRASEARCH
{
GUID guidSearch;
- WCHAR[80] wszFriendlyName;
- WCHAR[2084] wszUrl;
+ WCHAR[80] wszFriendlyName = 0;
+ WCHAR[2084] wszUrl = 0;
}
alias EXTRASEARCH* LPEXTRASEARCH;
struct PERSIST_FOLDER_TARGET_INFO
{
LPITEMIDLIST pidlTargetFolder;
- WCHAR[MAX_PATH] szTargetParsingName;
- WCHAR[MAX_PATH] szNetworkProvider;
+ WCHAR[MAX_PATH] szTargetParsingName = 0;
+ WCHAR[MAX_PATH] szNetworkProvider = 0;
DWORD dwAttributes;
int csidl;
}
struct SHCOLUMNINIT {
ULONG dwFlags;
ULONG dwReserved;
- WCHAR[MAX_PATH] wszFolder;
+ WCHAR[MAX_PATH] wszFolder = 0;
}
alias SHCOLUMNINIT* LPSHCOLUMNINIT;
alias const(SHCOLUMNINIT)* LPCSHCOLUMNINIT;
ULONG dwFlags;
DWORD dwFileAttributes;
ULONG dwReserved;
- WCHAR *pwszExt;
- WCHAR[MAX_PATH] wszFile;
+ WCHAR *pwszExt = 0;
+ WCHAR[MAX_PATH] wszFile = 0;
}
alias SHCOLUMNDATA* LPSHCOLUMNDATA;
alias const(SHCOLUMNDATA)* LPCSHCOLUMNDATA;
DWORD fmt;
UINT cChars;
DWORD csFlags;
- WCHAR[MAX_COLUMN_NAME_LEN] wszTitle;
- WCHAR[MAX_COLUMN_DESC_LEN] wszDescription;
+ WCHAR[MAX_COLUMN_NAME_LEN] wszTitle = 0;
+ WCHAR[MAX_COLUMN_DESC_LEN] wszDescription = 0;
}
alias SHCOLUMNINFO* LPSHCOLUMNINFO;
alias const(SHCOLUMNINFO)* LPCSHCOLUMNINFO;
module core.sys.windows.snmp;
version (Windows):
-private import core.sys.windows.windows;
+private import core.sys.windows.basetsd /+: HANDLE+/;
+private import core.sys.windows.windef /+: BOOL, BYTE, DWORD, INT, LONG, UINT, ULONG+/;
+private import core.sys.windows.winnt /+: LPSTR, LPVOID, ULARGE_INTEGER, VOID+/;
// These are not documented on MSDN
enum {
import core.stdc.stdlib;
import core.stdc.string;
import core.sys.windows.dbghelp;
-import core.sys.windows.windows;
+import core.sys.windows.imagehlp /+: ADDRESS_MODE+/;
+import core.sys.windows.winbase;
+import core.sys.windows.windef;
//debug=PRINTF;
debug(PRINTF) import core.stdc.stdio;
{
align(1):
IMAGEHLP_SYMBOLA64 _base;
- TCHAR[1024] _buf;
+ TCHAR[1024] _buf = void;
}
BufSymbol bufSymbol=void;
IMAGEHLP_SYMBOLA64* symbol = &bufSymbol._base;
"SYSTEMROOT"];
string path;
- char[2048] temp;
+ char[2048] temp = void;
DWORD len;
foreach ( e; defaultPathList )
enum CLEAR_BLOCK_LENGTH = 8;
struct CYPHER_BLOCK {
- CHAR[CYPHER_BLOCK_LENGTH] data;
+ CHAR[CYPHER_BLOCK_LENGTH] data = 0;
}
alias CYPHER_BLOCK* PCYPHER_BLOCK;
struct CLEAR_BLOCK {
- CHAR[CLEAR_BLOCK_LENGTH] data;
+ CHAR[CLEAR_BLOCK_LENGTH] data = 0;
}
alias CLEAR_BLOCK* PCLEAR_BLOCK;
module core.sys.windows.threadaux;
version (Windows):
-import core.sys.windows.windows;
+import core.sys.windows.basetsd/+ : HANDLE+/;
+import core.sys.windows.winbase/+ : CloseHandle, GetCurrentThreadId, GetCurrentProcessId,
+ GetModuleHandleA, GetProcAddress+/;
+import core.sys.windows.windef/+ : BOOL, DWORD, FALSE, HRESULT+/;
import core.stdc.stdlib;
public import core.thread;
DWORD th32ParentProcessID;
LONG pcPriClassBase;
DWORD dwFlags;
- WCHAR[MAX_PATH] szExeFile;
+ WCHAR[MAX_PATH] szExeFile = 0;
}
alias PROCESSENTRY32W* PPROCESSENTRY32W;
alias PROCESSENTRY32W* LPPROCESSENTRY32W;
BYTE *modBaseAddr;
DWORD modBaseSize;
HMODULE hModule;
- WCHAR[MAX_MODULE_NAME32 + 1] szModule;
- WCHAR[MAX_PATH] szExePath;
+ WCHAR[MAX_MODULE_NAME32 + 1] szModule = 0;
+ WCHAR[MAX_PATH] szExePath = 0;
}
alias MODULEENTRY32W* PMODULEENTRY32W;
alias MODULEENTRY32W* LPMODULEENTRY32W;
DWORD th32ParentProcessID;
LONG pcPriClassBase;
DWORD dwFlags;
- CHAR[MAX_PATH] szExeFile;
+ CHAR[MAX_PATH] szExeFile = 0;
}
alias PROCESSENTRY32* PPROCESSENTRY32;
alias PROCESSENTRY32* LPPROCESSENTRY32;
BYTE *modBaseAddr;
DWORD modBaseSize;
HMODULE hModule;
- char[MAX_MODULE_NAME32 + 1] szModule;
- char[MAX_PATH] szExePath;
+ char[MAX_MODULE_NAME32 + 1] szModule = 0;
+ char[MAX_PATH] szExePath = 0;
}
alias MODULEENTRY32* PMODULEENTRY32;
alias MODULEENTRY32* LPMODULEENTRY32;
DWORD dwFlags;
DWORD dwVersion;
DWORD dwVersionICM;
- WCHAR[16] szName;
- WCHAR[128] szDescription;
- WCHAR[128] szDriver;
+ WCHAR[16] szName = 0;
+ WCHAR[128] szDescription = 0;
+ WCHAR[128] szDriver = 0;
}
enum {
RECT rcFrame;
DWORD dwEditCount;
DWORD dwFormatChangeCount;
- WCHAR[64] szName;
+ WCHAR[64] szName = 0;
}
alias AVISTREAMINFOW* LPAVISTREAMINFOW;
RECT rcFrame;
DWORD dwEditCount;
DWORD dwFormatChangeCount;
- char[64] szName;
+ char[64] szName = 0;
}
alias AVISTREAMINFOA* LPAVISTREAMINFOA;
DWORD dwRate;
DWORD dwLength;
DWORD dwEditCount;
- WCHAR[64] szFileType;
+ WCHAR[64] szFileType = 0;
}
alias AVIFILEINFOW* LPAVIFILEINFOW;
DWORD dwRate;
DWORD dwLength;
DWORD dwEditCount;
- char[64] szFileType;
+ char[64] szFileType = 0;
}
alias AVIFILEINFOA* LPAVIFILEINFOA;
DWORD dwCurrentRxQueue;
DWORD dwProvSpec1;
DWORD dwProvSpec2;
- WCHAR _wcProvChar;
+ WCHAR _wcProvChar = 0;
WCHAR* wcProvChar() return { return &_wcProvChar; }
}
BYTE ByteSize;
BYTE Parity;
BYTE StopBits;
- char XonChar;
- char XoffChar;
- char ErrorChar;
- char EofChar;
- char EvtChar;
+ char XonChar = 0;
+ char XoffChar = 0;
+ char ErrorChar = 0;
+ char EofChar = 0;
+ char EvtChar = 0;
WORD wReserved1;
}
alias DCB* LPDCB;
DWORD dwProviderSubType;
DWORD dwProviderOffset;
DWORD dwProviderSize;
- WCHAR _wcProviderData;
+ WCHAR _wcProviderData = 0;
WCHAR* wcProviderData() return { return &_wcProviderData; }
}
DWORD dwReserved0;
DWORD dwReserved1;
// #endif
- CHAR[MAX_PATH] cFileName;
+ CHAR[MAX_PATH] cFileName = 0;
// #ifndef _WIN32_WCE
- CHAR[14] cAlternateFileName;
+ CHAR[14] cAlternateFileName = 0;
// #endif
}
alias WIN32_FIND_DATAA* PWIN32_FIND_DATAA, LPWIN32_FIND_DATAA;
DWORD dwReserved0;
DWORD dwReserved1;
// #endif
- WCHAR[MAX_PATH] cFileName;
+ WCHAR[MAX_PATH] cFileName = 0;
// #ifndef _WIN32_WCE
- WCHAR[14] cAlternateFileName;
+ WCHAR[14] cAlternateFileName = 0;
// #endif
}
alias WIN32_FIND_DATAW* PWIN32_FIND_DATAW, LPWIN32_FIND_DATAW;
DWORD dwStreamAttributes;
LARGE_INTEGER Size;
DWORD dwStreamNameSize;
- WCHAR _cStreamName;
+ WCHAR _cStreamName = 0;
WCHAR* cStreamName() return { return &_cStreamName; }
}
struct HW_PROFILE_INFOA {
DWORD dwDockInfo;
- CHAR[HW_PROFILE_GUIDLEN] szHwProfileGuid;
- CHAR[MAX_PROFILE_LEN] szHwProfileName;
+ CHAR[HW_PROFILE_GUIDLEN] szHwProfileGuid = 0;
+ CHAR[MAX_PROFILE_LEN] szHwProfileName = 0;
}
alias HW_PROFILE_INFOA* LPHW_PROFILE_INFOA;
struct HW_PROFILE_INFOW {
DWORD dwDockInfo;
- WCHAR[HW_PROFILE_GUIDLEN] szHwProfileGuid;
- WCHAR[MAX_PROFILE_LEN] szHwProfileName;
+ WCHAR[HW_PROFILE_GUIDLEN] szHwProfileGuid = 0;
+ WCHAR[MAX_PROFILE_LEN] szHwProfileName = 0;
}
alias HW_PROFILE_INFOW* LPHW_PROFILE_INFOW;
struct TIME_ZONE_INFORMATION {
LONG Bias;
- WCHAR[32] StandardName;
+ WCHAR[32] StandardName = 0;
SYSTEMTIME StandardDate;
LONG StandardBias;
- WCHAR[32] DaylightName;
+ WCHAR[32] DaylightName = 0;
SYSTEMTIME DaylightDate;
LONG DaylightBias;
}
WORD nErrCode;
WORD Reserved1;
WORD Reserved2;
- CHAR[128] szPathName; // const OFS_MAXPATHNAME = 128;
+ CHAR[128] szPathName = 0; // const OFS_MAXPATHNAME = 128;
}
alias OFSTRUCT* LPOFSTRUCT, POFSTRUCT;
struct CHAR_INFO {
union _Char {
- WCHAR UnicodeChar;
+ WCHAR UnicodeChar = 0;
CHAR AsciiChar;
}
union {
WORD wVirtualKeyCode;
WORD wVirtualScanCode;
union _uChar {
- WCHAR UnicodeChar;
+ WCHAR UnicodeChar = 0;
CHAR AsciiChar;
}
union {
- WCHAR UnicodeChar;
+ WCHAR UnicodeChar = 0;
CHAR AsciiChar;
_uChar uChar;
}
ALG_ID aiAlgid;
DWORD dwBitLen;
DWORD dwNameLen;
- CHAR[20] szName;
+ CHAR[20] szName = 0;
}
struct PUBLICKEYSTRUC {
alias DEVMODEA* PDEVMODEA, NPDEVMODEA, LPDEVMODEA;
struct DEVMODEW {
- WCHAR[CCHDEVICENAME] dmDeviceName;
+ WCHAR[CCHDEVICENAME] dmDeviceName = 0;
WORD dmSpecVersion;
WORD dmDriverVersion;
WORD dmSize;
short dmYResolution;
short dmTTOption;
short dmCollate;
- WCHAR[CCHFORMNAME] dmFormName;
+ WCHAR[CCHFORMNAME] dmFormName = 0;
WORD dmLogPixels;
DWORD dmBitsPerPel;
DWORD dmPelsWidth;
BYTE lfClipPrecision;
BYTE lfQuality;
BYTE lfPitchAndFamily;
- CHAR[LF_FACESIZE] lfFaceName;
+ CHAR[LF_FACESIZE] lfFaceName = 0;
}
alias LOGFONTA* PLOGFONTA, NPLOGFONTA, LPLOGFONTA;
BYTE lfClipPrecision;
BYTE lfQuality;
BYTE lfPitchAndFamily;
- WCHAR[LF_FACESIZE] lfFaceName;
+ WCHAR[LF_FACESIZE] lfFaceName = 0;
}
alias LOGFONTW* PLOGFONTW, NPLOGFONTW, LPLOGFONTW;
struct EXTLOGFONTW {
LOGFONTW elfLogFont;
- WCHAR[LF_FULLFACESIZE] elfFullName;
- WCHAR[LF_FACESIZE] elfStyle;
+ WCHAR[LF_FULLFACESIZE] elfFullName = 0;
+ WCHAR[LF_FACESIZE] elfStyle = 0;
DWORD elfVersion;
DWORD elfStyleSize;
DWORD elfMatch;
DWORD lcsGammaRed;
DWORD lcsGammaGreen;
DWORD lcsGammaBlue;
- CHAR[MAX_PATH] lcsFilename;
+ CHAR[MAX_PATH] lcsFilename = 0;
}
alias LOGCOLORSPACEA* LPLOGCOLORSPACEA;
DWORD lcsGammaRed;
DWORD lcsGammaGreen;
DWORD lcsGammaBlue;
- WCHAR[MAX_PATH] lcsFilename;
+ WCHAR[MAX_PATH] lcsFilename = 0;
}
alias LOGCOLORSPACEW* LPLOGCOLORSPACEW;
LONG tmOverhang;
LONG tmDigitizedAspectX;
LONG tmDigitizedAspectY;
- WCHAR tmFirstChar;
- WCHAR tmLastChar;
- WCHAR tmDefaultChar;
- WCHAR tmBreakChar;
+ WCHAR tmFirstChar = 0;
+ WCHAR tmLastChar = 0;
+ WCHAR tmDefaultChar = 0;
+ WCHAR tmBreakChar = 0;
BYTE tmItalic;
BYTE tmUnderlined;
BYTE tmStruckOut;
struct RGNDATA {
RGNDATAHEADER rdh;
- char[1] Buffer;
+ char[1] Buffer = 0;
}
alias RGNDATA* PRGNDATA, NPRGNDATA, LPRGNDATA;
static if (_WIN32_WINNT >= 0x500) {
struct WCRANGE {
- WCHAR wcLow;
+ WCHAR wcLow = 0;
USHORT cGlyphs;
}
alias WCRANGE* PWCRANGE, LPWCRANGE;
LONG tmOverhang;
LONG tmDigitizedAspectX;
LONG tmDigitizedAspectY;
- WCHAR tmFirstChar;
- WCHAR tmLastChar;
- WCHAR tmDefaultChar;
- WCHAR tmBreakChar;
+ WCHAR tmFirstChar = 0;
+ WCHAR tmLastChar = 0;
+ WCHAR tmDefaultChar = 0;
+ WCHAR tmBreakChar = 0;
BYTE tmItalic;
BYTE tmUnderlined;
BYTE tmStruckOut;
struct ENUMLOGFONTW {
LOGFONTW elfLogFont;
- WCHAR[LF_FULLFACESIZE] elfFullName;
- WCHAR[LF_FACESIZE] elfStyle;
+ WCHAR[LF_FULLFACESIZE] elfFullName = 0;
+ WCHAR[LF_FACESIZE] elfStyle = 0;
}
alias ENUMLOGFONTW* LPENUMLOGFONTW;
struct ENUMLOGFONTEXW {
LOGFONTW elfLogFont;
- WCHAR[LF_FULLFACESIZE] elfFullName;
- WCHAR[LF_FACESIZE] elfStyle;
- WCHAR[LF_FACESIZE] elfScript;
+ WCHAR[LF_FULLFACESIZE] elfFullName = 0;
+ WCHAR[LF_FACESIZE] elfStyle = 0;
+ WCHAR[LF_FACESIZE] elfScript = 0;
}
alias ENUMLOGFONTEXW* LPENUMLOGFONTEXW;
struct AXISINFOW {
LONG axMinValue;
LONG axMaxValue;
- WCHAR[MM_MAX_AXES_NAMELEN] axAxisName;
+ WCHAR[MM_MAX_AXES_NAMELEN] axAxisName = 0;
}
alias AXISINFOW* PAXISINFOW, LPAXISINFOW;
struct DISPLAY_DEVICEA {
DWORD cb;
- CHAR[32] DeviceName;
- CHAR[128] DeviceString;
+ CHAR[32] DeviceName = 0;
+ CHAR[128] DeviceString = 0;
DWORD StateFlags;
- CHAR[128] DeviceID;
- CHAR[128] DeviceKey;
+ CHAR[128] DeviceID = 0;
+ CHAR[128] DeviceKey = 0;
}
alias DISPLAY_DEVICEA* PDISPLAY_DEVICEA, LPDISPLAY_DEVICEA;
struct DISPLAY_DEVICEW {
DWORD cb;
- WCHAR[32] DeviceName;
- WCHAR[128] DeviceString;
+ WCHAR[32] DeviceName = 0;
+ WCHAR[128] DeviceString = 0;
DWORD StateFlags;
- WCHAR[128] DeviceID;
- WCHAR[128] DeviceKey;
+ WCHAR[128] DeviceID = 0;
+ WCHAR[128] DeviceKey = 0;
}
alias DISPLAY_DEVICEW* PDISPLAY_DEVICEW, LPDISPLAY_DEVICEW;
// FIXME: check types and grouping of constants
-import core.sys.windows.windows;
+import core.sys.windows.winbase, core.sys.windows.windef;
enum {
INTERNET_INVALID_PORT_NUMBER = 0,
= cast(INTERNET_STATUS_CALLBACK) -1;
struct GOPHER_FIND_DATAA {
- CHAR[MAX_GOPHER_DISPLAY_TEXT+1] DisplayString;
+ CHAR[MAX_GOPHER_DISPLAY_TEXT+1] DisplayString = 0;
DWORD GopherType;
DWORD SizeLow;
DWORD SizeHigh;
FILETIME LastModificationTime;
- CHAR[MAX_GOPHER_LOCATOR_LENGTH+1] Locator;
+ CHAR[MAX_GOPHER_LOCATOR_LENGTH+1] Locator = 0;
}
alias GOPHER_FIND_DATAA* LPGOPHER_FIND_DATAA;
struct GOPHER_FIND_DATAW {
- WCHAR[MAX_GOPHER_DISPLAY_TEXT+1] DisplayString;
+ WCHAR[MAX_GOPHER_DISPLAY_TEXT+1] DisplayString = 0;
DWORD GopherType;
DWORD SizeLow;
DWORD SizeHigh;
FILETIME LastModificationTime;
- WCHAR[MAX_GOPHER_LOCATOR_LENGTH+1] Locator;
+ WCHAR[MAX_GOPHER_LOCATOR_LENGTH+1] Locator = 0;
}
alias GOPHER_FIND_DATAW* LPGOPHER_FIND_DATAW;
DWORD dwDiskUsage;
DWORD dwDiskQuota;
DWORD[GROUP_OWNER_STORAGE_SIZE] dwOwnerStorage;
- CHAR[GROUPNAME_MAX_LENGTH] szGroupName;
+ CHAR[GROUPNAME_MAX_LENGTH] szGroupName = 0;
}
alias INTERNET_CACHE_GROUP_INFOA* LPINTERNET_CACHE_GROUP_INFOA;
DWORD dwDiskUsage;
DWORD dwDiskQuota;
DWORD[GROUP_OWNER_STORAGE_SIZE] dwOwnerStorage;
- WCHAR[GROUPNAME_MAX_LENGTH] szGroupName;
+ WCHAR[GROUPNAME_MAX_LENGTH] szGroupName = 0;
}
alias INTERNET_CACHE_GROUP_INFOW* LPINTERNET_CACHE_GROUP_INFOW;
GUID PartitionType;
GUID PartitionId;
DWORD64 Attributes;
- WCHAR[36] Name;
+ WCHAR[36] Name = 0;
}
struct PARTITION_INFORMATION_EX {
}
alias NETINFOSTRUCT* LPNETINFOSTRUCT;
-extern (Pascal) {
+extern (Windows) {
alias UINT function(LPCSTR, LPSTR, UINT) PFNGETPROFILEPATHA;
alias UINT function(LPCWSTR, LPWSTR, UINT) PFNGETPROFILEPATHW;
alias UINT function(LPCSTR, LPCSTR, DWORD) PFNRECONCILEPROFILEA;
UINT MaxCharSize;
BYTE[MAX_DEFAULTCHAR] DefaultChar;
BYTE[MAX_LEADBYTES] LeadByte;
- WCHAR UnicodeDefaultChar;
+ WCHAR UnicodeDefaultChar = 0;
UINT CodePage;
- CHAR[MAX_PATH] CodePageName;
+ CHAR[MAX_PATH] CodePageName = 0;
}
alias CPINFOEXA* LPCPINFOEXA;
UINT MaxCharSize;
BYTE[MAX_DEFAULTCHAR] DefaultChar;
BYTE[MAX_LEADBYTES] LeadByte;
- WCHAR UnicodeDefaultChar;
+ WCHAR UnicodeDefaultChar = 0;
UINT CodePage;
- WCHAR[MAX_PATH] CodePageName;
+ WCHAR[MAX_PATH] CodePageName = 0;
}
alias CPINFOEXW* LPCPINFOEXW;
alias SID_AND_ATTRIBUTES* PSID_AND_ATTRIBUTES;
struct TOKEN_SOURCE {
- CHAR[TOKEN_SOURCE_LENGTH] SourceName;
+ CHAR[TOKEN_SOURCE_LENGTH] SourceName = 0;
LUID SourceIdentifier;
}
alias TOKEN_SOURCE* PTOKEN_SOURCE;
struct FILE_NOTIFY_INFORMATION {
DWORD NextEntryOffset;
DWORD Action;
- DWORD FileNameLength;
- WCHAR _FileName;
+ DWORD FileNameLength = 0;
+ WCHAR _FileName = 0;
WCHAR* FileName() return { return &_FileName; }
}
DWORD dwMinorVersion;
DWORD dwBuildNumber;
DWORD dwPlatformId;
- CHAR[128] szCSDVersion;
+ CHAR[128] szCSDVersion = 0;
}
alias OSVERSIONINFOA* POSVERSIONINFOA, LPOSVERSIONINFOA;
DWORD dwMinorVersion;
DWORD dwBuildNumber;
DWORD dwPlatformId;
- WCHAR[128] szCSDVersion;
+ WCHAR[128] szCSDVersion = 0;
}
alias OSVERSIONINFOW* POSVERSIONINFOW, LPOSVERSIONINFOW;
DWORD dwMinorVersion;
DWORD dwBuildNumber;
DWORD dwPlatformId;
- CHAR[128] szCSDVersion;
+ CHAR[128] szCSDVersion = 0;
WORD wServicePackMajor;
WORD wServicePackMinor;
WORD wSuiteMask;
DWORD dwMinorVersion;
DWORD dwBuildNumber;
DWORD dwPlatformId;
- WCHAR[128] szCSDVersion;
+ WCHAR[128] szCSDVersion = 0;
WORD wServicePackMajor;
WORD wServicePackMinor;
WORD wSuiteMask;
struct IMAGE_OS2_HEADER {
WORD ne_magic;
- CHAR ne_ver;
- CHAR ne_rev;
+ CHAR ne_ver = 0;
+ CHAR ne_rev = 0;
WORD ne_enttab;
WORD ne_cbenttab;
LONG ne_crc;
struct IMAGE_RESOURCE_DIRECTORY_STRING {
WORD Length;
- CHAR _NameString;
+ CHAR _NameString = 0;
CHAR* NameString() return { return &_NameString; }
}
struct IMAGE_RESOURCE_DIR_STRING_U {
WORD Length;
- WCHAR _NameString;
+ WCHAR _NameString = 0;
WCHAR* NameString() return { return &_NameString; }
}
WORD PrintNameLength;
// ??? This is in MinGW, but absent in MSDN docs
ULONG Flags;
- WCHAR _PathBuffer;
+ WCHAR _PathBuffer = 0;
WCHAR* PathBuffer() return { return &_PathBuffer; }
}
WORD SubstituteNameLength;
WORD PrintNameOffset;
WORD PrintNameLength;
- WCHAR _PathBuffer;
+ WCHAR _PathBuffer = 0;
WCHAR* PathBuffer() return { return &_PathBuffer; }
}
enum PERF_ELAPSED_TIME=(PERF_SIZE_LARGE|PERF_TYPE_COUNTER|PERF_COUNTER_ELAPSED|PERF_OBJECT_TIMER|PERF_DISPLAY_SECONDS);
struct PERF_DATA_BLOCK {
- WCHAR[4] Signature;
+ WCHAR[4] Signature = 0;
DWORD LittleEndian;
DWORD Version;
DWORD Revision;
{
ushort wVersion;
ushort wHighVersion;
- char[WSADESCRIPTION_LEN + 1] szDescription;
- char[WSASYS_STATUS_LEN + 1] szSystemStatus;
+ char[WSADESCRIPTION_LEN + 1] szDescription = 0;
+ char[WSASYS_STATUS_LEN + 1] szSystemStatus = 0;
ushort iMaxSockets;
ushort iMaxUdpDg;
char* lpVendorInfo;
struct sockaddr_storage
{
short ss_family;
- char[6] __ss_pad1;
+ char[6] __ss_pad1 = void;
long __ss_align;
- char[112] __ss_pad2;
+ char[112] __ss_pad2 = void;
}
alias sockaddr_storage SOCKADDR_STORAGE;
alias SOCKADDR_STORAGE* PSOCKADDR_STORAGE;
enum WS_EX_NOACTIVATE = 0x8000000; // w2k
enum WS_EX_NOINHERITLAYOUT = 0x100000; // w2k
enum WS_EX_NOPARENTNOTIFY = 4;
+enum WS_EX_NOREDIRECTIONBITMAP = 0x00200000; // w8, s2012
enum WS_EX_OVERLAPPEDWINDOW = 0x300;
enum WS_EX_PALETTEWINDOW = 0x188;
enum WS_EX_RIGHT = 0x1000;
struct MENUITEMTEMPLATE {
WORD mtOption;
WORD mtID;
- WCHAR[1] mtString;
+ WCHAR[1] mtString = 0;
}
alias void MENUTEMPLATE, MENUTEMPLATEA, MENUTEMPLATEW;
struct MULTIKEYHELPA {
DWORD mkSize;
- CHAR mkKeylist;
- CHAR[1] szKeyphrase;
+ CHAR mkKeylist = 0;
+ CHAR[1] szKeyphrase = 0;
}
alias MULTIKEYHELPA* PMULTIKEYHELPA, LPMULTIKEYHELPA;
struct MULTIKEYHELPW {
DWORD mkSize;
- WCHAR mkKeylist;
- WCHAR[1] szKeyphrase;
+ WCHAR mkKeylist = 0;
+ WCHAR[1] szKeyphrase = 0;
}
alias MULTIKEYHELPW* PMULTIKEYHELPW, LPMULTIKEYHELPW;
int dx;
int dy;
int wMax;
- CHAR[2] rgchMember;
+ CHAR[2] rgchMember = 0;
}
alias HELPWININFOA* PHELPWININFOA, LPHELPWININFOA;
int dx;
int dy;
int wMax;
- WCHAR[2] rgchMember;
+ WCHAR[2] rgchMember = 0;
}
alias HELPWININFOW* PHELPWININFOW, LPHELPWININFOW;
RECT rcMonitor;
RECT rcWork;
DWORD dwFlags;
- CHAR[CCHDEVICENAME] szDevice;
+ CHAR[CCHDEVICENAME] szDevice = 0;
}
alias MONITORINFOEXA* LPMONITORINFOEXA;
RECT rcMonitor;
RECT rcWork;
DWORD dwFlags;
- WCHAR[CCHDEVICENAME] szDevice;
+ WCHAR[CCHDEVICENAME] szDevice = 0;
}
alias MONITORINFOEXW* LPMONITORINFOEXW;
static if (_WIN32_WINNT >= 0x600) {
struct WTSCLIENTW {
- WCHAR[CLIENTNAME_LENGTH + 1] ClientName;
- WCHAR[DOMAIN_LENGTH + 1] Domain;
- WCHAR[USERNAME_LENGTH + 1] UserName;
- WCHAR[MAX_PATH + 1] WorkDirectory;
- WCHAR[MAX_PATH + 1] InitialProgram;
+ WCHAR[CLIENTNAME_LENGTH + 1] ClientName = 0;
+ WCHAR[DOMAIN_LENGTH + 1] Domain = 0;
+ WCHAR[USERNAME_LENGTH + 1] UserName = 0;
+ WCHAR[MAX_PATH + 1] WorkDirectory = 0;
+ WCHAR[MAX_PATH + 1] InitialProgram = 0;
BYTE EncryptionLevel;
ULONG ClientAddressFamily;
USHORT[CLIENTADDRESS_LENGTH + 1] ClientAddress;
USHORT HRes;
USHORT VRes;
USHORT ColorDepth;
- WCHAR[MAX_PATH + 1] ClientDirectory;
+ WCHAR[MAX_PATH + 1] ClientDirectory = 0;
ULONG ClientBuildNumber;
ULONG ClientHardwareId;
USHORT ClientProductId;
USHORT OutBufCountHost;
USHORT OutBufCountClient;
USHORT OutBufLength;
- WCHAR[MAX_PATH + 1] DeviceId;
+ WCHAR[MAX_PATH + 1] DeviceId = 0;
}
alias WTSCLIENTW* PWTSCLIENTW;
struct WTSCLIENTA {
- CHAR[CLIENTNAME_LENGTH + 1] ClientName;
- CHAR[DOMAIN_LENGTH + 1 ] Domain;
- CHAR[USERNAME_LENGTH + 1] UserName;
- CHAR[MAX_PATH + 1] WorkDirectory;
- CHAR[MAX_PATH + 1] InitialProgram;
+ CHAR[CLIENTNAME_LENGTH + 1] ClientName = 0;
+ CHAR[DOMAIN_LENGTH + 1 ] Domain = 0;
+ CHAR[USERNAME_LENGTH + 1] UserName = 0;
+ CHAR[MAX_PATH + 1] WorkDirectory = 0;
+ CHAR[MAX_PATH + 1] InitialProgram = 0;
BYTE EncryptionLevel;
ULONG ClientAddressFamily;
USHORT[CLIENTADDRESS_LENGTH + 1] ClientAddress;
USHORT HRes;
USHORT VRes;
USHORT ColorDepth;
- CHAR[MAX_PATH + 1] ClientDirectory;
+ CHAR[MAX_PATH + 1] ClientDirectory = 0;
ULONG ClientBuildNumber;
ULONG ClientHardwareId;
USHORT ClientProductId;
USHORT OutBufCountHost;
USHORT OutBufCountClient;
USHORT OutBufLength;
- CHAR[MAX_PATH + 1] DeviceId;
+ CHAR[MAX_PATH + 1] DeviceId = 0;
}
alias WTSCLIENTA* PWTSCLIENTA;
DWORD OutgoingFrames;
DWORD IncomingCompressedBytes;
DWORD OutgoingCompressedBytes;
- WCHAR[WINSTATIONNAME_LENGTH] WinStationName;
- WCHAR[DOMAIN_LENGTH] Domain;
- WCHAR[USERNAME_LENGTH+1] UserName;
+ WCHAR[WINSTATIONNAME_LENGTH] WinStationName = 0;
+ WCHAR[DOMAIN_LENGTH] Domain = 0;
+ WCHAR[USERNAME_LENGTH+1] UserName = 0;
LARGE_INTEGER ConnectTime;
LARGE_INTEGER DisconnectTime;
LARGE_INTEGER LastInputTime;
DWORD OutgoingFrames;
DWORD IncomingCompressedBytes;
DWORD OutgoingCompressedBytes;
- CHAR[WINSTATIONNAME_LENGTH] WinStationName;
- CHAR[DOMAIN_LENGTH] Domain;
- CHAR[USERNAME_LENGTH+1] UserName;
+ CHAR[WINSTATIONNAME_LENGTH] WinStationName = 0;
+ CHAR[DOMAIN_LENGTH] Domain = 0;
+ CHAR[USERNAME_LENGTH+1] UserName = 0;
LARGE_INTEGER ConnectTime;
LARGE_INTEGER DisconnectTime;
LARGE_INTEGER LastInputTime;
unittest
{
- alias RC = common.RC;
+ alias RC = common.RC!();
Array!RC ary;
size_t cnt;
t = T.init;
}
-version (unittest) struct RC
+version (unittest) struct RC()
{
nothrow:
this(size_t* cnt) { ++*(_cnt = cnt); }
unittest
{
- alias RC = common.RC;
+ alias RC = common.RC!();
HashTab!(size_t, RC) tab;
size_t cnt;