[prev in list] [next in list] [prev in thread] [next in thread]
List: apache-cvs
Subject: svn commit: r1087185 - in /httpd/httpd/trunk/build: NWGNUenvironment.inc
From: fuankg () apache ! org
Date: 2011-03-31 5:21:21
Message-ID: 20110331052121.140D923888CE () eris ! apache ! org
[Download RAW message or body]
Author: fuankg
Date: Thu Mar 31 05:21:20 2011
New Revision: 1087185
URL: http://svn.apache.org/viewvc?rev=1087185&view=rev
Log:
Removed dependency on sort command for export list.
Added a shell sort function to the NetWare export script
which is only few ms slower than the external sort command;
this makes the export list now identical on all build platforms.
Modified:
httpd/httpd/trunk/build/NWGNUenvironment.inc
httpd/httpd/trunk/build/NWGNUmakefile
httpd/httpd/trunk/build/make_nw_export.awk
Modified: httpd/httpd/trunk/build/NWGNUenvironment.inc
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/build/NWGNUenvironment.inc?rev=1087185&r1=1087184&r2=1087185&view=diff
==============================================================================
--- httpd/httpd/trunk/build/NWGNUenvironment.inc (original)
+++ httpd/httpd/trunk/build/NWGNUenvironment.inc Thu Mar 31 05:21:20 2011
@@ -132,7 +132,6 @@ WIN_CC = mwcc
# Setup build tools
AWK = awk
-SORT = sort
# Setup distribution tools
ZIP = zip -qr9
Modified: httpd/httpd/trunk/build/NWGNUmakefile
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/build/NWGNUmakefile?rev=1087185&r1=1087184&r2=1087185&view=diff
==============================================================================
--- httpd/httpd/trunk/build/NWGNUmakefile (original)
+++ httpd/httpd/trunk/build/NWGNUmakefile Thu Mar 31 05:21:20 2011
@@ -29,11 +29,11 @@ libs :: chkapr $(NWOS)/chartables.c
$(DAV)/main/dav.imp : make_nw_export.awk $(DAV)/main/mod_dav.h
@echo $(DL)GEN $@$(DL)
- $(AWK) -v EXPPREFIX=AP$(VERSION_MAJMIN) -f $^ | $(SORT) >$@
+ $(AWK) -v EXPPREFIX=AP$(VERSION_MAJMIN) -f $^ >$@
$(NWOS)/httpd.imp : make_nw_export.awk nw_export.i
@echo $(DL)GEN $@$(DL)
- $(AWK) -v EXPPREFIX=AP$(VERSION_MAJMIN) -f $^ | $(SORT) >$@
+ $(AWK) -v EXPPREFIX=AP$(VERSION_MAJMIN) -f $^ >$@
nw_export.i : nw_export.inc $(FILES_prebuild_headers) cc.opt
@echo $(DL)GEN $@$(DL)
Modified: httpd/httpd/trunk/build/make_nw_export.awk
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/build/make_nw_export.awk?rev=1087185&r1=1087184&r2=1087185&view=diff
==============================================================================
--- httpd/httpd/trunk/build/make_nw_export.awk (original)
+++ httpd/httpd/trunk/build/make_nw_export.awk Thu Mar 31 05:21:20 2011
@@ -13,12 +13,16 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
-#
# Based on apr's make_export.awk, which is
# based on Ryan Bloom's make_export.pl
+#
BEGIN {
- printf(" (%s)\n", EXPPREFIX)
+}
+
+function add_symbol(sym_name) {
+ sub(" ", "", sym_name)
+ exports[++idx] = sym_name
}
# List of functions that we don't support, yet??
@@ -84,14 +88,31 @@ BEGIN {
add_symbol($NF)
}
-#END {
-# printf("\n\n#found: %d symbols.\n", found)
-#}
-function add_symbol(sym_name) {
- found++
- sub (" ", "", sym_name)
- printf(" %s,\n", sym_name)
+END {
+ printf("Added %d symbols to export list.\n", idx) > "/dev/stderr"
+ # sort symbols with shell sort
+ increment = int(idx / 2)
+ while (increment > 0) {
+ for (i = increment+1; i <= idx; i++) {
+ j = i
+ temp = exports[i]
+ while ((j >= increment+1) && (exports[j-increment] > temp)) {
+ exports[j] = exports[j-increment]
+ j -= increment
+ }
+ exports[j] = temp
+ }
+ if (increment == 2)
+ increment = 1
+ else
+ increment = int(increment*5/11)
+ }
+ # print the array
+ printf(" (%s)\n", EXPPREFIX)
+ while (x < idx - 1) {
+ printf(" %s,\n", exports[++x])
+ }
+ printf(" %s\n", exports[++x])
}
-
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic