Skip to content

Commit

Permalink
remove octal literals
Browse files Browse the repository at this point in the history
  • Loading branch information
WalterBright committed Apr 2, 2011
1 parent fef16a7 commit 83f99df
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion std/file.d
Original file line number Diff line number Diff line change
Expand Up @@ -1612,7 +1612,7 @@ version(Windows) void mkdir(in char[] pathname)

version(Posix) void mkdir(in char[] pathname)
{
cenforce(core.sys.posix.sys.stat.mkdir(toStringz(pathname), 0777) == 0,
cenforce(core.sys.posix.sys.stat.mkdir(toStringz(pathname), octal!777) == 0,
pathname);
}

Expand Down
8 changes: 4 additions & 4 deletions std/mmfile.d
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,14 @@ class MmFile
flags = MAP_SHARED;
prot = PROT_READ | PROT_WRITE;
oflag = O_CREAT | O_RDWR | O_TRUNC;
fmode = 0660;
fmode = octal!660;
break;

case Mode.ReadWrite:
flags = MAP_SHARED;
prot = PROT_READ | PROT_WRITE;
oflag = O_CREAT | O_RDWR;
fmode = 0660;
fmode = octal!660;
break;

case Mode.ReadCopyOnWrite:
Expand Down Expand Up @@ -322,14 +322,14 @@ class MmFile
flags = MAP_SHARED;
prot = PROT_READ | PROT_WRITE;
oflag = O_CREAT | O_RDWR | O_TRUNC;
fmode = 0660;
fmode = octal!660;
break;

case Mode.ReadWrite:
flags = MAP_SHARED;
prot = PROT_READ | PROT_WRITE;
oflag = O_CREAT | O_RDWR;
fmode = 0660;
fmode = octal!660;
break;

case Mode.ReadCopyOnWrite:
Expand Down
4 changes: 2 additions & 2 deletions std/stream.d
Original file line number Diff line number Diff line change
Expand Up @@ -793,7 +793,7 @@ class Stream : InputStream, OutputStream {

case 'o': { // octal
while (isoctdigit(c) && width) {
n = n * 010 + (c - '0');
n = n * 8 + (c - '0');
width--;
c = getc();
count++;
Expand Down Expand Up @@ -1890,7 +1890,7 @@ class File: Stream {
}
}
version (Posix) {
share = 0666;
share = octal!666;
if (mode & FileMode.In) {
access = O_RDONLY;
}
Expand Down

0 comments on commit 83f99df

Please sign in to comment.