1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-29 11:41:21 +03:00
1998-06-01  Gordon Matzigkeit  <gord@profitpress.com>

	* hurd/Makefile (routines): Add cthreads.

1998-05-31  Mark Kettenis  <kettenis@phys.uva.nl>

	* login/login.c (login): Let pututline take care of finding the
	positin to insert the UTMP entry.  This corrects a bug where ssh
	was not reusing UTMP entries marked as DEAD_PROCESS.
	Reported by Herbert Xu <herbert@gondor.apana.org.au>.

1998-05-31  Mark Kettenis  <kettenis@phys.uva.nl>

	* login/Makefile (tests): New variable, add tst-utmp and
	tst-utmpx.
	* login/tst-utmp.c: New file.
	* login/tst-utmpx.c: New file.

1998-06-01  Gordon Matzigkeit  <gord@profitpress.com>

	* sysdeps/mach/hurd/errlist.c (sys_nerr, _sys_nerr): Make weak
	aliases for _hurd_nerr, for programs that don't use sys_errlist,
	but need sys_err.

1998-05-31  Mark Kettenis  <kettenis@phys.uva.nl>

	* sysdeps/generic/updwtmpx.c: Rename function to updwtmpx.
	* libc.map: Add updwtmpx and utmpxname to GLIBC_2.1.

1998-05-31  Mark Kettenis  <kettenis@phys.uva.nl>

	* sysdeps/mach/hurd/read.c: Rename function to __libc_read and
	make __read a weak alias.  Use ANSI-style function definition.
	* sysdeps/mach/hurd/write.c: Likewise.

1998-05-31  Mark Kettenis  <kettenis@phys.uva.nl>

	* sysdeps/mach/hurd/err_hurd.sub: Use _hurd_errlist instead of
	_sys_errlist.

1998-05-30  Mark Kettenis  <kettenis@phys.uva.nl>

	* sysdeps/mach/hurd/Makefile ($(objpfx)librtld.os):
	Renamed from librtld.so.

1998-06-02  Andreas Jaeger  <aj@arthur.rhein-neckar.de>

	* libc.map: Remove _IO_getline_info which was erroneously
	introduced in section GLIBC_2.0.
	Noticed by Horst von Brand <vonbrand@sleipnir.valparaiso.cl>.

1998-06-01  Gordon Matzigkeit  <gord@profitpress.com>

	* sysdeps/generic/socket.c (__socket): Renamed from socket, and
	created a weak alias.
	* sysdeps/mach/hurd/socket.c (__socket): Likewise.

1998-05-31  Gordon Matzigkeit  <gord@profitpress.com>

	* sysdeps/mach/hurd/ftruncate.c (__ftruncate): Rename from old
	ftruncate function, and create a weak alias to ftruncate.

1998-06-01  Gordon Matzigkeit  <gord@profitpress.com>

	* grp/fgetgrent_r.c: Use &errno instead of __errno_location ().
	* inet/getnetgrent_r.c: Likewise.
	* nss/getXXbyYY_r.c: Likewise.
	* nss/getXXent_r.c: Likewise.
	* pwd/fgetpwent_r.c: Likewise.
	* shadow/sgetspent_r.c: Likewise.
	* shadow/fgetspent_r.c: Likewise.
	* sunrpc/publickey.c: Likewise.

1998-06-01  Gordon Matzigkeit  <gord@profitpress.com>

	* hurd/libhurduser.map: New file.
	* mach/libmachuser.map: Likewise.

	* libc.map: Add Hurd-specific functions to version 2.1.
	Add __flshfp and __fillbf.

1998-05-30  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* manual/signal.texi (Basic Signal Handling): Fix typo.
	* manual/errno.texi (Error Codes): Likewise.

1998-06-02  Ulrich Drepper  <drepper@cygnus.com>

	* sysdeps/unix/sysv/linux/netipx/ipx.h: Include <bits/sockaddr.h>
	instead of <sys/socket.h>.
	Patch by NIIBE Yutaka <gniibe@mri.co.jp>

	* sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c (DL_FIND_ARG_COMPONENTS):
	Finally make it working.
	Patch by Mark Hatle <fray@kernel.crashing.org>.

1998-03-22  Paul Eggert  <eggert@twinsun.com>

	* posix/regex.c: Include <wchar.h> before <wctype.h>, to work around
	a Solaris 2.6 bug.
This commit is contained in:
Ulrich Drepper
1998-06-02 12:58:14 +00:00
parent 0061df4ed9
commit 7ba4fcfcf2
33 changed files with 858 additions and 61 deletions

101
ChangeLog
View File

@ -1,3 +1,104 @@
1998-06-01 Gordon Matzigkeit <gord@profitpress.com>
* hurd/Makefile (routines): Add cthreads.
1998-05-31 Mark Kettenis <kettenis@phys.uva.nl>
* login/login.c (login): Let pututline take care of finding the
positin to insert the UTMP entry. This corrects a bug where ssh
was not reusing UTMP entries marked as DEAD_PROCESS.
Reported by Herbert Xu <herbert@gondor.apana.org.au>.
1998-05-31 Mark Kettenis <kettenis@phys.uva.nl>
* login/Makefile (tests): New variable, add tst-utmp and
tst-utmpx.
* login/tst-utmp.c: New file.
* login/tst-utmpx.c: New file.
1998-06-01 Gordon Matzigkeit <gord@profitpress.com>
* sysdeps/mach/hurd/errlist.c (sys_nerr, _sys_nerr): Make weak
aliases for _hurd_nerr, for programs that don't use sys_errlist,
but need sys_err.
1998-05-31 Mark Kettenis <kettenis@phys.uva.nl>
* sysdeps/generic/updwtmpx.c: Rename function to updwtmpx.
* libc.map: Add updwtmpx and utmpxname to GLIBC_2.1.
1998-05-31 Mark Kettenis <kettenis@phys.uva.nl>
* sysdeps/mach/hurd/read.c: Rename function to __libc_read and
make __read a weak alias. Use ANSI-style function definition.
* sysdeps/mach/hurd/write.c: Likewise.
1998-05-31 Mark Kettenis <kettenis@phys.uva.nl>
* sysdeps/mach/hurd/err_hurd.sub: Use _hurd_errlist instead of
_sys_errlist.
1998-05-30 Mark Kettenis <kettenis@phys.uva.nl>
* sysdeps/mach/hurd/Makefile ($(objpfx)librtld.os):
Renamed from librtld.so.
1998-06-02 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* libc.map: Remove _IO_getline_info which was erroneously
introduced in section GLIBC_2.0.
Noticed by Horst von Brand <vonbrand@sleipnir.valparaiso.cl>.
1998-06-01 Gordon Matzigkeit <gord@profitpress.com>
* sysdeps/generic/socket.c (__socket): Renamed from socket, and
created a weak alias.
* sysdeps/mach/hurd/socket.c (__socket): Likewise.
1998-05-31 Gordon Matzigkeit <gord@profitpress.com>
* sysdeps/mach/hurd/ftruncate.c (__ftruncate): Rename from old
ftruncate function, and create a weak alias to ftruncate.
1998-06-01 Gordon Matzigkeit <gord@profitpress.com>
* grp/fgetgrent_r.c: Use &errno instead of __errno_location ().
* inet/getnetgrent_r.c: Likewise.
* nss/getXXbyYY_r.c: Likewise.
* nss/getXXent_r.c: Likewise.
* pwd/fgetpwent_r.c: Likewise.
* shadow/sgetspent_r.c: Likewise.
* shadow/fgetspent_r.c: Likewise.
* sunrpc/publickey.c: Likewise.
1998-06-01 Gordon Matzigkeit <gord@profitpress.com>
* hurd/libhurduser.map: New file.
* mach/libmachuser.map: Likewise.
* libc.map: Add Hurd-specific functions to version 2.1.
Add __flshfp and __fillbf.
1998-05-30 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* manual/signal.texi (Basic Signal Handling): Fix typo.
* manual/errno.texi (Error Codes): Likewise.
1998-06-02 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/unix/sysv/linux/netipx/ipx.h: Include <bits/sockaddr.h>
instead of <sys/socket.h>.
Patch by NIIBE Yutaka <gniibe@mri.co.jp>
* sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c (DL_FIND_ARG_COMPONENTS):
Finally make it working.
Patch by Mark Hatle <fray@kernel.crashing.org>.
1998-03-22 Paul Eggert <eggert@twinsun.com>
* posix/regex.c: Include <wchar.h> before <wctype.h>, to work around
a Solaris 2.6 bug.
1998-05-30 Philip Blundell <Philip.Blundell@pobox.com> 1998-05-30 Philip Blundell <Philip.Blundell@pobox.com>
* stdlib/gmp-impl.h: Support strange mixed-endian double format * stdlib/gmp-impl.h: Support strange mixed-endian double format

View File

@ -82,7 +82,7 @@ __fgetgrent_r (FILE *stream, struct group *resbuf, char *buffer, size_t buflen,
get the next line of the file to parse. */ get the next line of the file to parse. */
|| ! (parse_result = parse_line (p, resbuf, || ! (parse_result = parse_line (p, resbuf,
(void *) buffer, buflen, (void *) buffer, buflen,
__errno_location ()))); &errno)));
if (parse_result == -1) if (parse_result == -1)
{ {

View File

@ -1,4 +1,4 @@
# Copyright (C) 1991, 92, 93, 94, 95, 96, 97 Free Software Foundation, Inc. # Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98 Free Software Foundation, Inc.
# This file is part of the GNU C Library. # This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or # The GNU C Library is free software; you can redistribute it and/or
@ -42,6 +42,7 @@ routines = hurdstartup hurdinit \
hurdid hurdlookup hurdpid hurdrlimit hurdprio hurdexec \ hurdid hurdlookup hurdpid hurdrlimit hurdprio hurdexec \
get-host set-host \ get-host set-host \
path-lookup \ path-lookup \
cthreads \
setauth \ setauth \
pid2task task2pid \ pid2task task2pid \
getuids setuids getumask fchroot \ getuids setuids getumask fchroot \

155
hurd/libhurduser.map Normal file
View File

@ -0,0 +1,155 @@
GLIBC_2.0 {
global:
# These functions are used internally by libc.
_S_msg_server; __auth_getids; __auth_makeauth;
__auth_user_authenticate; __crash_dump_task; __dir_link;
__dir_lookup; __dir_mkdir; __dir_mkfile; __dir_readdir;
__dir_rename; __dir_rmdir; __dir_unlink; __exec_startup_get_info;
__file_check_access; __file_chflags; __file_chmod; __file_chown;
__file_exec; __file_getlinknode; __file_lock; __file_reparent;
__file_set_size; __file_set_translator; __file_statfs;
__file_sync; __file_syncfs; __file_utimes; __ifsock_getsockaddr;
__interrupt_operation; __io_clear_some_openmodes;
__io_get_icky_async_id; __io_get_openmodes; __io_get_owner;
__io_identity; __io_map; __io_mod_owner; __io_pathconf; __io_read;
__io_readable; __io_reauthenticate; __io_seek; __io_select;
__io_set_all_openmodes; __io_set_some_openmodes; __io_stat;
__io_write; __msg_set_init_int; __msg_sig_post;
__msg_sig_post_reply; __msg_sig_post_request;
__msg_sig_post_untraced; __msg_sig_post_untraced_reply;
__proc_child; __proc_dostop; __proc_get_arg_locations;
__proc_getallpids; __proc_getlogin; __proc_getmsgport;
__proc_getpgrp; __proc_getpgrppids; __proc_getpids;
__proc_getprivports; __proc_getprocinfo; __proc_getsid;
__proc_getsidport; __proc_handle_exceptions; __proc_mark_cont;
__proc_mark_exit; __proc_mark_stop; __proc_mark_traced;
__proc_mod_stopchild; __proc_pid2task; __proc_reauthenticate;
__proc_set_arg_locations; __proc_setlogin; __proc_setmsgport;
__proc_setowner; __proc_setpgrp; __proc_setsid; __proc_task2pid;
__proc_task2proc; __proc_uname; __proc_wait; __socket_accept;
__socket_bind; __socket_connect; __socket_connect2;
__socket_create; __socket_create_address; __socket_getopt;
__socket_listen; __socket_name; __socket_peername; __socket_recv;
__socket_send; __socket_setopt; __socket_shutdown;
__socket_whatis_address; __startup_reboot; __term_get_nodename;
__term_getctty; __term_open_ctty; __termctty_open_terminal;
__tioctl_tiocspgrp; _hurdsig_fault_exc_server;
# functions in normal name space
# Please keep them sorted by name!
# a*
auth_getids; auth_makeauth; auth_server_authenticate;
auth_user_authenticate;
# c*
crash_dump_task;
# d*
dir_link; dir_lookup; dir_mkdir; dir_mkfile; dir_notice_changes;
dir_readdir; dir_rename; dir_rmdir; dir_unlink;
# e*
exec_exec; exec_init; exec_setexecdata; exec_startup_get_info;
# f*
file_chauthor; file_check_access; file_chflags; file_chmod;
file_chown; file_exec; file_get_fs_options; file_get_storage_info;
file_get_translator; file_get_translator_cntl; file_getcontrol;
file_getfh; file_getlinknode; file_lock; file_lock_stat;
file_notice_changes; file_reparent; file_set_size;
file_set_translator; file_statfs; file_sync; file_syncfs;
file_utimes; fsys_forward; fsys_get_options; fsys_getfile;
fsys_getpriv; fsys_getroot; fsys_goaway; fsys_init;
fsys_set_options; fsys_startup; fsys_syncfs;
# i*
ifsock_getsockaddr; interrupt_operation; io_async;
io_clear_some_openmodes; io_duplicate; io_eofnotify; io_get_conch;
io_get_icky_async_id; io_get_openmodes; io_get_owner; io_identity;
io_map; io_map_cntl; io_mod_owner; io_pathconf; io_postnotify;
io_prenotify; io_read; io_readable; io_readnotify; io_readsleep;
io_reauthenticate; io_release_conch; io_restrict_auth; io_seek;
io_select; io_server_version; io_set_all_openmodes;
io_set_some_openmodes; io_sigio; io_stat; io_write;
# m*
msg_add_auth; msg_del_auth; msg_describe_ports; msg_get_dtable;
msg_get_env_variable; msg_get_environment; msg_get_fd;
msg_get_init_int; msg_get_init_ints; msg_get_init_port;
msg_get_init_ports; msg_proc_newids; msg_report_wait;
msg_set_dtable; msg_set_env_variable; msg_set_environment;
msg_set_fd; msg_set_init_int; msg_set_init_ints;
msg_set_init_port; msg_set_init_ports; msg_sig_post;
msg_sig_post_reply; msg_sig_post_request; msg_sig_post_untraced;
msg_sig_post_untraced_reply; msg_sig_post_untraced_request;
# p*
proc_child; proc_child_request; proc_dostop; proc_dostop_request;
proc_execdata_notify; proc_execdata_notify_request;
proc_get_arg_locations; proc_get_arg_locations_request;
proc_get_tty; proc_get_tty_request; proc_getallpids;
proc_getallpids_request; proc_getexecdata;
proc_getexecdata_request; proc_gethostid_request;
proc_gethostname_request; proc_getlogin; proc_getlogin_request;
proc_getloginid; proc_getloginid_request; proc_getloginpids;
proc_getloginpids_request; proc_getmsgport;
proc_getmsgport_request; proc_getpgrp; proc_getpgrp_request;
proc_getpgrppids; proc_getpgrppids_request; proc_getpids;
proc_getpids_request; proc_getprivports;
proc_getprivports_request; proc_getprocargs;
proc_getprocargs_request; proc_getprocenv;
proc_getprocenv_request; proc_getprocinfo;
proc_getprocinfo_request; proc_getsessionpgids;
proc_getsessionpgids_request; proc_getsessionpids;
proc_getsessionpids_request; proc_getsid; proc_getsid_request;
proc_getsidport; proc_getsidport_request; proc_handle_exceptions;
proc_handle_exceptions_request; proc_make_login_coll;
proc_make_login_coll_request; proc_mark_cont;
proc_mark_cont_request; proc_mark_exec; proc_mark_exec_request;
proc_mark_exit; proc_mark_exit_request; proc_mark_stop;
proc_mark_stop_request; proc_mark_traced;
proc_mark_traced_request; proc_mod_stopchild;
proc_mod_stopchild_request; proc_pid2proc; proc_pid2proc_request;
proc_pid2task; proc_pid2task_request; proc_proc2task;
proc_proc2task_request; proc_reassign; proc_reassign_request;
proc_reauthenticate; proc_reauthenticate_request;
proc_register_version; proc_register_version_request;
proc_set_arg_locations; proc_set_arg_locations_request;
proc_setexecdata; proc_setexecdata_request;
proc_sethostid_request; proc_sethostname_request; proc_setlogin;
proc_setlogin_request; proc_setmsgport; proc_setmsgport_request;
proc_setowner; proc_setowner_request; proc_setpgrp;
proc_setpgrp_request; proc_setsid; proc_setsid_request;
proc_task2pid; proc_task2pid_request; proc_task2proc;
proc_task2proc_request; proc_uname; proc_uname_request; proc_wait;
proc_wait_request;
# s*
socket_accept; socket_bind; socket_connect; socket_connect2;
socket_create; socket_create_address; socket_fabricate_address;
socket_getopt; socket_listen; socket_name; socket_peername;
socket_recv; socket_send; socket_setopt; socket_shutdown;
socket_whatis_address; startup_authinit; startup_essential_task;
startup_procinit; startup_reboot; startup_request_notification;
# t*
term_get_bottom_type; term_get_nodename; term_getctty;
term_on_hurddev; term_on_machdev; term_on_pty; term_open_ctty;
term_set_filenode; term_set_nodename; termctty_open_terminal;
tioctl_tioccbrk; tioctl_tioccdtr; tioctl_tiocdrain;
tioctl_tiocexcl; tioctl_tiocext; tioctl_tiocflush;
tioctl_tiocgeta; tioctl_tiocgetd; tioctl_tiocgpgrp;
tioctl_tiocgwinsz; tioctl_tiocmbic; tioctl_tiocmbis;
tioctl_tiocmget; tioctl_tiocmodg; tioctl_tiocmods;
tioctl_tiocmset; tioctl_tiocnxcl; tioctl_tiocoutq; tioctl_tiocpkt;
tioctl_tiocremote; tioctl_tiocsbrk; tioctl_tiocsdtr;
tioctl_tiocseta; tioctl_tiocsetaf; tioctl_tiocsetaw;
tioctl_tiocsetd; tioctl_tiocsig; tioctl_tiocspgrp;
tioctl_tiocstart; tioctl_tiocsti; tioctl_tiocstop;
tioctl_tiocswinsz; tioctl_tiocucntl;
local:
*;
};

113
hurd/libmachuser.map Normal file
View File

@ -0,0 +1,113 @@
# libmachuser.map - symbol version and export information for libmachuser.so
GLIBC_2.0 {
global:
# These functions are used internally by libc.
_S_exc_server; __host_adjust_time; __host_get_time; __host_info;
__host_set_time; __mach_port_allocate_name_rpc;
__mach_port_allocate_rpc; __mach_port_deallocate_rpc;
__mach_port_destroy; __mach_port_extract_right;
__mach_port_get_refs; __mach_port_insert_right_rpc;
__mach_port_mod_refs; __mach_port_move_member; __mach_port_names;
__mach_port_set_qlimit; __task_create_rpc;
__task_disable_pc_sampling; __task_enable_pc_sampling;
__task_get_special_port; __task_priority; __task_resume;
__task_set_special_port_rpc; __task_suspend_rpc;
__task_terminate_rpc; __task_threads; __thread_abort;
__thread_create; __thread_depress_abort_rpc; __thread_get_state;
__thread_resume; __thread_set_special_port; __thread_set_state;
__thread_suspend; __thread_terminate; __vm_allocate_rpc;
__vm_deallocate_rpc; __vm_map_rpc; __vm_protect; __vm_read;
__vm_region; __vm_statistics; __vm_write;
# functions in normal name space
# Please keep them sorted by name!
# d*
default_pager_info; default_pager_object_create;
default_pager_object_pages; default_pager_objects;
default_pager_paging_file; default_pager_register_fileserver;
device_close; device_get_status; device_map; device_open;
device_open_request; device_read; device_read_inband;
device_read_request; device_read_request_inband; device_set_filter;
device_set_status; device_write; device_write_inband;
device_write_request; device_write_request_inband;
dp_helper_paging_space;
# e*
exception_raise;
# h*
host_adjust_time; host_get_boot_info; host_get_time; host_info;
host_kernel_version; host_processor_set_priv; host_processor_sets;
host_processors; host_reboot; host_set_time;
# m*
mach_port_allocate_name_rpc; mach_port_allocate_rpc;
mach_port_deallocate_rpc; mach_port_destroy;
mach_port_extract_right; mach_port_get_receive_status;
mach_port_get_refs; mach_port_get_set_status;
mach_port_insert_right_rpc; mach_port_mod_refs;
mach_port_move_member; mach_port_names; mach_port_rename;
mach_port_request_notification; mach_port_set_mscount;
mach_port_set_qlimit; mach_port_set_seqno; mach_port_type;
mach_ports_lookup; mach_ports_register;
memory_object_change_attributes; memory_object_change_completed;
memory_object_copy; memory_object_create;
memory_object_data_error; memory_object_data_initialize;
memory_object_data_provided; memory_object_data_request;
memory_object_data_return; memory_object_data_supply;
memory_object_data_unavailable; memory_object_data_unlock;
memory_object_data_write; memory_object_destroy;
memory_object_get_attributes; memory_object_init;
memory_object_lock_completed; memory_object_lock_request;
memory_object_ready; memory_object_set_attributes;
memory_object_supply_completed; memory_object_terminate;
# o*
old_mach_port_get_receive_status;
# p*
processor_assign; processor_control; processor_exit;
processor_get_assignment; processor_info; processor_set_create;
processor_set_default; processor_set_destroy; processor_set_info;
processor_set_max_priority; processor_set_policy_disable;
processor_set_policy_enable; processor_set_tasks;
processor_set_threads; processor_start;
# t*
task_assign; task_assign_default; task_create_rpc;
task_disable_pc_sampling; task_enable_pc_sampling;
task_get_assignment; task_get_emulation_vector;
task_get_sampled_pcs; task_get_special_port; task_info;
task_priority; task_ras_control; task_resume; task_set_emulation;
task_set_emulation_vector; task_set_special_port_rpc;
task_suspend_rpc; task_terminate_rpc; task_threads; thread_abort;
thread_assign; thread_assign_default; thread_create;
thread_depress_abort_rpc; thread_disable_pc_sampling;
thread_enable_pc_sampling; thread_get_assignment;
thread_get_sampled_pcs; thread_get_special_port; thread_get_state;
thread_info; thread_max_priority; thread_policy; thread_priority;
thread_resume; thread_set_special_port; thread_set_state;
thread_suspend; thread_terminate; thread_wire;
# v*
vm_allocate_rpc; vm_copy; vm_deallocate_rpc; vm_inherit;
vm_machine_attribute; vm_map_rpc; vm_protect; vm_read; vm_region;
vm_set_default_memory_manager; vm_statistics; vm_wire; vm_write;
# x*
xxx_cpu_control; xxx_device_get_status; xxx_device_set_filter;
xxx_device_set_status; xxx_host_info;
xxx_memory_object_lock_request; xxx_processor_set_default_priv;
xxx_slot_info; xxx_task_get_emulation_vector; xxx_task_info;
xxx_task_set_emulation_vector; xxx_thread_get_state;
xxx_thread_info; xxx_thread_set_state;
# y*
yyy_host_info; yyy_processor_control; yyy_processor_info;
yyy_processor_set_info;
local:
*;
};

View File

@ -135,7 +135,7 @@ __internal_setnetgrent (const char *group, struct __netgrent *datap)
/* Free list of all netgroup names from last run. */ /* Free list of all netgroup names from last run. */
free_memory (datap); free_memory (datap);
return __internal_setnetgrent_reuse (group, datap, __errno_location ()); return __internal_setnetgrent_reuse (group, datap, &errno);
} }
int int
@ -283,7 +283,7 @@ __getnetgrent_r (char **hostp, char **userp, char **domainp,
__libc_lock_lock (lock); __libc_lock_lock (lock);
status = __internal_getnetgrent_r (hostp, userp, domainp, &dataset, status = __internal_getnetgrent_r (hostp, userp, domainp, &dataset,
buffer, buflen, __errno_location ()); buffer, buflen, &errno);
__libc_lock_unlock (lock); __libc_lock_unlock (lock);

View File

@ -78,7 +78,7 @@ GLIBC_2.0 {
__select; __sched_get_priority_max; __sched_get_priority_min; __select; __sched_get_priority_max; __sched_get_priority_min;
__sched_getparam; __sched_getscheduler; __sched_setscheduler; __sched_getparam; __sched_getscheduler; __sched_setscheduler;
__sched_yield; __on_exit; __gettimeofday; __fork; __clone; __sched_yield; __on_exit; __gettimeofday; __fork; __clone;
__nss_configure_lookup; _dl_open; _dl_close; _dl_addr; __nss_configure_lookup; _dl_open; _dl_close; _dl_addr;
__vsscanf; __vfscanf; __vsnprintf; __vsscanf; __vfscanf; __vsnprintf;
_rpc_dtablesize; _null_auth; _seterr_reply; _rpc_dtablesize; _null_auth; _seterr_reply;
__res_randomid; __getpid; __res_randomid; __getpid;
@ -102,7 +102,7 @@ GLIBC_2.0 {
_IO_flush_all; _IO_flush_all_linebuffered; _IO_fopen; _IO_fprintf; _IO_flush_all; _IO_flush_all_linebuffered; _IO_fopen; _IO_fprintf;
_IO_fputs; _IO_fread; _IO_free_backup_area; _IO_freopen; _IO_fputs; _IO_fread; _IO_free_backup_area; _IO_freopen;
_IO_fscanf; _IO_fseek; _IO_fsetpos; _IO_ftell; _IO_funlockfile; _IO_fscanf; _IO_fseek; _IO_fsetpos; _IO_ftell; _IO_funlockfile;
_IO_fwrite; _IO_getc; _IO_getline; _IO_getline_info; _IO_gets; _IO_fwrite; _IO_getc; _IO_getline; _IO_gets;
_IO_init; _IO_init_marker; _IO_link_in; _IO_marker_delta; _IO_init; _IO_init_marker; _IO_link_in; _IO_marker_delta;
_IO_marker_difference; _IO_padn; _IO_pclose; _IO_peekc_locked; _IO_marker_difference; _IO_padn; _IO_pclose; _IO_peekc_locked;
_IO_perror; _IO_popen; _IO_printf; _IO_proc_close; _IO_proc_open; _IO_perror; _IO_popen; _IO_printf; _IO_proc_close; _IO_proc_open;
@ -122,6 +122,42 @@ GLIBC_2.0 {
# Profiling support # Profiling support
__monstartup; _mcleanup; __profile_frequency; __monstartup; _mcleanup; __profile_frequency;
# Hurd-specific variables
__hurd_sigthread_stack_base; __hurd_sigthread_stack_end;
__hurd_sigthread_variables;
__hurd_threadvar_stack_mask; __hurd_threadvar_stack_offset;
# functions from stdio
__fillbf; __flshfp;
# Internal functions referenced by libmachuser and libhurduser.
__mach_msg;
__mig_allocate; __mig_deallocate;
__mig_get_reply_port; __mig_put_reply_port; __mig_dealloc_reply_port;
_S_catch_exception_raise;
_S_msg_add_auth; _S_msg_del_auth;
_S_msg_describe_ports;
_S_msg_get_dtable; _S_msg_set_dtable;
_S_msg_get_env_variable; _S_msg_set_env_variable;
_S_msg_get_environment; _S_msg_set_environment;
_S_msg_get_fd; _S_msg_set_fd;
_S_msg_get_init_int; _S_msg_set_init_int;
_S_msg_get_init_ints; _S_msg_set_init_ints;
_S_msg_get_init_port; _S_msg_set_init_port;
_S_msg_get_init_ports; _S_msg_set_init_ports;
_S_msg_proc_newids; _S_msg_report_wait;
_S_msg_sig_post; _S_msg_sig_post_untraced;
_hurd_intr_rpc_mach_msg; _hurdsig_fault_catch_exception_raise;
# Placeholders for the Hurd libthreads implementation.
cthread_getspecific; cthread_keycreate; cthread_setspecific;
__libc_getspecific;
# Function versions of Hurd macros.
__mutex_init; __mutex_trylock;
__mutex_lock; __mutex_unlock;
__mutex_lock_solid; __mutex_unlock_solid;
# variables in normal name space # variables in normal name space
argp_err_exit_status; argp_program_bug_address; argp_program_version; argp_err_exit_status; argp_program_bug_address; argp_program_version;
argp_program_version_hook; argp_program_version_hook;
@ -566,7 +602,7 @@ GLIBC_2.1 {
tcgetsid; tdestroy; tmpfile64; truncate64; tcgetsid; tdestroy; tmpfile64; truncate64;
# u* # u*
unlockpt; utimes; user2netname; unlockpt; updwtmpx; user2netname; utimes; utmpxname;
# v* # v*
versionsort; versionsort64; versionsort; versionsort64;

View File

@ -43,6 +43,8 @@ distribute := utmp-private.h programs/xtmp.h programs/utmpd.h README.utmpd \
subdir-dirs = programs subdir-dirs = programs
vpath %.c programs vpath %.c programs
tests := tst-utmp tst-utmpx
# Build the -lutil library with these extra functions. # Build the -lutil library with these extra functions.
extra-libs := libutil extra-libs := libutil
extra-libs-others := $(extra-libs) extra-libs-others := $(extra-libs)

View File

@ -1,4 +1,4 @@
/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. /* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@ -89,7 +89,6 @@ login (const struct utmp *ut)
int found_tty; int found_tty;
const char *ttyp; const char *ttyp;
struct utmp copy = *ut; struct utmp copy = *ut;
struct utmp utbuf;
/* Fill in those fields we supply. */ /* Fill in those fields we supply. */
#if _HAVE_UT_TYPE - 0 #if _HAVE_UT_TYPE - 0
@ -117,14 +116,9 @@ login (const struct utmp *ut)
/* Tell that we want to use the UTMP file. */ /* Tell that we want to use the UTMP file. */
if (utmpname (_PATH_UTMP) == 0) if (utmpname (_PATH_UTMP) == 0)
{ {
struct utmp *old;
/* Open UTMP file. */ /* Open UTMP file. */
setutent (); setutent ();
/* Read the record. */
getutline_r (&copy, &utbuf, &old);
/* Write the entry. */ /* Write the entry. */
pututline (&copy); pututline (&copy);

380
login/tst-utmp.c Normal file
View File

@ -0,0 +1,380 @@
/* Tests for UTMP functions.
Copyright (C) 1998 Free Software Foundation, Inc.
Contributed by Mark Kettenis <kettenis@phys.uva.nl>, 1998.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include <errno.h>
#include <error.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <time.h>
#ifdef UTMPX
# include <utmpx.h>
# define utmp utmpx
# define utmpname utmpxname
# define setutent setutxent
# define getutent getutxent
# define endutent endutxent
# define getutline getutxline
# define getutid getutxid
# define pututline pututxline
#else
# include <utmp.h>
#endif
/* Prototype for our test function. */
static int do_test (int argc, char *argv[]);
/* We have a preparation function. */
static void do_prepare (int argc, char *argv[]);
#define PREPARE do_prepare
/* This defines the `main' function and some more. */
#include <test-skeleton.c>
/* These are for the temporary file we generate. */
char *name;
int fd;
static void
do_prepare (int argc, char *argv[])
{
size_t name_len;
name_len = strlen (test_dir);
name = malloc (name_len + sizeof ("/utmpXXXXXX"));
mempcpy (mempcpy (name, test_dir, name_len),
"/utmpXXXXXX", sizeof ("/utmpXXXXXX"));
add_temp_file (name);
/* Open our test file. */
fd = mkstemp (name);
if (fd == -1)
error (EXIT_FAILURE, errno, "cannot open test file `%s'", name);
}
struct utmp entry[] =
{
{ ut_type: BOOT_TIME, ut_pid: 1, ut_tv: { tv_sec: 1000 } },
{ ut_type: RUN_LVL, ut_pid: 1, ut_tv: { tv_sec: 2000 } },
{ ut_type: INIT_PROCESS, ut_pid: 5, ut_id: "si", ut_tv: { tv_sec: 3000 } },
{ ut_type: LOGIN_PROCESS, ut_pid: 23, ut_line: "tty1", ut_id: "1",
ut_user: "LOGIN", ut_session: 23, ut_tv: { tv_sec: 4000 } },
{ ut_type: USER_PROCESS, ut_pid: 24, ut_line: "tty2", ut_id: "2",
ut_user: "albert", ut_session: 24, ut_tv: { tv_sec: 8000 } },
{ ut_type: USER_PROCESS, ut_pid: 196, ut_line: "ttyp0", ut_id: "p0",
ut_user: "niels", ut_session: 196, ut_tv: { tv_sec: 10000 } },
{ ut_type: DEAD_PROCESS, ut_line: "ttyp1", ut_id: "p1",
ut_tv: { tv_sec: 16000 } },
{ ut_type: EMPTY },
{ ut_type: EMPTY }
};
int num_entries = sizeof entry / sizeof (struct utmp);
time_t entry_time = 20000;
pid_t entry_pid = 234;
static int
do_init (void)
{
int n;
setutent ();
for (n = 0; n < num_entries; n++)
{
if (pututline (&entry[n]) == NULL)
{
error (0, errno, "cannot write UTMP entry");
return 1;
}
}
endutent ();
return 0;
}
static int
do_check (void)
{
struct utmp *ut;
int n;
setutent ();
n = 0;
while ((ut = getutent ()))
{
if (n < num_entries &&
memcmp (ut, &entry[n], sizeof (struct utmp)))
{
error (0, 0, "UTMP entry does not match");
return 1;
}
n++;
}
if (n != num_entries)
{
error (0, 0, "number of UTMP entries is incorrect");
return 1;
}
endutent ();
return 0;
}
static int
simulate_login (const char *line, const char *user)
{
int n;
for (n = 0; n < num_entries; n++)
{
if (strcmp (line, entry[n].ut_line) == 0 ||
entry[n].ut_type == DEAD_PROCESS)
{
if (entry[n].ut_pid == DEAD_PROCESS)
entry[n].ut_pid = (entry_pid += 27);
entry[n].ut_type = USER_PROCESS;
strcpy (entry[n].ut_user, user);
entry[n].ut_tv.tv_sec = (entry_time += 1000);
setutent ();
if (pututline (&entry[n]) == NULL)
{
error (0, errno, "cannot write UTMP entry");
return 1;
}
endutent ();
return 0;
}
}
error (0, 0, "no entries available");
return 1;
}
static int
simulate_logout (const char *line)
{
int n;
for (n = 0; n < num_entries; n++)
{
if (strcmp (line, entry[n].ut_line) == 0)
{
entry[n].ut_type = DEAD_PROCESS;
entry[n].ut_user[0] = '\0';
entry[n].ut_tv.tv_sec = (entry_time += 1000);
setutent ();
if (pututline (&entry[n]) == NULL)
{
error (0, errno, "cannot write UTMP entry");
return 1;
}
endutent ();
return 0;
}
}
error (0, 0, "no entry found for `%s'", line);
return 1;
}
static int
check_login (const char *line)
{
struct utmp *up;
struct utmp ut;
int n;
setutent ();
strcpy (ut.ut_line, line);
up = getutline (&ut);
if (up == NULL)
{
error (0, errno, "cannot get entry for line `%s'", line);
return 1;
}
endutent ();
for (n = 0; n < num_entries; n++)
{
if (strcmp (line, entry[n].ut_line) == 0)
{
if (memcmp (up, &entry[n], sizeof (struct utmp)))
{
error (0, 0, "UTMP entry does not match");
return 1;
}
return 0;
}
}
error (0, 0, "bogus entry for line `%s'", line);
return 1;
}
static int
check_logout (const char *line)
{
struct utmp ut;
setutent ();
strcpy (ut.ut_line, line);
if (getutline (&ut) != NULL)
{
error (0, 0, "bogus login entry for `%s'", line);
return 1;
}
endutent ();
return 0;
}
static int
check_id (const char *id)
{
struct utmp *up;
struct utmp ut;
int n;
setutent ();
ut.ut_type = USER_PROCESS;
strcpy (ut.ut_id, id);
up = getutid (&ut);
if (up == NULL)
{
error (0, errno, "cannot get entry for ID `%s'", id);
return 1;
}
endutent ();
for (n = 0; n < num_entries; n++)
{
if (strcmp (id, entry[n].ut_id) == 0)
{
if (memcmp (up, &entry[n], sizeof (struct utmp)))
{
error (0, 0, "UTMP entry does not match");
return 1;
}
return 0;
}
}
error (0, 0, "bogus entry for ID `%s'", id);
return 1;
}
static int
check_type (int type)
{
struct utmp *up;
struct utmp ut;
int n;
setutent ();
ut.ut_type = type;
up = getutid (&ut);
if (up == NULL)
{
error (0, errno, "cannot get entry for type `%d'", type);
return 1;
}
endutent ();
for (n = 0; n < num_entries; n++)
{
if (type == entry[n].ut_type)
{
if (memcmp (up, &entry[n], sizeof (struct utmp)))
{
error (0, 0, "UTMP entry does not match");
return 1;
}
return 0;
}
}
error (0, 0, "bogus entry for type `%d'", type);
return 1;
}
static int
do_test (int argc, char *argv[])
{
int result = 0;
utmpname (name);
result |= do_init ();
result |= do_check ();
result |= simulate_login ("tty1", "erwin");
result |= do_check ();
result |= simulate_login ("ttyp1", "paul");
result |= do_check ();
result |= simulate_logout ("tty2");
result |= do_check ();
result |= simulate_logout ("ttyp0");
result |= do_check ();
result |= simulate_login ("ttyp2", "richard");
result |= do_check ();
result |= check_login ("tty1");
result |= check_logout ("ttyp0");
result |= check_id ("p1");
result |= check_id ("2");
result |= check_id ("si");
result |= check_type (BOOT_TIME);
result |= check_type (RUN_LVL);
return result;
}

2
login/tst-utmpx.c Normal file
View File

@ -0,0 +1,2 @@
#define UTMPX
#include "tst-utmp.c"

View File

@ -515,7 +515,7 @@ particular protocol being used by the socket. @xref{Socket Options}.
@deftypevr Macro int EPROTONOSUPPORT @deftypevr Macro int EPROTONOSUPPORT
@comment errno 43 @c DO NOT REMOVE @comment errno 43 @c DO NOT REMOVE
The socket domain does not support the requested communications protocol The socket domain does not support the requested communications protocol
(perhaps because the requested protocol is completely invalid.) (perhaps because the requested protocol is completely invalid).
@xref{Creating a Socket}. @xref{Creating a Socket}.
@end deftypevr @end deftypevr

View File

@ -741,7 +741,7 @@ described by the macro---thus, @code{ULONG_MAX} has type
@w{@code{unsigned long int}}. @w{@code{unsigned long int}}.
@comment Extra blank lines make it look better. @comment Extra blank lines make it look better.
@table @code @vtable @code
@comment limits.h @comment limits.h
@comment ISO @comment ISO
@item SCHAR_MIN @item SCHAR_MIN
@ -1007,7 +1007,7 @@ principle GNU C actually satisfies the @w{ISO C} requirements only if the
target machine is suitable. In practice, all the machines currently target machine is suitable. In practice, all the machines currently
supported are suitable. supported are suitable.
@table @code @vtable @code
@comment float.h @comment float.h
@comment ISO @comment ISO
@item FLT_ROUNDS @item FLT_ROUNDS

View File

@ -1046,7 +1046,7 @@ is deinstalled after an signal was delivered. On BSD systems the
handler must be explicitly deinstalled. In the GNU C Library we use the handler must be explicitly deinstalled. In the GNU C Library we use the
BSD version by default. To use the SVID version you can either use the BSD version by default. To use the SVID version you can either use the
function @code{sysv_signal} (see below) or use the @code{_XOPEN_SOURCE} function @code{sysv_signal} (see below) or use the @code{_XOPEN_SOURCE}
feature select macro (@pxref{Feature Test Macros}) Generally it should feature select macro (@pxref{Feature Test Macros}). Generally it should
be avoided to use this functions due to the compatibility problems. It be avoided to use this functions due to the compatibility problems. It
is better to use @code{sigaction} if it is available since the results is better to use @code{sigaction} if it is available since the results
are much more reliable. are much more reliable.

View File

@ -155,8 +155,6 @@ cb_prog_1 (struct svc_req *rqstp, SVCXPRT *transp)
*cp++ = '.'; *cp++ = '.';
cp = stpcpy (cp, cbproc_entry(i)->zo_domain); cp = stpcpy (cp, cbproc_entry(i)->zo_domain);
fprintf (stderr, "name=%s\n", name);
if ((data->callback) (name, cbproc_entry(i), data->userdata)) if ((data->callback) (name, cbproc_entry(i), data->userdata))
{ {
bool_result = TRUE; bool_result = TRUE;

View File

@ -162,7 +162,7 @@ INTERNAL (REENTRANT_NAME) (ADD_PARAMS, LOOKUP_TYPE *resbuf, char *buffer,
while (no_more == 0) while (no_more == 0)
{ {
status = (*fct) (ADD_VARIABLES, resbuf, buffer, buflen, status = (*fct) (ADD_VARIABLES, resbuf, buffer, buflen,
__errno_location () H_ERRNO_VAR); &errno H_ERRNO_VAR);
/* The status is NSS_STATUS_TRYAGAIN and errno is ERANGE the /* The status is NSS_STATUS_TRYAGAIN and errno is ERANGE the
provided buffer is too small. In this case we should give provided buffer is too small. In this case we should give

View File

@ -245,8 +245,7 @@ INTERNAL (REENTRANT_GETNAME) (LOOKUP_TYPE *resbuf, char *buffer, size_t buflen,
{ {
int is_last_nip = nip == last_nip; int is_last_nip = nip == last_nip;
status = (*fct) (resbuf, buffer, buflen, __errno_location () status = (*fct) (resbuf, buffer, buflen, &errno H_ERRNO_VAR);
H_ERRNO_VAR);
/* The the status is NSS_STATUS_TRYAGAIN and errno is ERANGE the /* The the status is NSS_STATUS_TRYAGAIN and errno is ERANGE the
provided buffer is too small. In this case we should give provided buffer is too small. In this case we should give

View File

@ -49,8 +49,9 @@
/* For platform which support the ISO C amendement 1 functionality we /* For platform which support the ISO C amendement 1 functionality we
support user defined character classes. */ support user defined character classes. */
#if defined _LIBC || (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H) #if defined _LIBC || (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H)
# include <wctype.h> /* Solaris 2.5 has a bug: <wchar.h> must be included before <wctype.h>. */
# include <wchar.h> # include <wchar.h>
# include <wctype.h>
/* We have to keep the namespace clean. */ /* We have to keep the namespace clean. */
# define regfree(preg) __regfree (preg) # define regfree(preg) __regfree (preg)

View File

@ -93,8 +93,7 @@ __fgetpwent_r (FILE *stream, struct passwd *resbuf, char *buffer,
} while (*p == '\0' || *p == '#' || /* Ignore empty and comment lines. */ } while (*p == '\0' || *p == '#' || /* Ignore empty and comment lines. */
/* Parse the line. If it is invalid, loop to /* Parse the line. If it is invalid, loop to
get the next line of the file to parse. */ get the next line of the file to parse. */
! parse_line (p, resbuf, (void *) buffer, buflen, ! parse_line (p, resbuf, (void *) buffer, buflen, &errno));
__errno_location ()));
*result = resbuf; *result = resbuf;
return 0; return 0;

View File

@ -60,8 +60,7 @@ __fgetspent_r (FILE *stream, struct spwd *resbuf, char *buffer, size_t buflen,
} while (*p == '\0' || *p == '#' || /* Ignore empty and comment lines. */ } while (*p == '\0' || *p == '#' || /* Ignore empty and comment lines. */
/* Parse the line. If it is invalid, loop to /* Parse the line. If it is invalid, loop to
get the next line of the file to parse. */ get the next line of the file to parse. */
! parse_line (buffer, (void *) resbuf, NULL, 0, ! parse_line (buffer, (void *) resbuf, NULL, 0, &errno));
__errno_location ()));
*result = resbuf; *result = resbuf;
return 0; return 0;

View File

@ -1,4 +1,4 @@
/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. /* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or The GNU C Library is free software; you can redistribute it and/or
@ -92,7 +92,7 @@ __sgetspent_r (const char *string, struct spwd *resbuf, char *buffer,
size_t buflen, struct spwd **result) size_t buflen, struct spwd **result)
{ {
int parse_result = parse_line (strncpy (buffer, string, buflen), int parse_result = parse_line (strncpy (buffer, string, buflen),
resbuf, NULL, 0, __errno_location ()); resbuf, NULL, 0, &errno);
*result = parse_result > 0 ? resbuf : NULL; *result = parse_result > 0 ? resbuf : NULL;
return *result == NULL ? errno : 0; return *result == NULL ? errno : 0;

View File

@ -1,5 +1,5 @@
/* Get public or secret key from key server. /* Get public or secret key from key server.
Copyright (C) 1996, 1997 Free Software Foundation, Inc. Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@ -64,7 +64,7 @@ getpublickey (const char *name, char *key)
while (! no_more) while (! no_more)
{ {
status = (*fct) (name, key, __errno_location ()); status = (*fct) (name, key, &errno);
no_more = __nss_next (&nip, "getpublickey", (void **) &fct, status, 0); no_more = __nss_next (&nip, "getpublickey", (void **) &fct, status, 0);
} }

View File

@ -1,4 +1,4 @@
/* Copyright (C) 1991, 1995, 1996, 1997 Free Software Foundation, Inc. /* Copyright (C) 1991, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or The GNU C Library is free software; you can redistribute it and/or
@ -23,7 +23,7 @@
protocol PROTOCOL. If PROTOCOL is zero, one is chosen automatically. protocol PROTOCOL. If PROTOCOL is zero, one is chosen automatically.
Returns a file descriptor for the new socket, or -1 for errors. */ Returns a file descriptor for the new socket, or -1 for errors. */
int int
socket (domain, type, protocol) __socket (domain, type, protocol)
int domain; int domain;
int type; int type;
int protocol; int protocol;
@ -33,5 +33,6 @@ socket (domain, type, protocol)
} }
weak_alias (__socket, socket)
stub_warning (socket) stub_warning (socket)
#include <stub-tag.h> #include <stub-tag.h>

View File

@ -21,7 +21,7 @@
#include <utmpx.h> #include <utmpx.h>
void void
__updwtmpx (const char *wtmpx_file, const struct utmpx *utmpx) updwtmpx (const char *wtmpx_file, const struct utmpx *utmpx)
{ {
__updwtmp (wtmpx_file, (const struct utmp *) utmpx); __updwtmp (wtmpx_file, (const struct utmp *) utmpx);
} }

View File

@ -123,7 +123,7 @@ $(inst_libdir)/libc.so: $(rpcuserlibs)
# linker, too. It must be self-contained, so we link the needed PIC # linker, too. It must be self-contained, so we link the needed PIC
# objects directly into the shared object. # objects directly into the shared object.
ifeq (elf,$(subdir)) ifeq (elf,$(subdir))
$(objpfx)librtld.so: $(rpcuserlibs:.so=_pic.a) $(objpfx)librtld.os: $(rpcuserlibs:.so=_pic.a)
endif endif

View File

@ -1,11 +1,12 @@
/* This file defines the Mach error system for Hurd server errors. */ /* This file defines the Mach error system for Hurd server errors. */
#include <stdio.h>
#include <errno.h> #include <errno.h>
extern const char *const _hurd_errlist[];
/* Omit `const' because we are included with `static' /* Omit `const' because we are included with `static'
defined to `static const'. */ defined to `static const'. */
static struct error_subsystem err_hurd_sub[] = static struct error_subsystem err_hurd_sub[] =
{ {
{ "(os/hurd)", _HURD_ERRNOS, (const char *const *) _sys_errlist }, { "(os/hurd)", _HURD_ERRNOS, (const char *const *) _hurd_errlist },
}; };

View File

@ -26,3 +26,7 @@
#define ERR_REMAP(n) (err_get_code (n)) #define ERR_REMAP(n) (err_get_code (n))
#include <sysdeps/gnu/errlist.c> #include <sysdeps/gnu/errlist.c>
/* Oblige programs that use sys_nerr, but don't use sys_errlist. */
weak_alias (_hurd_nerr, sys_nerr)
weak_alias (_hurd_nerr, _sys_nerr)

View File

@ -1,4 +1,4 @@
/* Copyright (C) 1991, 92, 93, 94, 95, 97 Free Software Foundation, Inc. /* Copyright (C) 1991, 92, 93, 94, 95, 97, 98 Free Software Foundation, Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or The GNU C Library is free software; you can redistribute it and/or
@ -18,6 +18,7 @@
#include <sys/types.h> #include <sys/types.h>
#include <errno.h> #include <errno.h>
#include <unistd.h>
#include <hurd.h> #include <hurd.h>
#include <hurd/fd.h> #include <hurd/fd.h>
@ -25,10 +26,12 @@
int int
ftruncate (fd, length) ftruncate (fd, length)
int fd; int fd;
off_t length; __off_t length;
{ {
error_t err; error_t err;
if (err = HURD_DPORT_USE (fd, __file_set_size (port, length))) if (err = HURD_DPORT_USE (fd, __file_set_size (port, length)))
return __hurd_dfail (fd, err); return __hurd_dfail (fd, err);
return 0; return 0;
} }
weak_alias (__ftruncate, ftruncate)

View File

@ -1,4 +1,4 @@
/* Copyright (C) 1993, 1994, 1995, 1997 Free Software Foundation, Inc. /* Copyright (C) 1993, 1994, 1995, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or The GNU C Library is free software; you can redistribute it and/or
@ -23,13 +23,11 @@
/* Read NBYTES into BUF from FD. Return the number read or -1. */ /* Read NBYTES into BUF from FD. Return the number read or -1. */
ssize_t ssize_t
__read (fd, buf, nbytes) __libc_read (int fd, void *buf, size_t nbytes)
int fd;
void *buf;
size_t nbytes;
{ {
error_t err = HURD_FD_USE (fd, _hurd_fd_read (descriptor, buf, &nbytes)); error_t err = HURD_FD_USE (fd, _hurd_fd_read (descriptor, buf, &nbytes));
return err ? __hurd_dfail (fd, err) : nbytes; return err ? __hurd_dfail (fd, err) : nbytes;
} }
weak_alias (__read, read) weak_alias (__libc_read, __read)
weak_alias (__libc_read, read)

View File

@ -1,4 +1,4 @@
/* Copyright (C) 1992, 93, 94, 95, 96, 97 Free Software Foundation, Inc. /* Copyright (C) 1992, 93, 94, 95, 96, 97, 98 Free Software Foundation, Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or The GNU C Library is free software; you can redistribute it and/or
@ -26,9 +26,8 @@
/* Create a new socket of type TYPE in domain DOMAIN, using /* Create a new socket of type TYPE in domain DOMAIN, using
protocol PROTOCOL. If PROTOCOL is zero, one is chosen automatically. protocol PROTOCOL. If PROTOCOL is zero, one is chosen automatically.
Returns a file descriptor for the new socket, or -1 for errors. */ Returns a file descriptor for the new socket, or -1 for errors. */
/* XXX should be __socket ? */
int int
socket (domain, type, protocol) __socket (domain, type, protocol)
int domain; int domain;
int type; int type;
int protocol; int protocol;
@ -65,3 +64,5 @@ socket (domain, type, protocol)
return _hurd_intern_fd (sock, O_IGNORE_CTTY, 1); return _hurd_intern_fd (sock, O_IGNORE_CTTY, 1);
} }
weak_alias (__socket, socket)

View File

@ -1,4 +1,4 @@
/* Copyright (C) 1991, 92, 93, 94, 95, 97 Free Software Foundation, Inc. /* Copyright (C) 1991, 92, 93, 94, 95, 97, 98 Free Software Foundation, Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or The GNU C Library is free software; you can redistribute it and/or
@ -22,15 +22,11 @@
#include <hurd/fd.h> #include <hurd/fd.h>
ssize_t ssize_t
__write (fd, buf, nbytes) __libc_write (int fd, const void *buf, size_t nbytes)
int fd;
const void *buf;
size_t nbytes;
{ {
error_t err = HURD_FD_USE (fd, _hurd_fd_write (descriptor, buf, &nbytes)); error_t err = HURD_FD_USE (fd, _hurd_fd_write (descriptor, buf, &nbytes));
return err ? __hurd_dfail (fd, err) : nbytes; return err ? __hurd_dfail (fd, err) : nbytes;
} }
weak_alias (__libc_write, __write)
weak_alias (__libc_write, write)
weak_alias (__write, write)

View File

@ -1,4 +1,4 @@
/* Copyright (C) 1991, 92, 93, 95, 96, 97 Free Software Foundation, Inc. /* Copyright (C) 1991, 92, 93, 95, 96, 97, 98 Free Software Foundation, Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or The GNU C Library is free software; you can redistribute it and/or
@ -22,7 +22,7 @@
#include <features.h> #include <features.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/socket.h> #include <bits/sockaddr.h>
__BEGIN_DECLS __BEGIN_DECLS

View File

@ -24,13 +24,26 @@
#define DL_FIND_ARG_COMPONENTS(cookie, argc, argv, envp, auxp) \ #define DL_FIND_ARG_COMPONENTS(cookie, argc, argv, envp, auxp) \
do { \ do { \
char **_tmp; \ char **_tmp; \
size_t _test; \
(argc) = *(long *) cookie; \ (argc) = *(long *) cookie; \
(argv) = (char **) cookie + 1; \ (argv) = (char **) cookie + 1; \
(envp) = (argv) + (argc) + 1; \ (envp) = (argv) + (argc) + 1; \
for (_tmp = (envp); *_tmp; ++_tmp) \ for (_tmp = (envp); *_tmp; ++_tmp) \
continue; \ continue; \
(auxp) = (void *) ++_tmp; \ /* The following '++' is important! */ \
(auxp) = (void *)(((size_t)(auxp) + 0xF) & 0xFFFFFFF0); \ ++_tmp; \
\
_test = (size_t)_tmp; \
_test = _test + 0xf & ~0xf; \
/* Under some circumstances, MkLinux (up to at least DR3a5) \
omits the padding. To work around this, we make a \
basic sanity check of the argument vector. Of \
course, this means that in future, the argument \
vector will have to be laid out to allow for this \
test :-(. */ \
if (((ElfW(auxv_t) *)_test)->a_type <= 0x10) \
_tmp = (char **)_test; \
(auxp) = (ElfW(auxv_t) *) _tmp; \
} while (0) } while (0)