From 9a526c0900a85b8d3a6d731fd482c24001edd962 Mon Sep 17 00:00:00 2001 From: b1v1r Date: Wed, 21 Oct 2009 18:14:14 +0000 Subject: [PATCH] Merge in 2.5.x build changes into trunk. --- apache2/autogen.sh | 4 ++ apache2/build/PrintPath | 130 ------------------------------------ apache2/build/buildcheck.sh | 54 --------------- apache2/buildconf | 86 ------------------------ apache2/msc_lua.c | 6 +- 5 files changed, 8 insertions(+), 272 deletions(-) create mode 100755 apache2/autogen.sh delete mode 100755 apache2/build/PrintPath delete mode 100755 apache2/build/buildcheck.sh delete mode 100755 apache2/buildconf diff --git a/apache2/autogen.sh b/apache2/autogen.sh new file mode 100755 index 00000000..5b28b040 --- /dev/null +++ b/apache2/autogen.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +#automake --add-missing --copy +autoreconf --install diff --git a/apache2/build/PrintPath b/apache2/build/PrintPath deleted file mode 100755 index 2a2b48b6..00000000 --- a/apache2/build/PrintPath +++ /dev/null @@ -1,130 +0,0 @@ -#!/bin/sh -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# -# Look for program[s] somewhere in $PATH. -# -# Options: -# -s -# Do not print out full pathname. (silent) -# -pPATHNAME -# Look in PATHNAME instead of $PATH -# -# Usage: -# PrintPath [-s] [-pPATHNAME] program [program ...] -# -# Initially written by Jim Jagielski for the Apache configuration mechanism -# (with kudos to Kernighan/Pike) - -## -# Some "constants" -## -pathname=$PATH -echo="yes" - -## -# Find out what OS we are running for later on -## -os=`(uname) 2>/dev/null` - -## -# Parse command line -## -for args in $* -do - case $args in - -s ) echo="no" ;; - -p* ) pathname="`echo $args | sed 's/^..//'`" ;; - * ) programs="$programs $args" ;; - esac -done - -## -# Now we make the adjustments required for OS/2 and everyone -# else :) -# -# First of all, all OS/2 programs have the '.exe' extension. -# Next, we adjust PATH (or what was given to us as PATH) to -# be whitespace separated directories. -# Finally, we try to determine the best flag to use for -# test/[] to look for an executable file. OS/2 just has '-r' -# but with other OSs, we do some funny stuff to check to see -# if test/[] knows about -x, which is the prefered flag. -## - -if [ "x$os" = "xOS/2" ] -then - ext=".exe" - pathname=`echo -E $pathname | - sed 's/^;/.;/ - s/;;/;.;/g - s/;$/;./ - s/;/ /g - s/\\\\/\\//g' ` - test_exec_flag="-r" -else - ext="" # No default extensions - pathname=`echo $pathname | - sed 's/^:/.:/ - s/::/:.:/g - s/:$/:./ - s/:/ /g' ` - # Here is how we test to see if test/[] can handle -x - testfile="pp.t.$$" - - cat > $testfile </dev/null`; then - test_exec_flag="-x" - else - test_exec_flag="-r" - fi - rm -f $testfile -fi - -for program in $programs -do - for path in $pathname - do - if [ $test_exec_flag $path/${program}${ext} ] && \ - [ ! -d $path/${program}${ext} ]; then - if [ "x$echo" = "xyes" ]; then - echo $path/${program}${ext} - fi - exit 0 - fi - -# Next try without extension (if one was used above) - if [ "x$ext" != "x" ]; then - if [ $test_exec_flag $path/${program} ] && \ - [ ! -d $path/${program} ]; then - if [ "x$echo" = "xyes" ]; then - echo $path/${program} - fi - exit 0 - fi - fi - done -done -exit 1 - diff --git a/apache2/build/buildcheck.sh b/apache2/build/buildcheck.sh deleted file mode 100755 index 3097b0a4..00000000 --- a/apache2/build/buildcheck.sh +++ /dev/null @@ -1,54 +0,0 @@ -#! /bin/sh - -echo "buildconf: checking installation..." - -# autoconf 2.50 or newer -ac_version=`${AUTOCONF:-autoconf} --version 2>/dev/null|sed -e 's/^[^0-9]*//;s/[a-z]* *$//;q'` -if test -z "$ac_version"; then -echo "buildconf: autoconf not found." -echo " You need autoconf version 2.50 or newer installed" -echo " to build APR from SVN." -exit 1 -fi -IFS=.; set $ac_version; IFS=' ' -if test "$1" = "2" -a "$2" -lt "50" || test "$1" -lt "2"; then -echo "buildconf: autoconf version $ac_version found." -echo " You need autoconf version 2.50 or newer installed" -echo " to build APR from SVN." -exit 1 -else -echo "buildconf: autoconf version $ac_version (ok)" -fi - -# Sample libtool --version outputs: -# ltmain.sh (GNU libtool) 1.3.3 (1.385.2.181 1999/07/02 15:49:11) -# ltmain.sh (GNU libtool 1.1361 2004/01/02 23:10:52) 1.5a -# output is multiline from 1.5 onwards - -# Require libtool 1.4 or newer -libtool=`build/PrintPath glibtool libtool libtool15 libtool14` -lt_pversion=`$libtool --version 2>/dev/null|sed -e 's/([^)]*)//g;s/^[^0-9]*//;s/[- ].*//g;q'` -if test -z "$lt_pversion"; then -echo "buildconf: libtool not found." -echo " You need libtool version 1.4 or newer installed" -echo " to build APR from SVN." -exit 1 -fi -lt_version=`echo $lt_pversion|sed -e 's/\([a-z]*\)$/.\1/'` -IFS=.; set $lt_version; IFS=' ' -lt_status="good" -if test "$1" = "1"; then - if test "$2" -lt "4"; then - lt_status="bad" - fi -fi -if test $lt_status = "good"; then - echo "buildconf: libtool version $lt_pversion (ok)" - exit 0 -fi - -echo "buildconf: libtool version $lt_pversion found." -echo " You need libtool version 1.4 or newer installed" -echo " to build APR from SVN." - -exit 1 diff --git a/apache2/buildconf b/apache2/buildconf deleted file mode 100755 index 153f0bf6..00000000 --- a/apache2/buildconf +++ /dev/null @@ -1,86 +0,0 @@ -#!/bin/sh -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# - -# buildconf: Build the support scripts needed to compile from a -# checked-out version of the source code. - -# Verify that the builder has the right config tools installed -# -build/buildcheck.sh || exit 1 - -echo "Generating config header ..." -autoheader -Wall || exit 1 - -libtoolize=`build/PrintPath glibtoolize libtoolize15 libtoolize14 libtoolize` -if [ "x$libtoolize" = "x" ]; then - echo "libtoolize not found in path" - exit 1 -fi - -# Create the libtool helper files -# -# Note: we copy (rather than link) them to simplify distribution. -# Note: APR supplies its own config.guess and config.sub -- we do not -# rely on libtool's versions -# -echo "Copying libtool helper files ..." - -# Remove any libtool files so one can switch between libtool 1.3 -# and libtool 1.4 by simply rerunning the buildconf script. -(cd build ; rm -f ltconfig ltmain.sh libtool.m4) - -$libtoolize --copy --automake - -if [ -f libtool.m4 ]; then - ltfile=`pwd`/libtool.m4 -else - ltfindcmd="`sed -n \"/=[^\\\`]/p;/libtool_m4=/{s/.*=/echo /p;q;}\" \ - < $libtoolize`" - ltfile=${LIBTOOL_M4-`eval "$ltfindcmd"`} - # Expecting the code above to be very portable, but just in case... - if [ -z "$ltfile" -o ! -f "$ltfile" ]; then - ltpath=`dirname $libtoolize` - ltfile=`cd $ltpath/../share/aclocal ; pwd`/libtool.m4 - fi -fi - -if [ ! -f $ltfile ]; then - echo "$ltfile not found" - exit 1 -fi - -echo "buildconf: Using libtool.m4 at ${ltfile}." - -cat $ltfile | sed -e 's/LIBTOOL=\(.*\)top_build/LIBTOOL=\1apr_build/' > build/libtool.m4 - -# libtool.m4 from 1.6 requires ltsugar.m4 -if [ -f ltsugar.m4 ]; then - rm -f build/ltsugar.m4 - mv ltsugar.m4 build/ltsugar.m4 -fi - -# Clean up any leftovers -rm -f aclocal.m4 libtool.m4 - -echo "Creating configure ..." -${AUTOCONF:-autoconf} - -# Remove autoconf 2.5x's cache directory -rm -rf autom4te*.cache - -exit 0 diff --git a/apache2/msc_lua.c b/apache2/msc_lua.c index 195f8f79..f248a6d7 100644 --- a/apache2/msc_lua.c +++ b/apache2/msc_lua.c @@ -59,12 +59,14 @@ static const char* dump_reader(lua_State* L, void* user_data, size_t* size) { static int dump_writer(lua_State *L, const void* data, size_t len, void* user_data) { msc_lua_dumpw_t *dump = (msc_lua_dumpw_t *)user_data; msc_script_part *part; + void *part_data; /* Allocate new part, copy the data into it. */ + part_data = apr_palloc(dump->pool, len); + memcpy(part_data, data, len); part = apr_palloc(dump->pool, sizeof(msc_script_part)); - part->data = apr_palloc(dump->pool, len); + part->data = part_data; part->len = len; - memcpy((void *)part->data, data, len); /* Then add it to the list of parsts. */ *(const msc_script_part **)apr_array_push(dump->parts) = part;