mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-29 19:30:36 +02:00
merge from 1.8 branch
This commit is contained in:
parent
1b09b607dd
commit
6e7d5622ee
155 changed files with 625 additions and 9380 deletions
|
@ -5,7 +5,7 @@
|
|||
;;;; guile-benchmark --- run the Guile benchmark suite
|
||||
;;;; Adapted from code by Jim Blandy <jimb@red-bean.com> --- May 1999
|
||||
;;;;
|
||||
;;;; Copyright (C) 2002 Free Software Foundation, Inc.
|
||||
;;;; Copyright (C) 2002, 2006 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
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
;;;; benchmark-suite/lib.scm --- generic support for benchmarking
|
||||
;;;; Copyright (C) 2002 Free Software Foundation, Inc.
|
||||
;;;; Copyright (C) 2002, 2006 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;;; gud-guile.el --- Support for debugging guile internals
|
||||
|
||||
;; Copyright (C) 2001 Free Software Foundation, Inc.
|
||||
;; Copyright (C) 2001, 2006 Free Software Foundation, Inc.
|
||||
|
||||
;; GNU Emacs is free software; you can redistribute it and/or modify
|
||||
;; it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;;; guile-c.el --- Guile C editing commands
|
||||
|
||||
;; Copyright (C) 2001 Free Software Foundation, Inc.
|
||||
;; Copyright (C) 2001, 2006 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;;; guile-scheme.el --- Guile Scheme editing mode
|
||||
|
||||
;; Copyright (C) 2001 Free Software Foundation, Inc.
|
||||
;; Copyright (C) 2001, 2006 Free Software Foundation, Inc.
|
||||
|
||||
;; GNU Emacs is free software; you can redistribute it and/or modify
|
||||
;; it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;;; multistring.el --- editing multiline strings.
|
||||
|
||||
;; Copyright (C) 2000 Free Software Foundation, Inc.
|
||||
;; Copyright (C) 2000, 2006 Free Software Foundation, Inc.
|
||||
|
||||
;; This file is part of GNU Emacs.
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;;; patch.el --- mail/apply a patch
|
||||
|
||||
;; Copyright (C) 2001 Free Software Foundation, Inc.
|
||||
;; Copyright (C) 2001, 2006 Free Software Foundation, Inc.
|
||||
|
||||
;; GNU Emacs is free software; you can redistribute it and/or modify
|
||||
;; it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;;; ppexpand.el --- temporarily expanding macros in a pretty way.
|
||||
|
||||
;; Copyright (C) 2000 Free Software Foundation, Inc.
|
||||
;; Copyright (C) 2000, 2006 Free Software Foundation, Inc.
|
||||
|
||||
;; This file is part of GNU Emacs.
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;;; update-changelog.el --- stitch rcs2log output to ChangeLog
|
||||
|
||||
;;; Copyright (C) 2001 Free Software Foundation, Inc.
|
||||
;;; Copyright (C) 2001, 2006 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
## Process this file with Automake to create Makefile.in
|
||||
##
|
||||
## Copyright (C) 2001 Free Software Foundation, Inc.
|
||||
## Copyright (C) 2001, 2006 Free Software Foundation, Inc.
|
||||
##
|
||||
## This file is part of GUILE.
|
||||
##
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
## Process this file with Automake to create Makefile.in
|
||||
##
|
||||
## Copyright (C) 2001 Free Software Foundation, Inc.
|
||||
## Copyright (C) 2001, 2006 Free Software Foundation, Inc.
|
||||
##
|
||||
## This file is part of GUILE.
|
||||
##
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* examples/box-dynamic-module/box.c
|
||||
*
|
||||
* Copyright (C) 1998,2001 Free Software Foundation, Inc.
|
||||
* Copyright (C) 1998,2001, 2006 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
## Process this file with Automake to create Makefile.in
|
||||
##
|
||||
## Copyright (C) 2001 Free Software Foundation, Inc.
|
||||
## Copyright (C) 2001, 2006 Free Software Foundation, Inc.
|
||||
##
|
||||
## This file is part of GUILE.
|
||||
##
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* examples/box-dynamic/box.c
|
||||
*
|
||||
* Copyright (C) 1998,2001 Free Software Foundation, Inc.
|
||||
* Copyright (C) 1998,2001, 2006 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
## Process this file with Automake to create Makefile.in
|
||||
##
|
||||
## Copyright (C) 2001 Free Software Foundation, Inc.
|
||||
## Copyright (C) 2001, 2006 Free Software Foundation, Inc.
|
||||
##
|
||||
## This file is part of GUILE.
|
||||
##
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* examples/box-module/box.c
|
||||
*
|
||||
* Copyright (C) 1998,2001 Free Software Foundation, Inc.
|
||||
* Copyright (C) 1998,2001, 2006 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
## Process this file with Automake to create Makefile.in
|
||||
##
|
||||
## Copyright (C) 2001 Free Software Foundation, Inc.
|
||||
## Copyright (C) 2001, 2006 Free Software Foundation, Inc.
|
||||
##
|
||||
## This file is part of GUILE.
|
||||
##
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* examples/box/box.c
|
||||
*
|
||||
* Copyright (C) 1998,2001 Free Software Foundation, Inc.
|
||||
* Copyright (C) 1998,2001, 2006 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
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
#ifndef COMPATH
|
||||
#define COMPATH
|
||||
/* Copyright (C) 2001, 2002 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2001, 2002, 2006 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
## Process this file with Automake to create Makefile.in
|
||||
##
|
||||
## Copyright (C) 2001 Free Software Foundation, Inc.
|
||||
## Copyright (C) 2001, 2006 Free Software Foundation, Inc.
|
||||
##
|
||||
## This file is part of GUILE.
|
||||
##
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
## Process this file with Automake to create Makefile.in
|
||||
##
|
||||
## Copyright (C) 2001 Free Software Foundation, Inc.
|
||||
## Copyright (C) 2001, 2006 Free Software Foundation, Inc.
|
||||
##
|
||||
## This file is part of GUILE.
|
||||
##
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
## Process this file with Automake to create Makefile.in
|
||||
##
|
||||
## Copyright (C) 2001 Free Software Foundation, Inc.
|
||||
## Copyright (C) 2001, 2006 Free Software Foundation, Inc.
|
||||
##
|
||||
## This file is part of GUILE.
|
||||
##
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
## Process this file with Automake to create Makefile.in
|
||||
## Jim Blandy <jimb@red-bean.com> --- September 1997
|
||||
##
|
||||
## Copyright (C) 1998, 1999, 2001 Free Software Foundation, Inc.
|
||||
## Copyright (C) 1998, 1999, 2001, 2006 Free Software Foundation, Inc.
|
||||
##
|
||||
## This file is part of GUILE.
|
||||
##
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
;;;; guile-config --- utility for linking programs with Guile
|
||||
;;;; Jim Blandy <jim@red-bean.com> --- September 1997
|
||||
;;;;
|
||||
;;;; Copyright (C) 1998, 2001, 2004, 2005 Free Software Foundation, Inc.
|
||||
;;;; Copyright (C) 1998, 2001, 2004, 2005, 2006 Free Software Foundation, Inc.
|
||||
;;;;
|
||||
;;;; This library is free software; you can redistribute it and/or
|
||||
;;;; modify it under the terms of the GNU Lesser General Public
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
## Autoconf macros for working with Guile.
|
||||
##
|
||||
## Copyright (C) 1998,2001 Free Software Foundation, Inc.
|
||||
## Copyright (C) 1998,2001, 2006 Free Software Foundation, Inc.
|
||||
##
|
||||
## This library is free software; you can redistribute it and/or
|
||||
## modify it under the terms of the GNU Lesser General Public
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
dnl Autoconf macros for configuring the QuickThreads package
|
||||
dnl Jim Blandy <jimb@red-bean.com> --- July 1998
|
||||
dnl
|
||||
dnl Copyright (C) 1998, 1999 Free Software Foundation, Inc.
|
||||
dnl Copyright (C) 1998, 1999, 2006 Free Software Foundation, Inc.
|
||||
dnl
|
||||
dnl This file is part of GUILE.
|
||||
dnl
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
## Process this file with automake to produce Makefile.in.
|
||||
##
|
||||
## Copyright (C) 2000 Free Software Foundation, Inc.
|
||||
## Copyright (C) 2000, 2006 Free Software Foundation, Inc.
|
||||
##
|
||||
## This file is part of GUILE.
|
||||
##
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
## Process this file with automake to produce Makefile.in.
|
||||
##
|
||||
## Copyright (C) 1998, 1999, 2000, 2001, 2004 Free Software Foundation, Inc.
|
||||
## Copyright (C) 1998, 1999, 2000, 2001, 2004, 2006 Free Software Foundation, Inc.
|
||||
##
|
||||
## This file is part of GUILE.
|
||||
##
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
## Process this file with automake to produce Makefile.in.
|
||||
##
|
||||
## Copyright (C) 1998, 1999, 2000, 2001, 2004 Free Software Foundation, Inc.
|
||||
## Copyright (C) 1998, 1999, 2000, 2001, 2004, 2006 Free Software Foundation, Inc.
|
||||
##
|
||||
## This file is part of GUILE.
|
||||
##
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
## Process this file with automake to produce Makefile.in.
|
||||
##
|
||||
## Copyright (C) 1998, 1999, 2000, 2001, 2004 Free Software Foundation, Inc.
|
||||
## Copyright (C) 1998, 1999, 2000, 2001, 2004, 2006 Free Software Foundation, Inc.
|
||||
##
|
||||
## This file is part of GUILE.
|
||||
##
|
||||
|
|
|
@ -1,44 +0,0 @@
|
|||
## Process this file with Automake to create Makefile.in
|
||||
##
|
||||
## Copyright (C) 2002 Free Software Foundation, Inc.
|
||||
##
|
||||
## This file is part of GUILE.
|
||||
##
|
||||
## GUILE 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 2, or
|
||||
## (at your option) any later version.
|
||||
##
|
||||
## GUILE 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 Public
|
||||
## License along with GUILE; see the file COPYING. If not, write
|
||||
## to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
## Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
SUBDIRS = upstream
|
||||
|
||||
AUTOMAKE_OPTIONS = gnu
|
||||
|
||||
## Prevent automake from adding extra -I options
|
||||
DEFS = @DEFS@
|
||||
## Check for headers in $(srcdir)/.., so that #include
|
||||
## <libguile/MUMBLE.h> will find MUMBLE.h in this dir when we're
|
||||
## building.
|
||||
INCLUDES = -I. -I$(srcdir) -I.. -I$(srcdir)/..
|
||||
|
||||
ETAGS_ARGS = --regex='/SCM_\(GLOBAL_\)?\(G?PROC\|G?PROC1\|SYMBOL\|VCELL\|CONST_LONG\).*\"\([^\"]\)*\"/\3/' \
|
||||
--regex='/[ \t]*SCM_[G]?DEFINE1?[ \t]*(\([^,]*\),[^,]*/\1/'
|
||||
|
||||
# We don't install this header since no one should be using the lib directly.
|
||||
EXTRA_HEADERS = guile-ltdl.h raw-ltdl.h
|
||||
EXTRA_DIST = raw-ltdl.c $(EXTRA_HEADERS)
|
||||
|
||||
lib_LTLIBRARIES = libguile-ltdl.la
|
||||
libguile_ltdl_la_SOURCES = guile-ltdl.c
|
||||
#libguile_ltdl_la_DEPENDENCIES =
|
||||
libguile_ltdl_la_LIBADD = ${LIBADD_DL}
|
||||
libguile_ltdl_la_LDFLAGS = -version-info 2:0:0 -export-dynamic -no-undefined
|
|
@ -1,80 +0,0 @@
|
|||
/* ltdl.c -- system independent dlopen wrapper
|
||||
Copyright (C) 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
|
||||
Originally by Thomas Tanner <tanner@ffii.org>
|
||||
This file is part of GNU Libtool.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
As a special exception to the GNU Lesser General Public License,
|
||||
if you distribute this file as part of a program or library that
|
||||
is built using GNU libtool, you may include it under the same
|
||||
distribution terms that you use for the rest of that program.
|
||||
|
||||
This library 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
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
02110-1301 USA
|
||||
|
||||
*/
|
||||
|
||||
#include "guile-ltdl.h"
|
||||
|
||||
#define lt_dlhandle_struct scm_i_lt_dlhandle_struct
|
||||
#define SCM_INSERTED_DLSYMLIST_STRUCT_DECL scm_i_lt_dlsymlist_struct
|
||||
|
||||
#define LT_SCOPE static
|
||||
#define SCMLTXT static
|
||||
#define SCMLTSTATIC static
|
||||
|
||||
#ifdef __GNUC__
|
||||
#define SCM_UNUSED __attribute__ ((unused))
|
||||
#else
|
||||
#define SCM_UNUSED
|
||||
#endif
|
||||
|
||||
#include "raw-ltdl.h"
|
||||
#include "raw-ltdl.c"
|
||||
|
||||
void
|
||||
scm_lt_dlpreload_default (const scm_lt_dlsymlist *preloads)
|
||||
{
|
||||
lt_dlpreload_default(preloads);
|
||||
}
|
||||
|
||||
int
|
||||
scm_lt_dlinit (void)
|
||||
{
|
||||
return lt_dlinit ();
|
||||
}
|
||||
|
||||
scm_lt_dlhandle
|
||||
scm_lt_dlopenext (const char *filename)
|
||||
{
|
||||
return lt_dlopenext (filename);
|
||||
}
|
||||
|
||||
scm_lt_ptr
|
||||
scm_lt_dlsym (scm_lt_dlhandle handle, const char *name)
|
||||
{
|
||||
return lt_dlsym (handle, name);
|
||||
}
|
||||
|
||||
const char *
|
||||
scm_lt_dlerror (void)
|
||||
{
|
||||
return lt_dlerror ();
|
||||
}
|
||||
|
||||
int
|
||||
scm_lt_dlclose (scm_lt_dlhandle handle)
|
||||
{
|
||||
return lt_dlclose (handle);
|
||||
}
|
|
@ -1,40 +0,0 @@
|
|||
/* guile-ltdl.h -- dlopen function actually used by guile
|
||||
Copyright (C) 1998-2000, 2002 Free Software Foundation, Inc.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
As a special exception to the GNU Lesser General Public License,
|
||||
if you distribute this file as part of a program or library that
|
||||
is built using GNU libtool, you may include it under the same
|
||||
distribution terms that you use for the rest of that program.
|
||||
|
||||
This library 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
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
02110-1301 USA
|
||||
*/
|
||||
|
||||
/* Only include this header file once. */
|
||||
#ifndef SCM_LTDL_H
|
||||
#define SCM_LTDL_H 1
|
||||
|
||||
typedef struct scm_i_lt_dlhandle_struct *scm_lt_dlhandle;
|
||||
typedef struct scm_i_lt_dlsymlist_struct scm_lt_dlsymlist;
|
||||
typedef void * scm_lt_ptr;
|
||||
|
||||
void scm_lt_dlpreload_default (const scm_lt_dlsymlist *preloads);
|
||||
int scm_lt_dlinit (void);
|
||||
scm_lt_dlhandle scm_lt_dlopenext (const char *filename);
|
||||
scm_lt_ptr scm_lt_dlsym (scm_lt_dlhandle handle, const char *name);
|
||||
const char *scm_lt_dlerror (void);
|
||||
int scm_lt_dlclose (scm_lt_dlhandle handle);
|
||||
|
||||
#endif /* !SCM_LTDL_H */
|
File diff suppressed because it is too large
Load diff
|
@ -1,344 +0,0 @@
|
|||
/* ltdl.h -- generic dlopen functions
|
||||
Copyright (C) 1998-2000, 2002 Free Software Foundation, Inc.
|
||||
Originally by Thomas Tanner <tanner@ffii.org>
|
||||
This file is part of GNU Libtool.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
As a special exception to the GNU Lesser General Public License,
|
||||
if you distribute this file as part of a program or library that
|
||||
is built using GNU libtool, you may include it under the same
|
||||
distribution terms that you use for the rest of that program.
|
||||
|
||||
This library 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
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
02110-1301 USA
|
||||
*/
|
||||
|
||||
/* Only include this header file once. */
|
||||
#ifndef LTDL_H
|
||||
#define LTDL_H 1
|
||||
|
||||
#include "guile-ltdl.h"
|
||||
|
||||
#include <sys/types.h> /* for size_t declaration */
|
||||
|
||||
|
||||
/* --- MACROS FOR PORTABILITY --- */
|
||||
|
||||
/* LTDL_BEGIN_C_DECLS should be used at the beginning of your declarations,
|
||||
so that C++ compilers don't mangle their names. Use LTDL_END_C_DECLS at
|
||||
the end of C declarations. */
|
||||
#ifdef __cplusplus
|
||||
# define LT_BEGIN_C_DECLS extern "C" {
|
||||
# define LT_END_C_DECLS }
|
||||
#else
|
||||
# define LT_BEGIN_C_DECLS /* empty */
|
||||
# define LT_END_C_DECLS /* empty */
|
||||
#endif
|
||||
|
||||
LT_BEGIN_C_DECLS
|
||||
|
||||
|
||||
/* LT_PARAMS is a macro used to wrap function prototypes, so that compilers
|
||||
that don't understand ANSI C prototypes still work, and ANSI C
|
||||
compilers can issue warnings about type mismatches. */
|
||||
#if defined (__STDC__) || defined (_AIX) || (defined (__mips) && defined (_SYSTYPE_SVR4)) || defined(WIN32) || defined(__cplusplus)
|
||||
# define LT_PARAMS(protos) protos
|
||||
# define lt_ptr void*
|
||||
#else
|
||||
# define LT_PARAMS(protos) ()
|
||||
# define lt_ptr char*
|
||||
#endif
|
||||
|
||||
/* LT_STMT_START/END are used to create macros which expand to a
|
||||
a single compound statement in a portable way. */
|
||||
#if defined (__GNUC__) && !defined (__STRICT_ANSI__) && !defined (__cplusplus)
|
||||
# define LT_STMT_START (void)(
|
||||
# define LT_STMT_END )
|
||||
#else
|
||||
# if (defined (sun) || defined (__sun__))
|
||||
# define LT_STMT_START if (1)
|
||||
# define LT_STMT_END else (void)0
|
||||
# else
|
||||
# define LT_STMT_START do
|
||||
# define LT_STMT_END while (0)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* LT_CONC creates a new concatenated symbol for the compiler
|
||||
in a portable way. */
|
||||
#if defined(__STDC__) || defined(__cplusplus)
|
||||
# define LT_CONC(s,t) s##t
|
||||
#else
|
||||
# define LT_CONC(s,t) s/**/t
|
||||
#endif
|
||||
|
||||
/* LT_STRLEN can be used safely on NULL pointers. */
|
||||
#define LT_STRLEN(s) (((s) && (s)[0]) ? strlen (s) : 0)
|
||||
|
||||
|
||||
|
||||
/* --- WINDOWS SUPPORT --- */
|
||||
|
||||
|
||||
/* Canonicalise Windows and Cygwin recognition macros. */
|
||||
#ifdef __CYGWIN32__
|
||||
# ifndef __CYGWIN__
|
||||
# define __CYGWIN__ __CYGWIN32__
|
||||
# endif
|
||||
#endif
|
||||
#if defined(_WIN32) || defined(WIN32)
|
||||
# ifndef __WINDOWS__
|
||||
# ifdef _WIN32
|
||||
# define __WINDOWS__ _WIN32
|
||||
# else
|
||||
# ifdef WIN32
|
||||
# define __WINDOWS__ WIN32
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef __WINDOWS__
|
||||
# ifndef __CYGWIN__
|
||||
/* LT_DIRSEP_CHAR is accepted *in addition* to '/' as a directory
|
||||
separator when it is set. */
|
||||
# define LT_DIRSEP_CHAR '\\'
|
||||
# define LT_PATHSEP_CHAR ';'
|
||||
# endif
|
||||
#endif
|
||||
#ifndef LT_PATHSEP_CHAR
|
||||
# define LT_PATHSEP_CHAR ':'
|
||||
#endif
|
||||
|
||||
/* DLL building support on win32 hosts; mostly to workaround their
|
||||
ridiculous implementation of data symbol exporting. */
|
||||
#ifndef LT_SCOPE
|
||||
# ifdef __WINDOWS__
|
||||
# ifdef DLL_EXPORT /* defined by libtool (if required) */
|
||||
# define LT_SCOPE __declspec(dllexport)
|
||||
# endif
|
||||
# ifdef LIBLTDL_DLL_IMPORT /* define if linking with this dll */
|
||||
# define LT_SCOPE extern __declspec(dllimport)
|
||||
# endif
|
||||
# endif
|
||||
# ifndef LT_SCOPE /* static linking or !__WINDOWS__ */
|
||||
# define LT_SCOPE extern
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
/* --- DYNAMIC MODULE LOADING API --- */
|
||||
|
||||
|
||||
typedef struct lt_dlhandle_struct *lt_dlhandle; /* A loaded module. */
|
||||
|
||||
/* Initialisation and finalisation functions for libltdl. */
|
||||
SCMLTXT int lt_dlinit LT_PARAMS((void));
|
||||
SCMLTXT int lt_dlexit LT_PARAMS((void)) SCM_UNUSED;
|
||||
|
||||
/* Module search path manipulation. */
|
||||
SCMLTXT int lt_dladdsearchdir LT_PARAMS((const char *search_dir)) SCM_UNUSED;
|
||||
SCMLTXT int lt_dlinsertsearchdir LT_PARAMS((const char *before,
|
||||
const char *search_dir)) SCM_UNUSED;
|
||||
SCMLTXT int lt_dlsetsearchpath LT_PARAMS((const char *search_path)) SCM_UNUSED;
|
||||
SCMLTXT const char *lt_dlgetsearchpath LT_PARAMS((void)) SCM_UNUSED;
|
||||
SCMLTXT int lt_dlforeachfile LT_PARAMS((
|
||||
const char *search_path,
|
||||
int (*func) (const char *filename, lt_ptr data),
|
||||
lt_ptr data)) SCM_UNUSED;
|
||||
|
||||
/* Portable libltdl versions of the system dlopen() API. */
|
||||
SCMLTXT lt_dlhandle lt_dlopen LT_PARAMS((const char *filename));
|
||||
SCMLTXT lt_dlhandle lt_dlopenext LT_PARAMS((const char *filename));
|
||||
SCMLTXT lt_ptr lt_dlsym LT_PARAMS((lt_dlhandle handle,
|
||||
const char *name));
|
||||
SCMLTXT const char *lt_dlerror LT_PARAMS((void));
|
||||
SCMLTXT int lt_dlclose LT_PARAMS((lt_dlhandle handle));
|
||||
|
||||
/* Module residency management. */
|
||||
SCMLTXT int lt_dlmakeresident LT_PARAMS((lt_dlhandle handle)) SCM_UNUSED;
|
||||
SCMLTXT int lt_dlisresident LT_PARAMS((lt_dlhandle handle)) SCM_UNUSED;
|
||||
|
||||
|
||||
|
||||
|
||||
/* --- MUTEX LOCKING --- */
|
||||
|
||||
|
||||
typedef void lt_dlmutex_lock LT_PARAMS((void));
|
||||
typedef void lt_dlmutex_unlock LT_PARAMS((void));
|
||||
typedef void lt_dlmutex_seterror LT_PARAMS((const char *errmsg));
|
||||
typedef const char *lt_dlmutex_geterror LT_PARAMS((void));
|
||||
|
||||
SCMLTXT int lt_dlmutex_register LT_PARAMS((lt_dlmutex_lock *lock,
|
||||
lt_dlmutex_unlock *unlock,
|
||||
lt_dlmutex_seterror *seterror,
|
||||
lt_dlmutex_geterror *geterror)) SCM_UNUSED;
|
||||
|
||||
|
||||
|
||||
|
||||
/* --- MEMORY HANDLING --- */
|
||||
|
||||
|
||||
/* By default, the realloc function pointer is set to our internal
|
||||
realloc implementation which iself uses lt_dlmalloc and lt_dlfree.
|
||||
libltdl relies on a featureful realloc, but if you are sure yours
|
||||
has the right semantics then you can assign it directly. Generally,
|
||||
it is safe to assign just a malloc() and a free() function. */
|
||||
LT_SCOPE lt_ptr (*lt_dlmalloc) LT_PARAMS((size_t size));
|
||||
LT_SCOPE lt_ptr (*lt_dlrealloc) LT_PARAMS((lt_ptr ptr, size_t size)) SCM_UNUSED;
|
||||
LT_SCOPE void (*lt_dlfree) LT_PARAMS((lt_ptr ptr));
|
||||
|
||||
|
||||
|
||||
|
||||
/* --- PRELOADED MODULE SUPPORT --- */
|
||||
|
||||
|
||||
/* A preopened symbol. Arrays of this type comprise the exported
|
||||
symbols for a dlpreopened module. */
|
||||
typedef struct SCM_INSERTED_DLSYMLIST_STRUCT_DECL {
|
||||
const char *name;
|
||||
lt_ptr address;
|
||||
} lt_dlsymlist;
|
||||
|
||||
SCMLTXT int lt_dlpreload LT_PARAMS((const lt_dlsymlist *preloaded));
|
||||
SCMLTXT int lt_dlpreload_default
|
||||
LT_PARAMS((const lt_dlsymlist *preloaded));
|
||||
|
||||
#define LTDL_SET_PRELOADED_SYMBOLS() LT_STMT_START{ \
|
||||
extern const lt_dlsymlist lt_preloaded_symbols[]; \
|
||||
lt_dlpreload_default(lt_preloaded_symbols); \
|
||||
}LT_STMT_END
|
||||
|
||||
|
||||
|
||||
|
||||
/* --- MODULE INFORMATION --- */
|
||||
|
||||
|
||||
/* Read only information pertaining to a loaded module. */
|
||||
typedef struct {
|
||||
char *filename; /* file name */
|
||||
char *name; /* module name */
|
||||
int ref_count; /* number of times lt_dlopened minus
|
||||
number of times lt_dlclosed. */
|
||||
} lt_dlinfo;
|
||||
|
||||
SCMLTXT const lt_dlinfo *lt_dlgetinfo LT_PARAMS((lt_dlhandle handle)) SCM_UNUSED;
|
||||
SCMLTXT lt_dlhandle lt_dlhandle_next LT_PARAMS((lt_dlhandle place)) SCM_UNUSED;
|
||||
SCMLTXT int lt_dlforeach LT_PARAMS((
|
||||
int (*func) (lt_dlhandle handle, lt_ptr data),
|
||||
lt_ptr data)) SCM_UNUSED;
|
||||
|
||||
/* Associating user data with loaded modules. */
|
||||
typedef unsigned lt_dlcaller_id;
|
||||
|
||||
SCMLTXT lt_dlcaller_id lt_dlcaller_register LT_PARAMS((void)) SCM_UNUSED;
|
||||
SCMLTXT lt_ptr lt_dlcaller_set_data LT_PARAMS((lt_dlcaller_id key,
|
||||
lt_dlhandle handle,
|
||||
lt_ptr data)) SCM_UNUSED;
|
||||
SCMLTXT lt_ptr lt_dlcaller_get_data LT_PARAMS((lt_dlcaller_id key,
|
||||
lt_dlhandle handle)) SCM_UNUSED;
|
||||
|
||||
|
||||
|
||||
/* --- USER MODULE LOADER API --- */
|
||||
|
||||
|
||||
typedef struct lt_dlloader lt_dlloader;
|
||||
typedef lt_ptr lt_user_data;
|
||||
typedef lt_ptr lt_module;
|
||||
|
||||
/* Function pointer types for creating user defined module loaders. */
|
||||
typedef lt_module lt_module_open LT_PARAMS((lt_user_data loader_data,
|
||||
const char *filename));
|
||||
typedef int lt_module_close LT_PARAMS((lt_user_data loader_data,
|
||||
lt_module handle));
|
||||
typedef lt_ptr lt_find_sym LT_PARAMS((lt_user_data loader_data,
|
||||
lt_module handle,
|
||||
const char *symbol));
|
||||
typedef int lt_dlloader_exit LT_PARAMS((lt_user_data loader_data));
|
||||
|
||||
struct lt_user_dlloader {
|
||||
const char *sym_prefix;
|
||||
lt_module_open *module_open;
|
||||
lt_module_close *module_close;
|
||||
lt_find_sym *find_sym;
|
||||
lt_dlloader_exit *dlloader_exit;
|
||||
lt_user_data dlloader_data;
|
||||
};
|
||||
|
||||
SCMLTXT lt_dlloader *lt_dlloader_next LT_PARAMS((lt_dlloader *place));
|
||||
SCMLTXT lt_dlloader *lt_dlloader_find LT_PARAMS((
|
||||
const char *loader_name));
|
||||
SCMLTXT const char *lt_dlloader_name LT_PARAMS((lt_dlloader *place)) SCM_UNUSED;
|
||||
SCMLTXT lt_user_data *lt_dlloader_data LT_PARAMS((lt_dlloader *place)) SCM_UNUSED;
|
||||
SCMLTXT int lt_dlloader_add LT_PARAMS((lt_dlloader *place,
|
||||
const struct lt_user_dlloader *dlloader,
|
||||
const char *loader_name));
|
||||
SCMLTXT int lt_dlloader_remove LT_PARAMS((
|
||||
const char *loader_name)) SCM_UNUSED;
|
||||
|
||||
|
||||
|
||||
/* --- ERROR MESSAGE HANDLING --- */
|
||||
|
||||
|
||||
/* Defining error strings alongside their symbolic names in a macro in
|
||||
this way allows us to expand the macro in different contexts with
|
||||
confidence that the enumeration of symbolic names will map correctly
|
||||
onto the table of error strings. */
|
||||
#define lt_dlerror_table \
|
||||
LT_ERROR(UNKNOWN, "unknown error") \
|
||||
LT_ERROR(DLOPEN_NOT_SUPPORTED, "dlopen support not available") \
|
||||
LT_ERROR(INVALID_LOADER, "invalid loader") \
|
||||
LT_ERROR(INIT_LOADER, "loader initialization failed") \
|
||||
LT_ERROR(REMOVE_LOADER, "loader removal failed") \
|
||||
LT_ERROR(FILE_NOT_FOUND, "file not found") \
|
||||
LT_ERROR(DEPLIB_NOT_FOUND, "dependency library not found") \
|
||||
LT_ERROR(NO_SYMBOLS, "no symbols defined") \
|
||||
LT_ERROR(CANNOT_OPEN, "can't open the module") \
|
||||
LT_ERROR(CANNOT_CLOSE, "can't close the module") \
|
||||
LT_ERROR(SYMBOL_NOT_FOUND, "symbol not found") \
|
||||
LT_ERROR(NO_MEMORY, "not enough memory") \
|
||||
LT_ERROR(INVALID_HANDLE, "invalid module handle") \
|
||||
LT_ERROR(BUFFER_OVERFLOW, "internal buffer overflow") \
|
||||
LT_ERROR(INVALID_ERRORCODE, "invalid errorcode") \
|
||||
LT_ERROR(SHUTDOWN, "library already shutdown") \
|
||||
LT_ERROR(CLOSE_RESIDENT_MODULE, "can't close resident module") \
|
||||
LT_ERROR(INVALID_MUTEX_ARGS, "invalid mutex handler registration") \
|
||||
LT_ERROR(INVALID_POSITION, "invalid search path insert position")
|
||||
|
||||
/* Enumerate the symbolic error names. */
|
||||
enum {
|
||||
#define LT_ERROR(name, diagnostic) LT_CONC(LT_ERROR_, name),
|
||||
lt_dlerror_table
|
||||
#undef LT_ERROR
|
||||
|
||||
LT_ERROR_MAX
|
||||
};
|
||||
|
||||
/* These functions are only useful from inside custom module loaders. */
|
||||
SCMLTXT int lt_dladderror LT_PARAMS((const char *diagnostic)) SCM_UNUSED;
|
||||
SCMLTXT int lt_dlseterror LT_PARAMS((int errorcode)) SCM_UNUSED;
|
||||
|
||||
|
||||
|
||||
LT_END_C_DECLS
|
||||
|
||||
#endif /* !LTDL_H */
|
|
@ -1,63 +0,0 @@
|
|||
## Process this file with Automake to create Makefile.in
|
||||
##
|
||||
## Copyright (C) 2002 Free Software Foundation, Inc.
|
||||
##
|
||||
## This file is part of GUILE.
|
||||
##
|
||||
## GUILE 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 2, or
|
||||
## (at your option) any later version.
|
||||
##
|
||||
## GUILE 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 Public
|
||||
## License along with GUILE; see the file COPYING. If not, write
|
||||
## to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
## Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
AUTOMAKE_OPTIONS = gnu
|
||||
|
||||
## Prevent automake from adding extra -I options
|
||||
DEFS = @DEFS@
|
||||
## Check for headers in $(srcdir)/.., so that #include
|
||||
## <libguile/MUMBLE.h> will find MUMBLE.h in this dir when we're
|
||||
## building.
|
||||
INCLUDES = -I.. -I$(srcdir)/..
|
||||
|
||||
ETAGS_ARGS = --regex='/SCM_\(GLOBAL_\)?\(G?PROC\|G?PROC1\|SYMBOL\|VCELL\|CONST_LONG\).*\"\([^\"]\)*\"/\3/' \
|
||||
--regex='/[ \t]*SCM_[G]?DEFINE1?[ \t]*(\([^,]*\),[^,]*/\1/'
|
||||
|
||||
EXTRA_DIST := ltdl.h ltdl.c ltdl.h.diff ltdl.c.diff
|
||||
BUILT_SOURCES := ltdl.h.diff ltdl.c.diff
|
||||
|
||||
ltdl.h.diff: ltdl.h $(srcdir)/../raw-ltdl.h
|
||||
cp $(srcdir)/../raw-ltdl.h raw-ltdl.guilemod.h.tmp
|
||||
perl -pi \
|
||||
-e 's/SCMLTXT/extern/go;' \
|
||||
-e 's/SCMLTSTATIC //go;' \
|
||||
-e 's/ SCM_UNUSED//go;' \
|
||||
-e 's/SCM_INSERTED_DLSYMLIST_STRUCT_DECL //go;' \
|
||||
raw-ltdl.guilemod.h.tmp
|
||||
mv raw-ltdl.guilemod.h.tmp raw-ltdl.guilemod.h
|
||||
diff -ru $(srcdir)/ltdl.h raw-ltdl.guilemod.h > ltdl.h.diff; \
|
||||
test "$$?" -eq 1
|
||||
|
||||
ltdl.c.diff: ltdl.c $(srcdir)/../raw-ltdl.c
|
||||
cp $(srcdir)/../raw-ltdl.c raw-ltdl.guilemod.c.tmp
|
||||
perl -pi \
|
||||
-e 's/SCMLTXT/extern/go;' \
|
||||
-e 's/SCMLTSTATIC //go;' \
|
||||
-e 's/ SCM_UNUSED//go;' \
|
||||
-e 's/SCM_INSERTED_DLSYMLIST_STRUCT_DECL //go;' \
|
||||
raw-ltdl.guilemod.c.tmp
|
||||
mv raw-ltdl.guilemod.c.tmp raw-ltdl.guilemod.c
|
||||
diff -ru $(srcdir)/ltdl.c raw-ltdl.guilemod.c > ltdl.c.diff; \
|
||||
test "$$?" -eq 1
|
||||
|
||||
CLEANFILES := \
|
||||
raw-ltdl.guilemod.h raw-ltdl.guilemod.c \
|
||||
raw-ltdl.guilemod.h.tmp raw-ltdl.guilemod.c.tmp
|
File diff suppressed because it is too large
Load diff
|
@ -1,361 +0,0 @@
|
|||
/* ltdl.h -- generic dlopen functions
|
||||
Copyright (C) 1998-2000 Free Software Foundation, Inc.
|
||||
Originally by Thomas Tanner <tanner@ffii.org>
|
||||
This file is part of GNU Libtool.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
As a special exception to the GNU Lesser General Public License,
|
||||
if you distribute this file as part of a program or library that
|
||||
is built using GNU libtool, you may include it under the same
|
||||
distribution terms that you use for the rest of that program.
|
||||
|
||||
This library 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
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
02110-1301 USA
|
||||
*/
|
||||
|
||||
/* Only include this header file once. */
|
||||
#ifndef LTDL_H
|
||||
#define LTDL_H 1
|
||||
|
||||
#include <sys/types.h> /* for size_t declaration */
|
||||
|
||||
|
||||
/* --- MACROS FOR PORTABILITY --- */
|
||||
|
||||
|
||||
/* Saves on those hard to debug '\0' typos.... */
|
||||
#define LT_EOS_CHAR '\0'
|
||||
|
||||
/* LTDL_BEGIN_C_DECLS should be used at the beginning of your declarations,
|
||||
so that C++ compilers don't mangle their names. Use LTDL_END_C_DECLS at
|
||||
the end of C declarations. */
|
||||
#ifdef __cplusplus
|
||||
# define LT_BEGIN_C_DECLS extern "C" {
|
||||
# define LT_END_C_DECLS }
|
||||
#else
|
||||
# define LT_BEGIN_C_DECLS /* empty */
|
||||
# define LT_END_C_DECLS /* empty */
|
||||
#endif
|
||||
|
||||
LT_BEGIN_C_DECLS
|
||||
|
||||
|
||||
/* LT_PARAMS is a macro used to wrap function prototypes, so that compilers
|
||||
that don't understand ANSI C prototypes still work, and ANSI C
|
||||
compilers can issue warnings about type mismatches. */
|
||||
#if defined (__STDC__) || defined (_AIX) || (defined (__mips) && defined (_SYSTYPE_SVR4)) || defined(WIN32) || defined(__cplusplus)
|
||||
# define LT_PARAMS(protos) protos
|
||||
# define lt_ptr void*
|
||||
#else
|
||||
# define LT_PARAMS(protos) ()
|
||||
# define lt_ptr char*
|
||||
#endif
|
||||
|
||||
/* LT_STMT_START/END are used to create macros which expand to a
|
||||
a single compound statement in a portable way. */
|
||||
#if defined (__GNUC__) && !defined (__STRICT_ANSI__) && !defined (__cplusplus)
|
||||
# define LT_STMT_START (void)(
|
||||
# define LT_STMT_END )
|
||||
#else
|
||||
# if (defined (sun) || defined (__sun__))
|
||||
# define LT_STMT_START if (1)
|
||||
# define LT_STMT_END else (void)0
|
||||
# else
|
||||
# define LT_STMT_START do
|
||||
# define LT_STMT_END while (0)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* LT_CONC creates a new concatenated symbol for the compiler
|
||||
in a portable way. */
|
||||
#if defined(__STDC__) || defined(__cplusplus)
|
||||
# define LT_CONC(s,t) s##t
|
||||
#else
|
||||
# define LT_CONC(s,t) s/**/t
|
||||
#endif
|
||||
|
||||
/* LT_STRLEN can be used safely on NULL pointers. */
|
||||
#define LT_STRLEN(s) (((s) && (s)[0]) ? strlen (s) : 0)
|
||||
|
||||
|
||||
|
||||
/* --- WINDOWS SUPPORT --- */
|
||||
|
||||
|
||||
/* Canonicalise Windows and Cygwin recognition macros. */
|
||||
#ifdef __CYGWIN32__
|
||||
# ifndef __CYGWIN__
|
||||
# define __CYGWIN__ __CYGWIN32__
|
||||
# endif
|
||||
#endif
|
||||
#if defined(_WIN32) || defined(WIN32)
|
||||
# ifndef __WINDOWS__
|
||||
# ifdef _WIN32
|
||||
# define __WINDOWS__ _WIN32
|
||||
# else
|
||||
# ifdef WIN32
|
||||
# define __WINDOWS__ WIN32
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef __WINDOWS__
|
||||
# ifndef __CYGWIN__
|
||||
/* LT_DIRSEP_CHAR is accepted *in addition* to '/' as a directory
|
||||
separator when it is set. */
|
||||
# define LT_DIRSEP_CHAR '\\'
|
||||
# define LT_PATHSEP_CHAR ';'
|
||||
# endif
|
||||
#endif
|
||||
#ifndef LT_PATHSEP_CHAR
|
||||
# define LT_PATHSEP_CHAR ':'
|
||||
#endif
|
||||
|
||||
/* DLL building support on win32 hosts; mostly to workaround their
|
||||
ridiculous implementation of data symbol exporting. */
|
||||
#ifndef LT_SCOPE
|
||||
# ifdef __WINDOWS__
|
||||
# ifdef DLL_EXPORT /* defined by libtool (if required) */
|
||||
# define LT_SCOPE __declspec(dllexport)
|
||||
# endif
|
||||
# ifdef LIBLTDL_DLL_IMPORT /* define if linking with this dll */
|
||||
# define LT_SCOPE extern __declspec(dllimport)
|
||||
# endif
|
||||
# endif
|
||||
# ifndef LT_SCOPE /* static linking or !__WINDOWS__ */
|
||||
# define LT_SCOPE extern
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
/* --- DYNAMIC MODULE LOADING API --- */
|
||||
|
||||
|
||||
typedef struct lt_dlhandle_struct *lt_dlhandle; /* A loaded module. */
|
||||
|
||||
/* Initialisation and finalisation functions for libltdl. */
|
||||
extern int lt_dlinit LT_PARAMS((void));
|
||||
extern int lt_dlexit LT_PARAMS((void));
|
||||
|
||||
/* Module search path manipulation. */
|
||||
extern int lt_dladdsearchdir LT_PARAMS((const char *search_dir));
|
||||
extern int lt_dlinsertsearchdir LT_PARAMS((const char *before,
|
||||
const char *search_dir));
|
||||
extern int lt_dlsetsearchpath LT_PARAMS((const char *search_path));
|
||||
extern const char *lt_dlgetsearchpath LT_PARAMS((void));
|
||||
extern int lt_dlforeachfile LT_PARAMS((
|
||||
const char *search_path,
|
||||
int (*func) (const char *filename, lt_ptr data),
|
||||
lt_ptr data));
|
||||
|
||||
/* Portable libltdl versions of the system dlopen() API. */
|
||||
extern lt_dlhandle lt_dlopen LT_PARAMS((const char *filename));
|
||||
extern lt_dlhandle lt_dlopenext LT_PARAMS((const char *filename));
|
||||
extern lt_ptr lt_dlsym LT_PARAMS((lt_dlhandle handle,
|
||||
const char *name));
|
||||
extern const char *lt_dlerror LT_PARAMS((void));
|
||||
extern int lt_dlclose LT_PARAMS((lt_dlhandle handle));
|
||||
|
||||
/* Module residency management. */
|
||||
extern int lt_dlmakeresident LT_PARAMS((lt_dlhandle handle));
|
||||
extern int lt_dlisresident LT_PARAMS((lt_dlhandle handle));
|
||||
|
||||
|
||||
|
||||
|
||||
/* --- MUTEX LOCKING --- */
|
||||
|
||||
|
||||
typedef void lt_dlmutex_lock LT_PARAMS((void));
|
||||
typedef void lt_dlmutex_unlock LT_PARAMS((void));
|
||||
typedef void lt_dlmutex_seterror LT_PARAMS((const char *errmsg));
|
||||
typedef const char *lt_dlmutex_geterror LT_PARAMS((void));
|
||||
|
||||
extern int lt_dlmutex_register LT_PARAMS((lt_dlmutex_lock *lock,
|
||||
lt_dlmutex_unlock *unlock,
|
||||
lt_dlmutex_seterror *seterror,
|
||||
lt_dlmutex_geterror *geterror));
|
||||
|
||||
|
||||
|
||||
|
||||
/* --- MEMORY HANDLING --- */
|
||||
|
||||
|
||||
/* By default, the realloc function pointer is set to our internal
|
||||
realloc implementation which iself uses lt_dlmalloc and lt_dlfree.
|
||||
libltdl relies on a featureful realloc, but if you are sure yours
|
||||
has the right semantics then you can assign it directly. Generally,
|
||||
it is safe to assign just a malloc() and a free() function. */
|
||||
LT_SCOPE lt_ptr (*lt_dlmalloc) LT_PARAMS((size_t size));
|
||||
LT_SCOPE lt_ptr (*lt_dlrealloc) LT_PARAMS((lt_ptr ptr, size_t size));
|
||||
LT_SCOPE void (*lt_dlfree) LT_PARAMS((lt_ptr ptr));
|
||||
|
||||
|
||||
|
||||
|
||||
/* --- PRELOADED MODULE SUPPORT --- */
|
||||
|
||||
|
||||
/* A preopened symbol. Arrays of this type comprise the exported
|
||||
symbols for a dlpreopened module. */
|
||||
typedef struct {
|
||||
const char *name;
|
||||
lt_ptr address;
|
||||
} lt_dlsymlist;
|
||||
|
||||
extern int lt_dlpreload LT_PARAMS((const lt_dlsymlist *preloaded));
|
||||
extern int lt_dlpreload_default
|
||||
LT_PARAMS((const lt_dlsymlist *preloaded));
|
||||
|
||||
#define LTDL_SET_PRELOADED_SYMBOLS() LT_STMT_START{ \
|
||||
extern const lt_dlsymlist lt_preloaded_symbols[]; \
|
||||
lt_dlpreload_default(lt_preloaded_symbols); \
|
||||
}LT_STMT_END
|
||||
|
||||
|
||||
|
||||
|
||||
/* --- MODULE INFORMATION --- */
|
||||
|
||||
|
||||
/* Read only information pertaining to a loaded module. */
|
||||
typedef struct {
|
||||
char *filename; /* file name */
|
||||
char *name; /* module name */
|
||||
int ref_count; /* number of times lt_dlopened minus
|
||||
number of times lt_dlclosed. */
|
||||
} lt_dlinfo;
|
||||
|
||||
extern const lt_dlinfo *lt_dlgetinfo LT_PARAMS((lt_dlhandle handle));
|
||||
extern lt_dlhandle lt_dlhandle_next LT_PARAMS((lt_dlhandle place));
|
||||
extern int lt_dlforeach LT_PARAMS((
|
||||
int (*func) (lt_dlhandle handle, lt_ptr data),
|
||||
lt_ptr data));
|
||||
|
||||
/* Associating user data with loaded modules. */
|
||||
typedef unsigned lt_dlcaller_id;
|
||||
|
||||
extern lt_dlcaller_id lt_dlcaller_register LT_PARAMS((void));
|
||||
extern lt_ptr lt_dlcaller_set_data LT_PARAMS((lt_dlcaller_id key,
|
||||
lt_dlhandle handle,
|
||||
lt_ptr data));
|
||||
extern lt_ptr lt_dlcaller_get_data LT_PARAMS((lt_dlcaller_id key,
|
||||
lt_dlhandle handle));
|
||||
|
||||
|
||||
|
||||
/* --- USER MODULE LOADER API --- */
|
||||
|
||||
|
||||
typedef struct lt_dlloader lt_dlloader;
|
||||
typedef lt_ptr lt_user_data;
|
||||
typedef lt_ptr lt_module;
|
||||
|
||||
/* Function pointer types for creating user defined module loaders. */
|
||||
typedef lt_module lt_module_open LT_PARAMS((lt_user_data loader_data,
|
||||
const char *filename));
|
||||
typedef int lt_module_close LT_PARAMS((lt_user_data loader_data,
|
||||
lt_module handle));
|
||||
typedef lt_ptr lt_find_sym LT_PARAMS((lt_user_data loader_data,
|
||||
lt_module handle,
|
||||
const char *symbol));
|
||||
typedef int lt_dlloader_exit LT_PARAMS((lt_user_data loader_data));
|
||||
|
||||
struct lt_user_dlloader {
|
||||
const char *sym_prefix;
|
||||
lt_module_open *module_open;
|
||||
lt_module_close *module_close;
|
||||
lt_find_sym *find_sym;
|
||||
lt_dlloader_exit *dlloader_exit;
|
||||
lt_user_data dlloader_data;
|
||||
};
|
||||
|
||||
extern lt_dlloader *lt_dlloader_next LT_PARAMS((lt_dlloader *place));
|
||||
extern lt_dlloader *lt_dlloader_find LT_PARAMS((
|
||||
const char *loader_name));
|
||||
extern const char *lt_dlloader_name LT_PARAMS((lt_dlloader *place));
|
||||
extern lt_user_data *lt_dlloader_data LT_PARAMS((lt_dlloader *place));
|
||||
extern int lt_dlloader_add LT_PARAMS((lt_dlloader *place,
|
||||
const struct lt_user_dlloader *dlloader,
|
||||
const char *loader_name));
|
||||
extern int lt_dlloader_remove LT_PARAMS((
|
||||
const char *loader_name));
|
||||
|
||||
|
||||
|
||||
/* --- ERROR MESSAGE HANDLING --- */
|
||||
|
||||
|
||||
/* Defining error strings alongside their symbolic names in a macro in
|
||||
this way allows us to expand the macro in different contexts with
|
||||
confidence that the enumeration of symbolic names will map correctly
|
||||
onto the table of error strings. */
|
||||
#define lt_dlerror_table \
|
||||
LT_ERROR(UNKNOWN, "unknown error") \
|
||||
LT_ERROR(DLOPEN_NOT_SUPPORTED, "dlopen support not available") \
|
||||
LT_ERROR(INVALID_LOADER, "invalid loader") \
|
||||
LT_ERROR(INIT_LOADER, "loader initialization failed") \
|
||||
LT_ERROR(REMOVE_LOADER, "loader removal failed") \
|
||||
LT_ERROR(FILE_NOT_FOUND, "file not found") \
|
||||
LT_ERROR(DEPLIB_NOT_FOUND, "dependency library not found") \
|
||||
LT_ERROR(NO_SYMBOLS, "no symbols defined") \
|
||||
LT_ERROR(CANNOT_OPEN, "can't open the module") \
|
||||
LT_ERROR(CANNOT_CLOSE, "can't close the module") \
|
||||
LT_ERROR(SYMBOL_NOT_FOUND, "symbol not found") \
|
||||
LT_ERROR(NO_MEMORY, "not enough memory") \
|
||||
LT_ERROR(INVALID_HANDLE, "invalid module handle") \
|
||||
LT_ERROR(BUFFER_OVERFLOW, "internal buffer overflow") \
|
||||
LT_ERROR(INVALID_ERRORCODE, "invalid errorcode") \
|
||||
LT_ERROR(SHUTDOWN, "library already shutdown") \
|
||||
LT_ERROR(CLOSE_RESIDENT_MODULE, "can't close resident module") \
|
||||
LT_ERROR(INVALID_MUTEX_ARGS, "invalid mutex handler registration") \
|
||||
LT_ERROR(INVALID_POSITION, "invalid search path insert position")
|
||||
|
||||
/* Enumerate the symbolic error names. */
|
||||
enum {
|
||||
#define LT_ERROR(name, diagnostic) LT_CONC(LT_ERROR_, name),
|
||||
lt_dlerror_table
|
||||
#undef LT_ERROR
|
||||
|
||||
LT_ERROR_MAX
|
||||
};
|
||||
|
||||
/* These functions are only useful from inside custom module loaders. */
|
||||
extern int lt_dladderror LT_PARAMS((const char *diagnostic));
|
||||
extern int lt_dlseterror LT_PARAMS((int errorcode));
|
||||
|
||||
|
||||
|
||||
|
||||
/* --- SOURCE COMPATIBILITY WITH OLD LIBLTDL --- */
|
||||
|
||||
|
||||
#ifdef LT_NON_POSIX_NAMESPACE
|
||||
# define lt_ptr_t lt_ptr
|
||||
# define lt_module_t lt_module
|
||||
# define lt_module_open_t lt_module_open
|
||||
# define lt_module_close_t lt_module_close
|
||||
# define lt_find_sym_t lt_find_sym
|
||||
# define lt_dlloader_exit_t lt_dlloader_exit
|
||||
# define lt_dlloader_t lt_dlloader
|
||||
# define lt_dlloader_data_t lt_user_data
|
||||
#endif
|
||||
|
||||
LT_END_C_DECLS
|
||||
|
||||
#endif /* !LTDL_H */
|
|
@ -1,6 +1,6 @@
|
|||
## Process this file with automake to produce Makefile.in.
|
||||
##
|
||||
## Copyright (C) 2000, 2004 Free Software Foundation, Inc.
|
||||
## Copyright (C) 2000, 2004, 2006 Free Software Foundation, Inc.
|
||||
##
|
||||
## This file is part of GUILE.
|
||||
##
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;;; installed-scm-file
|
||||
|
||||
;;;; Copyright (C) 1998,1999,2000,2001,2002, 2003 Free Software Foundation, Inc.
|
||||
;;;; Copyright (C) 1998,1999,2000,2001,2002, 2003, 2006 Free Software Foundation, Inc.
|
||||
;;;;
|
||||
;;;; This library is free software; you can redistribute it and/or
|
||||
;;;; modify it under the terms of the GNU Lesser General Public
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
## Process this file with automake to produce Makefile.in.
|
||||
##
|
||||
## Copyright (C) 2000, 2001, 2004, 2005 Free Software Foundation, Inc.
|
||||
## Copyright (C) 2000, 2001, 2004, 2005, 2006 Free Software Foundation, Inc.
|
||||
##
|
||||
## This file is part of GUILE.
|
||||
##
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;;; Copyright (C) 1999, 2000, 2005 Free Software Foundation, Inc.
|
||||
;;;; Copyright (C) 1999, 2000, 2005, 2006 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;;; installed-scm-file
|
||||
|
||||
;;;; Copyright (C) 1999, 2001 Free Software Foundation, Inc.
|
||||
;;;; Copyright (C) 1999, 2001, 2006 Free Software Foundation, Inc.
|
||||
;;;;
|
||||
;;;; This library is free software; you can redistribute it and/or
|
||||
;;;; modify it under the terms of the GNU Lesser General Public
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;;; Copyright (C) 1999, 2001 Free Software Foundation, Inc.
|
||||
;;;; Copyright (C) 1999, 2001, 2006 Free Software Foundation, Inc.
|
||||
;;;;
|
||||
;;;; This library is free software; you can redistribute it and/or
|
||||
;;;; modify it under the terms of the GNU Lesser General Public
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;;; installed-scm-file
|
||||
|
||||
;;;; Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
|
||||
;;;; Copyright (C) 1999, 2000, 2001, 2006 Free Software Foundation, Inc.
|
||||
;;;;
|
||||
;;;; This library is free software; you can redistribute it and/or
|
||||
;;;; modify it under the terms of the GNU Lesser General Public
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;;; installed-scm-file
|
||||
|
||||
;;;; Copyright (C) 1998, 1999, 2001 Free Software Foundation, Inc.
|
||||
;;;; Copyright (C) 1998, 1999, 2001, 2006 Free Software Foundation, Inc.
|
||||
;;;;
|
||||
;;;; This library is free software; you can redistribute it and/or
|
||||
;;;; modify it under the terms of the GNU Lesser General Public
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;;; Copyright (C) 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
|
||||
;;;; Copyright (C) 1999, 2000, 2001, 2003, 2006 Free Software Foundation, Inc.
|
||||
;;;;
|
||||
;;;; This library is free software; you can redistribute it and/or
|
||||
;;;; modify it under the terms of the GNU Lesser General Public
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;;; installed-scm-file
|
||||
|
||||
;;;; Copyright (C) 1999, 2001 Free Software Foundation, Inc.
|
||||
;;;; Copyright (C) 1999, 2001, 2006 Free Software Foundation, Inc.
|
||||
;;;;
|
||||
;;;; This library is free software; you can redistribute it and/or
|
||||
;;;; modify it under the terms of the GNU Lesser General Public
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;;; installed-scm-file
|
||||
|
||||
;;;; Copyright (C) 2001 Free Software Foundation, Inc.
|
||||
;;;; Copyright (C) 2001, 2006 Free Software Foundation, Inc.
|
||||
;;;;
|
||||
;;;; This library is free software; you can redistribute it and/or
|
||||
;;;; modify it under the terms of the GNU Lesser General Public
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;;; installed-scm-file
|
||||
|
||||
;;;; Copyright (C) 2000,2001,2002 Free Software Foundation, Inc.
|
||||
;;;; Copyright (C) 2000,2001,2002, 2006 Free Software Foundation, Inc.
|
||||
;;;;
|
||||
;;;; This library is free software; you can redistribute it and/or
|
||||
;;;; modify it under the terms of the GNU Lesser General Public
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;;; installed-scm-file
|
||||
|
||||
;;;; Copyright (C) 2005 Free Software Foundation, Inc.
|
||||
;;;; Copyright (C) 2005, 2006 Free Software Foundation, Inc.
|
||||
;;;;
|
||||
;;;; This library is free software; you can redistribute it and/or
|
||||
;;;; modify it under the terms of the GNU Lesser General Public
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;;; Copyright (C) 1999,2002 Free Software Foundation, Inc.
|
||||
;;;; Copyright (C) 1999,2002, 2006 Free Software Foundation, Inc.
|
||||
;;;;
|
||||
;;;; This library is free software; you can redistribute it and/or
|
||||
;;;; modify it under the terms of the GNU Lesser General Public
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;;; Copyright (C) 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
|
||||
;;;; Copyright (C) 1999, 2000, 2001, 2003, 2006 Free Software Foundation, Inc.
|
||||
;;;;
|
||||
;;;; This library is free software; you can redistribute it and/or
|
||||
;;;; modify it under the terms of the GNU Lesser General Public
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
## Process this file with automake to produce Makefile.in.
|
||||
##
|
||||
## Copyright (C) 1998, 2000 Free Software Foundation, Inc.
|
||||
## Copyright (C) 1998, 2000, 2006 Free Software Foundation, Inc.
|
||||
##
|
||||
## This file is part of GUILE.
|
||||
##
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
## Process this file with automake to produce Makefile.in.
|
||||
##
|
||||
## Copyright (C) 1998, 2002 Free Software Foundation, Inc.
|
||||
## Copyright (C) 1998, 2002, 2006 Free Software Foundation, Inc.
|
||||
##
|
||||
## This file is part of GUILE.
|
||||
##
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
;;
|
||||
;; QuickThreads -- Threads-building toolkit.
|
||||
;; Copyright (c) 2001 Free Software Foundation, Inc.
|
||||
;; Copyright (c) 2001, 2006 Free Software Foundation, Inc.
|
||||
;;
|
||||
;; Permission to use, copy, modify and distribute this software and
|
||||
;; its documentation for any purpose and without fee is hereby
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
## Process this file with automake to produce Makefile.in.
|
||||
##
|
||||
## Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
## Copyright (C) 1998, 2006 Free Software Foundation, Inc.
|
||||
##
|
||||
## This file is part of GUILE.
|
||||
##
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
## Process this file with automake to produce Makefile.in.
|
||||
##
|
||||
## Copyright (C) 2002 Free Software Foundation, Inc.
|
||||
## Copyright (C) 2002, 2006 Free Software Foundation, Inc.
|
||||
##
|
||||
## This file is part of GUILE.
|
||||
##
|
||||
|
|
|
@ -5,7 +5,7 @@ exec ${GUILE-guile} -l $0 -c "(apply $main (cdr (command-line)))" "$@"
|
|||
!#
|
||||
;;; PROGRAM --- Does something
|
||||
|
||||
;; Copyright (C) 2002 Free Software Foundation, Inc.
|
||||
;; Copyright (C) 2002, 2006 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
|
||||
|
|
|
@ -5,7 +5,7 @@ exec ${GUILE-guile} -l $0 -c "(apply $main (cdr (command-line)))" "$@"
|
|||
!#
|
||||
;;; api-diff --- diff guile-api.alist files
|
||||
|
||||
;; Copyright (C) 2002 Free Software Foundation, Inc.
|
||||
;; Copyright (C) 2002, 2006 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
|
||||
|
|
|
@ -5,7 +5,7 @@ exec ${GUILE-guile} -l $0 -c "(apply $main (cdr (command-line)))" "$@"
|
|||
!#
|
||||
;;; autofrisk --- Generate module checks for use with auto* tools
|
||||
|
||||
;; Copyright (C) 2002 Free Software Foundation, Inc.
|
||||
;; Copyright (C) 2002, 2006 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
|
||||
|
|
|
@ -5,7 +5,7 @@ exec ${GUILE-guile} -l $0 -c "(apply $main (cdr (command-line)))" "$@"
|
|||
!#
|
||||
;;; display-commentary --- As advertized
|
||||
|
||||
;; Copyright (C) 2001 Free Software Foundation, Inc.
|
||||
;; Copyright (C) 2001, 2006 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
|
||||
|
|
|
@ -5,7 +5,7 @@ exec ${GUILE-guile} -l $0 -c "(apply $main (cdr (command-line)))" "$@"
|
|||
!#
|
||||
;;; doc-snarf --- Extract documentation from source files
|
||||
|
||||
;; Copyright (C) 2001 Free Software Foundation, Inc.
|
||||
;; Copyright (C) 2001, 2006 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
|
||||
|
|
|
@ -5,7 +5,7 @@ exec ${GUILE-guile} -l $0 -c "(apply $main (cdr (command-line)))" "$@"
|
|||
!#
|
||||
;;; frisk --- Grok the module interfaces of a body of files
|
||||
|
||||
;; Copyright (C) 2002 Free Software Foundation, Inc.
|
||||
;; Copyright (C) 2002, 2006 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
|
||||
|
|
|
@ -5,7 +5,7 @@ exec ${GUILE-guile} -l $0 -c "(apply $main (cdr (command-line)))" "$@"
|
|||
!#
|
||||
;;; generate-autoload --- Display define-module form with autoload info
|
||||
|
||||
;; Copyright (C) 2001 Free Software Foundation, Inc.
|
||||
;; Copyright (C) 2001, 2006 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
|
||||
|
|
|
@ -5,7 +5,7 @@ exec ${GUILE-guile} -l $0 -c "(apply $main (cdr (command-line)))" "$@"
|
|||
!#
|
||||
;;; lint --- Preemptive checks for coding errors in Guile Scheme code
|
||||
|
||||
;; Copyright (C) 2002 Free Software Foundation, Inc.
|
||||
;; Copyright (C) 2002, 2006 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
|
||||
|
|
|
@ -5,7 +5,7 @@ exec ${GUILE-guile} -l $0 -c "(apply $main (cdr (command-line)))" "$@"
|
|||
!#
|
||||
;;; punify --- Display Scheme code w/o unnecessary comments / whitespace
|
||||
|
||||
;; Copyright (C) 2001 Free Software Foundation, Inc.
|
||||
;; Copyright (C) 2001, 2006 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
|
||||
|
|
|
@ -5,7 +5,7 @@ exec ${GUILE-guile} -l $0 -c "(apply $main (cdr (command-line)))" "$@"
|
|||
!#
|
||||
;;; read-rfc822 --- Validate RFC822 file by displaying it to stdout
|
||||
|
||||
;; Copyright (C) 2002, 2004 Free Software Foundation, Inc.
|
||||
;; Copyright (C) 2002, 2004, 2006 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
|
||||
|
|
|
@ -5,7 +5,7 @@ exec ${GUILE-guile} -l $0 -c "(apply $main (cdr (command-line)))" "$@"
|
|||
!#
|
||||
;;; read-scheme-source --- Read a file, recognizing scheme forms and comments
|
||||
|
||||
;; Copyright (C) 2001 Free Software Foundation, Inc.
|
||||
;; Copyright (C) 2001, 2006 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
|
||||
|
|
|
@ -5,7 +5,7 @@ exec ${GUILE-guile} -l $0 -c "(apply $main (cdr (command-line)))" "$@"
|
|||
!#
|
||||
;;; read-text-outline --- Read a text outline and display it as a sexp
|
||||
|
||||
;; Copyright (C) 2002 Free Software Foundation, Inc.
|
||||
;; Copyright (C) 2002, 2006 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
|
||||
|
|
|
@ -5,7 +5,7 @@ exec ${GUILE-guile} -l $0 -c "(apply $main (cdr (command-line)))" "$@"
|
|||
!#
|
||||
;;; scan-api --- Scan and group interpreter and libguile interface elements
|
||||
|
||||
;; Copyright (C) 2002 Free Software Foundation, Inc.
|
||||
;; Copyright (C) 2002, 2006 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
|
||||
|
|
|
@ -5,7 +5,7 @@ exec ${GUILE-guile} -l $0 -c "(apply $main (cdr (command-line)))" "$@"
|
|||
!#
|
||||
;;; snarf-check-and-output-texi --- called by the doc snarfer.
|
||||
|
||||
;; Copyright (C) 2001, 2002 Free Software Foundation, Inc.
|
||||
;; Copyright (C) 2001, 2002, 2006 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
|
||||
|
|
|
@ -5,7 +5,7 @@ exec ${GUILE-guile} -l $0 -c "(apply $main (cdr (command-line)))" "$@"
|
|||
!#
|
||||
;;; snarf-guile-m4-docs --- Parse guile.m4 comments for texi documentation
|
||||
|
||||
;; Copyright (C) 2002 Free Software Foundation, Inc.
|
||||
;; Copyright (C) 2002, 2006 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
|
||||
|
|
|
@ -5,7 +5,7 @@ exec ${GUILE-guile} -l $0 -c "(apply $main (cdr (command-line)))" "$@"
|
|||
!#
|
||||
;;; summarize-guile-TODO --- Display Guile TODO list in various ways
|
||||
|
||||
;; Copyright (C) 2002 Free Software Foundation, Inc.
|
||||
;; Copyright (C) 2002, 2006 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
|
||||
|
|
|
@ -5,7 +5,7 @@ exec ${GUILE-guile} -l $0 -c "(apply $main (cdr (command-line)))" "$@"
|
|||
!#
|
||||
;;; use2dot --- Display module dependencies as a DOT specification
|
||||
|
||||
;; Copyright (C) 2001 Free Software Foundation, Inc.
|
||||
;; Copyright (C) 2001, 2006 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
|
||||
|
|
|
@ -1,3 +1,45 @@
|
|||
2006-04-16 Kevin Ryde <user42@zip.com.au>
|
||||
|
||||
* tests/filesys.test (lstat, stat): New tests.
|
||||
* tests/ports.test (truncate-file): New tests.
|
||||
|
||||
2006-03-28 Kevin Ryde <user42@zip.com.au>
|
||||
|
||||
* Makefile.am (SCM_TESTS): Remove slib.test, it fails with current
|
||||
slib and the ice-9 slib module is due for revision soon.
|
||||
|
||||
2006-03-19 Kevin Ryde <user42@zip.com.au>
|
||||
|
||||
* tests/unif.test (make-shared-array): Another test which failed in
|
||||
1.8.0 but is ok now.
|
||||
|
||||
2006-03-05 Kevin Ryde <user42@zip.com.au>
|
||||
|
||||
* tests/unif.test (make-shared-array): Add example usages from the
|
||||
manual, two of which currently fail.
|
||||
|
||||
2006-03-04 Ludovic Courtès <ludovic.courtes@laas.fr>
|
||||
|
||||
* test-suite/tests/modules.test: New file.
|
||||
* test-suite/Makefile.am (SCM_TESTS): Added it.
|
||||
|
||||
2006-02-26 Kevin Ryde <user42@zip.com.au>
|
||||
|
||||
* tests/filesys.test (opendir etc): Exercise a little.
|
||||
|
||||
* tests/strings.test (string<?, string-ci<?, string<=?, string-ci<=?,
|
||||
string>?, string-ci>?, string>=?, string-ci>=?): Check ordering is the
|
||||
same as char<? etc. Use a define-module to keep private test bits
|
||||
private.
|
||||
* tests/srfi-13.test (string-compare, string-compare-ci): Ditto.
|
||||
|
||||
* tests/unif.test (array-set!): Exercise bitvector case, which had
|
||||
been seg faulting.
|
||||
|
||||
2006-02-07 Kevin Ryde <user42@zip.com.au>
|
||||
|
||||
* tests/poe.test (pure-funcq): New tests.
|
||||
|
||||
2006-02-04 Neil Jerram <neil@ossau.uklinux.net>
|
||||
|
||||
* tests/exceptions.test: 19 new test cases.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
## Process this file with automake to produce Makefile.in.
|
||||
##
|
||||
## Copyright 2001, 2002, 2003, 2004, 2005 Software Foundation, Inc.
|
||||
## Copyright 2001, 2002, 2003, 2004, 2005, 2006 Software Foundation, Inc.
|
||||
##
|
||||
## This file is part of GUILE.
|
||||
##
|
||||
|
@ -46,6 +46,7 @@ SCM_TESTS = tests/alist.test \
|
|||
tests/interp.test \
|
||||
tests/list.test \
|
||||
tests/load.test \
|
||||
tests/modules.test \
|
||||
tests/multilingual.nottest \
|
||||
tests/numbers.test \
|
||||
tests/optargs.test \
|
||||
|
@ -61,7 +62,6 @@ SCM_TESTS = tests/alist.test \
|
|||
tests/reader.test \
|
||||
tests/receive.test \
|
||||
tests/regexp.test \
|
||||
tests/slib.test \
|
||||
tests/socket.test \
|
||||
tests/srcprop.test \
|
||||
tests/srfi-1.test \
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
;;;; guile-test --- run the Guile test suite
|
||||
;;;; Jim Blandy <jimb@red-bean.com> --- May 1999
|
||||
;;;;
|
||||
;;;; Copyright (C) 1999, 2001 Free Software Foundation, Inc.
|
||||
;;;; Copyright (C) 1999, 2001, 2006 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
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
;;;; test-suite/lib.scm --- generic support for testing
|
||||
;;;; Copyright (C) 1999, 2000, 2001, 2004 Free Software Foundation, Inc.
|
||||
;;;; Copyright (C) 1999, 2000, 2001, 2004, 2006 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
|
||||
|
|
|
@ -10,3 +10,4 @@ test-gh
|
|||
test-num2integral
|
||||
test-round
|
||||
test-unwind
|
||||
test-list
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 1999,2000,2001,2003 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1999,2000,2001,2003, 2006 Free Software Foundation, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 1999,2000,2001,2003,2004 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1999,2000,2001,2003,2004, 2006 Free Software Foundation, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 1999,2000,2001,2003 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1999,2000,2001,2003, 2006 Free Software Foundation, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 1999,2000,2001,2003,2004 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1999,2000,2001,2003,2004, 2006 Free Software Foundation, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 2004 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2004, 2006 Free Software Foundation, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
;;;; alist.test --- tests guile's alists -*- scheme -*-
|
||||
;;;; Copyright (C) 1999, 2001 Free Software Foundation, Inc.
|
||||
;;;; Copyright (C) 1999, 2001, 2006 Free Software Foundation, Inc.
|
||||
;;;;
|
||||
;;;; This library is free software; you can redistribute it and/or
|
||||
;;;; modify it under the terms of the GNU Lesser General Public
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;;;; and-let-star.test --- Tests for Guile and-let-star module. -*- scheme -*-
|
||||
;;;;
|
||||
;;;; Copyright (C) 2004 Free Software Foundation, Inc.
|
||||
;;;; Copyright (C) 2004, 2006 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;;;; arbiters.test --- test arbiters functions -*- scheme -*-
|
||||
;;;;
|
||||
;;;; Copyright (C) 2004 Free Software Foundation, Inc.
|
||||
;;;; Copyright (C) 2004, 2006 Free Software Foundation, Inc.
|
||||
;;;;
|
||||
;;;; This library is free software; you can redistribute it and/or
|
||||
;;;; modify it under the terms of the GNU Lesser General Public
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
;;;; bit-operations.test --- bitwise operations on numbers -*- scheme -*-
|
||||
;;;; Copyright (C) 2000, 2001, 2003 Free Software Foundation, Inc.
|
||||
;;;; Copyright (C) 2000, 2001, 2003, 2006 Free Software Foundation, Inc.
|
||||
;;;;
|
||||
;;;; This library is free software; you can redistribute it and/or
|
||||
;;;; modify it under the terms of the GNU Lesser General Public
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
;;;; c-api.test --- complementary test suite for the c-api -*- scheme -*-
|
||||
;;;; MDJ 990915 <djurfeldt@nada.kth.se>
|
||||
;;;;
|
||||
;;;; Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
;;;; Copyright (C) 1999, 2006 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
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
;;;; chars.test --- test suite for Guile's char functions -*- scheme -*-
|
||||
;;;; Greg J. Badros <gjb@cs.washington.edu>
|
||||
;;;;
|
||||
;;;; Copyright (C) 2000 Free Software Foundation, Inc.
|
||||
;;;; Copyright (C) 2000, 2006 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
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
;;;; common-list.test --- tests guile's common list functions -*- scheme -*-
|
||||
;;;; Copyright (C) 2000, 2001, 2004 Free Software Foundation, Inc.
|
||||
;;;; Copyright (C) 2000, 2001, 2004, 2006 Free Software Foundation, Inc.
|
||||
;;;;
|
||||
;;;; This library is free software; you can redistribute it and/or
|
||||
;;;; modify it under the terms of the GNU Lesser General Public
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
;;;; -*- scheme -*-
|
||||
;;;; continuations.test --- test suite for continutations
|
||||
;;;;
|
||||
;;;; Copyright (C) 2003 Free Software Foundation, Inc.
|
||||
;;;; Copyright (C) 2003, 2006 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
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
;;;; -*- scheme -*-
|
||||
;;;; dynamic-scop.test --- test suite for dynamic scoping constructs
|
||||
;;;;
|
||||
;;;; Copyright (C) 2001 Free Software Foundation, Inc.
|
||||
;;;; Copyright (C) 2001, 2006 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
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
;;;; elisp.test --- tests guile's elisp support -*- scheme -*-
|
||||
;;;; Copyright (C) 2002, 2003 Free Software Foundation, Inc.
|
||||
;;;; Copyright (C) 2002, 2003, 2006 Free Software Foundation, Inc.
|
||||
;;;;
|
||||
;;;; This library is free software; you can redistribute it and/or
|
||||
;;;; modify it under the terms of the GNU Lesser General Public
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
;;;; environments.test -*- scheme -*-
|
||||
;;;; Copyright (C) 2000, 2001 Free Software Foundation, Inc.
|
||||
;;;; Copyright (C) 2000, 2001, 2006 Free Software Foundation, Inc.
|
||||
;;;;
|
||||
;;;; This library is free software; you can redistribute it and/or
|
||||
;;;; modify it under the terms of the GNU Lesser General Public
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
;;;; eval.test --- tests guile's evaluator -*- scheme -*-
|
||||
;;;; Copyright (C) 2000, 2001 Free Software Foundation, Inc.
|
||||
;;;; Copyright (C) 2000, 2001, 2006 Free Software Foundation, Inc.
|
||||
;;;;
|
||||
;;;; This library is free software; you can redistribute it and/or
|
||||
;;;; modify it under the terms of the GNU Lesser General Public
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
;;;; exceptions.test --- tests for Guile's exception handling -*- scheme -*-
|
||||
;;;; Copyright (C) 2001, 2003, 2004 Free Software Foundation, Inc.
|
||||
;;;; Copyright (C) 2001, 2003, 2004, 2006 Free Software Foundation, Inc.
|
||||
;;;;
|
||||
;;;; This library is free software; you can redistribute it and/or
|
||||
;;;; modify it under the terms of the GNU Lesser General Public
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;;;; filesys.test --- test file system functions -*- scheme -*-
|
||||
;;;;
|
||||
;;;; Copyright (C) 2004 Free Software Foundation, Inc.
|
||||
;;;; Copyright (C) 2004, 2006 Free Software Foundation, Inc.
|
||||
;;;;
|
||||
;;;; This library is free software; you can redistribute it and/or
|
||||
;;;; modify it under the terms of the GNU Lesser General Public
|
||||
|
@ -17,7 +17,14 @@
|
|||
;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
(define-module (test-suite test-filesys)
|
||||
#:use-module (test-suite lib))
|
||||
#:use-module (test-suite lib)
|
||||
#:use-module (test-suite guile-test))
|
||||
|
||||
(define (test-file)
|
||||
(data-file-name "filesys-test.tmp"))
|
||||
(define (test-symlink)
|
||||
(data-file-name "filesys-test-link.tmp"))
|
||||
|
||||
|
||||
;;;
|
||||
;;; copy-file
|
||||
|
@ -37,3 +44,84 @@
|
|||
(let ((old-next (next-fd)))
|
||||
(false-if-exception (copy-file "/dev/null" "no/such/dir/foo"))
|
||||
(= old-next (next-fd)))))
|
||||
|
||||
;;;
|
||||
;;; lstat
|
||||
;;;
|
||||
|
||||
(with-test-prefix "lstat"
|
||||
|
||||
(pass-if "normal file"
|
||||
(call-with-output-file (test-file)
|
||||
(lambda (port)
|
||||
(display "hello" port)))
|
||||
(eqv? 5 (stat:size (lstat (test-file)))))
|
||||
|
||||
(call-with-output-file (test-file)
|
||||
(lambda (port)
|
||||
(display "hello" port)))
|
||||
(delete-file (test-symlink))
|
||||
(if (not (false-if-exception
|
||||
(begin (symlink (test-file) (test-symlink)) #t)))
|
||||
(display "cannot create symlink, lstat test skipped\n")
|
||||
(pass-if "symlink"
|
||||
;; not much to test, except that it works
|
||||
(->bool (lstat (test-symlink))))))
|
||||
|
||||
;;;
|
||||
;;; opendir and friends
|
||||
;;;
|
||||
|
||||
(with-test-prefix "opendir"
|
||||
|
||||
(with-test-prefix "root directory"
|
||||
(let ((d (opendir "/")))
|
||||
(pass-if "not empty"
|
||||
(string? (readdir d)))
|
||||
(pass-if "all entries are strings"
|
||||
(let more ()
|
||||
(let ((f (readdir d)))
|
||||
(cond ((string? f)
|
||||
(more))
|
||||
((eof-object? f)
|
||||
#t)
|
||||
(else
|
||||
#f)))))
|
||||
(closedir d))))
|
||||
|
||||
;;;
|
||||
;;; stat
|
||||
;;;
|
||||
|
||||
(with-test-prefix "stat"
|
||||
|
||||
(with-test-prefix "filename"
|
||||
|
||||
(pass-if "size"
|
||||
(call-with-output-file (test-file)
|
||||
(lambda (port)
|
||||
(display "hello" port)))
|
||||
(eqv? 5 (stat:size (stat (test-file))))))
|
||||
|
||||
(with-test-prefix "file descriptor"
|
||||
|
||||
(pass-if "size"
|
||||
(call-with-output-file (test-file)
|
||||
(lambda (port)
|
||||
(display "hello" port)))
|
||||
(let* ((fd (open-fdes (test-file) O_RDONLY))
|
||||
(st (stat fd)))
|
||||
(close-fdes fd)
|
||||
(eqv? 5 (stat:size st)))))
|
||||
|
||||
(with-test-prefix "port"
|
||||
|
||||
(pass-if "size"
|
||||
(call-with-output-file (test-file)
|
||||
(lambda (port)
|
||||
(display "hello" port)))
|
||||
(let* ((port (open-file (test-file) "r+"))
|
||||
(st (stat port)))
|
||||
(close-port port)
|
||||
(eqv? 5 (stat:size st))))))
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
;;;; format.test --- test suite for Guile's CL-ish format -*- scheme -*-
|
||||
;;;; Matthias Koeppe <mkoeppe@mail.math.uni-magdeburg.de> --- June 2001
|
||||
;;;;
|
||||
;;;; Copyright (C) 2001, 2003, 2004 Free Software Foundation, Inc.
|
||||
;;;; Copyright (C) 2001, 2003, 2004, 2006 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
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue