Small linux fixes

This commit is contained in:
Ron Pedde 2003-12-01 15:27:40 +00:00
parent 074020fcb8
commit 2c029ddd15
5 changed files with 13 additions and 4 deletions

View File

@ -11,7 +11,11 @@ AC_PROG_CC
AC_CANONICAL_HOST
AM_CONDITIONAL(COND_REND_OSX,false)
AC_ARG_ENABLE(debug,Enable debugging features,CPPFLAGS="$CPPFLAGS -DDEBUG -g")
AC_ARG_ENABLE(efence,Enable electric fence,LDFLAGS="$LDFLAGS -lefence")
AC_ARG_ENABLE(howl,[ --enable-howl Use the howl mDNS library],
[ case "${enableval}" in
yes) rend_howl=true; LDFLAGS="${LDFLAGS} -lrendezvous -lcorby -lsalt";;
@ -26,7 +30,7 @@ dnl Darwin's stupid cpp preprocessor....
echo Host type is $host
case $host in
*linux*)
CPPFLAGS="$CPPFLAGS -DHAVE_SOCKLEN_T"; LDFLAGS="$LDFLAGS -lefence";;
CPPFLAGS="$CPPFLAGS -DHAVE_SOCKLEN_T";;
*darwin*)
CPPFLAGS="$CPPFLAGS -no-cpp-precomp -DHAVE_SOCKADDR_SA_LEN -DHAVE_SOCKLEN_T"
LDFLAGS="$LDFLAGS -framework CoreFoundation"

View File

@ -41,8 +41,10 @@ typedef struct tag_err_leak {
int err_debuglevel=0;
int err_logdestination=LOGDEST_STDERR;
#ifdef DEBUG
pthread_mutex_t err_mutex=PTHREAD_MUTEX_INITIALIZER;
ERR_LEAK err_leak = { NULL, NULL, 0, 0, NULL };
#endif
/*
* Forwards

View File

@ -48,9 +48,9 @@ extern void log_setdest(char *app, int destination);
# define malloc(x) err_malloc(__FILE__,__LINE__,x)
# define strdup(x) err_strdup(__FILE__,__LINE__,x)
# define free(x) err_free(__FILE__,__LINE__,x)
# define MEMNOTIFY(x) err_notify(__FILE__,__LINE__,x)
# endif /* __IN_ERR__ */
# define MEMNOTIFY(x) err_notify(__FILE__,__LINE__,x)
extern void *err_malloc(char *file, int line, size_t size);
extern char *err_strdup(char *file, int line, const char *str);
@ -58,6 +58,7 @@ extern void err_free(char *file, int line, void *ptr);
extern void err_notify(char *file, int line, void *ptr);
extern void err_leakcheck(void);
#else
# define MEMNOTIFY(x)
#endif /* DEBUG */
#endif /* __ERR_H__ */

View File

@ -26,10 +26,11 @@
#include <errno.h>
#include <fcntl.h>
#include <limits.h>
#include <pthread.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <pthread.h>
#include <unistd.h>
#include <sys/stat.h>

View File

@ -3,3 +3,4 @@ port 3689
admin_pw secret
mp3_dir mp3
servername Ron's Secret Stash