Author: cutting
Date: Fri Jul 3 04:34:31 2009
New Revision: 790785
URL: http://svn.apache.org/viewvc?rev=790785&view=rev
Log:
AVRO-68. Add license headers to C sources and improve C packaging.
Contributed by Matt Massie.
Modified:
hadoop/avro/trunk/CHANGES.txt
hadoop/avro/trunk/build.xml
hadoop/avro/trunk/src/c/ (props changed)
hadoop/avro/trunk/src/c/.gitignore
hadoop/avro/trunk/src/c/Makefile.am
hadoop/avro/trunk/src/c/avro.c
hadoop/avro/trunk/src/c/avro.h
hadoop/avro/trunk/src/c/avro_array.c
hadoop/avro/trunk/src/c/avro_double.c
hadoop/avro/trunk/src/c/avro_file.c
hadoop/avro/trunk/src/c/avro_memory.c
hadoop/avro/trunk/src/c/avro_raw.c
hadoop/avro/trunk/src/c/avro_socket.c
hadoop/avro/trunk/src/c/avro_string.c
hadoop/avro/trunk/src/c/avro_zigzag.c
hadoop/avro/trunk/src/c/configure.in
hadoop/avro/trunk/src/c/dump.c
hadoop/avro/trunk/src/c/dump.h
hadoop/avro/trunk/src/c/error.c
hadoop/avro/trunk/src/c/error.h
hadoop/avro/trunk/src/c/json.c
hadoop/avro/trunk/src/c/json.h
hadoop/avro/trunk/src/c/json_tokenizer.c
hadoop/avro/trunk/src/c/json_tokenizer.h
hadoop/avro/trunk/src/c/test_avro_bytes.c
hadoop/avro/trunk/src/c/test_avro_float_double.c
hadoop/avro/trunk/src/c/test_avro_raw.c
hadoop/avro/trunk/src/c/test_avro_string.c
hadoop/avro/trunk/src/c/test_avro_zigzag.c
hadoop/avro/trunk/src/c/test_json_parser.c
Modified: hadoop/avro/trunk/CHANGES.txt
URL:
http://svn.apache.org/viewvc/hadoop/avro/trunk/CHANGES.txt?rev=790785&r1=790784&r2=790785&view=diff
==============================================================================
--- hadoop/avro/trunk/CHANGES.txt (original)
+++ hadoop/avro/trunk/CHANGES.txt Fri Jul 3 04:34:31 2009
@@ -89,6 +89,9 @@
AVRO-59. C++: make serializer more generic. (Scott Banachowski
via cutting)
+ AVRO-68. Add license headers to C sources and improve C packaging.
+ (Matt Massie via cutting)
+
OPTIMIZATIONS
BUG FIXES
Modified: hadoop/avro/trunk/build.xml
URL:
http://svn.apache.org/viewvc/hadoop/avro/trunk/build.xml?rev=790785&r1=790784&r2=790785&view=diff
==============================================================================
--- hadoop/avro/trunk/build.xml (original)
+++ hadoop/avro/trunk/build.xml Fri Jul 3 04:34:31 2009
@@ -32,11 +32,12 @@
<property name="year" value="2009"/>
<property name="src.dir" value="${basedir}/src"/>
+ <property name="build.dir" value="${basedir}/build"/>
<property name="java.src.dir" value="${src.dir}/java"/>
<property name="c.src.dir" value="${src.dir}/c"/>
+ <property name="c.build.dir" value="${build.dir}/c/obj"/>
<property name="lib.dir" value="${basedir}/lib"/>
- <property name="build.dir" value="${basedir}/build"/>
- <property name="build.c" value="${build.dir}/c"/>
+ <property name="install.c" value="${build.dir}/c/install"/>
<property name="dist.dir" value="${build.dir}/${fullname}"/>
<property name="build.classes" value="${build.dir}/classes"/>
@@ -479,7 +480,7 @@
</copy>
<copy todir="${dist.dir}/c" includeEmptyDirs="false">
- <fileset dir="${build.c}"/>
+ <fileset dir="${install.c}"/>
</copy>
<copy todir="${dist.dir}">
@@ -541,8 +542,7 @@
<checksum file="${build.dir}/${fullname}.tar.gz" algorithm="sha1"/>
</target>
- <target name="clean" description="Delete build files, and their directories"
- depends="clean-c">
+ <target name="clean" description="Delete build files, and their directories">
<delete dir="${build.dir}"/>
<delete>
<fileset dir="src" includes="**/*.pyc" />
@@ -571,42 +571,37 @@
</target>
<target name="configure-c-check">
- <uptodate targetfile="${c.src.dir}/Makefile"
+ <uptodate targetfile="${c.build.dir}/Makefile"
srcfile="${c.src.dir}/configure"
property="configure-c-not-needed"/>
</target>
<target name="configure-c" depends="autoreconf-c, configure-c-check"
unless="configure-c-not-needed">
- <exec dir="${c.src.dir}" executable="sh" failonerror="true">
- <arg line="./configure --prefix=${build.c}/${build.platform}"/>
+ <mkdir dir="${c.build.dir}" />
+ <exec dir="${c.build.dir}" executable="sh" failonerror="true">
+ <arg line="${c.src.dir}/configure
--prefix=${install.c}/${build.platform}"/>
</exec>
</target>
<target name="compile-c" depends="init, configure-c">
- <exec dir="${c.src.dir}" executable="make" failonerror="true"/>
+ <exec dir="${c.build.dir}" executable="make" failonerror="true"/>
</target>
<target name="test-c" depends="compile-c">
- <exec dir="${c.src.dir}" executable="make" failonerror="true">
+ <exec dir="${c.build.dir}" executable="make" failonerror="true">
<arg value="check"/>
</exec>
</target>
<target name="package-c" depends="compile-c">
- <exec dir="${c.src.dir}" executable="make" failonerror="true">
+ <exec dir="${c.build.dir}" executable="make" failonerror="true">
<arg value="install"/>
</exec>
</target>
<target name="c-makefile-check">
- <available file="${c.src.dir}/Makefile" property="c-makefile-present"/>
- </target>
-
- <target name="clean-c" depends="c-makefile-check" if="c-makefile-present">
- <exec dir="${c.src.dir}" executable="make" failonerror="true">
- <arg value="clean"/>
- </exec>
+ <available file="${c.build.dir}/Makefile" property="c-makefile-present"/>
</target>
<!-- End C Targets -->
Propchange: hadoop/avro/trunk/src/c/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Fri Jul 3 04:34:31 2009
@@ -1,28 +1,6 @@
-*.la
-*.lo
-*.o
-*.swp
-.deps
-.libs
-Makefile
Makefile.in
aclocal.m4
autom4te.cache
-avro_schema.c
-avro_schema.h
-avro_schema.out
config
-config.h
config.h.in
-config.log
-config.status
configure
-json_schema.c
-json_schema.h
-json_schema.out
-lemon
-libtool
-stamp-h1
-test_avro_*[!.][!c]
-test_json_*[!.][!c]
-trace.txt
Modified: hadoop/avro/trunk/src/c/.gitignore
URL:
http://svn.apache.org/viewvc/hadoop/avro/trunk/src/c/.gitignore?rev=790785&r1=790784&r2=790785&view=diff
==============================================================================
--- hadoop/avro/trunk/src/c/.gitignore (original)
+++ hadoop/avro/trunk/src/c/.gitignore Fri Jul 3 04:34:31 2009
@@ -1,29 +1,6 @@
-.deps
-.libs
-Makefile
Makefile.in
-*.la
-*.lo
-*.o
-configure
-stamp-h1
aclocal.m4
+autom4te.cache
config
-libtool
-config.status
-config.log
config.h.in
-config.h
-autom4te.cache
-test_avro_*[!.][!c]
-test_json_*[!.][!c]
-INSTALL
-lemon
-avro_schema.c
-avro_schema.h
-avro_schema.out
-json_schema.c
-json_schema.h
-json_schema.out
-trace.txt
-*.swp
+configure
Modified: hadoop/avro/trunk/src/c/Makefile.am
URL:
http://svn.apache.org/viewvc/hadoop/avro/trunk/src/c/Makefile.am?rev=790785&r1=790784&r2=790785&view=diff
==============================================================================
--- hadoop/avro/trunk/src/c/Makefile.am (original)
+++ hadoop/avro/trunk/src/c/Makefile.am Fri Jul 3 04:34:31 2009
@@ -8,17 +8,23 @@
lib_LTLIBRARIES = libavro.la
libavro_la_SOURCES = avro_memory.c avro_socket.c avro_file.c \
dump.c dump.h avro.c avro_string.c avro_zigzag.c error.c error.h avro_raw.c \
-avro_double.c json_schema.h json_schema.c json_tokenizer.c json.c json.h
+avro_double.c json_schema.c json_schema.h json_tokenizer.c json.c json.h \
+json_tokenizer.h
check_PROGRAMS=test_avro_zigzag test_avro_string test_avro_bytes test_avro_raw
\
test_avro_float_double test_json_parser
-noinst_PROGRAMS=lemon
-lemon_SOURCES=lemon.c
-
-json_schema.h json_schema.c: lemon json_schema.y
- ./lemon ./json_schema.y
- touch json_schema.c json_schema.h
+lemon: $(top_srcdir)/lemon.c $(top_srcdir)/lempar.c
+ $(CC) -o $@ $(top_srcdir)/lemon.c
+ -cp $(top_srcdir)/lempar.c .
+
+json_schema.c json_shema.h: $(top_srcdir)/json_schema.y lemon
+ -cp $(top_srcdir)/json_schema.y .
+ ./lemon json_schema.y
+
+# Make sure to generate the json_schema in the source directory before
distribution
+dist-hook: json_schema.h json_schema.c
+ cp -r $(srcdir)/json $(distdir)
test_avro_zigzag_SOURCE=test_avro_zigzag.c
test_avro_zigzag_LDADD=$(APR_LIBS) $(APU_LIBS) $(top_builddir)/libavro.la
@@ -40,14 +46,20 @@
TESTS=$(check_PROGRAMS)
-# Some files should not be run through indent
-pretty_files := $(shell echo *.[c,h]| sed s/lempar.c// | sed s/avro.h// | sed
s/lemon.c//)
+# Run indent on all files.
+# NOTE: Don't indent avro.h (messes up docs) or lemon.c,lempar.c (messes up
parser)
pretty:
- @indent $(pretty_files)
+ for file in *.[c,h]; \
+ do \
+ if [ $$file = "avro.h" -o $$file = "lemon.c" -o $$file = "lempar.c" ];
then \
+ continue;\
+ fi;\
+ indent $$file; \
+ done
docs:
@(cat docs/doxygen.conf; echo "OUTPUT_DIRECTORY=$(C_DOCS_OUTPUT)")|
doxygen -
-.PHONY: docs
+.PHONY: docs
-CLEANFILES=*~
+CLEANFILES=*~ trace.txt json_schema.out
Modified: hadoop/avro/trunk/src/c/avro.c
URL:
http://svn.apache.org/viewvc/hadoop/avro/trunk/src/c/avro.c?rev=790785&r1=790784&r2=790785&view=diff
==============================================================================
--- hadoop/avro/trunk/src/c/avro.c (original)
+++ hadoop/avro/trunk/src/c/avro.c Fri Jul 3 04:34:31 2009
@@ -1,3 +1,22 @@
+/*
+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.
+*/
+
#include "avro.h"
avro_status_t
Modified: hadoop/avro/trunk/src/c/avro.h
URL:
http://svn.apache.org/viewvc/hadoop/avro/trunk/src/c/avro.h?rev=790785&r1=790784&r2=790785&view=diff
==============================================================================
--- hadoop/avro/trunk/src/c/avro.h (original)
+++ hadoop/avro/trunk/src/c/avro.h Fri Jul 3 04:34:31 2009
@@ -1,3 +1,22 @@
+/*
+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.
+*/
+
#ifndef AVRO_H
#define AVRO_H
Modified: hadoop/avro/trunk/src/c/avro_array.c
URL:
http://svn.apache.org/viewvc/hadoop/avro/trunk/src/c/avro_array.c?rev=790785&r1=790784&r2=790785&view=diff
==============================================================================
--- hadoop/avro/trunk/src/c/avro_array.c (original)
+++ hadoop/avro/trunk/src/c/avro_array.c Fri Jul 3 04:34:31 2009
@@ -1,3 +1,21 @@
+/*
+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.
+*/
#include "avro.h"
avro_status_t
Modified: hadoop/avro/trunk/src/c/avro_double.c
URL:
http://svn.apache.org/viewvc/hadoop/avro/trunk/src/c/avro_double.c?rev=790785&r1=790784&r2=790785&view=diff
==============================================================================
--- hadoop/avro/trunk/src/c/avro_double.c (original)
+++ hadoop/avro/trunk/src/c/avro_double.c Fri Jul 3 04:34:31 2009
@@ -1,3 +1,22 @@
+/*
+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.
+*/
+
#include "avro.h"
avro_status_t
Modified: hadoop/avro/trunk/src/c/avro_file.c
URL:
http://svn.apache.org/viewvc/hadoop/avro/trunk/src/c/avro_file.c?rev=790785&r1=790784&r2=790785&view=diff
==============================================================================
--- hadoop/avro/trunk/src/c/avro_file.c (original)
+++ hadoop/avro/trunk/src/c/avro_file.c Fri Jul 3 04:34:31 2009
@@ -1,3 +1,22 @@
+/*
+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.
+*/
+
#include "avro.h"
#include <string.h>
#include "dump.h"
Modified: hadoop/avro/trunk/src/c/avro_memory.c
URL:
http://svn.apache.org/viewvc/hadoop/avro/trunk/src/c/avro_memory.c?rev=790785&r1=790784&r2=790785&view=diff
==============================================================================
--- hadoop/avro/trunk/src/c/avro_memory.c (original)
+++ hadoop/avro/trunk/src/c/avro_memory.c Fri Jul 3 04:34:31 2009
@@ -1,3 +1,22 @@
+/*
+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.
+*/
+
#include "avro.h"
#include <string.h>
#include "dump.h"
Modified: hadoop/avro/trunk/src/c/avro_raw.c
URL:
http://svn.apache.org/viewvc/hadoop/avro/trunk/src/c/avro_raw.c?rev=790785&r1=790784&r2=790785&view=diff
==============================================================================
--- hadoop/avro/trunk/src/c/avro_raw.c (original)
+++ hadoop/avro/trunk/src/c/avro_raw.c Fri Jul 3 04:34:31 2009
@@ -1,3 +1,22 @@
+/*
+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.
+*/
+
#include "avro.h"
avro_status_t
Modified: hadoop/avro/trunk/src/c/avro_socket.c
URL:
http://svn.apache.org/viewvc/hadoop/avro/trunk/src/c/avro_socket.c?rev=790785&r1=790784&r2=790785&view=diff
==============================================================================
--- hadoop/avro/trunk/src/c/avro_socket.c (original)
+++ hadoop/avro/trunk/src/c/avro_socket.c Fri Jul 3 04:34:31 2009
@@ -1,3 +1,22 @@
+/*
+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.
+*/
+
#include "avro.h"
#include <string.h>
#include "dump.h"
Modified: hadoop/avro/trunk/src/c/avro_string.c
URL:
http://svn.apache.org/viewvc/hadoop/avro/trunk/src/c/avro_string.c?rev=790785&r1=790784&r2=790785&view=diff
==============================================================================
--- hadoop/avro/trunk/src/c/avro_string.c (original)
+++ hadoop/avro/trunk/src/c/avro_string.c Fri Jul 3 04:34:31 2009
@@ -1,3 +1,22 @@
+/*
+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.
+*/
+
#include "avro.h"
static avro_status_t
Modified: hadoop/avro/trunk/src/c/avro_zigzag.c
URL:
http://svn.apache.org/viewvc/hadoop/avro/trunk/src/c/avro_zigzag.c?rev=790785&r1=790784&r2=790785&view=diff
==============================================================================
--- hadoop/avro/trunk/src/c/avro_zigzag.c (original)
+++ hadoop/avro/trunk/src/c/avro_zigzag.c Fri Jul 3 04:34:31 2009
@@ -1,3 +1,22 @@
+/*
+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.
+*/
+
#include "avro.h"
/* TODO: add avro_int32 */
Modified: hadoop/avro/trunk/src/c/configure.in
URL:
http://svn.apache.org/viewvc/hadoop/avro/trunk/src/c/configure.in?rev=790785&r1=790784&r2=790785&view=diff
==============================================================================
--- hadoop/avro/trunk/src/c/configure.in (original)
+++ hadoop/avro/trunk/src/c/configure.in Fri Jul 3 04:34:31 2009
@@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
-AC_INIT([avro-c], [0.1.0], [[email protected]])
+AC_INIT([avro-c], [1], [[email protected]])
AC_CONFIG_AUX_DIR([config])
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR([avro.h])
Modified: hadoop/avro/trunk/src/c/dump.c
URL:
http://svn.apache.org/viewvc/hadoop/avro/trunk/src/c/dump.c?rev=790785&r1=790784&r2=790785&view=diff
==============================================================================
--- hadoop/avro/trunk/src/c/dump.c (original)
+++ hadoop/avro/trunk/src/c/dump.c Fri Jul 3 04:34:31 2009
@@ -1,3 +1,22 @@
+/*
+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.
+*/
+
#include "dump.h"
#include <ctype.h>
#include <string.h>
Modified: hadoop/avro/trunk/src/c/dump.h
URL:
http://svn.apache.org/viewvc/hadoop/avro/trunk/src/c/dump.h?rev=790785&r1=790784&r2=790785&view=diff
==============================================================================
--- hadoop/avro/trunk/src/c/dump.h (original)
+++ hadoop/avro/trunk/src/c/dump.h Fri Jul 3 04:34:31 2009
@@ -1,3 +1,22 @@
+/*
+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.
+*/
+
#ifndef DUMP_H
#define DUMP_H
Modified: hadoop/avro/trunk/src/c/error.c
URL:
http://svn.apache.org/viewvc/hadoop/avro/trunk/src/c/error.c?rev=790785&r1=790784&r2=790785&view=diff
==============================================================================
--- hadoop/avro/trunk/src/c/error.c (original)
+++ hadoop/avro/trunk/src/c/error.c Fri Jul 3 04:34:31 2009
@@ -1,3 +1,22 @@
+/*
+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.
+*/
+
#include <stdio.h>
#include <stdarg.h> /* ANSI C header file */
#include <errno.h>
Modified: hadoop/avro/trunk/src/c/error.h
URL:
http://svn.apache.org/viewvc/hadoop/avro/trunk/src/c/error.h?rev=790785&r1=790784&r2=790785&view=diff
==============================================================================
--- hadoop/avro/trunk/src/c/error.h (original)
+++ hadoop/avro/trunk/src/c/error.h Fri Jul 3 04:34:31 2009
@@ -1,3 +1,22 @@
+/*
+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.
+*/
+
#ifndef ERROR_H
#define ERROR_H
Modified: hadoop/avro/trunk/src/c/json.c
URL:
http://svn.apache.org/viewvc/hadoop/avro/trunk/src/c/json.c?rev=790785&r1=790784&r2=790785&view=diff
==============================================================================
--- hadoop/avro/trunk/src/c/json.c (original)
+++ hadoop/avro/trunk/src/c/json.c Fri Jul 3 04:34:31 2009
@@ -1,3 +1,22 @@
+/*
+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.
+*/
+
#include <stdio.h>
#include <stdlib.h>
Modified: hadoop/avro/trunk/src/c/json.h
URL:
http://svn.apache.org/viewvc/hadoop/avro/trunk/src/c/json.h?rev=790785&r1=790784&r2=790785&view=diff
==============================================================================
--- hadoop/avro/trunk/src/c/json.h (original)
+++ hadoop/avro/trunk/src/c/json.h Fri Jul 3 04:34:31 2009
@@ -1,3 +1,21 @@
+/*
+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.
+*/
#ifndef JSON_H
#define JSON_H
Modified: hadoop/avro/trunk/src/c/json_tokenizer.c
URL:
http://svn.apache.org/viewvc/hadoop/avro/trunk/src/c/json_tokenizer.c?rev=790785&r1=790784&r2=790785&view=diff
==============================================================================
--- hadoop/avro/trunk/src/c/json_tokenizer.c (original)
+++ hadoop/avro/trunk/src/c/json_tokenizer.c Fri Jul 3 04:34:31 2009
@@ -1,3 +1,22 @@
+/*
+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.
+*/
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Modified: hadoop/avro/trunk/src/c/json_tokenizer.h
URL:
http://svn.apache.org/viewvc/hadoop/avro/trunk/src/c/json_tokenizer.h?rev=790785&r1=790784&r2=790785&view=diff
==============================================================================
--- hadoop/avro/trunk/src/c/json_tokenizer.h (original)
+++ hadoop/avro/trunk/src/c/json_tokenizer.h Fri Jul 3 04:34:31 2009
@@ -1,3 +1,22 @@
+/*
+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.
+*/
+
#ifndef JSON_TOKENIZER_H
#define JSON_TOKENIZER_H
Modified: hadoop/avro/trunk/src/c/test_avro_bytes.c
URL:
http://svn.apache.org/viewvc/hadoop/avro/trunk/src/c/test_avro_bytes.c?rev=790785&r1=790784&r2=790785&view=diff
==============================================================================
--- hadoop/avro/trunk/src/c/test_avro_bytes.c (original)
+++ hadoop/avro/trunk/src/c/test_avro_bytes.c Fri Jul 3 04:34:31 2009
@@ -1,3 +1,22 @@
+/*
+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.
+*/
+
#include <apr.h>
#include <apr_pools.h>
#include <apr_buckets.h>
Modified: hadoop/avro/trunk/src/c/test_avro_float_double.c
URL:
http://svn.apache.org/viewvc/hadoop/avro/trunk/src/c/test_avro_float_double.c?rev=790785&r1=790784&r2=790785&view=diff
==============================================================================
--- hadoop/avro/trunk/src/c/test_avro_float_double.c (original)
+++ hadoop/avro/trunk/src/c/test_avro_float_double.c Fri Jul 3 04:34:31 2009
@@ -1,3 +1,22 @@
+/*
+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.
+*/
+
#include <apr.h>
#include <apr_pools.h>
#include <apr_buckets.h>
Modified: hadoop/avro/trunk/src/c/test_avro_raw.c
URL:
http://svn.apache.org/viewvc/hadoop/avro/trunk/src/c/test_avro_raw.c?rev=790785&r1=790784&r2=790785&view=diff
==============================================================================
--- hadoop/avro/trunk/src/c/test_avro_raw.c (original)
+++ hadoop/avro/trunk/src/c/test_avro_raw.c Fri Jul 3 04:34:31 2009
@@ -1,3 +1,22 @@
+/*
+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.
+*/
+
#include <apr.h>
#include <apr_pools.h>
#include <apr_buckets.h>
Modified: hadoop/avro/trunk/src/c/test_avro_string.c
URL:
http://svn.apache.org/viewvc/hadoop/avro/trunk/src/c/test_avro_string.c?rev=790785&r1=790784&r2=790785&view=diff
==============================================================================
--- hadoop/avro/trunk/src/c/test_avro_string.c (original)
+++ hadoop/avro/trunk/src/c/test_avro_string.c Fri Jul 3 04:34:31 2009
@@ -1,3 +1,22 @@
+/*
+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.
+*/
+
#include <apr.h>
#include <apr_pools.h>
#include <apr_buckets.h>
Modified: hadoop/avro/trunk/src/c/test_avro_zigzag.c
URL:
http://svn.apache.org/viewvc/hadoop/avro/trunk/src/c/test_avro_zigzag.c?rev=790785&r1=790784&r2=790785&view=diff
==============================================================================
--- hadoop/avro/trunk/src/c/test_avro_zigzag.c (original)
+++ hadoop/avro/trunk/src/c/test_avro_zigzag.c Fri Jul 3 04:34:31 2009
@@ -1,3 +1,22 @@
+/*
+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.
+*/
+
#include <apr.h>
#include <apr_pools.h>
#include <apr_buckets.h>
Modified: hadoop/avro/trunk/src/c/test_json_parser.c
URL:
http://svn.apache.org/viewvc/hadoop/avro/trunk/src/c/test_json_parser.c?rev=790785&r1=790784&r2=790785&view=diff
==============================================================================
--- hadoop/avro/trunk/src/c/test_json_parser.c (original)
+++ hadoop/avro/trunk/src/c/test_json_parser.c Fri Jul 3 04:34:31 2009
@@ -1,3 +1,22 @@
+/*
+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.
+*/
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -28,7 +47,7 @@
FILE *trace = NULL;
int
-main (int argc, char *argv[])
+main (int argc, char *argv[], char *envp[])
{
FILE *file;
DIR *dir;
@@ -37,6 +56,12 @@
char buf[1024];
apr_pool_t *pool;
JSON_value *value;
+ char path[256];
+ char *srcdir = getenv ("srcdir");
+ if (!srcdir)
+ {
+ srcdir = ".";
+ }
apr_initialize ();
atexit (apr_terminate);
@@ -54,10 +79,11 @@
for (i = 0; i < NUM_TEST_DIRS; i++)
{
struct test_dir *td = test_dirs + i;
- dir = opendir (td->path);
+ snprintf (path, sizeof (path), "%s/%s", srcdir, td->path);
+ dir = opendir (path);
if (dir == NULL)
{
- fprintf (stderr, "Unable to open '%s'\n", td->path);
+ fprintf (stderr, "Unable to open '%s'\n", path);
return EXIT_FAILURE;
}
dent = readdir (dir);
@@ -66,7 +92,7 @@
if (dent->d_name[0] != '.')
{
char filepath[256];
- snprintf (filepath, sizeof (filepath), "%s/%s", td->path,
+ snprintf (filepath, sizeof (filepath), "%s/%s", path,
dent->d_name);
file = fopen (filepath, "r");