Check-in [5baa5c16a6]
Overview
Comment:Win32 fixes. libconfig 0.1.8
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | 0.1.8
Files: files | file ages | folders
SHA1:5baa5c16a6de462d5fd583eb2e82a52aff084f4d
User & Date: rkeene on 2004-12-18 10:46:04
Other Links: manifest | tags
Context
2004-12-18
18:55
More cygwin fixes. libconfig 0.1.12 check-in: c1e4573958 user: rkeene tags: trunk, 0.1.12
10:46
Win32 fixes. libconfig 0.1.8 check-in: 5baa5c16a6 user: rkeene tags: trunk, 0.1.8
10:05
Win32 support fixed. Added a new man page (lc_cleanup) check-in: 80d18a8d82 user: rkeene tags: trunk
Changes

Modified .cvsignore from [3ec037ded0] to [8a5f3028e8].

    10     10   .*.swp
    11     11   lc_geterrstr.3
    12     12   lc_register_var.3
    13     13   lc_register_callback.3
    14     14   lc_process.3
    15     15   lc_geterrno.3
    16     16   libconfig.3
           17  +libconfig.dll.a
           18  +test-lc.exe
           19  +lc_process_file.3
           20  +lc_cleanup.3
           21  +libconfig.dll.def
           22  +libconfig.dll

Modified .fossil-settings/ignore-glob from [f46eab9da1] to [4fc97f7101].

     4      4   Makefile/*
     5      5   config.h
     6      6   config.h/*
     7      7   config.log
     8      8   config.log/*
     9      9   config.status
    10     10   config.status/*
           11  +lc_cleanup.3
           12  +lc_cleanup.3/*
    11     13   lc_geterrno.3
    12     14   lc_geterrno.3/*
    13     15   lc_geterrstr.3
    14     16   lc_geterrstr.3/*
    15     17   lc_process.3
    16     18   lc_process.3/*
           19  +lc_process_file.3
           20  +lc_process_file.3/*
    17     21   lc_register_callback.3
    18     22   lc_register_callback.3/*
    19     23   lc_register_var.3
    20     24   lc_register_var.3/*
    21     25   libconfig.3
    22     26   libconfig.3/*
    23     27   libconfig.a
    24     28   libconfig.a/*
           29  +libconfig.dll
           30  +libconfig.dll.a
           31  +libconfig.dll.a/*
           32  +libconfig.dll.def
           33  +libconfig.dll.def/*
           34  +libconfig.dll/*
    25     35   libconfig.h
    26     36   libconfig.h/*
    27     37   libconfig.so
    28     38   libconfig.so/*
    29     39   test-lc
           40  +test-lc.exe
           41  +test-lc.exe/*
    30     42   test-lc/*
    31     43   test.cfg
    32     44   test.cfg/*

Modified Makefile.in from [6d7f8667ba] to [e7001c02f6].

    31     31   BINS =
    32     32   # The following two lines need to be kept syncronised.
    33     33   OBJS = libconfig.o conf_space.o conf_section.o conf_apache.o conf_colon.o conf_equal.o conf_xml.o @LIBOBJS@
    34     34   SHOBJS = libconfig_shr.o conf_space_shr.o conf_section_shr.o conf_apache_shr.o conf_colon_shr.o conf_equal_shr.o conf_xml_shr.o @SHLIBOBJS@
    35     35   
    36     36   all: $(LIBS) $(BINS)
    37     37   libconfig.$(SHOBJEXT): $(SHOBJS)
    38         -	$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(SHOBJFLAGS) $(SHOBJLDFLAGS) -o $@ $?
           38  +	$(CC) $(CPPFLAGS) $(CFLAGS) $(SHOBJFLAGS) $(SHOBJLDFLAGS) -o $@ $^ $(LDFLAGS)
    39     39   
    40     40   libconfig.$(AREXT): $(OBJS)
    41         -	$(AR) rcu $@ $?
           41  +	$(AR) rcu $@ $^
    42     42   	-$(RANLIB) $@
    43     43   
    44     44   libconfig.o: libconfig.c compat.h win32.h config.h libconfig.h
    45     45   libconfig_shr.o: libconfig.c compat.h win32.h config.h libconfig.h
    46     46   	$(CC) $(CPPFLAGS) $(CFLAGS) $(SHOBJFLAGS) -c -o $@ libconfig.c
    47     47   
    48     48   %_shr.o: %.c
    49     49   	$(CC) $(CPPFLAGS) $(CFLAGS) $(SHOBJFLAGS) -c -o $@ $?
    50     50   
    51     51   libconfig.h: libconfig.h.in
    52     52   	cat $? | $(CPP) $(CPPFLAGS) - | grep -v '^#' | grep -v '^ *$$' | sed 's/^!/#  /g;s/__BLANK_LINE__//' > $@
    53     53   
    54         -test-lc: $(LIBS) test-lc.c
    55         -	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $(filter %.c, $?) $(LDFLAGS) -Wl,-R -Wl,. -L. -lconfig
           54  +test-lc$(EXEEXT): $(LIBS) test-lc.c
           55  +	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $(filter %.c, $^) $(LDFLAGS) -Wl,-R -Wl,. -L. -lconfig
    56     56   
    57     57   .PHONY: clean distclean install
    58     58   clean:
    59         -	rm -f *.o $(BINS) $(LIBS) libconfig.h *~ test-lc *.dll.a *.dll.def *.dll
           59  +	rm -f *.o $(BINS) $(LIBS) libconfig.h *~ test-lc$(EXEEXT) *.dll.a *.dll.def *.dll
    60     60   distclean: clean
    61     61   	rm -f Makefile config.h config.status config.log lc_geterrno.3 lc_process.3 lc_cleanup.3 lc_process_file.3 lc_register_var.3 lc_geterrstr.3 lc_register_callback.3 libconfig.3
    62     62   
    63     63   
    64     64   install: all libconfig.h
    65     65   	-$(INSTALL) -d $(mandir)
    66     66   	-$(INSTALL) -d $(mandir)/man3
    67     67   	-$(INSTALL) -d $(libdir)
    68     68   	-$(INSTALL) -d $(includedir)
           69  +	-$(INSTALL) -m 644 libconfig.$(SHOBJEXT).def $(libdir)/libconfig.$(SHOBJEXT).def
           70  +	-$(INSTALL) -m 644 libconfig.$(SHOBJEXT).a $(libdir)/libconfig.$(SHOBJEXT).a
    69     71   	$(INSTALL) -m 755 libconfig.$(SHOBJEXT) $(libdir)/libconfig.$(SHOBJEXT).$(PKGVERS)
    70     72   	$(INSTALL) -m 644 libconfig.$(AREXT) $(libdir)/libconfig.$(AREXT)
    71     73   	$(INSTALL) -m 644 lc_register_callback.3 $(mandir)/man3/lc_register_callback.3
    72     74   	$(INSTALL) -m 644 lc_register_var.3 $(mandir)/man3/lc_register_var.3
    73     75   	$(INSTALL) -m 644 lc_process_file.3 $(mandir)/man3/lc_process_file.3
    74     76   	$(INSTALL) -m 644 lc_geterrstr.3 $(mandir)/man3/lc_geterrstr.3
    75     77   	$(INSTALL) -m 644 lc_geterrno.3 $(mandir)/man3/lc_geterrno.3
    76     78   	$(INSTALL) -m 644 lc_process.3 $(mandir)/man3/lc_process.3
    77     79   	$(INSTALL) -m 644 lc_cleanup.3 $(mandir)/man3/lc_cleanup.3
    78     80   	$(INSTALL) -m 644 libconfig.3 $(mandir)/man3/libconfig.3
    79     81   	$(INSTALL) -m 644 libconfig.h $(includedir)/libconfig.h
    80     82   	-( cd $(libdir) && rm -f libconfig.$(SHOBJEXT).$(PKGVERSMAJOR) && $(LN_S) libconfig.$(SHOBJEXT).$(PKGVERS) libconfig.$(SHOBJEXT).$(PKGVERSMAJOR) )
    81     83   	-( cd $(libdir) && rm -f libconfig.$(SHOBJEXT) && $(LN_S) libconfig.$(SHOBJEXT).$(PKGVERS) libconfig.$(SHOBJEXT) )

Modified build/build_win32.sh from [295d16231e] to [7d910d6991].

     8      8   DATE="`date +%Y%m%d%H%M`"
     9      9   CROSS=i586-mingw32msvc
    10     10   if [ ! -z "${CROSS}" ]; then
    11     11   	CROSSCMD="${CROSS}-"
    12     12   fi
    13     13   export CFLAGS LDFLAGS CPPFLAGS
    14     14   make distclean
    15         -./configure --host=${CROSS} && \
           15  +./configure --host=${CROSS} --prefix=${HOME}/root/windows-i386/ --with-libopennet=${HOME}/root/windows-i386/ && \
    16     16   make || exit 1

Modified configure from [2142567030] to [6fc31f0c70].

     1      1   #! /bin/sh
     2      2   # From configure.ac Revision .
     3      3   # Guess values for system-dependent variables and create Makefiles.
     4         -# Generated by GNU Autoconf 2.59 for libconfig 0.1.7.
            4  +# Generated by GNU Autoconf 2.59 for libconfig 0.1.8.
     5      5   #
     6      6   # Copyright (C) 2003 Free Software Foundation, Inc.
     7      7   # This configure script is free software; the Free Software Foundation
     8      8   # gives unlimited permission to copy, distribute and modify it.
     9      9   ## --------------------- ##
    10     10   ## M4sh Initialization.  ##
    11     11   ## --------------------- ##
................................................................................
   264    264   # This variable seems obsolete.  It should probably be removed, and
   265    265   # only ac_max_sed_lines should be used.
   266    266   : ${ac_max_here_lines=38}
   267    267   
   268    268   # Identity of this package.
   269    269   PACKAGE_NAME='libconfig'
   270    270   PACKAGE_TARNAME='libconfig'
   271         -PACKAGE_VERSION='0.1.7'
   272         -PACKAGE_STRING='libconfig 0.1.7'
          271  +PACKAGE_VERSION='0.1.8'
          272  +PACKAGE_STRING='libconfig 0.1.8'
   273    273   PACKAGE_BUGREPORT=''
   274    274   
   275    275   # Factoring default headers for most tests.
   276    276   ac_includes_default="\
   277    277   #include <stdio.h>
   278    278   #if HAVE_SYS_TYPES_H
   279    279   # include <sys/types.h>
................................................................................
   774    774   #
   775    775   # Report the --help message.
   776    776   #
   777    777   if test "$ac_init_help" = "long"; then
   778    778     # Omit some internal or obsolete options to make the list less imposing.
   779    779     # This message is too long to be a string in the A/UX 3.1 sh.
   780    780     cat <<_ACEOF
   781         -\`configure' configures libconfig 0.1.7 to adapt to many kinds of systems.
          781  +\`configure' configures libconfig 0.1.8 to adapt to many kinds of systems.
   782    782   
   783    783   Usage: $0 [OPTION]... [VAR=VALUE]...
   784    784   
   785    785   To assign environment variables (e.g., CC, CFLAGS...), specify them as
   786    786   VAR=VALUE.  See below for descriptions of some of the useful variables.
   787    787   
   788    788   Defaults for the options are specified in brackets.
................................................................................
   835    835     --build=BUILD     configure for building on BUILD [guessed]
   836    836     --host=HOST       cross-compile to build programs to run on HOST [BUILD]
   837    837   _ACEOF
   838    838   fi
   839    839   
   840    840   if test -n "$ac_init_help"; then
   841    841     case $ac_init_help in
   842         -     short | recursive ) echo "Configuration of libconfig 0.1.7:";;
          842  +     short | recursive ) echo "Configuration of libconfig 0.1.8:";;
   843    843      esac
   844    844     cat <<\_ACEOF
   845    845   
   846    846   Optional Packages:
   847    847     --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
   848    848     --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
   849    849     --with-libopennet       Enable opennet support
................................................................................
   951    951       cd $ac_popdir
   952    952     done
   953    953   fi
   954    954   
   955    955   test -n "$ac_init_help" && exit 0
   956    956   if $ac_init_version; then
   957    957     cat <<\_ACEOF
   958         -libconfig configure 0.1.7
          958  +libconfig configure 0.1.8
   959    959   generated by GNU Autoconf 2.59
   960    960   
   961    961   Copyright (C) 2003 Free Software Foundation, Inc.
   962    962   This configure script is free software; the Free Software Foundation
   963    963   gives unlimited permission to copy, distribute and modify it.
   964    964   _ACEOF
   965    965     exit 0
   966    966   fi
   967    967   exec 5>config.log
   968    968   cat >&5 <<_ACEOF
   969    969   This file contains any messages produced by compilers while
   970    970   running configure, to aid debugging if configure makes a mistake.
   971    971   
   972         -It was created by libconfig $as_me 0.1.7, which was
          972  +It was created by libconfig $as_me 0.1.8, which was
   973    973   generated by GNU Autoconf 2.59.  Invocation command line was
   974    974   
   975    975     $ $0 $@
   976    976   
   977    977   _ACEOF
   978    978   {
   979    979   cat <<_ASUNAME
................................................................................
 17206  17206     echo
 17207  17207     sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
 17208  17208   ## Running $as_me. ##
 17209  17209   _ASBOX
 17210  17210   } >&5
 17211  17211   cat >&5 <<_CSEOF
 17212  17212   
 17213         -This file was extended by libconfig $as_me 0.1.7, which was
        17213  +This file was extended by libconfig $as_me 0.1.8, which was
 17214  17214   generated by GNU Autoconf 2.59.  Invocation command line was
 17215  17215   
 17216  17216     CONFIG_FILES    = $CONFIG_FILES
 17217  17217     CONFIG_HEADERS  = $CONFIG_HEADERS
 17218  17218     CONFIG_LINKS    = $CONFIG_LINKS
 17219  17219     CONFIG_COMMANDS = $CONFIG_COMMANDS
 17220  17220     $ $0 $@
................................................................................
 17266  17266   $config_headers
 17267  17267   
 17268  17268   Report bugs to <bug-autoconf@gnu.org>."
 17269  17269   _ACEOF
 17270  17270   
 17271  17271   cat >>$CONFIG_STATUS <<_ACEOF
 17272  17272   ac_cs_version="\\
 17273         -libconfig config.status 0.1.7
        17273  +libconfig config.status 0.1.8
 17274  17274   configured by $0, generated by GNU Autoconf 2.59,
 17275  17275     with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
 17276  17276   
 17277  17277   Copyright (C) 2003 Free Software Foundation, Inc.
 17278  17278   This config.status script is free software; the Free Software Foundation
 17279  17279   gives unlimited permission to copy, distribute and modify it."
 17280  17280   srcdir=$srcdir

Modified configure.ac from [49b46603c1] to [fcea9f4c41].

     1      1   AC_REVISION($Revision $)
     2         -AC_INIT(libconfig, 0.1.7)
            2  +AC_INIT(libconfig, 0.1.8)
     3      3   AC_CONFIG_HEADER(config.h)
     4      4   
     5      5   dnl Find out about the host OS
     6      6   DC_CHK_OS_INFO
     7      7   
     8      8   dnl Checks for programs.
     9      9   AC_PROG_CC

Modified lc_register_var.3.in from [e33efd4ec7] to [6224b99a5a].

    76     76   LC_VAR_DATE
    77     77   Not implemented.
    78     78   .TP
    79     79   LC_VAR_BOOL_BY_EXISTANCE
    80     80   This type of variable takes no arguments, it is set to true (1) by its existance in a configuration file, environment variable, or on the command line.  If it is not specified, the value of the data passed is not changed.  The data passed should be of type "int *".
    81     81   .TP
    82     82   LC_VAR_CIDR
    83         -XXX: blah
           83  +This type of variable accepts a CIDR format netmask and IP.  This is not yet implemented. (XXX)
    84     84   .TP
    85     85   LC_VAR_IP
    86         -XXX: blah
           86  +This type of variable accepts an IP address in decimal-dot format.  The value is stored in a uint32_t.
           87  +.TP
           88  +LC_VAR_ADDR
           89  +This type of variable accepts an address in either host or decimal-dot format.  The value is stored in a uint32_t.  This is not yet implemented. (XXX)
    87     90   
    88     91   .SH "RETURN VALUE"
    89     92   On success 0 is returned, otherwise -1 is returned.
    90     93   
    91     94   .SH EXAMPLE
    92     95   .nf
    93     96   #include <libconfig.h>

Modified libconfig.c from [a7581f8b4f] to [0b1fdcb0d0].

    48     48   	dataval = data;
    49     49   	*dataval = strdup(value);
    50     50   
    51     51   	return(0);
    52     52   }
    53     53   
    54     54   static int lc_process_var_cidr(void *data, const char *value) {
    55         -	
    56         -
    57     55   	return(0);
    58     56   }
    59     57   
    60     58   static int lc_process_var_ip(void *data, const char *value) {
    61     59   	uint32_t *dataval = NULL, retval = 0;
    62     60   	const char *dotptr = NULL;
    63     61   	int tmpval = -1;
................................................................................
   278    276   			break;
   279    277   		case LC_VAR_SIZE_SIZE_T:
   280    278   			return(lc_process_var_sizesizet(data, value));
   281    279   			break;
   282    280   		case LC_VAR_IP:
   283    281   			return(lc_process_var_ip(data, value));
   284    282   			break;
          283  +		case LC_VAR_CIDR:
          284  +			return(lc_process_var_cidr(data, value));
          285  +			break;
   285    286   		case LC_VAR_TIME:
   286    287   		case LC_VAR_DATE:
   287    288   		case LC_VAR_FILENAME:
   288    289   		case LC_VAR_DIRECTORY:
   289    290   #ifdef DEBUG
   290    291   			fprintf(stderr, "Not implemented yet!\n");
   291    292   #endif
................................................................................
   789    790   			break;
   790    791   	}
   791    792   
   792    793   	return(chkretval);
   793    794   }
   794    795   
   795    796   static int lc_process_files(const char *appname, lc_conf_type_t type, const char *extraconfig) {
          797  +#ifdef HAVE_GETPWUID
   796    798   	struct passwd *pwinfo = NULL;
          799  +#endif
   797    800   	char configfiles[3][13][512] = {{{0}}};
   798    801   	char *configfile = NULL;
   799    802   	char *homedir = NULL;
   800    803   	int configsetidx = 0, configidx = 0;
   801    804   	int chkretval = 0, retval = 0;
   802    805   
   803    806   	if (extraconfig != NULL) {

Modified libconfig.spec from [2a99584cbf] to [d5be6e85a0].

    28     28   %doc README
    29     29   %doc AUTHORS
    30     30   /usr/lib/libconfig.a
    31     31   /usr/lib/libconfig.so
    32     32   /usr/lib/libconfig.so.@@VERS@@
    33     33   /usr/lib/libconfig.so.0
    34     34   /usr/include/libconfig.h
    35         -/usr/man/man3/lc_geterrno.3
    36         -/usr/man/man3/lc_geterrstr.3
    37         -/usr/man/man3/lc_process.3
    38     35   /usr/man/man3/lc_register_callback.3
    39     36   /usr/man/man3/lc_register_var.3
           37  +/usr/man/man3/lc_process_file.3
           38  +/usr/man/man3/lc_geterrstr.3
           39  +/usr/man/man3/lc_geterrno.3
           40  +/usr/man/man3/lc_process.3
           41  +/usr/man/man3/lc_cleanup.3
    40     42   /usr/man/man3/libconfig.3