Index: HEADER ================================================================== --- HEADER +++ HEADER @@ -1,9 +1,10 @@ @@UTIL@@ @@VERS@@ Release information: pkg: @@UTIL@@ version @@VERS@@ - url: http://www.rkeene.org/devel/@@UTIL@@-@@VERS@@.tar.gz + url: http://www.rkeene.org/files/oss/@@UTIL@@/devel/@@UTIL@@-@@VERS@@.tar.gz + web: http://www.rkeene.org/oss/@@UTIL@@/ date: @@DATE@@ mail: @@UTIL@@@rkeene.org -------------------------------------------------------------------------- ADDED TODO Index: TODO ================================================================== --- /dev/null +++ TODO @@ -0,0 +1,1 @@ +SIZE_SIZET Index: compat.h ================================================================== --- compat.h +++ compat.h @@ -10,12 +10,12 @@ #ifndef LC_LINEBUF_LEN #define LC_LINEBUF_LEN 1024 #endif -#ifndef HAVE_STRTOULL -#include "strtoull.h" +#ifndef HAVE_STRTOLL +#include "strtoll.h" #endif #ifndef HAVE_STRSEP #include "strsep.h" #endif #ifdef HAVE_INTTYPES_H Index: config.h.in ================================================================== --- config.h.in +++ config.h.in @@ -34,12 +34,12 @@ #undef HAVE_STRING_H /* Define to 1 if you have the `strsep' function. */ #undef HAVE_STRSEP -/* Define to 1 if you have the `strtoull' function. */ -#undef HAVE_STRTOULL +/* Define to 1 if you have the `strtoll' function. */ +#undef HAVE_STRTOLL /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ Index: configure ================================================================== --- configure +++ configure @@ -1,9 +1,9 @@ #! /bin/sh # From configure.in Revision . # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.59 for libconfig 0.1.0. +# Generated by GNU Autoconf 2.59 for libconfig 0.1.1. # # Copyright (C) 2003 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## @@ -266,12 +266,12 @@ : ${ac_max_here_lines=38} # Identity of this package. PACKAGE_NAME='libconfig' PACKAGE_TARNAME='libconfig' -PACKAGE_VERSION='0.1.0' -PACKAGE_STRING='libconfig 0.1.0' +PACKAGE_VERSION='0.1.1' +PACKAGE_STRING='libconfig 0.1.1' PACKAGE_BUGREPORT='' # Factoring default headers for most tests. ac_includes_default="\ #include @@ -776,11 +776,11 @@ # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures libconfig 0.1.0 to adapt to many kinds of systems. +\`configure' configures libconfig 0.1.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. @@ -837,11 +837,11 @@ _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of libconfig 0.1.0:";; + short | recursive ) echo "Configuration of libconfig 0.1.1:";; esac cat <<\_ACEOF Some influential environment variables: CC C compiler command @@ -948,11 +948,11 @@ fi test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF -libconfig configure 0.1.0 +libconfig configure 0.1.1 generated by GNU Autoconf 2.59 Copyright (C) 2003 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. @@ -962,11 +962,11 @@ exec 5>config.log cat >&5 <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by libconfig $as_me 0.1.0, which was +It was created by libconfig $as_me 0.1.1, which was generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ _ACEOF @@ -15431,11 +15431,11 @@ done -for ac_func in strsep strtoull +for ac_func in strsep strtoll do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then @@ -16684,11 +16684,11 @@ ## Running $as_me. ## _ASBOX } >&5 cat >&5 <<_CSEOF -This file was extended by libconfig $as_me 0.1.0, which was +This file was extended by libconfig $as_me 0.1.1, which was generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS @@ -16744,11 +16744,11 @@ Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -libconfig config.status 0.1.0 +libconfig config.status 0.1.1 configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2003 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation Index: configure.in ================================================================== --- configure.in +++ configure.in @@ -1,7 +1,7 @@ AC_REVISION($Revision $) -AC_INIT(libconfig, 0.1.0) +AC_INIT(libconfig, 0.1.1) AC_CONFIG_HEADER(config.h) dnl Find out about the host OS DC_CHK_OS_INFO @@ -22,15 +22,15 @@ DC_DO_TYPE(uint32_t, unsigned, 4) DC_DO_TYPE(int32_t, signed, 4) DC_DO_TYPE(uint16_t, unsigned, 2) DC_DO_TYPE(int16_t, signed, 2) -AC_REPLACE_FUNCS(strsep strtoull) +AC_REPLACE_FUNCS(strsep strtoll) AC_CHECK_FUNCS(getpwuid) dnl Checks for Win32 specific things. DC_DO_WIN32 dnl This must be last. DC_GET_SHOBJFLAGS AC_OUTPUT(Makefile lc_geterrno.3 lc_process.3 lc_register_var.3 lc_geterrstr.3 lc_register_callback.3 libconfig.3) Index: libconfig.c ================================================================== --- libconfig.c +++ libconfig.c @@ -53,38 +53,38 @@ static int lc_process_var_longlong(void *data, const char *value) { long long *dataval; dataval = data; - *dataval = strtoull(value, NULL, 10); + *dataval = strtoll(value, NULL, 10); return(0); } static int lc_process_var_long(void *data, const char *value) { long *dataval; dataval = data; - *dataval = strtoull(value, NULL, 10); + *dataval = strtoll(value, NULL, 10); return(0); } static int lc_process_var_int(void *data, const char *value) { int *dataval; dataval = data; - *dataval = strtoull(value, NULL, 10); + *dataval = strtoll(value, NULL, 10); return(0); } static int lc_process_var_short(void *data, const char *value) { short *dataval; dataval = data; - *dataval = strtoull(value, NULL, 10); + *dataval = strtoll(value, NULL, 10); return(0); } static int lc_process_var_bool_byexistance(void *data, const char *value) { @@ -128,11 +128,11 @@ static long long lc_process_size(const char *value) { long long retval = -1; char *mult = NULL; - retval = strtoull(value, &mult, 10); + retval = strtoll(value, &mult, 10); if (mult != NULL) { switch (tolower(mult[0])) { case 'p': retval *= 1125899906842624LLU; break; Index: libconfig.h.in ================================================================== --- libconfig.h.in +++ libconfig.h.in @@ -1,8 +1,11 @@ !ifndef _RSK_LIBCONFIG_H !define _RSK_LIBCONFIG_H +!ifdef __cplusplus +extern "C" { +!endif __BLANK_LINE__ typedef enum { LC_CONF_SECTION, LC_CONF_APACHE, @@ -77,7 +80,10 @@ __BLANK_LINE__ extern int lc_optind; __BLANK_LINE__ +!ifdef __cplusplus +} +!endif !endif Index: makearch.info ================================================================== --- makearch.info +++ makearch.info @@ -18,11 +18,11 @@ # prefixed with the contents of the DOC_HDR file and substitution # will occur: # @@UTIL@@ becomes the utility name ${UTIL} # @@VERS@@ becomes the utility version # @@DATE@@ becomes the current date -DOCS="README INSTALL Docs/USAGE" +DOCS="README INSTALL Docs/USAGE TODO" DOC_HDR="HEADER" # This script is executed immediately after copying the files # to a temp directory to attempt to compile BEFORE="build/prep.sh" ADDED strtoll.c Index: strtoll.c ================================================================== --- /dev/null +++ strtoll.c @@ -0,0 +1,43 @@ +#include +#include +#include +#include +#include + +/* We only handle base 10. */ +long long int strtoull(const char *nptr, char **endptr, int base) { + unsigned long long int retval = 0; + const char **endptrd = (const char **) endptr; + 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); +} ADDED strtoll.h Index: strtoll.h ================================================================== --- /dev/null +++ strtoll.h @@ -0,0 +1,6 @@ +#ifndef _RSK_STRTOULL_H +#define _RSK_STRTOULL_H + +long long int strtoull(const char *nptr, char **endptr, int base); + +#endif DELETED strtoull.c Index: strtoull.c ================================================================== --- strtoull.c +++ /dev/null @@ -1,23 +0,0 @@ -#include -#include -#include -#include -#include - -/* We only handle base 10. */ -unsigned long long int strtoull(const char *nptr, char **endptr, int base) { - unsigned long long int retval = 0; - const char **endptrd = (const char **) endptr; - char *idx = NULL; - - for (idx = nptr; *idx != '\0' && isdigit(*idx); idx++) { - retval *= 10; - retval += (*idx - '0'); - } - - if (endptrd != NULL) { - *endptrd = idx; - } - - return(retval); -} DELETED strtoull.h Index: strtoull.h ================================================================== --- strtoull.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef _RSK_STRTOULL_H -#define _RSK_STRTOULL_H - -unsigned long long int strtoull(const char *nptr, char **endptr, int base); - -#endif