Commit 32d5bc32 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Generate "tbl/vcc_types.h" from generate.py

parent f68b7c42
......@@ -75,7 +75,7 @@ nobase_pkgdatainclude_HEADERS = \
vsb.h \
vsha256.h
tbl/vrt_stv_var.h tbl/vcl_returns.h vcl.h vrt_obj.h: $(top_srcdir)/lib/libvcl/generate.py $(top_srcdir)/include/vrt.h
tbl/vrt_stv_var.h tbl/vcl_returns.h tbl/vcc_types.h vcl.h vrt_obj.h: $(top_srcdir)/lib/libvcl/generate.py $(top_srcdir)/include/vrt.h
mkdir -p tbl
@PYTHON@ $(top_srcdir)/lib/libvcl/generate.py $(top_srcdir) $(top_builddir)
......
/*-
* Copyright (c) 2010 Varnish Software AS
* All rights reserved.
*
* Author: Poul-Henning Kamp <phk@phk.freebsd.dk>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
*/
/*lint -save -e525 -e539 */
VCC_TYPE(VOID)
VCC_TYPE(BACKEND)
VCC_TYPE(BOOL)
VCC_TYPE(INT)
VCC_TYPE(TIME)
VCC_TYPE(DURATION)
VCC_TYPE(STRING)
VCC_TYPE(STRING_LIST)
VCC_TYPE(IP)
VCC_TYPE(HEADER)
VCC_TYPE(BYTES)
VCC_TYPE(REAL)
VCC_TYPE(ENUM)
/*lint -restore */
......@@ -484,6 +484,10 @@ vcltypes = {
'BYTES': "double",
'INT': "long",
'HEADER': "const char *",
'VOID': "void",
'REAL': "double",
'STRING_LIST': "void*",
'ENUM': "const char *",
}
#######################################################################
......@@ -898,6 +902,19 @@ fo.write("""
fo.close()
#######################################################################
ft = open(buildroot + "/include/tbl/vcc_types.h", "w")
file_header(ft)
ft.write("/*lint -save -e525 -e539 */\n")
i = list(vcltypes.keys())
i.sort()
for j in i:
ft.write("VCC_TYPE(" + j + ")\n")
ft.write("/*lint -restore */\n")
ft.close()
#######################################################################
fo = open(buildroot + "/include/tbl/vrt_stv_var.h", "w")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment