From: mike Date: Wed, 3 Apr 2013 13:41:04 +0000 (+0000) Subject: Prefer clang over GCC. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3e334381819122706f9b5e0f349f30a3d97e255f;p=thirdparty%2Fcups.git Prefer clang over GCC. Fix compile error with GCC. Add some code coverage/complexity targets for libcups and cupsd. Xcode project update. git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@10934 7a7537e8-13f0-0310-91df-b6672ffda945 --- diff --git a/CHANGES-1.6.txt b/CHANGES-1.6.txt index 679fd7effd..87813907ae 100644 --- a/CHANGES-1.6.txt +++ b/CHANGES-1.6.txt @@ -3,6 +3,7 @@ CHANGES-1.6.txt CHANGES IN CUPS V1.6.3 + - The configure script now prefers Clang over GCC. - Fixed a compile problem on AIX (STR #4307) - The IPP backend could fail to pause a job for authentication (STR #4298) diff --git a/config-scripts/cups-common.m4 b/config-scripts/cups-common.m4 index e0abfe1bcb..62c17c362a 100644 --- a/config-scripts/cups-common.m4 +++ b/config-scripts/cups-common.m4 @@ -44,9 +44,9 @@ LDFLAGS="${LDFLAGS:=}" dnl Checks for programs... AC_PROG_AWK -AC_PROG_CC +AC_PROG_CC(clang cc gcc) AC_PROG_CPP -AC_PROG_CXX +AC_PROG_CXX(clang++ c++ g++) AC_PROG_RANLIB AC_PATH_PROG(AR,ar) AC_PATH_PROG(CHMOD,chmod) diff --git a/cups/Makefile b/cups/Makefile index 55bdf313c0..c68ef2fc48 100644 --- a/cups/Makefile +++ b/cups/Makefile @@ -201,6 +201,14 @@ depend: $(CC) -MM $(ALL_CFLAGS) $(OBJS:.o=.c) >Dependencies +# +# Run oclint to check code coverage... +# + +oclint: + oclint -o=oclint.html -html $(LIBOBJS:.o=.c) -- $(ALL_CFLAGS) + + # # Install all targets... # diff --git a/scheduler/Makefile b/scheduler/Makefile index 67ca5d78da..3c0fff3e12 100644 --- a/scheduler/Makefile +++ b/scheduler/Makefile @@ -126,6 +126,14 @@ depend: $(CXX) -MM $(ALL_CXXFLAGS) $(CXXOBJS:.o=.cxx) >>Dependencies +# +# Run oclint to check code coverage... +# + +oclint: + oclint -o=oclint.html -html $(CUPSDOBJS:.o=.c) $(LIBOBJS:.o=.c) -- $(ALL_CFLAGS) + + # # Install all targets... # diff --git a/scheduler/cups-exec.c b/scheduler/cups-exec.c index cc7056768a..1541a785f0 100644 --- a/scheduler/cups-exec.c +++ b/scheduler/cups-exec.c @@ -31,6 +31,7 @@ # ifndef SANDBOX_NAMED_EXTERNAL # define SANDBOX_NAMED_EXTERNAL 0x0003 # endif /* !SANDBOX_NAMED_EXTERNAL */ +# pragma GCC diagnostic ignored "-Wdeprecated-declarations" #endif /* HAVE_SANDBOX_H */ @@ -60,7 +61,6 @@ main(int argc, /* I - Number of command-line args */ } #ifdef HAVE_SANDBOX_H -# pragma GCC diagnostic ignored "-Wdeprecated-declarations" /* * Run in a separate security profile... */ diff --git a/xcode/CUPS.xcodeproj/project.pbxproj b/xcode/CUPS.xcodeproj/project.pbxproj index 4f8a2419bb..18990f2bef 100644 --- a/xcode/CUPS.xcodeproj/project.pbxproj +++ b/xcode/CUPS.xcodeproj/project.pbxproj @@ -1967,7 +1967,10 @@ 273BF6B81333B4A90022CAAB /* tests */, 72220EAF1333047D00FCA411 /* Products */, ); + indentWidth = 2; sourceTree = ""; + tabWidth = 8; + wrapsLines = 0; }; 72F75A681336FA42004BB496 /* libcupsimage */ = { isa = PBXGroup;