Fixes from James Turner

This commit is contained in:
Ron Pedde 2004-03-16 05:24:54 +00:00
parent 30d7753e1c
commit e296c15d04
5 changed files with 20 additions and 11 deletions

View File

@ -26,3 +26,9 @@ Hans-Christoph Steiner (eighthave@users.sourceforge.net)
David Imhoff (6219@thrijswijk.nl) David Imhoff (6219@thrijswijk.nl)
* Code cleanup patches (_XOPEN_SOURCE, declaration problems) * Code cleanup patches (_XOPEN_SOURCE, declaration problems)
James Turner (jmturner@users.sourceforge.net)
* Fixes for OSX 10.2
* configure.in suggestions

View File

@ -12,14 +12,6 @@ else
DBFILE=db-memory.c DBFILE=db-memory.c
endif endif
if COND_NEED_STRCASESTR
STRCASESTR=strcasestr.c strcasestr.h
endif
if COND_NEED_STRSEP
STRSEP=strsep.c
endif
if COND_REND_POSIX if COND_REND_POSIX
RENDSRC=mdns/mDNS.c mdns/mDNSClientAPI.h mdns/mDNSDebug.h mdns/mDNSPosix.c mdns/mDNSUNP.c rend-posix.c mdns/mDNSPlatformFunctions.h RENDSRC=mdns/mDNS.c mdns/mDNSClientAPI.h mdns/mDNSDebug.h mdns/mDNSPosix.c mdns/mDNSUNP.c rend-posix.c mdns/mDNSPlatformFunctions.h
endif endif
@ -36,7 +28,7 @@ mt_daapd_SOURCES = main.c daapd.h rend.h uici.c uici.h webserver.c \
webserver.h configfile.c configfile.h err.c err.h restart.c restart.h \ webserver.h configfile.c configfile.h err.c err.h restart.c restart.h \
daap-proto.c daap-proto.h daap.c daap.h $(DBFILE) db-memory.h \ daap-proto.c daap-proto.h daap.c daap.h $(DBFILE) db-memory.h \
mp3-scanner.h mp3-scanner.c playlist.c playlist.h rend-unix.c rend-unix.h \ mp3-scanner.h mp3-scanner.c playlist.c playlist.h rend-unix.c rend-unix.h \
lexer.l parser.y $(RENDSRC) $(STRCASESTR) $(STRSEP) lexer.l parser.y $(RENDSRC) strcasestr.c strcasestr.h strsep.c
EXTRA_DIST = mdns/mDNS.c mdns/mDNSClientAPI.h mdns/mDNSDebug.h mdns/mDNSPosix.c \ EXTRA_DIST = mdns/mDNS.c mdns/mDNSClientAPI.h mdns/mDNSDebug.h mdns/mDNSPosix.c \
mdns/mDNSUNP.c mdns/mDNSPlatformFunctions.h mdns/mDNSPosix.h mdns/mDNSUNP.h \ mdns/mDNSUNP.c mdns/mDNSPlatformFunctions.h mdns/mDNSPosix.h mdns/mDNSUNP.h \

View File

@ -32,7 +32,6 @@
#define _POSIX_PTHREAD_SEMANTICS #define _POSIX_PTHREAD_SEMANTICS
#include <ctype.h> #include <ctype.h>
#include <dirent.h>
#include <errno.h> #include <errno.h>
#include <fcntl.h> #include <fcntl.h>
#include <id3tag.h> #include <id3tag.h>
@ -45,6 +44,7 @@
#include <netinet/in.h> /* htons and friends */ #include <netinet/in.h> /* htons and friends */
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/types.h> #include <sys/types.h>
#include <dirent.h> /* why here? For osx 10.2, of course! */
#include "daapd.h" #include "daapd.h"
#include "db-memory.h" #include "db-memory.h"

View File

@ -1,5 +1,10 @@
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include <string.h> #include <string.h>
#if !HAVE_STRCASESTR
/* case-independent string matching, similar to strstr but /* case-independent string matching, similar to strstr but
* matching */ * matching */
char * strcasestr(char* haystack, char* needle) { char * strcasestr(char* haystack, char* needle) {
@ -20,3 +25,4 @@ char * strcasestr(char* haystack, char* needle) {
return NULL; return NULL;
} }
#endif /* !HAVE_STRCASESTR */

View File

@ -1,7 +1,12 @@
/* Compliments of Jay Freeman <saurik@saurik.com> */ /* Compliments of Jay Freeman <saurik@saurik.com> */
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include <string.h> #include <string.h>
#if !HAVE_STRSEP
char *strsep(char **stringp, const char *delim) { char *strsep(char **stringp, const char *delim) {
char *ret = *stringp; char *ret = *stringp;
if (ret == NULL) return(NULL); /* grrr */ if (ret == NULL) return(NULL); /* grrr */
@ -10,4 +15,4 @@ char *strsep(char **stringp, const char *delim) {
} }
return(ret); return(ret);
} }
#endif /* !HAVE_STRSEP */