From fa3b6b6c9ca3240366e6ec985d339a07681cd9c6 Mon Sep 17 00:00:00 2001 From: michael Date: Mon, 14 Jan 2013 17:37:55 +0000 Subject: - Quick and dirty workaround to fix build on GNU/Hurd because of undefined PATH_MAX git-svn-id: svn://svn.ircd-hybrid.org/svnroot/ircd-hybrid/trunk@1737 82007160-df01-0410-b94d-b575c5fd34c7 --- include/conf_db.h | 4 ++-- include/modules.h | 2 +- include/motd.h | 2 +- include/stdinc.h | 6 ++++++ 4 files changed, 10 insertions(+), 4 deletions(-) (limited to 'include') 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 #endif +#ifdef PATH_MAX +#define HYB_PATH_MAX PATH_MAX +#else +#define HYB_PATH_MAX 4096 +#endif + #endif -- cgit