summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/conf_db.h4
-rw-r--r--include/modules.h2
-rw-r--r--include/motd.h2
-rw-r--r--include/stdinc.h6
-rw-r--r--modules/m_help.c4
-rw-r--r--src/log.c2
-rw-r--r--src/modules.c6
7 files changed, 16 insertions, 10 deletions
diff --git a/include/conf_db.h b/include/conf_db.h
index 7cdc555..de9d00a 100644
--- a/include/conf_db.h
+++ b/include/conf_db.h
@@ -32,8 +32,8 @@ struct dbFILE
{
char mode; /**< 'r' for reading, 'w' for writing */
FILE *fp; /**< The file pointer itself */
- char filename[PATH_MAX + 1]; /**< Name of the database file */
- char tempname[PATH_MAX + 1]; /**< Name of the temporary file (for writing) */
+ char filename[HYB_PATH_MAX + 1]; /**< Name of the database file */
+ char tempname[HYB_PATH_MAX + 1]; /**< Name of the temporary file (for writing) */
};
extern void check_file_version(struct dbFILE *);
diff --git a/include/modules.h b/include/modules.h
index f96d544..3975b84 100644
--- a/include/modules.h
+++ b/include/modules.h
@@ -45,7 +45,7 @@ struct module
struct module_path
{
dlink_node node;
- char path[PATH_MAX + 1];
+ char path[HYB_PATH_MAX + 1];
};
extern dlink_list modules_list;
diff --git a/include/motd.h b/include/motd.h
index 24e15e6..4490b17 100644
--- a/include/motd.h
+++ b/include/motd.h
@@ -47,7 +47,7 @@ struct MessageFile
{
MessageFileLine *contentsOfFile;
MotdType motdType;
- char fileName[PATH_MAX + 1];
+ char fileName[HYB_PATH_MAX + 1];
char lastChangedDate[MAX_DATE_STRING + 1];
};
diff --git a/include/stdinc.h b/include/stdinc.h
index 09c0939..288f4da 100644
--- a/include/stdinc.h
+++ b/include/stdinc.h
@@ -87,4 +87,10 @@
#include <sys/param.h>
#endif
+#ifdef PATH_MAX
+#define HYB_PATH_MAX PATH_MAX
+#else
+#define HYB_PATH_MAX 4096
+#endif
+
#endif
diff --git a/modules/m_help.c b/modules/m_help.c
index dfc1cfb..c104f0c 100644
--- a/modules/m_help.c
+++ b/modules/m_help.c
@@ -89,7 +89,7 @@ static void
dohelp(struct Client *source_p, const char *hpath, char *topic)
{
char h_index[] = "index";
- char path[PATH_MAX + 1];
+ char path[HYB_PATH_MAX + 1];
struct stat sb;
unsigned int i;
@@ -106,7 +106,7 @@ dohelp(struct Client *source_p, const char *hpath, char *topic)
return;
}
- if (strlen(hpath) + strlen(topic) + 1 > PATH_MAX)
+ if (strlen(hpath) + strlen(topic) + 1 > HYB_PATH_MAX)
{
sendto_one(source_p, form_str(ERR_HELPNOTFOUND),
me.name, source_p->name, topic);
diff --git a/src/log.c b/src/log.c
index e81257b..6f75350 100644
--- a/src/log.c
+++ b/src/log.c
@@ -32,7 +32,7 @@
static struct {
- char path[PATH_MAX + 1];
+ char path[HYB_PATH_MAX + 1];
size_t size;
FILE *file;
} log_type_table[LOG_TYPE_LAST];
diff --git a/src/modules.c b/src/modules.c
index a5c8ae9..23a5a0f 100644
--- a/src/modules.c
+++ b/src/modules.c
@@ -299,7 +299,7 @@ load_all_modules(int warn)
{
DIR *system_module_dir = NULL;
struct dirent *ldirent = NULL;
- char module_fq_name[PATH_MAX + 1];
+ char module_fq_name[HYB_PATH_MAX + 1];
if ((system_module_dir = opendir(AUTOMODPATH)) == NULL)
{
@@ -350,7 +350,7 @@ load_conf_modules(void)
void
load_core_modules(int warn)
{
- char module_name[PATH_MAX + 1];
+ char module_name[HYB_PATH_MAX + 1];
int i = 0;
for (; core_module_table[i]; ++i)
@@ -378,7 +378,7 @@ int
load_one_module(const char *path)
{
dlink_node *ptr = NULL;
- char modpath[PATH_MAX + 1];
+ char modpath[HYB_PATH_MAX + 1];
struct stat statbuf;
DLINK_FOREACH(ptr, mod_paths.head)