(As requested in the PR.)
-/* These are the values for the traditional UNIX mode bits:
-** https://en.wikipedia.org/wiki/File_system_permissions#Numeric_notation
-** (S_IREAD and S_IWRITE are aliases for S_IRUSR and S_IWUSR)
-**
-** Must match the values in src/sim65/paravirt.c
-*/
+/* Must match the values in src/sim65/paravirt.c */
-#define S_IREAD 0400
-#define S_IWRITE 0200
+#define S_IREAD 0x1
+#define S_IWRITE 0x2
/*****************************************************************************/
/* If the caller did not supply the mode argument,
** use a reasonable default.
*/
- Mode = 0400 | 0200;
+ Mode = 0x1 | 0x2;
}
do {
OFlag |= O_EXCL;
}
- if (Mode & 0400) {
+ if (Mode & 0x1) {
OMode |= S_IREAD;
}
- if (Mode & 0200) {
+ if (Mode & 0x2) {
OMode |= S_IWRITE;
}