diff options
author | Andy Wingo <wingo@pobox.com> | 2013-02-19 11:41:44 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2013-02-19 15:00:11 +0100 |
commit | 9b6316eabcd3438ca01d1bf7269702af24c3ec5f (patch) | |
tree | 4b9fa2369885ae6f3193501f29442d6684b78263 /libguile/filesys.c | |
parent | 90a162323251bfda86d82b2a3c0c7b12ce8a0bb7 (diff) | |
download | guile-9b6316eabcd3438ca01d1bf7269702af24c3ec5f.tar.gz |
better handling of windows file name conventions
* libguile/filesys.c (scm_system_file_name_convention): New function.
Exported to Scheme only.
* module/ice-9/boot-9.scm (file-name-separator?, absolute-file-name?):
New predicates.
(file-name-separator-string): New global variable.
(in-vicinity): Use the new procedures.
(load-user-init, try-module-autoload): Use file-name-separator-string.
(load-in-vicinity): Update canonical->suffix. Consistently use the
term "file name" throughout.
* module/ice-9/psyntax.scm (include): Use global `absolute-file-name?'.
* module/ice-9/psyntax-pp.scm: Regenerate.
Diffstat (limited to 'libguile/filesys.c')
-rw-r--r-- | libguile/filesys.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/libguile/filesys.c b/libguile/filesys.c index 9c39307b6..94d824e85 100644 --- a/libguile/filesys.c +++ b/libguile/filesys.c @@ -1,5 +1,5 @@ /* Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2004, 2006, - * 2009, 2010, 2011, 2012 Free Software Foundation, Inc. + * 2009, 2010, 2011, 2012, 2013 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 @@ -1434,6 +1434,24 @@ SCM_DEFINE (scm_mkstemp, "mkstemp!", 1, 0, 0, SCM scm_dot_string; +#ifdef __MINGW32__ +SCM_SYMBOL (sym_file_name_convention, "windows"); +#else +SCM_SYMBOL (sym_file_name_convention, "posix"); +#endif + +SCM_INTERNAL SCM scm_system_file_name_convention (void); + +SCM_DEFINE (scm_system_file_name_convention, + "system-file-name-convention", 0, 0, 0, (void), + "Return either @code{posix} or @code{windows}, depending on\n" + "what kind of system this Guile is running on.") +#define FUNC_NAME s_scm_system_file_name_convention +{ + return sym_file_name_convention; +} +#undef FUNC_NAME + SCM_DEFINE (scm_dirname, "dirname", 1, 0, 0, (SCM filename), "Return the directory name component of the file name\n" |