bpt/guile.git
14 years agoupdate NEWS, THANKS
Andy Wingo [Thu, 18 Jun 2009 21:02:51 +0000 (23:02 +0200)]
update NEWS, THANKS

* NEWS: Update, but only partially. I wanted to push out this
  incomplete, not yet organized draft for review, if anyone had
  comments. I'll pick it up tomorrow morning.

* THANKS: Add Juhani, whose last name changed?

14 years agoChange guile-readline license to GPLv3+
Neil Jerram [Wed, 17 Jun 2009 21:35:30 +0000 (22:35 +0100)]
Change guile-readline license to GPLv3+

14 years agoComplete changing license to LGPLv3+
Neil Jerram [Wed, 17 Jun 2009 21:30:26 +0000 (22:30 +0100)]
Complete changing license to LGPLv3+

(Still guile-readline to do, but that will all be GPLv3+.)

14 years agoReinstate lines removed by mistake from chars.test
Neil Jerram [Wed, 17 Jun 2009 20:34:38 +0000 (21:34 +0100)]
Reinstate lines removed by mistake from chars.test

14 years agoChange Guile license to LGPLv3+
Neil Jerram [Tue, 16 Jun 2009 23:22:09 +0000 (00:22 +0100)]
Change Guile license to LGPLv3+

(Not quite finished, the following will be done tomorrow.
   module/srfi/*.scm
   module/rnrs/*.scm
   module/scripts/*.scm
   testsuite/*.scm
   guile-readline/*
)

14 years agoUpdate README on using libraries in non-standard locations
Neil Jerram [Sun, 14 Jun 2009 17:41:50 +0000 (18:41 +0100)]
Update README on using libraries in non-standard locations

* README: Update instructions on using libraries in non-standard
  locations.  Also change expected next stable release number from
  1.10.0 to 2.0.0.

14 years agoAdd Tex and texinfo output and auxiliary suffixes to .gitignore
Neil Jerram [Sun, 14 Jun 2009 17:07:01 +0000 (18:07 +0100)]
Add Tex and texinfo output and auxiliary suffixes to .gitignore

14 years agoProvide easier configure options for GMP and readline
Neil Jerram [Sun, 14 Jun 2009 16:58:15 +0000 (17:58 +0100)]
Provide easier configure options for GMP and readline

This patch uses the AC_LIB_LINKFLAGS macro, provided by Gnulib's
havelib module, to provide --with-gmp-prefix and
--with-readline-prefix configure options.  Many thanks to Bruno Haible
for suggesting and explaining this to me.

* configure.in (top level): Add AC_LIB_LINKFLAGS(gmp).

* guile-readline/configure.in (AC_CONFIG_AUX_DIR): Change to
  ../build-aux, to share the main build-aux directory and so avoid
  having to distribute multiple copies of config.rpath.
  (top level): Add AC_LIB_LINKFLAGS(readline).

* lib/Makefile.am, m4/gnulib-cache.m4: Regenerated by gnulib-tool for
  new import of the `havelib' module.

14 years agoFix for make distcheck
Neil Jerram [Sat, 13 Jun 2009 09:45:45 +0000 (10:45 +0100)]
Fix for make distcheck

* examples/Makefile.am (AM_CFLAGS, AM_LIBS): Set PATH so that
  guile-config can find guile.

14 years agoFix `make distcheck'
Neil Jerram [Fri, 12 Jun 2009 22:04:48 +0000 (23:04 +0100)]
Fix `make distcheck'

* libguile/r6rs-ports.c (scm_init_r6rs_ports): Add libguile/ to
  included .x file name.

14 years agoNote Andy as a contributor
Neil Jerram [Thu, 11 Jun 2009 22:24:34 +0000 (23:24 +0100)]
Note Andy as a contributor

14 years agofix defmacro*, defmacro*-public
Andy Wingo [Wed, 10 Jun 2009 08:53:00 +0000 (10:53 +0200)]
fix defmacro*, defmacro*-public

* module/ice-9/boot-9.scm (define-private): Remove apocyphal comment. The
  FIXME would really be to remove `define-private', though...

* module/ice-9/optargs.scm (defmacro*, defmacro*-public): Fix these
  macros. Thanks to Dale Smith for the report.

14 years agobump default stack limit to 160000 words
Andy Wingo [Wed, 10 Jun 2009 08:51:02 +0000 (10:51 +0200)]
bump default stack limit to 160000 words

* libguile/eval.c (scm_debug_opts): Up the default stack limit by a
  factor of 4. Psyntax expansions currently bounce back and forth between
  the VM and the interpreter, due to `map'. (Hopefully that won't be the
  case in the future, when have map in scheme, and we get an inliner.)
  Anyway when expanding a big nested expression, as for example in
  (language ecmascript compile-ghil) -- the pmatch code ends up being
  super-nested -- we can consume loads o stack.

  So given that on desktop machines, where rlimit is likely to be unset,
  default rlimits are around 8 or 10 MB or so, let's bump up our default
  limit to 640KB (on 32-bit). Should be enough for anyone.

  See http://thread.gmane.org/gmane.lisp.guile.devel/8599/focus=8662 for
  more info. Thanks to Mark H. Weaver for the diagnosis!

14 years agofix debug-options
Andy Wingo [Tue, 9 Jun 2009 22:03:52 +0000 (00:03 +0200)]
fix debug-options

* module/ice-9/boot-9.scm (define-option-interface): Fix (debug-options
  'full), along with other options. Thanks to Mark Weaver for the tip.

* THANKS: Update, though many more names need to be added.

14 years agosome attempts to solve the ecmascript stack overflow problem
Andy Wingo [Tue, 9 Jun 2009 21:42:05 +0000 (23:42 +0200)]
some attempts to solve the ecmascript stack overflow problem

* module/language/ecmascript/compile-ghil.scm (comp): Just use pmatch,
  not ormatch. Now with syncase running over everything, it doesn't
  matter.

* module/ice-9/boot-9.scm (false-if-exception): Avoid saving stacks
  inside false-if-exception. There's probably a more general solution to
  this, though. Fixes getting bogus backtraces sometimes.

* module/Makefile.am (ECMASCRIPT_LANG_SOURCES): Reorder things so that
  spec comes last.

14 years agoa start to changing VM scheme copyrights
Andy Wingo [Mon, 8 Jun 2009 20:43:28 +0000 (22:43 +0200)]
a start to changing VM scheme copyrights

* module/language/tree-il/primitives.scm: Change copyright to LGPLv2.1.
  Others will follow.

14 years agopretty-print psyntax-pp.scm
Andy Wingo [Mon, 8 Jun 2009 20:24:15 +0000 (22:24 +0200)]
pretty-print psyntax-pp.scm

* module/ice-9/compile-psyntax.scm: Pretty-print psyntax-pp.scm, given
  that we are going to compile it anyway.

* module/ice-9/psyntax-pp.scm: Regenerated.

14 years agodon't autocompile snarfing m4 docs
Andy Wingo [Mon, 8 Jun 2009 09:44:51 +0000 (11:44 +0200)]
don't autocompile snarfing m4 docs

* doc/ref/Makefile.am (autoconf-macros.texi): Yet another place we
  shouldn't autocompile.

14 years agofix bootstrapping after last night's psyntax patch
Andy Wingo [Sun, 7 Jun 2009 23:04:16 +0000 (01:04 +0200)]
fix bootstrapping after last night's psyntax patch

* module/Makefile.am (ice-9/psyntax-pp.scm): Don't try autocompiling when
  making psyntax-pp.scm.

* module/ice-9/psyntax-pp.scm: Regenerated.

* module/ice-9/psyntax.scm (chi-top): Only affect the compile-time
  environment if modules have booted.

14 years agocall-with-values can make fewer closures
Andy Wingo [Sun, 7 Jun 2009 22:38:49 +0000 (00:38 +0200)]
call-with-values can make fewer closures

* module/language/tree-il.scm: Rename let-exp and letrec-exp to let-body
  and letrec-body. Add <let-values>, a one-expression let-values that
  should avoid the needless creation of two closures in many common
  multiple-value cases. We'll need to add an optimization pass to the
  compiler to produce this form, though, as well as rewriting lambdas
  into lets, etc.

  I added this form instead of adding more special cases to the
  call-with-values compile code because it's a useful intermediate form
  -- it will allow the optimizer to perform constant folding across more
  code.

* module/language/tree-il.scm (parse-tree-il, unparse-tree-il)
  (tree-il->scheme, post-order!, pre-order!): Adapt to let/letrec body
  renaming, and let-values.

* module/language/tree-il/analyze.scm (analyze-lexicals): Adapt for
  renaming, and add cases for let-values.

* module/language/tree-il/compile-glil.scm (flatten): Add a new context,
  `vals', used by let-values code for the values producer. Code that
  produces multiple values can then jump to the let-values MV return
  address directly, instead of trampolining into a procedure. Add code to
  compile let-values.

14 years agofix incorrect inlining of + when + is locally redefined
Andy Wingo [Sat, 6 Jun 2009 22:53:31 +0000 (00:53 +0200)]
fix incorrect inlining of + when + is locally redefined

* libguile/vm-i-scheme.c (FUNC2): Use a signed value for the intermediate
  result here. Not sure what the effect is, though.

* module/ice-9/psyntax.scm (chi-top): Toplevel definitions ensure that
  variables are defined in the current module. Fixes the specific case of
  guile-lib's md5.scm, which redefines + -- this code is needed so that
  we don't incorrectly open-code +.

* module/language/tree-il/primitives.scm (resolve-primitives!): I think
  there were some cases in which vars and names would not resolve
  properly here. Fix those.

14 years agonew instructions: make-int64, make-uint64
Andy Wingo [Sat, 6 Jun 2009 13:45:00 +0000 (15:45 +0200)]
new instructions: make-int64, make-uint64

* doc/ref/vm.texi (Loading Instructions): Remove references to
  load-integer and load-unsigned-integer -- they're still in the VM but
  will be removed at some point.
  (Data Control Instructions): Add make-int64 and make-uint64.

* libguile/vm-i-loader.c (load-unsigned-integer): Allow 8-byte values.
  But this instruction is on its way out, yo.

* libguile/vm-i-system.c (make-int64, make-uint64): New instructions.

* module/language/assembly.scm (object->assembly): Write out make-int64
  and make-uint64 instructions, using bytevectors to do the endianness
  conversion.
  (assembly->object): And pretty-print them back, for disassembly.

* module/language/glil/compile-assembly.scm: Don't generate load-integer
  / load-unsigned-integer instructions.

14 years agofix bug in goops' method cache with rest args
Andy Wingo [Sat, 6 Jun 2009 12:07:29 +0000 (14:07 +0200)]
fix bug in goops' method cache with rest args

* module/oop/goops/compile.scm (code-table-lookup): Fix a tricky little
  bug!

* test-suite/tests/goops.test ("the method cache"): Add a wee test.

14 years agoFix popen.test on NetBSD and Ubuntu Jaunty, where sh is not Bash
Neil Jerram [Fri, 5 Jun 2009 23:08:30 +0000 (00:08 +0100)]
Fix popen.test on NetBSD and Ubuntu Jaunty, where sh is not Bash

Thanks to Greg Troxel for reporting, and Barry Fishman for the
explanation and fix.

* test-suite/tests/popen.test ("open-input-pipe"): Use shell function
  `read' with an explicit argument, as apparently not all shells
  support read with no argument.

14 years agosupport ((@ ...) ...) where the car is a macro
Andy Wingo [Fri, 5 Jun 2009 22:29:05 +0000 (00:29 +0200)]
support ((@ ...) ...) where the car is a macro

* module/ice-9/psyntax.scm (syntax-type): Remove `external-macro', not
  used any more. Take an extra arg, `for-car?', indicating that we're
  checking on the type of a form in the car position. In the case that
  the expression is a pair, do a full recursion on the car, which allows
  us to catch the fact that the car of the following form is a macro:
     ((@ (ice-9 optargs) let-optional) ...)
  and thus the form itself should be macroexpanded.

  But, since we want to distingush `lambda' from `(lambda ...)', just as
  we have global and global-call, we have core to the new `core-form'.

  (chi-top, chi, chi-expr, chi-body, set!): Adapt to changes to
  syntax-type.

14 years agoState and explain dependency on libtool 2.2
Neil Jerram [Thu, 4 Jun 2009 23:06:16 +0000 (00:06 +0100)]
State and explain dependency on libtool 2.2

* HACKING: Updated to recommend libtool 2.2 and anti-recommend libtool
  1.5.26.

14 years agoFix `Mismatching FUNC_NAME' warning from guile-func-name-check
Neil Jerram [Fri, 5 Jun 2009 21:54:45 +0000 (22:54 +0100)]
Fix `Mismatching FUNC_NAME' warning from guile-func-name-check

* libguile/bytevectors.c (FUNC_NAME): Change to match function name.

14 years agoadd ability to compile uniform arrays
Andy Wingo [Fri, 5 Jun 2009 14:31:38 +0000 (16:31 +0200)]
add ability to compile uniform arrays

* module/rnrs/bytevector.scm (rnrs):
* libguile/bytevectors.h:
* libguile/bytevectors.c (scm_uniform_array_to_bytevector): New function.

* libguile/unif.h:
* libguile/unif.c (scm_from_contiguous_typed_array): New function.

* libguile/vm-i-loader.c (load-array): New instruction, for loading byte
  data into uniform vectors. Currently it copies out the data, though in
  the future we could avoid that.

* module/language/assembly.scm (align-code): New exported function,
  aligns code on some boundary.
  (align-program): Use align-code.

* module/language/assembly/compile-bytecode.scm (write-bytecode): Support
  the load-array instruction.

* module/language/glil/compile-assembly.scm (dump-object): Dump uniform
  arrays. Neat :)

14 years agoadd long-object-ref, long-toplevel-ref, long-toplevel-set
Andy Wingo [Fri, 5 Jun 2009 10:08:02 +0000 (12:08 +0200)]
add long-object-ref, long-toplevel-ref, long-toplevel-set

* libguile/vm-i-system.c (long-object-ref, long-toplevel-ref)
  (long-toplevel-set): Add new instructions, for accessing the object
  table with a 16-bit offset. HTMLprag defines a test program that has
  more than 256 constants, necessitating this addition.

* doc/ref/vm.texi: Mention the new instructions.

* module/language/glil/compile-assembly.scm: Emit long refs for object
  tables bigger than 256 entries.

14 years agodisable autocompilation when running guile-tools compile
Andy Wingo [Fri, 5 Jun 2009 09:47:34 +0000 (11:47 +0200)]
disable autocompilation when running guile-tools compile

* module/scripts/compile.scm (compile): Disable autocompilation when
  running guile-tools compile.

14 years agorefactoring for toplevel-ref, toplevel-set, link-now
Andy Wingo [Fri, 5 Jun 2009 09:47:19 +0000 (11:47 +0200)]
refactoring for toplevel-ref, toplevel-set, link-now

* libguile/vm-i-system.c (toplevel-ref, toplevel-set)
* libguile/vm-i-loader.c (link-now):
* libguile/vm.c (resolve_variable): Factor out common code to a static
  method. The compiler can still inline it, so it shouldn't have a
  significant performance effect.

* libguile/vm-engine.c (vm_error_no_such_module): Remove now-unused
  label.

14 years agoadd gperf-generated files to git
Andy Wingo [Fri, 5 Jun 2009 08:56:34 +0000 (10:56 +0200)]
add gperf-generated files to git

* lib/iconv_open-osf.h:
* lib/iconv_open-aix.h:
* lib/iconv_open-hpux.h:
* lib/iconv_open-irix.h: Add to git. Should remove build-time dep on
  gperf; we'll see if this causes problems.

14 years agostamp .go with timestamp of .scm; a fresh go has same mtime of .scm
Andy Wingo [Fri, 5 Jun 2009 08:51:21 +0000 (10:51 +0200)]
stamp .go with timestamp of .scm; a fresh go has same mtime of .scm

* libguile/load.c (compiled_is_fresh): Rename from compiled_is_newer.
  Check that the mtines of the .go and .scm match exactly, so we don't
  get fooled by rsync-like modifications of the filesystem.

* module/system/base/compile.scm (call-with-output-file/atomic): Add
  optional arg, a reference file. If present we utime the output file to
  match the source file, before the rename.
  (compile-file): Stamp the .go file with the timestamp of the .scm.

14 years agocompile and install srfi-98.
Andy Wingo [Fri, 5 Jun 2009 08:32:52 +0000 (10:32 +0200)]
compile and install srfi-98.

* module/Makefile.am (SRFI_SOURCES): Add SRFI-98.

14 years agofinal (?) tweaks to the autocompile code
Andy Wingo [Fri, 5 Jun 2009 08:24:35 +0000 (10:24 +0200)]
final (?) tweaks to the autocompile code

* libguile/load.c (do_try_autocompile): Use module_variable, not
  module_lookup, when resolving compile-file, so we get #f instead of an
  exception if the compiler is in the process of being loaded.
  (scm_primitive_load_path): In what I hope is the last patch to this
  code, recheck the fallback path if we found a stale installed .go file.

14 years agosimplify autocompilation some more
Andy Wingo [Fri, 5 Jun 2009 08:06:39 +0000 (10:06 +0200)]
simplify autocompilation some more

* libguile/load.c (scm_init_load_path): Set the fallback path even if
  GUILE_SYSTEM_COMPILED_PATH is set. Now that we store full paths in the
  autocompiled files, and the path contains the effective Guile version,
  there's no danger of accidental collisions.
  (do_try_autocompile, autocompile_catch_handler, scm_try_autocompile):
  Simplify again -- since there's only one place we put autocompiled
  files, and compile-file finds it itself, there's no need to pass along
  the compiled file path.
  (scm_primitive_load_path): Don't call out to compiled-file-name to get
  the fallback path, as we might not be autocompiling, and besides that
  we need to check if the file exists at all.

* module/system/base/compile.scm (compiled-file-name): Simplify again.
  The auto-compiled path is just fallback path + full source path + .go.

14 years agofurther autocompilation tweaks
Andy Wingo [Thu, 4 Jun 2009 23:20:19 +0000 (01:20 +0200)]
further autocompilation tweaks

* module/system/base/compile.scm (compiled-file-name):
* libguile/load.c (scm_init_load_path, scm_try_autocompile)
  (scm_primitive_load_path): Rework so that we search for .go files in
  the load-compiled path and in the fallback path, but we only
  autocompile to the fallback path. Should produce a more desirable experience.

14 years agopropagate timestamps to installed .scm and .go files
Andy Wingo [Thu, 4 Jun 2009 21:11:55 +0000 (23:11 +0200)]
propagate timestamps to installed .scm and .go files

* am/guilec: Propagate timestamps of .scm and .go files on to their
  installed variants. Helps the is-the-.go-file-stale? code do its job.

14 years agofix .go installation
Andy Wingo [Thu, 4 Jun 2009 10:53:34 +0000 (12:53 +0200)]
fix .go installation

* am/guilec (nobase_ccache_DATA): Fix .go installation.

14 years agoturn off autocompilation when snarfing
Andy Wingo [Thu, 4 Jun 2009 10:47:47 +0000 (12:47 +0200)]
turn off autocompilation when snarfing

* libguile/Makefile.am (snarf2checkedtexi): Turn off autocompilation when
  snarfing.

14 years agofix error autocompiling parts of the compiler; make check works
Andy Wingo [Wed, 3 Jun 2009 21:59:58 +0000 (23:59 +0200)]
fix error autocompiling parts of the compiler; make check works

* libguile/load.c (scm_try_autocompile): Punt if compiled-file-name does
  not resolve, which would indicate that the file in question is part of
  the compiler itself.

* test-suite/tests/elisp.test: Today I was an evil one -- disable
  autocompilation for the elisp tests, as they are meant only for the
  memoizer's eyes. Hopefully Daniel will fix this :-)

14 years agotweaks to autocompile code
Andy Wingo [Wed, 3 Jun 2009 21:20:44 +0000 (23:20 +0200)]
tweaks to autocompile code

* libguile/load.c (compiled_is_newer): Tweak diagnostic output.
  (do_try_autocompile, autocompile_catch_handler, scm_try_autocompile):
  Rework to compute the name of the compiled file in advance. If the
  computed name is different from the found .go file and is fresh, use it
  directly.

  Fixes the case where /usr/lib/.../foo.go is out of date but the user
  doesn't have permissions to recompile, so we use the user's local
  compile cache instead if it's fresh.

  (scm_primitive_load): Pass the found .go file as well to
  scm_try_autocompile.

14 years agoimplement autocompilation
Andy Wingo [Wed, 3 Jun 2009 16:22:39 +0000 (18:22 +0200)]
implement autocompilation

* am/guilec (.scm.go): Set GUILE_AUTO_COMPILE=0 when compiling individual
  files, and remove the mkdir -p as compile-file takes care of that now.

* libguile/load.c (do_try_autocompile, autocompile_catch_handler)
  (scm_try_autocompile, scm_init_load): Implement autocompilation.

* libguile/script.c (scm_shell_usage, scm_compile_shell_switches): Add
  --autocompile / --no-autocompile command-line options, and support for
  the GUILE_AUTO_COMPILE environment variable, defaulting to
  autocompilation enabled.

14 years agoadd exception_on_error optional arg to primitive-load-path
Andy Wingo [Wed, 3 Jun 2009 07:48:16 +0000 (09:48 +0200)]
add exception_on_error optional arg to primitive-load-path

* libguile/init.c (scm_load_startup_files): Use
  scm_c_primitive_load_path.

* libguile/load.c (scm_primitive_load_path): Add an optional arg,
  exception_on_error, which if #f will cause primitive-load-path to just
  return #f if no file is found. This is to help out the semantics of
  try-module-autoload. We can't just catch misc-error, because loading
  the file could raise any exception.
  (scm_c_primitive_load_path): Add the extra arg to
  scm_primitive_load_path.

* libguile/load.h: Adapt scm_primitive_load_path prototype.

* module/ice-9/boot-9.scm (try-module-autoload): Refactor slightly to be
  clearer.

14 years agorefactors to load.c to support auto-compilation
Andy Wingo [Wed, 3 Jun 2009 07:24:35 +0000 (09:24 +0200)]
refactors to load.c to support auto-compilation

* libguile/load.c (compiled_is_newer): Factored out of
  scm_primitive_load_path.
  (scm_try_autocompile): New stub, for autocompiling. Currently just
  returns false.
  (scm_primitive_load_path): Refactor, and call out to
  scm_try_autocompile if the .go is missing or not fresh.

14 years agocompiled-file-name tries to put the .go in the %load-compiled-path
Andy Wingo [Wed, 3 Jun 2009 07:02:48 +0000 (09:02 +0200)]
compiled-file-name tries to put the .go in the %load-compiled-path

* module/system/base/compile.scm (ensure-writable-dir): Rename from
  ensure-directory.
  (dsu-sort): Helper, does a decorate / sort / undecorate.
  (compiled-file-name): Refactor to only return a writable filename. The
  readable case is handled by load.c now, and the other case was silly.
  Hopefully it will do the right thing.
  (load-ensuring-compiled): Remove, load.c will call out to compile-file
  if necessary.
  (ensure-fallback-path): Remove, load.c will add the ~/.guile-ccache dir
  to the load-compiled path, which will prompt its creation if necessary.

14 years agoinstall .go files under $libdir, not $datadir
Andy Wingo [Tue, 2 Jun 2009 20:49:39 +0000 (22:49 +0200)]
install .go files under $libdir, not $datadir

* am/guilec: Install .go files to
  $(pkglibdir)/$GUILE_EFFECTIVE_VERSION/ccache.

14 years agofile-exists? doesn't cause a throw, simpler try-module-autoload
Andy Wingo [Tue, 2 Jun 2009 20:39:30 +0000 (22:39 +0200)]
file-exists? doesn't cause a throw, simpler try-module-autoload

* module/ice-9/boot-9.scm (file-exists?): Change to use the stat
  interface that doesn't throw exceptions.
  (try-module-autoload): Simplify to take advantage of the fact that
  primitive-load-path does the right thing with regards to loading
  compiled files if they are available.

14 years agoupdate uninstalled-env.in for load-compiled path separation
Andy Wingo [Tue, 2 Jun 2009 20:37:24 +0000 (22:37 +0200)]
update uninstalled-env.in for load-compiled path separation

* meta/uninstalled-env.in: Update to set GUILE_LOAD_COMPILED_PATH and
  GUILE_SYSTEM_COMPILED_PATH.

14 years agoadd exception-on-error optional arg to `stat' in scheme
Andy Wingo [Tue, 2 Jun 2009 20:20:21 +0000 (22:20 +0200)]
add exception-on-error optional arg to `stat' in scheme

* libguile/filesys.h:
* libguile/filesys.c (scm_stat): Add optional arg, exception-on-error,
  which if #f (not the default) will just return #f instead of raising an
  exception if the stat fails.

14 years agoseparate the load-compiled path from the load path
Andy Wingo [Tue, 2 Jun 2009 20:18:02 +0000 (22:18 +0200)]
separate the load-compiled path from the load path

* libguile/Makefile.am (libpath.h): Add definitions for SCM_CCACHE_DIR
  and SCM_EFFECTIVE_VERSION. These are private, the header is not
  installed. Add ccachedir to build-info. Rework some other build-info
  definitions.

* libguile/load.c (scm_loc_load_compiled_path): New global, corresponding
  to the new environment variable, GUILE_LOAD_COMPILED_PATH. Compiled
  files will now be searched for in this path, and only in this path.
  (scm_init_load_path): Init the load-compiled path too. We initialize it
  with $pkglibdir/guile/$effective_version/ccache, and also with
  $HOME/.guile-ccache/$effective_version/. This will respect the
  libdir/datadir difference, and it is a preparation for automatic
  compilation support.
  (scm_primitive_load_path): Search only the GUILE_LOAD_COMPILED_PATH for
  compiled files.
  (scm_init_load): Cache scm_loc_load_compiled_path.

14 years agoMerge branch 'master' of git://git.savannah.gnu.org/guile
Julian Graham [Tue, 2 Jun 2009 13:35:02 +0000 (09:35 -0400)]
Merge branch 'master' of git://git.savannah.gnu.org/guile

14 years agoImplementation of SRFI-98 (An interface to access environment variables).
Julian Graham [Thu, 28 May 2009 22:15:05 +0000 (18:15 -0400)]
Implementation of SRFI-98 (An interface to access environment variables).

* NEWS: Add SRFI-98 to 1.8.7 features.

* doc/ref/srfi-modules.text (SRFI-98): Documentation for SRFI-98.

* module/srfi/srfi-98.scm: New file.  SRFI-98 implementation.

* test-suite/tests/srfi-98.test: New file.  SRFI-98 unit tests.

14 years agoMerge branch 'syncase-in-boot-9'
Andy Wingo [Fri, 29 May 2009 14:01:43 +0000 (16:01 +0200)]
Merge branch 'syncase-in-boot-9'

Conflicts:
module/Makefile.am

14 years agoImport R6RS bytevectors and I/O ports from Guile-R6RS-Libs 0.2.
Ludovic Courtès [Wed, 27 May 2009 16:18:07 +0000 (18:18 +0200)]
Import R6RS bytevectors and I/O ports from Guile-R6RS-Libs 0.2.

* README: Document dependency on GNU libunistring.

* benchmark-suite/Makefile.am (SCM_BENCHMARKS): Add
  `benchmark/bytevectors.bm'.

* configure.in: Make sure we have libunistring; update $LIBS.

* libguile.h: Include "bytevectors.h" and "r6rs-ports.h".

* libguile/Makefile.am (libguile_la_SOURCES): Add `bytevectors.c' and
  `r6rs-ports.c'
  (DOT_X_FILES): Add `bytevectors.x' and `r6rs-ports.x'.
  (DOT_DOC_FILES): Add `bytevectors.doc' and `r6rs-ports.doc'.
  (noinst_HEADERS): Add `ieee-754.h'.
  (modinclude_HEADERS): Add `bytevectors.h' and `r6rs-ports.h'

* libguile/validate.h (SCM_VALIDATE_BYTEVECTOR): New macro.

* module/Makefile.am (SOURCES): Add $(RNRS_SOURCES).
  (RNRS_SOURCES): New variable.

* test-suite/Makefile.am (SCM_TESTS): Add `bytevectors.test' and
  `r6rs-ports.test'.

14 years agoUse GNU libunistring and Gnulib modules needed by R6RS bytevectors and ports.
Ludovic Courtès [Wed, 27 May 2009 14:50:40 +0000 (16:50 +0200)]
Use GNU libunistring and Gnulib modules needed by R6RS bytevectors and ports.

* m4/gnulib-cache.m4 (gl_MODULES): Add `byteswap', `iconv_open-utf',
  `libunistring', `striconveh', and `string'.

14 years agoadd tests for #' etc
Andy Wingo [Thu, 28 May 2009 13:01:30 +0000 (15:01 +0200)]
add tests for #' etc

* test-suite/tests/reader.test ("#'"): Add tests for the hash-syntax
  reader macros.

14 years agoadd reader tests for #;
Andy Wingo [Thu, 28 May 2009 12:59:47 +0000 (14:59 +0200)]
add reader tests for #;

* test-suite/tests/reader.test ("#;"): Add reader tests for #;.

14 years agoadd reader support for #; #` #' #, and #,@. fix bug in compile-and-load.
Andy Wingo [Thu, 28 May 2009 12:49:33 +0000 (14:49 +0200)]
add reader support for #; #` #' #, and #,@. fix bug in compile-and-load.

* libguile/read.c (flush_ws, scm_read_commented_expression)
  (scm_read_sharp): Add support for commenting out expressions with #;.
  (scm_read_syntax, scm_read_sharp): Add support for #', #`, #, and #,@.

* module/ice-9/boot-9.scm: Remove #' read-hash extension, which actually
  didn't do anything at all. It's been there since 1997, but no Guile
  code I've ever seen uses it, and it conflicts with #'x => (syntax x)
  from modern Scheme.

* module/system/base/compile.scm (compile-and-load): Whoops, fix a number
  of bugs here.

14 years agoRemove possible deadlock in scm_join_thread_timed
Neil Jerram [Wed, 20 May 2009 20:55:35 +0000 (21:55 +0100)]
Remove possible deadlock in scm_join_thread_timed

* libguile/threads.c (scm_join_thread_timed): Recheck t->exited before
  looping round to call block_self again, in case thread t has now
  exited.

* test-suite/tests/threads.test ("don't hang when joined thread
  terminates in SCM_TICK"): New test.

14 years agoFix wait-condition-variable so that it doesn't leave asyncs blocked
Neil Jerram [Sat, 23 May 2009 16:55:58 +0000 (17:55 +0100)]
Fix wait-condition-variable so that it doesn't leave asyncs blocked

* libguile/threads.c (fat_mutex_unlock): Unblock asyncs when breaking
  out of loop.

* test-suite/tests/threads.test (asyncs-still-working?): New function,
  to test if asyncs are working (i.e. unblocked).  Use this throughout
  threads.test, in particular before and after the "timed locking
  succeeds if mutex unlocked within timeout" test.

14 years agoadjust VM copyright notices to LGPL, use SCM_INTERNAL/API properly
Andy Wingo [Tue, 26 May 2009 20:23:44 +0000 (22:23 +0200)]
adjust VM copyright notices to LGPL, use SCM_INTERNAL/API properly

* libguile/frames.c:
* libguile/frames.h:
* libguile/instructions.c:
* libguile/instructions.h:
* libguile/objcodes.c:
* libguile/objcodes.h:
* libguile/programs.c:
* libguile/programs.h:
* libguile/vm-bootstrap.h:
* libguile/vm-engine.c:
* libguile/vm-engine.h:
* libguile/vm-expand.h:
* libguile/vm-i-scheme.c:
* libguile/vm.c:
* libguile/vm.h: Update to use SCM_API and SCM_INTERNAL correctly. Adjust
  copyright to be the same as the copyright of Guile itself, which should
  be fine given that the FSF holds the whole thing.

14 years agofix backtraces with compiled boot-9
Andy Wingo [Tue, 26 May 2009 19:47:45 +0000 (21:47 +0200)]
fix backtraces with compiled boot-9

* module/ice-9/boot-9.scm (default-pre-unwind-handler): Since we were
  tail-called by pre-unwind-handler-dispatch, we can't use
  pre-unwind-handler-dispatch as a narrowing argument. Instead just
  narrow by one frame.
  (pre-unwind-handler-dispatch): Deprecate.
  (error-catching-loop): Remove crack comment and code, and just use
  default-pre-unwind-handler as our pre-unwind handler.

* module/ice-9/stack-catch.scm (stack-catch):
* module/system/repl/repl.scm (call-with-backtrace): Use
  default-pre-unwind-handler directly.

14 years agognulib-tool --import environ; rely on gnulib for environ definitions
Andy Wingo [Tue, 26 May 2009 16:06:21 +0000 (18:06 +0200)]
gnulib-tool --import environ; rely on gnulib for environ definitions

* libguile/posix.c:
* libguile/stime.c: Remove environ definition, gnulib provides it now.

14 years agosymbols are now hidden unless explicitly exported by SCM_API
Andy Wingo [Tue, 26 May 2009 15:39:58 +0000 (17:39 +0200)]
symbols are now hidden unless explicitly exported by SCM_API

* libguile/__scm.h (SCM_API, SCM_INTERNAL): Take the reverse strategy: symbols will
  be hidden by default, and only exported with SCM_API. In addition to working
  on Mac OS, it has the several nice efficiency benefits on Linux, and unifies
  codepaths with Win32.

* libguile/Makefile.am: Define BUILDING_LIBGUILE when building Guile.

14 years agognulib-tool --import lib-symbol-visibility
Andy Wingo [Tue, 26 May 2009 15:45:48 +0000 (17:45 +0200)]
gnulib-tool --import lib-symbol-visibility

14 years agodistcheck fix, fix (ice-9 time)
Andy Wingo [Tue, 26 May 2009 14:03:37 +0000 (16:03 +0200)]
distcheck fix, fix (ice-9 time)

* lang/Makefile.am (elisp_sources): Add elisp/expand.scm.

* module/ice-9/time.scm (time): Fix for new macro expander. Ew.

14 years agoupdate docs -- sections on assembly and objcode
Andy Wingo [Mon, 25 May 2009 20:45:42 +0000 (22:45 +0200)]
update docs -- sections on assembly and objcode

* doc/ref/api-procedures.texi:
* doc/ref/compiler.texi:
* doc/ref/vm.texi: Update the docs some more.

14 years agoupdate docs, clean up VM vestiges, macro docs, fix (/ a b c)
Andy Wingo [Sun, 24 May 2009 11:09:01 +0000 (13:09 +0200)]
update docs, clean up VM vestiges, macro docs, fix (/ a b c)

* doc/ref/api-procedures.texi (Compiled Procedures): Fix for API changes.

* doc/ref/compiler.texi (Compiling to the Virtual Machine): Replace GHIL
  docs with Tree-IL docs. Update the bits about the Scheme compiler to
  talk about Tree-IL and the expander instead of GHIL. Remove
  <glil-argument>. Add placeholder sections for assembly and bytecode.

* doc/ref/vm.texi: Update examples with what currently happens. Reword
  some things. Fix a couple errors.

* libguile/vm-i-system.c (externals): Remove this instruction, it's not
  used.

* module/ice-9/documentation.scm (object-documentation): If the object is
  a macro, try to return documentation on the macro transformer.

* module/language/assembly/disassemble.scm (disassemble-load-program):
  Fix problem in which we skipped the first element of the object vector,
  because of changes to procedure layouts a few months ago.

* module/language/scheme/spec.scm (read-file): Remove read-file
  definition.

* module/language/tree-il.scm: Reorder exports. Remove <lexical>, it was
  a compat shim to something that was never released. Fix `location'.

* module/language/tree-il/primitives.scm (/): Fix expander for more than
  two args to /.

* module/system/base/compile.scm (read-file-in): Remove unused
  definition.

* module/system/base/language.scm (system): Remove language-read-file.

* module/language/ecmascript/spec.scm (ecmascript): Remove read-file
  definition.

14 years agoRewrite SRFI-35 macros using `syntax-rules'.
Ludovic Courtès [Fri, 22 May 2009 21:44:43 +0000 (23:44 +0200)]
Rewrite SRFI-35 macros using `syntax-rules'.

* module/srfi/srfi-35.scm: Use `(ice-9 syncase)'.
  (define-condition-type, condition): Rewritten using `syntax-rules'.
  (compound-condition, condition-instantiation): New helper internal
  macros.  Thanks to Andy Wingo for his help!

14 years agofix (oop goops) compilation for (language tree-il primitives)
Andy Wingo [Fri, 22 May 2009 19:14:48 +0000 (21:14 +0200)]
fix (oop goops) compilation for (language tree-il primitives)

* module/oop/goops.scm (compile): Whoop-dee, fix up (oop goops) for
  (language tree-il primitives) change.

14 years agosource location tracking in psyntax, booya!
Andy Wingo [Fri, 22 May 2009 19:12:42 +0000 (21:12 +0200)]
source location tracking in psyntax, booya!

* module/ice-9/psyntax.scm (source-annotation): Return #f if
  source-properties returns null.
  (source-wrap): Rework a bit.
  (syntax-type): Don't throw away source info for wrapped expressions.
  Can has source location info, fools!
  (chi-body): Correctly propagate source info for body subforms.
  (syntax): Remove special case for map, it doesn't apply (ahem) for
  Guile.

* module/ice-9/psyntax-pp.scm: Regenerate.

14 years agoremove annotations in psyntax in favor of guile's source properties
Andy Wingo [Fri, 22 May 2009 17:48:14 +0000 (19:48 +0200)]
remove annotations in psyntax in favor of guile's source properties

* module/ice-9/psyntax.scm: Remove references to annotation objects,
  we're just going to try and use Guile's source properties now. It works
  until `syntax' reconstructs output, at which point it seems we lose it.

* module/ice-9/psyntax-pp.scm: Regenerated.

14 years agofix problem naming internal definitions
Andy Wingo [Fri, 22 May 2009 17:26:58 +0000 (19:26 +0200)]
fix problem naming internal definitions

* module/ice-9/psyntax.scm (chi-body): Fix a problem introduced in
  dc1eed52f71, that internal syntax definitions were included in the id
  lis along with value definitions. Only showed up on a second bootstrap.
  Psyntax, how I love thee.

* module/ice-9/psyntax-pp.scm

14 years agomove things to (language tree-il primitives)
Andy Wingo [Fri, 22 May 2009 14:07:41 +0000 (16:07 +0200)]
move things to (language tree-il primitives)

* module/language/tree-il/optimize.scm:
* module/language/tree-il/primitives.scm: Move primitive-related things
  to primitive.scm from inline.scm and optimize.scm.

* module/Makefile.am: Update for inventory changes.

14 years agofix tree-il test to work if source info happens to be present
Andy Wingo [Fri, 22 May 2009 11:00:23 +0000 (13:00 +0200)]
fix tree-il test to work if source info happens to be present

* module/language/tree-il/compile-glil.scm (flatten-lambda): Fix source
  emission.

* test-suite/tests/tree-il.test (strip-source): Strip source info on
  tree-il before compiling, so we don't get extraneous source info in the
  glil. Make check passes!

14 years agofix bad call to make-glil-src
Andy Wingo [Fri, 22 May 2009 10:48:45 +0000 (12:48 +0200)]
fix bad call to make-glil-src

* module/language/tree-il/compile-glil.scm (flatten-lambda): Fix bad call
  to make-glil-src, unfortunately not hit during production because
  psyntax doesn't yet understand source locations.

14 years agofix expansion of (ice-9 threads)
Andy Wingo [Fri, 22 May 2009 10:45:49 +0000 (12:45 +0200)]
fix expansion of (ice-9 threads)

* module/ice-9/threads.scm: Move syntax definitions before the procedures
  that use them, and rewrite as hygienic macros since they are so much
  nicer that way. Fixes the thread tests.

14 years agosyntax.test is passing, yay
Andy Wingo [Fri, 22 May 2009 10:22:39 +0000 (12:22 +0200)]
syntax.test is passing, yay

* test-suite/tests/syntax.test ("top-level define"): Remove the test for
  currying, as we don't do that any more by default. It should be easy
  for the user to add in if she wants it, though.
  ("do"): Remove unmemoization tests, as sc-expand fully expands `do'.
  ("while"): Remove while tests in empty environments. They have been
  throwing 'unresolved, and the problem they seek to test is fully
  handled by hygiene anyway.

  And otherwise tweak expected exception strings, and everything passes!

14 years agoresidualize names into procedures. re-implement srfi-61. module naming foo.
Andy Wingo [Fri, 22 May 2009 10:08:50 +0000 (12:08 +0200)]
residualize names into procedures. re-implement srfi-61. module naming foo.

* module/ice-9/boot-9.scm (cond): Implement srfi-61; most of the code is
  from the SRFI itself. Yuk.
  (%print-module, make-modules-in, %app, (%app modules))
  (module-name): Syncase needs to get at the names of modules, even at
  anonymous modules. So lazily assign gensyms as module names. Name %app
  as (%app), but since (%app modules) is at the top of the module
  hierarchy, name it ().

* module/ice-9/psyntax.scm: When building tree-il, try to name lambdas in
  definitions and in lets.
  (let, letrec): Give more specific errors in a couple of cases.

* module/ice-9/psyntax-pp.scm: Regenerated.

* test-suite/tests/syntax.test: More work. Many exceptions have different
  messages than they used to, many more generic; we can roll this back to
  be faithful to the original strings, but it doesn't seem necessary to
  me.

15 years agosome work on syntax.test
Andy Wingo [Thu, 21 May 2009 20:43:07 +0000 (22:43 +0200)]
some work on syntax.test

* module/language/tree-il.scm (tree-il->scheme):
* module/ice-9/psyntax.scm (build-conditional): Attempt to not generate
  (if #f #f) as the second arm of an if, but it doesn't seem to be
  successful.

* module/ice-9/psyntax-pp.scm (syntax-rules): Regenerate.

* test-suite/tests/syntax.test (exception:unexpected-syntax): Change
  capitalization.
  ("unquote-splicing"): Update test.
  ("begin"): Add in second arms on these ifs, to avoid the strange though
  harmless expansion of `if'.
  (matches?): New helper macro.
  ("lambda"): Match on lexically bound symbols, as they will be
  alpha-renamed.

15 years agocatch syntax errors in unquote and unquote-splicing
Andy Wingo [Thu, 21 May 2009 20:11:48 +0000 (22:11 +0200)]
catch syntax errors in unquote and unquote-splicing

* module/ice-9/psyntax.scm (quasiquote): Catch syntax errors in unquote
  and unquote-splicing.

* module/ice-9/psytax-pp.scm: Regenerated.

15 years agofix multiple values returning from srfi-18's `with-exception-handler'
Andy Wingo [Thu, 21 May 2009 19:39:37 +0000 (21:39 +0200)]
fix multiple values returning from srfi-18's `with-exception-handler'

* module/srfi/srfi-18.scm (with-exception-handler): Hah! Fixed a
  scurrilous bug in which we assumed that the thunk returned one or more
  values. Hah.

15 years agofix apply and call/cc in drop contexts
Andy Wingo [Thu, 21 May 2009 19:13:24 +0000 (21:13 +0200)]
fix apply and call/cc in drop contexts

* module/language/tree-il/compile-glil.scm (flatten): Actually apply only
  needs one arg after the proc. And shit, call/cc and apply in drop
  contexts also need to be able to return arbitrary numbers of values;
  work it by trampolining through their applicative (non-@) definitions.
  Also, simplify the single-valued drop case to avoid the
  truncate-values.

* module/language/tree-il/inline.scm (call/cc):
* module/language/tree-il/optimize.scm (*interesting-primitive-names*):
  Define call/cc as "interesting". Perhaps we should be hashing on value
  and not on variable.

* test-suite/tests/tree-il.test ("application"): Fix up test for new,
  sleeker output. (Actually the GLIL is more verbose, but the assembly is
  better.)
  ("apply", "call/cc"): Add some more tests.

15 years agoprocedures in "drop" contexts can return unspecified values
Andy Wingo [Thu, 21 May 2009 15:22:58 +0000 (17:22 +0200)]
procedures in "drop" contexts can return unspecified values

* module/language/tree-il/compile-glil.scm (flatten): For applications in
  "drop" context, allow the procedure to return unspecified values
  (including 0 values).

* test-suite/tests/tree-il.test ("application"): Adapt test.

* module/srfi/srfi-18.scm (wrap): Clarify.

* test-suite/tests/srfi-18.test: Fix so that the expression importing
  srfi-18 is expanded before the tests. However the tests are still
  failing, something about 0-valued returns...

15 years agofix srfi-17.test
Andy Wingo [Thu, 21 May 2009 14:04:14 +0000 (16:04 +0200)]
fix srfi-17.test

* test-suite/tests/srfi-17.test (exception:bad-quote): Change the
  expected exception for (set! (quote foo) ...) errors.

15 years agojust parse method arguments once.
Andy Wingo [Thu, 21 May 2009 13:34:29 +0000 (15:34 +0200)]
just parse method arguments once.

* module/oop/goops.scm (method): Tweak to just run through the arguments
  once. Thanks to Eli Barzilay for the tip.

15 years agorewrite `method' as a hygienic macro to re-allow lexical specializers
Andy Wingo [Thu, 21 May 2009 11:49:00 +0000 (13:49 +0200)]
rewrite `method' as a hygienic macro to re-allow lexical specializers

* module/oop/goops.scm (method): Reimplement as a hygienic macro. This
  seriously took me like 6 hours to figure out. Allows for lexical
  specializers: (let ((<x> ...)) (define-method (foo (arg <x>)) ...)).

* module/oop/goops/compile.scm (next-method?, compile-make-procedure):
  Remove these, as `method' does it all now, hygienically.

15 years agoMake use of Gnulib's `flock' module.
Ludovic Courtès [Wed, 20 May 2009 23:24:01 +0000 (01:24 +0200)]
Make use of Gnulib's `flock' module.

* libguile/posix.c: Always use <sys/file.h>, which is provided by
  Gnulib.
  (flock)[__MINGW32__]: Remove.
  (scm_flock): Compile unconditionally.  Always use Gnulib's flock(2).

15 years agoMake use of Gnulib's `putenv' module.
Ludovic Courtès [Wed, 20 May 2009 23:17:00 +0000 (01:17 +0200)]
Make use of Gnulib's `putenv' module.

* libguile/posix.c: Include <stdlib.h> since the putenv(3) declaration
  is there (POSIX and Gnulib).
  (scm_putenv): Rely on Gnulib's `putenv' module.

15 years agoAdd Gnulib portability modules; update Gnulib files.
Ludovic Courtès [Wed, 20 May 2009 23:00:41 +0000 (01:00 +0200)]
Add Gnulib portability modules; update Gnulib files.

* m4/gnulib-cache.m4 (gl_MODULES): Add `flock' (provides flock(2)
  declaration and implementation), `fpieee' (fixes floating point
  behavior on Alpha and SH), `stdlib' (provides an unsetenv(3)
  declaration, among others), `putenv' (provides a putenv(3) declaration
  and implementation with the semantics we need).

15 years agoUpdate `NEWS'.
Ludovic Courtès [Mon, 11 May 2009 22:12:18 +0000 (00:12 +0200)]
Update `NEWS'.

15 years agoSymbols longer than 128 chars can cause an exception. Also, the terminating colon...
Michael Gran [Sat, 25 Apr 2009 05:23:13 +0000 (22:23 -0700)]
Symbols longer than 128 chars can cause an exception.  Also, the terminating colon of long postfix keywords are not handled correctly.

* test-suite/tests/reader.test ("read-options"): Add test
for long postfix keywords.

* libguile/read.c (scm_read_mixed_case_symbol): Fix
exception on symbols are greater than 128 chars.  Also,
colons are not stripped from long postfix keywords.

15 years agoUpdate `NEWS' wrt. `branch_release-1-8'.
Ludovic Courtès [Wed, 20 May 2009 22:16:47 +0000 (00:16 +0200)]
Update `NEWS' wrt. `branch_release-1-8'.

15 years agoFix compilation of `test-round.c' on BSD.
Ludovic Courtès [Mon, 11 May 2009 20:13:29 +0000 (22:13 +0200)]
Fix compilation of `test-round.c' on BSD.

* test-suite/standalone/test-round.c (HAVE_MACHINE_FPU_H): Include
  <sys/types.h> when available.  This fixes compilation on NetBSD.
  Reported by Greg Toxel.

15 years agoUpdate `NEWS'.
Ludovic Courtès [Thu, 23 Apr 2009 22:44:43 +0000 (00:44 +0200)]
Update `NEWS'.

15 years agoDon't use raw divisions by zero in `test-conversion.c'.
Ludovic Courtès [Thu, 23 Apr 2009 21:20:59 +0000 (23:20 +0200)]
Don't use raw divisions by zero in `test-conversion.c'.

* test-suite/standalone/test-conversion.c (ieee_init): New function.
  (guile_Inf, guile_NaN): New variables.
  (test_from_double, test_to_double): Use them.  Divisions by zero made
  `cc' on Tru64 5.1b ("Compaq C V6.5-011") bail out and led to a
  floating point exception when compiled with GCC on the same platform.
  (main): Call `ieee_init ()'.

15 years agoUse <machine/fpu.h> instead of <fenv.h> when needed (e.g., Tru64 5.1b).
Ludovic Courtès [Thu, 23 Apr 2009 20:51:27 +0000 (22:51 +0200)]
Use <machine/fpu.h> instead of <fenv.h> when needed (e.g., Tru64 5.1b).

* configure.in: Look for <machine/fpu.h>.

* test-suite/standalone/test-round.c: Use <machine/fpu.h> if available.

15 years agoWork around lack of cuserid(3) declaration on Tru64 5.1b.
Ludovic Courtès [Thu, 23 Apr 2009 20:24:32 +0000 (22:24 +0200)]
Work around lack of cuserid(3) declaration on Tru64 5.1b.

* configure.in: Check for a cuserid(3) declaration.

* libguile/posix.c [HAVE_CUSERID][!HAVE_DECL_CUSERID]: Provide a
  declaration.

15 years agoWork around the lack of hstrerror(3) declaration on Tru64.
Ludovic Courtès [Wed, 22 Apr 2009 22:28:32 +0000 (00:28 +0200)]
Work around the lack of hstrerror(3) declaration on Tru64.

* configure.in: Look for the declaration of hstrerror(3).

* libguile/net_db.c: Add hstrerror(3) declaration if
  `HAVE_DECL_HSTRERROR' is undefined.