Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.
/ druntime Public archive
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/core/sys/posix/dirent.d
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ struct dirent
}

int closedir(DIR*);
DIR* opendir(in char*);
DIR* opendir(const scope char*);
dirent* readdir(DIR*);
void rewinddir(DIR*);
*/
Expand Down Expand Up @@ -418,29 +418,29 @@ version (OSX)
version (D_LP64)
{
int closedir(DIR*);
pragma(mangle, "opendir$INODE64") DIR* opendir(in char*);
pragma(mangle, "opendir$INODE64") DIR* opendir(const scope char*);
pragma(mangle, "rewinddir$INODE64") void rewinddir(DIR*);
}
else
{
// 32-bit mangles __DARWIN_UNIX03 specific functions with $UNIX2003 to
// maintain backward compatibility with binaries build pre 10.5
pragma(mangle, "closedir$UNIX2003") int closedir(DIR*);
pragma(mangle, "opendir$INODE64$UNIX2003") DIR* opendir(in char*);
pragma(mangle, "opendir$INODE64$UNIX2003") DIR* opendir(const scope char*);
pragma(mangle, "rewinddir$INODE64$UNIX2003") void rewinddir(DIR*);
}
}
else version (NetBSD)
{
int closedir(DIR*);
DIR* __opendir30(in char*);
DIR* __opendir30(const scope char*);
alias __opendir30 opendir;
void rewinddir(DIR*);
}
else
{
int closedir(DIR*);
DIR* opendir(in char*);
DIR* opendir(const scope char*);
//dirent* readdir(DIR*);
void rewinddir(DIR*);
}
Expand Down
42 changes: 21 additions & 21 deletions src/core/sys/posix/dlfcn.d
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ RTLD_LOCAL

int dlclose(void*);
char* dlerror();
void* dlopen(in char*, int);
void* dlsym(void*, in char*);
void* dlopen(const scope char*, int);
void* dlsym(void*, const scope char*);
*/

version (CRuntime_Glibc)
Expand Down Expand Up @@ -124,8 +124,8 @@ version (CRuntime_Glibc)

int dlclose(void*);
char* dlerror();
void* dlopen(in char*, int);
void* dlsym(void*, in char*);
void* dlopen(const scope char*, int);
void* dlsym(void*, const scope char*);
}
else version (Darwin)
{
Expand All @@ -136,8 +136,8 @@ else version (Darwin)

int dlclose(void*);
char* dlerror();
void* dlopen(in char*, int);
void* dlsym(void*, in char*);
void* dlopen(const scope char*, int);
void* dlsym(void*, const scope char*);
int dladdr(void* addr, Dl_info* info);

struct Dl_info
Expand Down Expand Up @@ -180,8 +180,8 @@ else version (NetBSD)

int dlclose(void*);
char* dlerror();
void* dlopen(in char*, int);
void* dlsym(void*, in char*);
void* dlopen(const scope char*, int);
void* dlsym(void*, const scope char*);
int dladdr(const(void)* addr, Dl_info* info);

struct Dl_info
Expand All @@ -201,8 +201,8 @@ else version (OpenBSD)

int dlclose(void*);
char* dlerror();
void* dlopen(in char*, int);
void* dlsym(void*, in char*);
void* dlopen(const scope char*, int);
void* dlsym(void*, const scope char*);
int dladdr(const(void)* addr, Dl_info* info);

struct Dl_info
Expand All @@ -222,8 +222,8 @@ else version (DragonFlyBSD)

int dlclose(void*);
char* dlerror();
void* dlopen(in char*, int);
void* dlsym(void*, in char*);
void* dlopen(const scope char*, int);
void* dlsym(void*, const scope char*);
int dladdr(const(void)* addr, Dl_info* info);

struct Dl_info
Expand All @@ -243,8 +243,8 @@ else version (Solaris)

int dlclose(void*);
char* dlerror();
void* dlopen(in char*, int);
void* dlsym(void*, in char*);
void* dlopen(const scope char*, int);
void* dlsym(void*, const scope char*);
int dladdr(const(void)* addr, Dl_info* info);

struct Dl_info
Expand All @@ -265,11 +265,11 @@ else version (CRuntime_Bionic)
RTLD_GLOBAL = 2
}

int dladdr(in void*, Dl_info*);
int dladdr(const scope void*, Dl_info*);
int dlclose(void*);
const(char)* dlerror();
void* dlopen(in char*, int);
void* dlsym(void*, in char*);
void* dlopen(const scope char*, int);
void* dlsym(void*, const scope char*);

struct Dl_info
{
Expand All @@ -291,8 +291,8 @@ else version (CRuntime_Musl)
}
int dlclose(void*);
const(char)* dlerror();
void* dlopen(in char*, int);
void* dlsym(void*, in char*);
void* dlopen(const scope char*, int);
void* dlsym(void*, const scope char*);
}
else version (CRuntime_UClibc)
{
Expand Down Expand Up @@ -331,6 +331,6 @@ else version (CRuntime_UClibc)

int dlclose(void*);
char* dlerror();
void* dlopen(in char*, int);
void* dlsym(void*, in char*);
void* dlopen(const scope char*, int);
void* dlsym(void*, const scope char*);
}
62 changes: 31 additions & 31 deletions src/core/sys/posix/fcntl.d
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ struct flock
pid_t l_pid;
}

int creat(in char*, mode_t);
int creat(const scope char*, mode_t);
int fcntl(int, int, ...);
int open(in char*, int, ...);
int open(const scope char*, int, ...);
*/
version (CRuntime_Glibc)
{
Expand Down Expand Up @@ -272,16 +272,16 @@ version (CRuntime_Glibc)

static if ( __USE_FILE_OFFSET64 )
{
int creat64(in char*, mode_t);
int creat64(const scope char*, mode_t);
alias creat64 creat;

int open64(in char*, int, ...);
int open64(const scope char*, int, ...);
alias open64 open;
}
else
{
int creat(in char*, mode_t);
int open(in char*, int, ...);
int creat(const scope char*, mode_t);
int open(const scope char*, int, ...);
}

enum AT_SYMLINK_NOFOLLOW = 0x100;
Expand Down Expand Up @@ -331,8 +331,8 @@ else version (Darwin)
short l_whence;
}

int creat(in char*, mode_t);
int open(in char*, int, ...);
int creat(const scope char*, mode_t);
int open(const scope char*, int, ...);
}
else version (FreeBSD)
{
Expand Down Expand Up @@ -392,8 +392,8 @@ else version (FreeBSD)
short l_whence;
}

int creat(in char*, mode_t);
int open(in char*, int, ...);
int creat(const scope char*, mode_t);
int open(const scope char*, int, ...);

enum AT_SYMLINK_NOFOLLOW = 0x200;
enum AT_FDCWD = -100;
Expand Down Expand Up @@ -457,8 +457,8 @@ else version (OpenBSD)
short l_whence;
}

int creat(in char*, mode_t);
int open(in char*, int, ...);
int creat(const scope char*, mode_t);
int open(const scope char*, int, ...);

enum AT_FDCWD = -100;

Expand Down Expand Up @@ -517,8 +517,8 @@ else version (NetBSD)
}


int creat(in char*, mode_t);
int open(in char*, int, ...);
int creat(const scope char*, mode_t);
int open(const scope char*, int, ...);
}
else version (DragonFlyBSD)
{
Expand Down Expand Up @@ -604,8 +604,8 @@ else version (DragonFlyBSD)

alias oflock = flock;

int creat(in char*, mode_t);
int open(in char*, int, ...);
int creat(const scope char*, mode_t);
int open(const scope char*, int, ...);
//int fcntl(int, int, ...); /*defined below*/
//int flock(int, int);
}
Expand Down Expand Up @@ -694,8 +694,8 @@ else version (Solaris)

version (D_LP64)
{
int creat(in char*, mode_t);
int open(in char*, int, ...);
int creat(const scope char*, mode_t);
int open(const scope char*, int, ...);

static if (__USE_LARGEFILE64)
{
Expand All @@ -707,16 +707,16 @@ else version (Solaris)
{
static if (__USE_LARGEFILE64)
{
int creat64(in char*, mode_t);
int creat64(const scope char*, mode_t);
alias creat64 creat;

int open64(in char*, int, ...);
int open64(const scope char*, int, ...);
alias open64 open;
}
else
{
int creat(in char*, mode_t);
int open(in char*, int, ...);
int creat(const scope char*, mode_t);
int open(const scope char*, int, ...);
}
}
}
Expand Down Expand Up @@ -772,8 +772,8 @@ else version (CRuntime_Bionic)
pid_t l_pid;
}

int creat(in char*, mode_t);
int open(in char*, int, ...);
int creat(const scope char*, mode_t);
int open(const scope char*, int, ...);

enum AT_FDCWD = -100;
}
Expand Down Expand Up @@ -835,7 +835,7 @@ else version (CRuntime_Musl)
pid_t l_pid;
}
enum FD_CLOEXEC = 1;
int open(in char*, int, ...);
int open(const scope char*, int, ...);

enum AT_FDCWD = -100;
}
Expand Down Expand Up @@ -947,16 +947,16 @@ else version (CRuntime_UClibc)

static if ( __USE_FILE_OFFSET64 )
{
int creat64(in char*, mode_t);
int creat64(const scope char*, mode_t);
alias creat64 creat;

int open64(in char*, int, ...);
int open64(const scope char*, int, ...);
alias open64 open;
}
else
{
int creat(in char*, mode_t);
int open(in char*, int, ...);
int creat(const scope char*, mode_t);
int open(const scope char*, int, ...);
}

enum AT_SYMLINK_NOFOLLOW = 0x100;
Expand All @@ -967,9 +967,9 @@ else
static assert(false, "Unsupported platform");
}

//int creat(in char*, mode_t);
//int creat(const scope char*, mode_t);
int fcntl(int, int, ...);
//int open(in char*, int, ...);
//int open(const scope char*, int, ...);

// Generic Posix fallocate
int posix_fallocate(int, off_t, off_t);
Expand Down
Loading