.rodata : {
. = ALIGN(8);
__madinit = . ;
- *( .mad.init )
+ *( MAD_INIT )
QUAD(0)
- *( .mad.exit )
+ *( MAD_EXIT )
__madexit = . ;
}
}
typedef int (*initcall_t)(void);
typedef void (*exitcall_t)(void);
-#define __init __attribute__((__used__,__section__(".mad.init")))
-#define __exit __attribute__((__used__,__section__(".mad.exit")))
+#define __init __attribute__((__used__,__section__("MAD_INIT,__text,regular")))
+#define __exit __attribute__((__used__,__section__("MAD_EXIT,__text,regular")))
#define module_init(fn) static __init initcall_t __init_##fn = fn;
#define module_exit(fn) static __exit exitcall_t __exit_##fn = fn;
# warn about undefined preprocessor identifiers
CFLAGS += -Wundef
# warn about local variable shadowing another local variable
-CFLAGS += -Wshadow
+#CFLAGS += -Wshadow
# warn about casting of pointers to increased alignment requirements
CFLAGS += -Wcast-align
# make string constants const
# warn about pointer arithmetic on void* and function pointers
CFLAGS += -Wpointer-arith
# warn about multiple declarations
-CFLAGS += -Wredundant-decls
+#CFLAGS += -Wredundant-decls
# warn if the format string is not a string literal
CFLAGS += -Wformat-nonliteral
# do not warn about zero-length formats.
include ../mk/cflags.mk
prefix ?= /usr/local
-LDFLAGS += -Wl,--warn-common
-CFLAGS += --std=gnu99 -I../ -I../common
+LDFLAGS += -Wl,--warn-common -L/opt/local/lib
+CFLAGS += --std=gnu99 -I../ -I../common -I/opt/local/include
INSTALL_PROGS = $(addprefix install-,$(PROGRAMS))
htokens[hook.type], ftokens[filter->type]);
return false;
}
- hook.async = false;
+ hook.async = false;
+ hook.filter_id = -1;
+ hook.value = NULL;
hook.postfix = (strncmp(value, "postfix:", 8) == 0);
if (hook.postfix && query_format(NULL, 0, value + 8, NULL) == -1) {
err("invalid formatted text \"%s\"", value + 8);
return false;
}
hook.value = m_strdup(hook.postfix ? value + 8 : value);
- hook.filter_id = -1;
array_add(filter->hooks, hook);
return true;
}