From e0fe45ce9c35c204a7c19d5a5291ca64b47b2452 Mon Sep 17 00:00:00 2001 From: mbalmer Date: Wed, 16 Oct 2013 19:44:57 +0000 Subject: welcome lua(4), a devide driver that can create and control Lua states inside the kernel --- sys/modules/lua/stdio.h | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 sys/modules/lua/stdio.h (limited to 'sys/modules/lua/stdio.h') diff --git a/sys/modules/lua/stdio.h b/sys/modules/lua/stdio.h new file mode 100644 index 00000000000..218aae482e6 --- /dev/null +++ b/sys/modules/lua/stdio.h @@ -0,0 +1,49 @@ +/* $NetBSD */ +/* + * Copyright (c) 2011, Lourival Neto . + * All rights reserved. + * + * 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. + * 3. The name of the Author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * 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 THE REGENTS 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. + */ + +/* + * This file is a placeholder only, to allow Lua to be compiled from + * unchanged sources. + */ + +#include + +#ifndef _LUA_INCLUDE_STDIO +#define _LUA_INCLUDE_STDIO + +#define fprintf(output, ...) printf(__VA_ARGS__) + +#define BUFSIZ (1024) + +#define putchar(c) printf("%c", c) + +#define fputs(s, f) printf(s) + +#endif + -- cgit