# Store build files not in main directory
AC_CONFIG_AUX_DIR([build-aux])
-AM_INIT_AUTOMAKE([foreign subdir-objects nostdinc -Wall -Werror])
+AM_INIT_AUTOMAKE([foreign subdir-objects -Wall -Werror])
AC_CONFIG_SRCDIR([src/main.c])
-AC_CONFIG_HEADERS([config.h])
+AC_CONFIG_HEADERS([inc/config.h])
# Checks for programs.
AC_PROG_CC
# Checks for libraries.
+AC_CHECK_LIB([pthread],[pthread_create])
# Checks for header files.
AC_CHECK_HEADERS([stdlib.h])
# Checks for typedefs, structures, and compiler characteristics.
+AC_TYPE_SIZE_T
# Checks for library functions.
+AC_FUNC_MALLOC
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
void log_flush();
void log_print(struct log_entry*);
void log_message(enum log_level,FILE*,const char*,...);
-void log_poll();
+void *log_poll(void*);
#endif
int setup() {
if(log_entries_init()<0) { return -1; }
- if(pthread_create(&logging_thread,NULL,&log_poll)!=0) {
+ if(pthread_create(&logging_thread,NULL,&log_poll,NULL)!=0) {
perror("pthread_create");
return -1;
}