-diff -uNr ushare-1.1a/configure ushare-1.1b/configure
---- ushare-1.1a/configure 2007-12-09 14:03:36.000000000 +0100
-+++ ushare-1.1b/configure 2016-02-11 02:17:48.788843889 +0100
-@@ -42,6 +42,9 @@
+diff --git a/configure b/configure
+--- a/configure
++++ b/configure
+@@ -42,6 +42,9 @@ show_help(){
echo " --with-libdlna-dir=DIR check for libdlna installed in DIR"
echo ""
echo "Advanced options (experts only):"
echo " --enable-debug enable debugging symbols"
echo " --disable-debug disable debugging symbols"
echo " --disable-strip disable stripping of executables at installation"
-@@ -164,6 +167,11 @@
+@@ -164,6 +167,11 @@ add_clog_str(){
echo "#define $1 \"$2\"" >> $CONFIG_H
}
check_cmd(){
log "$@"
"$@" >>$logfile 2>&1
-@@ -300,13 +308,15 @@
+@@ -300,13 +308,15 @@ make="make"
strip="strip"
cpu=`uname -m`
optimize="yes"
system_name=`uname -s 2>&1`
#################################################
-@@ -420,6 +430,12 @@
+@@ -420,6 +430,12 @@ for opt do
;;
--disable-dlna) dlna="no"
;;
--enable-debug) debug="yes"
;;
--disable-debug) debug="no"
-@@ -584,6 +600,25 @@
+@@ -584,6 +600,25 @@ check_cflags -D_REENTRANT
linux && add_cflags -D_GNU_SOURCE
#################################################
+if enabled developer; then
+ add_cflags -Werror
+ add_cflags -DHAVE_DEVELOPER
-+
++
+ have_ctags='no'
+ if check_cmd_exists 'ctags'; then
+ have_ctags='yes'
+
+ have_etags='no'
+ if check_cmd_exists 'etags'; then
-+ have_etags='yes'
++ have_etags='yes'
+ fi
+
+fi
# check for debug symbols
#################################################
if enabled debug; then
-@@ -684,6 +719,8 @@
+@@ -684,6 +719,8 @@ echolog " C compiler $cc"
echolog " STRIP $strip"
echolog " make $make"
echolog " CPU $cpu ($tune)"
echolog " debug symbols $debug"
echolog " strip symbols $dostrip"
echolog " optimize $optimize"
-@@ -724,6 +761,10 @@
+@@ -724,6 +761,10 @@ append_config "OPTFLAGS=$CFLAGS"
append_config "LDFLAGS=$LDFLAGS"
append_config "INSTALL=$INSTALL"
append_config "DEBUG=$debug"
-diff -uNr ushare-1.1a/scripts/Makefile ushare-1.1b/scripts/Makefile
---- ushare-1.1a/scripts/Makefile 2007-12-09 14:03:36.000000000 +0100
-+++ ushare-1.1b/scripts/Makefile 2016-02-11 02:17:48.788843889 +0100
-@@ -3,6 +3,11 @@
+diff --git a/scripts/Makefile b/scripts/Makefile
+--- a/scripts/Makefile
++++ b/scripts/Makefile
+@@ -3,6 +3,11 @@ $(error "config.mak is not present, run configure !")
endif
include ../config.mak
-+INSTALL_RULES =
++INSTALL_RULES =
+ifeq ($(INSTALL_SYSCONF),yes)
-+ INSTALL_RULES += install-sysconf
++ INSTALL_RULES += install-sysconf
+endif
+
CONF_FILE = "ushare.conf"
INITD_FILE = "ushare"
-@@ -14,7 +19,9 @@
+@@ -14,7 +19,9 @@ clean:
distclean:
$(INSTALL) -d $(sysconfdir)
$(INSTALL) -m 644 $(CONF_FILE) $(sysconfdir)
$(INSTALL) -d $(sysconfdir)/init.d
-diff -uNr ushare-1.1a/scripts/ushare.conf ushare-1.1b/scripts/ushare.conf
---- ushare-1.1a/scripts/ushare.conf 2007-12-09 14:03:36.000000000 +0100
-+++ ushare-1.1b/scripts/ushare.conf 2016-02-11 02:17:48.796843888 +0100
+diff --git a/scripts/ushare.conf b/scripts/ushare.conf
+--- a/scripts/ushare.conf
++++ b/scripts/ushare.conf
@@ -2,11 +2,11 @@
# Configuration file for uShare
# Port to listen to (default is random from IANA Dynamic Ports range)
# Ex : USHARE_PORT=49200
-@@ -18,7 +18,7 @@
+@@ -18,7 +18,7 @@ USHARE_TELNET_PORT=
# Directories to be shared (space or CSV list).
# Ex: USHARE_DIR=/dir1,/dir2
# Use to override what happens when iconv fails to parse a file name.
# The default uShare behaviour is to not add the entry in the media list
-@@ -28,7 +28,7 @@
+@@ -28,7 +28,7 @@ USHARE_DIR=
# as is. (Umlauts for all!)
#
# Options are TRUE/YES/1 for override and anything else for default behaviour
# Enable Web interface (yes/no)
ENABLE_WEB=
-diff -uNr ushare-1.1a/src/cds.c ushare-1.1b/src/cds.c
---- ushare-1.1a/src/cds.c 2007-12-09 14:03:36.000000000 +0100
-+++ ushare-1.1b/src/cds.c 2016-02-11 02:17:48.796843888 +0100
+diff --git a/src/Makefile b/src/Makefile
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -3,6 +3,15 @@ $(error "../config.mak is not present, run configure !")
+ endif
+ include ../config.mak
+
++ifeq ($(DEVELOPER),yes)
++ ifeq ($(HAVE_ETAGS),yes)
++ BUILD_RULES += TAGS
++ endif
++ ifeq ($(HAVE_CTAGS),yes)
++ BUILD_RULES += tags
++ endif
++endif
++
+ PROG = ushare
+
+ EXTRADIST = ushare.1 \
+@@ -50,7 +59,7 @@ OBJS = $(SRCS:.c=.o)
+
+ .SUFFIXES: .c .o
+
+-all: depend $(PROG)
++all: depend $(BUILD_RULES) $(PROG)
+
+ .c.o:
+ $(CC) -c $(CFLAGS) $(OPTFLAGS) -o $@ $<
+@@ -58,6 +67,14 @@ all: depend $(PROG)
+ $(PROG): $(OBJS)
+ $(CC) $(OBJS) $(LDFLAGS) $(EXTRALIBS) -o $@
+
++TAGS:
++ @rm -f $@; \
++ ( find -name '*.[chS]' -print ) | xargs etags -a
++
++tags:
++ @rm -f $@; \
++ ( find -name '*.[chS]' -print ) | xargs ctags -a;
++
+ clean:
+ -$(RM) -f *.o $(PROG)
+ -$(RM) -f .depend
+diff --git a/src/cds.c b/src/cds.c
+--- a/src/cds.c
++++ b/src/cds.c
@@ -19,7 +19,9 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include <upnp/upnp.h>
#include <upnp/upnptools.h>
-diff -uNr ushare-1.1a/src/cms.c ushare-1.1b/src/cms.c
---- ushare-1.1a/src/cms.c 2007-12-09 14:03:36.000000000 +0100
-+++ ushare-1.1b/src/cms.c 2016-02-11 02:17:48.796843888 +0100
+diff --git a/src/cms.c b/src/cms.c
+--- a/src/cms.c
++++ b/src/cms.c
@@ -20,6 +20,7 @@
*/
#include <upnp/upnp.h>
#include <upnp/upnptools.h>
-diff -uNr ushare-1.1a/src/ctrl_telnet.c ushare-1.1b/src/ctrl_telnet.c
---- ushare-1.1a/src/ctrl_telnet.c 2007-12-09 14:03:36.000000000 +0100
-+++ ushare-1.1b/src/ctrl_telnet.c 2016-02-11 02:17:48.792843889 +0100
-@@ -202,6 +202,7 @@
+diff --git a/src/ctrl_telnet.c b/src/ctrl_telnet.c
+--- a/src/ctrl_telnet.c
++++ b/src/ctrl_telnet.c
+@@ -202,6 +202,7 @@ ctrl_telnet_start (int port)
void
ctrl_telnet_stop (void)
{
pthread_mutex_lock (&startstop_lock);
if (!started)
-@@ -211,7 +212,7 @@
+@@ -211,7 +212,7 @@ ctrl_telnet_stop (void)
}
/* yes is int, which is bigger then char, so this should be safe */
pthread_mutex_unlock (&startstop_lock);
pthread_join (ttd.thread, NULL);
-diff -uNr ushare-1.1a/src/http.c ushare-1.1b/src/http.c
---- ushare-1.1a/src/http.c 2007-12-09 14:03:36.000000000 +0100
-+++ ushare-1.1b/src/http.c 2016-02-11 02:17:48.796843888 +0100
+diff --git a/src/http.c b/src/http.c
+--- a/src/http.c
++++ b/src/http.c
@@ -25,6 +25,7 @@
#include <errno.h>
#include <stdio.h>
#include <unistd.h>
#include <errno.h>
-@@ -77,8 +78,7 @@
+@@ -77,8 +78,7 @@ set_info_file (struct File_Info *info, const size_t length,
info->content_type = ixmlCloneDOMString (content_type);
}
{
extern struct ushare_t *ut;
struct upnp_entry_t *entry = NULL;
-@@ -197,8 +197,7 @@
+@@ -197,8 +197,7 @@ get_file_memory (const char *fullpath, const char *description,
return ((UpnpWebFileHandle) file);
}
{
extern struct ushare_t *ut;
struct upnp_entry_t *entry = NULL;
-@@ -251,8 +250,7 @@
+@@ -251,8 +250,7 @@ http_open (const char *filename, enum UpnpOpenFileMode mode)
return ((UpnpWebFileHandle) file);
}
{
struct web_file_t *file = (struct web_file_t *) fh;
ssize_t len = -1;
-@@ -286,8 +284,7 @@
+@@ -286,8 +284,7 @@ http_read (UpnpWebFileHandle fh, char *buf, size_t buflen)
return len;
}
char *buf __attribute__((unused)),
size_t buflen __attribute__((unused)))
{
-@@ -296,8 +293,7 @@
+@@ -296,8 +293,7 @@ http_write (UpnpWebFileHandle fh __attribute__((unused)),
return 0;
}
{
struct web_file_t *file = (struct web_file_t *) fh;
off_t newpos = -1;
-@@ -371,8 +367,7 @@
+@@ -371,8 +367,7 @@ http_seek (UpnpWebFileHandle fh, off_t offset, int origin)
return 0;
}
{
struct web_file_t *file = (struct web_file_t *) fh;
-@@ -402,13 +397,3 @@
+@@ -402,13 +397,3 @@ http_close (UpnpWebFileHandle fh)
return 0;
}
- http_seek,
- http_close
- };
-diff -uNr ushare-1.1a/src/http.h ushare-1.1b/src/http.h
---- ushare-1.1a/src/http.h 2007-12-09 14:03:36.000000000 +0100
-+++ ushare-1.1b/src/http.h 2016-02-11 02:17:48.792843889 +0100
+diff --git a/src/http.h b/src/http.h
+--- a/src/http.h
++++ b/src/http.h
@@ -25,6 +25,13 @@
#include <upnp/upnp.h>
#include <upnp/upnptools.h>
+int http_get_info (const char *filename, struct File_Info *info);
#endif /* _HTTP_H_ */
-diff -uNr ushare-1.1a/src/Makefile ushare-1.1b/src/Makefile
---- ushare-1.1a/src/Makefile 2007-12-09 14:03:36.000000000 +0100
-+++ ushare-1.1b/src/Makefile 2016-02-11 02:17:48.788843889 +0100
-@@ -3,6 +3,15 @@
- endif
- include ../config.mak
-
-+ifeq ($(DEVELOPER),yes)
-+ ifeq ($(HAVE_ETAGS),yes)
-+ BUILD_RULES += TAGS
-+ endif
-+ ifeq ($(HAVE_CTAGS),yes)
-+ BUILD_RULES += tags
-+ endif
-+endif
-+
- PROG = ushare
-
- EXTRADIST = ushare.1 \
-@@ -50,7 +59,7 @@
-
- .SUFFIXES: .c .o
-
--all: depend $(PROG)
-+all: depend $(BUILD_RULES) $(PROG)
-
- .c.o:
- $(CC) -c $(CFLAGS) $(OPTFLAGS) -o $@ $<
-@@ -58,6 +67,14 @@
- $(PROG): $(OBJS)
- $(CC) $(OBJS) $(LDFLAGS) $(EXTRALIBS) -o $@
-
-+TAGS:
-+ @rm -f $@; \
-+ ( find -name '*.[chS]' -print ) | xargs etags -a
-+
-+tags:
-+ @rm -f $@; \
-+ ( find -name '*.[chS]' -print ) | xargs ctags -a;
-+
- clean:
- -$(RM) -f *.o $(PROG)
- -$(RM) -f .depend
-diff -uNr ushare-1.1a/src/mime.c ushare-1.1b/src/mime.c
---- ushare-1.1a/src/mime.c 2007-12-09 14:03:36.000000000 +0100
-+++ ushare-1.1b/src/mime.c 2016-02-11 02:17:48.792843889 +0100
-@@ -53,6 +53,7 @@
+diff --git a/src/mime.c b/src/mime.c
+--- a/src/mime.c
++++ b/src/mime.c
+@@ -53,6 +53,7 @@ const struct mime_type_t MIME_Type_List[] = {
{ "mpeg2", UPNP_VIDEO, "http-get:*:video/mpeg2:"},
{ "m4v", UPNP_VIDEO, "http-get:*:video/mp4:"},
{ "m4p", UPNP_VIDEO, "http-get:*:video/mp4:"},
{ "mp4ps", UPNP_VIDEO, "http-get:*:video/x-nerodigital-ps:"},
{ "ts", UPNP_VIDEO, "http-get:*:video/mpeg2:"},
{ "ogm", UPNP_VIDEO, "http-get:*:video/mpeg:"},
-@@ -79,7 +80,6 @@
+@@ -79,7 +80,6 @@ const struct mime_type_t MIME_Type_List[] = {
{ "mp1", UPNP_AUDIO, "http-get:*:audio/mp1:"},
{ "mp2", UPNP_AUDIO, "http-get:*:audio/mp2:"},
{ "mp3", UPNP_AUDIO, "http-get:*:audio/mpeg:"},
{ "m4a", UPNP_AUDIO, "http-get:*:audio/mp4:"},
{ "ogg", UPNP_AUDIO, "http-get:*:audio/x-ogg:"},
{ "wav", UPNP_AUDIO, "http-get:*:audio/wav:"},
-@@ -144,7 +144,8 @@
+@@ -144,7 +144,8 @@ char *mime_get_protocol (struct mime_type_t *mime)
if (!mime)
return NULL;
strcat (protocol, "*");
return strdup (protocol);
}
-diff -uNr ushare-1.1a/src/presentation.c ushare-1.1b/src/presentation.c
---- ushare-1.1a/src/presentation.c 2007-12-09 14:03:36.000000000 +0100
-+++ ushare-1.1b/src/presentation.c 2016-02-11 02:17:48.796843888 +0100
+diff --git a/src/presentation.c b/src/presentation.c
+--- a/src/presentation.c
++++ b/src/presentation.c
@@ -18,7 +18,9 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#if HAVE_LANGINFO_CODESET
# include <langinfo.h>
-diff -uNr ushare-1.1a/src/services.c ushare-1.1b/src/services.c
---- ushare-1.1a/src/services.c 2007-12-09 14:03:36.000000000 +0100
-+++ ushare-1.1b/src/services.c 2016-02-11 02:17:48.796843888 +0100
+diff --git a/src/services.c b/src/services.c
+--- a/src/services.c
++++ b/src/services.c
@@ -20,6 +20,7 @@
*/
#include <upnp/upnp.h>
#include <upnp/upnptools.h>
-diff -uNr ushare-1.1a/src/trace.c ushare-1.1b/src/trace.c
---- ushare-1.1a/src/trace.c 2007-12-09 14:03:36.000000000 +0100
-+++ ushare-1.1b/src/trace.c 2016-02-11 02:58:25.784764698 +0100
-@@ -57,7 +57,11 @@
+diff --git a/src/trace.c b/src/trace.c
+--- a/src/trace.c
++++ b/src/trace.c
+@@ -57,7 +57,7 @@ print_log (log_level level, const char *format, ...)
va_end (va);
}
-+#ifdef __UCLIBC__
+-inline void
+extern inline void
-+#else
- inline void
-+#endif
start_log (void)
{
openlog (PACKAGE_NAME, LOG_PID, LOG_DAEMON);
-diff -uNr ushare-1.1a/src/trace.h ushare-1.1b/src/trace.h
---- ushare-1.1a/src/trace.h 2007-12-09 14:03:36.000000000 +0100
-+++ ushare-1.1b/src/trace.h 2016-02-11 02:57:24.632766685 +0100
-@@ -29,7 +29,11 @@
+diff --git a/src/trace.h b/src/trace.h
+--- a/src/trace.h
++++ b/src/trace.h
+@@ -29,7 +29,7 @@ typedef enum {
void print_log (log_level level, const char *format, ...)
__attribute__ ((format (printf, 2, 3)));
-+#ifdef __UCLIBC__
+-inline void start_log (void);
+extern inline void start_log (void);
-+#else
- inline void start_log (void);
-+#endif
/* log_info
* Normal print, to replace printf
-diff -uNr ushare-1.1a/src/ushare.c ushare-1.1b/src/ushare.c
---- ushare-1.1a/src/ushare.c 2007-12-09 14:03:36.000000000 +0100
-+++ ushare-1.1b/src/ushare.c 2016-02-11 02:59:53.076761861 +0100
-@@ -188,7 +188,7 @@
+diff --git a/src/ushare.c b/src/ushare.c
+--- a/src/ushare.c
++++ b/src/ushare.c
+@@ -188,7 +188,7 @@ handle_action_request (struct Upnp_Action_Request *request)
if (strcmp (request->DevUDN + 5, ut->udn))
return;
ip = ntohl (ip);
sprintf (val, "%d.%d.%d.%d",
(ip >> 24) & 0xFF, (ip >> 16) & 0xFF, (ip >> 8) & 0xFF, ip & 0xFF);
-@@ -348,7 +348,47 @@
+@@ -348,7 +348,47 @@ init_upnp (struct ushare_t *ut)
UpnpEnableWebserver (TRUE);
if (res != UPNP_E_SUCCESS)
{
log_error (_("Cannot set virtual directory callbacks\n"));
-@@ -718,7 +758,11 @@
+@@ -718,7 +758,7 @@ reload_config (int s __attribute__ ((unused)))
}
}
-+#ifdef __UCLIBC__
+-inline void
+extern inline void
-+#else
- inline void
-+#endif
display_headers (void)
{
printf (_("%s (version %s), a lightweight UPnP A/V and DLNA Media Server.\n"),
-diff -uNr ushare-1.1a/src/ushare.h ushare-1.1b/src/ushare.h
---- ushare-1.1a/src/ushare.h 2007-12-09 14:03:36.000000000 +0100
-+++ ushare-1.1b/src/ushare.h 2016-02-11 02:59:16.980763034 +0100
-@@ -127,6 +127,9 @@
+diff --git a/src/ushare.h b/src/ushare.h
+--- a/src/ushare.h
++++ b/src/ushare.h
+@@ -127,6 +127,6 @@ struct action_event_t {
struct service_t *service;
};
-+#ifdef __UCLIBC__
+-inline void display_headers (void);
+extern inline void display_headers (void);
-+#else
- inline void display_headers (void);
--
-+#endif
+
#endif /* _USHARE_H_ */