From df3daae59f17483a77b2ad15017fa1211b6efe86 Mon Sep 17 00:00:00 2001 From: alexrp Date: Mon, 29 Oct 2012 05:59:34 +0100 Subject: [PATCH] Kill (hopefully) the last octal literals in the runtime. --- src/core/sys/posix/fcntl.d | 8 ++++---- src/core/sys/posix/sys/ipc.d | 12 ++++++------ src/core/sys/posix/sys/shm.d | 8 ++++---- src/core/sys/posix/sys/stat.d | 16 ++++++++-------- 4 files changed, 22 insertions(+), 22 deletions(-) diff --git a/src/core/sys/posix/fcntl.d b/src/core/sys/posix/fcntl.d index 949470bf3da..4abf6094f24 100644 --- a/src/core/sys/posix/fcntl.d +++ b/src/core/sys/posix/fcntl.d @@ -112,10 +112,10 @@ version( linux ) enum O_DSYNC = O_SYNC; enum O_RSYNC = O_SYNC; - enum O_ACCMODE = 0003; - enum O_RDONLY = 00; - enum O_WRONLY = 01; - enum O_RDWR = 02; + enum O_ACCMODE = 0x3; + enum O_RDONLY = 0x0; + enum O_WRONLY = 0x1; + enum O_RDWR = 0x2; struct flock { diff --git a/src/core/sys/posix/sys/ipc.d b/src/core/sys/posix/sys/ipc.d index ef3ae16dd68..a0d63ff15c9 100644 --- a/src/core/sys/posix/sys/ipc.d +++ b/src/core/sys/posix/sys/ipc.d @@ -63,9 +63,9 @@ version( linux ) c_ulong __unused2; } - enum IPC_CREAT = 01000; - enum IPC_EXCL = 02000; - enum IPC_NOWAIT = 04000; + enum IPC_CREAT = 0x0200; // 01000 + enum IPC_EXCL = 0x0400; // 02000 + enum IPC_NOWAIT = 0x0800; // 04000 enum key_t IPC_PRIVATE = 0; @@ -103,9 +103,9 @@ else version( FreeBSD ) key_t key; } - enum IPC_CREAT = 01000; - enum IPC_EXCL = 02000; - enum IPC_NOWAIT = 04000; + enum IPC_CREAT = 0x0200; // 01000 + enum IPC_EXCL = 0x0400; // 02000 + enum IPC_NOWAIT = 0x0800; // 04000 enum key_t IPC_PRIVATE = 0; diff --git a/src/core/sys/posix/sys/shm.d b/src/core/sys/posix/sys/shm.d index 7524108faf3..2de3c9d27ec 100644 --- a/src/core/sys/posix/sys/shm.d +++ b/src/core/sys/posix/sys/shm.d @@ -52,8 +52,8 @@ int shmget(key_t, size_t, int); version( linux ) { - enum SHM_RDONLY = 010000; - enum SHM_RND = 020000; + enum SHM_RDONLY = 0x01000; // 010000 + enum SHM_RND = 0x02000; // 020000 int __getpagesize(); alias __getpagesize SHMLBA; @@ -84,8 +84,8 @@ version( linux ) } else version( FreeBSD ) { - enum SHM_RDONLY = 010000; - enum SHM_RND = 020000; + enum SHM_RDONLY = 0x01000; // 010000 + enum SHM_RND = 0x02000; // 020000 enum SHMLBA = 1 << 12; // PAGE_SIZE = (1<