Skip to content
Snippets Groups Projects
Commit 77284bfa authored by Kevin P. Fleming's avatar Kevin P. Fleming
Browse files

fix Solaris compatibility issues (bug #4339)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5747 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent 17e47637
No related branches found
No related tags found
No related merge requests found
...@@ -512,7 +512,7 @@ update: ...@@ -512,7 +512,7 @@ update:
if [ -f patches/.applied ]; then \ if [ -f patches/.applied ]; then \
patches=`cat patches/.applied`; \ patches=`cat patches/.applied`; \
fi; \ fi; \
if ! [ -z "$$patches" ]; then \ if [ ! -z "$$patches" ]; then \
for x in $$patches; do \ for x in $$patches; do \
echo "Unapplying $$x..."; \ echo "Unapplying $$x..."; \
patch -R -p0 < patches/$$x; \ patch -R -p0 < patches/$$x; \
...@@ -527,7 +527,7 @@ update: ...@@ -527,7 +527,7 @@ update:
grep ^C update.out | cut -d' ' -f2- ; \ grep ^C update.out | cut -d' ' -f2- ; \
fi ; \ fi ; \
rm -f update.out; \ rm -f update.out; \
if ! [ -z "$$patches" ]; then \ if [ ! -z "$$patches" ]; then \
for x in $$patches; do \ for x in $$patches; do \
if [ -f patches/$$x ]; then \ if [ -f patches/$$x ]; then \
echo "Applying patch $$x..."; \ echo "Applying patch $$x..."; \
...@@ -638,7 +638,7 @@ upgrade: all bininstall ...@@ -638,7 +638,7 @@ upgrade: all bininstall
adsi: all adsi: all
mkdir -p $(DESTDIR)$(ASTETCDIR) mkdir -p $(DESTDIR)$(ASTETCDIR)
for x in configs/*.adsi; do \ for x in configs/*.adsi; do \
if ! [ -f $(DESTDIR)$(ASTETCDIRX)/$$x ]; then \ if [ ! -f $(DESTDIR)$(ASTETCDIRX)/$$x ]; then \
install -m 644 $$x $(DESTDIR)$(ASTETCDIR)/`basename $$x` ; \ install -m 644 $$x $(DESTDIR)$(ASTETCDIR)/`basename $$x` ; \
fi ; \ fi ; \
done done
...@@ -806,7 +806,7 @@ env: ...@@ -806,7 +806,7 @@ env:
# We can avoid this by making noclean # We can avoid this by making noclean
cleantest: cleantest:
if ! cmp -s .cleancount .lastclean ; then \ if cmp -s .cleancount .lastclean ; then echo ; else \
$(MAKE) clean; cp -f .cleancount .lastclean;\ $(MAKE) clean; cp -f .cleancount .lastclean;\
fi fi
...@@ -840,7 +840,7 @@ apply: ...@@ -840,7 +840,7 @@ apply:
unapply: unapply:
@if [ -z "$(PATCH)" ]; then \ @if [ -z "$(PATCH)" ]; then \
echo "Usage: make PATCH=<patchname> unapply"; \ echo "Usage: make PATCH=<patchname> unapply"; \
elif ! grep -q ^$(PATCH)$$ patches/.applied 2>/dev/null; then \ elif grep -v -q ^$(PATCH)$$ patches/.applied 2>/dev/null; then \
echo "Patch $(PATCH) is not applied"; \ echo "Patch $(PATCH) is not applied"; \
elif [ -f "patches/$(PATCH)" ]; then \ elif [ -f "patches/$(PATCH)" ]; then \
echo "Un-applying patch $(PATCH)"; \ echo "Un-applying patch $(PATCH)"; \
......
...@@ -5,7 +5,11 @@ ...@@ -5,7 +5,11 @@
#include <string.h> #include <string.h>
#include <locale.h> #include <locale.h>
#include <ctype.h> #include <ctype.h>
#ifndef SOLARIS
#include <err.h> #include <err.h>
#else
#define quad_t uint64_t
#endif
#include <errno.h> #include <errno.h>
#include <regex.h> #include <regex.h>
#include <limits.h> #include <limits.h>
......
...@@ -18,7 +18,11 @@ ...@@ -18,7 +18,11 @@
#include <string.h> #include <string.h>
#include <locale.h> #include <locale.h>
#include <ctype.h> #include <ctype.h>
#ifndef SOLARIS
#include <err.h> #include <err.h>
#else
#define quad_t uint64_t
#endif
#include <errno.h> #include <errno.h>
#include <regex.h> #include <regex.h>
#include <limits.h> #include <limits.h>
......
...@@ -58,14 +58,16 @@ endif ...@@ -58,14 +58,16 @@ endif
depend: .depend depend: .depend
.depend: .depend:
@if ! which mpg123 &>/dev/null ; then \ @if [ x`which mpg123 2>/dev/null | grep -v '^no'` != x ] ; then \
echo "*** You don't have mpg123 installed. You're going to need ***";\ if mpg123 --longhelp 2>&1 | grep -q .59r 2>&1 >/dev/null ; then echo ; else \
echo "*** it if you want MusicOnHold ***";\
elif ! mpg123 --longhelp 2>&1 | grep .59r &>/dev/null ; then \
echo "*************************************************************";\ echo "*************************************************************";\
echo "*** You have the WRONG version of mpg123... you need .59r ***";\ echo "*** You have the WRONG version of mpg123... you need .59r ***";\
echo "*** Use 'make mpg123' to get the right verison ***";\ echo "*** Use 'make mpg123' to get the right verison ***";\
echo "*************************************************************";\ echo "*************************************************************";\
fi ;\
else \
echo "*** You don't have mpg123 installed. You're going to need ***";\
echo "*** it if you want MusicOnHold ***";\
fi fi
../mkdep $(CFLAGS) `ls *.c` ../mkdep $(CFLAGS) `ls *.c`
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment