|
From: <cli...@li...> - 2010-09-29 13:24:28
|
Send clisp-cvs mailing list submissions to cli...@li... To subscribe or unsubscribe via the World Wide Web, visit https://lists.sourceforge.net/lists/listinfo/clisp-cvs or, via email, send a message with subject or body 'help' to cli...@li... You can reach the person managing the list at cli...@li... When replying, please edit your Subject line so it is more specific than "Re: Contents of clisp-cvs digest..." CLISP CVS commits for today Today's Topics: 1. clisp/modules/syscalls/glm4 bison.m4, NONE, 1.1 clock_time.m4, NONE, 1.1 error.m4, NONE, 1.1 getdate.m4, NONE, 1.1 gettime.m4, NONE, 1.1 inline.m4, NONE, 1.1 timespec.m4, NONE, 1.1 xalloc.m4, NONE, 1.1 gnulib-cache.m4, 1.11, 1.12 gnulib-comp.m4, 1.12, 1.13 (Sam Steingold) 2. clisp/src ChangeLog,1.7533,1.7534 NEWS,1.548,1.549 (Sam Steingold) 3. clisp Makefile.devel,1.283,1.284 (Sam Steingold) 4. clisp/modules/syscalls calls.c, 1.315, 1.316 configure.in, 1.92, 1.93 syscalls.xml, 1.134, 1.135 (Sam Steingold) 5. clisp/modules/syscalls/gllib c-ctype.c, NONE, 1.1 c-ctype.h, NONE, 1.1 getdate.h, NONE, 1.1 getdate.y, NONE, 1.1 gettext.h, NONE, 1.1 gettime.c, NONE, 1.1 timespec.h, NONE, 1.1 xalloc.h, NONE, 1.1 xmalloc.c, NONE, 1.1 Makefile.am, 1.19, 1.20 (Sam Steingold) ---------------------------------------------------------------------- Message: 1 Date: Wed, 29 Sep 2010 13:24:16 +0000 From: Sam Steingold <sd...@us...> Subject: clisp/modules/syscalls/glm4 bison.m4, NONE, 1.1 clock_time.m4, NONE, 1.1 error.m4, NONE, 1.1 getdate.m4, NONE, 1.1 gettime.m4, NONE, 1.1 inline.m4, NONE, 1.1 timespec.m4, NONE, 1.1 xalloc.m4, NONE, 1.1 gnulib-cache.m4, 1.11, 1.12 gnulib-comp.m4, 1.12, 1.13 To: cli...@li... Message-ID: <E1P...@sf...> Update of /cvsroot/clisp/clisp/modules/syscalls/glm4 In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv5536/modules/syscalls/glm4 Modified Files: gnulib-cache.m4 gnulib-comp.m4 Added Files: bison.m4 clock_time.m4 error.m4 getdate.m4 gettime.m4 inline.m4 timespec.m4 xalloc.m4 Log Message: implement POSIX:GETDATE using gnulib * Makefile.devel (gnulib-imported): import getdate into syscalls * modules/syscalls/calls.c (tm_to_lisp): extract from STRING-TIME (POSIX:GETDATE, xalloc_die): implement * modules/syscalls/configure.in: call gl_GETDATE --- NEW FILE: xalloc.m4 --- # xalloc.m4 serial 16 dnl Copyright (C) 2002, 2003, 2004, 2005, 2006, 2009, 2010 Free Software dnl Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_XALLOC], [ AC_LIBOBJ([xmalloc]) gl_PREREQ_XALLOC gl_PREREQ_XMALLOC ]) # Prerequisites of lib/xalloc.h. AC_DEFUN([gl_PREREQ_XALLOC], [ AC_REQUIRE([gl_INLINE]) : ]) # Prerequisites of lib/xmalloc.c. AC_DEFUN([gl_PREREQ_XMALLOC], [ : ]) --- NEW FILE: clock_time.m4 --- # clock_time.m4 serial 10 dnl Copyright (C) 2002-2006, 2009-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. # Check for clock_gettime and clock_settime, and set LIB_CLOCK_GETTIME. # For a program named, say foo, you should add a line like the following # in the corresponding Makefile.am file: # foo_LDADD = $(LDADD) $(LIB_CLOCK_GETTIME) AC_DEFUN([gl_CLOCK_TIME], [ dnl Persuade glibc and Solaris <time.h> to declare these functions. AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function. # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4. # Save and restore LIBS so e.g., -lrt, isn't added to it. Otherwise, *all* # programs in the package would end up linked with that potentially-shared # library, inducing unnecessary run-time overhead. LIB_CLOCK_GETTIME= AC_SUBST([LIB_CLOCK_GETTIME]) gl_saved_libs=$LIBS AC_SEARCH_LIBS([clock_gettime], [rt posix4], [test "$ac_cv_search_clock_gettime" = "none required" || LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime]) AC_CHECK_FUNCS([clock_gettime clock_settime]) LIBS=$gl_saved_libs ]) --- NEW FILE: getdate.m4 --- # getdate.m4 serial 16 dnl Copyright (C) 2002-2006, 2008-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Define HAVE_COMPOUND_LITERALS if the C compiler supports compound literals dnl as in ISO C99. dnl Note that compound literals such as (struct s) { 3, 4 } can be used for dnl initialization of stack-allocated variables, but are not constant dnl expressions and therefore cannot be used as initializer for global or dnl static variables (even though gcc supports this in pre-C99 mode). AC_DEFUN([gl_C_COMPOUND_LITERALS], [ AC_CACHE_CHECK([for compound literals], [gl_cv_compound_literals], [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[struct s { int i, j; };]], [[struct s t = (struct s) { 3, 4 }; if (t.i != 0) return 0;]])], gl_cv_compound_literals=yes, gl_cv_compound_literals=no)]) if test $gl_cv_compound_literals = yes; then AC_DEFINE([HAVE_COMPOUND_LITERALS], [1], [Define if you have compound literals.]) fi ]) AC_DEFUN([gl_GETDATE], [ dnl Prerequisites of lib/getdate.h. AC_REQUIRE([AM_STDBOOL_H]) AC_REQUIRE([gl_TIMESPEC]) dnl Prerequisites of lib/getdate.y. AC_REQUIRE([gl_BISON]) AC_REQUIRE([gl_C_COMPOUND_LITERALS]) AC_STRUCT_TIMEZONE AC_REQUIRE([gl_CLOCK_TIME]) AC_REQUIRE([gl_TM_GMTOFF]) AC_COMPILE_IFELSE( [AC_LANG_SOURCE([[ #include <time.h> /* for time_t */ #include <limits.h> /* for CHAR_BIT, LONG_MIN, LONG_MAX */ #define TYPE_MINIMUM(t) \ ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))) #define TYPE_MAXIMUM(t) \ ((t) ((t) 0 < (t) -1 ? (t) -1 : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1)))) typedef int verify_min[2 * (LONG_MIN <= TYPE_MINIMUM (time_t)) - 1]; typedef int verify_max[2 * (TYPE_MAXIMUM (time_t) <= LONG_MAX) - 1]; ]])], [AC_DEFINE([TIME_T_FITS_IN_LONG_INT], [1], [Define to 1 if all 'time_t' values fit in a 'long int'.]) ]) ]) --- NEW FILE: inline.m4 --- # inline.m4 serial 4 dnl Copyright (C) 2006, 2009, 2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Test for the 'inline' keyword or equivalent. dnl Define 'inline' to a supported equivalent, or to nothing if not supported, dnl like AC_C_INLINE does. Also, define HAVE_INLINE if 'inline' or an dnl equivalent is effectively supported, i.e. if the compiler is likely to dnl drop unused 'static inline' functions. AC_DEFUN([gl_INLINE], [ AC_REQUIRE([AC_C_INLINE]) AC_CACHE_CHECK([whether the compiler generally respects inline], [gl_cv_c_inline_effective], [if test $ac_cv_c_inline = no; then gl_cv_c_inline_effective=no else dnl GCC defines __NO_INLINE__ if not optimizing or if -fno-inline is dnl specified. dnl Use AC_COMPILE_IFELSE here, not AC_EGREP_CPP, because the result dnl depends on optimization flags, which can be in CFLAGS. dnl (AC_EGREP_CPP looks only at the CPPFLAGS.) AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[]], [[#ifdef __NO_INLINE__ #error "inline is not effective" #endif]])], [gl_cv_c_inline_effective=yes], [gl_cv_c_inline_effective=no]) fi ]) if test $gl_cv_c_inline_effective = yes; then AC_DEFINE([HAVE_INLINE], [1], [Define to 1 if the compiler supports one of the keywords 'inline', '__inline__', '__inline' and effectively inlines functions marked as such.]) fi ]) Index: gnulib-comp.m4 =================================================================== RCS file: /cvsroot/clisp/clisp/modules/syscalls/glm4/gnulib-comp.m4,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- gnulib-comp.m4 28 Sep 2010 18:43:29 -0000 1.12 +++ gnulib-comp.m4 29 Sep 2010 13:24:14 -0000 1.13 @@ -29,7 +29,12 @@ # Code from module alignof: # Code from module arg-nonnull: # Code from module c++defs: + # Code from module c-ctype: + # Code from module clock-time: + # Code from module getdate: # Code from module gethostname: + # Code from module gettime: + # Code from module inline: # Code from module intprops: # Code from module mbrlen: # Code from module mktime: @@ -45,9 +50,11 @@ # Code from module sys_utsname: # Code from module time: # Code from module time_r: + # Code from module timespec: # Code from module uname: # Code from module unistd: # Code from module warn-on-use: + # Code from module xalloc: ]) # This macro should be invoked from ./configure.ac, in the section @@ -69,9 +76,18 @@ # Code from module alignof: # Code from module arg-nonnull: # Code from module c++defs: + # Code from module c-ctype: + # Code from module clock-time: + gl_CLOCK_TIME + # Code from module getdate: + gl_GETDATE # Code from module gethostname: gl_FUNC_GETHOSTNAME gl_UNISTD_MODULE_INDICATOR([gethostname]) + # Code from module gettime: + gl_GETTIME + # Code from module inline: + gl_INLINE # Code from module intprops: # Code from module mbrlen: gl_FUNC_MBRLEN @@ -109,13 +125,16 @@ # Code from module time_r: gl_TIME_R gl_TIME_MODULE_INDICATOR([time_r]) + # Code from module timespec: + gl_TIMESPEC # Code from module uname: gl_FUNC_UNAME gl_SYS_UTSNAME_MODULE_INDICATOR([uname]) # Code from module unistd: gl_UNISTD_H # Code from module warn-on-use: - # Code from module dummy: + # Code from module xalloc: + gl_XALLOC # End of code from modules m4_ifval(sc_gl_LIBSOURCES_LIST, [ m4_syscmd([test ! -d ]m4_defn([sc_gl_LIBSOURCES_DIR])[ || @@ -259,9 +278,14 @@ build-aux/arg-nonnull.h build-aux/c++defs.h build-aux/warn-on-use.h + doc/getdate.texi lib/alignof.h - lib/dummy.c + lib/c-ctype.c + lib/c-ctype.h + lib/getdate.h + lib/getdate.y lib/gethostname.c + lib/gettime.c lib/intprops.h lib/mbrlen.c lib/mktime-internal.h @@ -279,12 +303,20 @@ lib/sys_utsname.in.h lib/time.in.h lib/time_r.c + lib/timespec.h lib/uname.c lib/unistd.in.h lib/w32sock.h + lib/xalloc.h + lib/xmalloc.c m4/00gnulib.m4 + m4/bison.m4 + m4/clock_time.m4 + m4/getdate.m4 m4/gethostname.m4 + m4/gettime.m4 m4/gnulib-common.m4 + m4/inline.m4 m4/mbrlen.m4 m4/mbstate_t.m4 m4/mktime.m4 @@ -301,9 +333,11 @@ m4/sys_utsname_h.m4 m4/time_h.m4 m4/time_r.m4 + m4/timespec.m4 m4/tm_gmtoff.m4 m4/uname.m4 m4/unistd_h.m4 m4/warn-on-use.m4 m4/wchar_t.m4 + m4/xalloc.m4 ]) --- NEW FILE: bison.m4 --- # serial 5 # Copyright (C) 2002, 2005, 2009, 2010 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_BISON], [ # getdate.y works with bison only. : ${YACC='bison -y'} dnl dnl Declaring YACC & YFLAGS precious will not be necessary after GNULIB dnl requires an Autoconf greater than 2.59c, but it will probably still be dnl useful to override the description of YACC in the --help output, re dnl getdate.y assuming `bison -y'. AC_ARG_VAR([YACC], [The `Yet Another C Compiler' implementation to use. Defaults to `bison -y'. Values other than `bison -y' will most likely break on most systems.])dnl AC_ARG_VAR([YFLAGS], [YFLAGS contains the list arguments that will be passed by default to Bison. This script will default YFLAGS to the empty string to avoid a default value of `-d' given by some make applications.])dnl ]) Index: gnulib-cache.m4 =================================================================== RCS file: /cvsroot/clisp/clisp/modules/syscalls/glm4/gnulib-cache.m4,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- gnulib-cache.m4 28 Sep 2010 18:43:29 -0000 1.11 +++ gnulib-cache.m4 29 Sep 2010 13:24:14 -0000 1.12 @@ -15,11 +15,12 @@ # Specification in the form of a command-line invocation: -# gnulib-tool --import --dir=. --lib=libgnu --source-base=modules/syscalls/gllib --m4-base=modules/syscalls/glm4 --doc-base=doc --tests-base=tests --aux-dir=src/build-aux --avoid=no-c++ --avoid=stdint --avoid=stdbool --avoid=havelib --avoid=gettext --avoid=localcharset --avoid=uniwidth/width --avoid=streq --avoid=uniname/uniname --avoid=unitypes --avoid=link-follow --avoid=host-cpu-c-abi --avoid=socklen --avoid=sockets --avoid=close-hook --avoid=setenv --avoid=unsetenv --avoid=errno --avoid=nocrash --avoid=libsigsegv --avoid=gnu-make --avoid=gettimeofday --avoid=getpagesize --avoid=sys_time --avoid=sys_wait --avoid=alloca-opt --avoid=alloca --avoid=extensions --avoid=include_next --avoid=verify --avoid=string --avoid=mbsinit --avoid=wchar --avoid=wctype --avoid=mbrtowc --avoid=mbsrtowcs --avoid=memchr --avoid=nl_langinfo --no-libtool --macro-prefix=sc_gl --no-vc-files mktime strerror strftime strptime strverscmp uname +# gnulib-tool --import --dir=. --lib=libgnu --source-base=modules/syscalls/gllib --m4-base=modules/syscalls/glm4 --doc-base=doc --tests-base=tests --aux-dir=src/build-aux --avoid=no-c++ --avoid=stdint --avoid=stdbool --avoid=havelib --avoid=gettext --avoid=localcharset --avoid=uniwidth/width --avoid=streq --avoid=uniname/uniname --avoid=unitypes --avoid=link-follow --avoid=host-cpu-c-abi --avoid=socklen --avoid=sockets --avoid=close-hook --avoid=setenv --avoid=unsetenv --avoid=errno --avoid=nocrash --avoid=libsigsegv --avoid=gnu-make --avoid=gettimeofday --avoid=getpagesize --avoid=sys_time --avoid=sys_wait --avoid=alloca-opt --avoid=alloca --avoid=extensions --avoid=include_next --avoid=verify --avoid=string --avoid=mbsinit --avoid=wchar --avoid=wctype --avoid=mbrtowc --avoid=mbsrtowcs --avoid=memchr --avoid=nl_langinfo --avoid=xalloc-die --no-libtool --macro-prefix=sc_gl --no-vc-files getdate mktime strerror strftime strptime strverscmp uname # Specification in the form of a few gnulib-tool.m4 macro invocations: gl_LOCAL_DIR([]) gl_MODULES([ + getdate mktime strerror strftime @@ -27,7 +28,7 @@ strverscmp uname ]) -gl_AVOID([ no-c++ stdint stdbool havelib gettext localcharset uniwidth/width streq uniname/uniname unitypes link-follow host-cpu-c-abi socklen sockets close-hook setenv unsetenv errno nocrash libsigsegv gnu-make gettimeofday getpagesize sys_time sys_wait alloca-opt alloca extensions include_next verify string mbsinit wchar wctype mbrtowc mbsrtowcs memchr nl_langinfo]) +gl_AVOID([ no-c++ stdint stdbool havelib gettext localcharset uniwidth/width streq uniname/uniname unitypes link-follow host-cpu-c-abi socklen sockets close-hook setenv unsetenv errno nocrash libsigsegv gnu-make gettimeofday getpagesize sys_time sys_wait alloca-opt alloca extensions include_next verify string mbsinit wchar wctype mbrtowc mbsrtowcs memchr nl_langinfo xalloc-die]) gl_SOURCE_BASE([modules/syscalls/gllib]) gl_M4_BASE([modules/syscalls/glm4]) gl_PO_BASE([]) --- NEW FILE: gettime.m4 --- # gettime.m4 serial 7 dnl Copyright (C) 2002, 2004-2006, 2009-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_GETTIME], [ AC_LIBOBJ([gettime]) dnl Prerequisites of lib/gettime.c. AC_REQUIRE([gl_CLOCK_TIME]) AC_REQUIRE([gl_TIMESPEC]) AC_CHECK_FUNCS_ONCE([gettimeofday nanotime]) ]) --- NEW FILE: error.m4 --- #serial 13 # Copyright (C) 1996-1998, 2001-2004, 2009-2010 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_ERROR], [ AC_FUNC_ERROR_AT_LINE dnl Note: AC_FUNC_ERROR_AT_LINE does AC_LIBSOURCES([error.h, error.c]). gl_PREREQ_ERROR ]) # Redefine AC_FUNC_ERROR_AT_LINE, because it is no longer maintained in # Autoconf. AC_DEFUN([AC_FUNC_ERROR_AT_LINE], [ AC_LIBSOURCES([error.h, error.c])dnl AC_CACHE_CHECK([for error_at_line], [ac_cv_lib_error_at_line], [AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include <error.h>]], [[error_at_line (0, 0, "", 0, "an error occurred");]])], [ac_cv_lib_error_at_line=yes], [ac_cv_lib_error_at_line=no])]) if test $ac_cv_lib_error_at_line = no; then AC_LIBOBJ([error]) fi ]) # Prerequisites of lib/error.c. AC_DEFUN([gl_PREREQ_ERROR], [ AC_REQUIRE([AC_FUNC_STRERROR_R]) AC_REQUIRE([AC_C_INLINE]) : ]) --- NEW FILE: timespec.m4 --- #serial 14 # Copyright (C) 2000-2001, 2003-2007, 2009-2010 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. dnl From Jim Meyering AC_DEFUN([gl_TIMESPEC], [ dnl Prerequisites of lib/timespec.h. AC_REQUIRE([AC_C_INLINE]) ]) ------------------------------ Message: 2 Date: Wed, 29 Sep 2010 13:24:16 +0000 From: Sam Steingold <sd...@us...> Subject: clisp/src ChangeLog,1.7533,1.7534 NEWS,1.548,1.549 To: cli...@li... Message-ID: <E1P...@sf...> Update of /cvsroot/clisp/clisp/src In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv5536/src Modified Files: ChangeLog NEWS Log Message: implement POSIX:GETDATE using gnulib * Makefile.devel (gnulib-imported): import getdate into syscalls * modules/syscalls/calls.c (tm_to_lisp): extract from STRING-TIME (POSIX:GETDATE, xalloc_die): implement * modules/syscalls/configure.in: call gl_GETDATE Index: NEWS =================================================================== RCS file: /cvsroot/clisp/clisp/src/NEWS,v retrieving revision 1.548 retrieving revision 1.549 diff -u -d -r1.548 -r1.549 --- NEWS 28 Sep 2010 20:40:40 -0000 1.548 +++ NEWS 29 Sep 2010 13:24:14 -0000 1.549 @@ -27,6 +27,9 @@ * New function POSIX:FILE-TREE-WALK calls nftw(). See <http://clisp.cons.org/impnotes/syscalls.html#file-tree-walk> for details. +* New function POSIX:GETDATE calls getdate(). + See <http://clisp.cons.org/impnotes/syscalls.html#getdate> for details + * FFI now converts REALs to FLOATs automatically as necessary. * Bug fixes: Index: ChangeLog =================================================================== RCS file: /cvsroot/clisp/clisp/src/ChangeLog,v retrieving revision 1.7533 retrieving revision 1.7534 diff -u -d -r1.7533 -r1.7534 --- ChangeLog 28 Sep 2010 20:40:40 -0000 1.7533 +++ ChangeLog 29 Sep 2010 13:24:14 -0000 1.7534 @@ -1,5 +1,22 @@ 2010-09-28 Sam Steingold <sd...@gn...> + implement POSIX:GETDATE using gnulib + * Makefile.devel (gnulib-imported): import getdate into syscalls + * modules/syscalls/calls.c (tm_to_lisp): extract from STRING-TIME + (POSIX:GETDATE, xalloc_die): implement + * modules/syscalls/configure.in: call gl_GETDATE + * modules/syscalls/gllib/c-ctype.c, modules/syscalls/gllib/c-ctype.h: + * modules/syscalls/gllib/getdate.h, modules/syscalls/gllib/getdate.y: + * modules/syscalls/gllib/gettext.h, modules/syscalls/gllib/gettime.c: + * modules/syscalls/gllib/timespec.h, modules/syscalls/gllib/xalloc.h: + * modules/syscalls/gllib/xmalloc.c, modules/syscalls/glm4/bison.m4: + * modules/syscalls/glm4/clock_time.m4, modules/syscalls/glm4/error.m4: + * modules/syscalls/glm4/getdate.m4, modules/syscalls/glm4/gettime.m4: + * modules/syscalls/glm4/inline.m4, modules/syscalls/glm4/timespec.m4: + * modules/syscalls/glm4/xalloc.m4: add + +2010-09-28 Sam Steingold <sd...@gn...> + fix bug#3076160: pass the top-level configure arguments --build= & --host= to the module configures * makemake.in (module_configure_flags): ------------------------------ Message: 3 Date: Wed, 29 Sep 2010 13:24:16 +0000 From: Sam Steingold <sd...@us...> Subject: clisp Makefile.devel,1.283,1.284 To: cli...@li... Message-ID: <E1P...@sf...> Update of /cvsroot/clisp/clisp In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv5536 Modified Files: Makefile.devel Log Message: implement POSIX:GETDATE using gnulib * Makefile.devel (gnulib-imported): import getdate into syscalls * modules/syscalls/calls.c (tm_to_lisp): extract from STRING-TIME (POSIX:GETDATE, xalloc_die): implement * modules/syscalls/configure.in: call gl_GETDATE Index: Makefile.devel =================================================================== RCS file: /cvsroot/clisp/clisp/Makefile.devel,v retrieving revision 1.283 retrieving revision 1.284 diff -u -d -r1.283 -r1.284 --- Makefile.devel 28 Sep 2010 19:26:41 -0000 1.283 +++ Makefile.devel 29 Sep 2010 13:24:14 -0000 1.284 @@ -397,8 +397,10 @@ $(GNULIB_COMMON) | tee -a $(GNULIB_IMPORTED_LOG) $(GNULIB_TOOL) --source-base=modules/syscalls/gllib \ --macro-prefix=sc_gl --m4-base=modules/syscalls/glm4 \ - $(GNULIB_AVOID) mktime strftime strptime strverscmp uname \ - strerror | tee -a $(GNULIB_IMPORTED_LOG) + $(GNULIB_AVOID) --avoid=xalloc-die \ + mktime strftime strptime strverscmp uname \ + strerror getdate | tee -a $(GNULIB_IMPORTED_LOG) + $(RM) doc/getdate.texi $(GNULIB_TOOL) --source-base=modules/regexp/gllib \ --macro-prefix=rx_gl --m4-base=modules/regexp/glm4 \ $(GNULIB_AVOID) regex | tee -a $(GNULIB_IMPORTED_LOG) ------------------------------ Message: 4 Date: Wed, 29 Sep 2010 13:24:16 +0000 From: Sam Steingold <sd...@us...> Subject: clisp/modules/syscalls calls.c, 1.315, 1.316 configure.in, 1.92, 1.93 syscalls.xml, 1.134, 1.135 To: cli...@li... Message-ID: <E1P...@sf...> Update of /cvsroot/clisp/clisp/modules/syscalls In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv5536/modules/syscalls Modified Files: calls.c configure.in syscalls.xml Log Message: implement POSIX:GETDATE using gnulib * Makefile.devel (gnulib-imported): import getdate into syscalls * modules/syscalls/calls.c (tm_to_lisp): extract from STRING-TIME (POSIX:GETDATE, xalloc_die): implement * modules/syscalls/configure.in: call gl_GETDATE Index: calls.c =================================================================== RCS file: /cvsroot/clisp/clisp/modules/syscalls/calls.c,v retrieving revision 1.315 retrieving revision 1.316 diff -u -d -r1.315 -r1.316 --- calls.c 28 Sep 2010 18:43:29 -0000 1.315 +++ calls.c 29 Sep 2010 13:24:14 -0000 1.316 @@ -547,6 +547,17 @@ #endif /* HAVE_SYSLOG */ /* ========================== time conversion ========================== */ +/* call ENCODE-UNIVERSAL-TIME on struct tm and timezone */ +static Values tm_to_lisp (struct tm *tm, object timezone) { + pushSTACK(fixnum(tm.tm_sec)); + pushSTACK(fixnum(tm.tm_min)); + pushSTACK(fixnum(tm.tm_hour)); + pushSTACK(fixnum(tm.tm_mday)); + pushSTACK(fixnum(1+tm.tm_mon)); + pushSTACK(fixnum(1900+tm.tm_year)); + pushSTACK(timezone); + funcall(S(encode_universal_time),7); +} DEFUN(POSIX:STRING-TIME, format &optional datum timezone) { /* http://www.opengroup.org/onlinepubs/009695399/functions/strptime.html http://www.opengroup.org/onlinepubs/009695399/functions/strftime.html */ @@ -572,15 +583,7 @@ pushSTACK(TheSubr(subr_self)->name); error(error_condition,GETTEXT("~S: invalid format ~S or datum ~S")); } - pushSTACK(fixnum(tm.tm_sec)); - pushSTACK(fixnum(tm.tm_min)); - pushSTACK(fixnum(tm.tm_hour)); - pushSTACK(fixnum(tm.tm_mday)); - pushSTACK(fixnum(1+tm.tm_mon)); - pushSTACK(fixnum(1900+tm.tm_year)); - pushSTACK(STACK_(0+6)); /* timezone */ - funcall(S(encode_universal_time),7); - /* value1 from ENCODE-UNIVERSAL-TIME */ + tm_to_lisp(&tm,STACK_0); /* set value1 */ value2 = tm.tm_isdst > 0 ? T : NIL; value3 = fixnum(offset); mv_count = 3; @@ -616,6 +619,34 @@ } else error_string_integer(STACK_1); } +nonreturning_function(extern, xalloc_die, (void)) { + pushSTACK(TheSubr(subr_self)->name); + error(storage_condition,GETTEXT("~S: malloc() failed")); +} + +DEFUN(POSIX:GETDATE, timespec &optional timezone) +{ /* http://www.opengroup.org/onlinepubs/009695399/functions/getdate.html */ + struct tm *tm; + getdate_restart: + STACK_1 = check_string(STACK_1); + with_string_0(STACK_1,GLO(misc_encoding),timespec, { + begin_system_call(); + tm = getdate(timespec); + end_system_call(); + }); + if (tm == NULL) { + pushSTACK(NIL); /* no PLACE */ + pushSTACK(fixnum(getdate_err)); + pushSTACK(STACK_(1+2)); + pushSTACK(TheSubr(subr_self)->name); + check_value(error_condition,GETTEXT("~S(~S): getdate error ~S")); + STACK_1 = value1; + goto getdate_restart; + } + tm_to_lisp(tm,STACK_0); + skipSTACK(2); +} + /* ========================== string comparison ========================== */ /* call strverscmp() on STACK_0 & STACK_1 and remove them from STACK */ static /*maygc*/ int string_version_compare (void) { Index: syscalls.xml =================================================================== RCS file: /cvsroot/clisp/clisp/modules/syscalls/syscalls.xml,v retrieving revision 1.134 retrieving revision 1.135 diff -u -d -r1.134 -r1.135 --- syscalls.xml 21 Sep 2010 16:09:48 -0000 1.134 +++ syscalls.xml 29 Sep 2010 13:24:14 -0000 1.135 @@ -821,15 +821,21 @@ <listitem><simpara>Calls <function role="unix">setutxent</function>. </simpara></listitem></varlistentry></variablelist></section> -<section id="strtime"><title>Time conversion</title> -<para><code>(OS:STRING-TIME &fmt-r; &optional-amp; &object-r; timezone)</code> - <itemizedlist><listitem><simpara>When &object-r; is a &string-t;, is is - parsed according to &fmt-r; by <function role="unix">strptime</function>. - </simpara></listitem><listitem><simpara>When it is an &integer-t;, it - is formatted according to &fmt-r; by - <function role="unix">strftime</function>. +<section id="posix-time"><title>Time and Data Conversion</title> +<variablelist><varlistentry id="strtime"><term><code>(OS:STRING-TIME + &fmt-r; &optional-amp; &object-r; timezone)</code></term> + <listitem><itemizedlist><listitem><simpara>When &object-r; is a &string-t;, + it is parsed into a universal time according to &fmt-r; by + <function role="unix">strptime</function>.</simpara></listitem> + <listitem><simpara>When it is an &integer-t;, it is formatted according + to &fmt-r; by <function role="unix">strftime</function>. &object-r; defaults to <code>(&get-universal-time;)</code>. -</simpara></listitem></itemizedlist></para></section> +</simpara></listitem></itemizedlist></listitem></varlistentry> +<varlistentry id="getdate"><term><code>(OS:GETDATE &string-r; + &optional-amp; timezone)</code></term> + <listitem><simpara>Parse the &string-r; into a universal time using + <function role="unix">getdate</function>.</simpara></listitem></varlistentry> +</variablelist></section> <section id="strverscmp"><title>String comparision</title> <para>Functions <simplelist columns="1"> Index: configure.in =================================================================== RCS file: /cvsroot/clisp/clisp/modules/syscalls/configure.in,v retrieving revision 1.92 retrieving revision 1.93 diff -u -d -r1.92 -r1.93 --- configure.in 28 Sep 2010 18:43:29 -0000 1.92 +++ configure.in 29 Sep 2010 13:24:14 -0000 1.93 @@ -57,6 +57,7 @@ gl_FUNC_GNU_STRFTIME gl_FUNC_STRPTIME gl_TIME_MODULE_INDICATOR([strptime]) +gl_GETDATE gl_FUNC_STRVERSCMP gl_STRING_MODULE_INDICATOR([strverscmp]) gl_FUNC_UNAME ------------------------------ Message: 5 Date: Wed, 29 Sep 2010 13:24:16 +0000 From: Sam Steingold <sd...@us...> Subject: clisp/modules/syscalls/gllib c-ctype.c, NONE, 1.1 c-ctype.h, NONE, 1.1 getdate.h, NONE, 1.1 getdate.y, NONE, 1.1 gettext.h, NONE, 1.1 gettime.c, NONE, 1.1 timespec.h, NONE, 1.1 xalloc.h, NONE, 1.1 xmalloc.c, NONE, 1.1 Makefile.am, 1.19, 1.20 To: cli...@li... Message-ID: <E1P...@sf...> Update of /cvsroot/clisp/clisp/modules/syscalls/gllib In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv5536/modules/syscalls/gllib Modified Files: Makefile.am Added Files: c-ctype.c c-ctype.h getdate.h getdate.y gettext.h gettime.c timespec.h xalloc.h xmalloc.c Log Message: implement POSIX:GETDATE using gnulib * Makefile.devel (gnulib-imported): import getdate into syscalls * modules/syscalls/calls.c (tm_to_lisp): extract from STRING-TIME (POSIX:GETDATE, xalloc_die): implement * modules/syscalls/configure.in: call gl_GETDATE --- NEW FILE: c-ctype.h --- /* Character handling in C locale. These functions work like the corresponding functions in <ctype.h>, except that they have the C (POSIX) locale hardwired, whereas the <ctype.h> functions' behaviour depends on the current locale set via setlocale. Copyright (C) 2000-2003, 2006, 2008-2010 Free Software Foundation, Inc. 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 3 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 Publ... [truncated message content] |