From d4211f37f451dd0f7faf0dc372c5995f387d4d28 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 2 Jan 2012 19:36:37 +0000 Subject: [PATCH] Add daemon. --- .gitignore | 1 + Makefile.am | 3 +++ configure.ac | 1 + daemon/Makefile.am | 26 ++++++++++++++++++++++++++ daemon/wrappid.c | 45 +++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 76 insertions(+) create mode 100644 daemon/Makefile.am create mode 100644 daemon/wrappid.c diff --git a/.gitignore b/.gitignore index df7650b..0d890ca 100644 --- a/.gitignore +++ b/.gitignore @@ -21,6 +21,7 @@ Makefile.in /config.status /config.sub /configure +/daemon/wrappid /depcomp /examples/remote /generator-lib/config.ml diff --git a/Makefile.am b/Makefile.am index ad12f31..3877782 100644 --- a/Makefile.am +++ b/Makefile.am @@ -26,6 +26,9 @@ SUBDIRS = generator-lib generator-macros APIs generator # The C library. SUBDIRS += lib +# The daemon (wrappid) used for remote access. +SUBDIRS += daemon + # Build the C example programs. SUBDIRS += examples diff --git a/configure.ac b/configure.ac index 3cad79e..cfe9053 100644 --- a/configure.ac +++ b/configure.ac @@ -85,6 +85,7 @@ AC_SUBST(LIB_MINOR) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_FILES([Makefile APIs/Makefile + daemon/Makefile examples/Makefile generator/Makefile generator-lib/config.ml diff --git a/daemon/Makefile.am b/daemon/Makefile.am new file mode 100644 index 0000000..c44c53b --- /dev/null +++ b/daemon/Makefile.am @@ -0,0 +1,26 @@ +# wrappi +# Copyright (C) 2011 Red Hat Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +sbin_PROGRAMS = wrappid + +wrappid_SOURCES = \ + ../lib/wrappi.h \ + wrappid.c +wrappid_CFLAGS = -I../lib $(WARN_CFLAGS) $(WERROR_CFLAGS) +wrappid_LDADD = ../lib/libwrappi.la + +CLEANFILES = *~ diff --git a/daemon/wrappid.c b/daemon/wrappid.c new file mode 100644 index 0000000..ea0f00f --- /dev/null +++ b/daemon/wrappid.c @@ -0,0 +1,45 @@ +/* wrappi + * Copyright (C) 2011-2012 Red Hat Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include + +#include +#include + +#include "wrappi.h" + +static void main_loop (void); + +int +main (int argc, char *argv[]) +{ + /* Command line XXX */ + + main_loop (); + exit (EXIT_SUCCESS); +} + +static void +main_loop (void) +{ + /* XXX */ + + + + +} -- 1.8.3.1