From f3d6e9bd89dcc6a3dfe2e9ce8ad221291843edaf Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Wed, 8 Oct 2014 22:02:11 -0700 Subject: Moving system interface functions to separate module out of the eval and stream modules. * Makefile (OBJS): Add sysif.o. * dep.mk: Regenerated. * eval.c (errno_wrap, daemon_wrap, exit_wrap, usleep_wrap, getpid_wrap, getppid_wrap, env_hash): Functions moved to sysif.c and changed to static functions. (eval_init): Registrations of functions moved to sysif.c. * lib.c (init): Call sysif_init. * stream.c (w_stat, statf, mkdir_wrap, chdir_wrap, getcwd_wrap, makedev_wrap, minor_wrap, major_wrap, mknod_wrap): Functions moved to sysif.c and become static functions. (stream_init): Registration of stat moved to sysif.c. (open_files, open_files_star): Bugfix: no longer erroneously included in #ifdef HAVE_UNISTD_H block. * stream.h (mkdir_wrap, chdir_wrap, getcwd_wrap, makedev_wrap, minor_wrap, major_wrap, mknod_wrap, symlink_wrap, link_wrap, readlink_wrap): Declarations removed. * sysif.c: New file. * sysif.h: New file. --- sysif.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 sysif.h (limited to 'sysif.h') diff --git a/sysif.h b/sysif.h new file mode 100644 index 00000000..ef88f101 --- /dev/null +++ b/sysif.h @@ -0,0 +1,27 @@ +/* Copyright 2013-2014 + * Kaz Kylheku + * Vancouver, Canada + * All rights reserved. + * + * Redistribution of this software in source and binary forms, with or without + * modification, is permitted provided that the following two conditions are met. + * + * Use of this software in any manner constitutes agreement with the disclaimer + * which follows the two conditions. + * + * 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 ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL THE + * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DAMAGES, HOWEVER CAUSED, + * AND UNDER ANY THEORY OF LIABILITY, ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +void sysif_init(void); -- cgit v1.2.3