Adds PATH_MAX and NAME_MAX (XCC) For POSIX compatibility. Rebuild your toolchain. Or just copy all of the .h files around.
diff --git a/kern/include/ros/fs.h b/kern/include/ros/fs.h index 8dd92f1..272c8a1 100644 --- a/kern/include/ros/fs.h +++ b/kern/include/ros/fs.h
@@ -3,9 +3,8 @@ #include <sys/types.h> #include <time.h> +#include <ros/limits.h> -/* Keep this 255 to stay in sync with glibc (expects d_name[256]) */ -#define MAX_FILENAME_SZ 255 /* This will change once we have a decent readdir / getdents syscall, and * send the strlen along with the d_name. The sizes need rechecked too, since * they are probably wrong. */
diff --git a/kern/include/ros/limits.h b/kern/include/ros/limits.h new file mode 100644 index 0000000..20feec0 --- /dev/null +++ b/kern/include/ros/limits.h
@@ -0,0 +1,11 @@ +#ifndef ROS_INC_LIMITS_H +#define ROS_INC_LIMITS_H + +/* Keep this 255 to stay in sync with glibc (expects d_name[256]) */ +#define MAX_FILENAME_SZ 255 +/* POSIX / glibc name: */ +#define NAME_MAX MAX_FILENAME_SZ + +#define PATH_MAX 4096 /* includes null-termination */ + +#endif /* ROS_INC_LIMITS_H */
diff --git a/tools/compilers/gcc-glibc/glibc-2.19-akaros/sysdeps/akaros/bits/local_lim.h b/tools/compilers/gcc-glibc/glibc-2.19-akaros/sysdeps/akaros/bits/local_lim.h index 5896dc9..15e5dfa 100644 --- a/tools/compilers/gcc-glibc/glibc-2.19-akaros/sysdeps/akaros/bits/local_lim.h +++ b/tools/compilers/gcc-glibc/glibc-2.19-akaros/sysdeps/akaros/bits/local_lim.h
@@ -1 +1,3 @@ +#include <ros/limits.h> + #define OPEN_MAX 256