summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f02d5d3)
raw | patch | inline | side by side (parent: f02d5d3)
author | octo <octo> | |
Tue, 13 Dec 2005 18:27:57 +0000 (18:27 +0000) | ||
committer | octo <octo> | |
Tue, 13 Dec 2005 18:27:57 +0000 (18:27 +0000) |
configure.in | patch | blob | history | |
src/Makefile.am | patch | blob | history | |
src/libconfig/Makefile.am | patch | blob | history | |
src/libconfig/compat.h | patch | blob | history | |
src/libconfig/getuid.c | [deleted file] | patch | blob | history |
src/libconfig/getuid.h | [deleted file] | patch | blob | history |
src/libconfig/strsep.c | [deleted file] | patch | blob | history |
src/libconfig/strsep.h | [deleted file] | patch | blob | history |
src/libconfig/strtoll.c | [deleted file] | patch | blob | history |
src/libconfig/strtoll.h | [deleted file] | patch | blob | history |
diff --git a/configure.in b/configure.in
index 99895a5f80b1729b30829585050b314411190265..863a76c998475bd603a35d899aee6bfa95c3ce23 100644 (file)
--- a/configure.in
+++ b/configure.in
AC_LIBTOOL_DLOPEN
AC_PROG_LIBTOOL
#AC_PROG_RANLIB
-AC_CONFIG_SUBDIRS(libltdl)
+AC_CONFIG_SUBDIRS(libltdl src/libconfig)
#
# Checks for header files.
AC_C_CONST
AC_TYPE_PID_T
AC_TYPE_SIZE_T
+AC_TYPE_UID_T
AC_HEADER_TIME
#
fi
AM_CONDITIONAL(BUILD_MODULE_USERS, test "x$enable_users" = "xyes")
-AC_OUTPUT(Makefile src/libping/Makefile src/Makefile)
+AC_OUTPUT(Makefile src/libconfig/Makefile src/libping/Makefile src/Makefile)
cat <<EOF;
diff --git a/src/Makefile.am b/src/Makefile.am
index 8ec68e954689f622c71bd3d25515ea7c72cb2bf2..207288d5e7630a3a0776f9fccc02b06105460ed6 100644 (file)
--- a/src/Makefile.am
+++ b/src/Makefile.am
configfile.c configfile.h
#collectd_CFLAGS = -DPLUGINDIR='"$(pkglibdir)"'
collectd_CPPFLAGS = -DLOCALSTATEDIR='"$(localstatedir)"' -DPLUGINDIR='"$(pkglibdir)"'
-collectd_LDFLAGS = -export-dynamic -lconfig
+collectd_LDFLAGS = -export-dynamic
collectd_CFLAGS = -Werror
collectd_LDADD = $(LIBLTDL) libconfig/libconfig.la "-dlopen" self
collectd_DEPENDENCIES = $(LIBLTDL) libconfig/libconfig.la
index 071784f48353be1c683cf289a16647240b4ac700..187d563a205e5e921e5ac5e919ea3f1165f2be71 100644 (file)
noinst_LTLIBRARIES = libconfig.la
+libconfig_la_CFLAGS =
libconfig_la_LDFLAGS = -avoid-version
libconfig_la_SOURCES = \
libconfig.c libconfig.h \
diff --git a/src/libconfig/compat.h b/src/libconfig/compat.h
index 9d220388ec4c977cc479a969b3f109efdb36431e..48d0b07ef577035e6f522a924ee9a01002f2d400 100644 (file)
--- a/src/libconfig/compat.h
+++ b/src/libconfig/compat.h
#define RSK_COMPAT_H
#ifdef HAVE_CONFIG_H
-#include "config.h"
+#include <config.h>
#endif
#ifdef __WIN32__
#include "win32.h"
#define LC_LINEBUF_LEN 1024
#endif
-#ifndef HAVE_GETUID
-#include "getuid.h"
-#endif
-#ifndef HAVE_STRTOLL
-#include "strtoll.h"
-#endif
-#ifndef HAVE_STRSEP
-#include "strsep.h"
-#endif
#ifdef HAVE_INTTYPES_H
#include <inttypes.h>
#endif
diff --git a/src/libconfig/getuid.c b/src/libconfig/getuid.c
--- a/src/libconfig/getuid.c
+++ /dev/null
@@ -1,5 +0,0 @@
-#include "getuid.h"
-
-uid_t getuid(void) {
- return(0);
-}
diff --git a/src/libconfig/getuid.h b/src/libconfig/getuid.h
--- a/src/libconfig/getuid.h
+++ /dev/null
@@ -1,8 +0,0 @@
-#ifndef _LC_GETUID_H
-#define _LC_GETUID_H
-
-typedef int uid_t;
-
-uid_t getuid(void);
-
-#endif
diff --git a/src/libconfig/strsep.c b/src/libconfig/strsep.c
--- a/src/libconfig/strsep.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (C) 2001, 2002, and 2003 Roy Keene
- *
- * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * email: libconfig@rkeene.org
- */
-
-/* Compliments of Jay Freeman <saurik@saurik.com> */
-
-#include <string.h>
-#include "strsep.h"
-
-char *strsep(char **stringp, const char *delim) {
- char *ret = *stringp;
- if (ret == NULL) return(NULL); /* grrr */
- if ((*stringp = strpbrk(*stringp, delim)) != NULL) {
- *((*stringp)++) = '\0';
- }
- return(ret);
-}
-
diff --git a/src/libconfig/strsep.h b/src/libconfig/strsep.h
--- a/src/libconfig/strsep.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright (C) 2001, 2002, and 2003 Roy Keene
- *
- * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * email: libconfig@rkeene.org
- */
-
-/* Compliments of Jay Freeman <saurik@saurik.com> */
-
-#ifndef _RSK_STRSEP_H
-#define _RSK_STRSEP_H
-
-/* This is safe, because we're only included when there's no real strsep
- available. */
-#define strsep(x,y) lc_strsep(x,y)
-
-char *strsep(char **stringp, const char *delim);
-
-#endif
diff --git a/src/libconfig/strtoll.c b/src/libconfig/strtoll.c
--- a/src/libconfig/strtoll.c
+++ /dev/null
@@ -1,43 +0,0 @@
-#include <sys/types.h>
-#include <stdlib.h>
-#include <limits.h>
-#include <ctype.h>
-#include <stdio.h>
-
-/* We only handle base 10. */
-long long int strtoll(const char *nptr, char **endptr, int base) {
- long long int retval = 0;
- const char **endptrd = (const char **) endptr;
- const char *idx = NULL;
- int allowspace = 1;
-
- idx = nptr;
- while (1) {
- if (*idx == '\0') {
- break;
- }
-
- if (!isdigit(*idx)) {
- if (*idx == '-') {
- retval *= -1;
- continue;
- }
- if ((*idx == ' ' || *idx == '\t') && allowspace) {
- continue;
- }
- break;
- }
-
- retval *= 10;
- retval += (*idx - '0');
-
- allowspace = 0;
- idx++;
- }
-
- if (endptrd != NULL) {
- *endptrd = idx;
- }
-
- return(retval);
-}
diff --git a/src/libconfig/strtoll.h b/src/libconfig/strtoll.h
--- a/src/libconfig/strtoll.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef _RSK_STRTOLL_H
-#define _RSK_STRTOLL_H
-
-long long int strtoll(const char *nptr, char **endptr, int base);
-
-#endif