diff --git a/ChangeLog b/ChangeLog index 086b6c90..82e8367e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-09-25 Nick Treleaven + + * src/filetypes.c: + Hopefully fix building when HAVE_REGCOMP is not defined. + Add debug message when trying to parse an error regex when + HAVE_REGCOMP is undefined. + + 2008-09-24 Nick Treleaven * src/main.h, src/about.c, src/main.c, src/socket.c: diff --git a/src/filetypes.c b/src/filetypes.c index b9be9b24..243a20d8 100644 --- a/src/filetypes.c +++ b/src/filetypes.c @@ -55,8 +55,10 @@ typedef struct GeanyFiletypePrivate { GtkWidget *menu_item; /* holds a pointer to the menu item for this filetype */ gboolean keyfile_loaded; +#ifdef HAVE_REGCOMP regex_t error_regex; gboolean error_regex_compiled; +#endif } GeanyFiletypePrivate; @@ -852,11 +854,13 @@ static void set_error_regex(GeanyFiletype *ft, gchar *string) { setptr(ft->error_regex_string, string); +#ifdef HAVE_REGCOMP if (ft->priv->error_regex_compiled) regfree(&ft->priv->error_regex); ft->priv->error_regex_compiled = FALSE; /* regex will be compiled when needed */ +#endif } @@ -1208,6 +1212,8 @@ gboolean filetypes_parse_error_message(GeanyFiletype *ft, const gchar *message, gchar **filename, gint *line) { #ifndef HAVE_REGCOMP + if (!NZV(ft->error_regex_string)) + geany_debug("No regex support - maybe you should configure with --enable-gnu-regex!"); return FALSE; #else regex_t *regex = &ft->priv->error_regex;