summaryrefslogtreecommitdiff
path: root/libguile/guile.c
Commit message (Collapse)AuthorAgeFilesLines
* Don't force installation of GMP allocators in guile shellAndy Wingo2021-03-121-1/+0
| | | | | | * libguile/guile.c (main): Don't override initial setting of scm_install_gmp_memory_functions. Thanks to Andrew Whatson for the fix.
* Replace libltdl with raw dlopen, dlsymAndy Wingo2021-02-031-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * NEWS: Update. * am/bootstrap.am (SOURCES): * module/Makefile.am (SOURCES): Add system/foreign-library.scm. * configure.ac: Replace ltdl check with -ldl check. * libguile/dynl.c: Rewrite to just expose core dlopen / dlsym / etc to a helper Scheme module. (scm_dynamic_link, scm_dynamic_pointer, scm_dynamic_function) (scm_dynamic_object_p, scm_dynamic_call): Rewrite in terms of (system foreign-library). * libguile/extensions.c (load_extension): Avoid scm_dynamic_call. * module/system/foreign-library.scm: New file. * module/oop/goops.scm (<dynamic-object>): Hackily export <foreign-library> instead of a class here. * doc/ref/api-foreign.texi (Foreign Function Interface): Rewrite to only document the new interfaces. Eventually we will deprecate dynamic-link and friends. * doc/ref/guile.texi (API Reference): Move Foreign Objects after Foreign Function Interface. Seems there should be some closer relationship but this will do for now. * doc/ref/tour.texi (Putting Extensions into Modules): * doc/ref/libguile-parallel.texi (Parallel Installations): Update for rename of Modules and Extensions to Foreign Extensions. * libguile/deprecated.h: * libguile/deprecated.c (scm_dynamic_unlink): Deprecate. * libguile/guile.c: Remove ltdl include. * test-suite/tests/foreign.test: Update tests to use new API, and update error expectations.
* Replace a line which was accidentally removed.Asher Gordon2021-01-171-0/+1
| | | | | | | | | | | | The line, part of the sentence above it in a comment, was accidentally removed in commit b8d757732fae7c396d58327185f94e5d90846445 "Rationalize include order in C files". * libguile/guile.c: restore missing line. [rlb@defaultvalue.org: augment commit message; add THANKS] Closes: 42331
* Update license notices in all C filesAndy Wingo2018-06-201-17/+17
| | | | | Update to newest recommended license notices from the FSF. Everything stays LGPLv3+ except guile-readline which is GPLv3+.
* Remove (C) from copyright statementsAndy Wingo2018-06-201-1/+1
| | | | | | As the FSF advises, 'There is no legal significance to using the three-character sequence “(C)”, but it does no harm.' It does take up space though! For that reason, we remove it here from our C files.
* Rationalize include order in C filesAndy Wingo2018-06-201-1/+0
| | | | | Include config.h first, then system includes, then libguile includes, in alphabetical order, then the include for the file in question.
* Make libguile header inclusion consistent within libguile c filesAndy Wingo2018-06-201-8/+2
| | | | | Change from '#include "libguile/foo.h"' and '#include <libguile/foo.h>' to '#include "foo.h"'.
* Remove Emacs local variables comments in Guile sourceAndy Wingo2018-06-201-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The .dir-locals.el file in the repository is sufficient for Emacs users. * libguile/__scm.h: * libguile/alist.c: * libguile/alist.h: * libguile/array-handle.c: * libguile/array-handle.h: * libguile/array-map.c: * libguile/array-map.h: * libguile/arrays.c: * libguile/arrays.h: * libguile/async.c: * libguile/async.h: * libguile/backtrace.c: * libguile/backtrace.h: * libguile/bitvectors.c: * libguile/bitvectors.h: * libguile/boolean.c: * libguile/boolean.h: * libguile/chars.c: * libguile/chars.h: * libguile/chooks.c: * libguile/chooks.h: * libguile/continuations.c: * libguile/continuations.h: * libguile/control.c: * libguile/conv-integer.i.c: * libguile/debug-malloc.h: * libguile/debug.c: * libguile/debug.h: * libguile/deprecation.c: * libguile/deprecation.h: * libguile/dynl.c: * libguile/dynl.h: * libguile/dynstack.c: * libguile/dynstack.h: * libguile/dynwind.c: * libguile/dynwind.h: * libguile/eq.c: * libguile/eq.h: * libguile/error.c: * libguile/error.h: * libguile/eval.c: * libguile/eval.h: * libguile/evalext.c: * libguile/evalext.h: * libguile/expand.c: * libguile/expand.h: * libguile/extensions.c: * libguile/extensions.h: * libguile/feature.c: * libguile/feature.h: * libguile/filesys.c: * libguile/filesys.h: * libguile/fluids.c: * libguile/fluids.h: * libguile/foreign.c: * libguile/fports.c: * libguile/fports.h: * libguile/frames.c: * libguile/frames.h: * libguile/gc-inline.h: * libguile/gc.c: * libguile/gc.h: * libguile/generalized-arrays.c: * libguile/generalized-arrays.h: * libguile/generalized-vectors.c: * libguile/generalized-vectors.h: * libguile/gettext.c: * libguile/gettext.h: * libguile/goops.c: * libguile/goops.h: * libguile/gsubr.c: * libguile/gsubr.h: * libguile/guardians.c: * libguile/guardians.h: * libguile/guile.c: * libguile/hash.c: * libguile/hash.h: * libguile/hashtab.c: * libguile/hashtab.h: * libguile/hooks.c: * libguile/hooks.h: * libguile/i18n.c: * libguile/i18n.h: * libguile/init.c: * libguile/init.h: * libguile/instructions.c: * libguile/instructions.h: * libguile/intrinsics.c: * libguile/intrinsics.h: * libguile/ioext.c: * libguile/ioext.h: * libguile/iselect.h: * libguile/keywords.c: * libguile/keywords.h: * libguile/list.c: * libguile/list.h: * libguile/load.c: * libguile/load.h: * libguile/loader.c: * libguile/loader.h: * libguile/macros.c: * libguile/macros.h: * libguile/mallocs.c: * libguile/mallocs.h: * libguile/memmove.c: * libguile/memoize.c: * libguile/memoize.h: * libguile/modules.c: * libguile/modules.h: * libguile/net_db.c: * libguile/net_db.h: * libguile/null-threads.c: * libguile/null-threads.h: * libguile/numbers.c: * libguile/numbers.h: * libguile/objprop.c: * libguile/objprop.h: * libguile/options.c: * libguile/options.h: * libguile/pairs.c: * libguile/pairs.h: * libguile/poll.c: * libguile/poll.h: * libguile/ports.c: * libguile/ports.h: * libguile/posix.c: * libguile/posix.h: * libguile/print.c: * libguile/print.h: * libguile/procprop.c: * libguile/procprop.h: * libguile/procs.c: * libguile/procs.h: * libguile/programs.c: * libguile/programs.h: * libguile/promises.c: * libguile/promises.h: * libguile/pthread-threads.h: * libguile/random.c: * libguile/random.h: * libguile/rdelim.c: * libguile/rdelim.h: * libguile/read.c: * libguile/read.h: * libguile/regex-posix.c: * libguile/regex-posix.h: * libguile/rw.c: * libguile/rw.h: * libguile/scmsigs.c: * libguile/scmsigs.h: * libguile/script.c: * libguile/script.h: * libguile/simpos.c: * libguile/simpos.h: * libguile/smob.c: * libguile/smob.h: * libguile/snarf.h: * libguile/socket.c: * libguile/socket.h: * libguile/sort.c: * libguile/sort.h: * libguile/srcprop.c: * libguile/srcprop.h: * libguile/stackchk.c: * libguile/stackchk.h: * libguile/stacks.c: * libguile/stacks.h: * libguile/stime.c: * libguile/stime.h: * libguile/strerror.c: * libguile/strings.c: * libguile/strings.h: * libguile/strorder.c: * libguile/strorder.h: * libguile/strports.c: * libguile/strports.h: * libguile/struct.c: * libguile/struct.h: * libguile/symbols.c: * libguile/symbols.h: * libguile/syntax.c: * libguile/syscalls.h: * libguile/tags.h: * libguile/threads.c: * libguile/threads.h: * libguile/throw.c: * libguile/throw.h: * libguile/trees.h: * libguile/unicode.c: * libguile/unicode.h: * libguile/uniform.c: * libguile/uniform.h: * libguile/values.c: * libguile/values.h: * libguile/variable.c: * libguile/variable.h: * libguile/vectors.c: * libguile/vectors.h: * libguile/version.c: * libguile/vm-engine.c: * libguile/vm-expand.h: * libguile/vm.c: * libguile/vm.h: * libguile/vports.c: * libguile/vports.h: * libguile/weak-list.h: * libguile/weak-set.c: * libguile/weak-set.h: * libguile/weak-table.c: * libguile/weak-table.h: * libguile/weak-vector.c: * libguile/weak-vector.h: Remove needless trailing comments.
* Remove <stdio.h> from ports.hAndy Wingo2018-06-191-2/+3
| | | | | | | | | | * libguile/ports.h: Remove <stdio.h>. * libguile/finalizers.c: * libguile/guile.c: * libguile/memoize.c: * libguile/srfi-14.c: * libguile/vm.c: Add <stdio.h>. * libguile/struct.c: Add <stdarg.h>.
* Remove nonfunctional gdb interfaceAndy Wingo2013-11-271-6/+0
| | | | | | | | | | | | * libguile/gdb_interface.h: * libguile/gdbint.c: * libguile/gdbint.h: Remove. These were last modified significantly in 1997 and I think they are unused. * libguile/guile.c: Remove use. * libguile.h: Remove inclusion. * libguile/Makefile.am: Remove reference. * libguile/init.c: Remove use.
* Merge remote-tracking branch 'origin/stable-2.0'Mark H Weaver2013-03-281-5/+31
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure.ac libguile/deprecated.c libguile/deprecated.h libguile/filesys.h libguile/fluids.c libguile/fports.c libguile/gc.c libguile/guile.c libguile/numbers.c libguile/objcodes.c libguile/r6rs-ports.c libguile/smob.c libguile/socket.c libguile/threads.h module/language/scheme/decompile-tree-il.scm module/language/tree-il/peval.scm test-suite/tests/syncase.test
| * Install the current locale if GUILE_INSTALL_LOCALE is nonzero.Ludovic Courtès2013-03-071-2/+39
| | | | | | | | | | | | | | | | * libguile/guile.c (get_integer_from_environment) (should_install_locale): New functions. (main): Add `setlocale' call. * doc/ref/guile-invoke.texi (Environment Variables): Add documentation.
* | Merge remote-tracking branch 'origin/stable-2.0'Andy Wingo2011-12-021-0/+1
|\ \ | |/ | | | | | | | | Conflicts: libguile/guile.c libguile/numbers.c
| * install gmp memory functions that let libgc know about allocationsAndy Wingo2011-12-021-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * libguile/numbers.c (custom_gmp_malloc, custom_gmp_realloc, custom_gmp_free): New static functions used by GMP for allocation. These are just wrappers for scm_malloc, scm_realloc, and free. (scm_init_numbers): If scm_install_gmp_memory_functions is nonzero, use mp_set_memory_functions to configure GMP to use custom_gmp_{malloc,realloc,free} for memory allocation. (scm_bigprint): Ask gmp for the function used to deallocate the string returned by mpz_get_str. * libguile/numbers.h: Declare scm_install_gmp_memory_functions. * libguile/guile.c: When running the Guile binary, install the gmp_memory_functions. Based on a patch by Mark H Weaver <mhw@netris.org>.
* | Install the current locale when Guile is invoked directly.Ludovic Courtès2011-11-221-2/+12
|/ | | | * libguile/guile.c (main): Add `setlocale' call.
* Change Guile license to LGPLv3+Neil Jerram2009-06-171-6/+7
| | | | | | | | | | (Not quite finished, the following will be done tomorrow. module/srfi/*.scm module/rnrs/*.scm module/scripts/*.scm testsuite/*.scm guile-readline/* )
* Remove useless references to Libtool's `dlpreopen' mechanism.Ludovic Courtès2008-12-071-3/+0
| | | | | | | | | | * libguile/Makefile.am (guile_LDFLAGS): Remove `@DLPREOPEN@' since it has no effect. * libguile/guile.c (main): Don't invoke `LTDL_SET_PRELOADED_SYMBOLS ()' since it had no effect given how we invoke `libtool'. It also fixes compatibility issues when using libltdl 1.5 with a Libtool 2.2 package.
* Use orthodox libtoology in `guile'.Ludovic Courtès2008-11-241-4/+2
| | | | | * libguile/guile.c (main): Use `LTDL_SET_PRELOADED_SYMBOLS ()' instead of our own trick.
* Include <config.h> in all C files; use `#ifdef HAVE_CONFIG_H' rather than `#if'.Ludovic Courtès2008-09-131-1/+1
|
* merge from 1.8 branchKevin Ryde2006-04-171-1/+1
|
* The FSF has a new address.Marius Vollmer2005-05-231-1/+1
|
* * Makefile.am (INCLUDES): Use @LTDLINC@ instead ofMarius Vollmer2004-10-221-3/+3
| | | | | | | | | | "-I$(top_srcdir)/libguile-ltdl". (libguile_la_LIBADD): Use @LIBLTDL@ instead of "../libguile-ltdl/libguile-ltdl.a". * guile.c, dynl.c: Switched to using libltdl directly. Replaced all references to scm_lt_* with just lt_*. Include <ltdl.h> instead of <libguile-ltdl.h>.
* * Removed uses of DEBUG_EXTENSIONS and DYNAMIC_LINKING toDirk Herrmann2003-04-201-3/+1
| | | | fix compile errors with --disable-deprecated.
* Changed license terms to the plain LGPL thru-out.Marius Vollmer2003-04-051-36/+12
|
* * guile.c: #include <config.h> if HAVE_CONFIG_H.Rob Browning2003-03-251-0/+4
|
* * guile.c (main): change to call scm_lt_dlpreload_default and passRob Browning2002-10-091-1/+3
| | | | | in lt_preloaded_symbols, a value libtool automagically adds to the binary.
* * guile.c (main): switch to scm_lt_dlset_preloaded_symbols;Rob Browning2002-10-051-2/+2
|
* No need to check for Cygwin when including <winsock2.h>, this isMarius Vollmer2002-07-101-2/+1
| | | | already check for by configure. Thus, revert change from 2002-07-07.
* Do not include <winsock2.h> on Cygwin even when we have it.Marius Vollmer2002-07-071-1/+2
|
* 2001-11-04 Stefan Jahn <stefan@lkcc.org>Stefan Jahn2001-11-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * NEWS: Corrected remarks about SCM_API. * configure.in: Defining USE_DLL_IMPORT definition to indicate usage of DLL import macros in `libguile/__scm.h'. (LIBOBJS): Removed `fileblocks.o' from the list of object files. Somehow Jim Blandy's patch from 1997 did not survive. 2001-11-04 Stefan Jahn <stefan@lkcc.org> * configure.in (EXTRA_DEFS): Follow-up patch. Using SCM_IMPORT instead of __SCM_IMPORT__. * readline.c (scm_readline_init_ports): Disable input/output stream redirection for Win32. The readline package for Win32 does not support this. The guile-readline library works fine for command line editing. * readline.h (SCM_RL_API): Renamed __FOO__ macros into FOO. 2001-11-04 Stefan Jahn <stefan@lkcc.org> * Makefile.am (libguile_la_LIBADD): Added $(THREAD_LIBS_LOCAL) here (was at guile_LDADD) which describes the dependency correctly and allows a clean build on Win32. * __scm.h (SCM_API): Follow-up patch. Renamed __FOO__ macros into FOO. * __scm.h: USE_DLL_IMPORT indicates the usage of the DLL import macros for external libraries (libcrypt, libqthreads, libreadline and libregex). * coop-defs.h: Include <winsock2.h> for `struct timeval'. * posix.c (flock): Added support for flock() in M$-Windows. * guile.c (SCM_IMPORT): Follow-up patch. Use SCM_IMPORT instead of __SCM_IMPORT__. * fports.c (getflags): Differentiate reading and writing pipes descriptors. * filesys.c (S_IS*): Redefine all of the S_IS*() macros for M$-Windows. * coop.c (coop_condition_variable_timed_wait_mutex): Use conditionalized error code if `ETIMEDOUT' is not available. (scm_thread_usleep): Remove bogus declaration of `struct timeval timeout'. * numbers.c (PTRDIFF_MIN): Moved this definition where it actually belongs. That is because NO_PREPRO_MAGIC gets undefined after each inclusion of `num2integral.i.c'. (SIZE_MAX): Define NO_PREPRO_MAGIC if SIZE_MAX is undefined. 2001-11-04 Stefan Jahn <stefan@lkcc.org> * md/Makefile.am (EXTRA_DIST): Added `i386.asm'. * md/i386.asm: New file. Contains the Intel syntax version for nasm/tasm/masm of the file `i386.s'. * qt.h.in: Definition of QT_API, QT_IMPORT and QT_EXPORT. Prefixed each symbols which is meant to go into a DLL. * Makefile.am (libqthreads_la_LDFLAGS): Put `-no-undefined' into LDFLAGS to support linkers which do not allow unresolved symbols inside shared libraries. (EXTRA_DIST): Add `libqthreads.def', which is an export file definition for M$-Windows. It defines exported symbols. This is necessary because the M$VC linker does not know how to export assembler symbols into a DLL. 2001-11-04 Stefan Jahn <stefan@lkcc.org> * srfi-13.h, srfi-14.h, srfi-4.h: Follow-up patch. Renamed __FOO__ macros into FOO. 2001-11-04 Stefan Jahn <stefan@lkcc.org> * tests/ports.test: Run (close-port) before (delete-file) if necessary/advisory.
* Make sure to define __SCM_IMPORT__ for shared libraryMarius Vollmer2001-11-021-1/+4
| | | | build on Win32. Disable preloaded symbols on Win2 platforms.
* Make compilation under Windows easier.Martin Grabmüller2001-06-261-0/+15
|
* * Introduce SCM_UNUSED and mark unused function parameters.Dirk Herrmann2001-06-071-2/+2
| | | | | * Introduce SCM_DEBUG_PAIR_ACCESSES. * Extend the possibilities of SCM_DEBUG_CELL_ACCESSES.
* Updated copyrightsMikael Djurfeldt2000-06-121-1/+1
|
* * Makefile.am (DEFS): Added. automake adds -I options to DEFS,Mikael Djurfeldt2000-04-211-2/+2
| | | | | | | | | | and we don't want that. (INCLUDES): Removed all -I options except for the root source directory and the root build directory. * *.*: Change includes so that they always use the "prefixes" libguile/, qt/, guile-readline/, or libltdl/. (Thanks to Tim Mooney.)
* * *.[hc]: add Emacs magic at the end of file, to ensure GNUMichael Livshin2000-03-191-0/+6
| | | | indentation style.
* * guile.c: register preloaded modulesMarius Vollmer2000-01-101-0/+10
|
* * Lots of files: New address for FSF.Jim Blandy1997-05-261-3/+3
|
* Move most of the guts of shell command processing into libguile,Jim Blandy1997-04-191-0/+68
so guile.c can be very small (and eventuallly auto-generated. (I mean, generated mechanically, not self-generated. Hmm.)) * guile.c, script.c, script.h: New source files. * init.c (scm_boot_guile_1): Call scm_init_script. * libguile.h: #include "script.h". * Makefile.am (bin_PROGRAMS, guile_SOURCES, guile_LDADD): New targets, for new executable. (libguile_la_SOURCES): Mention script.c. (modinclude_HEADERS): Add script.h. * configure.in: Always check for -lm, -lsocket, -lnsl, whether or not dynamic linking is enabled. This is because we're generating executables now. Move CY_AC_WITH_THREADS call after those, so the values of cy_cv_threads_libs captures the libs chosen above. * Makefile.in, configure, aclocal.m4: Regenerated.