summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2013-03-25 08:14:33 +0100
committerSebastien Helleu <flashcode@flashtux.org>2013-03-25 08:14:33 +0100
commitadbfda00f5a4329c84a1b92b71d3e045af4e076e (patch)
treecc77f6541015df517981ad58e80c9853ce12968b /src
parentd654fca853d844762845a7fe740cdc7e34699d63 (diff)
downloadweechat-adbfda00f5a4329c84a1b92b71d3e045af4e076e.zip
script: fix compilation on GNU/Hurd (patch #7977) (thanks to Andrew Potter)
PATH_MAX is now defined in weechat-plugin.h (if not defined, for example on GNU/Hurd), so that all plugins can use it.
Diffstat (limited to 'src')
-rw-r--r--src/core/weechat.h8
-rw-r--r--src/plugins/weechat-plugin.h5
2 files changed, 6 insertions, 7 deletions
diff --git a/src/core/weechat.h b/src/core/weechat.h
index b194afab9..a1fa71869 100644
--- a/src/core/weechat.h
+++ b/src/core/weechat.h
@@ -56,11 +56,9 @@
#define WEECHAT_WEBSITE_DOWNLOAD "http://www.weechat.org/download"
/* log file */
-
#define WEECHAT_LOG_NAME "weechat.log"
/* license */
-
#define WEECHAT_LICENSE_TEXT \
"WeeChat is free software; you can redistribute it and/or modify\n" \
"it under the terms of the GNU General Public License as published by\n" \
@@ -77,7 +75,6 @@
"along with WeeChat. If not, see <http://www.gnu.org/licenses/>.\n\n"
/* directory separator, depending on OS */
-
#ifdef _WIN32
#define DIR_SEPARATOR "\\"
#define DIR_SEPARATOR_CHAR '\\'
@@ -86,18 +83,15 @@
#define DIR_SEPARATOR_CHAR '/'
#endif
-/* some systems (like GNU/Hurd) doesn't define PATH_MAX */
-
+/* some systems like GNU/Hurd do not define PATH_MAX */
#ifndef PATH_MAX
#define PATH_MAX 4096
#endif
/* internal charset */
-
#define WEECHAT_INTERNAL_CHARSET "UTF-8"
/* global variables and functions */
-
extern int weechat_debug_core;
extern char *weechat_argv0;
extern int weechat_upgrading;
diff --git a/src/plugins/weechat-plugin.h b/src/plugins/weechat-plugin.h
index b965f0113..429eeecc6 100644
--- a/src/plugins/weechat-plugin.h
+++ b/src/plugins/weechat-plugin.h
@@ -24,6 +24,11 @@
#include <sys/types.h>
+/* some systems like GNU/Hurd do not define PATH_MAX */
+#ifndef PATH_MAX
+ #define PATH_MAX 4096
+#endif
+
struct t_config_option;
struct t_gui_window;
struct t_gui_buffer;