mirror of
https://github.com/dlang/phobos.git
synced 2025-04-29 22:50:38 +03:00
phobos 0.76
This commit is contained in:
parent
fa1bc52ba2
commit
35a12fec2f
51 changed files with 761 additions and 183 deletions
|
@ -52,7 +52,7 @@ enum
|
|||
O_APPEND = 02000,
|
||||
}
|
||||
|
||||
struct stat
|
||||
struct struct_stat // distinguish it from the stat() function
|
||||
{
|
||||
ulong st_dev;
|
||||
ushort __pad1;
|
||||
|
@ -78,9 +78,21 @@ struct stat
|
|||
|
||||
unittest
|
||||
{
|
||||
assert(stat.size == 88);
|
||||
assert(struct_stat.size == 88);
|
||||
}
|
||||
|
||||
enum : int
|
||||
{
|
||||
S_IFIFO = 0010000,
|
||||
S_IFCHR = 0020000,
|
||||
S_IFDIR = 0040000,
|
||||
S_IFBLK = 0060000,
|
||||
S_IFREG = 0100000,
|
||||
S_IFLNK = 0120000,
|
||||
S_IFSOCK = 0140000,
|
||||
|
||||
S_IFMT = 0170000
|
||||
}
|
||||
|
||||
extern (C)
|
||||
{
|
||||
|
@ -89,8 +101,13 @@ extern (C)
|
|||
int write(int, void*, int);
|
||||
int close(int);
|
||||
int lseek(int, int, int);
|
||||
int fstat(int, stat*);
|
||||
int fstat(int, struct_stat*);
|
||||
int stat(char*, struct_stat*);
|
||||
int getErrno();
|
||||
int chdir(char*);
|
||||
int mkdir(char*, int);
|
||||
int rmdir(char*);
|
||||
char* getcwd(char*, int);
|
||||
}
|
||||
|
||||
struct timeval
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
* Put them separate so they'll be externed - do not link in linuxextern.o
|
||||
*/
|
||||
|
||||
module std.c.linux.linuxextern;
|
||||
|
||||
extern (C)
|
||||
{
|
||||
void* __libc_stack_end;
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
/* Interface to the C header file process.h
|
||||
*/
|
||||
|
||||
module std.c.process;
|
||||
|
||||
extern (C):
|
||||
|
||||
void exit(int);
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
|
||||
module std.c.time;
|
||||
|
||||
extern (C):
|
||||
|
||||
const uint CLOCKS_PER_SEC = 1000;
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
|
||||
import std.c.windows.windows;
|
||||
import std.string;
|
||||
module std.c.windows.com;
|
||||
|
||||
private import std.c.windows.windows;
|
||||
private import std.string;
|
||||
|
||||
alias WCHAR OLECHAR;
|
||||
alias OLECHAR *LPOLESTR;
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
|
||||
module std.c.windows.windows;
|
||||
|
||||
extern (Windows)
|
||||
{
|
||||
alias uint ULONG;
|
||||
|
@ -22,7 +24,7 @@ extern (Windows)
|
|||
alias LPSTR PTSTR, LPTSTR;
|
||||
alias LPCSTR LPCTSTR;
|
||||
|
||||
alias WCHAR* LPCWSTR, PCWSTR;
|
||||
alias WCHAR* LPWSTR, LPCWSTR, PCWSTR;
|
||||
|
||||
alias uint DWORD;
|
||||
alias int BOOL;
|
||||
|
@ -262,8 +264,32 @@ struct WIN32_FIND_DATA {
|
|||
char cAlternateFileName[ 14 ];
|
||||
}
|
||||
|
||||
struct WIN32_FIND_DATAW {
|
||||
DWORD dwFileAttributes;
|
||||
FILETIME ftCreationTime;
|
||||
FILETIME ftLastAccessTime;
|
||||
FILETIME ftLastWriteTime;
|
||||
DWORD nFileSizeHigh;
|
||||
DWORD nFileSizeLow;
|
||||
DWORD dwReserved0;
|
||||
DWORD dwReserved1;
|
||||
WCHAR cFileName[ 260 ];
|
||||
WCHAR cAlternateFileName[ 14 ];
|
||||
}
|
||||
|
||||
export
|
||||
{
|
||||
BOOL SetCurrentDirectoryA(LPCSTR lpPathName);
|
||||
BOOL SetCurrentDirectoryW(LPCWSTR lpPathName);
|
||||
DWORD GetCurrentDirectoryA(DWORD nBufferLength, LPSTR lpBuffer);
|
||||
DWORD GetCurrentDirectoryW(DWORD nBufferLength, LPWSTR lpBuffer);
|
||||
BOOL CreateDirectoryA(LPCSTR lpPathName, LPSECURITY_ATTRIBUTES lpSecurityAttributes);
|
||||
BOOL CreateDirectoryW(LPCWSTR lpPathName, LPSECURITY_ATTRIBUTES lpSecurityAttributes);
|
||||
BOOL CreateDirectoryExA(LPCSTR lpTemplateDirectory, LPCSTR lpNewDirectory, LPSECURITY_ATTRIBUTES lpSecurityAttributes);
|
||||
BOOL CreateDirectoryExW(LPCWSTR lpTemplateDirectory, LPCWSTR lpNewDirectory, LPSECURITY_ATTRIBUTES lpSecurityAttributes);
|
||||
BOOL RemoveDirectoryA(LPCSTR lpPathName);
|
||||
BOOL RemoveDirectoryW(LPCWSTR lpPathName);
|
||||
|
||||
BOOL CloseHandle(HANDLE hObject);
|
||||
HANDLE CreateFileA(char *lpFileName, DWORD dwDesiredAccess, DWORD dwShareMode,
|
||||
SECURITY_ATTRIBUTES *lpSecurityAttributes, DWORD dwCreationDisposition,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue