From 7df0365145dd63da1e64216c301242aa8f69615e Mon Sep 17 00:00:00 2001 From: octo Date: Tue, 13 Dec 2005 18:27:57 +0000 Subject: [PATCH] The configfile-branch now compiles. --- configure.in | 5 +++-- src/Makefile.am | 2 +- src/libconfig/Makefile.am | 1 + src/libconfig/compat.h | 11 +---------- src/libconfig/getuid.c | 5 ----- src/libconfig/getuid.h | 8 -------- src/libconfig/strsep.c | 34 ---------------------------------- src/libconfig/strsep.h | 32 -------------------------------- src/libconfig/strtoll.c | 43 ------------------------------------------- src/libconfig/strtoll.h | 6 ------ 10 files changed, 6 insertions(+), 141 deletions(-) delete mode 100644 src/libconfig/getuid.c delete mode 100644 src/libconfig/getuid.h delete mode 100644 src/libconfig/strsep.c delete mode 100644 src/libconfig/strsep.h delete mode 100644 src/libconfig/strtoll.c delete mode 100644 src/libconfig/strtoll.h diff --git a/configure.in b/configure.in index 99895a5f..863a76c9 100644 --- a/configure.in +++ b/configure.in @@ -24,7 +24,7 @@ AC_SUBST(LIBLTDL) AC_LIBTOOL_DLOPEN AC_PROG_LIBTOOL #AC_PROG_RANLIB -AC_CONFIG_SUBDIRS(libltdl) +AC_CONFIG_SUBDIRS(libltdl src/libconfig) # # Checks for header files. @@ -88,6 +88,7 @@ AC_CHECK_LIB(m, ext) AC_C_CONST AC_TYPE_PID_T AC_TYPE_SIZE_T +AC_TYPE_UID_T AC_HEADER_TIME # @@ -598,7 +599,7 @@ then 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 < #endif #ifdef __WIN32__ #include "win32.h" @@ -12,15 +12,6 @@ #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 #endif diff --git a/src/libconfig/getuid.c b/src/libconfig/getuid.c deleted file mode 100644 index d6e17c72..00000000 --- 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 deleted file mode 100644 index 77745c71..00000000 --- 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 deleted file mode 100644 index f82ea134..00000000 --- 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 */ - -#include -#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 deleted file mode 100644 index 3b375b39..00000000 --- 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 */ - -#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 deleted file mode 100644 index a98025a9..00000000 --- a/src/libconfig/strtoll.c +++ /dev/null @@ -1,43 +0,0 @@ -#include -#include -#include -#include -#include - -/* 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 deleted file mode 100644 index 79103033..00000000 --- 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 -- 2.11.0