aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2005-05-20 03:18:35 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2005-05-20 03:18:35 +0000
commit6fcde5d8bfd1338dfedc9b3a6cef9af34e7a9234 (patch)
treed4f35106ab41d2fd11f27ae1bbd0ef0c27434f18
parentc2ac8d62f9538611a67086e3c25293e5ad6dc63f (diff)
fix Solaris compatibility issues (bug #4339)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5747 f38db490-d61c-443f-a65b-d21fe96a405b
-rwxr-xr-xMakefile10
-rwxr-xr-xast_expr2.fl4
-rwxr-xr-xast_expr2.y4
-rwxr-xr-xres/Makefile10
4 files changed, 19 insertions, 9 deletions
diff --git a/Makefile b/Makefile
index c959baf2b..95f4ef007 100755
--- a/Makefile
+++ b/Makefile
@@ -512,7 +512,7 @@ update:
if [ -f patches/.applied ]; then \
patches=`cat patches/.applied`; \
fi; \
- if ! [ -z "$$patches" ]; then \
+ if [ ! -z "$$patches" ]; then \
for x in $$patches; do \
echo "Unapplying $$x..."; \
patch -R -p0 < patches/$$x; \
@@ -527,7 +527,7 @@ update:
grep ^C update.out | cut -d' ' -f2- ; \
fi ; \
rm -f update.out; \
- if ! [ -z "$$patches" ]; then \
+ if [ ! -z "$$patches" ]; then \
for x in $$patches; do \
if [ -f patches/$$x ]; then \
echo "Applying patch $$x..."; \
@@ -638,7 +638,7 @@ upgrade: all bininstall
adsi: all
mkdir -p $(DESTDIR)$(ASTETCDIR)
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` ; \
fi ; \
done
@@ -806,7 +806,7 @@ env:
# We can avoid this by making noclean
cleantest:
- if ! cmp -s .cleancount .lastclean ; then \
+ if cmp -s .cleancount .lastclean ; then echo ; else \
$(MAKE) clean; cp -f .cleancount .lastclean;\
fi
@@ -840,7 +840,7 @@ apply:
unapply:
@if [ -z "$(PATCH)" ]; then \
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"; \
elif [ -f "patches/$(PATCH)" ]; then \
echo "Un-applying patch $(PATCH)"; \
diff --git a/ast_expr2.fl b/ast_expr2.fl
index fc56994ee..452d28f3c 100755
--- a/ast_expr2.fl
+++ b/ast_expr2.fl
@@ -5,7 +5,11 @@
#include <string.h>
#include <locale.h>
#include <ctype.h>
+#ifndef SOLARIS
#include <err.h>
+#else
+#define quad_t uint64_t
+#endif
#include <errno.h>
#include <regex.h>
#include <limits.h>
diff --git a/ast_expr2.y b/ast_expr2.y
index be78d4645..14c84e856 100755
--- a/ast_expr2.y
+++ b/ast_expr2.y
@@ -18,7 +18,11 @@
#include <string.h>
#include <locale.h>
#include <ctype.h>
+#ifndef SOLARIS
#include <err.h>
+#else
+#define quad_t uint64_t
+#endif
#include <errno.h>
#include <regex.h>
#include <limits.h>
diff --git a/res/Makefile b/res/Makefile
index df06973c1..0e8d3ae6a 100755
--- a/res/Makefile
+++ b/res/Makefile
@@ -58,14 +58,16 @@ endif
depend: .depend
.depend:
- @if ! which mpg123 &>/dev/null ; then \
- echo "*** You don't have mpg123 installed. You're going to need ***";\
- echo "*** it if you want MusicOnHold ***";\
- elif ! mpg123 --longhelp 2>&1 | grep .59r &>/dev/null ; then \
+ @if [ x`which mpg123 2>/dev/null | grep -v '^no'` != x ] ; then \
+ if mpg123 --longhelp 2>&1 | grep -q .59r 2>&1 >/dev/null ; then echo ; else \
echo "*************************************************************";\
echo "*** You have the WRONG version of mpg123... you need .59r ***";\
echo "*** Use 'make mpg123' to get the right verison ***";\
echo "*************************************************************";\
+ fi ;\
+ else \
+ echo "*** You don't have mpg123 installed. You're going to need ***";\
+ echo "*** it if you want MusicOnHold ***";\
fi
../mkdep $(CFLAGS) `ls *.c`