mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 11:40:18 +02:00
* files.c (scm_sys_delete_file): Moved to filesys.c.
File is now empty; deleted. * files.h: Deleted. * filesys.c: scm_sys_delete_file is now here. Remove #if's; they seem to rely on remnants of an old portability regimen. If the problems come up again, solve them properly, using autoconf. Specifically: Don't test M_SYSV, and #define remove to be unlink if it's #defined; don't use remove just because HAVE_STDC_HEADERS is #defined. * filesys.h: Add declarations for scm_sys_delete_file. * Makefile.in (libobjs, inner_h_files, c_files, gen_c_files): Omit files.o, files.h, files.c, and files.x. * init.c: Don't #include "files.h", and don't call scm_init_files.
This commit is contained in:
parent
35440081d7
commit
2f3ed1ba2c
4 changed files with 21 additions and 11 deletions
|
@ -93,7 +93,6 @@ libobjs= alist.o \
|
|||
extchrs.o \
|
||||
fdsocket.o \
|
||||
feature.o \
|
||||
files.o \
|
||||
filesys.o \
|
||||
fports.o \
|
||||
gc.o \
|
||||
|
@ -170,7 +169,6 @@ inner_h_files= __scm.h \
|
|||
extchrs.h \
|
||||
fdsocket.h \
|
||||
feature.h \
|
||||
files.h \
|
||||
filesys.h \
|
||||
fports.h \
|
||||
gc.h \
|
||||
|
@ -244,7 +242,6 @@ c_files= alist.c \
|
|||
extchrs.c \
|
||||
fdsocket.c \
|
||||
feature.c \
|
||||
files.c \
|
||||
filesys.c \
|
||||
fports.c \
|
||||
gc.c \
|
||||
|
@ -314,7 +311,6 @@ gen_c_files= alist.x \
|
|||
extchrs.x \
|
||||
fdsocket.x \
|
||||
feature.x \
|
||||
files.x \
|
||||
filesys.x \
|
||||
fports.x \
|
||||
gc.x \
|
||||
|
@ -559,10 +555,6 @@ feature.o: feature.c _scm.h __scm.h scmconfig.h \
|
|||
tags.h error.h __scm.h pairs.h list.h gc.h \
|
||||
marksweep.h gsubr.h procs.h numbers.h symbols.h boolean.h \
|
||||
strings.h vectors.h root.h ports.h async.h feature.h feature.x
|
||||
files.o: files.c _scm.h __scm.h scmconfig.h \
|
||||
tags.h error.h __scm.h pairs.h list.h gc.h \
|
||||
marksweep.h gsubr.h procs.h numbers.h symbols.h boolean.h \
|
||||
strings.h vectors.h root.h ports.h async.h files.h files.x
|
||||
filesys.o: filesys.c _scm.h __scm.h scmconfig.h \
|
||||
tags.h error.h __scm.h pairs.h list.h gc.h \
|
||||
marksweep.h gsubr.h procs.h numbers.h symbols.h boolean.h \
|
||||
|
@ -612,7 +604,7 @@ init.o: init.c _scm.h __scm.h scmconfig.h \
|
|||
marksweep.h gsubr.h procs.h numbers.h symbols.h boolean.h \
|
||||
strings.h vectors.h root.h ports.h async.h alist.h append.h \
|
||||
arbiters.h chars.h continuations.h debug.h options.h \
|
||||
dynwind.h eq.h eval.h fdsocket.h feature.h files.h filesys.h fports.h \
|
||||
dynwind.h eq.h eval.h fdsocket.h feature.h filesys.h fports.h \
|
||||
ports.h gdbint.h hash.h hashtab.h ioext.h kw.h load.h \
|
||||
mallocs.h mbstrings.h symbols.h objprop.h options.h \
|
||||
posix.h print.h procprop.h ramap.h read.h scmsigs.h sequences.h \
|
||||
|
|
|
@ -689,6 +689,24 @@ scm_sys_rename (oldname, newname)
|
|||
}
|
||||
|
||||
|
||||
SCM_PROC(s_sys_delete_file, "delete-file", 1, 0, 0, scm_sys_delete_file);
|
||||
#ifdef __STDC__
|
||||
SCM
|
||||
scm_sys_delete_file (SCM str)
|
||||
#else
|
||||
SCM
|
||||
scm_sys_delete_file (str)
|
||||
SCM str;
|
||||
#endif
|
||||
{
|
||||
int ans;
|
||||
SCM_ASSERT (SCM_NIMP (str) && SCM_STRINGP (str), str, SCM_ARG1, s_sys_delete_file);
|
||||
SCM_SYSCALL (ans = unlink (SCM_CHARS (str)));
|
||||
if (ans != 0)
|
||||
SCM_SYSERROR (s_sys_delete_file);
|
||||
return SCM_UNSPECIFIED;
|
||||
}
|
||||
|
||||
|
||||
SCM_PROC (s_sys_mkdir, "mkdir", 1, 1, 0, scm_sys_mkdir);
|
||||
#ifdef __STDC__
|
||||
|
|
|
@ -85,6 +85,7 @@ extern SCM scm_sys_dup (SCM oldfd, SCM newfd);
|
|||
extern SCM scm_sys_stat (SCM fd_or_path);
|
||||
extern SCM scm_sys_link (SCM oldpath, SCM newpath);
|
||||
extern SCM scm_sys_rename (SCM oldname, SCM newname);
|
||||
extern SCM scm_sys_delete_file (SCM str);
|
||||
extern SCM scm_sys_mkdir (SCM path, SCM mode);
|
||||
extern SCM scm_sys_rmdir (SCM path);
|
||||
extern SCM scm_sys_opendir (SCM dirname);
|
||||
|
@ -115,6 +116,7 @@ extern SCM scm_sys_dup ();
|
|||
extern SCM scm_sys_stat ();
|
||||
extern SCM scm_sys_link ();
|
||||
extern SCM scm_sys_rename ();
|
||||
extern SCM scm_sys_delete_file ();
|
||||
extern SCM scm_sys_mkdir ();
|
||||
extern SCM scm_sys_rmdir ();
|
||||
extern SCM scm_sys_opendir ();
|
||||
|
|
|
@ -60,7 +60,6 @@
|
|||
#include "eval.h"
|
||||
#include "fdsocket.h"
|
||||
#include "feature.h"
|
||||
#include "files.h"
|
||||
#include "filesys.h"
|
||||
#include "fports.h"
|
||||
#include "gc.h"
|
||||
|
@ -367,7 +366,6 @@ scm_boot_guile (result, argc, argv, in, out, err, init_func, boot_cmd)
|
|||
scm_init_error ();
|
||||
scm_init_fdsocket ();
|
||||
scm_init_fports ();
|
||||
scm_init_files ();
|
||||
scm_init_filesys ();
|
||||
scm_init_gc ();
|
||||
scm_init_gdbint ();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue