1.1 --- a/fd_ops.c Thu Dec 12 17:53:18 2019 +0100
1.2 +++ b/fd_ops.c Fri Dec 13 00:48:06 2019 +0100
1.3 @@ -1,18 +1,14 @@
1.4 -#include <fcntl.h>
1.5 #include <string.h>
1.6 #include <unistd.h>
1.7
1.8 +#include <systypes/fcntl.h>
1.9 +
1.10 #include "debug.h"
1.11
1.12 /* Messages. */
1.13
1.14 char message[] = "Hello file!\n";
1.15
1.16 -/* Definitions from fcntl.h and fcntl-linux.h.
1.17 - NOTE: This should be updated when e2fsserver uses libc_newlib. */
1.18 -
1.19 -#define O_CREAT_LINUX 0100
1.20 -
1.21
1.22
1.23 /* Main program. */
1.24 @@ -23,7 +19,7 @@
1.25 char buffer[100];
1.26 int available;
1.27
1.28 - fd = open(argv[1], O_CREAT_LINUX | O_RDWR);
1.29 + fd = open(argv[1], O_CREAT | O_RDWR);
1.30
1.31 if (fd == -1)
1.32 {
2.1 --- a/file_ops.c Thu Dec 12 17:53:18 2019 +0100
2.2 +++ b/file_ops.c Fri Dec 13 00:48:06 2019 +0100
2.3 @@ -1,19 +1,15 @@
2.4 -#include <fcntl.h>
2.5 #include <string.h>
2.6 #include <stdio.h>
2.7 #include <unistd.h>
2.8
2.9 +#include <systypes/fcntl.h>
2.10 +
2.11 #include "debug.h"
2.12
2.13 /* Messages. */
2.14
2.15 char message[] = "Hello file!\n";
2.16
2.17 -/* Definitions from fcntl.h and fcntl-linux.h.
2.18 - NOTE: This should be updated when e2fsserver uses libc_newlib. */
2.19 -
2.20 -#define O_CREAT_LINUX 0100
2.21 -
2.22
2.23
2.24 /* Main program. */
2.25 @@ -25,7 +21,7 @@
2.26 char buffer[100];
2.27 int available;
2.28
2.29 - fd = open(argv[1], O_CREAT_LINUX | O_RDWR);
2.30 + fd = open(argv[1], O_CREAT | O_RDWR);
2.31
2.32 if (fd == -1)
2.33 {
3.1 --- a/fstat.c Thu Dec 12 17:53:18 2019 +0100
3.2 +++ b/fstat.c Fri Dec 13 00:48:06 2019 +0100
3.3 @@ -1,15 +1,11 @@
3.4 -#include <fcntl.h>
3.5 #include <stdio.h>
3.6 #include <string.h>
3.7 #include <sys/stat.h>
3.8 #include <unistd.h>
3.9
3.10 -#include "debug.h"
3.11 +#include <systypes/fcntl.h>
3.12
3.13 -/* Definitions from fcntl.h and fcntl-linux.h.
3.14 - NOTE: This should be updated when e2fsserver uses libc_newlib. */
3.15 -
3.16 -#define O_CREAT_LINUX 0100
3.17 +#include "debug.h"
3.18
3.19 #define logprintf(fmt, ...) sprintf(buffer, fmt, __VA_ARGS__); debug(buffer);
3.20
3.21 @@ -33,7 +29,7 @@
3.22 return 1;
3.23 }
3.24
3.25 - fd = open(argv[1], O_CREAT_LINUX, O_RDWR);
3.26 + fd = open(argv[1], O_CREAT, O_RDWR);
3.27
3.28 if (fd == -1)
3.29 {
4.1 --- a/lseek.c Thu Dec 12 17:53:18 2019 +0100
4.2 +++ b/lseek.c Fri Dec 13 00:48:06 2019 +0100
4.3 @@ -1,7 +1,8 @@
4.4 -#include <fcntl.h>
4.5 #include <string.h>
4.6 #include <unistd.h>
4.7
4.8 +#include <systypes/fcntl.h>
4.9 +
4.10 #include "debug.h"
4.11
4.12 /* Messages. */
4.13 @@ -9,11 +10,6 @@
4.14 char message[] = "Hello file!\n";
4.15 char addition[] = " Goodbye from file!\n";
4.16
4.17 -/* Definitions from fcntl.h and fcntl-linux.h.
4.18 - NOTE: This should be updated when e2fsserver uses libc_newlib. */
4.19 -
4.20 -#define O_CREAT_LINUX 0100
4.21 -
4.22
4.23
4.24 /* Read from the file. */
4.25 @@ -44,7 +40,7 @@
4.26 return 1;
4.27 }
4.28
4.29 - fd = open(argv[1], O_CREAT_LINUX | O_RDWR);
4.30 + fd = open(argv[1], O_CREAT | O_RDWR);
4.31
4.32 if (fd == -1)
4.33 {