Adds PATH_MAX and NAME_MAX (XCC)
authorBarret Rhoden <brho@cs.berkeley.edu>
Mon, 20 Apr 2015 15:44:29 +0000 (11:44 -0400)
committerBarret Rhoden <brho@cs.berkeley.edu>
Mon, 20 Apr 2015 15:44:29 +0000 (11:44 -0400)
For POSIX compatibility.

Rebuild your toolchain.  Or just copy all of the .h files around.

kern/include/ros/fs.h
kern/include/ros/limits.h [new file with mode: 0644]
tools/compilers/gcc-glibc/glibc-2.19-akaros/sysdeps/akaros/bits/local_lim.h

index 8dd92f1..272c8a1 100644 (file)
@@ -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 (file)
index 0000000..20feec0
--- /dev/null
@@ -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 */