summaryrefslogtreecommitdiff
path: root/meta
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2011-04-14 23:42:28 +0200
committerLudovic Courtès <ludo@gnu.org>2011-04-15 00:09:16 +0200
commit073167ef7b803067bcc8be19925fac1a48577bd8 (patch)
treec54db78672d35a9dd1c542cefc705bbd65aeb87a /meta
parent22072f2155f657ff229bf8aaaa00318b60e8d6e5 (diff)
downloadguile-073167ef7b803067bcc8be19925fac1a48577bd8.tar.gz
Allow compilation with `--disable-posix'.
Reported by Dmitry Dzhus <dima@dzhus.org>. * configure.ac: Remove `AC_LIBOBJ([filesys])'. Document `--disable-posix' as omitting non-essential POSIX interfaces. * libguile/Makefile.am (libguile_@GUILE_EFFECTIVE_VERSION@_la_SOURCES): Add `filesys.c'. (DOT_DOC_FILES): Add `filesys.doc'. (EXTRA_libguile_@GUILE_EFFECTIVE_VERSION@_la_SOURCES): Remove `filesys.c'. * libguile/posix.c (scm_mkstemp, scm_access): Move to `filesys.c'. (scm_init_posix): Move `R_OK' etc. to `filesys.c'. * libguile/filesys.c (scm_chown, scm_chmod, scm_umask, scm_open_fdes, scm_open, scm_close, scm_close_fdes, scm_link, scm_tc16_dir, scm_directory_stream_p, scm_opendir, scm_readdir, scm_rewinddir, scm_closedir, scm_dir_print, scm_dir_free, scm_chdir, scm_getcwd, set_element, fill_select_type, get_element, retrieve_select_type, scm_select, scm_fcntl, scm_fsync, scm_symlink, scm_readlink, scm_lstat, scm_copy_file): Conditionalize on HAVE_POSIX. (scm_mkstemp, scm_access): New functions. (scm_init_filesys): Conditionalize `scm_tc16_dir', `O_RDONLY', etc. on HAVE_POSIX. Define `R_OK', `W_OK', etc. * libguile/fports.c (fport_print): Use `scm_ttyname' only when HAVE_POSIX. * libguile/i18n.c (lock_locale_mutex, unlock_locale_mutex): New functions. Update users of `scm_i_locale_mutex' to use them. * libguile/init.c (scm_i_init_guile): Always call `scm_init_filesys'. * meta/guile-tools.in (main): Use `setlocale' only when it is defined. * module/ice-9/boot-9.scm: Always load `ice-9/posix'.
Diffstat (limited to 'meta')
-rwxr-xr-xmeta/guile-tools.in4
1 files changed, 3 insertions, 1 deletions
diff --git a/meta/guile-tools.in b/meta/guile-tools.in
index a0822aefe..7f156ffd9 100755
--- a/meta/guile-tools.in
+++ b/meta/guile-tools.in
@@ -174,7 +174,9 @@ There is NO WARRANTY, to the extent permitted by law.
(else (values (reverse options) args))))))
(define (main args)
- (setlocale LC_ALL "")
+ (if (defined? 'setlocale)
+ (setlocale LC_ALL ""))
+
(call-with-values (lambda () (getopt args *option-grammar*))
(lambda (options args)
(cond