Check-in [d281965daf]
Overview
Comment:libconfig 0.2.4 Added support for "double" and "float" types Moved the test config file into a user directory
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | 0.2.4
Files: files | file ages | folders
SHA1: d281965daf31e5661e03939b8fdb7a2b0397a719
User & Date: rkeene on 2007-01-16 03:14:02
Other Links: manifest | tags
Context
2007-01-17
08:07
libconfig 0.2.5 Corrected typo (Thanks to T. Hayfield of GMAIL.COM) check-in: 956afb5655 user: rkeene tags: 0.2.5, trunk
2007-01-16
03:14
libconfig 0.2.4 Added support for "double" and "float" types Moved the test config file into a user directory check-in: d281965daf user: rkeene tags: 0.2.4, trunk
2007-01-15
23:45
libconfig 0.2.3 Patched Makefile's install target to handle destinations with spaces in the name correctly. Patch by T. Hayfield of GMAIL.COM check-in: dbd6b11bf6 user: rkeene tags: 0.2.3, trunk
Changes

Modified config.h.in from [282078a7c0] to [8f5d00d1a4].

49
50
51
52
53
54
55



56
57
58
59
60
61
62
#undef HAVE_STRINGS_H

/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H

/* Define to 1 if you have the `strsep' function. */
#undef HAVE_STRSEP




/* Define to 1 if you have the `strtoll' function. */
#undef HAVE_STRTOLL

/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H








>
>
>







49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#undef HAVE_STRINGS_H

/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H

/* Define to 1 if you have the `strsep' function. */
#undef HAVE_STRSEP

/* Define to 1 if you have the `strtof' function. */
#undef HAVE_STRTOF

/* Define to 1 if you have the `strtoll' function. */
#undef HAVE_STRTOLL

/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H

Modified configure from [76ccdd1124] to [0edb2b50bd].

1
2
3
4
5
6
7
8
9
10
11
#! /bin/sh
# From configure.ac Revision .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.59 for libconfig 0.2.3.
#
# 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.
## --------------------- ##
## M4sh Initialization.  ##
## --------------------- ##



|







1
2
3
4
5
6
7
8
9
10
11
#! /bin/sh
# From configure.ac Revision .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.59 for libconfig 0.2.4.
#
# 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.
## --------------------- ##
## M4sh Initialization.  ##
## --------------------- ##
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
# This variable seems obsolete.  It should probably be removed, and
# only ac_max_sed_lines should be used.
: ${ac_max_here_lines=38}

# Identity of this package.
PACKAGE_NAME='libconfig'
PACKAGE_TARNAME='libconfig'
PACKAGE_VERSION='0.2.3'
PACKAGE_STRING='libconfig 0.2.3'
PACKAGE_BUGREPORT=''

# Factoring default headers for most tests.
ac_includes_default="\
#include <stdio.h>
#if HAVE_SYS_TYPES_H
# include <sys/types.h>







|
|







264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
# This variable seems obsolete.  It should probably be removed, and
# only ac_max_sed_lines should be used.
: ${ac_max_here_lines=38}

# Identity of this package.
PACKAGE_NAME='libconfig'
PACKAGE_TARNAME='libconfig'
PACKAGE_VERSION='0.2.4'
PACKAGE_STRING='libconfig 0.2.4'
PACKAGE_BUGREPORT=''

# Factoring default headers for most tests.
ac_includes_default="\
#include <stdio.h>
#if HAVE_SYS_TYPES_H
# include <sys/types.h>
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
#
# Report the --help message.
#
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.2.3 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.

Defaults for the options are specified in brackets.







|







774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
#
# Report the --help message.
#
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.2.4 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.

Defaults for the options are specified in brackets.
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
  --build=BUILD     configure for building on BUILD [guessed]
  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
_ACEOF
fi

if test -n "$ac_init_help"; then
  case $ac_init_help in
     short | recursive ) echo "Configuration of libconfig 0.2.3:";;
   esac
  cat <<\_ACEOF

Optional Features:
  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  --enable-small          Enable small build of libconfig. (disabled)







|







835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
  --build=BUILD     configure for building on BUILD [guessed]
  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
_ACEOF
fi

if test -n "$ac_init_help"; then
  case $ac_init_help in
     short | recursive ) echo "Configuration of libconfig 0.2.4:";;
   esac
  cat <<\_ACEOF

Optional Features:
  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  --enable-small          Enable small build of libconfig. (disabled)
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
    cd $ac_popdir
  done
fi

test -n "$ac_init_help" && exit 0
if $ac_init_version; then
  cat <<\_ACEOF
libconfig configure 0.2.3
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.
_ACEOF
  exit 0
fi
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.2.3, which was
generated by GNU Autoconf 2.59.  Invocation command line was

  $ $0 $@

_ACEOF
{
cat <<_ASUNAME







|













|







956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
    cd $ac_popdir
  done
fi

test -n "$ac_init_help" && exit 0
if $ac_init_version; then
  cat <<\_ACEOF
libconfig configure 0.2.4
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.
_ACEOF
  exit 0
fi
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.2.4, which was
generated by GNU Autoconf 2.59.  Invocation command line was

  $ $0 $@

_ACEOF
{
cat <<_ASUNAME
16977
16978
16979
16980
16981
16982
16983

16984
16985
16986
16987
16988
16989
16990
16991
esac

fi
done




for ac_func in getpwuid
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
  echo $ECHO_N "(cached) $ECHO_C" >&6
else







>
|







16977
16978
16979
16980
16981
16982
16983
16984
16985
16986
16987
16988
16989
16990
16991
16992
esac

fi
done




for ac_func in getpwuid strtof
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
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
17450
17451
17452
17453
17454
17455
17456
17457
17458
17459
17460
17461
17462
17463
17464
  echo
  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
## Running $as_me. ##
_ASBOX
} >&5
cat >&5 <<_CSEOF

This file was extended by libconfig $as_me 0.2.3, which was
generated by GNU Autoconf 2.59.  Invocation command line was

  CONFIG_FILES    = $CONFIG_FILES
  CONFIG_HEADERS  = $CONFIG_HEADERS
  CONFIG_LINKS    = $CONFIG_LINKS
  CONFIG_COMMANDS = $CONFIG_COMMANDS
  $ $0 $@







|







17451
17452
17453
17454
17455
17456
17457
17458
17459
17460
17461
17462
17463
17464
17465
  echo
  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
## Running $as_me. ##
_ASBOX
} >&5
cat >&5 <<_CSEOF

This file was extended by libconfig $as_me 0.2.4, which was
generated by GNU Autoconf 2.59.  Invocation command line was

  CONFIG_FILES    = $CONFIG_FILES
  CONFIG_HEADERS  = $CONFIG_HEADERS
  CONFIG_LINKS    = $CONFIG_LINKS
  CONFIG_COMMANDS = $CONFIG_COMMANDS
  $ $0 $@
17510
17511
17512
17513
17514
17515
17516
17517
17518
17519
17520
17521
17522
17523
17524
$config_headers

Report bugs to <bug-autoconf@gnu.org>."
_ACEOF

cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
libconfig config.status 0.2.3
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
gives unlimited permission to copy, distribute and modify it."
srcdir=$srcdir







|







17511
17512
17513
17514
17515
17516
17517
17518
17519
17520
17521
17522
17523
17524
17525
$config_headers

Report bugs to <bug-autoconf@gnu.org>."
_ACEOF

cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
libconfig config.status 0.2.4
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
gives unlimited permission to copy, distribute and modify it."
srcdir=$srcdir

Modified configure.ac from [2064653be9] to [678dfa516c].

1
2
3
4
5
6
7
8
9
AC_REVISION($Revision $)
AC_INIT(libconfig, 0.2.3)
AC_CONFIG_HEADER(config.h)

dnl Find out about the host OS
DC_CHK_OS_INFO

dnl Checks for programs.
AC_PROG_CC

|







1
2
3
4
5
6
7
8
9
AC_REVISION($Revision $)
AC_INIT(libconfig, 0.2.4)
AC_CONFIG_HEADER(config.h)

dnl Find out about the host OS
DC_CHK_OS_INFO

dnl Checks for programs.
AC_PROG_CC
35
36
37
38
39
40
41
42
43
44
45
46
47

dnl This stuff has to come after the shobjtest to verify that it is correct
AC_CHECK_HEADERS(ctype.h dirent.h pwd.h stdio.h stdlib.h string.h sys/stat.h sys/time.h sys/types.h time.h unistd.h netdb.h netinet/in.h)

AC_HEADER_TIME

AC_REPLACE_FUNCS(strsep strtoll getuid)
AC_CHECK_FUNCS(getpwuid)

dnl This MUST be last.
DC_SYNC_SHLIBOBJS

AC_OUTPUT(Makefile lc_geterrno.3 lc_process.3 lc_register_var.3 lc_geterrstr.3 lc_seterrstr.3 lc_register_callback.3 lc_cleanup.3 lc_process_file.3 libconfig.3 lc_handle_type.3)







|





35
36
37
38
39
40
41
42
43
44
45
46
47

dnl This stuff has to come after the shobjtest to verify that it is correct
AC_CHECK_HEADERS(ctype.h dirent.h pwd.h stdio.h stdlib.h string.h sys/stat.h sys/time.h sys/types.h time.h unistd.h netdb.h netinet/in.h)

AC_HEADER_TIME

AC_REPLACE_FUNCS(strsep strtoll getuid)
AC_CHECK_FUNCS(getpwuid strtof)

dnl This MUST be last.
DC_SYNC_SHLIBOBJS

AC_OUTPUT(Makefile lc_geterrno.3 lc_process.3 lc_register_var.3 lc_geterrstr.3 lc_seterrstr.3 lc_register_callback.3 lc_cleanup.3 lc_process_file.3 libconfig.3 lc_handle_type.3)

Modified lc_register_var.3.in from [2b8548a5a1] to [71a10b7b8b].

42
43
44
45
46
47
48






49
50
51
52
53
54
55
.TP
LC_VAR_INT
For a "int" integer type variable.  The data passed should be of type "int *".
.TP
LC_VAR_SHORT
For a "short" integer type variable.  The data passed should be of type "short *".
.TP






LC_VAR_BOOL
For a boolean type variable.  The data passed should be of type "int *".  When a true value is specified the variable is set to 1.  When a false value is specified the variable is set to 0.  Any other value sets the variable to -1.  Valid true values are: enable, true, yes, on, y, and 1.  Valid false values are: disable, false, off, no, n, and 0.
.TP
LC_VAR_FILENAME
Not implemented.
.TP
LC_VAR_DIRECTORY







>
>
>
>
>
>







42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
.TP
LC_VAR_INT
For a "int" integer type variable.  The data passed should be of type "int *".
.TP
LC_VAR_SHORT
For a "short" integer type variable.  The data passed should be of type "short *".
.TP
LC_VAR_FLOAT
For a "float" floating point type variable.  The data passed should be of type "float *".
.TP
LC_VAR_DOUBLE
For a "double" floating point type variable.  The data passed should be of type "double *".
.TP
LC_VAR_BOOL
For a boolean type variable.  The data passed should be of type "int *".  When a true value is specified the variable is set to 1.  When a false value is specified the variable is set to 0.  Any other value sets the variable to -1.  Valid true values are: enable, true, yes, on, y, and 1.  Valid false values are: disable, false, off, no, n, and 0.
.TP
LC_VAR_FILENAME
Not implemented.
.TP
LC_VAR_DIRECTORY

Modified libconfig.c from [41938c6e31] to [7636a5a41a].

328
329
330
331
332
333
334

















335
336
337
338
339
340
341
}

static int lc_process_var_sizesizet(size_t *data, const char *value, const char **endptr) {
	*data = lc_process_size(value, endptr);

	return(0);
}


















int lc_handle_type(lc_var_type_t type, const char *value, void *data) {
	const char *next;
	int is_list;

	is_list = type & LC_VAR_LIST;








>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
}

static int lc_process_var_sizesizet(size_t *data, const char *value, const char **endptr) {
	*data = lc_process_size(value, endptr);

	return(0);
}

static int lc_process_var_float(float *data, const char *value, const char **endptr) {
#ifdef HAVE_STRTOF
	*data = strtof(value, endptr);
#else
	*data = strtod(value, endptr);
#endif

	return(0);
}

static int lc_process_var_double(float *data, const char *value, const char **endptr) {
	*data = strtod(value, endptr);

	return(0);
}


int lc_handle_type(lc_var_type_t type, const char *value, void *data) {
	const char *next;
	int is_list;

	is_list = type & LC_VAR_LIST;

398
399
400
401
402
403
404






405
406
407
408
409
410
411
			break;
		case LC_VAR_HOSTNAME6:
			return(lc_process_var_hostname6(data, value, &next));
			break;
		case LC_VAR_CIDR:
			return(lc_process_var_cidr(data, value, &next));
			break;






		case LC_VAR_TIME:
		case LC_VAR_DATE:
		case LC_VAR_FILENAME:
		case LC_VAR_DIRECTORY:
#ifdef DEBUG
			fprintf(stderr, "Not implemented yet!\n");
#endif







>
>
>
>
>
>







415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
			break;
		case LC_VAR_HOSTNAME6:
			return(lc_process_var_hostname6(data, value, &next));
			break;
		case LC_VAR_CIDR:
			return(lc_process_var_cidr(data, value, &next));
			break;
		case LC_VAR_DOUBLE:
			return(lc_process_var_double(data, value, &next));
			break;
		case LC_VAR_FLOAT:
			return(lc_process_var_float(data, value, &next));
			break;
		case LC_VAR_TIME:
		case LC_VAR_DATE:
		case LC_VAR_FILENAME:
		case LC_VAR_DIRECTORY:
#ifdef DEBUG
			fprintf(stderr, "Not implemented yet!\n");
#endif

Modified libconfig.h.in from [1c13a21f8a] to [7b32045b6a].

45
46
47
48
49
50
51


52
53
54
55
56
57
58
        LC_VAR_IP6,
        LC_VAR_ADDR,
        LC_VAR_ADDR4,
        LC_VAR_ADDR6,
        LC_VAR_HOSTNAME,
        LC_VAR_HOSTNAME4,
        LC_VAR_HOSTNAME6,


        LC_VAR_LIST = 0x80
} lc_var_type_t;

__BLANK_LINE__

typedef enum {
        LC_FLAGS_VAR,







>
>







45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
        LC_VAR_IP6,
        LC_VAR_ADDR,
        LC_VAR_ADDR4,
        LC_VAR_ADDR6,
        LC_VAR_HOSTNAME,
        LC_VAR_HOSTNAME4,
        LC_VAR_HOSTNAME6,
        LC_VAR_DOUBLE,
        LC_VAR_FLOAT,
        LC_VAR_LIST = 0x80
} lc_var_type_t;

__BLANK_LINE__

typedef enum {
        LC_FLAGS_VAR,

Name change from build/test.conf to test.conf.