mirror of git://sourceware.org/git/glibc.git
entered into RCS
This commit is contained in:
parent
268b7fc8dd
commit
f6472c3e7e
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
|
|
@ -17,10 +17,9 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave,
|
|||
Cambridge, MA 02139, USA. */
|
||||
|
||||
#include <ansidecl.h>
|
||||
#include <errno.h>
|
||||
#include <stddef.h>
|
||||
#include <unistd.h>
|
||||
#include <hurd.h>
|
||||
#include <hurd/fd.h>
|
||||
|
||||
/* Change the current directory root to FD. */
|
||||
int
|
||||
|
|
@ -29,13 +28,21 @@ DEFUN(fchroot, (fd), int fd)
|
|||
error_t err;
|
||||
file_t crdir;
|
||||
|
||||
/* XXX check that's it's a directory */
|
||||
err = HURD_DPORT_USE
|
||||
(fd,
|
||||
({ struct stat st;
|
||||
crdir = port;
|
||||
err = __io_stat (crdir, &st);
|
||||
if (! err && ! S_ISDIR (st.st_mode))
|
||||
err = ENOTDIR;
|
||||
if (! err)
|
||||
__mach_port_mod_refs (__mach_task_self (),
|
||||
crdir, MACH_PORT_RIGHT_SEND, 1);
|
||||
err;
|
||||
}));
|
||||
|
||||
if (err = _HURD_DPORT_USE (fd,
|
||||
__mach_port_mod_refs (__mach_task_self (),
|
||||
(crdir = port),
|
||||
MACH_PORT_RIGHT_SEND, 1)))
|
||||
return err;
|
||||
if (err)
|
||||
return __hurd_fail (err);
|
||||
|
||||
_hurd_port_set (&_hurd_ports[INIT_PORT_CRDIR], crdir);
|
||||
|
||||
|
|
|
|||
|
|
@ -433,7 +433,6 @@ DEFUN(__vfscanf, (s, format, arg),
|
|||
}
|
||||
break;
|
||||
|
||||
#ifndef MIB_HACKS
|
||||
case 'e': /* Floating-point numbers. */
|
||||
case 'E':
|
||||
case 'f':
|
||||
|
|
@ -481,6 +480,7 @@ DEFUN(__vfscanf, (s, format, arg),
|
|||
if (w[-1] == '-' || w[-1] == '+' || w[-1] == 'e')
|
||||
conv_error();
|
||||
|
||||
#ifndef MIB_HACKS
|
||||
/* Convert the number. */
|
||||
*w = '\0';
|
||||
fp_num = strtod(work, &w);
|
||||
|
|
@ -498,7 +498,7 @@ DEFUN(__vfscanf, (s, format, arg),
|
|||
++done;
|
||||
}
|
||||
break;
|
||||
#endif MIB_HACKS
|
||||
#endif /* MIB_HACKS */
|
||||
|
||||
case '[': /* Character class. */
|
||||
STRING_ARG;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
|
||||
# This file is part of the GNU C Library.
|
||||
|
||||
# The GNU C Library is free software; you can redistribute it and/or
|
||||
|
|
@ -46,16 +46,18 @@ errnoh == 1 && $1 == "@comment" \
|
|||
errnoh == 2 && $1 == "@deftypevr" && $2 == "Macro" && $3 == "int" \
|
||||
{
|
||||
e = $4;
|
||||
s = " \"" etext "\",";
|
||||
l = 40 - length (s);
|
||||
while (l-- > 0)
|
||||
s = s " ";
|
||||
printf "%s/* %d = %s */\n", s, ++errno, e;
|
||||
if (e != "EAGAIN")
|
||||
printf "%-40s/* %d = %s */\n", " \"" etext "\",", ++errno, e;
|
||||
next;
|
||||
}
|
||||
{ errnoh=0 }
|
||||
END {
|
||||
print " };";
|
||||
print "";
|
||||
print "#include <errno.h>";
|
||||
++errno;
|
||||
printf "#if _HURD_ERRNOS != %d\n", errno;
|
||||
print "#error errlist/errnos generation bug";
|
||||
print "#endif"
|
||||
printf "const int _sys_nerr = %d;\n", errno;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue