summary refs log tree commit diff stats
path: root/lib/posix
diff options
context:
space:
mode:
authorVindaar <basti90@gmail.com>2018-07-03 01:56:36 +0200
committerAndreas Rumpf <rumpf_a@web.de>2018-07-03 01:56:36 +0200
commit681d8e0749fd4374c3cc904ef27a5f600f3c4bb5 (patch)
treeaf870e7fb115ec9c6ccf374b15311ce8cb9eb4e4 /lib/posix
parent70cf286a220940b86b8f8e5b7209ac55981cf8a8 (diff)
downloadNim-681d8e0749fd4374c3cc904ef27a5f600f3c4bb5.tar.gz
Deprecate 'c', 'C' prefix for octal literals, fixes #8082 (#8178)
* deprecate `0c`, `0C` prefix for octal literals

Deprecates the previously allowed syntax of `0c` and `0C` as a prefix for
octal literals to bring the literals in line with the behavior of
`parseOct` from parseutils.

* add `msgKind` arg to `lexMessageLitNum` for deprecation messages

* change literal tests to check all valid integer literals

Also adds the `tinvaligintegerlit3` test to test for the (still)
invalid `0O` prefix.
Diffstat (limited to 'lib/posix')
-rw-r--r--lib/posix/posix.nim40
1 files changed, 20 insertions, 20 deletions
diff --git a/lib/posix/posix.nim b/lib/posix/posix.nim
index 97b4124ec..c230e6598 100644
--- a/lib/posix/posix.nim
+++ b/lib/posix/posix.nim
@@ -36,26 +36,26 @@
 #      platforms - where do they come from and why are they here?
 when false:
   const
-    C_IRUSR = 0c000400 ## Read by owner.
-    C_IWUSR = 0c000200 ## Write by owner.
-    C_IXUSR = 0c000100 ## Execute by owner.
-    C_IRGRP = 0c000040 ## Read by group.
-    C_IWGRP = 0c000020 ## Write by group.
-    C_IXGRP = 0c000010 ## Execute by group.
-    C_IROTH = 0c000004 ## Read by others.
-    C_IWOTH = 0c000002 ## Write by others.
-    C_IXOTH = 0c000001 ## Execute by others.
-    C_ISUID = 0c004000 ## Set user ID.
-    C_ISGID = 0c002000 ## Set group ID.
-    C_ISVTX = 0c001000 ## On directories, restricted deletion flag.
-    C_ISDIR = 0c040000 ## Directory.
-    C_ISFIFO = 0c010000 ##FIFO.
-    C_ISREG = 0c100000 ## Regular file.
-    C_ISBLK = 0c060000 ## Block special.
-    C_ISCHR = 0c020000 ## Character special.
-    C_ISCTG = 0c110000 ## Reserved.
-    C_ISLNK = 0c120000 ## Symbolic link.</p>
-    C_ISSOCK = 0c140000 ## Socket.
+    C_IRUSR = 0o000400 ## Read by owner.
+    C_IWUSR = 0o000200 ## Write by owner.
+    C_IXUSR = 0o000100 ## Execute by owner.
+    C_IRGRP = 0o000040 ## Read by group.
+    C_IWGRP = 0o000020 ## Write by group.
+    C_IXGRP = 0o000010 ## Execute by group.
+    C_IROTH = 0o000004 ## Read by others.
+    C_IWOTH = 0o000002 ## Write by others.
+    C_IXOTH = 0o000001 ## Execute by others.
+    C_ISUID = 0o004000 ## Set user ID.
+    C_ISGID = 0o002000 ## Set group ID.
+    C_ISVTX = 0o001000 ## On directories, restricted deletion flag.
+    C_ISDIR = 0o040000 ## Directory.
+    C_ISFIFO = 0o010000 ##FIFO.
+    C_ISREG = 0o100000 ## Regular file.
+    C_ISBLK = 0o060000 ## Block special.
+    C_ISCHR = 0o020000 ## Character special.
+    C_ISCTG = 0o110000 ## Reserved.
+    C_ISLNK = 0o120000 ## Symbolic link.</p>
+    C_ISSOCK = 0o140000 ## Socket.
 
 const
   MM_NULLLBL* = nil
Adds GitLab CI config.' href='/ahoang/Nim/commit/.gitlab-ci.yml?h=devel&id=7e3ebc1bccb689176cfadd485fe8777bc343a5e6'>7e3ebc1bc ^
97738a4f2 ^

7e3ebc1bc ^

3e87ef35f ^
7e3ebc1bc ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61