1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-29 14:30:34 +02:00

* filesys.c (scm_chown): omit port/fdes support if HAVE_FCHOWN is

not defined (thanks to Richard Y. Kim).
This commit is contained in:
Gary Houston 2000-01-23 20:25:27 +00:00
parent b5f69988c1
commit d831b03918
5 changed files with 23 additions and 12 deletions

View file

@ -1,3 +1,7 @@
2000-01-23 Gary Houston <ghouston@arglist.com>
* configure.in: check for fchown.
Tue Jan 18 12:55:15 2000 Mikael Djurfeldt <mdj@r11n07-s.pdc.kth.se>
* acinclude.m4 (AC_LIBLTDL_CONVENIENCE): Add $(top_srcdir)/libltdl

1
THANKS
View file

@ -15,6 +15,7 @@ For fixes or providing information which led to a fix:
Mark Galassi
Greg Harvey
Dirk Herrmann
Richard Kim
Brad Knotwell
Eric Moore
Roland Orre

View file

@ -163,7 +163,7 @@ AC_SUBST(INCLTDL)
AC_SUBST(LIBLTDL)
AC_SUBST(DLPREOPEN)
AC_CHECK_FUNCS(ctermid ftime getcwd geteuid gettimeofday lstat mkdir mknod nice readlink rename rmdir select setegid seteuid setlocale setpgid setsid sigaction siginterrupt strftime strptime symlink sync tcgetpgrp tcsetpgrp times uname waitpid bzero strdup system usleep atexit on_exit)
AC_CHECK_FUNCS(ctermid ftime fchown getcwd geteuid gettimeofday lstat mkdir mknod nice readlink rename rmdir select setegid seteuid setlocale setpgid setsid sigaction siginterrupt strftime strptime symlink sync tcgetpgrp tcsetpgrp times uname waitpid bzero strdup system usleep atexit on_exit)
### Some systems don't declare some functions. On such systems, we
### need to at least provide our own K&R-style declarations.

View file

@ -1,3 +1,8 @@
2000-01-23 Gary Houston <ghouston@arglist.com>
* filesys.c (scm_chown): omit port/fdes support if HAVE_FCHOWN is
not defined (thanks to Richard Y. Kim).
Thu Jan 20 13:00:38 2000 Greg J. Badros <gjb@cs.washington.edu>
* Makefile.in: Removed, this is auto-generated.

View file

@ -124,13 +124,13 @@
SCM_DEFINE (scm_chown, "chown", 3, 0, 0,
(SCM object, SCM owner, SCM group),
"Change the ownership and group of the file referred to by @var{obj} to\n"
"the integer userid values @var{owner} and @var{group}. @var{obj} can be\n"
"a string containing a file name or a port or integer file descriptor\n"
"which is open on the file (in which case fchown is used as the underlying\n"
"system call). The return value\n"
"Change the ownership and group of the file referred to by @var{object} to\n"
"the integer values @var{owner} and @var{group}. @var{object} can be\n"
"a string containing a file name or, if the platform\n"
"supports fchown, a port or integer file descriptor\n"
"which is open on the file. The return value\n"
"is unspecified.\n\n"
"If @var{obj} is a symbolic link, either the\n"
"If @var{object} is a symbolic link, either the\n"
"ownership of the link or the ownership of the referenced file will be\n"
"changed depending on the operating system (lchown is\n"
"unsupported at present). If @var{owner} or @var{group} is specified\n"
@ -138,21 +138,21 @@ SCM_DEFINE (scm_chown, "chown", 3, 0, 0,
#define FUNC_NAME s_scm_chown
{
int rv;
int fdes;
object = SCM_COERCE_OUTPORT (object);
SCM_VALIDATE_INUM (2,owner);
SCM_VALIDATE_INUM (3,group);
#ifdef HAVE_FCHOWN
if (SCM_INUMP (object) || (SCM_OPFPORTP (object)))
{
if (SCM_INUMP (object))
fdes = SCM_INUM (object);
else
fdes = SCM_FPORT_FDES (object);
int fdes = SCM_INUMP (object) ? SCM_INUM (object)
: SCM_FPORT_FDES (object);
SCM_SYSCALL (rv = fchown (fdes, SCM_INUM (owner), SCM_INUM (group)));
}
else
#endif
{
SCM_VALIDATE_ROSTRING(1,object);
SCM_COERCE_SUBSTR (object);
@ -821,6 +821,7 @@ static int
set_element (SELECT_TYPE *set, SCM element, int arg)
{
int fd;
element = SCM_COERCE_OUTPORT (element);
if (SCM_OPFPORTP (element))
fd = SCM_FPORT_FDES (element);