summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsalad <fmoenne-@student.le-101.fr>2020-10-26 14:31:44 +0100
committersalad <fmoenne-@student.le-101.fr>2020-10-26 14:31:44 +0100
commita39a1b47d5775404cd0357d105e132c3c69fa545 (patch)
tree03affc50a5c259b8e089d831ca2d300165d0016b
parentmerge wif master (diff)
download42-minishell-caps.tar.gz
42-minishell-caps.tar.bz2
42-minishell-caps.tar.xz
42-minishell-caps.tar.zst
42-minishell-caps.zip
ARG_MAX DE MES DEUX BOULEScaps
-rw-r--r--src/b_alias.c2
-rw-r--r--src/b_type.c2
-rw-r--r--src/e_externs.c2
-rw-r--r--src/e_externs_pipes.c2
-rw-r--r--src/m_init.c2
-rw-r--r--src/m_loop.c2
-rw-r--r--src/m_mshrc.c2
-rw-r--r--src/m_prompt.c2
-rw-r--r--src/p_args_next.c2
-rw-r--r--src/p_lblock_next.c2
-rw-r--r--src/p_split.c2
-rw-r--r--src/s_com.c5
-rw-r--r--src/s_struct.h2
-rw-r--r--src/u_path.c8
-rw-r--r--src/u_vars_next.c2
15 files changed, 20 insertions, 19 deletions
diff --git a/src/b_alias.c b/src/b_alias.c
index 5ddc46f..6b86b25 100644
--- a/src/b_alias.c
+++ b/src/b_alias.c
@@ -14,7 +14,7 @@
#include <stdint.h>
#include <stdlib.h>
#include <unistd.h>
-#include <limits.h>
+#include <linux/limits.h>
#include "b_alias_print.h"
#include "d_define.h"
diff --git a/src/b_type.c b/src/b_type.c
index c490aae..3dd7b42 100644
--- a/src/b_type.c
+++ b/src/b_type.c
@@ -15,7 +15,7 @@
#include <dirent.h>
#include <fcntl.h>
#include <unistd.h>
-#include <limits.h>
+#include <linux/limits.h>
#include "d_define.h"
#include "f_fail.h"
diff --git a/src/e_externs.c b/src/e_externs.c
index 8761986..9d5ec6a 100644
--- a/src/e_externs.c
+++ b/src/e_externs.c
@@ -16,7 +16,7 @@
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
-#include <limits.h>
+#include <linux/limits.h>
#include <errno.h>
#include "b_export_next.h"
diff --git a/src/e_externs_pipes.c b/src/e_externs_pipes.c
index ca843d0..c76175f 100644
--- a/src/e_externs_pipes.c
+++ b/src/e_externs_pipes.c
@@ -16,7 +16,7 @@
#include <stdint.h>
#include <unistd.h>
#include <string.h>
-#include <limits.h>
+#include <linux/limits.h>
#include <errno.h>
#include "d_define.h"
diff --git a/src/m_init.c b/src/m_init.c
index 91baf7c..22e420b 100644
--- a/src/m_init.c
+++ b/src/m_init.c
@@ -12,7 +12,7 @@
#include <libft.h>
#include <stdlib.h>
-#include <limits.h>
+#include <linux/limits.h>
#include "d_define.h"
#include "s_struct.h"
diff --git a/src/m_loop.c b/src/m_loop.c
index 3762aac..35605c3 100644
--- a/src/m_loop.c
+++ b/src/m_loop.c
@@ -16,7 +16,7 @@
#include <fcntl.h>
#include <unistd.h>
#include <signal.h>
-#include <limits.h>
+#include <linux/limits.h>
#include "d_define.h"
#include "e_line.h"
diff --git a/src/m_mshrc.c b/src/m_mshrc.c
index 7f6b8b9..5033697 100644
--- a/src/m_mshrc.c
+++ b/src/m_mshrc.c
@@ -15,7 +15,7 @@
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
-#include <limits.h>
+#include <linux/limits.h>
#include "d_define.h"
#include "s_struct.h"
diff --git a/src/m_prompt.c b/src/m_prompt.c
index 584a98d..789da0d 100644
--- a/src/m_prompt.c
+++ b/src/m_prompt.c
@@ -13,7 +13,7 @@
#include <libft.h>
#include <stdint.h>
#include <unistd.h>
-#include <limits.h>
+#include <linux/limits.h>
#include "d_define.h"
#include "m_prompt.h"
diff --git a/src/p_args_next.c b/src/p_args_next.c
index ea8dd81..6be76b1 100644
--- a/src/p_args_next.c
+++ b/src/p_args_next.c
@@ -12,7 +12,7 @@
#include <libft.h>
#include <stdint.h>
-#include <limits.h>
+#include <linux/limits.h>
#include "d_define.h"
#include "p_args.h"
diff --git a/src/p_lblock_next.c b/src/p_lblock_next.c
index 02ecbb2..f5e5aac 100644
--- a/src/p_lblock_next.c
+++ b/src/p_lblock_next.c
@@ -13,7 +13,7 @@
#include <libft.h>
#include <stdlib.h>
#include <stdint.h>
-#include <limits.h>
+#include <linux/limits.h>
#include "d_define.h"
#include "s_destroy.h"
diff --git a/src/p_split.c b/src/p_split.c
index dc26c04..0c6003c 100644
--- a/src/p_split.c
+++ b/src/p_split.c
@@ -12,7 +12,7 @@
#include <libft.h>
#include <stdlib.h>
-#include <limits.h>
+#include <linux/limits.h>
#include "f_fail.h"
#include "d_define.h"
diff --git a/src/s_com.c b/src/s_com.c
index ebf7b87..919c620 100644
--- a/src/s_com.c
+++ b/src/s_com.c
@@ -12,15 +12,14 @@
#include <libft.h>
#include <stdlib.h>
-#include <limits.h>
+#include <linux/limits.h>
#include "d_define.h"
#include "f_fail.h"
#include "p_args.h"
#include "p_lblock.h"
#include "p_lblock_next.h"
->>>>>>> master
-#include "s_struct.h"
+#include "s_struct.h"
static int8_t
s_fill_com(char *words[], t_com **com)
diff --git a/src/s_struct.h b/src/s_struct.h
index 871b0f4..45c5890 100644
--- a/src/s_struct.h
+++ b/src/s_struct.h
@@ -14,7 +14,7 @@
#define S_STRUCT_H
#include <stdint.h>
-#include <limits.h>
+#include <linux/limits.h>
#include "d_define.h"
diff --git a/src/u_path.c b/src/u_path.c
index b43946f..a682a75 100644
--- a/src/u_path.c
+++ b/src/u_path.c
@@ -13,7 +13,9 @@
#include <libft.h>
#include <stddef.h>
#include <dirent.h>
-#include <limits.h>
+#include <linux/limits.h>
+
+/* TODO: ARG_MAX ????? */
#include "s_struct.h"
#include "u_vars.h"
@@ -42,11 +44,11 @@ uint8_t u_search_in_path(char fullpath[],
t_msh *msh)
{
struct dirent *ent;
- char tmp[ARG_MAX];
+ char tmp[131072];
char *tok_path;
DIR *dir;
- if (u_get_var_value(tmp, "$PATH", ARG_MAX, msh) != 0)
+ if (u_get_var_value(tmp, "$PATH", 131072, msh) != 0)
return (1);
tok_path = ft_strtok(tmp, ":");
while (tok_path != NULL)
diff --git a/src/u_vars_next.c b/src/u_vars_next.c
index 2f23667..6c6cd1c 100644
--- a/src/u_vars_next.c
+++ b/src/u_vars_next.c
@@ -13,7 +13,7 @@
#include <libft.h>
#include <inttypes.h>
#include <stdlib.h>
-#include <limits.h>
+#include <linux/limits.h>
#include "d_enum.h"
#include "s_lvars.h"