aboutsummaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1996-09-27 03:45:24 +0000
committerUlrich Drepper <drepper@redhat.com>1996-09-27 03:45:24 +0000
commitc40298232a7ed3fb1b64eb4ffe352829deb79694 (patch)
tree6e5105602f9339c8a17b835ddc0318cd2c698b2c /sysdeps
parentd022f6ab9f45c66478e6b3e45b3f9b3de12e090d (diff)
downloadglibc-c40298232a7ed3fb1b64eb4ffe352829deb79694.tar
glibc-c40298232a7ed3fb1b64eb4ffe352829deb79694.tar.gz
glibc-c40298232a7ed3fb1b64eb4ffe352829deb79694.tar.bz2
glibc-c40298232a7ed3fb1b64eb4ffe352829deb79694.zip
update from main archivecvs/libc-960927
Mon Sep 23 15:31:04 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu> * hurd/Makefile ($(includedir)/rpc/netdb.h): There is no make variable `top_srcdir' in libc; use $(..) instead. * sysdeps/mach/hurd/Makefile (rtld-installed-name): Delete special definition. It was a *Mistake*. (With a capital M.) * sysdeps/mach/getsysstats.c (__get_nprocs): Renamed from __get_nproc. (__get_nprocs_conf): Renamed from __get_nproc_conf. Fri Sep 27 03:49:56 1996 Ulrich Drepper <drepper@cygnus.com> Add support for cancelable system calls. * csu/initfini.c: Make in crti.o reference to symbol __libc_force_cancel_wrapper when compiling reentrant version. * misc/Makefile (routines): Add force-wrapper. * misc/force-wrapper.c: New file. * posix/system.c: Rename function to __libc_system and make system a weak alias. * sysdeps/stub/system.c: Likewise. * posix/wait.c: Rename function to __libc_wait and make __wait a weak alias. De-ANSI-fy. * sysdeps/standalone/read.c: Rename function to __libc_read and make __read a weak alias. * sysdeps/stub/read.c: Likewise. * sysdeps/standalone/write.c: Rename function to __libc_write and make __write a weak alias. * sysdeps/stub/write.c: Likewise. * sysdeps/stub/tcdrain.c: Rename function to __libc_tcdrain and make tcdrain a weak alias. * sysdeps/unix/bsd/tcdrain.c: Likewise. * sysdeps/unix/bsd/bsd4.4/tcdrain.c: Likewise. * sysdeps/unix/sysv/tcdrain.c: Likewise. * sysdeps/unix/sysv/linux/tcdrain.c: Likewise. * sysdeps/unix/bsd/bsd4.4/wait.c: Rename function to __libc_wait and make __wait a weak alias. * sysdeps/stub/waitpid.c: Rename function to __libc_waitpid and make __waitpid a weak alias. * sysdeps/unix/bsd/bsd4.4/waitpid.c: Likewise. * sysdeps/unix/sysv/linux/waitpid.c: Likewise. * sysdeps/unix/sysv/sysv4/waitpid.c: Likewise. * sysdeps/unix/common/pause.c: Rename function to __libc_pause and make pause a weak alias. De-ANSI-fy. * sysdeps/unix/syscalls.list: Change name for close, fcntl, fsync, lseek, open, read, and write to have __libc_ prefix and make old names a weak alias. * sysdeps/unix/mman/syscalls.list: Likewise for msync. * sysdeps/unix/sysv/linux/syscalls.list: Likewise for nanosleep. * io/creat.c: De-ANSI-fy. * sysdeps/unix/sysv/linux/syscalls.list: Add pause. Thu Sep 26 19:15:55 1996 Ulrich Drepper <drepper@cygnus.com> * misc/mntent.h: Add MNTTYPE_* and MNTOPT_* macros. Reported by Hans Grobler <grobh@nolian.ee.sun.ac.za>. Thu Sep 26 14:40:10 1996 Ulrich Drepper <drepper@cygnus.com> * sysdeps/posix/pathconf.c: Pass descriptor for just opened file to fpathconf. Reported by Martin von Loewis <martin@mira.isdn.cs.tu-berlin.de>. Thu Sep 26 04:02:43 1996 Ulrich Drepper <drepper@cygnus.com> * locale/programs/locfile.c (write_locale_data): Allocate room even for file name for LC_MESSAGES locale. (locafile_read): `tok_era' must be handled as a string list. * locale/programs/ld-time.c: Finish correction of handling `era'. * locale/C-time.c (_nl_C_LC_TIME): Add initializer for new fields. * locale/categories.def: Add postload function for LC_TIME. * locale/setlocale.c: Make lock global and rename to __libc_setlocale_lock. * locale/localeinfo.h (struct era_entry): New type. Used in strftime. Add prototypes for _nl_get_era_entry and _nl_get_alt_digit. * locale/lc-time.c (_nl_postload_time): New function. Initialize lazy intialization. (_nl_get_era_entry): New function. Return era entry which corresponds to given year. (_nl_get_alt_digit): New function. Return string with alternate digit representation for given number. * time/strftime.c (strftime): Use _nl_get_alt_digit to get string representing alternate digit notation. Wed Sep 25 17:31:55 1996 Ulrich Drepper <drepper@cygnus.com> * sysdeps/generic/waitstatus.h (union wait): Add w_status field. Reported by Hans Grobler <grobh@nolian.ee.sun.ac.za>. * elf/rtld.c (dl_main): Process LD_PRELOAD before loading ld.so.preload. Suggested by David Engel <david@elo.ods.com>. Wed Sep 25 13:10:57 1996 Ulrich Drepper <drepper@cygnus.com> * catgets/gencat.c (main): Change --version again because RMS wants the package name in parentheses. * db/makedb.c: Likewise. * locale/programs/locale.c: Likewise. * locale/programs/localedef.c: Likewise. Tue Sep 24 01:28:05 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * Makefile ($(objpfx)sysd-dirs): Depend on Subdirs files, command rewritten. ($(objpfx)version-info.h): Depend on Banner files, command rewritten. Wed Sep 25 02:44:41 1996 Ulrich Drepper <drepper@cygnus.com> * sysdeps/unix/sysv/linux/sleep.c: New file. Based on nanosleep. Tue Sep 24 21:46:02 1996 Ulrich Drepper <drepper@cygnus.com> * shadow/lckpwdf.c (PWD_LOCKFILE): Change to /etc/lock.pwd to be on the same device as the password file. * shadow/shadow.h (struct spwd): Change type of numeric fields to `long int' since there value are days, not seconds. * shadow/putspent.c: Change casts from time_t to `long int'. * shadow/sgetspent_r.c (LINE_READER): Likewise. Mon Sep 23 23:05:24 1996 Ulrich Drepper <drepper@cygnus.com> * sysdeps/unix/sysv/linux/errnos.h: Define __set_errno to make sure the thread specific variable is set as well as the global variable. * sysdeps/mach/hurd/errnos.awk: Define macro for source code compatibility. * sysdeps/stub/errnos.h: Likewise. * sysdeps/unix/bsd/bsd4.4/errnos.h: Likewise. * shadow/putspent.c: Don't include <errno.h>. * dirent/scandir.c (scandir): Use __set_errno to set errno variable. * elf/dl-load.c (open_path): Likewise. * inet/rcmd.c (rcmd): Likewise. (rresvport): Likewise. * intl/dcgettext.c [!__set_errno]: Define __set_errno. (DCGETTEXT): Use __set_errno to set errno variable. * io/fts.c (fts_open): Likewise. (fts_close): Likewise. (fts_read): Likewise. (fts_set): Likewise. (fts_children): Likewise. (fts_build): Likewise. (fts_stat): Likewise. * io/ftw.c (ftw_dir): Likewise. (ftw): Likewise. * io/getwd.c (getwd): Likewise. * io/lockf.c (lockf): Likewise. * libio/libioP.h [EINVAL]: Use __set_errno to define MAYBE_SET_EINVAL. * libio/iofdopen.c (_IO_fdopen): Use MAYBE_SET_EINVAL to errno. * libio/iogetdelim.c (_IO_getdelim): Likewise. * libio/fileops.c (_IO_file_open): Use __set_errno to set errno variable. * libio/iofgetpos.c (_IO_fgetpos): Likewise. * libio/iofsetpos.c (_IO_fsetpos): Likewise. * libio/ioftell.c (_IO_ftell): Likewise. * locale/loadlocale.c (_nl_load_locale): Likewise. * locale/nl_langinfo.c (nl_langinfo): Likewise. * locale/setlocale.c (ERROR_RETURN): Likewise. * login/getutid_r (__getutid_r): Likewise. * login/getutline_r (__getutline_r): Likewise. * login/login.c (tty_name): Likewise. * login/oututline_r.c (__pututline_r): Likewise. * malloc/malloc.c (morecore): Likewise. * misc/efgcvt_r.c (fcvt_r): Likewise. * misc/hsearch_r.c (hcreate_r): Likewise. (hdestroy_r): Likewise. (hsearch_r): Likewise. * nss/nsswitch.c (__nss_configure_lookup): Likewise. * nss/nss_dns/dns-host.c (_nss_dns_gethostbyname2_r): Likewise. (_nss_dns_gethostbyaddr_r): Likewise. * nss/nss_files/files-XXX.c (internal_getent): Likewise. * nss/nss_files/files-parse.c (parse_list): Likewise. * posix/confstr.c (confstr): Likewise. De-ANSI-fy. * posix/execvp.c (execvp): Likewise. * posix/glob.c: Define __set_errno. (glob): Use __set_errno to set errno variable. (glob_in_dir): Likewise. * pwd/getpw.c: Likewise. De-ANSI-fy. * pwd/putpwent.c: Likewise. * resolv/inet_net_ntop.c: Likewise. * resolv/inet_net_pton.c: Likewise. * resolv/inet_neta.c: Likewise. * resolv/inet_ntop.c: Likewise. * resolv/inet_pton.c: Likewise. * resolv/res_query.c (res_search): Likewise. * resolv/res_send.c (Aerror): Likewise. (Perror): Likewise. (res_send): Likewise. * signal/sigaddset.c: Likewise. De-ANSI-fy. * signal/sigdelset.c: Likewise. * signal/sigempty.c: Likewise. * signal/sigfillset.c: Likewise. * signal/sigismem.c: Likewise. * stdio/fclose.c: Likewise. * stdio/feof.c: Likewise. * stdio/ferror.c: Likewise. * stdio/fflush.c: Likewise. * stdio/fgetc.c: Likewise. * stdio/fgetpos.c: Likewise. * stdio/fgets.c: Likewise. * stdio/fileno.c: Likewise. * stdio/fmemopen.c: Likewise. * stdio/fopen.c: Likewise. * stdio/fputc.c: Likewise. * stdio/fread.c: Likewise. * stdio/freopen.c: Likewise. * stdio/fseek.c: Likewise. * stdio/fsetpos.c: Likewise. * stdio/ftell.c: Likewise. * stdio/fwrite.c: Likewise. * stdio/getdelim.c: Likewise. * stdio/gets.c: Likewise. * stdio/glue.c: Likewise. * stdio/internals.c: Likewise. * stdio/memstream.c: Likewise. * stdio/setvbuf.c: Likewise. * stdio/ungetc.c: Likewise. * stdio/vsscanf.c: Likewise. * stdio-common/reg-printf.c: Likewise. * stdio-common/vfprintf.c: Likewise. * stdio-common/vfscanf.c: Likewise. * stdlib/canonicalize.c: Likewise. * stdlib/msort.c: Likewise. * stdlib/random_r.c: Likewise. * stdlib/strfmon.c: Likewise. * stdlib/strtod.c: Likewise. * stdlib/strtol.c: Likewise. * sunrpc/bindrsvprt.c: Likewise. * time/asctime.c: Likewise. * time/localtime.c: Likewise. * wcsmbs/mbrtowc.c: Likewise. * wcsmbs/mbsnrtowcs.c: Likewise. * wcsmbs/mbsrtowcs.c: Likewise. * wcsmbs/wcrtomb.c: Likewise. * wcsmbs/wcsnrtombs.c: Likewise. * wcsmbs/wcsrtombs.c: Likewise. * wcsmbs/wcstok.c: Likewise. * sysdeps/generic/ftime.c: Likewise. * sysdeps/generic/pty.c: Likewise. * sysdeps/generic/setenv.c: Likewise. * sysdeps/generic/speed.c: Likewise. * sysdeps/generic/sysd-stdio.c: Likewise. * sysdeps/generic/uname.c: Likewise. * sysdeps/generic/vlimit.c: Likewise. * sysdeps/libm-ieee754/k_standard.c: Likewise. * sysdeps/libm-ieee754/s_ldexp.c: Likewise. * sysdeps/libm-ieee754/s_ldexpf.c: Likewise. * sysdeps/libm-ieee754/s_ldexpl.c: Likewise. * sysdeps/libm-ieee754/w_scalb.c: Likewise. * sysdeps/libm-ieee754/w_scalbf.c: Likewise. * sysdeps/libm-ieee754/w_scalbl.c: Likewise. * sysdeps/posix/dup2.c: Likewise. * sysdeps/posix/euidaccess.c: Likewise. * sysdeps/posix/fdopen.c: Likewise. * sysdeps/posix/flock.c: Likewise. * sysdeps/posix/fpathconf.c: Likewise. * sysdeps/posix/getcwd.c: Likewise. * sysdeps/posix/gettimeofday.c: Likewise. * sysdeps/posix/isatty.c: Likewise. * sysdeps/posix/isfdtype.c: Likewise. * sysdeps/posix/killpg.c: Likewise. * sysdeps/posix/mkstemp.c: Likewise. * sysdeps/posix/mktemp.c: Likewise. * sysdeps/posix/pathconf.c: Likewise. * sysdeps/posix/pipestream.c: Likewise. * sysdeps/posix/remove.c: Likewise. * sysdeps/posix/rename.c: Likewise. * sysdeps/posix/sigintr.c: Likewise. * sysdeps/posix/signal.c: Likewise. * sysdeps/posix/sigsuspend.c: Likewise. * sysdeps/posix/sigvec.c: Likewise. * sysdeps/posix/sleep.c: Likewise. * sysdeps/posix/sysconf.c: Likewise. * sysdeps/posix/system.c: Likewise. * sysdeps/posix/tempname.c: Likewise. * sysdeps/posix/truncate.c: Likewise. * sysdeps/posix/ttyname.c: Likewise. * sysdeps/posix/ttyname_r.c: Likewise. * sysdeps/posix/wait3.c: Likewise. * sysdeps/standalone/close.c: Likewise. * sysdeps/standalone/open.c: Likewise. * sysdeps/standalone/read.c: Likewise. * sysdeps/standalone/write.c: Likewise. * sysdeps/stub/__longjmp.c: Likewise. * sysdeps/stub/accept.c: Likewise. * sysdeps/stub/access.c: Likewise. * sysdeps/stub/acct.c: Likewise. * sysdeps/stub/adjtime.c: Likewise. * sysdeps/stub/alarm.c: Likewise. * sysdeps/stub/bind.c: Likewise. * sysdeps/stub/brk.c: Likewise. * sysdeps/stub/chdir.c: Likewise. * sysdeps/stub/chflags.c: Likewise. * sysdeps/stub/chmod.c: Likewise. * sysdeps/stub/chown.c: Likewise. * sysdeps/stub/chroot.c: Likewise. * sysdeps/stub/clock.c: Likewise. * sysdeps/stub/close.c: Likewise. * sysdeps/stub/closedir.c: Likewise. * sysdeps/stub/connect.c: Likewise. * sysdeps/stub/ctermid.c: Likewise. * sysdeps/stub/cuserid.c: Likewise. * sysdeps/stub/dirfd.c: Likewise. * sysdeps/stub/dup.c: Likewise. * sysdeps/stub/dup2.c: Likewise. * sysdeps/stub/euidaccess.c: Likewise. * sysdeps/stub/execve.c: Likewise. * sysdeps/stub/fchdir.c: Likewise. * sysdeps/stub/fchflags.c: Likewise. * sysdeps/stub/fchmod.c: Likewise. * sysdeps/stub/fchown.c: Likewise. * sysdeps/stub/fcntl.c: Likewise. * sysdeps/stub/fdopen.c: Likewise. * sysdeps/stub/fexecve.c: Likewise. * sysdeps/stub/flock.c: Likewise. * sysdeps/stub/fork.c: Likewise. * sysdeps/stub/fpathconf.c: Likewise. * sysdeps/stub/fstatfs.c: Likewise. * sysdeps/stub/fsync.c: Likewise. * sysdeps/stub/ftruncate.c: Likewise. * sysdeps/stub/fxstat.c: Likewise. * sysdeps/stub/getcwd.c: Likewise. * sysdeps/stub/getdents.c: Likewise. * sysdeps/stub/getdomain.c: Likewise. * sysdeps/stub/getdtsz.c: Likewise. * sysdeps/stub/getegid.c: Likewise. * sysdeps/stub/getenv.c: Likewise. * sysdeps/stub/geteuid.c: Likewise. * sysdeps/stub/getgid.c: Likewise. * sysdeps/stub/getgroups.c: Likewise. * sysdeps/stub/gethostid.c: Likewise. * sysdeps/stub/gethostname.c: Likewise. * sysdeps/stub/getitimer.c: Likewise. * sysdeps/stub/getlogin.c: Likewise. * sysdeps/stub/getlogin_r.c: Likewise. * sysdeps/stub/getpagesize.c: Likewise. * sysdeps/stub/getpeername.c: Likewise. * sysdeps/stub/getpid.c: Likewise. * sysdeps/stub/getppid.c: Likewise. * sysdeps/stub/getpriority.c: Likewise. * sysdeps/stub/getrlimit.c: Likewise. * sysdeps/stub/getrusage.c: Likewise. * sysdeps/stub/getsid.c: Likewise. * sysdeps/stub/getsockname.c: Likewise. * sysdeps/stub/getsockopt.c: Likewise. * sysdeps/stub/getsysstats.c: Likewise. * sysdeps/stub/gettimeofday.c: Likewise. * sysdeps/stub/getuid.c: Likewise. * sysdeps/stub/gtty.c: Likewise. * sysdeps/stub/ioctl.c: Likewise. * sysdeps/stub/isatty.c: Likewise. * sysdeps/stub/isfdtype.c: Likewise. * sysdeps/stub/kill.c: Likewise. * sysdeps/stub/killpg.c: Likewise. * sysdeps/stub/link.c: Likewise. * sysdeps/stub/listen.c: Likewise. * sysdeps/stub/lseek.c: Likewise. * sysdeps/stub/lxstat.c: Likewise. * sysdeps/stub/madvice.c: Likewise. * sysdeps/stub/mkdir.c: Likewise. * sysdeps/stub/mkfifo.c: Likewise. * sysdeps/stub/mkstemp.c: Likewise. * sysdeps/stub/mktemp.c: Likewise. * sysdeps/stub/mmap.c: Likewise. * sysdeps/stub/morecore.c: Likewise. * sysdeps/stub/mprotect.c: Likewise. * sysdeps/stub/msgctl.c: Likewise. * sysdeps/stub/msgget.c: Likewise. * sysdeps/stub/msgrcv.c: Likewise. * sysdeps/stub/msgsnd.c: Likewise. * sysdeps/stub/msync.c: Likewise. * sysdeps/stub/munmap.c: Likewise. * sysdeps/stub/nanosleep.c: Likewise. * sysdeps/stub/nice.c: Likewise. * sysdeps/stub/nlist.c: Likewise. * sysdeps/stub/open.c: Likewise. * sysdeps/stub/opendir.c: Likewise. * sysdeps/stub/pathconf.c: Likewise. * sysdeps/stub/pause.c: Likewise. * sysdeps/stub/pipe.c: Likewise. * sysdeps/stub/pipestream.c: Likewise. * sysdeps/stub/poll.c: Likewise. * sysdeps/stub/profil.c: Likewise. * sysdeps/stub/ptrace.c: Likewise. * sysdeps/stub/putenv.c: Likewise. * sysdeps/stub/raise.c: Likewise. * sysdeps/stub/read.c: Likewise. * sysdeps/stub/readdir.c: Likewise. * sysdeps/stub/readlink.c: Likewise. * sysdeps/stub/readv.c: Likewise. * sysdeps/stub/reboot.c: Likewise. * sysdeps/stub/recv.c: Likewise. * sysdeps/stub/recvfrom.c: Likewise. * sysdeps/stub/recvmsg.c: Likewise. * sysdeps/stub/remove.c: Likewise. * sysdeps/stub/rename.c: Likewise. * sysdeps/stub/revoke.c: Likewise. * sysdeps/stub/rewinddir.c: Likewise. * sysdeps/stub/rmdir.c: Likewise. * sysdeps/stub/sbrk.c: Likewise. * sysdeps/stub/sched_getp.c: Likewise. * sysdeps/stub/sched_gets.c: Likewise. * sysdeps/stub/sched_primax.c: Likewise. * sysdeps/stub/sched_primin.c: Likewise. * sysdeps/stub/sched_rr_gi.c: Likewise. * sysdeps/stub/sched_setp.c: Likewise. * sysdeps/stub/sched_sets.c: Likewise. * sysdeps/stub/sched_yield.c: Likewise. * sysdeps/stub/seekdir.c: Likewise. * sysdeps/stub/select.c: Likewise. * sysdeps/stub/semctl.c: Likewise. * sysdeps/stub/semget.c: Likewise. * sysdeps/stub/semop.c: Likewise. * sysdeps/stub/send.c: Likewise. * sysdeps/stub/sendmsg.c: Likewise. * sysdeps/stub/sendto.c: Likewise. * sysdeps/stub/setdomain.c: Likewise. * sysdeps/stub/setegid.c: Likewise. * sysdeps/stub/setenv.c: Likewise. * sysdeps/stub/seteuid.c: Likewise. * sysdeps/stub/setgid.c: Likewise. * sysdeps/stub/setgroups.c: Likewise. * sysdeps/stub/sethostid.c: Likewise. * sysdeps/stub/sethostname.c: Likewise. * sysdeps/stub/setitimer.c: Likewise. * sysdeps/stub/setjmp.c: Likewise. * sysdeps/stub/setlogin.c: Likewise. * sysdeps/stub/setpgid.c: Likewise. * sysdeps/stub/setpriority.c: Likewise. * sysdeps/stub/setregid.c: Likewise. * sysdeps/stub/setreuid.c: Likewise. * sysdeps/stub/setrlimit.c: Likewise. * sysdeps/stub/setsid.c: Likewise. * sysdeps/stub/setsockopt.c: Likewise. * sysdeps/stub/settimeofday.c: Likewise. * sysdeps/stub/setuid.c: Likewise. * sysdeps/stub/shmat.c: Likewise. * sysdeps/stub/shmctl.c: Likewise. * sysdeps/stub/shmdt.c: Likewise. * sysdeps/stub/shmget.c: Likewise. * sysdeps/stub/shutdown.c: Likewise. * sysdeps/stub/sigaction.c: Likewise. * sysdeps/stub/sigaltstack.c: Likewise. * sysdeps/stub/sigblock.c: Likewise. * sysdeps/stub/sigintr.c: Likewise. * sysdeps/stub/signal.c: Likewise. * sysdeps/stub/sigpause.c: Likewise. * sysdeps/stub/sigpending.c: Likewise. * sysdeps/stub/sigprocmask.c: Likewise. * sysdeps/stub/sigreturn.c: Likewise. * sysdeps/stub/sigsetmask.c: Likewise. * sysdeps/stub/sigstack.c: Likewise. * sysdeps/stub/sigsuspend.c: Likewise. * sysdeps/stub/sigvec.c: Likewise. * sysdeps/stub/sleep.c: Likewise. * sysdeps/stub/socket.c: Likewise. * sysdeps/stub/socketpair.c: Likewise. * sysdeps/stub/sstk.c: Likewise. * sysdeps/stub/statfs.c: Likewise. * sysdeps/stub/stime.c: Likewise. * sysdeps/stub/stty.c: Likewise. * sysdeps/stub/swapoff.c: Likewise. * sysdeps/stub/swapon.c: Likewise. * sysdeps/stub/symlink.c: Likewise. * sysdeps/stub/sync.c: Likewise. * sysdeps/stub/syscall.c: Likewise. * sysdeps/stub/sysconf.c: Likewise. * sysdeps/stub/sysd-stdio.c: Likewise. * sysdeps/stub/system.c: Likewise. * sysdeps/stub/tcdrain.c: Likewise. * sysdeps/stub/tcflow.c: Likewise. * sysdeps/stub/tcflush.c: Likewise. * sysdeps/stub/tcgetattr.c: Likewise. * sysdeps/stub/tcgetpgrp.c: Likewise. * sysdeps/stub/tcsendbrk.c: Likewise. * sysdeps/stub/tcsetattr.c: Likewise. * sysdeps/stub/tcsetpgrp.c: Likewise. * sysdeps/stub/telldir.c: Likewise. * sysdeps/stub/tempname.c: Likewise. * sysdeps/stub/time.c: Likewise. * sysdeps/stub/times.c: Likewise. * sysdeps/stub/truncate.c: Likewise. * sysdeps/stub/ttyname.c: Likewise. * sysdeps/stub/ttyname_r.c: Likewise. * sysdeps/stub/ualarm.c: Likewise. * sysdeps/stub/ulimit.c: Likewise. * sysdeps/stub/umask.c: Likewise. * sysdeps/stub/unlink.c: Likewise. * sysdeps/stub/usleep.c: Likewise. * sysdeps/stub/ustat.c: Likewise. * sysdeps/stub/utime.c: Likewise. * sysdeps/stub/utimes.c: Likewise. * sysdeps/stub/vhangup.c: Likewise. * sysdeps/stub/wait.c: Likewise. * sysdeps/stub/wait3.c: Likewise. * sysdeps/stub/wait4.c: Likewise. * sysdeps/stub/waitpid.c: Likewise. * sysdeps/stub/write.c: Likewise. * sysdeps/stub/writev.c: Likewise. * sysdeps/stub/xmknod.c: Likewise. * sysdeps/stub/xstat.c: Likewise. * sysdeps/unix/closedir.c: Likewise. * sysdeps/unix/fxstat.c: Likewise. * sysdeps/unix/getlogin.c: Likewise. * sysdeps/unix/getlogin_r.c: Likewise. * sysdeps/unix/mkdir.c: Likewise. * sysdeps/unix/nice.c: Likewise. * sysdeps/unix/nlist.c: Likewise. * sysdeps/unix/opendir.c: Likewise. * sysdeps/unix/readdir.c: Likewise. * sysdeps/unix/rmdir.c: Likewise. * sysdeps/unix/stime.c: Likewise. * sysdeps/unix/xmknod.c: Likewise. * sysdeps/unix/xstat.c: Likewise. * sysdeps/unix/bsd/isatty.c: Likewise. * sysdeps/unix/bsd/setegid.c: Likewise. * sysdeps/unix/bsd/seteuid.c: Likewise. * sysdeps/unix/bsd/setsid.c: Likewise. * sysdeps/unix/bsd/sigaction.c: Likewise. * sysdeps/unix/bsd/sigprocmask.c: Likewise. * sysdeps/unix/bsd/sigsuspend.c: Likewise. * sysdeps/unix/bsd/tcflow.c: Likewise. * sysdeps/unix/bsd/tcflush.c: Likewise. * sysdeps/unix/bsd/tcgetattr.c: Likewise. * sysdeps/unix/bsd/tcsetattr.c: Likewise. * sysdeps/unix/bsd/times.c: Likewise. * sysdeps/unix/bsd/ulimit.c: Likewise. * sysdeps/unix/common/lxstat.c: Likewise. * sysdeps/unix/common/tcsendbrk.c: Likewise. * sysdeps/unix/sysv/setrlimit.c: Likewise. * sysdeps/unix/sysv/settimeofday.c: Likewise. * sysdeps/unix/sysv/sigaction.c: Likewise. * sysdeps/unix/sysv/tcflow.c: Likewise. * sysdeps/unix/sysv/tcflush.c: Likewise. * sysdeps/unix/sysv/tcgetattr.c: Likewise. * sysdeps/unix/sysv/tcsendbrk.c: Likewise. * sysdeps/unix/sysv/tcsetattr.c: Likewise. * sysdeps/unix/bsd/ultrix4/sysconf.c: Likewise. * sysdeps/unix/sysv/irix4/getpriority.c: Likewise. * sysdeps/unix/sysv/irix4/setpriority.c: Likewise. * sysdeps/unix/sysv/linux/adjtime.c: Likewise. * sysdeps/unix/sysv/linux/gethostid.c: Likewise. * sysdeps/unix/sysv/linux/gethostname.c: Likewise. * sysdeps/unix/sysv/linux/getsysstats.c: Likewise. * sysdeps/unix/sysv/linux/ptrace.c: Likewise. * sysdeps/unix/sysv/linux/speed.c: Likewise. * sysdeps/unix/sysv/linux/ulimit.c: Likewise. * sysdeps/unix/sysv/sysv4/sigaction.c: Likewise. * sysdeps/unix/sysv/sysv4/sysconf.c: Likewise. * sysdeps/unix/bsd/sun/m68k/sigtramp.c: Likewise. * sysdeps/unix/bsd/sun/sparc/sigtramp.c: Likewise. * sysdeps/unix/bsd/sun/sunos4/speed.c: Likewise. * sysdeps/unix/bsd/sun/sunos4/tcsetattr.c: Likewise. * sysdeps/unix/sysv/linux/alpha/ioperm.c: Likewise. * sysdeps/unix/sysv/linux/i386/brk.c: Likewise. * sysdeps/unix/sysv/linux/i386/sigaction.c: Likewise. * sysdeps/unix/sysv/linux/m68k/brk.c: Likewise. * sunrpc/clnt_tcp.c: Protect declaration of errno by #ifndef. * sunrpc/clnt_udp.c: Likewise. * sunrpc/bindrsvprt.c: Likewise. * sunrpc/pm_getmaps.c: Likewise. * sunrpc/pmap_rmt.c: Likewise. * sunrpc/svc.c: Likewise. * sunrpc/svc_run.c: Likewise. * sunrpc/svc_tcp.c: Likewise. * sunrpc/svc_udp.c: Likewise. * sysdeps/generic/strtok.c: Don't check argument, just crash. * sysdeps/generic/strtok_r.c: Likewise. * sysdeps/stub/start.c: Make __errno a strong alias of errno. * sysdeps/unix/start.c: Likewise. De-ANSI-fy. * sysdeps/unix/sparc/start.c: Likewise. * sysdeps/standalone/m68k/m68020/start.S: Likewise. * sysdeps/unix/sysv/irix4/start.c: Likewise. * sysdeps/unix/bsd/ultrix4/mips/start.S: Likewise. * sysdeps/unix/sysv/linux/i386/sysdep.S: Likewise. * sysdeps/unix/sysv/linux/m68k/sysdep.S: Likewise. Mon Sep 23 17:54:57 1996 Ulrich Drepper <drepper@cygnus.com> * catgets/gencat.c (main): Put package name in --version message in parantheses. Reported by Jim Meyering. * db/makedb.c: Likewise. * locale/programs/locale.c: Likewise. * locale/programs/localedef.c: Likewise. * sysdeps/i386/fpu/__math.h (tan): Make sure gcc knows we use two registers. Patch by John Bowman. Sat Sep 21 15:08:25 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * sysdeps/mach/libc-lock.h: Fix comment. * sysdeps/stubs/libc-lock.h: Likewise. Sat Sep 21 13:50:40 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * libio/genops.c (_IO_init) [_IO_MTSAFE_IO]: Dereference pointer to lock when passing it to __libc_lock_init macro. (_IO_default_finish) [_IO_MTSAFE_IO]: Dereference pointer to lock when passing it to __libc_lock_fini macro. Sat Sep 21 14:35:40 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * sysdeps/unix/sysv/linux/m68k/sysdep.h (SYSCALL_ERROR_HANDLER) [_LIBC_REENTRANT]: Add missing semicolon. * sysdeps/unix/sysv/linux/m68k/sysdep.S: Move inclusion of sysdep.h to the top outside of #ifndef PIC. Don't include errnos.h. Use the ENTRY macro. Sat Sep 21 14:33:41 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * libio/Makefile: Make `all' the default target. * po/Makefile: Likewise. Mon Sep 23 15:49:47 1996 Ulrich Drepper <drepper@cygnus.com> * stdlib/test-canon.c: Correct patch from Thu Sep 12 23:01:16 1996. I applied it incorrectly. * sysdeps/m68k/fpu/s_scalbn.c: Likewise. * sysdeps/m68k/fpu/s_scalbnf.c: Likewise. * sysdeps/m68k/fpu/s_scalbnl.c: Likewise. Mon Sep 23 03:00:10 1996 Ulrich Drepper <drepper@cygnus.com> * shadow/sgetspent_r.c (LINE_PARSER): Accept empty 9th field. Patch by NIIBE Yutaka <gniibe@mri.co.jp>. * shadow/sgetspent_r.c (LINE_PARSER): Don't accept any chars after 9th field. * sysdeps/unix/sysv/linux/Makefile [$(subdir)==misc] (sysdep_headers): Add sys/debugreg.h, sys/kd.h, sys/soundcard.h, and sys/vt.h. * sysdeps/unix/sysv/linux/sys/debugreg.h: New file. * sysdeps/unix/sysv/linux/sys/kd.h: New file. * sysdeps/unix/sysv/linux/sys/soundcard.h: New file. * sysdeps/unix/sysv/linux/sys/vt.h: New file. Reported by NIIBE Yutaka <gniibe@mri.co.jp>.
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/generic/ftime.c4
-rw-r--r--sysdeps/generic/pty.c8
-rw-r--r--sysdeps/generic/setenv.c2
-rw-r--r--sysdeps/generic/speed.c6
-rw-r--r--sysdeps/generic/strtok.c11
-rw-r--r--sysdeps/generic/strtok_r.c11
-rw-r--r--sysdeps/generic/sysd-stdio.c52
-rw-r--r--sysdeps/generic/uname.c10
-rw-r--r--sysdeps/generic/vlimit.c12
-rw-r--r--sysdeps/generic/waitstatus.h3
-rw-r--r--sysdeps/i386/fpu/__math.h6
-rw-r--r--sysdeps/libm-ieee754/k_standard.c164
-rw-r--r--sysdeps/libm-ieee754/s_ldexp.c4
-rw-r--r--sysdeps/libm-ieee754/s_ldexpf.c4
-rw-r--r--sysdeps/libm-ieee754/s_ldexpl.c2
-rw-r--r--sysdeps/libm-ieee754/w_scalb.c10
-rw-r--r--sysdeps/libm-ieee754/w_scalbf.c10
-rw-r--r--sysdeps/libm-ieee754/w_scalbl.c2
-rw-r--r--sysdeps/m68k/fpu/s_scalbn.c1
-rw-r--r--sysdeps/m68k/fpu/s_scalbnf.c1
-rw-r--r--sysdeps/m68k/fpu/s_scalbnl.c1
-rw-r--r--sysdeps/mach/hurd/errnos.awk1
-rw-r--r--sysdeps/mach/libc-lock.h6
-rw-r--r--sysdeps/posix/dup2.c11
-rw-r--r--sysdeps/posix/euidaccess.c7
-rw-r--r--sysdeps/posix/fdopen.c13
-rw-r--r--sysdeps/posix/flock.c9
-rw-r--r--sysdeps/posix/fpathconf.c25
-rw-r--r--sysdeps/posix/getcwd.c13
-rw-r--r--sysdeps/posix/gettimeofday.c2
-rw-r--r--sysdeps/posix/isatty.c10
-rw-r--r--sysdeps/posix/isfdtype.c2
-rw-r--r--sysdeps/posix/killpg.c9
-rw-r--r--sysdeps/posix/mkstemp.c10
-rw-r--r--sysdeps/posix/mktemp.c10
-rw-r--r--sysdeps/posix/pathconf.c6
-rw-r--r--sysdeps/posix/pipestream.c48
-rw-r--r--sysdeps/posix/remove.c4
-rw-r--r--sysdeps/posix/rename.c19
-rw-r--r--sysdeps/posix/sigintr.c10
-rw-r--r--sysdeps/posix/signal.c9
-rw-r--r--sysdeps/posix/sigsuspend.c14
-rw-r--r--sysdeps/posix/sigvec.c40
-rw-r--r--sysdeps/posix/sleep.c11
-rw-r--r--sysdeps/posix/sysconf.c2
-rw-r--r--sysdeps/posix/system.c18
-rw-r--r--sysdeps/posix/tempname.c12
-rw-r--r--sysdeps/posix/truncate.c10
-rw-r--r--sysdeps/posix/ttyname.c10
-rw-r--r--sysdeps/posix/ttyname_r.c6
-rw-r--r--sysdeps/posix/wait.c10
-rw-r--r--sysdeps/posix/wait3.c11
-rw-r--r--sysdeps/standalone/close.c8
-rw-r--r--sysdeps/standalone/m68k/m68020/start.S37
-rw-r--r--sysdeps/standalone/open.c23
-rw-r--r--sysdeps/standalone/read.c23
-rw-r--r--sysdeps/standalone/write.c18
-rw-r--r--sysdeps/stub/__longjmp.c9
-rw-r--r--sysdeps/stub/accept.c11
-rw-r--r--sysdeps/stub/access.c15
-rw-r--r--sysdeps/stub/acct.c8
-rw-r--r--sysdeps/stub/adjtime.c11
-rw-r--r--sysdeps/stub/alarm.c8
-rw-r--r--sysdeps/stub/bind.c9
-rw-r--r--sysdeps/stub/brk.c9
-rw-r--r--sysdeps/stub/chdir.c14
-rw-r--r--sysdeps/stub/chflags.c11
-rw-r--r--sysdeps/stub/chmod.c11
-rw-r--r--sysdeps/stub/chown.c13
-rw-r--r--sysdeps/stub/chroot.c8
-rw-r--r--sysdeps/stub/clock.c7
-rw-r--r--sysdeps/stub/close.c10
-rw-r--r--sysdeps/stub/closedir.c2
-rw-r--r--sysdeps/stub/connect.c9
-rw-r--r--sysdeps/stub/ctermid.c8
-rw-r--r--sysdeps/stub/cuserid.c8
-rw-r--r--sysdeps/stub/dirfd.c4
-rw-r--r--sysdeps/stub/dup.c8
-rw-r--r--sysdeps/stub/dup2.c11
-rw-r--r--sysdeps/stub/errnos.h4
-rw-r--r--sysdeps/stub/euidaccess.c6
-rw-r--r--sysdeps/stub/execve.c14
-rw-r--r--sysdeps/stub/fchdir.c8
-rw-r--r--sysdeps/stub/fchflags.c11
-rw-r--r--sysdeps/stub/fchmod.c11
-rw-r--r--sysdeps/stub/fchown.c13
-rw-r--r--sysdeps/stub/fcntl.c11
-rw-r--r--sysdeps/stub/fdopen.c9
-rw-r--r--sysdeps/stub/fexecve.c14
-rw-r--r--sysdeps/stub/flock.c10
-rw-r--r--sysdeps/stub/fork.c7
-rw-r--r--sysdeps/stub/fpathconf.c11
-rw-r--r--sysdeps/stub/fstatfs.c3
-rw-r--r--sysdeps/stub/fsync.c8
-rw-r--r--sysdeps/stub/ftruncate.c10
-rw-r--r--sysdeps/stub/fxstat.c8
-rw-r--r--sysdeps/stub/getcwd.c4
-rw-r--r--sysdeps/stub/getdents.c12
-rw-r--r--sysdeps/stub/getdomain.c10
-rw-r--r--sysdeps/stub/getdtsz.c7
-rw-r--r--sysdeps/stub/getegid.c7
-rw-r--r--sysdeps/stub/getenv.c10
-rw-r--r--sysdeps/stub/geteuid.c7
-rw-r--r--sysdeps/stub/getgid.c7
-rw-r--r--sysdeps/stub/getgroups.c9
-rw-r--r--sysdeps/stub/gethostid.c7
-rw-r--r--sysdeps/stub/gethostname.c10
-rw-r--r--sysdeps/stub/getitimer.c12
-rw-r--r--sysdeps/stub/getlogin.c7
-rw-r--r--sysdeps/stub/getlogin_r.c2
-rw-r--r--sysdeps/stub/getpagesize.c7
-rw-r--r--sysdeps/stub/getpeername.c11
-rw-r--r--sysdeps/stub/getpgid.c7
-rw-r--r--sysdeps/stub/getpid.c9
-rw-r--r--sysdeps/stub/getppid.c7
-rw-r--r--sysdeps/stub/getpriority.c10
-rw-r--r--sysdeps/stub/getrlimit.c2
-rw-r--r--sysdeps/stub/getrusage.c10
-rw-r--r--sysdeps/stub/getsid.c4
-rw-r--r--sysdeps/stub/getsockname.c11
-rw-r--r--sysdeps/stub/getsockopt.c14
-rw-r--r--sysdeps/stub/getsysstats.c8
-rw-r--r--sysdeps/stub/gettimeofday.c10
-rw-r--r--sysdeps/stub/getuid.c7
-rw-r--r--sysdeps/stub/gtty.c12
-rw-r--r--sysdeps/stub/ioctl.c10
-rw-r--r--sysdeps/stub/isatty.c8
-rw-r--r--sysdeps/stub/isfdtype.c3
-rw-r--r--sysdeps/stub/kill.c9
-rw-r--r--sysdeps/stub/killpg.c9
-rw-r--r--sysdeps/stub/libc-lock.h6
-rw-r--r--sysdeps/stub/link.c11
-rw-r--r--sysdeps/stub/listen.c10
-rw-r--r--sysdeps/stub/lseek.c14
-rw-r--r--sysdeps/stub/lxstat.c4
-rw-r--r--sysdeps/stub/madvise.c4
-rw-r--r--sysdeps/stub/mkdir.c11
-rw-r--r--sysdeps/stub/mkfifo.c11
-rw-r--r--sysdeps/stub/mkstemp.c12
-rw-r--r--sysdeps/stub/mktemp.c12
-rw-r--r--sysdeps/stub/mmap.c4
-rw-r--r--sysdeps/stub/morecore.c8
-rw-r--r--sysdeps/stub/mprotect.c2
-rw-r--r--sysdeps/stub/msgctl.c4
-rw-r--r--sysdeps/stub/msgget.c4
-rw-r--r--sysdeps/stub/msgrcv.c4
-rw-r--r--sysdeps/stub/msgsnd.c4
-rw-r--r--sysdeps/stub/msync.c2
-rw-r--r--sysdeps/stub/munmap.c4
-rw-r--r--sysdeps/stub/nanosleep.c2
-rw-r--r--sysdeps/stub/nice.c8
-rw-r--r--sysdeps/stub/nlist.c12
-rw-r--r--sysdeps/stub/open.c11
-rw-r--r--sysdeps/stub/opendir.c2
-rw-r--r--sysdeps/stub/pathconf.c9
-rw-r--r--sysdeps/stub/pause.c4
-rw-r--r--sysdeps/stub/pipe.c10
-rw-r--r--sysdeps/stub/pipestream.c18
-rw-r--r--sysdeps/stub/poll.c4
-rw-r--r--sysdeps/stub/profil.c4
-rw-r--r--sysdeps/stub/ptrace.c22
-rw-r--r--sysdeps/stub/putenv.c8
-rw-r--r--sysdeps/stub/raise.c8
-rw-r--r--sysdeps/stub/read.c15
-rw-r--r--sysdeps/stub/readdir.c2
-rw-r--r--sysdeps/stub/readlink.c11
-rw-r--r--sysdeps/stub/readv.c11
-rw-r--r--sysdeps/stub/reboot.c8
-rw-r--r--sysdeps/stub/recv.c12
-rw-r--r--sysdeps/stub/recvfrom.c15
-rw-r--r--sysdeps/stub/recvmsg.c11
-rw-r--r--sysdeps/stub/remove.c4
-rw-r--r--sysdeps/stub/rename.c15
-rw-r--r--sysdeps/stub/revoke.c4
-rw-r--r--sysdeps/stub/rewinddir.c8
-rw-r--r--sysdeps/stub/rmdir.c10
-rw-r--r--sysdeps/stub/sbrk.c12
-rw-r--r--sysdeps/stub/sched_getp.c2
-rw-r--r--sysdeps/stub/sched_gets.c2
-rw-r--r--sysdeps/stub/sched_primax.c2
-rw-r--r--sysdeps/stub/sched_primin.c2
-rw-r--r--sysdeps/stub/sched_rr_gi.c2
-rw-r--r--sysdeps/stub/sched_setp.c2
-rw-r--r--sysdeps/stub/sched_sets.c2
-rw-r--r--sysdeps/stub/sched_yield.c2
-rw-r--r--sysdeps/stub/seekdir.c11
-rw-r--r--sysdeps/stub/select.c14
-rw-r--r--sysdeps/stub/semctl.c4
-rw-r--r--sysdeps/stub/semget.c4
-rw-r--r--sysdeps/stub/semop.c4
-rw-r--r--sysdeps/stub/send.c12
-rw-r--r--sysdeps/stub/sendmsg.c11
-rw-r--r--sysdeps/stub/sendto.c13
-rw-r--r--sysdeps/stub/setdomain.c10
-rw-r--r--sysdeps/stub/setegid.c8
-rw-r--r--sysdeps/stub/setenv.c11
-rw-r--r--sysdeps/stub/seteuid.c8
-rw-r--r--sysdeps/stub/setgid.c8
-rw-r--r--sysdeps/stub/setgroups.c9
-rw-r--r--sysdeps/stub/sethostid.c8
-rw-r--r--sysdeps/stub/sethostname.c10
-rw-r--r--sysdeps/stub/setitimer.c14
-rw-r--r--sysdeps/stub/setjmp.c4
-rw-r--r--sysdeps/stub/setlogin.c8
-rw-r--r--sysdeps/stub/setpgid.c7
-rw-r--r--sysdeps/stub/setpriority.c11
-rw-r--r--sysdeps/stub/setregid.c10
-rw-r--r--sysdeps/stub/setreuid.c10
-rw-r--r--sysdeps/stub/setrlimit.c8
-rw-r--r--sysdeps/stub/setsid.c7
-rw-r--r--sysdeps/stub/setsockopt.c14
-rw-r--r--sysdeps/stub/settimeofday.c10
-rw-r--r--sysdeps/stub/setuid.c8
-rw-r--r--sysdeps/stub/shmat.c4
-rw-r--r--sysdeps/stub/shmctl.c4
-rw-r--r--sysdeps/stub/shmdt.c4
-rw-r--r--sysdeps/stub/shmget.c4
-rw-r--r--sysdeps/stub/shutdown.c10
-rw-r--r--sysdeps/stub/sigaction.c17
-rw-r--r--sysdeps/stub/sigaltstack.c10
-rw-r--r--sysdeps/stub/sigblock.c8
-rw-r--r--sysdeps/stub/sigintr.c10
-rw-r--r--sysdeps/stub/signal.c9
-rw-r--r--sysdeps/stub/sigpause.c8
-rw-r--r--sysdeps/stub/sigpending.c12
-rw-r--r--sysdeps/stub/sigprocmask.c13
-rw-r--r--sysdeps/stub/sigreturn.c8
-rw-r--r--sysdeps/stub/sigsetmask.c8
-rw-r--r--sysdeps/stub/sigstack.c10
-rw-r--r--sysdeps/stub/sigsuspend.c8
-rw-r--r--sysdeps/stub/sigvec.c11
-rw-r--r--sysdeps/stub/sleep.c8
-rw-r--r--sysdeps/stub/socket.c9
-rw-r--r--sysdeps/stub/socketpair.c10
-rw-r--r--sysdeps/stub/sstk.c12
-rw-r--r--sysdeps/stub/start.c3
-rw-r--r--sysdeps/stub/statfs.c3
-rw-r--r--sysdeps/stub/stime.c10
-rw-r--r--sysdeps/stub/stty.c12
-rw-r--r--sysdeps/stub/swapoff.c2
-rw-r--r--sysdeps/stub/swapon.c8
-rw-r--r--sysdeps/stub/symlink.c11
-rw-r--r--sysdeps/stub/sync.c7
-rw-r--r--sysdeps/stub/syscall.c8
-rw-r--r--sysdeps/stub/sysconf.c4
-rw-r--r--sysdeps/stub/sysd-stdio.c57
-rw-r--r--sysdeps/stub/system.c9
-rw-r--r--sysdeps/stub/tcdrain.c10
-rw-r--r--sysdeps/stub/tcflow.c13
-rw-r--r--sysdeps/stub/tcflush.c17
-rw-r--r--sysdeps/stub/tcgetattr.c20
-rw-r--r--sysdeps/stub/tcgetpgrp.c10
-rw-r--r--sysdeps/stub/tcsendbrk.c11
-rw-r--r--sysdeps/stub/tcsetattr.c24
-rw-r--r--sysdeps/stub/tcsetpgrp.c12
-rw-r--r--sysdeps/stub/telldir.c14
-rw-r--r--sysdeps/stub/tempname.c15
-rw-r--r--sysdeps/stub/time.c4
-rw-r--r--sysdeps/stub/times.c10
-rw-r--r--sysdeps/stub/truncate.c10
-rw-r--r--sysdeps/stub/ttyname.c8
-rw-r--r--sysdeps/stub/ttyname_r.c4
-rw-r--r--sysdeps/stub/ualarm.c10
-rw-r--r--sysdeps/stub/ulimit.c4
-rw-r--r--sysdeps/stub/umask.c8
-rw-r--r--sysdeps/stub/unlink.c14
-rw-r--r--sysdeps/stub/usleep.c8
-rw-r--r--sysdeps/stub/ustat.c2
-rw-r--r--sysdeps/stub/utime.c15
-rw-r--r--sysdeps/stub/utimes.c12
-rw-r--r--sysdeps/stub/vhangup.c7
-rw-r--r--sysdeps/stub/wait.c8
-rw-r--r--sysdeps/stub/wait3.c13
-rw-r--r--sysdeps/stub/wait4.c13
-rw-r--r--sysdeps/stub/waitpid.c15
-rw-r--r--sysdeps/stub/write.c15
-rw-r--r--sysdeps/stub/writev.c11
-rw-r--r--sysdeps/stub/xmknod.c4
-rw-r--r--sysdeps/stub/xstat.c4
-rw-r--r--sysdeps/unix/bsd/bsd4.4/errnos.h2
-rw-r--r--sysdeps/unix/bsd/bsd4.4/tcdrain.c6
-rw-r--r--sysdeps/unix/bsd/bsd4.4/wait.c8
-rw-r--r--sysdeps/unix/bsd/bsd4.4/waitpid.c9
-rw-r--r--sysdeps/unix/bsd/isatty.c8
-rw-r--r--sysdeps/unix/bsd/setegid.c2
-rw-r--r--sysdeps/unix/bsd/seteuid.c2
-rw-r--r--sysdeps/unix/bsd/setsid.c11
-rw-r--r--sysdeps/unix/bsd/sigaction.c13
-rw-r--r--sysdeps/unix/bsd/sigprocmask.c17
-rw-r--r--sysdeps/unix/bsd/sigsuspend.c14
-rw-r--r--sysdeps/unix/bsd/sun/m68k/sigtramp.c25
-rw-r--r--sysdeps/unix/bsd/sun/sparc/sigtramp.c29
-rw-r--r--sysdeps/unix/bsd/sun/sunos4/speed.c29
-rw-r--r--sysdeps/unix/bsd/sun/sunos4/tcsetattr.c11
-rw-r--r--sysdeps/unix/bsd/tcdrain.c10
-rw-r--r--sysdeps/unix/bsd/tcflow.c15
-rw-r--r--sysdeps/unix/bsd/tcflush.c9
-rw-r--r--sysdeps/unix/bsd/tcgetattr.c12
-rw-r--r--sysdeps/unix/bsd/tcsetattr.c41
-rw-r--r--sysdeps/unix/bsd/times.c25
-rw-r--r--sysdeps/unix/bsd/ulimit.c20
-rw-r--r--sysdeps/unix/bsd/ultrix4/mips/start.S3
-rw-r--r--sysdeps/unix/bsd/ultrix4/sysconf.c17
-rw-r--r--sysdeps/unix/closedir.c2
-rw-r--r--sysdeps/unix/common/lxstat.c2
-rw-r--r--sysdeps/unix/common/pause.c8
-rw-r--r--sysdeps/unix/common/tcsendbrk.c3
-rw-r--r--sysdeps/unix/fxstat.c2
-rw-r--r--sysdeps/unix/getdents.c12
-rw-r--r--sysdeps/unix/getlogin.c2
-rw-r--r--sysdeps/unix/getlogin_r.c2
-rw-r--r--sysdeps/unix/mkdir.c15
-rw-r--r--sysdeps/unix/mman/syscalls.list2
-rw-r--r--sysdeps/unix/nice.c10
-rw-r--r--sysdeps/unix/nlist.c43
-rw-r--r--sysdeps/unix/opendir.c8
-rw-r--r--sysdeps/unix/readdir.c2
-rw-r--r--sysdeps/unix/rmdir.c14
-rw-r--r--sysdeps/unix/sparc/start.c14
-rw-r--r--sysdeps/unix/start.c14
-rw-r--r--sysdeps/unix/stime.c8
-rw-r--r--sysdeps/unix/syscalls.list18
-rw-r--r--sysdeps/unix/sysv/irix4/getpriority.c10
-rw-r--r--sysdeps/unix/sysv/irix4/setpriority.c12
-rw-r--r--sysdeps/unix/sysv/irix4/start.c5
-rw-r--r--sysdeps/unix/sysv/linux/Makefile3
-rw-r--r--sysdeps/unix/sysv/linux/adjtime.c2
-rw-r--r--sysdeps/unix/sysv/linux/alpha/ioperm.c10
-rw-r--r--sysdeps/unix/sysv/linux/errnos.h6
-rw-r--r--sysdeps/unix/sysv/linux/gethostid.c2
-rw-r--r--sysdeps/unix/sysv/linux/gethostname.c6
-rw-r--r--sysdeps/unix/sysv/linux/getsysstats.c2
-rw-r--r--sysdeps/unix/sysv/linux/i386/brk.c3
-rw-r--r--sysdeps/unix/sysv/linux/i386/sigaction.c4
-rw-r--r--sysdeps/unix/sysv/linux/i386/sysdep.S3
-rw-r--r--sysdeps/unix/sysv/linux/i386/sysdep.h2
-rw-r--r--sysdeps/unix/sysv/linux/m68k/brk.c3
-rw-r--r--sysdeps/unix/sysv/linux/m68k/sysdep.S16
-rw-r--r--sysdeps/unix/sysv/linux/m68k/sysdep.h2
-rw-r--r--sysdeps/unix/sysv/linux/ptrace.c4
-rw-r--r--sysdeps/unix/sysv/linux/sigsuspend.c5
-rw-r--r--sysdeps/unix/sysv/linux/sleep.c36
-rw-r--r--sysdeps/unix/sysv/linux/speed.c4
-rw-r--r--sysdeps/unix/sysv/linux/sys/debugreg.h1
-rw-r--r--sysdeps/unix/sysv/linux/sys/kd.h1
-rw-r--r--sysdeps/unix/sysv/linux/sys/soundcard.h1
-rw-r--r--sysdeps/unix/sysv/linux/sys/vt.h1
-rw-r--r--sysdeps/unix/sysv/linux/syscalls.list3
-rw-r--r--sysdeps/unix/sysv/linux/tcdrain.c4
-rw-r--r--sysdeps/unix/sysv/linux/ulimit.c13
-rw-r--r--sysdeps/unix/sysv/linux/waitpid.c11
-rw-r--r--sysdeps/unix/sysv/setrlimit.c16
-rw-r--r--sysdeps/unix/sysv/settimeofday.c12
-rw-r--r--sysdeps/unix/sysv/sigaction.c15
-rw-r--r--sysdeps/unix/sysv/sysv4/sigaction.c11
-rw-r--r--sysdeps/unix/sysv/sysv4/sysconf.c8
-rw-r--r--sysdeps/unix/sysv/sysv4/waitpid.c9
-rw-r--r--sysdeps/unix/sysv/tcdrain.c6
-rw-r--r--sysdeps/unix/sysv/tcflow.c9
-rw-r--r--sysdeps/unix/sysv/tcflush.c9
-rw-r--r--sysdeps/unix/sysv/tcgetattr.c10
-rw-r--r--sysdeps/unix/sysv/tcsendbrk.c9
-rw-r--r--sysdeps/unix/sysv/tcsetattr.c19
-rw-r--r--sysdeps/unix/xmknod.c2
-rw-r--r--sysdeps/unix/xstat.c2
365 files changed, 1876 insertions, 1736 deletions
diff --git a/sysdeps/generic/ftime.c b/sysdeps/generic/ftime.c
index 600e959245..729c7b2adb 100644
--- a/sysdeps/generic/ftime.c
+++ b/sysdeps/generic/ftime.c
@@ -27,7 +27,7 @@ ftime (timebuf)
int save = errno;
struct tm tp;
- errno = 0;
+ __set_errno (0);
if (time (&timebuf->time) == (time_t) -1 && errno != 0)
return -1;
timebuf->millitm = 0;
@@ -38,6 +38,6 @@ ftime (timebuf)
timebuf->timezone = tp.tm_gmtoff / 60;
timebuf->dstflag = tp.tm_isdst;
- errno = save;
+ __set_errno (save);
return 0;
}
diff --git a/sysdeps/generic/pty.c b/sysdeps/generic/pty.c
index a539a9bb8b..dda2125836 100644
--- a/sysdeps/generic/pty.c
+++ b/sysdeps/generic/pty.c
@@ -82,10 +82,10 @@ openpty(amaster, aslave, name, termp, winp)
if (name)
strcpy(name, line);
if (termp)
- (void) tcsetattr(slave,
+ (void) tcsetattr(slave,
TCSAFLUSH, termp);
if (winp)
- (void) ioctl(slave, TIOCSWINSZ,
+ (void) ioctl(slave, TIOCSWINSZ,
(char *)winp);
return (0);
}
@@ -94,7 +94,7 @@ openpty(amaster, aslave, name, termp, winp)
}
}
}
- errno = ENOENT; /* out of ptys */
+ __set_errno (ENOENT); /* out of ptys */
return (-1);
}
@@ -114,7 +114,7 @@ forkpty(amaster, name, termp, winp)
case -1:
return (-1);
case 0:
- /*
+ /*
* child
*/
(void) close(master);
diff --git a/sysdeps/generic/setenv.c b/sysdeps/generic/setenv.c
index a84a8ebf64..44830e9aa7 100644
--- a/sysdeps/generic/setenv.c
+++ b/sysdeps/generic/setenv.c
@@ -88,7 +88,7 @@ setenv (name, value, replace)
if (new_environ[size] == NULL)
{
free ((char *) new_environ);
- errno = ENOMEM;
+ __set_errno (ENOMEM);
UNLOCK;
return -1;
}
diff --git a/sysdeps/generic/speed.c b/sysdeps/generic/speed.c
index 1f5a3eeacc..229c0665e2 100644
--- a/sysdeps/generic/speed.c
+++ b/sysdeps/generic/speed.c
@@ -1,5 +1,5 @@
/* `struct termios' speed frobnication functions. 4.4 BSD/generic GNU version.
-Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
+Copyright (C) 1991, 1992, 1993, 1996 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
@@ -43,7 +43,7 @@ DEFUN(cfsetospeed, (termios_p, speed),
{
if (termios_p == NULL)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
@@ -58,7 +58,7 @@ DEFUN(cfsetispeed, (termios_p, speed),
{
if (termios_p == NULL)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
diff --git a/sysdeps/generic/strtok.c b/sysdeps/generic/strtok.c
index 954471322b..cb30619a43 100644
--- a/sysdeps/generic/strtok.c
+++ b/sysdeps/generic/strtok.c
@@ -16,7 +16,6 @@ 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 <string.h>
@@ -39,15 +38,7 @@ strtok (s, delim)
char *token;
if (s == NULL)
- {
- if (olds == NULL)
- {
- errno = EINVAL;
- return NULL;
- }
- else
- s = olds;
- }
+ s = olds;
/* Scan leading delimiters. */
s += strspn (s, delim);
diff --git a/sysdeps/generic/strtok_r.c b/sysdeps/generic/strtok_r.c
index 08a29361c7..488d3eacfe 100644
--- a/sysdeps/generic/strtok_r.c
+++ b/sysdeps/generic/strtok_r.c
@@ -17,7 +17,6 @@ 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 <string.h>
@@ -40,15 +39,7 @@ strtok_r (s, delim, save_ptr)
char *token;
if (s == NULL)
- {
- if (*save_ptr == NULL)
- {
- errno = EINVAL;
- return NULL;
- }
- else
- s = *save_ptr;
- }
+ s = *save_ptr;
/* Scan leading delimiters. */
s += strspn (s, delim);
diff --git a/sysdeps/generic/sysd-stdio.c b/sysdeps/generic/sysd-stdio.c
index 7a3f7fc918..d28dde87f1 100644
--- a/sysdeps/generic/sysd-stdio.c
+++ b/sysdeps/generic/sysd-stdio.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 92, 93, 94, 95, 96 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
@@ -16,8 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
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 <stdio.h>
#include <stdlib.h>
@@ -29,16 +27,18 @@ Cambridge, MA 02139, USA. */
/* Read N bytes into BUF from COOKIE. */
int
-DEFUN(__stdio_read, (cookie, buf, n),
- PTR cookie AND register char *buf AND register size_t n)
+__stdio_read (cookie, buf, n)
+ void *cookie;
+ register char *buf;
+ register size_t n;
{
- CONST int fd = (int) cookie;
+ const int fd = (int) cookie;
#if defined (EINTR) && defined (EINTR_REPEAT)
int save = errno;
int nread;
try:;
- errno = 0;
+ __set_errno (0);
nread = __read (fd, buf, (int) n);
if (nread < 0)
{
@@ -46,7 +46,7 @@ DEFUN(__stdio_read, (cookie, buf, n),
goto try;
return -1;
}
- errno = save;
+ __set_errno (save);
return nread;
#else /* No EINTR. */
@@ -57,10 +57,12 @@ DEFUN(__stdio_read, (cookie, buf, n),
/* Write N bytes from BUF to COOKIE. */
int
-DEFUN(__stdio_write, (cookie, buf, n),
- PTR cookie AND register CONST char *buf AND register size_t n)
+__stdio_write (cookie, buf, n)
+ void *cookie;
+ register const char *buf;
+ register size_t n;
{
- CONST int fd = (int) cookie;
+ const int fd = (int) cookie;
register size_t written = 0;
while (n > 0)
@@ -89,8 +91,10 @@ DEFUN(__stdio_write, (cookie, buf, n),
The new file position is stored in *POS.
Returns zero if successful, nonzero if not. */
int
-DEFUN(__stdio_seek, (cookie, pos, whence),
- PTR cookie AND fpos_t *pos AND int whence)
+__stdio_seek (cookie, pos, whence)
+ void *cookie;
+ fpos_t *pos;
+ int whence;
{
off_t new;
new = __lseek ((int) cookie, (off_t) *pos, whence);
@@ -103,7 +107,8 @@ DEFUN(__stdio_seek, (cookie, pos, whence),
/* Close COOKIE. */
int
-DEFUN(__stdio_close, (cookie), PTR cookie)
+__stdio_close (cookie)
+ void *cookie;
{
return __close ((int) cookie);
}
@@ -112,7 +117,8 @@ DEFUN(__stdio_close, (cookie), PTR cookie)
or -1 for errors. If COOKIE does not relate to any POSIX.1 file
descriptor, this should return -1 with errno set to EOPNOTSUPP. */
int
-DEFUN(__stdio_fileno, (cookie), PTR cookie)
+__stdio_fileno (cookie)
+ void *cookie;
{
return (int) cookie;
}
@@ -120,8 +126,10 @@ DEFUN(__stdio_fileno, (cookie), PTR cookie)
/* Open the given file with the mode given in the __io_mode argument. */
int
-DEFUN(__stdio_open, (filename, m, cookieptr),
- CONST char *filename AND __io_mode m AND PTR *cookieptr)
+__stdio_open (filename, m, cookieptr)
+ const char *filename;
+ __io_mode m;
+ void **cookieptr;
{
int fd;
int mode;
@@ -155,11 +163,13 @@ DEFUN(__stdio_open, (filename, m, cookieptr),
/* Open FILENAME with the mode in M. Use the same magic cookie
already in *COOKIEPTR if possible, closing the old cookie with CLOSEFN. */
int
-DEFUN(__stdio_reopen, (filename, m, cookieptr),
- CONST char *filename AND __io_mode m AND
- PTR *cookieptr AND __io_close_fn closefn)
+__stdio_reopen (filename, m, cookieptr)
+ const char *filename;
+ __io_mode m;
+ void **cookieptr;
+ __io_close_fn closefn;
{
- PTR newcookie;
+ void *newcookie;
/* We leave the old descriptor open while we open the file.
That way ``freopen ("/dev/stdin", "r", stdin)'' works. */
diff --git a/sysdeps/generic/uname.c b/sysdeps/generic/uname.c
index b3ecf70ad7..c0bc13e02a 100644
--- a/sysdeps/generic/uname.c
+++ b/sysdeps/generic/uname.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <string.h>
#include <sys/utsname.h>
@@ -27,13 +26,14 @@ Cambridge, MA 02139, USA. */
/* Put information about the system in NAME. */
int
-DEFUN(uname, (name), struct utsname *name)
+uname (name)
+ struct utsname *name;
{
int save;
if (name == NULL)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
@@ -49,7 +49,7 @@ DEFUN(uname, (name), struct utsname *name)
#ifdef ENAMETOOLONG
else if (errno == ENAMETOOLONG)
/* The name was truncated. */
- errno = save;
+ __set_errno (save);
#endif
else
return -1;
diff --git a/sysdeps/generic/vlimit.c b/sysdeps/generic/vlimit.c
index 56f1199ab3..235a5abfc2 100644
--- a/sysdeps/generic/vlimit.c
+++ b/sysdeps/generic/vlimit.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1996 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
@@ -20,7 +20,6 @@ Cambridge, MA 02139, USA. */
or stub versions of getrlimit. Separate versions could be written
for efficiency, but it's probably not worth it. */
-#include <ansidecl.h>
#include <sys/vlimit.h>
#include <sys/resource.h>
#include <errno.h>
@@ -28,8 +27,9 @@ Cambridge, MA 02139, USA. */
/* Set the soft limit for RESOURCE to be VALUE.
Returns 0 for success, -1 for failure. */
int
-DEFUN(vlimit, (resource, value),
- enum __vlimit_resource resource AND int value)
+vlimit (resource, value)
+ enum __vlimit_resource resource;
+ int value;
{
if (resource >= LIM_CPU && resource <= LIM_MAXRSS)
{
@@ -39,13 +39,13 @@ DEFUN(vlimit, (resource, value),
(enum __rlimit_resource) ((int) resource - 1);
struct rlimit lims;
- if (getrlimit(rlimit_res, &lims) < 0)
+ if (getrlimit (rlimit_res, &lims) < 0)
return -1;
lims.rlim_cur = value;
return setrlimit(rlimit_res, &lims);
}
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
diff --git a/sysdeps/generic/waitstatus.h b/sysdeps/generic/waitstatus.h
index fdb40db7ef..8bdebd88e7 100644
--- a/sysdeps/generic/waitstatus.h
+++ b/sysdeps/generic/waitstatus.h
@@ -1,5 +1,5 @@
/* Definitions of status bits for `wait' et al.
-Copyright (C) 1992, 1994 Free Software Foundation, Inc.
+Copyright (C) 1992, 1994, 1996 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
@@ -61,6 +61,7 @@ Cambridge, MA 02139, USA. */
union wait
{
+ int w_status;
struct
{
#if __BYTE_ORDER == __LITTLE_ENDIAN
diff --git a/sysdeps/i386/fpu/__math.h b/sysdeps/i386/fpu/__math.h
index de34370d21..d6b0bc6988 100644
--- a/sysdeps/i386/fpu/__math.h
+++ b/sysdeps/i386/fpu/__math.h
@@ -118,10 +118,10 @@ __MATH_INLINE double
tan (double __x)
{
register double __value;
+ register double __value2 __attribute__ ((unused));
__asm __volatile__
- ("fptan\n\t"
- "fincstp"
- : "=t" (__value) : "0" (__x));
+ ("fptan"
+ : "=t" (__value2), "=u" (__value) : "0" (__x));
return __value;
}
diff --git a/sysdeps/libm-ieee754/k_standard.c b/sysdeps/libm-ieee754/k_standard.c
index 644108e7a0..35026faa9d 100644
--- a/sysdeps/libm-ieee754/k_standard.c
+++ b/sysdeps/libm-ieee754/k_standard.c
@@ -111,12 +111,12 @@ static double zero = 0.0; /* used as const */
? "acosf" : "acosl");;
exc.retval = zero;
if (_LIB_VERSION == _POSIX_)
- errno = EDOM;
+ __set_errno (EDOM);
else if (!__matherr(&exc)) {
if(_LIB_VERSION == _SVID_) {
(void) WRITE2("acos: DOMAIN error\n", 19);
}
- errno = EDOM;
+ __set_errno (EDOM);
}
break;
case 2:
@@ -128,12 +128,12 @@ static double zero = 0.0; /* used as const */
? "asinf" : "asinl");
exc.retval = zero;
if(_LIB_VERSION == _POSIX_)
- errno = EDOM;
+ __set_errno (EDOM);
else if (!__matherr(&exc)) {
if(_LIB_VERSION == _SVID_) {
(void) WRITE2("asin: DOMAIN error\n", 19);
}
- errno = EDOM;
+ __set_errno (EDOM);
}
break;
case 3:
@@ -147,12 +147,12 @@ static double zero = 0.0; /* used as const */
? "atan2f" : "atan2l");
exc.retval = zero;
if(_LIB_VERSION == _POSIX_)
- errno = EDOM;
+ __set_errno (EDOM);
else if (!__matherr(&exc)) {
if(_LIB_VERSION == _SVID_) {
(void) WRITE2("atan2: DOMAIN error\n", 20);
}
- errno = EDOM;
+ __set_errno (EDOM);
}
break;
case 4:
@@ -167,9 +167,9 @@ static double zero = 0.0; /* used as const */
else
exc.retval = HUGE_VAL;
if (_LIB_VERSION == _POSIX_)
- errno = ERANGE;
+ __set_errno (ERANGE);
else if (!__matherr(&exc)) {
- errno = ERANGE;
+ __set_errno (ERANGE);
}
break;
case 5:
@@ -184,9 +184,9 @@ static double zero = 0.0; /* used as const */
else
exc.retval = HUGE_VAL;
if (_LIB_VERSION == _POSIX_)
- errno = ERANGE;
+ __set_errno (ERANGE);
else if (!__matherr(&exc)) {
- errno = ERANGE;
+ __set_errno (ERANGE);
}
break;
case 6:
@@ -201,9 +201,9 @@ static double zero = 0.0; /* used as const */
else
exc.retval = HUGE_VAL;
if (_LIB_VERSION == _POSIX_)
- errno = ERANGE;
+ __set_errno (ERANGE);
else if (!__matherr(&exc)) {
- errno = ERANGE;
+ __set_errno (ERANGE);
}
break;
case 7:
@@ -215,9 +215,9 @@ static double zero = 0.0; /* used as const */
? "expf" : "expl");
exc.retval = zero;
if (_LIB_VERSION == _POSIX_)
- errno = ERANGE;
+ __set_errno (ERANGE);
else if (!__matherr(&exc)) {
- errno = ERANGE;
+ __set_errno (ERANGE);
}
break;
case 8:
@@ -231,12 +231,12 @@ static double zero = 0.0; /* used as const */
else
exc.retval = -HUGE_VAL;
if (_LIB_VERSION == _POSIX_)
- errno = EDOM;
+ __set_errno (EDOM);
else if (!__matherr(&exc)) {
if (_LIB_VERSION == _SVID_) {
(void) WRITE2("y0: DOMAIN error\n", 17);
}
- errno = EDOM;
+ __set_errno (EDOM);
}
break;
case 9:
@@ -250,12 +250,12 @@ static double zero = 0.0; /* used as const */
else
exc.retval = -HUGE_VAL;
if (_LIB_VERSION == _POSIX_)
- errno = EDOM;
+ __set_errno (EDOM);
else if (!__matherr(&exc)) {
if (_LIB_VERSION == _SVID_) {
(void) WRITE2("y0: DOMAIN error\n", 17);
}
- errno = EDOM;
+ __set_errno (EDOM);
}
break;
case 10:
@@ -269,12 +269,12 @@ static double zero = 0.0; /* used as const */
else
exc.retval = -HUGE_VAL;
if (_LIB_VERSION == _POSIX_)
- errno = EDOM;
+ __set_errno (EDOM);
else if (!__matherr(&exc)) {
if (_LIB_VERSION == _SVID_) {
(void) WRITE2("y1: DOMAIN error\n", 17);
}
- errno = EDOM;
+ __set_errno (EDOM);
}
break;
case 11:
@@ -288,12 +288,12 @@ static double zero = 0.0; /* used as const */
else
exc.retval = -HUGE_VAL;
if (_LIB_VERSION == _POSIX_)
- errno = EDOM;
+ __set_errno (EDOM);
else if (!__matherr(&exc)) {
if (_LIB_VERSION == _SVID_) {
(void) WRITE2("y1: DOMAIN error\n", 17);
}
- errno = EDOM;
+ __set_errno (EDOM);
}
break;
case 12:
@@ -307,12 +307,12 @@ static double zero = 0.0; /* used as const */
else
exc.retval = -HUGE_VAL;
if (_LIB_VERSION == _POSIX_)
- errno = EDOM;
+ __set_errno (EDOM);
else if (!__matherr(&exc)) {
if (_LIB_VERSION == _SVID_) {
(void) WRITE2("yn: DOMAIN error\n", 17);
}
- errno = EDOM;
+ __set_errno (EDOM);
}
break;
case 13:
@@ -326,12 +326,12 @@ static double zero = 0.0; /* used as const */
else
exc.retval = -HUGE_VAL;
if (_LIB_VERSION == _POSIX_)
- errno = EDOM;
+ __set_errno (EDOM);
else if (!__matherr(&exc)) {
if (_LIB_VERSION == _SVID_) {
(void) WRITE2("yn: DOMAIN error\n", 17);
}
- errno = EDOM;
+ __set_errno (EDOM);
}
break;
case 14:
@@ -346,9 +346,9 @@ static double zero = 0.0; /* used as const */
else
exc.retval = HUGE_VAL;
if (_LIB_VERSION == _POSIX_)
- errno = ERANGE;
+ __set_errno (ERANGE);
else if (!__matherr(&exc)) {
- errno = ERANGE;
+ __set_errno (ERANGE);
}
break;
case 15:
@@ -363,12 +363,12 @@ static double zero = 0.0; /* used as const */
else
exc.retval = HUGE_VAL;
if (_LIB_VERSION == _POSIX_)
- errno = EDOM;
+ __set_errno (EDOM);
else if (!__matherr(&exc)) {
if (_LIB_VERSION == _SVID_) {
(void) WRITE2("lgamma: SING error\n", 19);
}
- errno = EDOM;
+ __set_errno (EDOM);
}
break;
case 16:
@@ -382,12 +382,12 @@ static double zero = 0.0; /* used as const */
else
exc.retval = -HUGE_VAL;
if (_LIB_VERSION == _POSIX_)
- errno = ERANGE;
+ __set_errno (ERANGE);
else if (!__matherr(&exc)) {
if (_LIB_VERSION == _SVID_) {
(void) WRITE2("log: SING error\n", 16);
}
- errno = EDOM;
+ __set_errno (EDOM);
}
break;
case 17:
@@ -401,12 +401,12 @@ static double zero = 0.0; /* used as const */
else
exc.retval = -HUGE_VAL;
if (_LIB_VERSION == _POSIX_)
- errno = EDOM;
+ __set_errno (EDOM);
else if (!__matherr(&exc)) {
if (_LIB_VERSION == _SVID_) {
(void) WRITE2("log: DOMAIN error\n", 18);
}
- errno = EDOM;
+ __set_errno (EDOM);
}
break;
case 18:
@@ -421,12 +421,12 @@ static double zero = 0.0; /* used as const */
else
exc.retval = -HUGE_VAL;
if (_LIB_VERSION == _POSIX_)
- errno = ERANGE;
+ __set_errno (ERANGE);
else if (!__matherr(&exc)) {
if (_LIB_VERSION == _SVID_) {
(void) WRITE2("log10: SING error\n", 18);
}
- errno = EDOM;
+ __set_errno (EDOM);
}
break;
case 19:
@@ -441,12 +441,12 @@ static double zero = 0.0; /* used as const */
else
exc.retval = -HUGE_VAL;
if (_LIB_VERSION == _POSIX_)
- errno = EDOM;
+ __set_errno (EDOM);
else if (!__matherr(&exc)) {
if (_LIB_VERSION == _SVID_) {
(void) WRITE2("log10: DOMAIN error\n", 20);
}
- errno = EDOM;
+ __set_errno (EDOM);
}
break;
case 20:
@@ -460,7 +460,7 @@ static double zero = 0.0; /* used as const */
if (_LIB_VERSION != _SVID_) exc.retval = 1.0;
else if (!__matherr(&exc)) {
(void) WRITE2("pow(0,0): DOMAIN error\n", 23);
- errno = EDOM;
+ __set_errno (EDOM);
}
break;
case 21:
@@ -479,9 +479,9 @@ static double zero = 0.0; /* used as const */
if(x<zero&&__rint(y)!=y) exc.retval = -HUGE_VAL;
}
if (_LIB_VERSION == _POSIX_)
- errno = ERANGE;
+ __set_errno (ERANGE);
else if (!__matherr(&exc)) {
- errno = ERANGE;
+ __set_errno (ERANGE);
}
break;
case 22:
@@ -492,9 +492,9 @@ static double zero = 0.0; /* used as const */
exc.name = type < 100 ? "pow" : (type < 200 ? "powf" : "powl");
exc.retval = zero;
if (_LIB_VERSION == _POSIX_)
- errno = ERANGE;
+ __set_errno (ERANGE);
else if (!__matherr(&exc)) {
- errno = ERANGE;
+ __set_errno (ERANGE);
}
break;
case 23:
@@ -508,12 +508,12 @@ static double zero = 0.0; /* used as const */
else
exc.retval = -HUGE_VAL;
if (_LIB_VERSION == _POSIX_)
- errno = EDOM;
+ __set_errno (EDOM);
else if (!__matherr(&exc)) {
if (_LIB_VERSION == _SVID_) {
(void) WRITE2("pow(0,neg): DOMAIN error\n", 25);
}
- errno = EDOM;
+ __set_errno (EDOM);
}
break;
case 24:
@@ -527,12 +527,12 @@ static double zero = 0.0; /* used as const */
else
exc.retval = zero/zero; /* X/Open allow NaN */
if (_LIB_VERSION == _POSIX_)
- errno = EDOM;
+ __set_errno (EDOM);
else if (!__matherr(&exc)) {
if (_LIB_VERSION == _SVID_) {
(void) WRITE2("neg**non-integral: DOMAIN error\n", 32);
}
- errno = EDOM;
+ __set_errno (EDOM);
}
break;
case 25:
@@ -547,9 +547,9 @@ static double zero = 0.0; /* used as const */
else
exc.retval = ( (x>zero) ? HUGE_VAL : -HUGE_VAL);
if (_LIB_VERSION == _POSIX_)
- errno = ERANGE;
+ __set_errno (ERANGE);
else if (!__matherr(&exc)) {
- errno = ERANGE;
+ __set_errno (ERANGE);
}
break;
case 26:
@@ -564,12 +564,12 @@ static double zero = 0.0; /* used as const */
else
exc.retval = zero/zero;
if (_LIB_VERSION == _POSIX_)
- errno = EDOM;
+ __set_errno (EDOM);
else if (!__matherr(&exc)) {
if (_LIB_VERSION == _SVID_) {
(void) WRITE2("sqrt: DOMAIN error\n", 19);
}
- errno = EDOM;
+ __set_errno (EDOM);
}
break;
case 27:
@@ -584,12 +584,12 @@ static double zero = 0.0; /* used as const */
else
exc.retval = zero/zero;
if (_LIB_VERSION == _POSIX_)
- errno = EDOM;
+ __set_errno (EDOM);
else if (!__matherr(&exc)) {
if (_LIB_VERSION == _SVID_) {
(void) WRITE2("fmod: DOMAIN error\n", 20);
}
- errno = EDOM;
+ __set_errno (EDOM);
}
break;
case 28:
@@ -602,12 +602,12 @@ static double zero = 0.0; /* used as const */
: "remainderl");
exc.retval = zero/zero;
if (_LIB_VERSION == _POSIX_)
- errno = EDOM;
+ __set_errno (EDOM);
else if (!__matherr(&exc)) {
if (_LIB_VERSION == _SVID_) {
(void) WRITE2("remainder: DOMAIN error\n", 24);
}
- errno = EDOM;
+ __set_errno (EDOM);
}
break;
case 29:
@@ -619,12 +619,12 @@ static double zero = 0.0; /* used as const */
? "acoshf" : "acoshl");
exc.retval = zero/zero;
if (_LIB_VERSION == _POSIX_)
- errno = EDOM;
+ __set_errno (EDOM);
else if (!__matherr(&exc)) {
if (_LIB_VERSION == _SVID_) {
(void) WRITE2("acosh: DOMAIN error\n", 20);
}
- errno = EDOM;
+ __set_errno (EDOM);
}
break;
case 30:
@@ -636,12 +636,12 @@ static double zero = 0.0; /* used as const */
? "atanhf" : "atanhl");
exc.retval = zero/zero;
if (_LIB_VERSION == _POSIX_)
- errno = EDOM;
+ __set_errno (EDOM);
else if (!__matherr(&exc)) {
if (_LIB_VERSION == _SVID_) {
(void) WRITE2("atanh: DOMAIN error\n", 20);
}
- errno = EDOM;
+ __set_errno (EDOM);
}
break;
case 31:
@@ -653,12 +653,12 @@ static double zero = 0.0; /* used as const */
? "atanhf" : "atanhl");
exc.retval = x/zero; /* sign(x)*inf */
if (_LIB_VERSION == _POSIX_)
- errno = EDOM;
+ __set_errno (EDOM);
else if (!__matherr(&exc)) {
if (_LIB_VERSION == _SVID_) {
(void) WRITE2("atanh: SING error\n", 18);
}
- errno = EDOM;
+ __set_errno (EDOM);
}
break;
case 32:
@@ -670,9 +670,9 @@ static double zero = 0.0; /* used as const */
? "scalbf" : "scalbl");
exc.retval = x > zero ? HUGE_VAL : -HUGE_VAL;
if (_LIB_VERSION == _POSIX_)
- errno = ERANGE;
+ __set_errno (ERANGE);
else if (!__matherr(&exc)) {
- errno = ERANGE;
+ __set_errno (ERANGE);
}
break;
case 33:
@@ -684,9 +684,9 @@ static double zero = 0.0; /* used as const */
? "scalbf" : "scalbl");
exc.retval = __copysign(zero,x);
if (_LIB_VERSION == _POSIX_)
- errno = ERANGE;
+ __set_errno (ERANGE);
else if (!__matherr(&exc)) {
- errno = ERANGE;
+ __set_errno (ERANGE);
}
break;
case 34:
@@ -697,13 +697,13 @@ static double zero = 0.0; /* used as const */
exc.name = type < 100 ? "j0" : (type < 200 ? "j0f" : "j0l");
exc.retval = zero;
if (_LIB_VERSION == _POSIX_)
- errno = ERANGE;
+ __set_errno (ERANGE);
else if (!__matherr(&exc)) {
if (_LIB_VERSION == _SVID_) {
(void) WRITE2(exc.name, 2);
(void) WRITE2(": TLOSS error\n", 14);
}
- errno = ERANGE;
+ __set_errno (ERANGE);
}
break;
case 35:
@@ -714,13 +714,13 @@ static double zero = 0.0; /* used as const */
exc.name = type < 100 ? "y0" : (type < 200 ? "y0f" : "y0l");
exc.retval = zero;
if (_LIB_VERSION == _POSIX_)
- errno = ERANGE;
+ __set_errno (ERANGE);
else if (!__matherr(&exc)) {
if (_LIB_VERSION == _SVID_) {
(void) WRITE2(exc.name, 2);
(void) WRITE2(": TLOSS error\n", 14);
}
- errno = ERANGE;
+ __set_errno (ERANGE);
}
break;
case 36:
@@ -731,13 +731,13 @@ static double zero = 0.0; /* used as const */
exc.name = type < 100 ? "j1" : (type < 200 ? "j1f" : "j1l");
exc.retval = zero;
if (_LIB_VERSION == _POSIX_)
- errno = ERANGE;
+ __set_errno (ERANGE);
else if (!__matherr(&exc)) {
if (_LIB_VERSION == _SVID_) {
(void) WRITE2(exc.name, 2);
(void) WRITE2(": TLOSS error\n", 14);
}
- errno = ERANGE;
+ __set_errno (ERANGE);
}
break;
case 37:
@@ -748,13 +748,13 @@ static double zero = 0.0; /* used as const */
exc.name = type < 100 ? "y1" : (type < 200 ? "y1f" : "y1l");
exc.retval = zero;
if (_LIB_VERSION == _POSIX_)
- errno = ERANGE;
+ __set_errno (ERANGE);
else if (!__matherr(&exc)) {
if (_LIB_VERSION == _SVID_) {
(void) WRITE2(exc.name, 2);
(void) WRITE2(": TLOSS error\n", 14);
}
- errno = ERANGE;
+ __set_errno (ERANGE);
}
break;
case 38:
@@ -765,13 +765,13 @@ static double zero = 0.0; /* used as const */
exc.name = type < 100 ? "jn" : (type < 200 ? "jnf" : "jnl");
exc.retval = zero;
if (_LIB_VERSION == _POSIX_)
- errno = ERANGE;
+ __set_errno (ERANGE);
else if (!__matherr(&exc)) {
if (_LIB_VERSION == _SVID_) {
(void) WRITE2(exc.name, 2);
(void) WRITE2(": TLOSS error\n", 14);
}
- errno = ERANGE;
+ __set_errno (ERANGE);
}
break;
case 39:
@@ -782,13 +782,13 @@ static double zero = 0.0; /* used as const */
exc.name = type < 100 ? "yn" : (type < 200 ? "ynf" : "ynl");
exc.retval = zero;
if (_LIB_VERSION == _POSIX_)
- errno = ERANGE;
+ __set_errno (ERANGE);
else if (!__matherr(&exc)) {
if (_LIB_VERSION == _SVID_) {
(void) WRITE2(exc.name, 2);
(void) WRITE2(": TLOSS error\n", 14);
}
- errno = ERANGE;
+ __set_errno (ERANGE);
}
break;
case 40:
@@ -803,9 +803,9 @@ static double zero = 0.0; /* used as const */
else
exc.retval = HUGE_VAL;
if (_LIB_VERSION == _POSIX_)
- errno = ERANGE;
+ __set_errno (ERANGE);
else if (!__matherr(&exc)) {
- errno = ERANGE;
+ __set_errno (ERANGE);
}
break;
case 41:
@@ -820,12 +820,12 @@ static double zero = 0.0; /* used as const */
else
exc.retval = HUGE_VAL;
if (_LIB_VERSION == _POSIX_)
- errno = EDOM;
+ __set_errno (EDOM);
else if (!__matherr(&exc)) {
if (_LIB_VERSION == _SVID_) {
(void) WRITE2("gamma: SING error\n", 18);
}
- errno = EDOM;
+ __set_errno (EDOM);
}
break;
case 42:
@@ -839,7 +839,7 @@ static double zero = 0.0; /* used as const */
if (_LIB_VERSION == _IEEE_ ||
_LIB_VERSION == _POSIX_) exc.retval = 1.0;
else if (!__matherr(&exc)) {
- errno = EDOM;
+ __set_errno (EDOM);
}
break;
}
diff --git a/sysdeps/libm-ieee754/s_ldexp.c b/sysdeps/libm-ieee754/s_ldexp.c
index 754fef6e99..94a93fc063 100644
--- a/sysdeps/libm-ieee754/s_ldexp.c
+++ b/sysdeps/libm-ieee754/s_ldexp.c
@@ -5,7 +5,7 @@
*
* Developed at SunPro, a Sun Microsystems, Inc. business.
* Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
+ * software is freely granted, provided that this notice
* is preserved.
* ====================================================
*/
@@ -27,7 +27,7 @@ static char rcsid[] = "$NetBSD: s_ldexp.c,v 1.6 1995/05/10 20:47:40 jtc Exp $";
{
if(!__finite(value)||value==0.0) return value;
value = __scalbn(value,exp);
- if(!__finite(value)||value==0.0) errno = ERANGE;
+ if(!__finite(value)||value==0.0) __set_errno (ERANGE);
return value;
}
weak_alias (__ldexp, ldexp)
diff --git a/sysdeps/libm-ieee754/s_ldexpf.c b/sysdeps/libm-ieee754/s_ldexpf.c
index d047677d72..1ecbe8346b 100644
--- a/sysdeps/libm-ieee754/s_ldexpf.c
+++ b/sysdeps/libm-ieee754/s_ldexpf.c
@@ -8,7 +8,7 @@
*
* Developed at SunPro, a Sun Microsystems, Inc. business.
* Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
+ * software is freely granted, provided that this notice
* is preserved.
* ====================================================
*/
@@ -30,7 +30,7 @@ static char rcsid[] = "$NetBSD: s_ldexpf.c,v 1.3 1995/05/10 20:47:42 jtc Exp $";
{
if(!__finitef(value)||value==(float)0.0) return value;
value = __scalbnf(value,exp);
- if(!__finitef(value)||value==(float)0.0) errno = ERANGE;
+ if(!__finitef(value)||value==(float)0.0) __set_errno (ERANGE);
return value;
}
weak_alias (__ldexpf, ldexpf)
diff --git a/sysdeps/libm-ieee754/s_ldexpl.c b/sysdeps/libm-ieee754/s_ldexpl.c
index bf64c89898..123a6b3b58 100644
--- a/sysdeps/libm-ieee754/s_ldexpl.c
+++ b/sysdeps/libm-ieee754/s_ldexpl.c
@@ -31,7 +31,7 @@ static char rcsid[] = "$NetBSD: $";
{
if(!__finitel(value)||value==0.0) return value;
value = __scalbnl(value,exp);
- if(!__finitel(value)||value==0.0) errno = ERANGE;
+ if(!__finitel(value)||value==0.0) __set_errno (ERANGE);
return value;
}
weak_alias (__ldexpl, ldexpl)
diff --git a/sysdeps/libm-ieee754/w_scalb.c b/sysdeps/libm-ieee754/w_scalb.c
index f718bc215c..53d41144d6 100644
--- a/sysdeps/libm-ieee754/w_scalb.c
+++ b/sysdeps/libm-ieee754/w_scalb.c
@@ -5,7 +5,7 @@
*
* Developed at SunPro, a Sun Microsystems, Inc. business.
* Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
+ * software is freely granted, provided that this notice
* is preserved.
* ====================================================
*/
@@ -16,7 +16,7 @@ static char rcsid[] = "$NetBSD: w_scalb.c,v 1.6 1995/05/10 20:49:48 jtc Exp $";
/*
* wrapper scalb(double x, double fn) is provide for
- * passing various standard test suite. One
+ * passing various standard test suite. One
* should use scalbn() instead.
*/
@@ -51,11 +51,11 @@ static char rcsid[] = "$NetBSD: w_scalb.c,v 1.6 1995/05/10 20:49:48 jtc Exp $";
}
if(z==0.0&&z!=x) {
return __kernel_standard(x,(double)fn,33); /* scalb underflow */
- }
+ }
#ifndef _SCALB_INT
- if(!__finite(fn)) errno = ERANGE;
+ if(!__finite(fn)) __set_errno (ERANGE);
#endif
return z;
-#endif
+#endif
}
weak_alias (__scalb, scalb)
diff --git a/sysdeps/libm-ieee754/w_scalbf.c b/sysdeps/libm-ieee754/w_scalbf.c
index 3af7ed3932..488a717503 100644
--- a/sysdeps/libm-ieee754/w_scalbf.c
+++ b/sysdeps/libm-ieee754/w_scalbf.c
@@ -8,7 +8,7 @@
*
* Developed at SunPro, a Sun Microsystems, Inc. business.
* Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
+ * software is freely granted, provided that this notice
* is preserved.
* ====================================================
*/
@@ -19,7 +19,7 @@ static char rcsid[] = "$NetBSD: w_scalbf.c,v 1.3 1995/05/10 20:49:50 jtc Exp $";
/*
* wrapper scalbf(float x, float fn) is provide for
- * passing various standard test suite. One
+ * passing various standard test suite. One
* should use scalbn() instead.
*/
@@ -56,11 +56,11 @@ static char rcsid[] = "$NetBSD: w_scalbf.c,v 1.3 1995/05/10 20:49:50 jtc Exp $";
if(z==(float)0.0&&z!=x) {
/* scalbf underflow */
return (float)__kernel_standard((double)x,(double)fn,133);
- }
+ }
#ifndef _SCALB_INT
- if(!__finitef(fn)) errno = ERANGE;
+ if(!__finitef(fn)) __set_errno (ERANGE);
#endif
return z;
-#endif
+#endif
}
weak_alias (__scalbf, scalbf)
diff --git a/sysdeps/libm-ieee754/w_scalbl.c b/sysdeps/libm-ieee754/w_scalbl.c
index ff5117d24c..3ca8d9601d 100644
--- a/sysdeps/libm-ieee754/w_scalbl.c
+++ b/sysdeps/libm-ieee754/w_scalbl.c
@@ -57,7 +57,7 @@ static char rcsid[] = "$NetBSD: $";
return __kernel_standard(x,(double)fn,233); /* scalb underflow */
}
#ifndef _SCALB_INT
- if(!__finitel(fn)) errno = ERANGE;
+ if(!__finitel(fn)) __set_errno (ERANGE);
#endif
return z;
#endif
diff --git a/sysdeps/m68k/fpu/s_scalbn.c b/sysdeps/m68k/fpu/s_scalbn.c
index 4039bba652..6d2b74a3d0 100644
--- a/sysdeps/m68k/fpu/s_scalbn.c
+++ b/sysdeps/m68k/fpu/s_scalbn.c
@@ -22,7 +22,6 @@ Cambridge, MA 02139, USA. */
#ifndef FUNC
#define FUNC scalbn
-#include <s_ldexp.c>
#endif
#ifndef float_type
#define float_type double
diff --git a/sysdeps/m68k/fpu/s_scalbnf.c b/sysdeps/m68k/fpu/s_scalbnf.c
index 55d64fd502..33459718e9 100644
--- a/sysdeps/m68k/fpu/s_scalbnf.c
+++ b/sysdeps/m68k/fpu/s_scalbnf.c
@@ -1,6 +1,5 @@
#ifndef FUNC
#define FUNC scalbnf
-#include <s_ldexpf.c>
#endif
#define float_type float
#include <s_scalbn.c>
diff --git a/sysdeps/m68k/fpu/s_scalbnl.c b/sysdeps/m68k/fpu/s_scalbnl.c
index 84849921dc..c6ad95079c 100644
--- a/sysdeps/m68k/fpu/s_scalbnl.c
+++ b/sysdeps/m68k/fpu/s_scalbnl.c
@@ -1,6 +1,5 @@
#ifndef FUNC
#define FUNC scalbnl
-#include <s_ldexpl.c>
#endif
#define float_type long double
#include <s_scalbn.c>
diff --git a/sysdeps/mach/hurd/errnos.awk b/sysdeps/mach/hurd/errnos.awk
index 100e4b1114..915cb11e7b 100644
--- a/sysdeps/mach/hurd/errnos.awk
+++ b/sysdeps/mach/hurd/errnos.awk
@@ -149,6 +149,7 @@ END \
print "/* errno is a per-thread variable. */";
print "#include <hurd/threadvar.h>";
print "#define errno (*__hurd_errno_location ())";
+ print "#define __set_errno(val) errno = (val)";
print "";
print "#endif /* <errno.h> included. */";
print "";
diff --git a/sysdeps/mach/libc-lock.h b/sysdeps/mach/libc-lock.h
index 1c9b16cf90..4954cc2952 100644
--- a/sysdeps/mach/libc-lock.h
+++ b/sysdeps/mach/libc-lock.h
@@ -31,9 +31,9 @@ typedef struct __libc_lock_opaque__ __libc_lock_t;
initialized with __libc_lock_init before it can be used (or define it
with __libc_lock_define_initialized, below). Use `extern' for CLASS to
declare a lock defined in another module. In public structure
- definitions, the lock element must come last, because its storage size
- will not be known outside of libc. (Or you can use a pointer to the
- lock structure; i.e. NAME begins with a `*'.) */
+ definitions you must use a pointer to the lock structure (i.e., NAME
+ begins with a `*'), because its storage size will not be known outside
+ of libc. */
#define __libc_lock_define(CLASS,NAME) \
CLASS __libc_lock_t NAME;
diff --git a/sysdeps/posix/dup2.c b/sysdeps/posix/dup2.c
index c0c6b2a0f6..8730172d46 100644
--- a/sysdeps/posix/dup2.c
+++ b/sysdeps/posix/dup2.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1993, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 92, 93, 95, 96 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <fcntl.h>
#include <limits.h>
@@ -26,7 +25,9 @@ Cambridge, MA 02139, USA. */
/* Duplicate FD to FD2, closing the old FD2 and making FD2 be
open the same file as FD is. Return FD2 or -1. */
int
-DEFUN(__dup2, (fd, fd2), int fd AND int fd2)
+__dup2 (fd, fd2)
+ int fd;
+ int fd2;
{
int save;
@@ -36,7 +37,7 @@ DEFUN(__dup2, (fd, fd2), int fd AND int fd2)
#endif
)
{
- errno = EBADF;
+ __set_errno (EBADF);
return -1;
}
@@ -51,7 +52,7 @@ DEFUN(__dup2, (fd, fd2), int fd AND int fd2)
save = errno;
(void) close (fd2);
- errno = save;
+ __set_errno (save);
return fcntl (fd, F_DUPFD, fd2);
}
diff --git a/sysdeps/posix/euidaccess.c b/sysdeps/posix/euidaccess.c
index e50bdfbb8c..26f3af6374 100644
--- a/sysdeps/posix/euidaccess.c
+++ b/sysdeps/posix/euidaccess.c
@@ -1,5 +1,5 @@
/* euidaccess -- check if effective user id can access file
- Copyright (C) 1990, 1991, 1995 Free Software Foundation, Inc.
+ Copyright (C) 1990, 1991, 1995, 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -66,6 +66,9 @@ gid_t getegid ();
#ifndef errno
extern int errno;
#endif
+#ifndef __set_errno
+#define __set_errno(val) errno = 8val)
+#endif
#if defined(EACCES) && !defined(EACCESS)
#define EACCESS EACCES
@@ -176,7 +179,7 @@ euidaccess (path, mode)
granted = (stats.st_mode & mode);
if (granted == mode)
return 0;
- errno = EACCESS;
+ __set_errno (EACCESS);
return -1;
}
diff --git a/sysdeps/posix/fdopen.c b/sysdeps/posix/fdopen.c
index ad746ec371..fb2bda8824 100644
--- a/sysdeps/posix/fdopen.c
+++ b/sysdeps/posix/fdopen.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1993, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <stdio.h>
#include <fcntl.h>
@@ -26,7 +25,9 @@ extern int EXFUN(__getmode, (CONST char *mode, __io_mode *mptr));
/* Open a new stream on a given system file descriptor. */
FILE *
-DEFUN(fdopen, (fd, mode), int fd AND CONST char *mode)
+fdopen (fd, mode)
+ int fd;
+ const char *mode;
{
register FILE *stream;
__io_mode m;
@@ -48,14 +49,14 @@ DEFUN(fdopen, (fd, mode), int fd AND CONST char *mode)
case O_RDONLY:
if (!m.__read)
{
- errno = EBADF;
+ __set_errno (EBADF);
return NULL;
}
break;
case O_WRONLY:
if (!m.__write)
{
- errno = EBADF;
+ __set_errno (EBADF);
return NULL;
}
break;
@@ -65,7 +66,7 @@ DEFUN(fdopen, (fd, mode), int fd AND CONST char *mode)
if (stream == NULL)
return NULL;
- stream->__cookie = (PTR) fd;
+ stream->__cookie = (void *) fd;
stream->__mode = m;
return stream;
diff --git a/sysdeps/posix/flock.c b/sysdeps/posix/flock.c
index b4c9fc3b79..15d348ae80 100644
--- a/sysdeps/posix/flock.c
+++ b/sysdeps/posix/flock.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995, 1996 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
@@ -20,7 +20,6 @@ Cambridge, MA 02139, USA. */
locking mechanism. In 4BSD, these are two incompatible locking mechanisms,
perhaps with different semantics? */
-#include <ansidecl.h>
#include <errno.h>
#include <unistd.h>
#include <fcntl.h>
@@ -29,7 +28,9 @@ Cambridge, MA 02139, USA. */
/* Apply or remove an advisory lock, according to OPERATION,
on the file FD refers to. */
int
-DEFUN(__flock, (fd, operation), int fd AND int operation)
+__flock (fd, operation)
+ int fd;
+ int operation;
{
struct flock lbuf;
@@ -45,7 +46,7 @@ DEFUN(__flock, (fd, operation), int fd AND int operation)
lbuf.l_type = F_UNLCK;
break;
default:
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
diff --git a/sysdeps/posix/fpathconf.c b/sysdeps/posix/fpathconf.c
index 9b54b5f04a..1e7cba47ed 100644
--- a/sysdeps/posix/fpathconf.c
+++ b/sysdeps/posix/fpathconf.c
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
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>
@@ -26,25 +25,27 @@ Cambridge, MA 02139, USA. */
/* Get file-specific information about descriptor FD. */
long int
-DEFUN(__fpathconf, (fd, name), int fd AND int name)
+__fpathconf (fd, name)
+ int fd;
+ int name;
{
if (fd < 0)
{
- errno = EBADF;
+ __set_errno (EBADF);
return -1;
}
switch (name)
{
default:
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
case _PC_LINK_MAX:
#ifdef LINK_MAX
return LINK_MAX;
#else
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
#endif
@@ -52,7 +53,7 @@ DEFUN(__fpathconf, (fd, name), int fd AND int name)
#ifdef MAX_CANON
return MAX_CANON;
#else
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
#endif
@@ -60,7 +61,7 @@ DEFUN(__fpathconf, (fd, name), int fd AND int name)
#ifdef MAX_INPUT
return MAX_INPUT;
#else
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
#endif
@@ -68,7 +69,7 @@ DEFUN(__fpathconf, (fd, name), int fd AND int name)
#ifdef NAME_MAX
return NAME_MAX;
#else
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
#endif
@@ -83,7 +84,7 @@ DEFUN(__fpathconf, (fd, name), int fd AND int name)
return buf.f_namelen;
}
#else
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
#endif
@@ -91,7 +92,7 @@ DEFUN(__fpathconf, (fd, name), int fd AND int name)
#ifdef PIPE_BUF
return PIPE_BUF;
#else
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
#endif
@@ -141,12 +142,12 @@ DEFUN(__fpathconf, (fd, name), int fd AND int name)
#ifdef SOCK_MAXBUF
return SOCK_MAXBUF;
#else
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
#endif
}
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/posix/getcwd.c b/sysdeps/posix/getcwd.c
index 2d8011e276..a9536b95cf 100644
--- a/sysdeps/posix/getcwd.c
+++ b/sysdeps/posix/getcwd.c
@@ -45,6 +45,9 @@ Cambridge, MA 02139, USA. */
#if !defined(__GNU_LIBRARY__) && !defined(STDC_HEADERS)
extern int errno;
#endif
+#ifndef __set_errno
+#define __set_errno(val) errno = (val)
+#endif
#ifndef NULL
#define NULL 0
@@ -211,7 +214,7 @@ __getcwd (buf, size)
{
if (buf != NULL)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return NULL;
}
@@ -305,7 +308,7 @@ __getcwd (buf, size)
{
int save = errno;
(void) __closedir (dirstream);
- errno = save;
+ __set_errno (save);
goto lose;
}
if (st.st_dev == thisdev && st.st_ino == thisino)
@@ -316,7 +319,7 @@ __getcwd (buf, size)
{
int save = errno;
(void) __closedir (dirstream);
- errno = save;
+ __set_errno (save);
goto lose;
}
else
@@ -327,7 +330,7 @@ __getcwd (buf, size)
{
if (buf != NULL)
{
- errno = ERANGE;
+ __set_errno (ERANGE);
return NULL;
}
else
@@ -338,7 +341,7 @@ __getcwd (buf, size)
{
(void) __closedir (dirstream);
free (path);
- errno = ENOMEM; /* closedir might have changed it. */
+ __set_errno (ENOMEM);/* closedir might have changed it.*/
return NULL;
}
pathp = &buf[pathp - path];
diff --git a/sysdeps/posix/gettimeofday.c b/sysdeps/posix/gettimeofday.c
index 3c079a5af2..9d4e07866d 100644
--- a/sysdeps/posix/gettimeofday.c
+++ b/sysdeps/posix/gettimeofday.c
@@ -37,7 +37,7 @@ __gettimeofday (tv, tz)
{
if (tv == NULL)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
diff --git a/sysdeps/posix/isatty.c b/sysdeps/posix/isatty.c
index 7536b1eeed..2dcae18f5b 100644
--- a/sysdeps/posix/isatty.c
+++ b/sysdeps/posix/isatty.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,22 +16,22 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <unistd.h>
#include <termios.h>
/* Return 1 if FD is a terminal, 0 if not. */
int
-DEFUN(__isatty, (fd), int fd)
+__isatty (fd)
+ int fd;
{
int save;
int is_tty;
struct termios term;
save = errno;
- is_tty = __tcgetattr(fd, &term) == 0;
- errno = save;
+ is_tty = __tcgetattr (fd, &term) == 0;
+ __set_errno (save);
return is_tty;
}
diff --git a/sysdeps/posix/isfdtype.c b/sysdeps/posix/isfdtype.c
index 9ac38a8b9f..8edcf594d8 100644
--- a/sysdeps/posix/isfdtype.c
+++ b/sysdeps/posix/isfdtype.c
@@ -30,7 +30,7 @@ isfdtype (int fildes, int fdtype)
{
int save_error = errno;
result = fstat (fildes, &st);
- errno = save_error;
+ __set_errno (save_error);
}
return result ?: (st.st_mode & S_IFMT) == fdtype;
diff --git a/sysdeps/posix/killpg.c b/sysdeps/posix/killpg.c
index 0c70dd2164..5197673cde 100644
--- a/sysdeps/posix/killpg.c
+++ b/sysdeps/posix/killpg.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1993 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1993, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <signal.h>
@@ -25,11 +24,13 @@ Cambridge, MA 02139, USA. */
If PGRP is zero, send SIG to all processes in
the current process's process group. */
int
-DEFUN(killpg, (pgrp, sig), __pid_t pgrp AND int sig)
+killpg (pgrp, sig)
+ __pid_t pgrp;
+ int sig;
{
if (pgrp < 0)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
diff --git a/sysdeps/posix/mkstemp.c b/sysdeps/posix/mkstemp.c
index 9f4f68d72d..920136d416 100644
--- a/sysdeps/posix/mkstemp.c
+++ b/sysdeps/posix/mkstemp.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <string.h>
#include <errno.h>
#include <stdio.h>
@@ -28,9 +27,10 @@ Cambridge, MA 02139, USA. */
they are replaced with a string that makes the filename unique.
Returns a file descriptor open on the file for reading and writing. */
int
-DEFUN(mkstemp, (template), char *template)
+mkstemp (template)
+ char *template;
{
- static CONST char letters[]
+ static const char letters[]
= "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
size_t len;
size_t i;
@@ -38,7 +38,7 @@ DEFUN(mkstemp, (template), char *template)
len = strlen (template);
if (len < 6 || strcmp (&template[len - 6], "XXXXXX"))
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
diff --git a/sysdeps/posix/mktemp.c b/sysdeps/posix/mktemp.c
index c3aae36a7b..111206f663 100644
--- a/sysdeps/posix/mktemp.c
+++ b/sysdeps/posix/mktemp.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1993, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <string.h>
#include <errno.h>
#include <unistd.h>
@@ -28,9 +27,10 @@ Cambridge, MA 02139, USA. */
The last six characters of TEMPLATE must be "XXXXXX";
they are replaced with a string that makes the filename unique. */
char *
-DEFUN(mktemp, (template), char *template)
+mktemp (template)
+ char *template;
{
- static CONST char letters[]
+ static const char letters[]
= "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
size_t len;
size_t i;
@@ -38,7 +38,7 @@ DEFUN(mktemp, (template), char *template)
len = strlen (template);
if (len < 6 || strcmp (&template[len - 6], "XXXXXX"))
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return NULL;
}
diff --git a/sysdeps/posix/pathconf.c b/sysdeps/posix/pathconf.c
index 05cee5e5e0..9539957777 100644
--- a/sysdeps/posix/pathconf.c
+++ b/sysdeps/posix/pathconf.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -28,10 +28,10 @@ __pathconf (const char *path, int name)
int fd = open (path, 0);
if (fd >= 0)
{
- long int value = __fpathconf (0, name);
+ long int value = __fpathconf (fd, name);
int save = errno;
(void) close (fd);
- errno = save;
+ __set_errno (save);
return value;
}
return -1L;
diff --git a/sysdeps/posix/pipestream.c b/sysdeps/posix/pipestream.c
index 53595f5b54..539bf43302 100644
--- a/sysdeps/posix/pipestream.c
+++ b/sysdeps/posix/pipestream.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1993, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
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 <signal.h>
@@ -43,7 +42,7 @@ struct child
original function with the original cookie. */
#define FUNC(type, name, args) \
- static type DEFUN(__CONCAT(child_,name), args, __CONCAT(name,decl)) \
+ static type __CONCAT(child_,name) args __CONCAT(name,decl)) \
{ \
struct child *c = (struct child *) cookie; \
{ \
@@ -52,15 +51,15 @@ struct child
} \
}
-#define readdecl PTR cookie AND register char *buf AND register size_t n
+#define readdecl void *cookie AND register char *buf AND register size_t n
FUNC (int, read, (cookie, buf, n))
-#define writedecl PTR cookie AND register CONST char *buf AND register size_t n
+#define writedecl void *cookie AND register const char *buf AND register size_t n
FUNC (int, write, (cookie, buf, n))
-#define seekdecl PTR cookie AND fpos_t *pos AND int whence
+#define seekdecl void *cookie AND fpos_t *pos AND int whence
FUNC (int, seek, (cookie, pos, whence))
-#define closedecl PTR cookie
+#define closedecl void *cookie
FUNC (int, close, (cookie))
-#define filenodecl PTR cookie
+#define filenodecl void *cookie
FUNC (int, fileno, (cookie))
static const __io_functions child_funcs
@@ -69,7 +68,9 @@ static const __io_functions child_funcs
/* Open a new stream that is a one-way pipe to a
child process running the given shell command. */
FILE *
-DEFUN(popen, (command, mode), CONST char *command AND CONST char *mode)
+popen (command, mode)
+ const char *command;
+ const char *mode;
{
pid_t pid;
int pipedes[2];
@@ -78,12 +79,12 @@ DEFUN(popen, (command, mode), CONST char *command AND CONST char *mode)
if (command == NULL || mode == NULL || (*mode != 'r' && *mode != 'w'))
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return NULL;
}
/* Create the pipe. */
- if (pipe(pipedes) < 0)
+ if (pipe (pipedes) < 0)
return NULL;
/* Fork off the child. */
@@ -100,24 +101,24 @@ DEFUN(popen, (command, mode), CONST char *command AND CONST char *mode)
/* We are the child side. Make the write side of
the pipe be stdin or the read side be stdout. */
- CONST char *new_argv[4];
+ const char *new_argv[4];
if ((*mode == 'w' ? dup2(pipedes[STDIN_FILENO], STDIN_FILENO) :
- dup2(pipedes[STDOUT_FILENO], STDOUT_FILENO)) < 0)
- _exit(127);
+ dup2 (pipedes[STDOUT_FILENO], STDOUT_FILENO)) < 0)
+ _exit (127);
/* Close the pipe descriptors. */
- (void) close(pipedes[STDIN_FILENO]);
- (void) close(pipedes[STDOUT_FILENO]);
+ (void) close (pipedes[STDIN_FILENO]);
+ (void) close (pipedes[STDOUT_FILENO]);
/* Exec the shell. */
new_argv[0] = SH_NAME;
new_argv[1] = "-c";
new_argv[2] = command;
new_argv[3] = NULL;
- (void) execve(SH_PATH, (char *CONST *) new_argv, environ);
+ (void) execve (SH_PATH, (char *CONST *) new_argv, environ);
/* Die if it failed. */
- _exit(127);
+ _exit (127);
}
/* We are the parent side. */
@@ -180,7 +181,7 @@ DEFUN(popen, (command, mode), CONST char *command AND CONST char *mode)
while (dead > 0 && dead != pid);
}
#endif
- errno = save;
+ __set_errno (save);
return NULL;
}
}
@@ -188,15 +189,16 @@ DEFUN(popen, (command, mode), CONST char *command AND CONST char *mode)
/* Close a stream opened by popen and return its status.
Returns -1 if the stream was not opened by popen. */
int
-DEFUN(pclose, (stream), register FILE *stream)
+pclose (stream)
+ register FILE *stream;
{
struct child *c;
pid_t pid, dead;
int status;
- if (!__validfp(stream) || !stream->__ispipe)
+ if (!__validfp (stream) || !stream->__ispipe)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
@@ -204,7 +206,7 @@ DEFUN(pclose, (stream), register FILE *stream)
pid = c->pid;
stream->__cookie = c->cookie;
stream->__io_funcs = c->funcs;
- free ((PTR) c);
+ free ((void *) c);
stream->__ispipe = 0;
if (fclose (stream))
return -1;
diff --git a/sysdeps/posix/remove.c b/sysdeps/posix/remove.c
index 66414c9039..9999021087 100644
--- a/sysdeps/posix/remove.c
+++ b/sysdeps/posix/remove.c
@@ -1,5 +1,5 @@
/* ANSI C `remove' function to delete a file or directory. POSIX.1 version.
-Copyright (C) 1995 Free Software Foundation, Inc.
+Copyright (C) 1995, 1996 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
@@ -32,7 +32,7 @@ remove (file)
return 0;
else if (errno == ENOTDIR && __unlink (file) == 0)
{
- errno = save;
+ __set_errno (save);
return 0;
}
diff --git a/sysdeps/posix/rename.c b/sysdeps/posix/rename.c
index 3245f9cf9c..c318081bac 100644
--- a/sysdeps/posix/rename.c
+++ b/sysdeps/posix/rename.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1996 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
@@ -16,34 +16,35 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <stdio.h>
#include <unistd.h>
#include <errno.h>
/* Rename the file OLD to NEW. */
int
-DEFUN(rename, (old, new), CONST char *old AND CONST char *new)
+rename (old, new)
+ const char *old;
+ const char *new;
{
int save = errno;
- if (__link(old, new) < 0)
+ if (__link (old, new) < 0)
{
if (errno == EEXIST)
{
errno = save;
/* Race condition, required for 1003.1 conformance. */
- if (__unlink(new) < 0 ||
- __link(old, new) < 0)
+ if (__unlink (new) < 0 ||
+ __link (old, new) < 0)
return -1;
}
else
return -1;
}
- if (__unlink(old) < 0)
+ if (__unlink (old) < 0)
{
save = errno;
- if (__unlink(new) == 0)
- errno = save;
+ if (__unlink (new) == 0)
+ __set_errno (save);
return -1;
}
return 0;
diff --git a/sysdeps/posix/sigintr.c b/sysdeps/posix/sigintr.c
index 441c643df8..37914e997d 100644
--- a/sysdeps/posix/sigintr.c
+++ b/sysdeps/posix/sigintr.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1994, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <stddef.h>
#include <signal.h>
#include <errno.h>
@@ -25,8 +24,9 @@ Cambridge, MA 02139, USA. */
(causing them to fail with EINTR); if INTERRUPT is zero, make system
calls be restarted after signal SIG. */
int
-DEFUN(siginterrupt, (sig, interrupt),
- int sig AND int interrupt)
+siginterrupt (sig, interrupt)
+ int sig;
+ int interrupt;
{
#ifdef SA_RESTART
extern sigset_t _sigintr; /* Defined in signal.c. */
@@ -51,7 +51,7 @@ DEFUN(siginterrupt, (sig, interrupt),
return 0;
#else
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
#endif
}
diff --git a/sysdeps/posix/signal.c b/sysdeps/posix/signal.c
index f9ae47b6bb..9a8d2de0e4 100644
--- a/sysdeps/posix/signal.c
+++ b/sysdeps/posix/signal.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <signal.h>
@@ -26,13 +25,15 @@ sigset_t _sigintr; /* Set by siginterrupt. */
/* Set the handler for the signal SIG to HANDLER,
returning the old handler, or SIG_ERR on error. */
__sighandler_t
-DEFUN(signal, (sig, handler), int sig AND __sighandler_t handler)
+signal (sig, handler)
+ int sig;
+ __sighandler_t handler;
{
struct sigaction act, oact;
if (handler == SIG_ERR)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return SIG_ERR;
}
diff --git a/sysdeps/posix/sigsuspend.c b/sysdeps/posix/sigsuspend.c
index 771315333a..49a55f38b4 100644
--- a/sysdeps/posix/sigsuspend.c
+++ b/sysdeps/posix/sigsuspend.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <signal.h>
#include <stddef.h>
@@ -26,26 +25,27 @@ Cambridge, MA 02139, USA. */
/* Change the set of blocked signals to SET,
wait until a signal arrives, and restore the set of blocked signals. */
int
-DEFUN(sigsuspend, (set), CONST sigset_t *set)
+sigsuspend (set)
+ const sigset_t *set;
{
sigset_t oset;
int save;
if (set == NULL)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
- if (sigprocmask(SIG_SETMASK, set, &oset) < 0)
+ if (sigprocmask (SIG_SETMASK, set, &oset) < 0)
return -1;
(void) pause();
save = errno;
- if (sigprocmask(SIG_SETMASK, &oset, (sigset_t *) NULL) < 0)
+ if (sigprocmask (SIG_SETMASK, &oset, (sigset_t *) NULL) < 0)
return -1;
- errno = save;
+ __set_errno (save);
return -1;
}
diff --git a/sysdeps/posix/sigvec.c b/sysdeps/posix/sigvec.c
index 4aef22ae32..6a224e1733 100644
--- a/sysdeps/posix/sigvec.c
+++ b/sysdeps/posix/sigvec.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1994, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 92, 94, 95, 96 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <signal.h>
#include <errno.h>
#include <stddef.h>
@@ -28,7 +27,8 @@ static __sighandler_t wrapped_handlers[NSIG];
static sigset_t wrapped_masks[NSIG];
static void
-DEFUN(wrapper_handler, (sig), int sig)
+wrapper_handler (sig)
+ int sig;
{
int save;
struct sigaction act;
@@ -37,33 +37,31 @@ DEFUN(wrapper_handler, (sig), int sig)
act.sa_mask = wrapped_masks[sig];
act.sa_flags = 0;
save = errno;
- (void) __sigaction(sig, &act, (struct sigaction *) NULL);
- errno = save;
+ (void) __sigaction (sig, &act, (struct sigaction *) NULL);
+ __set_errno (save);
- (*wrapped_handlers[sig])(sig);
+ (*wrapped_handlers[sig]) (sig);
}
-static
-#ifdef __GNUC__
-inline
-#endif
-int
-DEFUN(convert_mask, (set, mask), sigset_t *set AND CONST int mask)
+static inline int
+convert_mask (set, mask)
+ sigset_t *set;
+ const int mask;
{
register int sig;
- if (sizeof(*set) == sizeof(mask))
+ if (sizeof (*set) == sizeof (mask))
{
*(int *) set = mask;
return 0;
}
- if (__sigemptyset(set) < 0)
+ if (__sigemptyset (set) < 0)
return -1;
for (sig = 1; sig < NSIG; ++sig)
- if (mask & sigmask(sig))
- if (__sigaddset(set, sig) < 0)
+ if (mask & sigmask (sig))
+ if (__sigaddset (set, sig) < 0)
return -1;
return 0;
@@ -75,8 +73,10 @@ DEFUN(convert_mask, (set, mask), sigset_t *set AND CONST int mask)
reset to SIG_DFL before `sv_handler' is entered. If OVEC is non-NULL,
it is filled in with the old information for SIG. */
int
-DEFUN(__sigvec, (sig, vec, ovec),
- int sig AND CONST struct sigvec *vec AND struct sigvec *ovec)
+__sigvec (sig, vec, ovec)
+ int sig;
+ const struct sigvec *vec;
+ struct sigvec *ovec;
{
struct sigaction old;
@@ -93,13 +93,13 @@ DEFUN(__sigvec, (sig, vec, ovec),
if (convert_mask (&n->sa_mask, vec->sv_mask) < 0)
return -1;
n->sa_flags = 0;
-
+
if (vec->sv_flags & SV_ONSTACK)
{
#ifdef SA_ONSTACK
n->sa_flags |= SA_ONSTACK;
#else
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
#endif
}
diff --git a/sysdeps/posix/sleep.c b/sysdeps/posix/sleep.c
index 20f78a08bb..fd63a4bf69 100644
--- a/sysdeps/posix/sleep.c
+++ b/sysdeps/posix/sleep.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1993, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <signal.h>
#include <time.h>
#include <unistd.h>
@@ -26,7 +25,8 @@ Cambridge, MA 02139, USA. */
/* SIGALRM signal handler for `sleep'. This does nothing but return,
but SIG_IGN isn't supposed to break `pause'. */
static void
-DEFUN(sleep_handler, (sig), int sig)
+sleep_handler (sig)
+ int sig;
{
return;
}
@@ -39,7 +39,8 @@ DEFUN(sleep_handler, (sig), int sig)
signal afterwards is undefined. There is no return value to indicate
error, but if `sleep' returns SECONDS, it probably didn't work. */
unsigned int
-DEFUN(sleep, (seconds), unsigned int seconds)
+sleep (seconds)
+ unsigned int seconds;
{
unsigned int remaining, slept;
time_t before, after;
@@ -100,7 +101,7 @@ DEFUN(sleep, (seconds), unsigned int seconds)
/* Restore the `errno' value we started with.
Some of the calls we made might have failed, but we didn't care. */
- errno = save;
+ __set_errno (save);
return slept > seconds ? 0 : seconds - slept;
}
diff --git a/sysdeps/posix/sysconf.c b/sysdeps/posix/sysconf.c
index 14ee58cafb..9660724a39 100644
--- a/sysdeps/posix/sysconf.c
+++ b/sysdeps/posix/sysconf.c
@@ -37,7 +37,7 @@ __sysconf (name)
switch (name)
{
default:
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
case _SC_ARG_MAX:
diff --git a/sysdeps/posix/system.c b/sysdeps/posix/system.c
index da58be51ae..b1a685c29a 100644
--- a/sysdeps/posix/system.c
+++ b/sysdeps/posix/system.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1994, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 92, 94, 95, 96 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <stddef.h>
#include <stdlib.h>
#include <unistd.h>
@@ -35,7 +34,7 @@ Cambridge, MA 02139, USA. */
/* Execute LINE as a shell command, returning its status. */
int
-DEFUN(system, (line), register CONST char *line)
+__libc_system (const char *line)
{
int status, save;
pid_t pid;
@@ -57,7 +56,7 @@ DEFUN(system, (line), register CONST char *line)
{
save = errno;
(void) __sigaction (SIGINT, &intr, (struct sigaction *) NULL);
- errno = save;
+ __set_errno (save);
return -1;
}
@@ -74,13 +73,13 @@ DEFUN(system, (line), register CONST char *line)
if (__sigprocmask (SIG_BLOCK, &block, &omask) < 0)
{
if (errno == ENOSYS)
- errno = save;
+ __set_errno (save);
else
{
save = errno;
(void) __sigaction (SIGINT, &intr, (struct sigaction *) NULL);
(void) __sigaction (SIGQUIT, &quit, (struct sigaction *) NULL);
- errno = save;
+ __set_errno (save);
return -1;
}
}
@@ -93,7 +92,7 @@ DEFUN(system, (line), register CONST char *line)
if (pid == (pid_t) 0)
{
/* Child side. */
- CONST char *new_argv[4];
+ const char *new_argv[4];
new_argv[0] = SHELL_NAME;
new_argv[1] = "-c";
new_argv[2] = line;
@@ -105,7 +104,7 @@ DEFUN(system, (line), register CONST char *line)
(void) UNBLOCK;
/* Exec the shell. */
- (void) __execve (SHELL_PATH, (char *CONST *) new_argv, __environ);
+ (void) __execve (SHELL_PATH, (char *const *) new_argv, __environ);
_exit (127);
}
else if (pid < (pid_t) 0)
@@ -137,10 +136,11 @@ DEFUN(system, (line), register CONST char *line)
UNBLOCK) != 0)
{
if (errno == ENOSYS)
- errno = save;
+ __set_errno (save);
else
return -1;
}
return status;
}
+weak_alias (__libc_system, system)
diff --git a/sysdeps/posix/tempname.c b/sysdeps/posix/tempname.c
index 0f088ec915..6fd698e2b8 100644
--- a/sysdeps/posix/tempname.c
+++ b/sysdeps/posix/tempname.c
@@ -56,7 +56,7 @@ exists (const char *file)
trouble, while reporting that it doesn't exist when it does would
violate the interface of __stdio_gen_tempname. */
int exists = errno != ENOENT;
- errno = save;
+ __set_errno (save);
return exists;
}
}
@@ -106,7 +106,7 @@ __stdio_gen_tempname (const char *dir, const char *pfx, int dir_search,
d = "/tmp";
if (d == NULL)
{
- errno = ENOENT;
+ __set_errno (ENOENT);
return NULL;
}
dir = d;
@@ -186,7 +186,7 @@ __stdio_gen_tempname (const char *dir, const char *pfx, int dir_search,
lose:
(void) remove (buf);
(void) __close (fd);
- errno = save;
+ __set_errno (save);
return NULL;
}
_IO_init (&fp->file, 0);
@@ -214,7 +214,7 @@ __stdio_gen_tempname (const char *dir, const char *pfx, int dir_search,
const int save = errno;
(void) remove (buf);
(void) __close (fd);
- errno = save;
+ __set_errno (save);
return NULL;
}
(*streamptr)->__cookie = (__ptr_t) (long int) fd;
@@ -232,7 +232,7 @@ __stdio_gen_tempname (const char *dir, const char *pfx, int dir_search,
/* If the file already existed we have continued the loop above,
so we only get here when we have a winning name to return. */
- errno = saverrno;
+ __set_errno (saverrno);
if (lenptr != NULL)
*lenptr = len + 1;
@@ -240,6 +240,6 @@ __stdio_gen_tempname (const char *dir, const char *pfx, int dir_search,
}
/* We got out of the loop because we ran out of combinations to try. */
- errno = EEXIST; /* ? */
+ __set_errno (EEXIST); /* ? */
return NULL;
}
diff --git a/sysdeps/posix/truncate.c b/sysdeps/posix/truncate.c
index 4f4c07e1df..2ab5d66ee9 100644
--- a/sysdeps/posix/truncate.c
+++ b/sysdeps/posix/truncate.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <sys/types.h>
#include <errno.h>
#include <unistd.h>
@@ -24,8 +23,9 @@ Cambridge, MA 02139, USA. */
/* Truncate PATH to LENGTH bytes. */
int
-DEFUN(truncate, (path, length),
- CONST char *path AND off_t length)
+truncate (path, length)
+ const char *path;
+ off_t length;
{
int fd, ret, save;
@@ -37,6 +37,6 @@ DEFUN(truncate, (path, length),
save = errno;
(void) close (fd);
if (ret < 0)
- errno = save;
+ __set_errno (save);
return ret;
}
diff --git a/sysdeps/posix/ttyname.c b/sysdeps/posix/ttyname.c
index 7c7ed2428a..be82827d00 100644
--- a/sysdeps/posix/ttyname.c
+++ b/sysdeps/posix/ttyname.c
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <limits.h>
#include <stddef.h>
@@ -32,9 +31,10 @@ char *__ttyname = NULL;
/* Return the pathname of the terminal FD is open on, or NULL on errors.
The returned storage is good only until the next call to this function. */
char *
-DEFUN(ttyname, (fd), int fd)
+ttyname (fd)
+ int fd;
{
- static CONST char dev[] = "/dev";
+ static const char dev[] = "/dev";
static char *name;
static size_t namelen = 0;
struct stat st;
@@ -75,12 +75,12 @@ DEFUN(ttyname, (fd), int fd)
{
(void) closedir (dirstream);
__ttyname = name;
- errno = save;
+ __set_errno (save);
return name;
}
}
(void) closedir (dirstream);
- errno = save;
+ __set_errno (save);
return NULL;
}
diff --git a/sysdeps/posix/ttyname_r.c b/sysdeps/posix/ttyname_r.c
index e6172f1c97..1fb4b047d4 100644
--- a/sysdeps/posix/ttyname_r.c
+++ b/sysdeps/posix/ttyname_r.c
@@ -50,7 +50,7 @@ __ttyname_r (fd, buf, buflen)
the loop. */
if (buflen < (int) (sizeof (dev) + 1))
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
@@ -83,13 +83,13 @@ __ttyname_r (fd, buf, buflen)
if (stat (buf, &st) == 0 && st.st_dev == mydev)
{
(void) closedir (dirstream);
- errno = save;
+ __set_errno (save);
return 0;
}
}
(void) closedir (dirstream);
- errno = save;
+ __set_errno (save);
return -1;
}
weak_alias (__ttyname_r, ttyname_r)
diff --git a/sysdeps/posix/wait.c b/sysdeps/posix/wait.c
index 38891c7e01..813c595e1d 100644
--- a/sysdeps/posix/wait.c
+++ b/sysdeps/posix/wait.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,16 +16,16 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <sys/wait.h>
/* Wait for a child to die. When one does, put its status in *STAT_LOC
and return its process ID. For errors, return (pid_t) -1. */
__pid_t
-DEFUN(__wait, (stat_loc), __WAIT_STATUS_DEFN stat_loc)
+__libc_wait (__WAIT_STATUS_DEFN stat_loc)
{
- return __waitpid(WAIT_ANY, (int *) stat_loc, 0);
+ return __waitpid (WAIT_ANY, (int *) stat_loc, 0);
}
-weak_alias (__wait, wait)
+weak_alias (__libc_wait, __wait)
+weak_alias (__libc_wait, wait)
diff --git a/sysdeps/posix/wait3.c b/sysdeps/posix/wait3.c
index 5eb084a7c9..f805f10b7d 100644
--- a/sysdeps/posix/wait3.c
+++ b/sysdeps/posix/wait3.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1993, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1993, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <sys/wait.h>
#include <sys/types.h>
@@ -28,12 +27,14 @@ Cambridge, MA 02139, USA. */
there. If the WUNTRACED bit is set in OPTIONS, return status for stopped
children; otherwise don't. */
pid_t
-DEFUN(__wait3, (stat_loc, options, usage),
- __WAIT_STATUS_DEFN stat_loc AND int options AND struct rusage *usage)
+__wait3 (stat_loc, options, usage)
+ __WAIT_STATUS_DEFN stat_loc;
+ int options;
+ struct rusage *usage;
{
if (usage != NULL)
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return (pid_t) -1;
}
return __waitpid (WAIT_ANY, stat_loc, options);
diff --git a/sysdeps/standalone/close.c b/sysdeps/standalone/close.c
index 59b607305f..7ef1a5f878 100644
--- a/sysdeps/standalone/close.c
+++ b/sysdeps/standalone/close.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
Ported to standalone by Joel Sherrill jsherril@redstone-emh2.army.mil,
On-Line Applications Research Corporation.
@@ -19,7 +19,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <unistd.h>
@@ -28,11 +27,12 @@ Cambridge, MA 02139, USA. */
/* Close the file descriptor FD. */
int
-DEFUN(__close, (fd), int fd)
+__close (fd)
+ int fd;
{
if ( !__FD_Is_valid( fd ) || !__FD_Table[ fd ].in_use )
{
- errno = EBADF;
+ __set_errno (EBADF);
return -1;
}
diff --git a/sysdeps/standalone/m68k/m68020/start.S b/sysdeps/standalone/m68k/m68020/start.S
index cbabf5bf07..9d7d779e04 100644
--- a/sysdeps/standalone/m68k/m68020/start.S
+++ b/sysdeps/standalone/m68k/m68020/start.S
@@ -1,19 +1,19 @@
-/* Copyright (C) 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1996 Free Software Foundation, Inc.
Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil),
On-Line Applications Research Corporation.
-
+
This file is part of the GNU C Library.
-
+
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., 675 Mass Ave,
@@ -43,7 +43,7 @@ _M68Kvec: | standard location for vectors
.space 4088 | to avoid initial intr stack
| from 135BUG on MVME13? as entry
| and start code at 0x4000
-around:
+around:
move.w %sr,initial_sr | save initial values
movec %isp,%a0
movel %a0,initial_isp
@@ -53,19 +53,19 @@ around:
movel %a0,initial_msp
oriw #0x0700,%sr | INTERRUPTS OFF!!!
-
+
|
| zero out uninitialized data area
|
zerobss:
- moveal #end,%a0 | find end of .bss
- moveal #_bss_start,%a1 | find beginning of .bss
+ moveal #end,%a0 | find end of .bss
+ moveal #_bss_start,%a1 | find beginning of .bss
movel #0,%d0
loop: movel #0,%a1@+ | to zero out uninitialized
cmpal %a0,%a1
- jlt loop | loop until _end reached
+ jlt loop | loop until _end reached
movel #heap_size,__C_heap_size | set ___C_heap_size
movel #heap_memory,__C_heap_start | set ___C_heap_start
@@ -77,14 +77,14 @@ loop: movel #0,%a1@+ | to zero out uninitialized
movw #0x3000,%sr | SUPV MODE,INTERRUPTS ON!!!
#ifdef NEED_UNDERSCORES
- jsr __Board_Initialize | initialize the board
+ jsr __Board_Initialize | initialize the board
#else
- jsr _Board_Initialize | initialize the board
+ jsr _Board_Initialize | initialize the board
#endif
- move.l #0,%sp@- | envp = NULL
- move.l #0,%sp@- | argv = NULL
- move.l #0,%sp@- | argc = NULL
+ move.l #0,%sp@- | envp = NULL
+ move.l #0,%sp@- | argv = NULL
+ move.l #0,%sp@- | argc = NULL
#ifdef NEED_UNDERSCORES
jsr ___libc_init | initialize the library and
| call main
@@ -93,8 +93,8 @@ loop: movel #0,%a1@+ | to zero out uninitialized
| call main
#endif
add.l #12,%sp
-
- move.l #0,%sp@- | argc = NULL
+
+ move.l #0,%sp@- | argc = NULL
jsr __exit | call the Board specific exit
addq.l #4,%sp
@@ -121,7 +121,7 @@ _name##: .space _space
#define DECLARE_LABEL(_name) \
.globl _name ; \
-_name##:
+_name##:
#define DECLARE_PTR(_name) DECLARE_SPACE(_name,4,2)
#define DECLARE_U32(_name) DECLARE_SPACE(_name,4,2)
@@ -139,6 +139,7 @@ DECLARE_U16(initial_sr)
DECLARE_LABEL(_environ)
DECLARE_PTR(environ)
+DECLARE_LABEL(__errno)
DECLARE_LABEL(_errno)
DECLARE_U32(errno)
diff --git a/sysdeps/standalone/open.c b/sysdeps/standalone/open.c
index 910e7933e7..87097d9cb0 100644
--- a/sysdeps/standalone/open.c
+++ b/sysdeps/standalone/open.c
@@ -1,7 +1,7 @@
-/* Copyright (C) 1994, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
Ported to standalone by Joel Sherrill jsherril@redstone-emh2.army.mil,
On-Line Applications Research Corporation.
-
+
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -19,7 +19,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <fcntl.h>
#include <stdarg.h>
@@ -36,7 +35,9 @@ Cambridge, MA 02139, USA. */
/* Open FILE with access OFLAG. If OFLAG includes O_CREAT,
a third argument is the file protection. */
int
-DEFUN(__open, (file, oflag), CONST char *file AND int oflag DOTS)
+__open (file, oflag)
+ const char *file;
+ int oflag;
{
int mode;
int newfd;
@@ -44,7 +45,7 @@ DEFUN(__open, (file, oflag), CONST char *file AND int oflag DOTS)
if (file == NULL)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
@@ -69,17 +70,17 @@ DEFUN(__open, (file, oflag), CONST char *file AND int oflag DOTS)
}
if ( newfd == -1 ) {
- errno = ENFILE;
+ __set_errno (ENFILE);
return -1;
}
- /*
+ /*
* Initialize the open slot
*/
__FD_Table[ newfd ].in_use = 1;
__FD_Table[ newfd ].flags = oflag;
-
+
return newfd;
}
@@ -89,8 +90,10 @@ DEFUN(__open, (file, oflag), CONST char *file AND int oflag DOTS)
static
#endif
void
-DEFUN(__NONE_init_console_io, (argc, argv, envp),
- int argc AND char **argv AND char **envp)
+__NONE_init_console_io (argc, argv, envp)
+ int argc;
+ char **argv;
+ char **envp;
{
int index;
diff --git a/sysdeps/standalone/read.c b/sysdeps/standalone/read.c
index 284321d717..40322a5e71 100644
--- a/sysdeps/standalone/read.c
+++ b/sysdeps/standalone/read.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
Ported to standalone by Joel Sherrill jsherril@redstone-emh2.army.mil,
On-Line Applications Research Corporation.
@@ -19,7 +19,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <unistd.h>
#include <stddef.h>
@@ -30,32 +29,31 @@ Cambridge, MA 02139, USA. */
/* Read NBYTES into BUF from FD. Return the number read or -1. */
ssize_t
-DEFUN(__read, (fd, buf, nbytes),
- int fd AND PTR buf AND size_t nbytes)
+__libc_read (int fd, void *buf, size_t nbytes)
{
char *buffer = (char *) buf;
int data;
int poll;
- errno = 0;
+ __set_errno (0);
if (nbytes == 0)
return 0;
if ( !__FD_Is_valid( fd ) || !__FD_Table[ fd ].in_use )
{
- errno = EBADF;
+ __set_errno (EBADF);
return -1;
}
if (buf == NULL)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
if ( __FD_Table[ fd ].flags & O_WRONLY ) /* is it write only? */
{
- errno = EBADF;
+ __set_errno (EBADF);
return -1;
}
@@ -63,11 +61,11 @@ DEFUN(__read, (fd, buf, nbytes),
poll = ( __FD_Table[ fd ].flags & O_NONBLOCK ) ? 1 : 0;
- /* Read a single character. This is a cheap way to insure that the
- upper layers get every character because _Console_Getc can't timeout
+ /* Read a single character. This is a cheap way to insure that the
+ upper layers get every character because _Console_Getc can't timeout
or otherwise know when to stop. */
-
+
data = _Console_Getc(poll);
if ( data == -1 ) /* if no data return */
@@ -84,4 +82,5 @@ DEFUN(__read, (fd, buf, nbytes),
return 1;
}
-weak_alias (__read, read)
+weak_alias (__libc_read, __read)
+weak_alias (__libc_read, read)
diff --git a/sysdeps/standalone/write.c b/sysdeps/standalone/write.c
index f0ae3888f6..d377dd5e5c 100644
--- a/sysdeps/standalone/write.c
+++ b/sysdeps/standalone/write.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
Ported to standalone by Joel Sherrill jsherril@redstone-emh2.army.mil,
On-Line Applications Research Corporation.
@@ -19,7 +19,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <sysdep.h>
#include <errno.h>
#include <unistd.h>
@@ -31,28 +30,27 @@ Cambridge, MA 02139, USA. */
/* Write NBYTES of BUF to FD. Return the number written, or -1. */
ssize_t
-DEFUN(__write, (fd, buf, nbytes),
- int fd AND CONST PTR buf AND size_t nbytes)
+__libc_write (int fd, const void *buf, size_t nbytes)
{
int count;
- CONST char *data = buf;
+ const char *data = buf;
if (nbytes == 0)
return 0;
if ( !__FD_Is_valid( fd ) || !__FD_Table[ fd ].in_use )
{
- errno = EBADF;
+ __set_errno (EBADF);
return -1;
}
if (buf == NULL)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
if ( !(__FD_Table[ fd ].flags & (O_WRONLY|O_RDWR)) ) /* is it writeable? */
{
- errno = EBADF;
+ __set_errno (EBADF);
return -1;
}
@@ -70,5 +68,5 @@ DEFUN(__write, (fd, buf, nbytes),
return count;
}
-
-weak_alias (__write, write)
+weak_alias (__libc_write, __write)
+weak_alias (__libc_write, write)
diff --git a/sysdeps/stub/__longjmp.c b/sysdeps/stub/__longjmp.c
index d7f38f974b..ec74f776d9 100644
--- a/sysdeps/stub/__longjmp.c
+++ b/sysdeps/stub/__longjmp.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1994, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1994, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <setjmp.h>
@@ -25,12 +24,14 @@ Cambridge, MA 02139, USA. */
setjmp call there to return VAL, or 1 if VAL is 0. */
__NORETURN
void
-DEFUN(__longjmp, (env, val), CONST __jmp_buf env AND int val)
+__longjmp (env, val)
+ const __jmp_buf env;
+ int val;
{
if (val == 0)
val = 1;
- errno = ENOSYS;
+ __set_errno (ENOSYS);
/* No way to signal failure. */
}
diff --git a/sysdeps/stub/accept.c b/sysdeps/stub/accept.c
index 429f2aaefb..e9a774c026 100644
--- a/sysdeps/stub/accept.c
+++ b/sysdeps/stub/accept.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <sys/socket.h>
@@ -26,10 +25,12 @@ Cambridge, MA 02139, USA. */
peer and *ADDR_LEN to the address's actual length, and return the
new socket's descriptor, or -1 for errors. */
int
-DEFUN(accept, (fd, addr, addr_len),
- int fd AND struct sockaddr *addr AND size_t *addr_len)
+accept (fd, addr, addr_len)
+ int fd;
+ struct sockaddr *addr;
+ size_t *addr_len;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/access.c b/sysdeps/stub/access.c
index 06ddbb5c12..6779ea0606 100644
--- a/sysdeps/stub/access.c
+++ b/sysdeps/stub/access.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,23 +16,24 @@ License along with the GNU C Library; see the file COPYING.LIB. If
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>
/* Test for access to FILE. */
int
-DEFUN(__access, (file, type), CONST char *file AND int type)
+__access (file, type)
+ const char *file;
+ int type;
{
if (file == NULL || (type & ~(R_OK|W_OK|X_OK|F_OK)) != 0)
{
- errno = EINVAL;
- return(-1);
+ __set_errno (EINVAL);
+ return -1;
}
- errno = ENOSYS;
- return(-1);
+ __set_errno (ENOSYS);
+ return -1;
}
stub_warning (access)
diff --git a/sysdeps/stub/acct.c b/sysdeps/stub/acct.c
index 1b547f3ec4..0bed4d99f0 100644
--- a/sysdeps/stub/acct.c
+++ b/sysdeps/stub/acct.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <unistd.h>
@@ -24,9 +23,10 @@ Cambridge, MA 02139, USA. */
a record for each process as it terminates, to this file. If NAME is NULL,
turn accounting off. This call is restricted to the super-user. */
int
-DEFUN(acct, (name), CONST char *name)
+acct (name)
+ const char *name;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/adjtime.c b/sysdeps/stub/adjtime.c
index 933e2ef7a3..3496121a17 100644
--- a/sysdeps/stub/adjtime.c
+++ b/sysdeps/stub/adjtime.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <sys/time.h>
@@ -25,11 +24,11 @@ Cambridge, MA 02139, USA. */
of time adjustment remaining to be done from the last `__adjtime' call.
This call is restricted to the super-user. */
int
-DEFUN(__adjtime, (delta, olddelta),
- CONST struct timeval *delta AND
- struct timeval *olddelta)
+__adjtime (delta, olddelta)
+ const struct timeval *delta;
+ struct timeval *olddelta;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
stub_warning (adjtime)
diff --git a/sysdeps/stub/alarm.c b/sysdeps/stub/alarm.c
index 78cf673e71..9c4e71fc2d 100644
--- a/sysdeps/stub/alarm.c
+++ b/sysdeps/stub/alarm.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <unistd.h>
@@ -28,9 +27,10 @@ Cambridge, MA 02139, USA. */
to 0 and check its value after calling `alarm', and this might tell you.
The signal may come late due to processor scheduling. */
unsigned int
-DEFUN(alarm, (seconds), unsigned int seconds)
+alarm (seconds)
+ unsigned int seconds;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return 0;
}
diff --git a/sysdeps/stub/bind.c b/sysdeps/stub/bind.c
index 38ad46aa87..7f4d8145b8 100644
--- a/sysdeps/stub/bind.c
+++ b/sysdeps/stub/bind.c
@@ -16,16 +16,17 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <sys/socket.h>
/* Give the socket FD the local address ADDR (which is LEN bytes long). */
int
-DEFUN(bind, (fd, addr, len),
- int fd AND const struct sockaddr *addr AND size_t len)
+bind (fd, addr, len)
+ int fd;
+ const struct sockaddr *addr;
+ size_t len;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/brk.c b/sysdeps/stub/brk.c
index 3a48ea2e17..a4ebbf01f7 100644
--- a/sysdeps/stub/brk.c
+++ b/sysdeps/stub/brk.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,15 +16,16 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
+#include <unistd.h>
/* Set the end of the process's data space to ADDR.
Return 0 if successful, -1 if not. */
int
-DEFUN(__brk, (addr), PTR addr)
+__brk (addr)
+ void *addr;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
stub_warning (brk)
diff --git a/sysdeps/stub/chdir.c b/sysdeps/stub/chdir.c
index f73c98142a..7e5d825d3a 100644
--- a/sysdeps/stub/chdir.c
+++ b/sysdeps/stub/chdir.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,23 +16,23 @@ License along with the GNU C Library; see the file COPYING.LIB. If
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>
/* Change the current directory to PATH. */
int
-DEFUN(__chdir, (path), CONST char *path)
+__chdir (path)
+ const char *path;
{
if (path == NULL)
{
- errno = EINVAL;
- return(-1);
+ __set_errno (EINVAL);
+ return -1;
}
- errno = ENOSYS;
- return(-1);
+ __set_errno (ENOSYS);
+ return -1;
}
stub_warning (chdir)
diff --git a/sysdeps/stub/chflags.c b/sysdeps/stub/chflags.c
index a906e1b323..9380108283 100644
--- a/sysdeps/stub/chflags.c
+++ b/sysdeps/stub/chflags.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,22 +16,23 @@ License along with the GNU C Library; see the file COPYING.LIB. If
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 <sys/stat.h>
/* Change the flags of FILE to FLAGS. */
int
-DEFUN(chflags, (file, flags), CONST char *file AND int flags)
+chflags (file, flags)
+ const char *file;
+ int flags;
{
if (file == NULL)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/chmod.c b/sysdeps/stub/chmod.c
index 3259d3e121..e76566cb83 100644
--- a/sysdeps/stub/chmod.c
+++ b/sysdeps/stub/chmod.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
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 <sys/stat.h>
@@ -24,15 +23,17 @@ Cambridge, MA 02139, USA. */
/* Change the protections of FILE to MODE. */
int
-DEFUN(__chmod, (file, mode), CONST char *file AND mode_t mode)
+__chmod (file, mode)
+ const char *file;
+ mode_t mode;
{
if (file == NULL)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
stub_warning (chmod)
diff --git a/sysdeps/stub/chown.c b/sysdeps/stub/chown.c
index e9db1ed86f..32dd189145 100644
--- a/sysdeps/stub/chown.c
+++ b/sysdeps/stub/chown.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
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>
@@ -24,16 +23,18 @@ Cambridge, MA 02139, USA. */
/* Change the owner and group of FILE. */
int
-DEFUN(__chown, (file, owner, group),
- CONST char *file AND uid_t owner AND gid_t group)
+__chown (file, owner, group)
+ const char *file;
+ uid_t owner;
+ gid_t group;
{
if (file == NULL)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
stub_warning (chown)
diff --git a/sysdeps/stub/chroot.c b/sysdeps/stub/chroot.c
index a18d349329..f77010b66e 100644
--- a/sysdeps/stub/chroot.c
+++ b/sysdeps/stub/chroot.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,16 +16,16 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <unistd.h>
/* Make PATH be the root directory (the starting point for absolute paths).
This call is restricted to the super-user. */
int
-DEFUN(chroot, (path), CONST char *path)
+chroot (path)
+ const char *path;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/clock.c b/sysdeps/stub/clock.c
index c22192bd86..b0df84a94b 100644
--- a/sysdeps/stub/clock.c
+++ b/sysdeps/stub/clock.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,16 +16,15 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <sys/times.h>
#include <time.h>
#include <errno.h>
/* Return the time used by the program so far (user time + system time). */
clock_t
-DEFUN_VOID(clock)
+clock ()
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return (clock_t) -1;
}
diff --git a/sysdeps/stub/close.c b/sysdeps/stub/close.c
index efa80a708d..9374990c09 100644
--- a/sysdeps/stub/close.c
+++ b/sysdeps/stub/close.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,21 +16,21 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <unistd.h>
/* Close the file descriptor FD. */
int
-DEFUN(__close, (fd), int fd)
+__close (fd)
+ int fd;
{
if (fd < 0)
{
- errno = EBADF;
+ __set_errno (EBADF);
return -1;
}
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
stub_warning (close)
diff --git a/sysdeps/stub/closedir.c b/sysdeps/stub/closedir.c
index 5fb2ed3e7d..20735563bb 100644
--- a/sysdeps/stub/closedir.c
+++ b/sysdeps/stub/closedir.c
@@ -26,7 +26,7 @@ Cambridge, MA 02139, USA. */
int
__closedir (DIR *dirp)
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
weak_alias (__closedir, closedir)
diff --git a/sysdeps/stub/connect.c b/sysdeps/stub/connect.c
index 49300f3a09..0d642cbcea 100644
--- a/sysdeps/stub/connect.c
+++ b/sysdeps/stub/connect.c
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <sys/socket.h>
@@ -25,10 +24,12 @@ Cambridge, MA 02139, USA. */
and the only address from which to accept transmissions.
Return 0 on success, -1 for errors. */
int
-DEFUN(connect, (fd, addr, len),
- int fd AND const struct sockaddr *addr AND size_t len)
+connect (fd, addr, len)
+ int fd;
+ const struct sockaddr *addr;
+ size_t len;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/ctermid.c b/sysdeps/stub/ctermid.c
index 1025d686d7..5504c4745e 100644
--- a/sysdeps/stub/ctermid.c
+++ b/sysdeps/stub/ctermid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <stdio.h>
@@ -25,9 +24,10 @@ Cambridge, MA 02139, USA. */
If S is not NULL, the name is copied into it (it should be at
least L_ctermid bytes long), otherwise a static buffer is used. */
char *
-DEFUN(ctermid, (s), char *s)
+ctermid (s)
+ char *s;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return NULL;
}
diff --git a/sysdeps/stub/cuserid.c b/sysdeps/stub/cuserid.c
index 655ddaf2a5..9d92b5449c 100644
--- a/sysdeps/stub/cuserid.c
+++ b/sysdeps/stub/cuserid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <stdio.h>
#include <errno.h>
@@ -24,9 +23,10 @@ Cambridge, MA 02139, USA. */
If S is not NULL, it points to a buffer of at least L_cuserid bytes
into which the name is copied; otherwise, a static buffer is used. */
char *
-DEFUN(cuserid, (s), char *s)
+cuserid (s)
+ char *s;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return NULL;
}
diff --git a/sysdeps/stub/dirfd.c b/sysdeps/stub/dirfd.c
index 9ec19696f3..06707cdd60 100644
--- a/sysdeps/stub/dirfd.c
+++ b/sysdeps/stub/dirfd.c
@@ -1,5 +1,5 @@
/* dirfd -- Return the file desciptor used by a DIR stream. Stub version.
-Copyright (C) 1995 Free Software Foundation, Inc.
+Copyright (C) 1995, 1996 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
@@ -25,7 +25,7 @@ int
dirfd (dirp)
FILE *dirp;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/dup.c b/sysdeps/stub/dup.c
index f15a1bef3b..6c0f63e6e3 100644
--- a/sysdeps/stub/dup.c
+++ b/sysdeps/stub/dup.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,16 +16,16 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <fcntl.h>
#include <unistd.h>
/* Duplicate FD, returning a new file descriptor open on the same file. */
int
-DEFUN(__dup, (fd), int fd)
+__dup (fd)
+ int fd;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
stub_warning (dup)
diff --git a/sysdeps/stub/dup2.c b/sysdeps/stub/dup2.c
index a0f7aad47d..dd37b28892 100644
--- a/sysdeps/stub/dup2.c
+++ b/sysdeps/stub/dup2.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <fcntl.h>
#include <unistd.h>
@@ -25,11 +24,13 @@ Cambridge, MA 02139, USA. */
/* Duplicate FD to FD2, closing the old FD2 and making FD2 be
open the same file as FD is. Return FD2 or -1. */
int
-DEFUN(__dup2, (fd, fd2), int fd AND int fd2)
+__dup2 (fd, fd2)
+ int fd;
+ int fd2;
{
if (fd < 0 || fd2 < 0)
{
- errno = EBADF;
+ __set_errno (EBADF);
return -1;
}
@@ -37,7 +38,7 @@ DEFUN(__dup2, (fd, fd2), int fd AND int fd2)
/* No way to check that they are valid. */
return fd2;
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
stub_warning (dup2)
diff --git a/sysdeps/stub/errnos.h b/sysdeps/stub/errnos.h
index 11708086bf..0a0f80a19d 100644
--- a/sysdeps/stub/errnos.h
+++ b/sysdeps/stub/errnos.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1994, 1996 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
@@ -36,3 +36,5 @@ Cambridge, MA 02139, USA. */
#define ENFILE 9
#define EMFILE 10
#endif
+
+#define __set_errno(val) errno = (val)
diff --git a/sysdeps/stub/euidaccess.c b/sysdeps/stub/euidaccess.c
index 1769e0dd17..79296a77f4 100644
--- a/sysdeps/stub/euidaccess.c
+++ b/sysdeps/stub/euidaccess.c
@@ -1,5 +1,5 @@
/* Test for access to FILE using effective UID and GID. Stub version.
-Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+Copyright (C) 1991, 1995, 1996 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
@@ -28,11 +28,11 @@ euidaccess (file, type)
{
if (file == NULL || (type & ~(R_OK|W_OK|X_OK|F_OK)) != 0)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
stub_warning (euidaccess)
diff --git a/sysdeps/stub/execve.c b/sysdeps/stub/execve.c
index 680d23757e..61a5df3015 100644
--- a/sysdeps/stub/execve.c
+++ b/sysdeps/stub/execve.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
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>
@@ -25,17 +24,18 @@ Cambridge, MA 02139, USA. */
/* Replace the current process, executing PATH with arguments ARGV and
environment ENVP. ARGV and ENVP are terminated by NULL pointers. */
int
-DEFUN(__execve, (path, argv, envp),
- CONST char *path AND
- char *CONST argv[] AND char *CONST envp[])
+__execve (path, argv, envp)
+ const char *path;
+ char *const argv[];
+ char *const envp[];
{
if (path == NULL || argv == NULL || envp == NULL)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
stub_warning (execve)
diff --git a/sysdeps/stub/fchdir.c b/sysdeps/stub/fchdir.c
index ba36ed626a..8eb7700361 100644
--- a/sysdeps/stub/fchdir.c
+++ b/sysdeps/stub/fchdir.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,16 +16,16 @@ License along with the GNU C Library; see the file COPYING.LIB. If
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>
/* Change the current directory to FD. */
int
-DEFUN(fchdir, (fd), int fd)
+fchdir (fd)
+ int fd;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS(;
return -1;
}
diff --git a/sysdeps/stub/fchflags.c b/sysdeps/stub/fchflags.c
index e9640d2375..4f59ad3480 100644
--- a/sysdeps/stub/fchflags.c
+++ b/sysdeps/stub/fchflags.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,22 +16,23 @@ License along with the GNU C Library; see the file COPYING.LIB. If
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 <sys/stat.h>
/* Change the flags of the file FD refers to to FLAGS. */
int
-DEFUN(fchflags, (fd, flags), int fd AND int flags)
+fchflags (fd, flags)
+ int fd;
+ int flags;
{
if (fd < 0)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/fchmod.c b/sysdeps/stub/fchmod.c
index 43d4919c9b..f8c5c80214 100644
--- a/sysdeps/stub/fchmod.c
+++ b/sysdeps/stub/fchmod.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
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 <sys/stat.h>
@@ -24,15 +23,17 @@ Cambridge, MA 02139, USA. */
/* Change the protections of the file FD refers to to MODE. */
int
-DEFUN(__fchmod, (fd, mode), int fd AND mode_t mode)
+__fchmod (fd, mode)
+ int fd;
+ mode_t mode;
{
if (fd < 0)
{
- errno = EINVAL;
+ __set_errno (EINVAL(;
return -1;
}
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
stub_warning (fchmod)
diff --git a/sysdeps/stub/fchown.c b/sysdeps/stub/fchown.c
index 4af1d0d429..16f7f11a06 100644
--- a/sysdeps/stub/fchown.c
+++ b/sysdeps/stub/fchown.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
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>
@@ -24,16 +23,18 @@ Cambridge, MA 02139, USA. */
/* Change the owner and group of the file referred to by FD. */
int
-DEFUN(__fchown, (fd, owner, group),
- int fd AND uid_t owner AND gid_t group)
+__fchown (fd, owner, group)
+ int fd;
+ uid_t owner;
+ gid_t group;
{
if (fd < 0)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
stub_warning (fchown)
diff --git a/sysdeps/stub/fcntl.c b/sysdeps/stub/fcntl.c
index e35021a496..21839aab5a 100644
--- a/sysdeps/stub/fcntl.c
+++ b/sysdeps/stub/fcntl.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,21 +16,22 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <fcntl.h>
/* Perform file control operations on FD. */
int
-DEFUN(__fcntl, (fd, cmd), int fd AND int cmd DOTS)
+__fcntl (fd, cmd)
+ int fd;
+ int cmd;
{
if (fd < 0)
{
- errno = EBADF;
+ __set_errno (EBADF);
return -1;
}
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
stub_warning (fcntl)
diff --git a/sysdeps/stub/fdopen.c b/sysdeps/stub/fdopen.c
index 4ab921bfd1..3ce07395e2 100644
--- a/sysdeps/stub/fdopen.c
+++ b/sysdeps/stub/fdopen.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,15 +16,16 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <stdio.h>
/* Open a new stream on a given system file descriptor. */
FILE *
-DEFUN(fdopen, (fd, mode), int fd AND CONST char *mode)
+fdopen (fd, mode)
+ int fd;
+ const char *mode;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return NULL;
}
diff --git a/sysdeps/stub/fexecve.c b/sysdeps/stub/fexecve.c
index c0990f510c..0772ed5da5 100644
--- a/sysdeps/stub/fexecve.c
+++ b/sysdeps/stub/fexecve.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
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>
@@ -25,17 +24,18 @@ Cambridge, MA 02139, USA. */
/* Execute the file FD refers to, overlaying the running program image.
ARGV and ENVP are passed to the new program, as for `execve'. */
int
-DEFUN(fexecve, (fd, argv, envp),
- int fd AND
- char *CONST argv[] AND char *CONST envp[])
+fexecve (fd, argv, envp)
+ int fd;
+ char *const argv[];
+ char *const envp[];
{
if (fd < 0 || argv == NULL || envp == NULL)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/flock.c b/sysdeps/stub/flock.c
index bdd7858393..d74f8264a7 100644
--- a/sysdeps/stub/flock.c
+++ b/sysdeps/stub/flock.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995, 1996 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
@@ -16,17 +16,17 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <sys/file.h>
/* Apply or remove an advisory lock, according to OPERATION,
on the file FD refers to. */
int
-DEFUN(__flock, (fd, operation),
- int fd AND int operation)
+__flock (fd, operation)
+ int fd;
+ int operation;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/fork.c b/sysdeps/stub/fork.c
index 0b0b63afd0..ffb95e7b13 100644
--- a/sysdeps/stub/fork.c
+++ b/sysdeps/stub/fork.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <unistd.h>
@@ -25,9 +24,9 @@ Cambridge, MA 02139, USA. */
Return -1 for errors, 0 to the new process,
and the process ID of the new process to the old process. */
int
-DEFUN_VOID(__fork)
+__fork ()
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
stub_warning (fork)
diff --git a/sysdeps/stub/fpathconf.c b/sysdeps/stub/fpathconf.c
index 75880fd647..36b1369dad 100644
--- a/sysdeps/stub/fpathconf.c
+++ b/sysdeps/stub/fpathconf.c
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
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>
@@ -24,18 +23,20 @@ Cambridge, MA 02139, USA. */
/* Get file-specific information about descriptor FD. */
long int
-DEFUN(__fpathconf, (fd, name), int fd AND int name)
+__fpathconf (fd, name)
+ int fd;
+ int name;
{
if (fd < 0)
{
- errno = EBADF;
+ __set_errno (EBADF);
return -1;
}
switch (name)
{
default:
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
case _PC_LINK_MAX:
@@ -51,7 +52,7 @@ DEFUN(__fpathconf, (fd, name), int fd AND int name)
break;
}
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/fstatfs.c b/sysdeps/stub/fstatfs.c
index 5ef5ccd1b9..9bc09000bf 100644
--- a/sysdeps/stub/fstatfs.c
+++ b/sysdeps/stub/fstatfs.c
@@ -25,10 +25,9 @@ Cambridge, MA 02139, USA. */
int
__fstatfs (int fd, struct statfs *buf)
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
stub_warning (statfs)
weak_alias (__fstatfs, fstatfs)
-
diff --git a/sysdeps/stub/fsync.c b/sysdeps/stub/fsync.c
index 84780da828..6091159d5c 100644
--- a/sysdeps/stub/fsync.c
+++ b/sysdeps/stub/fsync.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,15 +16,15 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <unistd.h>
/* Make all changes done to FD actually appear on disk. */
int
-DEFUN(fsync, (fd), int fd)
+fsync (fd)
+ int fd;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/ftruncate.c b/sysdeps/stub/ftruncate.c
index f9474dd4e2..75d6bbc7df 100644
--- a/sysdeps/stub/ftruncate.c
+++ b/sysdeps/stub/ftruncate.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,16 +16,16 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <sys/types.h>
#include <errno.h>
/* Truncate the file FD refers to to LENGTH bytes. */
int
-DEFUN(ftruncate, (fd, length),
- int fd AND off_t length)
+ftruncate (fd, length)
+ int fd;
+ off_t length;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/fxstat.c b/sysdeps/stub/fxstat.c
index 7c1eeff2cb..4318a08ecb 100644
--- a/sysdeps/stub/fxstat.c
+++ b/sysdeps/stub/fxstat.c
@@ -26,22 +26,22 @@ __fxstat (int vers, int fd, struct stat *buf)
{
if (vers != _STAT_VER)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
if (fd < 0)
{
- errno = EBADF;
+ __set_errno (EBADF);
return -1;
}
else if (buf == NULL)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
stub_warning (__fxstat)
diff --git a/sysdeps/stub/getcwd.c b/sysdeps/stub/getcwd.c
index 2aca49091e..4318b5b65e 100644
--- a/sysdeps/stub/getcwd.c
+++ b/sysdeps/stub/getcwd.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1995, 1996 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
@@ -30,7 +30,7 @@ Cambridge, MA 02139, USA. */
char *
__getcwd (char *buf, size_t size)
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return NULL;
}
weak_alias (__getcwd, getcwd)
diff --git a/sysdeps/stub/getdents.c b/sysdeps/stub/getdents.c
index 8cf890a4aa..6e7793a72c 100644
--- a/sysdeps/stub/getdents.c
+++ b/sysdeps/stub/getdents.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,16 +16,18 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <stddef.h>
#include <errno.h>
#include <sys/types.h>
int
-DEFUN(__getdirentries, (fd, buf, nbytes, basep),
- int fd AND char *buf AND size_t nbytes AND off_t *basep)
+__getdirentries (fd, buf, nbytes, basep)
+ int fd;
+ char *buf;
+ size_t nbytes;
+ off_t *basep;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
stub_warning (getdirentries)
diff --git a/sysdeps/stub/getdomain.c b/sysdeps/stub/getdomain.c
index c2159df012..5156bbd445 100644
--- a/sysdeps/stub/getdomain.c
+++ b/sysdeps/stub/getdomain.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <unistd.h>
@@ -24,10 +23,11 @@ Cambridge, MA 02139, USA. */
The result is null-terminated if LEN is large enough for the full
name and the terminator. */
int
-DEFUN(getdomainname, (name, len),
- char *name AND size_t len)
+getdomainname (name, len)
+ char *name;
+ size_t len;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/getdtsz.c b/sysdeps/stub/getdtsz.c
index e9c9b61ba6..cf3dd916be 100644
--- a/sysdeps/stub/getdtsz.c
+++ b/sysdeps/stub/getdtsz.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,16 +16,15 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <unistd.h>
/* Return the maximum number of file descriptors
the current process could possibly have. */
int
-DEFUN_VOID(__getdtablesize)
+__getdtablesize ()
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
stub_warning (getdtablesize)
diff --git a/sysdeps/stub/getegid.c b/sysdeps/stub/getegid.c
index 6e4e611e59..cbba8e44c5 100644
--- a/sysdeps/stub/getegid.c
+++ b/sysdeps/stub/getegid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1995, 1996 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
@@ -16,15 +16,14 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <unistd.h>
/* Get the effective group ID of the calling process. */
__gid_t
-DEFUN_VOID(__getegid)
+__getegid ()
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
stub_warning (getegid)
diff --git a/sysdeps/stub/getenv.c b/sysdeps/stub/getenv.c
index a53e25bd96..fab9f08c75 100644
--- a/sysdeps/stub/getenv.c
+++ b/sysdeps/stub/getenv.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,16 +16,16 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <stdlib.h>
/* Return the value of the environment variable NAME. */
char *
-DEFUN(getenv, (name), CONST char *name)
+getenv (name)
+ const char *name;
{
- errno = ENOSYS;
- return(NULL);
+ __set_errno (ENOSYS);
+ return NULL;
}
diff --git a/sysdeps/stub/geteuid.c b/sysdeps/stub/geteuid.c
index f5f437576c..7c470fa1db 100644
--- a/sysdeps/stub/geteuid.c
+++ b/sysdeps/stub/geteuid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1995, 1996 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
@@ -16,16 +16,15 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <unistd.h>
/* Get the effective user ID of the calling process. */
__uid_t
-DEFUN_VOID(__geteuid)
+__geteuid ()
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
stub_warning (geteuid)
diff --git a/sysdeps/stub/getgid.c b/sysdeps/stub/getgid.c
index f2bfa7696a..a4e7204c16 100644
--- a/sysdeps/stub/getgid.c
+++ b/sysdeps/stub/getgid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1993, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1993, 1995, 1996 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
@@ -16,16 +16,15 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <unistd.h>
#include <sys/types.h>
/* Get the real group ID of the calling process. */
gid_t
-DEFUN_VOID(__getgid)
+__getgid ()
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
stub_warning (getgid)
diff --git a/sysdeps/stub/getgroups.c b/sysdeps/stub/getgroups.c
index f98d966346..7d766d7639 100644
--- a/sysdeps/stub/getgroups.c
+++ b/sysdeps/stub/getgroups.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
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>
@@ -28,14 +27,16 @@ Cambridge, MA 02139, USA. */
the calling process is in. Otherwise, fill in the group IDs
of its supplementary groups in LIST and return the number written. */
int
-DEFUN(__getgroups, (size, list), int size AND gid_t *list)
+__getgroups (size, list)
+ int size;
+ gid_t *list;
{
#if defined (NGROUPS_MAX) && NGROUPS_MAX == 0
/* The system has no supplementary groups. */
return 0;
#endif
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/gethostid.c b/sysdeps/stub/gethostid.c
index 8ff3827f51..83c5755100 100644
--- a/sysdeps/stub/gethostid.c
+++ b/sysdeps/stub/gethostid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,15 +16,14 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <unistd.h>
/* Return the current machine's Internet number. */
long int
-DEFUN_VOID(gethostid)
+gethostid ()
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1L;
}
diff --git a/sysdeps/stub/gethostname.c b/sysdeps/stub/gethostname.c
index 1cf3c7bf26..d815f2da0e 100644
--- a/sysdeps/stub/gethostname.c
+++ b/sysdeps/stub/gethostname.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <unistd.h>
@@ -24,10 +23,11 @@ Cambridge, MA 02139, USA. */
The result is null-terminated if LEN is large enough for the full
name and the terminator. */
int
-DEFUN(__gethostname, (name, len),
- char *name AND size_t len)
+__gethostname (name, len)
+ char *name;
+ size_t len;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
stub_warning (gethostname)
diff --git a/sysdeps/stub/getitimer.c b/sysdeps/stub/getitimer.c
index 75b5488e0e..77b4ebd4ed 100644
--- a/sysdeps/stub/getitimer.c
+++ b/sysdeps/stub/getitimer.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1994, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1994, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <stddef.h>
#include <errno.h>
#include <sys/time.h>
@@ -24,16 +23,17 @@ Cambridge, MA 02139, USA. */
/* Set *VALUE to the current setting of timer WHICH.
Return 0 on success, -1 on errors. */
int
-DEFUN(__getitimer, (which, value),
- enum __itimer_which which AND struct itimerval *value)
+__getitimer (which, value)
+ enum __itimer_which which;
+ struct itimerval *value;
{
if (value == NULL)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
stub_warning (getitimer)
diff --git a/sysdeps/stub/getlogin.c b/sysdeps/stub/getlogin.c
index d350bfb843..484c159855 100644
--- a/sysdeps/stub/getlogin.c
+++ b/sysdeps/stub/getlogin.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <stddef.h>
#include <errno.h>
#include <unistd.h>
@@ -24,9 +23,9 @@ Cambridge, MA 02139, USA. */
/* Return the login name of the user, or NULL if it can't be determined.
The returned pointer, if not NULL, is good only until the next call. */
char *
-DEFUN_VOID(getlogin)
+getlogin ()
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return NULL;
}
diff --git a/sysdeps/stub/getlogin_r.c b/sysdeps/stub/getlogin_r.c
index bf29c7c982..fa9bb75d41 100644
--- a/sysdeps/stub/getlogin_r.c
+++ b/sysdeps/stub/getlogin_r.c
@@ -28,7 +28,7 @@ getlogin_r (name, name_len)
char *name;
size_t name_len;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return errno;
}
diff --git a/sysdeps/stub/getpagesize.c b/sysdeps/stub/getpagesize.c
index 1ee441513d..2c55df1a15 100644
--- a/sysdeps/stub/getpagesize.c
+++ b/sysdeps/stub/getpagesize.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1993, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1993, 1995, 1996 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
@@ -16,15 +16,14 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <stddef.h>
/* Return the system page size. */
size_t
-DEFUN_VOID(__getpagesize)
+__getpagesize ()
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return 0;
}
stub_warning (getpagesize)
diff --git a/sysdeps/stub/getpeername.c b/sysdeps/stub/getpeername.c
index 79497ca8aa..85256ad7ed 100644
--- a/sysdeps/stub/getpeername.c
+++ b/sysdeps/stub/getpeername.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,17 +16,18 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <sys/socket.h>
/* Put the address of the peer connected to socket FD into *ADDR
(which is *LEN bytes long), and its actual length into *LEN. */
int
-DEFUN(getpeername, (fd, addr, len),
- int fd AND struct sockaddr *addr AND size_t *len)
+getpeername (fd, addr, len)
+ int fd;
+ struct sockaddr *addr;
+ size_t *len;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/getpgid.c b/sysdeps/stub/getpgid.c
index 44efc12c10..e6cada2fda 100644
--- a/sysdeps/stub/getpgid.c
+++ b/sysdeps/stub/getpgid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,14 +16,13 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
-#include <errno.h>
#include <unistd.h>
#include <sys/types.h>
/* Get the process group ID of process PID. */
int
-DEFUN(__getpgid, (pid), pid_t pid)
+__getpgid (pid)
+ pid_t pid;
{
return pid;
}
diff --git a/sysdeps/stub/getpid.c b/sysdeps/stub/getpid.c
index 270c90947b..c2926b10a5 100644
--- a/sysdeps/stub/getpid.c
+++ b/sysdeps/stub/getpid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,17 +16,16 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <unistd.h>
/* Get the process ID of the calling process. */
int
-DEFUN_VOID(__getpid)
+__getpid ()
{
- errno = ENOSYS;
- return(-1);
+ __set_errno (ENOSYS);
+ return -1;
}
stub_warning (getpid)
diff --git a/sysdeps/stub/getppid.c b/sysdeps/stub/getppid.c
index d6547c709b..e5cc73f575 100644
--- a/sysdeps/stub/getppid.c
+++ b/sysdeps/stub/getppid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,16 +16,15 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <unistd.h>
/* Get the parent process ID of the calling process. */
int
-DEFUN_VOID(__getppid)
+__getppid ()
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
stub_warning (getppid)
diff --git a/sysdeps/stub/getpriority.c b/sysdeps/stub/getpriority.c
index eb6b43d834..599fed2478 100644
--- a/sysdeps/stub/getpriority.c
+++ b/sysdeps/stub/getpriority.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <sys/resource.h>
@@ -25,10 +24,11 @@ Cambridge, MA 02139, USA. */
or user (as specified by WHO) is used. A lower priority number means higher
priority. Priorities range from PRIO_MIN to PRIO_MAX. */
int
-DEFUN(getpriority, (which, who),
- enum __priority_which which AND int who)
+getpriority (which, who)
+ enum __priority_which which;
+ int who;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/getrlimit.c b/sysdeps/stub/getrlimit.c
index a3f31448bc..9e41e076a5 100644
--- a/sysdeps/stub/getrlimit.c
+++ b/sysdeps/stub/getrlimit.c
@@ -24,7 +24,7 @@ Cambridge, MA 02139, USA. */
int
__getrlimit (enum __rlimit_resource resource, struct rlimit *rlimits)
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
weak_alias (__getrlimit, getrlimit)
diff --git a/sysdeps/stub/getrusage.c b/sysdeps/stub/getrusage.c
index 6417c8d9d1..c13ae7a0fc 100644
--- a/sysdeps/stub/getrusage.c
+++ b/sysdeps/stub/getrusage.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,17 +16,17 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <sys/resource.h>
#include <errno.h>
/* Return resource usage information on process indicated by WHO
and put it in *USAGE. Returns 0 for success, -1 for failure. */
int
-DEFUN(__getrusage, (who, usage),
- enum __rusage_who who AND struct rusage *usage)
+__getrusage (who, usage)
+ enum __rusage_who who;
+ struct rusage *usage;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
stub_warning (getrusage)
diff --git a/sysdeps/stub/getsid.c b/sysdeps/stub/getsid.c
index af474c5e4d..9ae0c8442c 100644
--- a/sysdeps/stub/getsid.c
+++ b/sysdeps/stub/getsid.c
@@ -1,5 +1,5 @@
/* getsid -- Return session ID of a process. Stub version.
-Copyright (C) 1995 Free Software Foundation, Inc.
+Copyright (C) 1995, 1996 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
@@ -24,6 +24,6 @@ Cambridge, MA 02139, USA. */
pid_t
getsid (pid_t pid)
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return (pid_t) -1;
}
diff --git a/sysdeps/stub/getsockname.c b/sysdeps/stub/getsockname.c
index a587e26e9e..17bb2b8a24 100644
--- a/sysdeps/stub/getsockname.c
+++ b/sysdeps/stub/getsockname.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,16 +16,17 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <sys/socket.h>
/* Put the local address of FD into *ADDR and its length in *LEN. */
int
-DEFUN(getsockname, (fd, addr, len),
- int fd AND struct sockaddr *addr AND size_t *len)
+getsockname (fd, addr, len)
+ int fd;
+ struct sockaddr *addr;
+ size_t *len;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/getsockopt.c b/sysdeps/stub/getsockopt.c
index ab34d8b09c..e3ea53d79f 100644
--- a/sysdeps/stub/getsockopt.c
+++ b/sysdeps/stub/getsockopt.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <sys/socket.h>
@@ -24,11 +23,14 @@ Cambridge, MA 02139, USA. */
into OPTVAL (which is *OPTLEN bytes long), and set *OPTLEN to the value's
actual length. Returns 0 on success, -1 for errors. */
int
-DEFUN(getsockopt, (fd, level, optname, optval, optlen),
- int fd AND int level AND int optname AND
- PTR optval AND size_t *optlen)
+getsockopt (fd, level, optname, optval, optlen)
+ int fd;
+ int level;
+ int optname;
+ void *optval;
+ size_t *optlen;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/getsysstats.c b/sysdeps/stub/getsysstats.c
index c8fe700ded..1d0781d834 100644
--- a/sysdeps/stub/getsysstats.c
+++ b/sysdeps/stub/getsysstats.c
@@ -48,21 +48,21 @@ int
__get_phys_pages ()
{
/* We have no general way to determine this value. */
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
weak_alias (__get_phys_pages, get_phys_pages)
-link_warning (get_phys_pages, "warning: get_phys_pages will always fail")
+stub_warning (get_phys_pages)
int
__get_avphys_pages ()
{
/* We have no general way to determine this value. */
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
weak_alias (__get_avphys_pages, get_avphys_pages)
-link_warning (get_avphys_pages, "warning: get_avphys_pages will always fail")
+stub_warning (get_avphys_pages)
diff --git a/sysdeps/stub/gettimeofday.c b/sysdeps/stub/gettimeofday.c
index 74e4619df9..f6f38f2800 100644
--- a/sysdeps/stub/gettimeofday.c
+++ b/sysdeps/stub/gettimeofday.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <sys/time.h>
@@ -24,10 +23,11 @@ Cambridge, MA 02139, USA. */
putting it into *TV and *TZ. If TZ is NULL, *TZ is not filled.
Returns 0 on success, -1 on errors. */
int
-DEFUN(__gettimeofday, (tv, tz),
- struct timeval *tv AND struct timezone *tz)
+__gettimeofday (tv, tz)
+ struct timeval *tv;
+ struct timezone *tz;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
stub_warning (gettimeofday)
diff --git a/sysdeps/stub/getuid.c b/sysdeps/stub/getuid.c
index ebdd2688bc..2c843e4c8e 100644
--- a/sysdeps/stub/getuid.c
+++ b/sysdeps/stub/getuid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1993, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1993, 1995, 1996 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
@@ -16,16 +16,15 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <unistd.h>
#include <sys/types.h>
/* Get the real user ID of the calling process. */
uid_t
-DEFUN_VOID(__getuid)
+__getuid ()
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
stub_warning (getuid)
diff --git a/sysdeps/stub/gtty.c b/sysdeps/stub/gtty.c
index b702dda29a..c06d075ffd 100644
--- a/sysdeps/stub/gtty.c
+++ b/sysdeps/stub/gtty.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1995, 1996 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
@@ -16,23 +16,23 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <sgtty.h>
#include <stddef.h>
/* Fill in *PARAMS with terminal parameters associated with FD. */
int
-DEFUN(gtty, (fd, params),
- int fd AND struct sgttyb *params)
+gtty (fd, params)
+ int fd;
+ struct sgttyb *params;
{
if (params == NULL)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/ioctl.c b/sysdeps/stub/ioctl.c
index 579ddab9b7..23d13cd0d0 100644
--- a/sysdeps/stub/ioctl.c
+++ b/sysdeps/stub/ioctl.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1993, 1994, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 93, 94, 95, 96 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
@@ -16,17 +16,17 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <sys/ioctl.h>
/* Perform the I/O control operation specified by REQUEST on FD.
The actual type and use of ARG and the return value depend on REQUEST. */
int
-DEFUN(__ioctl, (fd, request),
- int fd AND unsigned long int request DOTS)
+__ioctl (fd, request)
+ int fd;
+ unsigned long int request;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
stub_warning (ioctl)
diff --git a/sysdeps/stub/isatty.c b/sysdeps/stub/isatty.c
index ae9510b313..45e9500a28 100644
--- a/sysdeps/stub/isatty.c
+++ b/sysdeps/stub/isatty.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,15 +16,15 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <unistd.h>
/* Return 1 if FD is a terminal, 0 if not. */
int
-DEFUN(__isatty, (fd), int fd)
+__isatty (fd)
+ int fd;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/isfdtype.c b/sysdeps/stub/isfdtype.c
index 560efd83fc..5baf9e52a1 100644
--- a/sysdeps/stub/isfdtype.c
+++ b/sysdeps/stub/isfdtype.c
@@ -17,13 +17,14 @@ 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 <sys/stat.h>
int
isfdtype (int fildes, int fdtype)
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
stub_warning (isfdtype)
diff --git a/sysdeps/stub/kill.c b/sysdeps/stub/kill.c
index b9a8b0e3c2..013b27c368 100644
--- a/sysdeps/stub/kill.c
+++ b/sysdeps/stub/kill.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <signal.h>
@@ -25,9 +24,11 @@ Cambridge, MA 02139, USA. */
send SIG to all processes in the current process's process group.
If PID is < -1, send SIG to all processes in process group - PID. */
int
-DEFUN(__kill, (pid, sig), int pid AND int sig)
+__kill (pid, sig)
+ int pid;
+ int sig;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
stub_warning (kill)
diff --git a/sysdeps/stub/killpg.c b/sysdeps/stub/killpg.c
index 6e8424d4a3..047760b527 100644
--- a/sysdeps/stub/killpg.c
+++ b/sysdeps/stub/killpg.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1993, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1993, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <signal.h>
@@ -25,9 +24,11 @@ Cambridge, MA 02139, USA. */
If PGRP is zero, send SIG to all processes in
the current process's process group. */
int
-DEFUN(killpg, (pgrp, sig), __pid_t pgrp AND int sig)
+killpg (pgrp, sig)
+ __pid_t pgrp;
+ int sig;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/libc-lock.h b/sysdeps/stub/libc-lock.h
index ca2d77c220..58c60e589e 100644
--- a/sysdeps/stub/libc-lock.h
+++ b/sysdeps/stub/libc-lock.h
@@ -25,9 +25,9 @@ Cambridge, MA 02139, USA. */
initialized with __libc_lock_init before it can be used (or define it
with __libc_lock_define_initialized, below). Use `extern' for CLASS to
declare a lock defined in another module. In public structure
- definitions, the lock element must come last, because its storage size
- will not be known outside of libc. (Or you can use a pointer to the
- lock structure; i.e. NAME begins with a `*'.) */
+ definitions you must use a pointer to the lock structure (i.e., NAME
+ begins with a `*'), because its storage size will not be known outside
+ of libc. */
#define __libc_lock_define(CLASS,NAME)
/* Define an initialized lock variable NAME with storage class CLASS. */
diff --git a/sysdeps/stub/link.c b/sysdeps/stub/link.c
index c5ea71374a..643223dc7f 100644
--- a/sysdeps/stub/link.c
+++ b/sysdeps/stub/link.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
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>
@@ -24,15 +23,17 @@ Cambridge, MA 02139, USA. */
/* Make a link to FROM called TO. */
int
-DEFUN(__link, (from, to), CONST char *from AND CONST char *to)
+__link (from, to)
+ const char *from;
+ const char *to;
{
if (from == NULL || to == NULL)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
stub_warning (link)
diff --git a/sysdeps/stub/listen.c b/sysdeps/stub/listen.c
index 6b7d4df938..c042b1ca40 100644
--- a/sysdeps/stub/listen.c
+++ b/sysdeps/stub/listen.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <sys/socket.h>
@@ -24,10 +23,11 @@ Cambridge, MA 02139, USA. */
N connection requests will be queued before further requests are refused.
Returns 0 on success, -1 for errors. */
int
-DEFUN(listen, (fd, n),
- int fd AND unsigned int n)
+listen (fd, n)
+ int fd;
+ unsigned int n;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/lseek.c b/sysdeps/stub/lseek.c
index 6d9c3660fb..e285cb5016 100644
--- a/sysdeps/stub/lseek.c
+++ b/sysdeps/stub/lseek.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,18 +16,20 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <unistd.h>
#include <sys/types.h>
/* Seek to OFFSET on FD, starting from WHENCE. */
off_t
-DEFUN(__lseek, (fd, offset, whence), int fd AND off_t offset AND int whence)
+__lseek (fd, offset, whence)
+ int fd;
+ off_t offset;
+ int whence;
{
if (fd < 0)
{
- errno = EBADF;
+ __set_errno (EBADF);
return -1;
}
switch (whence)
@@ -37,11 +39,11 @@ DEFUN(__lseek, (fd, offset, whence), int fd AND off_t offset AND int whence)
case SEEK_END:
break;
default:
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
stub_warning (lseek)
diff --git a/sysdeps/stub/lxstat.c b/sysdeps/stub/lxstat.c
index 5729925ff3..edbe2fc6d4 100644
--- a/sysdeps/stub/lxstat.c
+++ b/sysdeps/stub/lxstat.c
@@ -27,11 +27,11 @@ __lxstat (int vers, const char *file, struct stat *buf)
{
if (vers != _STAT_VER || file == NULL || buf == NULL)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
stub_warning (__lxstat)
diff --git a/sysdeps/stub/madvise.c b/sysdeps/stub/madvise.c
index e3dbacdfe3..dbe2c7cb38 100644
--- a/sysdeps/stub/madvise.c
+++ b/sysdeps/stub/madvise.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1995, 1996 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
@@ -26,7 +26,7 @@ Cambridge, MA 02139, USA. */
int
madvise (caddr_t addr, size_t len, int advice)
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/mkdir.c b/sysdeps/stub/mkdir.c
index 9822b5f8b8..251ea11520 100644
--- a/sysdeps/stub/mkdir.c
+++ b/sysdeps/stub/mkdir.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
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 <sys/stat.h>
@@ -25,15 +24,17 @@ Cambridge, MA 02139, USA. */
/* Create a directory named PATH with protections MODE. */
int
-DEFUN(__mkdir, (path, mode), CONST char *path AND mode_t mode)
+__mkdir (path, mode)
+ const char *path;
+ mode_t mode;
{
if (path == NULL)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
stub_warning (mkdir)
diff --git a/sysdeps/stub/mkfifo.c b/sysdeps/stub/mkfifo.c
index d8aa88283c..eaf0d2f2c2 100644
--- a/sysdeps/stub/mkfifo.c
+++ b/sysdeps/stub/mkfifo.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
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 <sys/stat.h>
@@ -25,15 +24,17 @@ Cambridge, MA 02139, USA. */
/* Create a named pipe (FIFO) named PATH with protections MODE. */
int
-DEFUN(mkfifo, (path, mode), CONST char *path AND mode_t mode)
+mkfifo (path, mode)
+ const char *path;
+ mode_t mode;
{
if (path == NULL)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/mkstemp.c b/sysdeps/stub/mkstemp.c
index 1adf6c0215..47dd7125b3 100644
--- a/sysdeps/stub/mkstemp.c
+++ b/sysdeps/stub/mkstemp.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <string.h>
#include <errno.h>
@@ -25,15 +24,16 @@ Cambridge, MA 02139, USA. */
they are replaced with a string that makes the filename unique.
Returns a file descriptor open on the file for reading and writing. */
int
-DEFUN(mkstemp, (template), char *template)
+mkstemp (template)
+ char *template;
{
- if (strcmp(&template[strlen(template) - 6], "XXXXXX"))
+ if (strcmp (&template[strlen (template) - 6], "XXXXXX"))
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/mktemp.c b/sysdeps/stub/mktemp.c
index ad660232d7..06fe3de0c4 100644
--- a/sysdeps/stub/mktemp.c
+++ b/sysdeps/stub/mktemp.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <string.h>
#include <errno.h>
@@ -24,15 +23,16 @@ Cambridge, MA 02139, USA. */
The last six characters of TEMPLATE must be "XXXXXX";
they are replaced with a string that makes the filename unique. */
char *
-DEFUN(mktemp, (template), char *template)
+mktemp (template)
+ char *template;
{
- if (strcmp(&template[strlen(template) - 6], "XXXXXX"))
+ if (strcmp (&template[strlen (template) - 6], "XXXXXX"))
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return template;
}
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return NULL;
}
diff --git a/sysdeps/stub/mmap.c b/sysdeps/stub/mmap.c
index e230c9d8a4..f127eae916 100644
--- a/sysdeps/stub/mmap.c
+++ b/sysdeps/stub/mmap.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1995, 1996 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
@@ -32,7 +32,7 @@ Cambridge, MA 02139, USA. */
caddr_t
__mmap (caddr_t addr, size_t len, int prot, int flags, int fd, off_t offset)
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return (caddr_t) -1;
}
diff --git a/sysdeps/stub/morecore.c b/sysdeps/stub/morecore.c
index cb669277b0..cda38cfee9 100644
--- a/sysdeps/stub/morecore.c
+++ b/sysdeps/stub/morecore.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <stddef.h>
#include <errno.h>
@@ -27,9 +26,10 @@ Cambridge, MA 02139, USA. */
and return the start of data space, or NULL on errors.
If INCREMENT is negative, shrink data space. */
__ptr_t
-DEFUN(__default_morecore, (increment), ptrdiff_t increment)
+__default_morecore (increment)
+ ptrdiff_t increment;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return NULL;
}
diff --git a/sysdeps/stub/mprotect.c b/sysdeps/stub/mprotect.c
index 2626e4b4b8..81e54cd776 100644
--- a/sysdeps/stub/mprotect.c
+++ b/sysdeps/stub/mprotect.c
@@ -27,7 +27,7 @@ Cambridge, MA 02139, USA. */
int
__mprotect (caddr_t addr, size_t len, int prot)
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
weak_alias (__mprotect, mprotect)
diff --git a/sysdeps/stub/msgctl.c b/sysdeps/stub/msgctl.c
index 8212f096c1..5c2eea700e 100644
--- a/sysdeps/stub/msgctl.c
+++ b/sysdeps/stub/msgctl.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
@@ -29,7 +29,7 @@ msgctl (msqid, cmd, buf)
int cmd;
struct msqid_ds *buf;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/msgget.c b/sysdeps/stub/msgget.c
index 3ee2b3dacd..343c6d8a8b 100644
--- a/sysdeps/stub/msgget.c
+++ b/sysdeps/stub/msgget.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
@@ -28,7 +28,7 @@ msgget (key, msgflg)
key_t key;
int msgflg;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/msgrcv.c b/sysdeps/stub/msgrcv.c
index 3d5dfc5523..863824946d 100644
--- a/sysdeps/stub/msgrcv.c
+++ b/sysdeps/stub/msgrcv.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
@@ -34,7 +34,7 @@ msgrcv (msqid, msgp, msgsz, msgtyp, msgflg)
long msgtyp;
int msgflg;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/msgsnd.c b/sysdeps/stub/msgsnd.c
index 77d188017d..04df3d9f70 100644
--- a/sysdeps/stub/msgsnd.c
+++ b/sysdeps/stub/msgsnd.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
@@ -33,7 +33,7 @@ msgsnd (msqid, msgp, msgsz, msgflg)
size_t msgsz;
int msgflg;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/msync.c b/sysdeps/stub/msync.c
index a01c474422..21421b73f1 100644
--- a/sysdeps/stub/msync.c
+++ b/sysdeps/stub/msync.c
@@ -27,7 +27,7 @@ Cambridge, MA 02139, USA. */
int
msync (caddr_t addr, size_t len)
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/munmap.c b/sysdeps/stub/munmap.c
index ba61e0f97a..55b674ec22 100644
--- a/sysdeps/stub/munmap.c
+++ b/sysdeps/stub/munmap.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1995, 1996 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
@@ -26,7 +26,7 @@ Cambridge, MA 02139, USA. */
int
__munmap (caddr_t addr, size_t len)
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/nanosleep.c b/sysdeps/stub/nanosleep.c
index 97cdd50da0..0995bb9654 100644
--- a/sysdeps/stub/nanosleep.c
+++ b/sysdeps/stub/nanosleep.c
@@ -24,7 +24,7 @@ Boston, MA 02111-1307, USA. */
int
nanosleep (const struct timespec *requested_time, struct timespec *remaining)
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
stub_warning (nanosleep)
diff --git a/sysdeps/stub/nice.c b/sysdeps/stub/nice.c
index 5c3768a7e5..ae7f88f6a5 100644
--- a/sysdeps/stub/nice.c
+++ b/sysdeps/stub/nice.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995, 1996 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
@@ -16,16 +16,16 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <unistd.h>
/* Increment the scheduling priority of the calling process by INCR.
The superuser may use a negative INCR to decrement the priority. */
int
-DEFUN(nice, (incr), int incr)
+nice (incr)
+ int incr;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/nlist.c b/sysdeps/stub/nlist.c
index 1407033114..3d421d7cb2 100644
--- a/sysdeps/stub/nlist.c
+++ b/sysdeps/stub/nlist.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <nlist.h>
#include <stddef.h>
@@ -25,16 +24,17 @@ Cambridge, MA 02139, USA. */
which is terminated by an element with a NULL `n_un.n_name' member,
and fill in the elements of NL. */
int
-DEFUN(nlist, (file, nl),
- CONST char *file AND struct nlist *nl)
+nlist (file, nl)
+ const char *file;
+ struct nlist *nl;
{
if (nl == NULL)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/open.c b/sysdeps/stub/open.c
index af0d2723f8..08c4b780ef 100644
--- a/sysdeps/stub/open.c
+++ b/sysdeps/stub/open.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <fcntl.h>
#include <stdarg.h>
@@ -25,13 +24,15 @@ Cambridge, MA 02139, USA. */
/* Open FILE with access OFLAG. If OFLAG includes O_CREAT,
a third argument is the file protection. */
int
-DEFUN(__open, (file, oflag), CONST char *file AND int oflag DOTS)
+__open (file, oflag)
+ const char *file;
+ int oflag;
{
int mode;
if (file == NULL)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
@@ -43,7 +44,7 @@ DEFUN(__open, (file, oflag), CONST char *file AND int oflag DOTS)
va_end(arg);
}
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
stub_warning (open)
diff --git a/sysdeps/stub/opendir.c b/sysdeps/stub/opendir.c
index f0d7784d1e..f32a6b04c2 100644
--- a/sysdeps/stub/opendir.c
+++ b/sysdeps/stub/opendir.c
@@ -25,7 +25,7 @@ Cambridge, MA 02139, USA. */
DIR *
__opendir (const char *name)
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return NULL;
}
weak_alias (__opendir, opendir)
diff --git a/sysdeps/stub/pathconf.c b/sysdeps/stub/pathconf.c
index 1a544c3882..92891fd518 100644
--- a/sysdeps/stub/pathconf.c
+++ b/sysdeps/stub/pathconf.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
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>
@@ -24,11 +23,13 @@ Cambridge, MA 02139, USA. */
/* Get file-specific information about PATH. */
long int
-DEFUN(__pathconf, (path, name), CONST char *path AND int name)
+__pathconf (path, name)
+ const char *path;
+ int name;
{
if (path == NULL)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
return __fpathconf (0, name);
diff --git a/sysdeps/stub/pause.c b/sysdeps/stub/pause.c
index b2a7adde76..8a885014bc 100644
--- a/sysdeps/stub/pause.c
+++ b/sysdeps/stub/pause.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1996 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
@@ -26,7 +26,7 @@ Cambridge, MA 02139, USA. */
int
pause ()
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/pipe.c b/sysdeps/stub/pipe.c
index acef99b112..c3ed56b299 100644
--- a/sysdeps/stub/pipe.c
+++ b/sysdeps/stub/pipe.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <unistd.h>
#include <stddef.h>
@@ -26,15 +25,16 @@ Cambridge, MA 02139, USA. */
bytes written on PIPEDES[1] can be read from PIPEDES[0].
Returns 0 if successful, -1 if not. */
int
-DEFUN(__pipe, (__pipedes), int __pipedes[2])
+__pipe (__pipedes)
+ int __pipedes[2];
{
if (__pipedes == NULL)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
stub_warning (pipe)
diff --git a/sysdeps/stub/pipestream.c b/sysdeps/stub/pipestream.c
index afa2c4735d..36f6f1b80f 100644
--- a/sysdeps/stub/pipestream.c
+++ b/sysdeps/stub/pipestream.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1993, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1993, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <stddef.h>
#include <signal.h>
#include <stdio.h>
@@ -26,30 +25,33 @@ Cambridge, MA 02139, USA. */
/* Open a new stream that is a one-way pipe to a
child process running the given shell command. */
FILE *
-DEFUN(popen, (command, mode), CONST char *command AND CONST char *mode)
+popen (command, mode)
+ const char *command;
+ const char *mode;
{
if (command == NULL || mode == NULL || (*mode != 'r' && *mode != 'w'))
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return NULL;
}
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return NULL;
}
/* Close a stream opened by popen and return its status.
Returns -1 if the stream was not opened by popen. */
int
-DEFUN(pclose, (stream), register FILE *stream)
+pclose (stream)
+ register FILE *stream;
{
if (!__validfp (stream) || !stream->__ispipe)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/poll.c b/sysdeps/stub/poll.c
index 40fc2c91c7..9c7a65d2ce 100644
--- a/sysdeps/stub/poll.c
+++ b/sysdeps/stub/poll.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1995, 1996 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
@@ -31,7 +31,7 @@ poll (fds, nfds, timeout)
unsigned long int nfds;
int timeout;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/profil.c b/sysdeps/stub/profil.c
index ab8e1d4ed6..eb5538fd46 100644
--- a/sysdeps/stub/profil.c
+++ b/sysdeps/stub/profil.c
@@ -1,5 +1,5 @@
/* Low-level statistical profiling support function. Stub version.
-Copyright (C) 1995 Free Software Foundation, Inc.
+Copyright (C) 1995, 1996 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
@@ -34,7 +34,7 @@ profil (u_short *sample_buffer, size_t size, size_t offset, u_int scale)
/* Disable profiling. */
return 0;
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
stub_warning (profil)
diff --git a/sysdeps/stub/ptrace.c b/sysdeps/stub/ptrace.c
index 31fbbb1b05..d3a2d57a2f 100644
--- a/sysdeps/stub/ptrace.c
+++ b/sysdeps/stub/ptrace.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1993, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 92, 93, 95, 96 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <sys/ptrace.h>
#include <sys/types.h>
@@ -32,11 +31,12 @@ Cambridge, MA 02139, USA. */
pid_t PID, void *ADDR, int DATA, void *ADDR2
after PID. */
int
-DEFUN(ptrace, (request), enum __ptrace_request request DOTS)
+ptrace (request)
+ enum __ptrace_request request;
{
pid_t pid;
- PTR addr;
- PTR addr2;
+ void *addr;
+ void *addr2;
int data;
va_list ap;
@@ -63,7 +63,7 @@ DEFUN(ptrace, (request), enum __ptrace_request request DOTS)
case PTRACE_SETFPAREGS:
va_start(ap, request);
pid = va_arg(ap, pid_t);
- addr = va_arg(ap, PTR);
+ addr = va_arg(ap, void *);
va_end(ap);
break;
@@ -72,7 +72,7 @@ DEFUN(ptrace, (request), enum __ptrace_request request DOTS)
case PTRACE_POKEUSER:
va_start(ap, request);
pid = va_arg(ap, pid_t);
- addr = va_arg(ap, PTR);
+ addr = va_arg(ap, void *);
data = va_arg(ap, int);
va_end(ap);
break;
@@ -83,18 +83,18 @@ DEFUN(ptrace, (request), enum __ptrace_request request DOTS)
case PTRACE_WRITETEXT:
va_start(ap, request);
pid = va_arg(ap, pid_t);
- addr = va_arg(ap, PTR);
+ addr = va_arg(ap, void *);
data = va_arg(ap, int);
- addr2 = va_arg(ap, PTR);
+ addr2 = va_arg(ap, void *);
va_end(ap);
break;
default:
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/putenv.c b/sysdeps/stub/putenv.c
index 3d845d8eaa..d50b4a5b2d 100644
--- a/sysdeps/stub/putenv.c
+++ b/sysdeps/stub/putenv.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,16 +16,16 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <stdlib.h>
/* Put STRING, which is of the form "NAME=VALUE", in the environment.
If there is no `=', remove NAME from the environment. */
int
-DEFUN(putenv, (string), CONST char *string)
+putenv (string)
+ const char *string;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/raise.c b/sysdeps/stub/raise.c
index ea89874f92..cac49df7de 100644
--- a/sysdeps/stub/raise.c
+++ b/sysdeps/stub/raise.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,15 +16,15 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <signal.h>
#include <errno.h>
/* Raise the signal SIG. */
int
-DEFUN(raise, (sig), int sig)
+raise (sig)
+ int sig;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/read.c b/sysdeps/stub/read.c
index 014313216b..724f8f8578 100644
--- a/sysdeps/stub/read.c
+++ b/sysdeps/stub/read.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,32 +16,31 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <unistd.h>
#include <stddef.h>
/* Read NBYTES into BUF from FD. Return the number read or -1. */
ssize_t
-DEFUN(__read, (fd, buf, nbytes),
- int fd AND PTR buf AND size_t nbytes)
+__libc_read (int fd, void *buf, size_t nbytes)
{
if (nbytes == 0)
return 0;
if (fd < 0)
{
- errno = EBADF;
+ __set_errno (EBADF);
return -1;
}
if (buf == NULL)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
stub_warning (read)
-weak_alias (__read, read)
+weak_alias (__libc_read, __read)
+weak_alias (__libc_read, read)
diff --git a/sysdeps/stub/readdir.c b/sysdeps/stub/readdir.c
index d210906dbd..1555706d0e 100644
--- a/sysdeps/stub/readdir.c
+++ b/sysdeps/stub/readdir.c
@@ -24,7 +24,7 @@ Cambridge, MA 02139, USA. */
struct dirent *
__readdir (DIR *dirp)
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return NULL;
}
weak_alias (__readdir, readdir)
diff --git a/sysdeps/stub/readlink.c b/sysdeps/stub/readlink.c
index b640a8db0f..99c852569d 100644
--- a/sysdeps/stub/readlink.c
+++ b/sysdeps/stub/readlink.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <unistd.h>
@@ -24,10 +23,12 @@ Cambridge, MA 02139, USA. */
LEN bytes of BUF. The contents are not null-terminated.
Returns the number of characters read, or -1 for errors. */
int
-DEFUN(__readlink, (path, buf, len),
- CONST char *path AND char *buf AND size_t len)
+__readlink (path, buf, len)
+ const char *path;
+ char *buf;
+ size_t len;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
stub_warning (readlink)
diff --git a/sysdeps/stub/readv.c b/sysdeps/stub/readv.c
index 03d6bf9613..b537499b07 100644
--- a/sysdeps/stub/readv.c
+++ b/sysdeps/stub/readv.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <unistd.h>
#include <sys/uio.h>
@@ -27,10 +26,12 @@ Cambridge, MA 02139, USA. */
Operates just like `read' (see <unistd.h>) except that data are
put in VECTOR instead of a contiguous buffer. */
int
-DEFUN(readv, (fd, vector, count),
- int fd AND CONST struct iovec *vector AND size_t count)
+readv (fd, vector, count)
+ int fd;
+ const struct iovec *vector;
+ size_t count;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/reboot.c b/sysdeps/stub/reboot.c
index 5cc05eb5cb..8db83af97a 100644
--- a/sysdeps/stub/reboot.c
+++ b/sysdeps/stub/reboot.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995, 1996 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
@@ -16,15 +16,15 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <unistd.h>
/* Reboot the system. */
int
-DEFUN(reboot, (howto), int howto)
+reboot (howto)
+ int howto;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/recv.c b/sysdeps/stub/recv.c
index 21c9cfa1b2..e09ef4fba1 100644
--- a/sysdeps/stub/recv.c
+++ b/sysdeps/stub/recv.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,17 +16,19 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <sys/socket.h>
/* Read N bytes into BUF from socket FD.
Returns the number read or -1 for errors. */
int
-DEFUN(recv, (fd, buf, n, flags),
- int fd AND PTR buf AND size_t n AND int flags)
+recv (fd, buf, n, flags)
+ int fd;
+ void *buf;
+ size_t n;
+ int flags;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/recvfrom.c b/sysdeps/stub/recvfrom.c
index aca6d23791..47973ed896 100644
--- a/sysdeps/stub/recvfrom.c
+++ b/sysdeps/stub/recvfrom.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <sys/socket.h>
@@ -24,11 +23,15 @@ Cambridge, MA 02139, USA. */
at address ADDR (which is ADDR_LEN bytes long).
Returns the number read or -1 for errors. */
int
-DEFUN(recvfrom, (fd, buf, n, flags, addr, addr_len),
- int fd AND PTR buf AND size_t n AND int flags AND
- struct sockaddr *addr AND size_t *addr_len)
+recvfrom (fd, buf, n, flags, addr, addr_len)
+ int fd;
+ void *buf;
+ size_t n;
+ int flags;
+ struct sockaddr *addr;
+ size_t *addr_len;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/recvmsg.c b/sysdeps/stub/recvmsg.c
index eecff02084..27f463ca41 100644
--- a/sysdeps/stub/recvmsg.c
+++ b/sysdeps/stub/recvmsg.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,17 +16,18 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <sys/socket.h>
/* Receive a message as described by MESSAGE from socket FD.
Returns the number of bytes read or -1 for errors. */
int
-DEFUN(recvmsg, (fd, message, flags),
- int fd AND struct msghdr *message AND int flags)
+recvmsg (fd, message, flags)
+ int fd;
+ struct msghdr *message;
+ int flags;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/remove.c b/sysdeps/stub/remove.c
index c044e0aac0..a8a4d3cb36 100644
--- a/sysdeps/stub/remove.c
+++ b/sysdeps/stub/remove.c
@@ -1,5 +1,5 @@
/* ANSI C `remove' function to delete a file or directory. Stub version.
-Copyright (C) 1995 Free Software Foundation, Inc.
+Copyright (C) 1995, 1996 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
@@ -24,7 +24,7 @@ int
remove (file)
const char *file;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/rename.c b/sysdeps/stub/rename.c
index e880d7908b..b0a8521c86 100644
--- a/sysdeps/stub/rename.c
+++ b/sysdeps/stub/rename.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,23 +16,24 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <stdio.h>
#include <errno.h>
/* Rename the file OLD to NEW. */
int
-DEFUN(rename, (old, new), CONST char *old AND CONST char *new)
+rename (old, new)
+ const char *old;
+ const char *new;
{
if (old == NULL || new == NULL)
{
- errno = EINVAL;
- return(-1);
+ __set_errno (EINVAL);
+ return -1;
}
- errno = ENOSYS;
- return(-1);
+ __set_errno (ENOSYS);
+ return -1;
}
diff --git a/sysdeps/stub/revoke.c b/sysdeps/stub/revoke.c
index 295dc2bb5e..94107ef89a 100644
--- a/sysdeps/stub/revoke.c
+++ b/sysdeps/stub/revoke.c
@@ -1,5 +1,5 @@
/* Revoke the access of all descriptors currently open on a file.
-Copyright (C) 1995 Free Software Foundation, Inc.
+Copyright (C) 1995, 1996 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
@@ -24,7 +24,7 @@ int
revoke (file)
const char *file;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
stub_warning (revoke)
diff --git a/sysdeps/stub/rewinddir.c b/sysdeps/stub/rewinddir.c
index d4f0ce9fa0..1ad85c4cac 100644
--- a/sysdeps/stub/rewinddir.c
+++ b/sysdeps/stub/rewinddir.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
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 <dirent.h>
@@ -24,9 +23,10 @@ Cambridge, MA 02139, USA. */
/* Rewind DIRP to the beginning of the directory. */
void
-DEFUN(rewinddir, (dirp), DIR *dirp)
+rewinddir (dirp)
+ DIR *dirp;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
/* No way to indicate failure. */
}
diff --git a/sysdeps/stub/rmdir.c b/sysdeps/stub/rmdir.c
index 828a261a13..7e54ee42be 100644
--- a/sysdeps/stub/rmdir.c
+++ b/sysdeps/stub/rmdir.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
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>
@@ -24,15 +23,16 @@ Cambridge, MA 02139, USA. */
/* Remove the directory PATH. */
int
-DEFUN(__rmdir, (path), CONST char *path)
+__rmdir (path)
+ const char *path;
{
if (path == NULL)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
stub_warning (rmdir)
diff --git a/sysdeps/stub/sbrk.c b/sysdeps/stub/sbrk.c
index 46d9ecde60..0e9d07dc1a 100644
--- a/sysdeps/stub/sbrk.c
+++ b/sysdeps/stub/sbrk.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,17 +16,17 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
/* Extend the process's data space by INCREMENT.
If INCREMENT is negative, shrink data space by - INCREMENT.
Return the address of the start of data space, or -1 for errors. */
-PTR
-DEFUN(__sbrk, (increment), int increment)
+void *
+__sbrk (increment)
+ int increment;
{
- errno = ENOSYS;
- return (PTR) -1;
+ __set_errno (ENOSYS);
+ return (void *) -1;
}
stub_warning (sbrk)
diff --git a/sysdeps/stub/sched_getp.c b/sysdeps/stub/sched_getp.c
index 0da92bcd2c..e908638b5e 100644
--- a/sysdeps/stub/sched_getp.c
+++ b/sysdeps/stub/sched_getp.c
@@ -25,7 +25,7 @@ Boston, MA 02111-1307, USA. */
int
__sched_getparam (pid_t pid, struct sched_param *param)
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
stub_warning (sched_getparam)
diff --git a/sysdeps/stub/sched_gets.c b/sysdeps/stub/sched_gets.c
index bb64838908..9fe4921d53 100644
--- a/sysdeps/stub/sched_gets.c
+++ b/sysdeps/stub/sched_gets.c
@@ -25,7 +25,7 @@ Boston, MA 02111-1307, USA. */
int
__sched_getscheduler (pid_t pid)
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
stub_warning (sched_getscheduler)
diff --git a/sysdeps/stub/sched_primax.c b/sysdeps/stub/sched_primax.c
index 7ff5af3731..cf76994cf5 100644
--- a/sysdeps/stub/sched_primax.c
+++ b/sysdeps/stub/sched_primax.c
@@ -24,7 +24,7 @@ Boston, MA 02111-1307, USA. */
int
__sched_get_priority_max (int algorithm)
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
stub_warning (sched_get_priority_max)
diff --git a/sysdeps/stub/sched_primin.c b/sysdeps/stub/sched_primin.c
index 370f10c91c..2f79194a23 100644
--- a/sysdeps/stub/sched_primin.c
+++ b/sysdeps/stub/sched_primin.c
@@ -24,7 +24,7 @@ Boston, MA 02111-1307, USA. */
int
__sched_get_priority_min (int algorithm)
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
stub_warning (sched_get_priority_min)
diff --git a/sysdeps/stub/sched_rr_gi.c b/sysdeps/stub/sched_rr_gi.c
index b818561287..f23aacbda4 100644
--- a/sysdeps/stub/sched_rr_gi.c
+++ b/sysdeps/stub/sched_rr_gi.c
@@ -25,7 +25,7 @@ Boston, MA 02111-1307, USA. */
int
__sched_rr_get_interval (pid_t pid, struct timespec *t)
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
stub_warning (sched_rr_get_interval)
diff --git a/sysdeps/stub/sched_setp.c b/sysdeps/stub/sched_setp.c
index 513c717b03..c29bcc7149 100644
--- a/sysdeps/stub/sched_setp.c
+++ b/sysdeps/stub/sched_setp.c
@@ -25,7 +25,7 @@ Boston, MA 02111-1307, USA. */
int
__sched_setparam (pid_t pid, const struct sched_param *param)
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
stub_warning (sched_setparam)
diff --git a/sysdeps/stub/sched_sets.c b/sysdeps/stub/sched_sets.c
index 98008e6138..b845c2e864 100644
--- a/sysdeps/stub/sched_sets.c
+++ b/sysdeps/stub/sched_sets.c
@@ -25,7 +25,7 @@ Boston, MA 02111-1307, USA. */
int
__sched_setscheduler (pid_t pid, int policy, const struct sched_param *param)
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
stub_warning (sched_setscheduler)
diff --git a/sysdeps/stub/sched_yield.c b/sysdeps/stub/sched_yield.c
index 244ac15e1b..6c37285fbb 100644
--- a/sysdeps/stub/sched_yield.c
+++ b/sysdeps/stub/sched_yield.c
@@ -24,7 +24,7 @@ Boston, MA 02111-1307, USA. */
int
__sched_yield (void)
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
stub_warning (sched_yield)
diff --git a/sysdeps/stub/seekdir.c b/sysdeps/stub/seekdir.c
index 449aa62e1e..fe40c8b51d 100644
--- a/sysdeps/stub/seekdir.c
+++ b/sysdeps/stub/seekdir.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <sys/types.h>
#include <errno.h>
#include <stddef.h>
@@ -24,15 +23,17 @@ Cambridge, MA 02139, USA. */
/* Seek to position POS in DIRP. */
void
-DEFUN(seekdir, (dirp, pos), DIR *dirp AND off_t pos)
+seekdir (dirp, pos)
+ DIR *dirp
+ off_t pos;
{
if (dirp == NULL)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return;
}
- errno = ENOSYS;
+ __set_errno (ENOSYS);
}
diff --git a/sysdeps/stub/select.c b/sysdeps/stub/select.c
index 837f0adab4..1c5e12fc75 100644
--- a/sysdeps/stub/select.c
+++ b/sysdeps/stub/select.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <sys/time.h>
#include <sys/types.h>
#include <errno.h>
@@ -27,11 +26,14 @@ Cambridge, MA 02139, USA. */
after waiting the interval specified therein. Returns the number of ready
descriptors, or -1 for errors. */
int
-DEFUN(__select, (nfds, readfds, writefds, exceptfds, timeout),
- int nfds AND fd_set *readfds AND fd_set *writefds AND
- fd_set *exceptfds AND struct timeval *timeout)
+__select (nfds, readfds, writefds, exceptfds, timeout)
+ int nfds;
+ fd_set *readfds;
+ fd_set *writefds;
+ fd_set *exceptfds;
+ struct timeval *timeout;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
stub_warning (select)
diff --git a/sysdeps/stub/semctl.c b/sysdeps/stub/semctl.c
index 8f2fe99400..cf44af8456 100644
--- a/sysdeps/stub/semctl.c
+++ b/sysdeps/stub/semctl.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
@@ -30,7 +30,7 @@ semctl (semid, semnum, cmd, arg)
int cmd;
union semun arg;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/semget.c b/sysdeps/stub/semget.c
index 3ccf2717d4..327bc8e19d 100644
--- a/sysdeps/stub/semget.c
+++ b/sysdeps/stub/semget.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
@@ -29,7 +29,7 @@ semget (key, nsems, semflg)
int nsems;
int semflg;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/semop.c b/sysdeps/stub/semop.c
index 2bba8628e6..29bf159fee 100644
--- a/sysdeps/stub/semop.c
+++ b/sysdeps/stub/semop.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
@@ -28,7 +28,7 @@ semop (semid, sops, nsops)
struct sembuf *sops;
unsigned int nsops;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/send.c b/sysdeps/stub/send.c
index 3832185b9e..e921fd74bd 100644
--- a/sysdeps/stub/send.c
+++ b/sysdeps/stub/send.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,16 +16,18 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <sys/socket.h>
/* Send N bytes of BUF to socket FD. Returns the number sent or -1. */
int
-DEFUN(send, (fd, buf, n, flags),
- int fd AND PTR buf AND size_t n AND int flags)
+send (fd, buf, n, flags)
+ int fd;
+ void *buf;
+ size_t n;
+ int flags;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/sendmsg.c b/sysdeps/stub/sendmsg.c
index 2066e52168..12d1698985 100644
--- a/sysdeps/stub/sendmsg.c
+++ b/sysdeps/stub/sendmsg.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,17 +16,18 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <sys/socket.h>
/* Send a message described MESSAGE on socket FD.
Returns the number of bytes sent, or -1 for errors. */
int
-DEFUN(sendmsg, (fd, message, flags),
- int fd AND CONST struct msghdr *message AND int flags)
+sendmsg (fd, message, flags)
+ int fd;
+ const struct msghdr *message;
+ int flags;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/sendto.c b/sysdeps/stub/sendto.c
index e26c88751c..26353919a1 100644
--- a/sysdeps/stub/sendto.c
+++ b/sysdeps/stub/sendto.c
@@ -16,18 +16,21 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <sys/socket.h>
/* Send N bytes of BUF on socket FD to peer at address ADDR (which is
ADDR_LEN bytes long). Returns the number sent, or -1 for errors. */
int
-DEFUN(sendto, (fd, buf, n, flags, addr, addr_len),
- int fd AND PTR buf AND size_t n AND int flags AND
- const struct sockaddr *addr AND size_t addr_len)
+sendto (fd, buf, n, flags, addr, addr_len)
+ int fd;
+ void *buf;
+ size_t n;
+ int flags;
+ const struct sockaddr *addr;
+ size_t addr_len;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/setdomain.c b/sysdeps/stub/setdomain.c
index 052b45b9bc..891141b481 100644
--- a/sysdeps/stub/setdomain.c
+++ b/sysdeps/stub/setdomain.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1995, 1996 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
@@ -16,17 +16,17 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <unistd.h>
/* Set the name of the current YP domain to NAME, which is LEN bytes long.
This call is restricted to the super-user. */
int
-DEFUN(setdomainname, (name, len),
- __const char *name AND size_t len)
+setdomainname (name, len)
+ const char *name;
+ size_t len;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/setegid.c b/sysdeps/stub/setegid.c
index 3429c67911..573eb63ef6 100644
--- a/sysdeps/stub/setegid.c
+++ b/sysdeps/stub/setegid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1994, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1994, 1995, 1996 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
@@ -16,15 +16,15 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <unistd.h>
/* Set the effective group ID of the calling process to GID. */
int
-DEFUN(setegid, (gid), __gid_t gid)
+setegid (gid)
+ __gid_t gid;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/setenv.c b/sysdeps/stub/setenv.c
index 998c055f50..f318475718 100644
--- a/sysdeps/stub/setenv.c
+++ b/sysdeps/stub/setenv.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995, 1996 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
@@ -16,15 +16,16 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <stdlib.h>
#include <errno.h>
int
-DEFUN(setenv, (name, value, replace),
- CONST char *name AND CONST char *value AND int replace)
+setenv (name, value, replace)
+ const char *name;
+ const char *value;
+ int replace;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/seteuid.c b/sysdeps/stub/seteuid.c
index e86e9a5898..53b318ec57 100644
--- a/sysdeps/stub/seteuid.c
+++ b/sysdeps/stub/seteuid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995, 1996 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
@@ -16,15 +16,15 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <unistd.h>
/* Set the effective user ID of the calling process to UID. */
int
-DEFUN(seteuid, (uid), __uid_t uid)
+seteuid (uid)
+ __uid_t uid;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/setgid.c b/sysdeps/stub/setgid.c
index df1adbbac7..a51eb48e2d 100644
--- a/sysdeps/stub/setgid.c
+++ b/sysdeps/stub/setgid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1993, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1993, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <unistd.h>
#include <sys/types.h>
@@ -26,9 +25,10 @@ Cambridge, MA 02139, USA. */
and effective group IDs, and the saved set-group-ID to GID;
if not, the effective group ID is set to GID. */
int
-DEFUN(__setgid, (gid), gid_t gid)
+__setgid (gid)
+ gid_t gid;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
stub_warning (setgid)
diff --git a/sysdeps/stub/setgroups.c b/sysdeps/stub/setgroups.c
index c5955a014e..0fa96315cd 100644
--- a/sysdeps/stub/setgroups.c
+++ b/sysdeps/stub/setgroups.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,16 +16,17 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <sys/types.h>
#include <grp.h>
/* Set the group set for the current user to GROUPS (N of them). */
int
-DEFUN(setgroups, (n, groups), size_t n AND CONST gid_t *groups)
+setgroups (n, groups)
+ size_t n;
+ const gid_t *groups;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/sethostid.c b/sysdeps/stub/sethostid.c
index d12b93bc6d..30f24eea20 100644
--- a/sysdeps/stub/sethostid.c
+++ b/sysdeps/stub/sethostid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,16 +16,16 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <unistd.h>
/* Set the current machine's Internet number to ID.
This call is restricted to the super-user. */
int
-DEFUN(sethostid, (id), long int id)
+sethostid (id)
+ long int id;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/sethostname.c b/sysdeps/stub/sethostname.c
index 81fa5fb742..aeb678910d 100644
--- a/sysdeps/stub/sethostname.c
+++ b/sysdeps/stub/sethostname.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,17 +16,17 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <unistd.h>
/* Set the name of the current host to NAME, which is LEN bytes long.
This call is restricted to the super-user. */
int
-DEFUN(sethostname, (name, len),
- CONST char *name AND size_t len)
+sethostname (name, len)
+ const char *name;
+ size_t len;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/setitimer.c b/sysdeps/stub/setitimer.c
index 6ba7031184..737257fa7f 100644
--- a/sysdeps/stub/setitimer.c
+++ b/sysdeps/stub/setitimer.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1994, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1994, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <stddef.h>
#include <errno.h>
#include <sys/time.h>
@@ -25,17 +24,18 @@ Cambridge, MA 02139, USA. */
set *OLD to the old value of timer WHICH.
Returns 0 on success, -1 on errors. */
int
-DEFUN(__setitimer, (which, new, old),
- enum __itimer_which which AND
- struct itimerval *new AND struct itimerval *old)
+__setitimer (which, new, old)
+ enum __itimer_which which;
+ struct itimerval *new;
+ struct itimerval *old;
{
if (new == NULL)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
stub_warning (setitimer)
diff --git a/sysdeps/stub/setjmp.c b/sysdeps/stub/setjmp.c
index 01f58121d5..b38b0bd984 100644
--- a/sysdeps/stub/setjmp.c
+++ b/sysdeps/stub/setjmp.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1994, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1994, 1995, 1996 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
@@ -27,7 +27,7 @@ __sigsetjmp (jmp_buf env, int savemask)
/* Save the signal mask if requested. */
__sigjmp_save (env, savemask);
- errno = ENOSYS;
+ __set_errno (ENOSYS);
/* No way to signal failure. */
return 0;
}
diff --git a/sysdeps/stub/setlogin.c b/sysdeps/stub/setlogin.c
index a406bc54d8..30e7b54bbb 100644
--- a/sysdeps/stub/setlogin.c
+++ b/sysdeps/stub/setlogin.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,15 +16,15 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <unistd.h>
/* Set the login name returned by `getlogin'. */
int
-DEFUN(setlogin, (name), CONST char *name)
+setlogin (name)
+ const char *name;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/setpgid.c b/sysdeps/stub/setpgid.c
index c694215067..6527a3e0bb 100644
--- a/sysdeps/stub/setpgid.c
+++ b/sysdeps/stub/setpgid.c
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <unistd.h>
@@ -24,9 +23,11 @@ Cambridge, MA 02139, USA. */
If PID is zero, the current process's process group ID is set.
If PGID is zero, the process ID of the process is used. */
int
-DEFUN(__setpgid, (pid, pgid), int pid AND int pgid)
+__setpgid (pid, pgid)
+ int pid;
+ int pgid;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
stub_warning (setpgid)
diff --git a/sysdeps/stub/setpriority.c b/sysdeps/stub/setpriority.c
index 255306e142..382a6cad20 100644
--- a/sysdeps/stub/setpriority.c
+++ b/sysdeps/stub/setpriority.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,17 +16,18 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <sys/resource.h>
/* Set the priority of all processes specified by WHICH and WHO
to PRIO. Returns 0 on success, -1 on errors. */
int
-DEFUN(setpriority, (which, who, prio),
- enum __priority_which which AND int who AND int prio)
+setpriority (which, who, prio)
+ enum __priority_which which;
+ int who;
+ int prio;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/setregid.c b/sysdeps/stub/setregid.c
index 017dd08692..0b31afd8be 100644
--- a/sysdeps/stub/setregid.c
+++ b/sysdeps/stub/setregid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <unistd.h>
#include <sys/types.h>
@@ -24,10 +23,11 @@ Cambridge, MA 02139, USA. */
/* Set the real group ID of the calling process to RGID,
and the effective group ID of the calling process to EGID. */
int
-DEFUN(__setregid, (effective_gid, real_gid),
- gid_t effective_gid AND gid_t real_gid)
+__setregid (effective_gid, real_gid)
+ gid_t effective_gid;
+ gid_t real_gid;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
stub_warning (setregid)
diff --git a/sysdeps/stub/setreuid.c b/sysdeps/stub/setreuid.c
index 7640d2f674..b6f9399bc3 100644
--- a/sysdeps/stub/setreuid.c
+++ b/sysdeps/stub/setreuid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <unistd.h>
#include <sys/types.h>
@@ -24,10 +23,11 @@ Cambridge, MA 02139, USA. */
/* Set the real user ID of the calling process to RUID,
and the effective user ID of the calling process to EUID. */
int
-DEFUN(__setreuid, (effective_uid, real_uid),
- uid_t effective_uid AND uid_t real_uid)
+__setreuid (effective_uid, real_uid)
+ uid_t effective_uid;
+ uid_t real_uid;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
stub_warning (setreuid)
diff --git a/sysdeps/stub/setrlimit.c b/sysdeps/stub/setrlimit.c
index 2affcc76b8..79b96235b7 100644
--- a/sysdeps/stub/setrlimit.c
+++ b/sysdeps/stub/setrlimit.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <sys/resource.h>
#include <errno.h>
@@ -24,8 +23,9 @@ Cambridge, MA 02139, USA. */
Only the super-user can increase hard limits.
Return 0 if successful, -1 if not (and sets errno). */
int
-DEFUN(setrlimit, (resource, rlimits),
- enum __rlimit_resource resource AND struct rlimit *rlimits)
+setrlimit (resource, rlimits)
+ enum __rlimit_resource resource;
+ struct rlimit *rlimits;
{
errno = ENOSYS;
return -1;
diff --git a/sysdeps/stub/setsid.c b/sysdeps/stub/setsid.c
index 9baf1ee4ef..3f0bb3a57b 100644
--- a/sysdeps/stub/setsid.c
+++ b/sysdeps/stub/setsid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <unistd.h>
@@ -25,9 +24,9 @@ Cambridge, MA 02139, USA. */
The process group IDs of the session and the calling process
are set to the process ID of the calling process, which is returned. */
int
-DEFUN_VOID(__setsid)
+__setsid ()
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
stub_warning (setsid)
diff --git a/sysdeps/stub/setsockopt.c b/sysdeps/stub/setsockopt.c
index c1933afe38..546ca4b0c0 100644
--- a/sysdeps/stub/setsockopt.c
+++ b/sysdeps/stub/setsockopt.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <sys/socket.h>
@@ -24,11 +23,14 @@ Cambridge, MA 02139, USA. */
to *OPTVAL (which is OPTLEN bytes long).
Returns 0 on success, -1 for errors. */
int
-DEFUN(setsockopt, (fd, level, optname, optval, optlen),
- int fd AND int level AND int optname AND
- PTR optval AND size_t optlen)
+setsockopt (fd, level, optname, optval, optlen)
+ int fd;
+ int level;
+ int optname;
+ void *optval;
+ size_t optlen;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/settimeofday.c b/sysdeps/stub/settimeofday.c
index 7d654cde57..7b94e88e47 100644
--- a/sysdeps/stub/settimeofday.c
+++ b/sysdeps/stub/settimeofday.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,17 +16,17 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <sys/time.h>
/* Set the current time of day and timezone information.
This call is restricted to the super-user. */
int
-DEFUN(__settimeofday, (tv, tz),
- CONST struct timeval *tv AND CONST struct timezone *tz)
+__settimeofday (tv, tz)
+ const struct timeval *tv;
+ const struct timezone *tz;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
stub_warning (settimeofday)
diff --git a/sysdeps/stub/setuid.c b/sysdeps/stub/setuid.c
index 3415925967..122888619b 100644
--- a/sysdeps/stub/setuid.c
+++ b/sysdeps/stub/setuid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1993, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1993, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <unistd.h>
#include <sys/types.h>
@@ -26,9 +25,10 @@ Cambridge, MA 02139, USA. */
and effective user IDs, and the saved set-user-ID to UID;
if not, the effective user ID is set to UID. */
int
-DEFUN(__setuid, (uid), uid_t uid)
+__setuid (uid)
+ uid_t uid;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
stub_warning (setuid)
diff --git a/sysdeps/stub/shmat.c b/sysdeps/stub/shmat.c
index 099f2279d2..9d5629b06c 100644
--- a/sysdeps/stub/shmat.c
+++ b/sysdeps/stub/shmat.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
@@ -30,7 +30,7 @@ shmat (shmid, shmaddr, shmflg)
char *shmaddr;
int shmflg;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return (char *) -1;
}
diff --git a/sysdeps/stub/shmctl.c b/sysdeps/stub/shmctl.c
index 75a4613166..a3b37076ff 100644
--- a/sysdeps/stub/shmctl.c
+++ b/sysdeps/stub/shmctl.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
@@ -28,7 +28,7 @@ shmctl (shmid, cmd, buf)
int cmd;
struct shmid_ds *buf;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/shmdt.c b/sysdeps/stub/shmdt.c
index 8affa6c15a..8cca7743b6 100644
--- a/sysdeps/stub/shmdt.c
+++ b/sysdeps/stub/shmdt.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
@@ -27,7 +27,7 @@ int
shmdt (shmaddr)
char *shmaddr;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/shmget.c b/sysdeps/stub/shmget.c
index d59ff90c99..63c5443701 100644
--- a/sysdeps/stub/shmget.c
+++ b/sysdeps/stub/shmget.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
@@ -29,7 +29,7 @@ shmget (key, size, shmflg)
int size;
int shmflg;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/shutdown.c b/sysdeps/stub/shutdown.c
index 501d532184..cce3dd702b 100644
--- a/sysdeps/stub/shutdown.c
+++ b/sysdeps/stub/shutdown.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <sys/socket.h>
@@ -27,10 +26,11 @@ Cambridge, MA 02139, USA. */
2 = No more receptions or transmissions.
Returns 0 on success, -1 for errors. */
int
-DEFUN(shutdown, (fd, how),
- int fd AND int how)
+shutdown (fd, how)
+ int fd;
+ int how;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/sigaction.c b/sysdeps/stub/sigaction.c
index 7321140acd..1344d45044 100644
--- a/sysdeps/stub/sigaction.c
+++ b/sysdeps/stub/sigaction.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <signal.h>
@@ -24,17 +23,19 @@ Cambridge, MA 02139, USA. */
/* If ACT is not NULL, change the action for SIG to *ACT.
If OACT is not NULL, put the old action for SIG in *OACT. */
int
-DEFUN(__sigaction, (sig, act, oact),
- int sig AND CONST struct sigaction *act AND struct sigaction *OACT)
+__sigaction (sig, act, oact)
+ int sig;
+ const struct sigaction *act;
+ struct sigaction *OACT;
{
if (sig <= 0 || sig >= NSIG)
{
- errno = EINVAL;
- return(-1);
+ __set_errno (EINVAL);
+ return -1;
}
- errno = ENOSYS;
- return(-1);
+ __set_errno (ENOSYS);
+ return -1;
}
stub_warning (sigaction)
diff --git a/sysdeps/stub/sigaltstack.c b/sysdeps/stub/sigaltstack.c
index 01a547c2a5..f348a5372b 100644
--- a/sysdeps/stub/sigaltstack.c
+++ b/sysdeps/stub/sigaltstack.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995, 1996 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
@@ -16,17 +16,17 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <signal.h>
/* Run signals handlers on the stack specified by SS (if not NULL).
If OSS is not NULL, it is filled in with the old signal stack status. */
int
-DEFUN(sigaltstack, (ss, oss),
- CONST struct sigaltstack *ss AND struct sigaltstack *oss)
+sigaltstack (ss, oss)
+ const struct sigaltstack *ss;
+ struct sigaltstack *oss;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/sigblock.c b/sysdeps/stub/sigblock.c
index 7c7469eee7..320027f89c 100644
--- a/sysdeps/stub/sigblock.c
+++ b/sysdeps/stub/sigblock.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,15 +16,15 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <signal.h>
/* Block signals in MASK, returning the old mask. */
int
-DEFUN(__sigblock, (mask), int mask)
+__sigblock (mask)
+ int mask;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
stub_warning (sigblock)
diff --git a/sysdeps/stub/sigintr.c b/sysdeps/stub/sigintr.c
index a15b2c11b4..f98f98803a 100644
--- a/sysdeps/stub/sigintr.c
+++ b/sysdeps/stub/sigintr.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <signal.h>
@@ -24,10 +23,11 @@ Cambridge, MA 02139, USA. */
(causing them to fail with EINTR); if INTERRUPT is zero, make system
calls be restarted after signal SIG. */
int
-DEFUN(siginterrupt, (sig, interrupt),
- int sig AND int interrupt)
+siginterrupt (sig, interrupt)
+ int sig;
+ int interrupt;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/signal.c b/sysdeps/stub/signal.c
index 2bd9b4217f..6ee587acb3 100644
--- a/sysdeps/stub/signal.c
+++ b/sysdeps/stub/signal.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <signal.h>
@@ -24,9 +23,11 @@ Cambridge, MA 02139, USA. */
/* Set the handler for the signal SIG to HANDLER,
returning the old handler, or SIG_ERR on error. */
__sighandler_t
-DEFUN(signal, (sig, handler), int sig AND __sighandler_t handler)
+signal (sig, handler)
+ int sig;
+ __sighandler_t handler;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return SIG_ERR;
}
diff --git a/sysdeps/stub/sigpause.c b/sysdeps/stub/sigpause.c
index a307422d06..54d23ee262 100644
--- a/sysdeps/stub/sigpause.c
+++ b/sysdeps/stub/sigpause.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,14 +16,14 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <signal.h>
int
-DEFUN(__sigpause, (mask), int mask)
+__sigpause (mask)
+ int mask;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
stub_warning (sigpause)
diff --git a/sysdeps/stub/sigpending.c b/sysdeps/stub/sigpending.c
index def44ed1a1..81096db731 100644
--- a/sysdeps/stub/sigpending.c
+++ b/sysdeps/stub/sigpending.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
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 <signal.h>
@@ -24,15 +23,16 @@ Cambridge, MA 02139, USA. */
/* Store in SET all signals that are blocked and pending. */
int
-DEFUN(sigpending, (set), sigset_t *set)
+sigpending (set)
+ sigset_t *set;
{
if (set == NULL)
{
- errno = EINVAL;
- return(-1);
+ __set_errno (EINVAL);
+ return -1;
}
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/sigprocmask.c b/sysdeps/stub/sigprocmask.c
index a89f683d54..48623be13b 100644
--- a/sysdeps/stub/sigprocmask.c
+++ b/sysdeps/stub/sigprocmask.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <signal.h>
@@ -25,8 +24,10 @@ Cambridge, MA 02139, USA. */
according to HOW, which may be SIG_BLOCK, SIG_UNBLOCK or SIG_SETMASK.
If OSET is not NULL, store the old set of blocked signals in *OSET. */
int
-DEFUN(__sigprocmask, (how, set, oset),
- int how AND CONST sigset_t *set AND sigset_t *oset)
+__sigprocmask (how, set, oset)
+ int how;
+ const sigset_t *set;
+ sigset_t *oset;
{
switch (how)
{
@@ -35,11 +36,11 @@ DEFUN(__sigprocmask, (how, set, oset),
case SIG_SETMASK:
break;
default:
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/sigreturn.c b/sysdeps/stub/sigreturn.c
index d4370e4b34..7a2db5b4cc 100644
--- a/sysdeps/stub/sigreturn.c
+++ b/sysdeps/stub/sigreturn.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1994, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1994, 1995, 1996 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
@@ -16,14 +16,14 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <signal.h>
#include <errno.h>
int
-DEFUN(__sigreturn, (context), struct sigcontext *context)
+__sigreturn (context)
+ struct sigcontext *context;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
stub_warning (sigreturn)
diff --git a/sysdeps/stub/sigsetmask.c b/sysdeps/stub/sigsetmask.c
index ab4ae811ac..7bb5eab0fd 100644
--- a/sysdeps/stub/sigsetmask.c
+++ b/sysdeps/stub/sigsetmask.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,14 +16,14 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <signal.h>
int
-DEFUN(__sigsetmask, (mask), int mask)
+__sigsetmask (mask)
+ int mask;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
stub_warning (sigsetmask)
diff --git a/sysdeps/stub/sigstack.c b/sysdeps/stub/sigstack.c
index a9da1e699e..79f21c4790 100644
--- a/sysdeps/stub/sigstack.c
+++ b/sysdeps/stub/sigstack.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,17 +16,17 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <signal.h>
/* Run signals handlers on the stack specified by SS (if not NULL).
If OSS is not NULL, it is filled in with the old signal stack status. */
int
-DEFUN(sigstack, (ss, oss),
- CONST struct sigstack *ss AND struct sigstack *oss)
+sigstack (ss, oss)
+ const struct sigstack *ss;
+ struct sigstack *oss;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/sigsuspend.c b/sysdeps/stub/sigsuspend.c
index da7ff85a83..ce604f8cb4 100644
--- a/sysdeps/stub/sigsuspend.c
+++ b/sysdeps/stub/sigsuspend.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <signal.h>
@@ -24,9 +23,10 @@ Cambridge, MA 02139, USA. */
/* Change the set of blocked signals to SET,
wait until a signal arrives, and restore the set of blocked signals. */
int
-DEFUN(sigsuspend, (set), CONST sigset_t *set)
+sigsuspend (set)
+ const sigset_t *set;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/sigvec.c b/sysdeps/stub/sigvec.c
index af8e24dc64..62505a7d68 100644
--- a/sysdeps/stub/sigvec.c
+++ b/sysdeps/stub/sigvec.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <signal.h>
#include <errno.h>
@@ -26,10 +25,12 @@ Cambridge, MA 02139, USA. */
reset to SIG_DFL before `sv_handler' is entered. If OVEC is non-NULL,
it is filled in with the old information for SIG. */
int
-DEFUN(__sigvec, (sig, vec, ovec),
- int sig AND CONST struct sigvec *vec AND struct sigvec *ovec)
+__sigvec (sig, vec, ovec)
+ int sig;
+ const struct sigvec *vec;
+ struct sigvec *ovec;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
stub_warning (sigvec)
diff --git a/sysdeps/stub/sleep.c b/sysdeps/stub/sleep.c
index 88c7120a27..9ba448f586 100644
--- a/sysdeps/stub/sleep.c
+++ b/sysdeps/stub/sleep.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <signal.h>
#include <time.h>
#include <unistd.h>
@@ -30,9 +29,10 @@ Cambridge, MA 02139, USA. */
signal afterwards is undefined. There is no return value to indicate
error, but if `sleep' returns SECONDS, it probably didn't work. */
unsigned int
-DEFUN(sleep, (seconds), unsigned int seconds)
+sleep (seconds)
+ unsigned int seconds;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return seconds;
}
diff --git a/sysdeps/stub/socket.c b/sysdeps/stub/socket.c
index 26f550db87..52017cbbde 100644
--- a/sysdeps/stub/socket.c
+++ b/sysdeps/stub/socket.c
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <sys/socket.h>
@@ -24,10 +23,12 @@ Cambridge, MA 02139, USA. */
protocol PROTOCOL. If PROTOCOL is zero, one is chosen automatically.
Returns a file descriptor for the new socket, or -1 for errors. */
int
-DEFUN(socket, (domain, type, protocol),
- int domain AND int type AND int protocol)
+socket (domain, type, protocol)
+ int domain;
+ int type;
+ int protocol;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/socketpair.c b/sysdeps/stub/socketpair.c
index bc9b4b50f2..938e08f50e 100644
--- a/sysdeps/stub/socketpair.c
+++ b/sysdeps/stub/socketpair.c
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <sys/socket.h>
@@ -25,10 +24,13 @@ Cambridge, MA 02139, USA. */
descriptors for them in FDS[0] and FDS[1]. If PROTOCOL is zero,
one will be chosen automatically. Returns 0 on success, -1 for errors. */
int
-DEFUN(socketpair, (domain, type, protocol, fds),
- int domain AND int type AND int protocol AND int fds[2])
+socketpair (domain, type, protocol, fds)
+ int domain;
+ int type;
+ int protocol;
+ int fds[2];
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/sstk.c b/sysdeps/stub/sstk.c
index e49bc31ee3..d7486737fa 100644
--- a/sysdeps/stub/sstk.c
+++ b/sysdeps/stub/sstk.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,16 +16,16 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
/* Increase the size of the stack by INCREMENT,
and return the address of the bottom of the stack. */
-PTR
-DEFUN(sstk, (increment), int increment)
+void *
+sstk (increment)
+ int increment;
{
- errno = ENOSYS;
- return (PTR) -1;
+ __set_errno (ENOSYS);
+ return (void *) -1;
}
stub_warning (sstk)
diff --git a/sysdeps/stub/start.c b/sysdeps/stub/start.c
index 9d412011f9..c16582d9b3 100644
--- a/sysdeps/stub/start.c
+++ b/sysdeps/stub/start.c
@@ -12,4 +12,5 @@ int __data_start = 0;
weak_alias (__data_start, data_start)
#endif
-volatile int errno;
+volatile int __errno;
+string_alias (__errno, errno)
diff --git a/sysdeps/stub/statfs.c b/sysdeps/stub/statfs.c
index 1aa2feeae6..72a93b2b9a 100644
--- a/sysdeps/stub/statfs.c
+++ b/sysdeps/stub/statfs.c
@@ -25,10 +25,9 @@ Cambridge, MA 02139, USA. */
int
__statfs (const char *file, struct statfs *buf)
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
stub_warning (statfs)
weak_alias (__statfs, statfs)
-
diff --git a/sysdeps/stub/stime.c b/sysdeps/stub/stime.c
index 231e762808..4a58dd8924 100644
--- a/sysdeps/stub/stime.c
+++ b/sysdeps/stub/stime.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <time.h>
#include <stddef.h>
@@ -24,15 +23,16 @@ Cambridge, MA 02139, USA. */
/* Set the system clock to *WHEN. */
int
-DEFUN(stime, (when), CONST time_t *when)
+stime (when)
+ const time_t *when;
{
if (when == NULL)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/stty.c b/sysdeps/stub/stty.c
index dec67c2cc3..e4fd33b9ee 100644
--- a/sysdeps/stub/stty.c
+++ b/sysdeps/stub/stty.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1995, 1996 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
@@ -16,23 +16,23 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <sgtty.h>
#include <stddef.h>
/* Set the terminal parameters associated with FD to *PARAMS. */
int
-DEFUN(stty, (fd, params),
- int fd AND CONST struct sgttyb *params)
+stty (fd, params)
+ int fd;
+ const struct sgttyb *params;
{
if (params == NULL)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/swapoff.c b/sysdeps/stub/swapoff.c
index d082bbcd53..66e2650149 100644
--- a/sysdeps/stub/swapoff.c
+++ b/sysdeps/stub/swapoff.c
@@ -23,7 +23,7 @@ Boston, MA 02111-1307, USA. */
int
swapoff (const char *path)
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/swapon.c b/sysdeps/stub/swapon.c
index 825f353a88..d990befb0a 100644
--- a/sysdeps/stub/swapon.c
+++ b/sysdeps/stub/swapon.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,16 +16,16 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <unistd.h>
/* Make the block special device PATH available to the system for swapping.
This call is restricted to the super-user. */
int
-DEFUN(swapon, (path), CONST char *path)
+swapon (path)
+ const char *path;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/symlink.c b/sysdeps/stub/symlink.c
index c8e6f1242a..d02e218d2b 100644
--- a/sysdeps/stub/symlink.c
+++ b/sysdeps/stub/symlink.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
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>
@@ -24,15 +23,17 @@ Cambridge, MA 02139, USA. */
/* Make a link to FROM called TO. */
int
-DEFUN(__symlink, (from, to), CONST char *from AND CONST char *to)
+__symlink (from, to)
+ const char *from;
+ const char *to;
{
if (from == NULL || to == NULL)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
stub_warning (symlink)
diff --git a/sysdeps/stub/sync.c b/sysdeps/stub/sync.c
index 34ddf2f0de..b775ee8dd2 100644
--- a/sysdeps/stub/sync.c
+++ b/sysdeps/stub/sync.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,15 +16,14 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <unistd.h>
/* Make all changes done to all files actually appear on disk. */
int
-DEFUN_VOID(sync)
+sync ()
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/syscall.c b/sysdeps/stub/syscall.c
index d2a5b3ca33..f08ab3d851 100644
--- a/sysdeps/stub/syscall.c
+++ b/sysdeps/stub/syscall.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1994, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <sysdep.h>
#include <errno.h>
@@ -24,9 +23,10 @@ Cambridge, MA 02139, USA. */
This only makes sense in certain operating systems. */
int
-DEFUN(syscall, (callno), int callno DOTS)
+syscall (callno)
+ int callno;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/sysconf.c b/sysdeps/stub/sysconf.c
index 1351b48fe0..43ad6d93a9 100644
--- a/sysdeps/stub/sysconf.c
+++ b/sysdeps/stub/sysconf.c
@@ -32,7 +32,7 @@ __sysconf (name)
switch (name)
{
default:
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
case _SC_TZNAME_MAX:
@@ -173,7 +173,7 @@ __sysconf (name)
break;
}
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/sysd-stdio.c b/sysdeps/stub/sysd-stdio.c
index c74823a7a4..75976c2d3d 100644
--- a/sysdeps/stub/sysd-stdio.c
+++ b/sysdeps/stub/sysd-stdio.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 92, 93, 94, 95, 96 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <stdio.h>
@@ -24,20 +23,24 @@ Cambridge, MA 02139, USA. */
/* Read up to N chars into BUF from COOKIE.
Return how many chars were read, 0 for EOF or -1 for error. */
int
-DEFUN(__stdio_read, (cookie, buf, n),
- PTR cookie AND register char *buf AND register size_t n)
+__stdio_read (cookie, buf, n)
+ void *cookie;
+ register char *buf;
+ register size_t n;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
/* Write up to N chars from BUF to COOKIE.
Return how many chars were written or -1 for error. */
int
-DEFUN(__stdio_write, (cookie, buf, n),
- PTR cookie AND register CONST char *buf AND register size_t n)
+__stdio_write (cookie, buf, n)
+ void *cookie;
+ register const char *buf;
+ register size_t n;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
@@ -45,19 +48,22 @@ DEFUN(__stdio_write, (cookie, buf, n),
The new file position is stored in *POS.
Returns zero if successful, nonzero if not. */
int
-DEFUN(__stdio_seek, (cookie, pos, whence),
- PTR cookie AND fpos_t *pos AND int whence)
+__stdio_seek (cookie, pos, whence)
+ void *cookie;
+ fpos_t *pos;
+ int whence;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
/* Close the file associated with COOKIE.
Return 0 for success or -1 for failure. */
int
-DEFUN(__stdio_close, (cookie), PTR cookie)
+__stdio_close (cookie)
+ void *cookie;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
@@ -65,21 +71,24 @@ DEFUN(__stdio_close, (cookie), PTR cookie)
or -1 for errors. If COOKIE does not relate to any POSIX.1 file
descriptor, this should return -1 with errno set to EOPNOTSUPP. */
int
-DEFUN(__stdio_fileno, (cookie), PTR cookie)
+__stdio_fileno (cookie)
+ void *cookie;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
/* Open FILENAME with the mode in M.
Store the magic cookie associated with the opened file in *COOKIEPTR.
- Return zero on success and nonzero on failure. */
+ Return zero on success and nonzero on failure. */
int
-DEFUN(__stdio_open, (filename, m, cookieptr),
- CONST char *filename AND __io_mode m AND PTR *cookieptr)
+__stdio_open (filename, m, cookieptr)
+ const char *filename;
+ __io_mode m;
+ void **cookieptr;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
@@ -87,11 +96,13 @@ DEFUN(__stdio_open, (filename, m, cookieptr),
/* Open FILENAME with the mode in M. Use the same magic cookie
already in *COOKIEPTR if possible, closing the old cookie with CLOSEFN. */
int
-DEFUN(__stdio_reopen, (filename, m, cookieptr),
- CONST char *filename AND __io_mode m AND
- PTR *cookieptr AND __io_close_fn closefn)
+__stdio_reopen (filename, m, cookieptr)
+ const char *filename;
+ __io_mode m;
+ void **cookieptr;
+ __io_close_fn closefn;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/system.c b/sysdeps/stub/system.c
index 75c0747a1e..8cb192d7ed 100644
--- a/sysdeps/stub/system.c
+++ b/sysdeps/stub/system.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1993, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1993, 1995, 1996 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
@@ -16,21 +16,22 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <stdlib.h>
/* Execute LINE as a shell command. */
int
-DEFUN(system, (line), CONST char *line)
+__libc_system (line)
+ const char *line;
{
if (line == NULL)
return 0; /* This indicates no command processor. */
- errno = ENOSYS;
+ __sys_errno (ENOSYS);
return -1;
}
+weak_alias (__libc_system, system)
stub_warning (system)
diff --git a/sysdeps/stub/tcdrain.c b/sysdeps/stub/tcdrain.c
index 20f2b86195..4d52f34009 100644
--- a/sysdeps/stub/tcdrain.c
+++ b/sysdeps/stub/tcdrain.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,23 +16,23 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <termios.h>
/* Wait for pending output to be written on FD. */
int
-DEFUN(tcdrain, (fd), int fd)
+__libc_tcdrain (int fd)
{
if (fd < 0)
{
- errno = EBADF;
+ __set_errno (EBADF);
return -1;
}
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
+weak_alias (__libc_tcdrain, tcdrain)
stub_warning (tcdrain)
diff --git a/sysdeps/stub/tcflow.c b/sysdeps/stub/tcflow.c
index 5ccc9d5646..1dbda79719 100644
--- a/sysdeps/stub/tcflow.c
+++ b/sysdeps/stub/tcflow.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,17 +16,18 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <termios.h>
/* Suspend or restart transmission on FD. */
int
-DEFUN(tcflow, (fd, action), int fd AND int action)
+tcflow (fd, action)
+ int fd;
+ int action;
{
if (fd < 0)
{
- errno = EBADF;
+ __set_errno (EBADF);
return -1;
}
@@ -39,11 +40,11 @@ DEFUN(tcflow, (fd, action), int fd AND int action)
break;
default:
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/tcflush.c b/sysdeps/stub/tcflush.c
index 3e9f7efa3a..16cc1c4d91 100644
--- a/sysdeps/stub/tcflush.c
+++ b/sysdeps/stub/tcflush.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1996 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
@@ -16,13 +16,14 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <termios.h>
/* Flush pending data on FD. */
int
-DEFUN(tcflush, (fd, queue_selector), int fd AND int queue_selector)
+tcflush (fd, queue_selector)
+ int fd;
+ int queue_selector;
{
switch (queue_selector)
{
@@ -32,19 +33,13 @@ DEFUN(tcflush, (fd, queue_selector), int fd AND int queue_selector)
break;
default:
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
-#ifdef HAVE_GNU_LD
-
-#include <gnu-stabs.h>
-
stub_warning(tcflush);
-
-#endif /* GNU stabs. */
diff --git a/sysdeps/stub/tcgetattr.c b/sysdeps/stub/tcgetattr.c
index 70208491ed..da6e545499 100644
--- a/sysdeps/stub/tcgetattr.c
+++ b/sysdeps/stub/tcgetattr.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,29 +16,29 @@ License along with the GNU C Library; see the file COPYING.LIB. If
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 <termios.h>
/* Put the state of FD into *TERMIOS_P. */
int
-DEFUN(__tcgetattr, (fd, termios_p),
- int fd AND struct termios *termios_p)
+__tcgetattr (fd, termios_p)
+ int fd;
+ struct termios *termios_p;
{
if (fd < 0)
{
- errno = EBADF;
- return(-1);
+ __set_errno (EBADF);
+ return -1;
}
if (termios_p == NULL)
{
- errno = EINVAL;
- return(-1);
+ __set_errno (EINVAL);
+ return -1;
}
- errno = ENOSYS;
- return(-1);
+ __set_errno (ENOSYS);
+ return -1;
}
stub_warning (tcgetattr)
diff --git a/sysdeps/stub/tcgetpgrp.c b/sysdeps/stub/tcgetpgrp.c
index 1e1ebfa923..3b901a9662 100644
--- a/sysdeps/stub/tcgetpgrp.c
+++ b/sysdeps/stub/tcgetpgrp.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,22 +16,22 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <unistd.h>
#include <sys/types.h>
/* Return the foreground process group ID of FD. */
pid_t
-DEFUN(tcgetpgrp, (fd), int fd)
+tcgetpgrp (fd)
+ int fd;
{
if (fd < 0)
{
- errno = EBADF;
+ __set_errno (EBADF);
return (pid_t) -1;
}
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return (pid_t) -1;
}
diff --git a/sysdeps/stub/tcsendbrk.c b/sysdeps/stub/tcsendbrk.c
index 6d8be7403c..80ee6f4d53 100644
--- a/sysdeps/stub/tcsendbrk.c
+++ b/sysdeps/stub/tcsendbrk.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,21 +16,22 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <termios.h>
/* Send zero bits on FD. */
int
-DEFUN(tcsendbreak, (fd, duration), int fd AND int duration)
+tcsendbreak (fd, duration)
+ int fd;
+ int duration;
{
if (fd < 0)
{
- errno = EBADF;
+ __set_errno (EBADF);
return -1;
}
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/tcsetattr.c b/sysdeps/stub/tcsetattr.c
index 89ee7d7c32..ce1dae094f 100644
--- a/sysdeps/stub/tcsetattr.c
+++ b/sysdeps/stub/tcsetattr.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,26 +16,27 @@ License along with the GNU C Library; see the file COPYING.LIB. If
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 <termios.h>
-static int EXFUN(bad_speed, (speed_t speed));
+static int bad_speed __P ((speed_t speed));
/* Set the state of FD to *TERMIOS_P. */
int
-DEFUN(tcsetattr, (fd, optional_actions, termios_p),
- int fd AND int optional_actions AND CONST struct termios *termios_p)
+tcsetattr (fd, optional_actions, termios_p)
+ int fd;
+ int optional_actions;
+ const struct termios *termios_p;
{
if (fd < 0)
{
- errno = EBADF;
+ __set_errno (EBADF);
return -1;
}
if (termios_p == NULL)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
switch (optional_actions)
@@ -45,7 +46,7 @@ DEFUN(tcsetattr, (fd, optional_actions, termios_p),
case TCSAFLUSH:
break;
default:
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
@@ -53,18 +54,19 @@ DEFUN(tcsetattr, (fd, optional_actions, termios_p),
bad_speed(termios_p->__ispeed == 0 ?
termios_p->__ospeed : termios_p->__ispeed))
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
/* Stricknine checking. */
static int
-DEFUN(bad_speed, (speed), speed_t speed)
+bad_speed (speed)
+ speed_t speed;
{
switch (speed)
{
diff --git a/sysdeps/stub/tcsetpgrp.c b/sysdeps/stub/tcsetpgrp.c
index 3dbe34e29c..3a97fef975 100644
--- a/sysdeps/stub/tcsetpgrp.c
+++ b/sysdeps/stub/tcsetpgrp.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,23 +16,23 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <unistd.h>
#include <sys/types.h>
/* Set the foreground process group ID of FD set PGRP_ID. */
int
-DEFUN(tcsetpgrp, (fd, pgrp_id),
- int fd AND pid_t pgrp_id)
+tcsetpgrp (fd, pgrp_id)
+ int fd;
+ pid_t pgrp_id;
{
if (fd < 0)
{
- errno = EBADF;
+ __set_errno (EBADF);
return -1;
}
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/telldir.c b/sysdeps/stub/telldir.c
index ce00e09fb4..811ce74000 100644
--- a/sysdeps/stub/telldir.c
+++ b/sysdeps/stub/telldir.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <sys/types.h>
#include <stddef.h>
@@ -24,16 +23,17 @@ Cambridge, MA 02139, USA. */
/* Return the current position of DIRP. */
off_t
-DEFUN(telldir, (dirp), DIR *dirp)
+telldir (dirp)
+ DIR *dirp;
{
if (dirp == NULL)
{
- errno = EINVAL;
- return(-1);
+ __set_errno (EINVAL);
+ return -1;
}
- errno = ENOSYS;
- return((off_t) -1);
+ __set_errno (ENOSYS);
+ return (off_t) -1;
}
diff --git a/sysdeps/stub/tempname.c b/sysdeps/stub/tempname.c
index 42b1c32022..939c70fb0d 100644
--- a/sysdeps/stub/tempname.c
+++ b/sysdeps/stub/tempname.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1993, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 92, 93, 95, 96 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <stdio.h>
@@ -27,13 +26,15 @@ Cambridge, MA 02139, USA. */
Return the generated filename or NULL if one could not
be generated, putting the length of the string in *LENPTR. */
char *
-DEFUN(__stdio_gen_tempname, (dir, pfx, dir_search, lenptr),
- CONST char *dir AND CONST char *pfx AND
- int dir_search AND size_t *lenptr AND
- FILE **streamptr)
+__stdio_gen_tempname (dir, pfx, dir_search, lenptr)
+ const char *dir;
+ const char *pfx;
+ int dir_search;
+ size_t *lenptr;
+ FILE **streamptr;
{
*lenptr = 0;
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return NULL;
}
diff --git a/sysdeps/stub/time.c b/sysdeps/stub/time.c
index cb208bcf0b..d410be3894 100644
--- a/sysdeps/stub/time.c
+++ b/sysdeps/stub/time.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1996 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
@@ -24,7 +24,7 @@ time_t
time (timer)
time_t *timer;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
if (timer != NULL)
*timer = (time_t) -1;
diff --git a/sysdeps/stub/times.c b/sysdeps/stub/times.c
index 2b47ec2f1d..ab33dcae33 100644
--- a/sysdeps/stub/times.c
+++ b/sysdeps/stub/times.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <sys/times.h>
#include <stddef.h>
@@ -26,15 +25,16 @@ Cambridge, MA 02139, USA. */
Return the elapsed real time, or (clock_t) -1 for errors.
All times are in CLK_TCKths of a second. */
clock_t
-DEFUN(__times, (buffer), struct tms *buffer)
+__times (buffer)
+ struct tms *buffer;
{
if (buffer == NULL)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return (clock_t) -1;
}
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return (clock_t) -1;
}
stub_warning (times)
diff --git a/sysdeps/stub/truncate.c b/sysdeps/stub/truncate.c
index 1367332792..1134c6a4d9 100644
--- a/sysdeps/stub/truncate.c
+++ b/sysdeps/stub/truncate.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,16 +16,16 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <sys/types.h>
#include <errno.h>
/* Truncate PATH to LENGTH bytes. */
int
-DEFUN(truncate, (path, length),
- CONST char *path AND off_t length)
+truncate (path, length)
+ const char *path;
+ off_t length;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/ttyname.c b/sysdeps/stub/ttyname.c
index a243e85053..0d251f4ee0 100644
--- a/sysdeps/stub/ttyname.c
+++ b/sysdeps/stub/ttyname.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
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>
@@ -27,9 +26,10 @@ char *__ttyname = NULL;
/* Return the pathname of the terminal FD is open on, or NULL on errors.
The returned storage is good only until the next call to this function. */
char *
-DEFUN(ttyname, (fd), int fd)
+ttyname (fd)
+ int fd;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return NULL;
}
diff --git a/sysdeps/stub/ttyname_r.c b/sysdeps/stub/ttyname_r.c
index 67350d9ed3..7a05629c43 100644
--- a/sysdeps/stub/ttyname_r.c
+++ b/sysdeps/stub/ttyname_r.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -28,7 +28,7 @@ ttyname_r (fd, buf, buflen)
char *buf;
int buflen;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/ualarm.c b/sysdeps/stub/ualarm.c
index ead365b157..ffc4e51853 100644
--- a/sysdeps/stub/ualarm.c
+++ b/sysdeps/stub/ualarm.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
/* Set an alarm to go off (generating a SIGALRM signal) in VALUE microseconds.
@@ -25,10 +24,11 @@ Cambridge, MA 02139, USA. */
Returns the number of microseconds remaining before the alarm. */
unsigned int
-DEFUN(ualarm, (value, interval),
- unsigned int value AND unsigned int interval)
+ualarm (value, interval)
+ unsigned int value;
+ unsigned int interval;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/ulimit.c b/sysdeps/stub/ulimit.c
index 84633c4e14..e633a6aeed 100644
--- a/sysdeps/stub/ulimit.c
+++ b/sysdeps/stub/ulimit.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1996 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
@@ -32,7 +32,7 @@ __ulimit (cmd, newlimit)
int cmd;
long int newlimit;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
weak_alias (__ulimit, ulimit)
diff --git a/sysdeps/stub/umask.c b/sysdeps/stub/umask.c
index 18c85b74b7..fea20c2972 100644
--- a/sysdeps/stub/umask.c
+++ b/sysdeps/stub/umask.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,16 +16,16 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <sys/stat.h>
#include <errno.h>
#include <sys/types.h>
/* Set the file creation mask to MASK, returning the old mask. */
mode_t
-DEFUN(__umask, (mask), mode_t mask)
+__umask (mask)
+ mode_t mask;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
stub_warning (umask)
diff --git a/sysdeps/stub/unlink.c b/sysdeps/stub/unlink.c
index 7f8e249f27..6fe7c9de00 100644
--- a/sysdeps/stub/unlink.c
+++ b/sysdeps/stub/unlink.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
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>
@@ -24,16 +23,17 @@ Cambridge, MA 02139, USA. */
/* Remove the link named NAME. */
int
-DEFUN(__unlink, (name), CONST char *name)
+__unlink (name)
+ const char *name;
{
if (name == NULL)
{
- errno = EINVAL;
- return(-1);
+ __set_errno (EINVAL);
+ return -1;
}
- errno = ENOSYS;
- return(-1);
+ __set_errno (ENOSYS);
+ return -1;
}
stub_warning (unlink)
diff --git a/sysdeps/stub/usleep.c b/sysdeps/stub/usleep.c
index c1cae9c7c6..4f3f232f63 100644
--- a/sysdeps/stub/usleep.c
+++ b/sysdeps/stub/usleep.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,14 +16,14 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
/* Sleep USECONDS microseconds, or until a previously set timer goes off. */
unsigned int
-DEFUN(usleep, (useconds), unsigned int useconds)
+usleep (useconds)
+ unsigned int useconds;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/ustat.c b/sysdeps/stub/ustat.c
index baa98fd5e8..8e909f9f40 100644
--- a/sysdeps/stub/ustat.c
+++ b/sysdeps/stub/ustat.c
@@ -26,7 +26,7 @@ ustat (dev, ust)
dev_t dev;
struct ustat * ust;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
stub_warning (ustat)
diff --git a/sysdeps/stub/utime.c b/sysdeps/stub/utime.c
index 641960dd1b..374ed1d140 100644
--- a/sysdeps/stub/utime.c
+++ b/sysdeps/stub/utime.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <utime.h>
@@ -24,16 +23,18 @@ Cambridge, MA 02139, USA. */
/* Set the access and modification times of FILE to those given in TIMES.
If TIMES is NULL, set them to the current time. */
int
-DEFUN(utime, (file, times), CONST char *file AND CONST struct utimbuf *times)
+utime (file, times)
+ const char *file;
+ const struct utimbuf *times;
{
if (file == NULL)
{
- errno = EINVAL;
- return(-1);
+ __set_errno (EINVAL);
+ return -1;
}
- errno = ENOSYS;
- return(-1);
+ __set_errno (ENOSYS);
+ return -1;
}
diff --git a/sysdeps/stub/utimes.c b/sysdeps/stub/utimes.c
index 5afc3d7eb4..824f2412ee 100644
--- a/sysdeps/stub/utimes.c
+++ b/sysdeps/stub/utimes.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <sys/time.h>
#include <errno.h>
#include <stddef.h>
@@ -24,16 +23,17 @@ Cambridge, MA 02139, USA. */
/* Change the access time of FILE to TVP[0] and
the modification time of FILE to TVP[1]. */
int
-DEFUN(__utimes, (file, tvp),
- CONST char *file AND struct timeval tvp[2])
+__utimes (file, tvp)
+ const char *file;
+ struct timeval tvp[2];
{
if (file == NULL || tvp == NULL)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/vhangup.c b/sysdeps/stub/vhangup.c
index 6a7a994365..532fd64387 100644
--- a/sysdeps/stub/vhangup.c
+++ b/sysdeps/stub/vhangup.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <unistd.h>
@@ -24,9 +23,9 @@ Cambridge, MA 02139, USA. */
with the control terminal, and then send a SIGHUP signal to the process
group of the control terminal. */
int
-DEFUN_VOID(vhangup)
+vhangup ()
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/wait.c b/sysdeps/stub/wait.c
index 97b78417b6..a41a2471a8 100644
--- a/sysdeps/stub/wait.c
+++ b/sysdeps/stub/wait.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,16 +16,16 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <sys/wait.h>
#include <errno.h>
/* Wait for a child to die. When one does, put its status in *STAT_LOC
and return its process ID. For errors, return (pid_t) -1. */
__pid_t
-DEFUN(__wait, (stat_loc), __WAIT_STATUS_DEFN stat_loc)
+__wait (stat_loc)
+ __WAIT_STATUS_DEFN stat_loc;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
stub_warning (wait)
diff --git a/sysdeps/stub/wait3.c b/sysdeps/stub/wait3.c
index c1640dde8a..b5ea8e37b5 100644
--- a/sysdeps/stub/wait3.c
+++ b/sysdeps/stub/wait3.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1993, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1993, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <sys/wait.h>
#include <sys/types.h>
@@ -27,16 +26,18 @@ Cambridge, MA 02139, USA. */
there. If the WUNTRACED bit is set in OPTIONS, return status for stopped
children; otherwise don't. */
pid_t
-DEFUN(__wait3, (stat_loc, options, usage),
- __WAIT_STATUS_DEFN stat_loc AND int options AND struct rusage *usage)
+__wait3 (stat_loc, options, usage)
+ __WAIT_STATUS_DEFN stat_loc;
+ int options;
+ struct rusage *usage;
{
if ((options & ~(WNOHANG|WUNTRACED)) != 0)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return (pid_t) -1;
}
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return (pid_t) -1;
}
stub_warning (wait3)
diff --git a/sysdeps/stub/wait4.c b/sysdeps/stub/wait4.c
index 2062d4b2cc..bf273438ca 100644
--- a/sysdeps/stub/wait4.c
+++ b/sysdeps/stub/wait4.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1995, 1996 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
@@ -16,17 +16,18 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <errno.h>
pid_t
-DEFUN(__wait4, (pid, stat_loc, options, usage),
- pid_t pid AND __WAIT_STATUS_DEFN stat_loc AND int options AND
- struct rusage *usage)
+__wait4 (pid, stat_loc, options, usage)
+ pid_t pid;
+ __WAIT_STATUS_DEFN stat_loc;
+ int options;
+ struct rusage *usage;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return (pid_t) -1;
}
stub_warning (wait4)
diff --git a/sysdeps/stub/waitpid.c b/sysdeps/stub/waitpid.c
index 22eb019eb5..09ba5a8f92 100644
--- a/sysdeps/stub/waitpid.c
+++ b/sysdeps/stub/waitpid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <sys/wait.h>
#include <sys/types.h>
@@ -35,18 +34,18 @@ Cambridge, MA 02139, USA. */
Return (pid_t) -1 for errors. If the WUNTRACED bit is set in OPTIONS,
return status for stopped children; otherwise don't. */
pid_t
-DEFUN(__waitpid, (pid, stat_loc, options),
- pid_t pid AND int *stat_loc AND int options)
+__libc_waitpid (pid_t pid, int *stat_loc, int options)
{
if ((options & ~(WNOHANG|WUNTRACED)) != 0)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return (pid_t) -1;
}
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return (pid_t) -1;
}
-stub_warning (waitpid)
+weak_alias (__libc_waitpid, __waitpid)
+weak_alias (__libc_waitpid, waitpid)
-weak_alias (__waitpid, waitpid)
+stub_warning (waitpid)
diff --git a/sysdeps/stub/write.c b/sysdeps/stub/write.c
index deb4851e06..69778c376f 100644
--- a/sysdeps/stub/write.c
+++ b/sysdeps/stub/write.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <sysdep.h>
#include <errno.h>
#include <unistd.h>
@@ -24,25 +23,25 @@ Cambridge, MA 02139, USA. */
/* Write NBYTES of BUF to FD. Return the number written, or -1. */
ssize_t
-DEFUN(__write, (fd, buf, nbytes),
- int fd AND CONST PTR buf AND size_t nbytes)
+__libc_write (int fd, const void *buf, size_t nbytes)
{
if (nbytes == 0)
return 0;
if (fd < 0)
{
- errno = EBADF;
+ __set_errno (EBADF);
return -1;
}
if (buf == NULL)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
stub_warning (write)
-weak_alias (__write, write)
+weak_alias (__libc_write, __write)
+weak_alias (__libc_write, write)
diff --git a/sysdeps/stub/writev.c b/sysdeps/stub/writev.c
index f1d574948d..593880c0e9 100644
--- a/sysdeps/stub/writev.c
+++ b/sysdeps/stub/writev.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <unistd.h>
#include <sys/uio.h>
@@ -27,10 +26,12 @@ Cambridge, MA 02139, USA. */
Operates just like `write' (see <unistd.h>) except that the data
are taken from VECTOR instead of a contiguous buffer. */
int
-DEFUN(writev, (fd, vector, count),
- int fd AND CONST struct iovec *vector AND size_t count)
+writev (fd, vector, count)
+ int fd;
+ const struct iovec *vector;
+ size_t count;
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/stub/xmknod.c b/sysdeps/stub/xmknod.c
index 6d365cbe0c..48d8b4f113 100644
--- a/sysdeps/stub/xmknod.c
+++ b/sysdeps/stub/xmknod.c
@@ -28,11 +28,11 @@ __xmknod (int vers, const char *path, mode_t mode, dev_t *dev)
{
if (vers != _MKNOD_VER)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
stub_warning (__xmknod)
diff --git a/sysdeps/stub/xstat.c b/sysdeps/stub/xstat.c
index ad67aa9fec..a487062fdf 100644
--- a/sysdeps/stub/xstat.c
+++ b/sysdeps/stub/xstat.c
@@ -26,11 +26,11 @@ __xstat (int vers, const char *file, struct stat *buf)
{
if (vers != _STAT_VER || file == NULL || buf == NULL)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
stub_warning (stat)
diff --git a/sysdeps/unix/bsd/bsd4.4/errnos.h b/sysdeps/unix/bsd/bsd4.4/errnos.h
index dcfdd9c47f..c2a9c08413 100644
--- a/sysdeps/unix/bsd/bsd4.4/errnos.h
+++ b/sysdeps/unix/bsd/bsd4.4/errnos.h
@@ -165,4 +165,6 @@
#endif /* __USE_BSD */
+#define __set_errno(val) errno = (val)
+
#endif /* <errno.h> included. */
diff --git a/sysdeps/unix/bsd/bsd4.4/tcdrain.c b/sysdeps/unix/bsd/bsd4.4/tcdrain.c
index ac7c9cd2a1..feaa652aa7 100644
--- a/sysdeps/unix/bsd/bsd4.4/tcdrain.c
+++ b/sysdeps/unix/bsd/bsd4.4/tcdrain.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1994, 1996 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
@@ -16,13 +16,13 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <stddef.h>
#include <sys/ioctl.h>
/* Wait for pending output to be written on FD. */
int
-DEFUN(tcdrain, (fd), int fd)
+__libc_tcdrain (int fd)
{
return __ioctl (fd, TIOCDRAIN);
}
+weak_alias (__libc_tcdrain, tcdrain)
diff --git a/sysdeps/unix/bsd/bsd4.4/wait.c b/sysdeps/unix/bsd/bsd4.4/wait.c
index a29a99f9b9..29225f8638 100644
--- a/sysdeps/unix/bsd/bsd4.4/wait.c
+++ b/sysdeps/unix/bsd/bsd4.4/wait.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <sys/wait.h>
#include <errno.h>
#include <sys/resource.h>
@@ -25,9 +24,10 @@ Cambridge, MA 02139, USA. */
/* Wait for a child to die. When one does, put its status in *STAT_LOC
and return its process ID. For errors, return (pid_t) -1. */
__pid_t
-DEFUN(__wait, (stat_loc), __WAIT_STATUS_DEFN stat_loc)
+__libc_wait (__WAIT_STATUS_DEFN stat_loc)
{
return __wait4 (WAIT_ANY, stat_loc, 0, (struct rusage *) NULL);
}
-weak_alias (__wait, wait)
+weak_alias (__libc_wait, __wait)
+weak_alias (__libc_wait, wait)
diff --git a/sysdeps/unix/bsd/bsd4.4/waitpid.c b/sysdeps/unix/bsd/bsd4.4/waitpid.c
index b5a34c32d0..2a21e3cef8 100644
--- a/sysdeps/unix/bsd/bsd4.4/waitpid.c
+++ b/sysdeps/unix/bsd/bsd4.4/waitpid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <sys/wait.h>
#include <sys/types.h>
@@ -35,10 +34,10 @@ Cambridge, MA 02139, USA. */
Return (pid_t) -1 for errors. If the WUNTRACED bit is set in OPTIONS,
return status for stopped children; otherwise don't. */
pid_t
-DEFUN(__waitpid, (pid, stat_loc, options),
- pid_t pid AND int *stat_loc AND int options)
+__libc_waitpid (pid_t pid, int *stat_loc, int options)
{
return __wait4 (pid, (union wait *) stat_loc, options, NULL);
}
-weak_alias (__waitpid, waitpid)
+weak_alias (__libc_waitpid, __waitpid)
+weak_alias (__libc_waitpid, waitpid)
diff --git a/sysdeps/unix/bsd/isatty.c b/sysdeps/unix/bsd/isatty.c
index c3e80eb1c3..f6e34e865b 100644
--- a/sysdeps/unix/bsd/isatty.c
+++ b/sysdeps/unix/bsd/isatty.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,14 +16,14 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <unistd.h>
#include <sys/ioctl.h>
/* Return 1 if FD is a terminal, 0 if not. */
int
-DEFUN(__isatty, (fd), int fd)
+__isatty (fd)
+ int fd;
{
int save;
int is_tty;
@@ -31,7 +31,7 @@ DEFUN(__isatty, (fd), int fd)
save = errno;
is_tty = __ioctl (fd, TIOCGETP, &term) == 0;
- errno = save;
+ __set_errno (save);
return is_tty;
}
diff --git a/sysdeps/unix/bsd/setegid.c b/sysdeps/unix/bsd/setegid.c
index c4a3780f6d..420751bfc1 100644
--- a/sysdeps/unix/bsd/setegid.c
+++ b/sysdeps/unix/bsd/setegid.c
@@ -26,7 +26,7 @@ setegid (gid)
{
if (gid == (gid_t) ~0)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
diff --git a/sysdeps/unix/bsd/seteuid.c b/sysdeps/unix/bsd/seteuid.c
index f6aa37f153..06fd1a3f29 100644
--- a/sysdeps/unix/bsd/seteuid.c
+++ b/sysdeps/unix/bsd/seteuid.c
@@ -26,7 +26,7 @@ seteuid (uid)
{
if (uid == (uid_t) ~0)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
diff --git a/sysdeps/unix/bsd/setsid.c b/sysdeps/unix/bsd/setsid.c
index e057694589..1da7865ac6 100644
--- a/sysdeps/unix/bsd/setsid.c
+++ b/sysdeps/unix/bsd/setsid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <unistd.h>
#include <sys/ioctl.h>
@@ -27,7 +26,7 @@ Cambridge, MA 02139, USA. */
The process group IDs of the session and the calling process
are set to the process ID of the calling process, which is returned. */
int
-DEFUN_VOID(__setsid)
+__setsid ()
{
pid_t pid = getpid ();
int tty;
@@ -36,7 +35,7 @@ DEFUN_VOID(__setsid)
if (__getpgid (pid) == pid)
{
/* Already the leader. */
- errno = EPERM;
+ __set_errno (EPERM);
return -1;
}
@@ -46,13 +45,13 @@ DEFUN_VOID(__setsid)
tty = open ("/dev/tty", 0);
if (tty < 0)
{
- errno = save;
+ __set_errno (save);
return 0;
}
(void) __ioctl (tty, TIOCNOTTY, 0);
(void) __close (tty);
- errno = save;
+ __set_errno (save);
return 0;
}
diff --git a/sysdeps/unix/bsd/sigaction.c b/sysdeps/unix/bsd/sigaction.c
index aa1c53f6cd..f20968d68e 100644
--- a/sysdeps/unix/bsd/sigaction.c
+++ b/sysdeps/unix/bsd/sigaction.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <sysdep.h>
#include <errno.h>
#include <stddef.h>
@@ -26,14 +25,16 @@ Cambridge, MA 02139, USA. */
/* If ACT is not NULL, change the action for SIG to *ACT.
If OACT is not NULL, put the old action for SIG in *OACT. */
int
-DEFUN(__sigaction, (sig, act, oact),
- int sig AND CONST struct sigaction *act AND struct sigaction *oact)
+__sigaction (sig, act, oact)
+ int sig;
+ const struct sigaction *act;
+ struct sigaction *oact;
{
struct sigvec vec, ovec;
if (sig <= 0 || sig >= NSIG)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
@@ -50,7 +51,7 @@ DEFUN(__sigaction, (sig, act, oact),
if (oact != NULL)
{
- oact->sa_handler = (void EXFUN((*), (int))) ovec.sv_handler;
+ oact->sa_handler = (void (*) __P ((int))) ovec.sv_handler;
oact->sa_mask = ovec.sv_mask;
oact->sa_flags = (((ovec.sv_flags & SV_ONSTACK) ? SA_ONSTACK : 0) |
(!(ovec.sv_flags & SV_INTERRUPT) ? SA_RESTART : 0));
diff --git a/sysdeps/unix/bsd/sigprocmask.c b/sysdeps/unix/bsd/sigprocmask.c
index 31ebb743a8..3421eb4f31 100644
--- a/sysdeps/unix/bsd/sigprocmask.c
+++ b/sysdeps/unix/bsd/sigprocmask.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
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 <signal.h>
@@ -26,8 +25,10 @@ Cambridge, MA 02139, USA. */
according to HOW, which may be SIG_BLOCK, SIG_UNBLOCK or SIG_SETMASK.
If OSET is not NULL, store the old set of blocked signals in *OSET. */
int
-DEFUN(__sigprocmask, (how, set, oset),
- int how AND CONST sigset_t *set AND sigset_t *oset)
+__sigprocmask (how, set, oset)
+ int how;
+ const sigset_t *set;
+ sigset_t *oset;
{
int mask;
@@ -37,7 +38,7 @@ DEFUN(__sigprocmask, (how, set, oset),
switch (how)
{
case SIG_BLOCK:
- mask = __sigblock(mask);
+ mask = __sigblock (mask);
break;
case SIG_UNBLOCK:
@@ -45,16 +46,16 @@ DEFUN(__sigprocmask, (how, set, oset),
/* Fall through. */
case SIG_SETMASK:
- mask = __sigsetmask(mask);
+ mask = __sigsetmask (mask);
break;
default:
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
}
else
- mask = __sigblock(0);
+ mask = __sigblock (0);
if (oset != NULL)
*oset = mask;
diff --git a/sysdeps/unix/bsd/sigsuspend.c b/sysdeps/unix/bsd/sigsuspend.c
index fff56a950f..4c045aa663 100644
--- a/sysdeps/unix/bsd/sigsuspend.c
+++ b/sysdeps/unix/bsd/sigsuspend.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <signal.h>
#include <stddef.h>
@@ -26,21 +25,22 @@ Cambridge, MA 02139, USA. */
/* Change the set of blocked signals to SET,
wait until a signal arrives, and restore the set of blocked signals. */
int
-DEFUN(sigsuspend, (set), CONST sigset_t *set)
+sigsuspend (set)
+ const sigset_t *set;
{
int mask;
int sig;
if (set == NULL)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
mask = 0;
for (sig = 1; sig <= NSIG; ++sig)
- if (__sigismember(set, sig))
- mask |= sigmask(sig);
+ if (__sigismember (set, sig))
+ mask |= sigmask (sig);
- return __sigpause(mask);
+ return __sigpause (mask);
}
diff --git a/sysdeps/unix/bsd/sun/m68k/sigtramp.c b/sysdeps/unix/bsd/sun/m68k/sigtramp.c
index 32a2c2047e..db9ffb5135 100644
--- a/sysdeps/unix/bsd/sun/m68k/sigtramp.c
+++ b/sysdeps/unix/bsd/sun/m68k/sigtramp.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1996 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
@@ -16,8 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
-
#ifndef __GNUC__
#error This file uses GNU C extensions; you must compile with GCC.
#endif
@@ -52,8 +50,8 @@ Cambridge, MA 02139, USA. */
#include <errno.h>
/* Defined in __sigvec.S. */
-extern int EXFUN(__raw_sigvec, (int sig, CONST struct sigvec *vec,
- struct sigvec *ovec));
+extern int __raw_sigvec (int sig, const struct sigvec *vec,
+ struct sigvec *ovec);
/* User-specified signal handlers. */
#define mytramp 1
@@ -70,8 +68,11 @@ extern __sighandler_t _sigfunc[];
Saves and restores the general regs %g2-%g7, the %y register, and
all the FPU regs (including %fsr), around calling the user's handler. */
static void
-DEFUN(trampoline, (sig, code, context, addr),
- int sig AND int code AND struct sigcontext *context AND PTR addr)
+trampoline (sig, code, context, addr)
+ int sig;
+ int code;
+ struct sigcontext *context;
+ void *addr;
{
int save[4];
@@ -81,7 +82,7 @@ DEFUN(trampoline, (sig, code, context, addr),
/* XXX should save/restore FP regs */
/* Call the user's handler. */
- (*((void EXFUN((*), (int sig, int code, struct sigcontext *context,
+ (*((void (*) __P ((int sig, int code, struct sigcontext *context,
PTR addr))) handlers[sig]))
(sig, code, context, addr);
@@ -95,8 +96,10 @@ DEFUN(trampoline, (sig, code, context, addr),
#endif
int
-DEFUN(__sigvec, (sig, vec, ovec),
- int sig AND CONST struct sigvec *vec AND struct sigvec *ovec)
+__sigvec (sig, vec, ovec)
+ int sig;
+ const struct sigvec *vec;
+ struct sigvec *ovec;
{
#ifndef mytramp
extern void _sigtramp (int);
@@ -108,7 +111,7 @@ DEFUN(__sigvec, (sig, vec, ovec),
if (sig <= 0 || sig >= NSIG)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
diff --git a/sysdeps/unix/bsd/sun/sparc/sigtramp.c b/sysdeps/unix/bsd/sun/sparc/sigtramp.c
index 54f62933a8..11ce1945ff 100644
--- a/sysdeps/unix/bsd/sun/sparc/sigtramp.c
+++ b/sysdeps/unix/bsd/sun/sparc/sigtramp.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1994, 1996 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
@@ -16,8 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
-
#ifndef __GNUC__
#error This file uses GNU C extensions; you must compile with GCC.
#endif
@@ -52,8 +50,8 @@ Cambridge, MA 02139, USA. */
#include <errno.h>
/* Defined in __sigvec.S. */
-extern int EXFUN(__raw_sigvec, (int sig, CONST struct sigvec *vec,
- struct sigvec *ovec));
+extern int __raw_sigvec __P ((int sig, CONST struct sigvec *vec,
+ struct sigvec *ovec));
/* User-specified signal handlers. */
#define mytramp 1
@@ -70,7 +68,8 @@ extern __sighandler_t _sigfunc[];
Saves and restores the general regs %g2-%g7, the %y register, and
all the FPU regs (including %fsr), around calling the user's handler. */
static void
-DEFUN(trampoline, (sig), int sig)
+trampoline (sig)
+ int sig;
{
/* We use `double' and `long long int' so `std' (store doubleword) insns,
which might be faster than single-word stores, will be generated. */
@@ -97,7 +96,7 @@ DEFUN(trampoline, (sig), int sig)
int code;
register struct sigcontext *context asm("%i0"); /* See end of fn. */
- PTR addr;
+ void *addr;
int y;
double fpsave[16];
int fsr;
@@ -147,8 +146,8 @@ DEFUN(trampoline, (sig), int sig)
glsave[2] = g6;
/* Call the user's handler. */
- (*((void EXFUN((*), (int sig, int code, struct sigcontext *context,
- PTR addr))) handlers[sig]))
+ (*((void (*) __P ((int sig, int code, struct sigcontext *context,
+ void *addr))) handlers[sig]))
(sig, code, context, addr);
/* Restore the Y register. */
@@ -199,8 +198,10 @@ DEFUN(trampoline, (sig), int sig)
#endif
int
-DEFUN(__sigvec, (sig, vec, ovec),
- int sig AND CONST struct sigvec *vec AND struct sigvec *ovec)
+__sigvec (sig, vec, ovec)
+ int sig;
+ const struct sigvec *vec;
+ struct sigvec *ovec;
{
#ifndef mytramp
extern void _sigtramp (int);
@@ -212,11 +213,11 @@ DEFUN(__sigvec, (sig, vec, ovec),
if (sig <= 0 || sig >= NSIG)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
- mask = __sigblock(sigmask(sig));
+ mask = __sigblock (sigmask(sig));
ohandler = handlers[sig];
@@ -240,7 +241,7 @@ DEFUN(__sigvec, (sig, vec, ovec),
if (ovec != NULL && ovec->sv_handler == trampoline)
ovec->sv_handler = ohandler;
- (void) __sigsetmask(mask);
+ (void) __sigsetmask (mask);
return 0;
}
diff --git a/sysdeps/unix/bsd/sun/sunos4/speed.c b/sysdeps/unix/bsd/sun/sunos4/speed.c
index 1c09d55dab..de6870a51d 100644
--- a/sysdeps/unix/bsd/sun/sunos4/speed.c
+++ b/sysdeps/unix/bsd/sun/sunos4/speed.c
@@ -1,5 +1,5 @@
/* `struct termios' speed frobnication functions. SunOS 4 version.
-Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
+Copyright (C) 1991, 1992, 1993, 1996 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,12 +17,11 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <stddef.h>
#include <errno.h>
#include <termios.h>
-static CONST speed_t speeds[] =
+static const speed_t speeds[] =
{
0,
50,
@@ -45,28 +44,31 @@ static CONST speed_t speeds[] =
/* Return the output baud rate stored in *TERMIOS_P. */
speed_t
-DEFUN(cfgetospeed, (termios_p), CONST struct termios *termios_p)
+cfgetospeed (termios_p)
+ const struct termios *termios_p;
{
return termios_p->c_cflag & CBAUD;
}
/* Return the input baud rate stored in *TERMIOS_P. */
speed_t
-DEFUN(cfgetispeed, (termios_p), CONST struct termios *termios_p)
+cfgetispeed (termios_p)
+ const struct termios *termios_p;
{
return (termios_p->c_cflag & CIBAUD) >> IBSHIFT;
}
/* Set the output baud rate stored in *TERMIOS_P to SPEED. */
int
-DEFUN(cfsetospeed, (termios_p, speed),
- struct termios *termios_p AND speed_t speed)
+cfsetospeed (termios_p, speed)
+ struct termios *termios_p;
+ speed_t speed;
{
register unsigned int i;
if (termios_p == NULL)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
@@ -82,20 +84,21 @@ DEFUN(cfsetospeed, (termios_p, speed),
return 0;
}
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
/* Set the input baud rate stored in *TERMIOS_P to SPEED. */
int
-DEFUN(cfsetispeed, (termios_p, speed),
- struct termios *termios_p AND speed_t speed)
+cfsetispeed (termios_p, speed)
+ struct termios *termios_p;
+ speed_t speed;
{
register unsigned int i;
if (termios_p == NULL)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
@@ -108,6 +111,6 @@ DEFUN(cfsetispeed, (termios_p, speed),
return 0;
}
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
diff --git a/sysdeps/unix/bsd/sun/sunos4/tcsetattr.c b/sysdeps/unix/bsd/sun/sunos4/tcsetattr.c
index f88951ff9d..f825d41ab8 100644
--- a/sysdeps/unix/bsd/sun/sunos4/tcsetattr.c
+++ b/sysdeps/unix/bsd/sun/sunos4/tcsetattr.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
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 <termios.h>
@@ -24,8 +23,10 @@ Cambridge, MA 02139, USA. */
/* Set the state of FD to *TERMIOS_P. */
int
-DEFUN(tcsetattr, (fd, optional_actions, termios_p),
- int fd AND int optional_actions AND CONST struct termios *termios_p)
+tcsetattr (fd, optional_actions, termios_p)
+ int fd;
+ int optional_actions;
+ const struct termios *termios_p;
{
unsigned long cmd;
@@ -41,7 +42,7 @@ DEFUN(tcsetattr, (fd, optional_actions, termios_p),
cmd = TCSETSF;
break;
default:
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
diff --git a/sysdeps/unix/bsd/tcdrain.c b/sysdeps/unix/bsd/tcdrain.c
index c9ed18d4f8..84bc06813d 100644
--- a/sysdeps/unix/bsd/tcdrain.c
+++ b/sysdeps/unix/bsd/tcdrain.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
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 <termios.h>
@@ -26,13 +25,14 @@ Cambridge, MA 02139, USA. */
/* Wait for pending output to be written on FD. */
int
-DEFUN(tcdrain, (fd), int fd)
+__libc_tcdrain (int fd)
{
/* The TIOCSETP control waits for pending output to be written before
affecting its changes, so we use that without changing anything. */
struct sgttyb b;
- if (__ioctl(fd, TIOCGETP, (PTR) &b) < 0 ||
- __ioctl(fd, TIOCSETP, (PTR) &b) < 0)
+ if (__ioctl (fd, TIOCGETP, (void *) &b) < 0 ||
+ __ioctl (fd, TIOCSETP, (void *) &b) < 0)
return -1;
return 0;
}
+weak_alias (__libc_tcdrain, tcdrain)
diff --git a/sysdeps/unix/bsd/tcflow.c b/sysdeps/unix/bsd/tcflow.c
index 06de144a45..1919d6d9ea 100644
--- a/sysdeps/unix/bsd/tcflow.c
+++ b/sysdeps/unix/bsd/tcflow.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
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 <termios.h>
@@ -26,14 +25,16 @@ Cambridge, MA 02139, USA. */
/* Suspend or restart transmission on FD. */
int
-DEFUN(tcflow, (fd, action), int fd AND int action)
+tcflow (fd, action)
+ int fd;
+ int action;
{
switch (action)
{
case TCOOFF:
- return __ioctl(fd, TIOCSTOP, (PTR) NULL);
+ return __ioctl (fd, TIOCSTOP, (PTR) NULL);
case TCOON:
- return __ioctl(fd, TIOCSTART, (PTR) NULL);
+ return __ioctl (fd, TIOCSTART, (PTR) NULL);
case TCIOFF:
case TCION:
@@ -42,7 +43,7 @@ DEFUN(tcflow, (fd, action), int fd AND int action)
`write'. Is there another way to do this? */
struct termios attr;
unsigned char c;
- if (tcgetattr(fd, &attr) < 0)
+ if (tcgetattr (fd, &attr) < 0)
return -1;
c = attr.c_cc[action == TCIOFF ? VSTOP : VSTART];
if (c != _POSIX_VDISABLE && write (fd, &c, 1) < 1)
@@ -51,7 +52,7 @@ DEFUN(tcflow, (fd, action), int fd AND int action)
}
default:
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
}
diff --git a/sysdeps/unix/bsd/tcflush.c b/sysdeps/unix/bsd/tcflush.c
index 46454b8229..14f7db8dad 100644
--- a/sysdeps/unix/bsd/tcflush.c
+++ b/sysdeps/unix/bsd/tcflush.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
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 <termios.h>
@@ -26,7 +25,9 @@ Cambridge, MA 02139, USA. */
/* Flush pending data on FD. */
int
-DEFUN(tcflush, (fd, queue_selector), int fd AND int queue_selector)
+tcflush (fd, queue_selector)
+ int fd;
+ int queue_selector;
{
int arg;
@@ -42,7 +43,7 @@ DEFUN(tcflush, (fd, queue_selector), int fd AND int queue_selector)
arg = FREAD | FWRITE;
break;
default:
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
diff --git a/sysdeps/unix/bsd/tcgetattr.c b/sysdeps/unix/bsd/tcgetattr.c
index 0e6e3785dd..5d17bd5dde 100644
--- a/sysdeps/unix/bsd/tcgetattr.c
+++ b/sysdeps/unix/bsd/tcgetattr.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1995, 1996 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
@@ -16,19 +16,19 @@ License along with the GNU C Library; see the file COPYING.LIB. If
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 <termios.h>
#include "bsdtty.h"
-extern CONST speed_t __bsd_speeds[]; /* Defined in tcsetattr.c. */
+extern const speed_t __bsd_speeds[]; /* Defined in tcsetattr.c. */
/* Put the state of FD into *TERMIOS_P. */
int
-DEFUN(__tcgetattr, (fd, termios_p),
- int fd AND struct termios *termios_p)
+__tcgetattr (fd, termios_p)
+ int fd;
+ struct termios *termios_p;
{
struct sgttyb buf;
struct tchars tchars;
@@ -40,7 +40,7 @@ DEFUN(__tcgetattr, (fd, termios_p),
if (termios_p == NULL)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
diff --git a/sysdeps/unix/bsd/tcsetattr.c b/sysdeps/unix/bsd/tcsetattr.c
index e731d830f6..770bc98b79 100644
--- a/sysdeps/unix/bsd/tcsetattr.c
+++ b/sysdeps/unix/bsd/tcsetattr.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1993 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1993, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
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 <termios.h>
@@ -24,7 +23,7 @@ Cambridge, MA 02139, USA. */
#include "bsdtty.h"
-CONST speed_t __bsd_speeds[] =
+const speed_t __bsd_speeds[] =
{
0,
50,
@@ -47,8 +46,10 @@ CONST speed_t __bsd_speeds[] =
/* Set the state of FD to *TERMIOS_P. */
int
-DEFUN(tcsetattr, (fd, optional_actions, termios_p),
- int fd AND int optional_actions AND CONST struct termios *termios_p)
+tcsetattr (fd, optional_actions, termios_p)
+ int fd;
+ int optional_actions;
+ const struct termios *termios_p;
{
struct sgttyb buf;
struct tchars tchars;
@@ -59,18 +60,18 @@ DEFUN(tcsetattr, (fd, optional_actions, termios_p),
#endif
size_t i;
- if (__ioctl(fd, TIOCGETP, &buf) < 0 ||
- __ioctl(fd, TIOCGETC, &tchars) < 0 ||
- __ioctl(fd, TIOCGLTC, &ltchars) < 0 ||
+ if (__ioctl (fd, TIOCGETP, &buf) < 0 ||
+ __ioctl (fd, TIOCGETC, &tchars) < 0 ||
+ __ioctl (fd, TIOCGLTC, &ltchars) < 0 ||
#ifdef TIOCGETX
- __ioctl(fd, TIOCGETX, &extra) < 0 ||
+ __ioctl (fd, TIOCGETX, &extra) < 0 ||
#endif
- __ioctl(fd, TIOCLGET, &local) < 0)
+ __ioctl (fd, TIOCLGET, &local) < 0)
return -1;
if (termios_p == NULL)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
switch (optional_actions)
@@ -78,15 +79,15 @@ DEFUN(tcsetattr, (fd, optional_actions, termios_p),
case TCSANOW:
break;
case TCSADRAIN:
- if (tcdrain(fd) < 0)
+ if (tcdrain (fd) < 0)
return -1;
break;
case TCSAFLUSH:
- if (tcflush(fd, TCIFLUSH) < 0)
+ if (tcflush (fd, TCIFLUSH) < 0)
return -1;
break;
default:
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
@@ -100,7 +101,7 @@ DEFUN(tcsetattr, (fd, optional_actions, termios_p),
}
if (buf.sg_ispeed == -1 || buf.sg_ospeed == -1)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
@@ -174,13 +175,13 @@ DEFUN(tcsetattr, (fd, optional_actions, termios_p),
tchars.t_startc = termios_p->c_cc[VSTART];
tchars.t_stopc = termios_p->c_cc[VSTOP];
- if (__ioctl(fd, TIOCSETP, &buf) < 0 ||
- __ioctl(fd, TIOCSETC, &tchars) < 0 ||
- __ioctl(fd, TIOCSLTC, &ltchars) < 0 ||
+ if (__ioctl (fd, TIOCSETP, &buf) < 0 ||
+ __ioctl (fd, TIOCSETC, &tchars) < 0 ||
+ __ioctl (fd, TIOCSLTC, &ltchars) < 0 ||
#ifdef TIOCGETX
- __ioctl(fd, TIOCSETX, &extra) < 0 ||
+ __ioctl (fd, TIOCSETX, &extra) < 0 ||
#endif
- __ioctl(fd, TIOCLSET, &local) < 0)
+ __ioctl (fd, TIOCLSET, &local) < 0)
return -1;
return 0;
}
diff --git a/sysdeps/unix/bsd/times.c b/sysdeps/unix/bsd/times.c
index edf3e90972..8277ce5a76 100644
--- a/sysdeps/unix/bsd/times.c
+++ b/sysdeps/unix/bsd/times.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1993, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 92, 93, 95, 96 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
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 <sys/times.h>
@@ -31,7 +30,8 @@ extern time_t _posix_start_time;
__inline
#endif
static clock_t
-DEFUN(timeval_to_clock_t, (tv), CONST struct timeval *tv)
+timeval_to_clock_t (tv)
+ const struct timeval *tv;
{
return (clock_t) ((tv->tv_sec * CLK_TCK) +
(tv->tv_usec * CLK_TCK / 1000000L));
@@ -42,27 +42,28 @@ DEFUN(timeval_to_clock_t, (tv), CONST struct timeval *tv)
Return the elapsed real time, or (clock_t) -1 for errors.
All times are in CLK_TCKths of a second. */
clock_t
-DEFUN(__times, (buffer), struct tms *buffer)
+__times (buffer)
+ struct tms *buffer;
{
struct rusage usage;
if (buffer == NULL)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return (clock_t) -1;
}
- if (__getrusage(RUSAGE_SELF, &usage) < 0)
+ if (__getrusage (RUSAGE_SELF, &usage) < 0)
return (clock_t) -1;
- buffer->tms_utime = (clock_t) timeval_to_clock_t(&usage.ru_utime);
- buffer->tms_stime = (clock_t) timeval_to_clock_t(&usage.ru_stime);
+ buffer->tms_utime = (clock_t) timeval_to_clock_t (&usage.ru_utime);
+ buffer->tms_stime = (clock_t) timeval_to_clock_t (&usage.ru_stime);
- if (__getrusage(RUSAGE_CHILDREN, &usage) < 0)
+ if (__getrusage (RUSAGE_CHILDREN, &usage) < 0)
return (clock_t) -1;
- buffer->tms_cutime = (clock_t) timeval_to_clock_t(&usage.ru_utime);
- buffer->tms_cstime = (clock_t) timeval_to_clock_t(&usage.ru_stime);
+ buffer->tms_cutime = (clock_t) timeval_to_clock_t (&usage.ru_utime);
+ buffer->tms_cstime = (clock_t) timeval_to_clock_t (&usage.ru_stime);
- return (time((time_t *) NULL) - _posix_start_time) * CLK_TCK;
+ return (time ((time_t *) NULL) - _posix_start_time) * CLK_TCK;
}
weak_alias (__times, times)
diff --git a/sysdeps/unix/bsd/ulimit.c b/sysdeps/unix/bsd/ulimit.c
index 912faf42e2..f90692a11c 100644
--- a/sysdeps/unix/bsd/ulimit.c
+++ b/sysdeps/unix/bsd/ulimit.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1994, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <sysdep.h>
#include <sys/resource.h>
#include <unistd.h>
@@ -37,8 +36,9 @@ extern int _etext;
can open.
Returns -1 on errors. */
long int
-DEFUN(ulimit, (cmd, newlimit),
- int cmd AND long int newlimit)
+ulimit (cmd, newlimit)
+ int cmd;
+ long int newlimit;
{
int status;
@@ -49,7 +49,7 @@ DEFUN(ulimit, (cmd, newlimit),
/* Get limit on file size. */
struct rlimit fsize;
- status = getrlimit(RLIMIT_FSIZE, &fsize);
+ status = getrlimit (RLIMIT_FSIZE, &fsize);
if (status < 0)
return -1;
@@ -62,25 +62,25 @@ DEFUN(ulimit, (cmd, newlimit),
struct rlimit fsize;
fsize.rlim_cur = newlimit * 512;
fsize.rlim_max = newlimit * 512;
-
- return setrlimit(RLIMIT_FSIZE, &fsize);
+
+ return setrlimit (RLIMIT_FSIZE, &fsize);
}
case 3:
/* Get maximum address for `brk'. */
{
struct rlimit dsize;
- status = getrlimit(RLIMIT_DATA, &dsize);
+ status = getrlimit (RLIMIT_DATA, &dsize);
if (status < 0)
return -1;
return ((long int) &_etext) + dsize.rlim_cur;
}
case 4:
- return sysconf(_SC_OPEN_MAX);
+ return sysconf (_SC_OPEN_MAX);
default:
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
}
diff --git a/sysdeps/unix/bsd/ultrix4/mips/start.S b/sysdeps/unix/bsd/ultrix4/mips/start.S
index 24bcbb4e00..aec5885252 100644
--- a/sysdeps/unix/bsd/ultrix4/mips/start.S
+++ b/sysdeps/unix/bsd/ultrix4/mips/start.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc.
Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
@@ -18,6 +18,7 @@ Cambridge, MA 02139, USA. */
#include <sysdep.h>
+__errno:
.comm errno, 4
ENTRY(__start)
diff --git a/sysdeps/unix/bsd/ultrix4/sysconf.c b/sysdeps/unix/bsd/ultrix4/sysconf.c
index a9f3c5bbbe..a24c1c5ce8 100644
--- a/sysdeps/unix/bsd/ultrix4/sysconf.c
+++ b/sysdeps/unix/bsd/ultrix4/sysconf.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995, 1996 Free Software Foundation, Inc.
Contributed by Ian Lance Taylor (ian@airs.com).
The GNU C Library is free software; you can redistribute it and/or
@@ -20,20 +20,19 @@ Cambridge, MA 02139, USA. */
value for _SC_CHILD_MAX. Everything else is from <sys/param.h>,
which the default sysconf already knows how to handle. */
-#include <ansidecl.h>
#include <unistd.h>
#include <errno.h>
/* This is an Ultrix header file. */
#include <sys/sysinfo.h>
-extern int EXFUN(__getsysinfo, (unsigned int op, void *buffer,
- size_t nbytes, int *start,
- void *arg));
-extern long int EXFUN(__default_sysconf, (int name));
+extern int __getsysinfo __P ((unsigned int op, void *buffer,
+ size_t nbytes, int *start, void *arg));
+extern long int __default_sysconf __P ((int name));
long int
-DEFUN(__sysconf, (name), int name)
+__sysconf (name)
+ int name;
{
if (name == _SC_CHILD_MAX)
{
@@ -46,11 +45,11 @@ DEFUN(__sysconf, (name), int name)
if (__getsysinfo (GSI_MAX_UPROCS, &ret, sizeof (ret), &start,
(void *) 0) > 0)
{
- errno = save;
+ __set_errno (save);
return ret;
}
- errno = save;
+ __set_errno (save);
}
return __default_sysconf (name);
diff --git a/sysdeps/unix/closedir.c b/sysdeps/unix/closedir.c
index 5b938a8272..a46d47ac35 100644
--- a/sysdeps/unix/closedir.c
+++ b/sysdeps/unix/closedir.c
@@ -32,7 +32,7 @@ __closedir (DIR *dirp)
if (dirp == NULL)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
diff --git a/sysdeps/unix/common/lxstat.c b/sysdeps/unix/common/lxstat.c
index 499a0838ac..f33279979a 100644
--- a/sysdeps/unix/common/lxstat.c
+++ b/sysdeps/unix/common/lxstat.c
@@ -28,7 +28,7 @@ __lxstat (int vers, const char *file, struct stat *buf)
{
if (vers != _STAT_VER)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
diff --git a/sysdeps/unix/common/pause.c b/sysdeps/unix/common/pause.c
index b2fafb958e..a073dd2b3a 100644
--- a/sysdeps/unix/common/pause.c
+++ b/sysdeps/unix/common/pause.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <signal.h>
#include <unistd.h>
@@ -25,7 +24,8 @@ Cambridge, MA 02139, USA. */
This always returns -1 and sets errno to EINTR. */
int
-DEFUN_VOID(pause)
+__libc_pause (void)
{
- return __sigpause(__sigblock(0));
+ return __sigpause (__sigblock (0));
}
+weak_alias (__libc_pause, pause)
diff --git a/sysdeps/unix/common/tcsendbrk.c b/sysdeps/unix/common/tcsendbrk.c
index 348321a492..7d768267c4 100644
--- a/sysdeps/unix/common/tcsendbrk.c
+++ b/sysdeps/unix/common/tcsendbrk.c
@@ -40,8 +40,7 @@ tcsendbreak (int fd, int duration)
/* ioctl can't send a break of any other duration for us.
This could be changed to use trickery (e.g. lower speed and
send a '\0') to send the break, but for now just return an error. */
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
#endif
}
-
diff --git a/sysdeps/unix/fxstat.c b/sysdeps/unix/fxstat.c
index 522d3fd052..29cab5177c 100644
--- a/sysdeps/unix/fxstat.c
+++ b/sysdeps/unix/fxstat.c
@@ -29,7 +29,7 @@ __fxstat (int vers, int fd, struct stat *buf)
{
if (vers != _STAT_VER)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
diff --git a/sysdeps/unix/getdents.c b/sysdeps/unix/getdents.c
index 485faa13c2..6dec0dc5b5 100644
--- a/sysdeps/unix/getdents.c
+++ b/sysdeps/unix/getdents.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1995, 1996 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
@@ -16,15 +16,16 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <stddef.h>
-#include <errno.h>
#include <sys/types.h>
#include <unistd.h>
int
-DEFUN(__getdirentries, (fd, buf, nbytes, basep),
- int fd AND char *buf AND size_t nbytes AND off_t *basep)
+__getdirentries (fd, buf, nbytes, basep)
+ int fd;
+ char *buf;
+ size_t nbytes;
+ off_t *basep;
{
if (basep)
*basep = __lseek (fd, (off_t) 0, SEEK_CUR);
@@ -33,4 +34,3 @@ DEFUN(__getdirentries, (fd, buf, nbytes, basep),
}
weak_alias (__getdirentries, getdirentries)
-
diff --git a/sysdeps/unix/getlogin.c b/sysdeps/unix/getlogin.c
index e23ffa46f5..ef985f2d2f 100644
--- a/sysdeps/unix/getlogin.c
+++ b/sysdeps/unix/getlogin.c
@@ -58,7 +58,7 @@ getlogin (void)
{
if (errno == ESRCH)
/* The caller expects ENOENT if nothing is found. */
- errno = ENOENT;
+ __set_errno (ENOENT);
result = NULL;
}
else
diff --git a/sysdeps/unix/getlogin_r.c b/sysdeps/unix/getlogin_r.c
index 154a9d3a59..f80b2c7518 100644
--- a/sysdeps/unix/getlogin_r.c
+++ b/sysdeps/unix/getlogin_r.c
@@ -53,7 +53,7 @@ getlogin_r (name, name_len)
if (result < 0)
{
- errno = err;
+ __set_errno (err);
return err;
}
}
diff --git a/sysdeps/unix/mkdir.c b/sysdeps/unix/mkdir.c
index 16713f9e48..ff87f9a74f 100644
--- a/sysdeps/unix/mkdir.c
+++ b/sysdeps/unix/mkdir.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1994, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1994, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
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 <sys/stat.h>
@@ -27,7 +26,9 @@ Cambridge, MA 02139, USA. */
/* Create a directory named PATH with protections MODE. */
int
-DEFUN(__mkdir, (path, mode), CONST char *path AND mode_t mode)
+__mkdir (path, mode)
+ const char *path;
+ mode_t mode;
{
char *cmd = __alloca (80 + strlen (path));
char *p;
@@ -38,7 +39,7 @@ DEFUN(__mkdir, (path, mode), CONST char *path AND mode_t mode)
if (path == NULL)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
@@ -51,7 +52,7 @@ DEFUN(__mkdir, (path, mode), CONST char *path AND mode_t mode)
}
else
{
- errno = EEXIST;
+ __set_errno (EEXIST);
return -1;
}
@@ -83,11 +84,11 @@ DEFUN(__mkdir, (path, mode), CONST char *path AND mode_t mode)
/* If system doesn't set errno, but the mkdir fails, we really
have no idea what went wrong. EIO is the vaguest error I
can think of, so I'll use that. */
- errno = EIO;
+ __set_errno (EIO);
status = system (cmd);
if (WIFEXITED (status) && WEXITSTATUS (status) == 0)
{
- errno = save;
+ __set_errno (save);
return 0;
}
else
diff --git a/sysdeps/unix/mman/syscalls.list b/sysdeps/unix/mman/syscalls.list
index 2211e8fa3c..a5f44e465b 100644
--- a/sysdeps/unix/mman/syscalls.list
+++ b/sysdeps/unix/mman/syscalls.list
@@ -3,5 +3,5 @@
madvise - madvise 3 madvise
mmap - mmap 6 __mmap mmap
mprotect - mprotect 3 __mprotect mprotect
-msync - msync 2 msync
+msync - msync 2 __libc_msync msync
munmap - munmap 2 __munmap munmap
diff --git a/sysdeps/unix/nice.c b/sysdeps/unix/nice.c
index 01f1412adf..d5a44e5d64 100644
--- a/sysdeps/unix/nice.c
+++ b/sysdeps/unix/nice.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <unistd.h>
#include <sys/resource.h>
@@ -24,21 +23,22 @@ Cambridge, MA 02139, USA. */
/* Increment the scheduling priority of the calling process by INCR.
The superuser may use a negative INCR to decrement the priority. */
int
-DEFUN(nice, (incr), int incr)
+nice (incr)
+ int incr;
{
int save;
int prio;
/* -1 is a valid priority, so we use errno to check for an error. */
save = errno;
- errno = 0;
+ __set_errno (0);
prio = getpriority (PRIO_PROCESS, 0);
if (prio == -1)
{
if (errno != 0)
return -1;
else
- errno = save;
+ __set_errno (save);
}
return setpriority (PRIO_PROCESS, 0, prio + incr);
diff --git a/sysdeps/unix/nlist.c b/sysdeps/unix/nlist.c
index 5389f65e89..b40aedbc82 100644
--- a/sysdeps/unix/nlist.c
+++ b/sysdeps/unix/nlist.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1996 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 modify
@@ -15,7 +15,6 @@ You should have received a copy of the GNU General Public License
along with the GNU C Library; see the file COPYING. If not, write to
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <a.out.h>
#include <stdio.h>
@@ -27,8 +26,9 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
which is terminated by an element with a NULL `n_un.n_name' member,
and fill in the elements of NL. */
int
-DEFUN(nlist, (file, nl),
- CONST char *file AND struct nlist *nl)
+nlist (file, nl)
+ const char *file;
+ struct nlist *nl;
{
FILE *f;
struct exec header;
@@ -40,52 +40,53 @@ DEFUN(nlist, (file, nl),
if (nl == NULL)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
- f = fopen(file, "r");
+ f = fopen (file, "r");
if (f == NULL)
return -1;
- if (fread((PTR) &header, sizeof(header), 1, f) != 1)
+ if (fread ((void *) &header, sizeof (header), 1, f) != 1)
goto lose;
- if (fseek(f, N_SYMOFF(header), SEEK_SET) != 0)
+ if (fseek (f, N_SYMOFF (header), SEEK_SET) != 0)
goto lose;
- symbols = (struct nlist *) __alloca(header.a_syms);
- nsymbols = header.a_syms / sizeof(symbols[0]);
+ symbols = (struct nlist *) __alloca (header.a_syms);
+ nsymbols = header.a_syms / sizeof (symbols[0]);
- if (fread((PTR) symbols, sizeof(symbols[0]), nsymbols, f) != nsymbols)
+ if (fread ((void *) symbols, sizeof (symbols[0]), nsymbols, f) != nsymbols)
goto lose;
- if (fread((PTR) &string_table_size, sizeof(string_table_size), 1, f) != 1)
+ if (fread ((void *) &string_table_size, sizeof (string_table_size), 1, f)
+ != 1)
goto lose;
- string_table_size -= sizeof(string_table_size);
+ string_table_size -= sizeof (string_table_size);
- string_table = (char *) __alloca(string_table_size);
- if (fread((PTR) string_table, string_table_size, 1, f) != 1)
+ string_table = (char *) __alloca (string_table_size);
+ if (fread ((void *) string_table, string_table_size, 1, f) != 1)
goto lose;
for (i = 0; i < nsymbols; ++i)
{
register struct nlist *nlp;
for (nlp = nl; nlp->n_un.n_name != NULL; ++nlp)
- if (!strcmp(nlp->n_un.n_name,
- &string_table[symbols[i].n_un.n_strx -
- sizeof(string_table_size)]))
+ if (!strcmp (nlp->n_un.n_name,
+ &string_table[symbols[i].n_un.n_strx -
+ sizeof (string_table_size)]))
{
- char *CONST name = nlp->n_un.n_name;
+ char *const name = nlp->n_un.n_name;
*nlp = symbols[i];
nlp->n_un.n_name = name;
}
}
- (void) fclose(f);
+ (void) fclose (f);
return 0;
lose:;
- (void) fclose(f);
+ (void) fclose (f);
return -1;
}
diff --git a/sysdeps/unix/opendir.c b/sysdeps/unix/opendir.c
index 7161cec6e9..c38c8d478a 100644
--- a/sysdeps/unix/opendir.c
+++ b/sysdeps/unix/opendir.c
@@ -41,7 +41,7 @@ __opendir (const char *name)
{
/* POSIX.1-1990 says an empty name gets ENOENT;
but `open' might like it fine. */
- errno = ENOENT;
+ __set_errno (ENOENT);
return NULL;
}
@@ -56,7 +56,7 @@ __opendir (const char *name)
goto lose;
if (! S_ISDIR (statbuf.st_mode))
{
- errno = ENOTDIR;
+ __set_errno (ENOTDIR);
goto lose;
}
@@ -66,7 +66,7 @@ __opendir (const char *name)
{
int save = errno;
(void) __close (fd);
- errno = save;
+ __set_errno (save);
return NULL;
}
@@ -85,7 +85,7 @@ __opendir (const char *name)
int save = errno;
free (dirp);
(void) __close (fd);
- errno = save;
+ __set_errno (save);
return NULL;
}
diff --git a/sysdeps/unix/readdir.c b/sysdeps/unix/readdir.c
index 46f2caff87..491469bcd1 100644
--- a/sysdeps/unix/readdir.c
+++ b/sysdeps/unix/readdir.c
@@ -36,7 +36,7 @@ __readdir (DIR *dirp)
if (dirp == NULL || dirp->data == NULL)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return NULL;
}
diff --git a/sysdeps/unix/rmdir.c b/sysdeps/unix/rmdir.c
index 52a130ce3e..7bb40211c1 100644
--- a/sysdeps/unix/rmdir.c
+++ b/sysdeps/unix/rmdir.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
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 <sys/stat.h>
@@ -27,7 +26,8 @@ Cambridge, MA 02139, USA. */
/* Create a directory named PATH with protections MODE. */
int
-DEFUN(__rmdir, (path), CONST char *path)
+__rmdir (path)
+ const char *path;
{
char *cmd = __alloca (80 + strlen (path));
char *p;
@@ -37,7 +37,7 @@ DEFUN(__rmdir, (path), CONST char *path)
if (path == NULL)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
@@ -46,7 +46,7 @@ DEFUN(__rmdir, (path), CONST char *path)
return -1;
if (!S_ISDIR (statbuf.st_mode))
{
- errno = ENOTDIR;
+ __set_errno (ENOTDIR);
return -1;
}
@@ -64,12 +64,12 @@ DEFUN(__rmdir, (path), CONST char *path)
/* If system doesn't set errno, but the rmdir fails, we really
have no idea what went wrong. EIO is the vaguest error I
can think of, so I'll use that. */
- errno = EIO;
+ __set_errno (EIO);
status = system (cmd);
if (WIFEXITED (status) && WEXITSTATUS (status) == 0)
{
return 0;
- errno = save;
+ __set_errno (save);
}
else
return -1;
diff --git a/sysdeps/unix/sparc/start.c b/sysdeps/unix/sparc/start.c
index f8567d2103..6c18b5c09c 100644
--- a/sysdeps/unix/sparc/start.c
+++ b/sysdeps/unix/sparc/start.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 92, 93, 94, 95, 96 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
@@ -40,7 +40,9 @@ int __data_start = 0;
weak_alias (__data_start, data_start)
#endif
-VOLATILE int errno;
+VOLATILE int __errno;
+strong_alias (__errno, errno)
+
extern void EXFUN(__libc_init, (int argc, char **argv, char **envp));
extern int EXFUN(main, (int argc, char **argv, char **envp));
@@ -117,7 +119,7 @@ DEFUN_VOID(init_shlib)
caddr_t sobssmap;
void (*ldstart) (int, int);
struct exec soexec;
- struct
+ struct
{
caddr_t crt_ba;
int crt_dzfd;
@@ -126,7 +128,7 @@ DEFUN_VOID(init_shlib)
char **crt_ep;
caddr_t crt_bp;
} soarg;
-
+
/* If not dynamically linked, do nothing. */
if (&_DYNAMIC == 0)
return;
@@ -137,7 +139,7 @@ DEFUN_VOID(init_shlib)
|| soexec.a_magic != ZMAGIC)
{
static CONST char emsg[] = "crt0: no /usr/lib/ld.so\n";
-
+
syscall (SYS_write, 2, emsg, sizeof (emsg) - 1);
syscall (SYS_exit, 127);
}
@@ -165,7 +167,7 @@ DEFUN_VOID(init_shlib)
soarg.crt_dp = &_DYNAMIC;
soarg.crt_ep = __environ;
soarg.crt_bp = (caddr_t) &&retaddr;
-
+
ldstart = (__typeof (ldstart)) (somap + soexec.a_entry);
(*ldstart) (1, (char *) &soarg - (char *) sp);
diff --git a/sysdeps/unix/start.c b/sysdeps/unix/start.c
index e58bb3804d..8112d2142a 100644
--- a/sysdeps/unix/start.c
+++ b/sysdeps/unix/start.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1993, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1993, 1995, 1996 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 modify
@@ -15,7 +15,6 @@ You should have received a copy of the GNU General Public License
along with the GNU C Library; see the file COPYING. If not, write to
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <stdlib.h>
#include <unistd.h>
@@ -36,11 +35,12 @@ weak_alias (__data_start, data_start)
#endif
#ifndef errno
-volatile int errno;
+volatile int __errno;
+string_alias (__errno, errno)
#endif
-extern void EXFUN(__libc_init, (int argc, char **argv, char **envp));
-extern int EXFUN(main, (int argc, char **argv, char **envp));
+extern void __libc_init __P ((int argc, char **argv, char **envp));
+extern int main __P ((int argc, char **argv, char **envp));
/* Not a prototype because it gets called strangely. */
@@ -51,9 +51,9 @@ static void start1();
/* N.B.: It is important that this be the first function.
This file is the first thing in the text section. */
void
-DEFUN_VOID(_start)
+_start ()
{
- start1();
+ start1 ();
}
#ifndef NO_UNDERSCORES
diff --git a/sysdeps/unix/stime.c b/sysdeps/unix/stime.c
index be928e8f39..869a28ad2e 100644
--- a/sysdeps/unix/stime.c
+++ b/sysdeps/unix/stime.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1996 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
@@ -16,20 +16,20 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <sys/time.h>
/* Set the system clock to *WHEN. */
int
-DEFUN(stime, (when), CONST time_t *when)
+stime (when)
+ const time_t *when;
{
struct timeval tv;
if (when == NULL)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
diff --git a/sysdeps/unix/syscalls.list b/sysdeps/unix/syscalls.list
index 0da9d17b07..fba1245730 100644
--- a/sysdeps/unix/syscalls.list
+++ b/sysdeps/unix/syscalls.list
@@ -6,12 +6,13 @@ chdir - chdir 1 __chdir chdir
chmod - chmod 2 __chmod chmod
chown - chown 3 __chown chown
chroot - chroot 1 chroot
-close - close 1 __close close
+close - close 1 __libc_close __close close
dup - dup 2 __dup dup
dup2 - dup2 2 __dup2 dup2
fchdir - fchdir 1 fchdir
-fcntl - fcntl 3 __fcntl fcntl
-fsync - fsync 1 fsync
+fcntl - fcntl 3 __libc_fcntl __fcntl fcntl
+fstatfs - fstatfs 2 __fstatfs fstatfs
+fsync - fsync 1 __libc_fsync fsync
getdomain - getdomainname 2 getdomainname
getgid - getgid 0 __getgid getgid
getgroups - getgroups 2 __getgroups getgroups
@@ -23,12 +24,12 @@ getuid - getuid 0 __getuid getuid
ioctl - ioctl 3 __ioctl ioctl
kill - kill 2 __kill kill
link - link 2 __link link
-lseek - lseek 3 __lseek lseek
+lseek - lseek 3 __libc_lseek __lseek lseek
mkdir - mkdir 2 __mkdir mkdir
-open - open 3 __open open
+open - open 3 __libc_open __open open
profil - profil 4 profil
ptrace - ptrace 4 ptrace
-read - read 3 __read read
+read - read 3 __libc_read __read read
readlink - readlink 3 __readlink readlink
readv - readv 3 readv
reboot - reboot 1 reboot
@@ -48,6 +49,7 @@ settimeofday - settimeofday 2 __settimeofday settimeofday
setuid - setuid 1 __setuid setuid
sigsuspend - sigsuspend 1 sigsuspend
sstk - sstk 1 sstk
+statfs - statfs 2 __statfs statfs
swapoff - swapoff 1 swapoff
swapon - swapon 1 swapon
symlink - symlink 2 __symlink symlink
@@ -55,11 +57,9 @@ sync - sync 0 sync
sys_fstat fxstat fstat 2 __syscall_fstat
sys_mknod xmknod mknod 3 __syscall_mknod
sys_stat xstat stat 2 __syscall_stat
-statfs - statfs 2 __statfs statfs
-fstatfs - fstatfs 2 __fstatfs fstatfs
umask - umask 1 __umask umask
uname - uname 1 uname
unlink - unlink 1 __unlink unlink
utimes - utimes 2 __utimes utimes
-write - write 3 __write write
+write - write 3 __libc_write __write write
writev - writev 3 writev
diff --git a/sysdeps/unix/sysv/irix4/getpriority.c b/sysdeps/unix/sysv/irix4/getpriority.c
index 70a9431890..6ba6219791 100644
--- a/sysdeps/unix/sysv/irix4/getpriority.c
+++ b/sysdeps/unix/sysv/irix4/getpriority.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <sys/resource.h>
#include <sys/sysmp.h>
@@ -28,8 +27,9 @@ extern int __sysmp __P ((int, ...));
or user (as specified by WHO) is used. A lower priority number means higher
priority. Priorities range from PRIO_MIN to PRIO_MAX. */
int
-DEFUN(getpriority, (which, who),
- enum __priority_which which AND int who)
+getpriority (which, who)
+ enum __priority_which which;
+ int who;
{
switch (which)
{
@@ -41,6 +41,6 @@ DEFUN(getpriority, (which, who),
return __sysmp (MP_SCHED, MPTS_GTNICE_USER, who);
}
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
diff --git a/sysdeps/unix/sysv/irix4/setpriority.c b/sysdeps/unix/sysv/irix4/setpriority.c
index a632953423..322813a7dd 100644
--- a/sysdeps/unix/sysv/irix4/setpriority.c
+++ b/sysdeps/unix/sysv/irix4/setpriority.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1996 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
@@ -16,14 +16,15 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <sys/resource.h>
#include <sys/sysmp.h>
int
-DEFUN(setpriority, (which, who, prio),
- enum __priority_which which AND int who AND int prio)
+setpriority (which, who, prio)
+ enum __priority_which which;
+ int who;
+ int prio;
{
switch (which)
{
@@ -35,7 +36,6 @@ DEFUN(setpriority, (which, who, prio),
return __sysmp (MP_SCHED, MPTS_RENICE_USER, who, prio);
}
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
-
diff --git a/sysdeps/unix/sysv/irix4/start.c b/sysdeps/unix/sysv/irix4/start.c
index cd86f85244..b11d27b6ed 100644
--- a/sysdeps/unix/sysv/irix4/start.c
+++ b/sysdeps/unix/sysv/irix4/start.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1995, 1996 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
@@ -28,7 +28,8 @@ Cambridge, MA 02139, USA. */
/* The first piece of initialized data. */
int __data_start = 0;
-VOLATILE int errno = 0;
+VOLATILE int __errno = 0;
+strong_alias (__errno, errno)
extern void EXFUN(__libc_init, (int argc, char **argv, char **envp));
extern int EXFUN(main, (int argc, char **argv, char **envp));
diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile
index 33220df5f6..7cfa06db66 100644
--- a/sysdeps/unix/sysv/linux/Makefile
+++ b/sysdeps/unix/sysv/linux/Makefile
@@ -7,7 +7,8 @@ sysdep_routines += sysctl clone
sysdep_headers += sys/mount.h sys/acct.h sys/sysctl.h \
sys/module.h sys/io.h sys/klog.h sys/kdaemon.h \
- sys/user.h syscall-list.h sys/sysmacros.h sys/procfs.h
+ sys/user.h syscall-list.h sys/sysmacros.h sys/procfs.h \
+ sys/debugreg.h sys/kd.h sys/soundcard.h sys/vt.h
# Generate the list of SYS_* macros for the system calls (__NR_* macros).
$(objpfx)syscall-%.h $(objpfx)syscall-%.d: ../sysdeps/unix/sysv/linux/syscall.h
diff --git a/sysdeps/unix/sysv/linux/adjtime.c b/sysdeps/unix/sysv/linux/adjtime.c
index 44a0cbbdb5..be42ed337c 100644
--- a/sysdeps/unix/sysv/linux/adjtime.c
+++ b/sysdeps/unix/sysv/linux/adjtime.c
@@ -43,7 +43,7 @@ __adjtime (itv, otv)
tmp.tv_usec = itv->tv_usec % 1000000L;
if (tmp.tv_sec > MAX_SEC || tmp.tv_sec < MIN_SEC)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
tntx.offset = tmp.tv_usec + tmp.tv_sec * 1000000L;
diff --git a/sysdeps/unix/sysv/linux/alpha/ioperm.c b/sysdeps/unix/sysv/linux/alpha/ioperm.c
index 731059e600..924fc473b2 100644
--- a/sysdeps/unix/sysv/linux/alpha/ioperm.c
+++ b/sysdeps/unix/sysv/linux/alpha/ioperm.c
@@ -326,7 +326,7 @@ init_iosys (void)
fprintf(stderr,
"ioperm.init_iosys(): Unable to determine system type.\n"
"\t(May need " PATH_ALPHA_SYSTYPE " symlink?)\n");
- errno = ENODEV;
+ __set_errno (ENODEV);
return -1;
}
}
@@ -349,7 +349,7 @@ init_iosys (void)
}
/* systype is not a know platform name... */
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
@@ -366,7 +366,7 @@ _ioperm (unsigned long from, unsigned long num, int turn_on)
/* this test isn't as silly as it may look like; consider overflows! */
if (from >= MAX_PORT || from + num > MAX_PORT)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
@@ -391,7 +391,7 @@ _ioperm (unsigned long from, unsigned long num, int turn_on)
case IOSYS_APECS: base = APECS_IO_BASE; break;
case IOSYS_CIA: base = CIA_IO_BASE; break;
default:
- errno = ENODEV;
+ __set_errno (ENODEV);
return -1;
}
addr = port_to_cpu_addr (from, io.sys, 1);
@@ -425,7 +425,7 @@ _iopl (unsigned int level)
{
if (level > 3)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
if (level)
diff --git a/sysdeps/unix/sysv/linux/errnos.h b/sysdeps/unix/sysv/linux/errnos.h
index 868819e6b3..8a7055aa6a 100644
--- a/sysdeps/unix/sysv/linux/errnos.h
+++ b/sysdeps/unix/sysv/linux/errnos.h
@@ -29,5 +29,11 @@ extern int __errno;
extern int *__errno_location __P ((void)) __attribute__ ((__const__));
#define errno (*__errno_location ())
+#define __set_errno(val) errno = __errno = (val)
+
+#else /* !__USE_REENTRENT || (_LIBC && !_LIBC_REENTRANT) */
+
+#define __set_errno(val) errno = (val)
+
#endif
#endif
diff --git a/sysdeps/unix/sysv/linux/gethostid.c b/sysdeps/unix/sysv/linux/gethostid.c
index 2883441c5b..a1d141b142 100644
--- a/sysdeps/unix/sysv/linux/gethostid.c
+++ b/sysdeps/unix/sysv/linux/gethostid.c
@@ -32,7 +32,7 @@ sethostid (id)
/* Test for appropriate rights to set host ID. */
if (geteuid () || getuid ())
{
- errno = EPERM;
+ __set_errno (EPERM);
return -1;
}
diff --git a/sysdeps/unix/sysv/linux/gethostname.c b/sysdeps/unix/sysv/linux/gethostname.c
index 4b7720d414..8a01fff073 100644
--- a/sysdeps/unix/sysv/linux/gethostname.c
+++ b/sysdeps/unix/sysv/linux/gethostname.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995, 1996 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
@@ -33,7 +33,7 @@ __gethostname (name, len)
if (name == NULL)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
@@ -42,7 +42,7 @@ __gethostname (name, len)
if (strlen (buf.nodename) + 1 > len)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
diff --git a/sysdeps/unix/sysv/linux/getsysstats.c b/sysdeps/unix/sysv/linux/getsysstats.c
index 81946b422f..c4c6fd78f6 100644
--- a/sysdeps/unix/sysv/linux/getsysstats.c
+++ b/sysdeps/unix/sysv/linux/getsysstats.c
@@ -153,7 +153,7 @@ phys_pages_info (const char *format)
if (result == -1)
/* We cannot get the needed value: signal an error. */
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return result;
}
diff --git a/sysdeps/unix/sysv/linux/i386/brk.c b/sysdeps/unix/sysv/linux/i386/brk.c
index f9e92dde5e..d11c3c40d9 100644
--- a/sysdeps/unix/sysv/linux/i386/brk.c
+++ b/sysdeps/unix/sysv/linux/i386/brk.c
@@ -45,11 +45,10 @@ __brk (void *addr)
if (newbrk < addr)
{
- errno = ENOMEM;
+ __set_errno (ENOMEM);
return -1;
}
return 0;
}
weak_alias (__brk, brk)
-
diff --git a/sysdeps/unix/sysv/linux/i386/sigaction.c b/sysdeps/unix/sysv/linux/i386/sigaction.c
index 58e637eed5..f3ecd4bd15 100644
--- a/sysdeps/unix/sysv/linux/i386/sigaction.c
+++ b/sysdeps/unix/sysv/linux/i386/sigaction.c
@@ -1,5 +1,5 @@
/* POSIX.1 `sigaction' call for Linux/i386.
-Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+Copyright (C) 1991, 1995, 1996 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
@@ -48,7 +48,7 @@ __sigaction (int sig, const struct sigaction *act, struct sigaction *oact)
if (result < 0)
{
- errno = -result;
+ __set_errno (-result);
return -1;
}
return 0;
diff --git a/sysdeps/unix/sysv/linux/i386/sysdep.S b/sysdeps/unix/sysv/linux/i386/sysdep.S
index 0f3e31dbce..213af51548 100644
--- a/sysdeps/unix/sysv/linux/i386/sysdep.S
+++ b/sysdeps/unix/sysv/linux/i386/sysdep.S
@@ -33,6 +33,9 @@ errno: .zero 4
.globl _errno
.type _errno,@object
_errno = errno /* This name is expected by hj libc.so.5 startup code. */
+ .globl __errno
+ .type __errno,@object
+__errno = errno /* This name is expected by the MT code. */
.text
/* The following code is only used in the shared library when we
diff --git a/sysdeps/unix/sysv/linux/i386/sysdep.h b/sysdeps/unix/sysv/linux/i386/sysdep.h
index cbd7b5553b..1bf20bd718 100644
--- a/sysdeps/unix/sysv/linux/i386/sysdep.h
+++ b/sysdeps/unix/sysv/linux/i386/sysdep.h
@@ -71,6 +71,8 @@ syscall_error: \
movl %ecx, (%eax); \
movl $-1, %eax; \
ret;
+/* A quick note: it is assumed that the call to `__errno_location' does
+ not modify the parameter value! */
#else
#define SYSCALL_ERROR_HANDLER \
.type syscall_error,@function; \
diff --git a/sysdeps/unix/sysv/linux/m68k/brk.c b/sysdeps/unix/sysv/linux/m68k/brk.c
index 3fd547545e..402dfc56f7 100644
--- a/sysdeps/unix/sysv/linux/m68k/brk.c
+++ b/sysdeps/unix/sysv/linux/m68k/brk.c
@@ -42,11 +42,10 @@ __brk (void *addr)
if (newbrk < addr)
{
- errno = ENOMEM;
+ __set_errno (ENOMEM);
return -1;
}
return 0;
}
weak_alias (__brk, brk)
-
diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.S b/sysdeps/unix/sysv/linux/m68k/sysdep.S
index b47e167159..407c2d393c 100644
--- a/sysdeps/unix/sysv/linux/m68k/sysdep.S
+++ b/sysdeps/unix/sysv/linux/m68k/sysdep.S
@@ -16,6 +16,8 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
+#include <sysdep.h>
+
/* Because the Linux version is in fact m68k/ELF and the start.? file
for this system (sysdeps/m68k/elf/start.S) is also used by The Hurd
and therefore this files must not contain the definition of the
@@ -31,6 +33,9 @@ errno: .space 4
.globl _errno
.type _errno,@object
_errno = errno /* This name is expected by hj libc.so.5 startup code. */
+ .globl __errno
+ .type __errno,@object
+__errno = errno /* This name is expected by the MT code. */
.text
/* The following code is only used in the shared library when we
@@ -39,14 +44,9 @@ _errno = errno /* This name is expected by hj libc.so.5 startup code. */
#ifndef PIC
-#include <sysdep.h>
-#define _ERRNO_H
-#include <errnos.h>
-
/* The syscall stubs jump here when they detect an error. */
-.globl __syscall_error
-__syscall_error:
+ENTRY(__syscall_error)
neg.l %d0
move.l %d0, errno
#ifdef _LIBC_REENTRANT
@@ -62,9 +62,7 @@ __syscall_error:
.size __syscall_error, . - __syscall_error
#endif /* PIC */
- .globl __errno_location
- .type __errno_location, @function
-__errno_location:
+ERRNO(__errno_location)
#ifdef PIC
move.l (%pc, errno@GOTPC), %a0
#else
diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.h b/sysdeps/unix/sysv/linux/m68k/sysdep.h
index 9de750c326..cfc9b04af0 100644
--- a/sysdeps/unix/sysv/linux/m68k/sysdep.h
+++ b/sysdeps/unix/sysv/linux/m68k/sysdep.h
@@ -86,7 +86,7 @@ syscall_error: \
neg.l %d0; \
move.l %d0, (%a0); \
move.l %d0, -(%sp); \
- jbsr __errno_location@PLTPC \
+ jbsr __errno_location@PLTPC; \
move.l (%sp)+, (%a0); \
move.l POUND -1, %d0; \
/* Copy return value to %a0 for syscalls that are declared to return \
diff --git a/sysdeps/unix/sysv/linux/ptrace.c b/sysdeps/unix/sysv/linux/ptrace.c
index 32cc990119..ede413a43c 100644
--- a/sysdeps/unix/sysv/linux/ptrace.c
+++ b/sysdeps/unix/sysv/linux/ptrace.c
@@ -46,12 +46,12 @@ ptrace (enum __ptrace_request request, ...)
{
if (request > 0 && request < 4)
{
- errno = 0;
+ __set_errno (0);
return ret;
}
return res;
}
- errno = -res;
+ __set_errno (-res);
return -1;
}
diff --git a/sysdeps/unix/sysv/linux/sigsuspend.c b/sysdeps/unix/sysv/linux/sigsuspend.c
index 53510b9648..1aeda8224a 100644
--- a/sysdeps/unix/sysv/linux/sigsuspend.c
+++ b/sysdeps/unix/sysv/linux/sigsuspend.c
@@ -16,8 +16,6 @@ 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 <ansidecl.h>
-#include <errno.h>
#include <signal.h>
#include <stddef.h>
#include <unistd.h>
@@ -27,7 +25,8 @@ extern int __syscall_sigsuspend (int, unsigned long, unsigned long);
/* Change the set of blocked signals to SET,
wait until a signal arrives, and restore the set of blocked signals. */
int
-DEFUN(sigsuspend, (set), CONST sigset_t *set)
+sigsuspend (set)
+ const sigset_t *set;
{
return __syscall_sigsuspend (0, 0, *set);
}
diff --git a/sysdeps/unix/sysv/linux/sleep.c b/sysdeps/unix/sysv/linux/sleep.c
new file mode 100644
index 0000000000..1094df5129
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/sleep.c
@@ -0,0 +1,36 @@
+/* sleep - Implementation of the POSIX sleep function using nanosleep.
+Copyright (C) 1996 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
+
+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 <time.h>
+
+unsigned int
+sleep (unsigned int seconds)
+{
+ struct timespec ts = { tv_sec: (long int) seconds, tv_nsec: 0 };
+ unsigned int result;
+
+ if (nanosleep (&ts, &ts) == 0)
+ result = 0;
+ else
+ /* Round remaining time. */
+ result = (unsigned int) ts.tv_sec + (ts.tv_nsec >= 500000000L);
+
+ return result;
+}
diff --git a/sysdeps/unix/sysv/linux/speed.c b/sysdeps/unix/sysv/linux/speed.c
index 0ad48a23d8..9dd5e2f269 100644
--- a/sysdeps/unix/sysv/linux/speed.c
+++ b/sysdeps/unix/sysv/linux/speed.c
@@ -79,7 +79,7 @@ cfsetospeed (termios_p, speed)
if (termios_p == NULL)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
@@ -97,7 +97,7 @@ cfsetospeed (termios_p, speed)
return 0;
}
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
diff --git a/sysdeps/unix/sysv/linux/sys/debugreg.h b/sysdeps/unix/sysv/linux/sys/debugreg.h
new file mode 100644
index 0000000000..43006438e3
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/sys/debugreg.h
@@ -0,0 +1 @@
+#include <linux/debugreg.h>
diff --git a/sysdeps/unix/sysv/linux/sys/kd.h b/sysdeps/unix/sysv/linux/sys/kd.h
new file mode 100644
index 0000000000..33b873f49c
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/sys/kd.h
@@ -0,0 +1 @@
+#include <linux/kd.h>
diff --git a/sysdeps/unix/sysv/linux/sys/soundcard.h b/sysdeps/unix/sysv/linux/sys/soundcard.h
new file mode 100644
index 0000000000..098fae1c33
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/sys/soundcard.h
@@ -0,0 +1 @@
+#include <linux/soundard.h>
diff --git a/sysdeps/unix/sysv/linux/sys/vt.h b/sysdeps/unix/sysv/linux/sys/vt.h
new file mode 100644
index 0000000000..834abfbc8f
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/sys/vt.h
@@ -0,0 +1 @@
+#include <linux/vt.h>
diff --git a/sysdeps/unix/sysv/linux/syscalls.list b/sysdeps/unix/sysv/linux/syscalls.list
index d9dd3d100a..3601b5f357 100644
--- a/sysdeps/unix/sysv/linux/syscalls.list
+++ b/sysdeps/unix/sysv/linux/syscalls.list
@@ -26,7 +26,8 @@ mount EXTRA mount 5 __mount mount
mremap - mremap 4 __mremap mremap
munlock - munlock 2 __munlock munlock
munlockall - munlockall 0 __munlockall munlockall
-nanosleep - nanosleep 2 nanosleep
+nanosleep - nanosleep 2 __libc_nanosleep nanosleep
+pause - pause 0 __libc_pause pause
personality init-first personality 1 __personality personality
pipe - pipe 1 __pipe pipe
s_getpriority getpriority getpriority 2 __syscall_getpriority
diff --git a/sysdeps/unix/sysv/linux/tcdrain.c b/sysdeps/unix/sysv/linux/tcdrain.c
index 20cc809c6f..bd561b6d9e 100644
--- a/sysdeps/unix/sysv/linux/tcdrain.c
+++ b/sysdeps/unix/sysv/linux/tcdrain.c
@@ -21,9 +21,9 @@ Cambridge, MA 02139, USA. */
/* Wait for pending output to be written on FD. */
int
-tcdrain (fd)
- int fd;
+__libc_tcdrain (int fd)
{
/* With an argument of 1, TCSBRK for output to be drain. */
return __ioctl (fd, TCSBRK, 1);
}
+weak_alias (__libc_tcdrain, tcdrain)
diff --git a/sysdeps/unix/sysv/linux/ulimit.c b/sysdeps/unix/sysv/linux/ulimit.c
index 2b1193085a..7493eaf5f3 100644
--- a/sysdeps/unix/sysv/linux/ulimit.c
+++ b/sysdeps/unix/sysv/linux/ulimit.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1994, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 92, 94, 95, 96 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <sysdep.h>
#include <sys/resource.h>
#include <unistd.h>
@@ -45,7 +44,7 @@ __ulimit (cmd, newlimit)
/* Get limit on file size. */
struct rlimit fsize;
- status = getrlimit(RLIMIT_FSIZE, &fsize);
+ status = getrlimit (RLIMIT_FSIZE, &fsize);
if (status < 0)
return -1;
@@ -58,14 +57,14 @@ __ulimit (cmd, newlimit)
struct rlimit fsize;
fsize.rlim_cur = newlimit * 512;
fsize.rlim_max = newlimit * 512;
-
- return setrlimit(RLIMIT_FSIZE, &fsize);
+
+ return setrlimit (RLIMIT_FSIZE, &fsize);
}
case 4:
- return sysconf(_SC_OPEN_MAX);
+ return sysconf (_SC_OPEN_MAX);
default:
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
}
diff --git a/sysdeps/unix/sysv/linux/waitpid.c b/sysdeps/unix/sysv/linux/waitpid.c
index d4ee06bf1b..bbb98a49db 100644
--- a/sysdeps/unix/sysv/linux/waitpid.c
+++ b/sysdeps/unix/sysv/linux/waitpid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1995, 1996 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
@@ -21,12 +21,9 @@ Cambridge, MA 02139, USA. */
#include <sys/wait.h>
__pid_t
-__waitpid (pid, stat_loc, options)
- __pid_t pid;
- int *stat_loc;
- int options;
+__libc_waitpid (__pid_t pid, int *stat_loc, int options)
{
return __wait4 (pid, stat_loc, options, NULL);
}
-
-weak_alias (__waitpid, waitpid)
+weak_alias (__libc_waitpid, __waitpid)
+weak_alias (__libc_waitpid, waitpid)
diff --git a/sysdeps/unix/sysv/setrlimit.c b/sysdeps/unix/sysv/setrlimit.c
index be4158e16e..2b005e39d6 100644
--- a/sysdeps/unix/sysv/setrlimit.c
+++ b/sysdeps/unix/sysv/setrlimit.c
@@ -1,6 +1,6 @@
/* setrlimit function for systems with ulimit system call (SYSV).
-Copyright (C) 1991, 1992 Free Software Foundation, Inc.
+Copyright (C) 1991, 1992, 1996 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
@@ -20,7 +20,6 @@ Cambridge, MA 02139, USA. */
/* This only implements those functions which are available via ulimit. */
-#include <ansidecl.h>
#include <sys/resource.h>
#include <stddef.h>
#include <errno.h>
@@ -29,30 +28,31 @@ Cambridge, MA 02139, USA. */
Only the super-user can increase hard limits.
Return 0 if successful, -1 if not (and sets errno). */
int
-DEFUN(setrlimit, (resource, rlimits),
- enum __rlimit_resource resource AND struct rlimit *rlimits)
+setrlimit (resource, rlimits)
+ enum __rlimit_resource resource;
+ struct rlimit *rlimits;
{
if (rlimits == NULL)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
switch (resource)
{
case RLIMIT_FSIZE:
- return __ulimit(2, rlimits->rlim_cur);
+ return __ulimit (2, rlimits->rlim_cur);
case RLIMIT_DATA:
case RLIMIT_CPU:
case RLIMIT_STACK:
case RLIMIT_CORE:
case RLIMIT_RSS:
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
default:
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
}
diff --git a/sysdeps/unix/sysv/settimeofday.c b/sysdeps/unix/sysv/settimeofday.c
index 1217c6beee..147f796a6c 100644
--- a/sysdeps/unix/sysv/settimeofday.c
+++ b/sysdeps/unix/sysv/settimeofday.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995, 1996 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
@@ -16,27 +16,27 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <sys/time.h>
/* Set the current time of day and timezone information.
This call is restricted to the super-user. */
int
-DEFUN(__settimeofday, (tv, tz),
- CONST struct timeval *tv AND CONST struct timezone *tz)
+__settimeofday (tv, tz)
+ const struct timeval *tv;
+ const struct timezone *tz;
{
time_t when;
if (tv == NULL)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
if (tz != NULL || tv->tv_usec % 1000000 != 0)
{
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/unix/sysv/sigaction.c b/sysdeps/unix/sysv/sigaction.c
index ebb42cf756..eafaec7289 100644
--- a/sysdeps/unix/sysv/sigaction.c
+++ b/sysdeps/unix/sysv/sigaction.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1994, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1994, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <sysdep.h>
#include <errno.h>
#include <stddef.h>
@@ -26,15 +25,17 @@ Cambridge, MA 02139, USA. */
/* If ACT is not NULL, change the action for SIG to *ACT.
If OACT is not NULL, put the old action for SIG in *OACT. */
int
-DEFUN(__sigaction, (sig, act, oact),
- int sig AND CONST struct sigaction *act AND struct sigaction *oact)
+__sigaction (sig, act, oact)
+ int sig;
+ const struct sigaction *act;
+ struct sigaction *oact;
{
sighandler_t handler;
int save;
if (sig <= 0 || sig >= NSIG)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
@@ -48,7 +49,7 @@ DEFUN(__sigaction, (sig, act, oact),
return -1;
save = errno;
(void) signal (sig, handler);
- errno = save;
+ __set_errno (save);
}
else
{
@@ -57,7 +58,7 @@ DEFUN(__sigaction, (sig, act, oact),
if (act->sa_flags != 0)
{
unimplemented:
- errno = ENOSYS;
+ __set_errno (ENOSYS);
return -1;
}
diff --git a/sysdeps/unix/sysv/sysv4/sigaction.c b/sysdeps/unix/sysv/sysv4/sigaction.c
index 68fd7a1846..37893fa649 100644
--- a/sysdeps/unix/sysv/sysv4/sigaction.c
+++ b/sysdeps/unix/sysv/sysv4/sigaction.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <signal.h>
#include <stddef.h>
@@ -38,15 +37,17 @@ trampoline (int sig, int code, struct sigcontext *context)
/* If ACT is not NULL, change the action for SIG to *ACT.
If OACT is not NULL, put the old action for SIG in *OACT. */
int
-DEFUN(__sigaction, (sig, act, oact),
- int sig AND CONST struct sigaction *act AND struct sigaction *oact)
+__sigaction (sig, act, oact)
+ int sig;
+ const struct sigaction *act;
+ struct sigaction *oact;
{
struct sigaction myact;
__sighandler_t ohandler;
if (sig <= 0 || sig >= NSIG)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
diff --git a/sysdeps/unix/sysv/sysv4/sysconf.c b/sysdeps/unix/sysv/sysv4/sysconf.c
index 81d660fe64..cd0e84480f 100644
--- a/sysdeps/unix/sysv/sysv4/sysconf.c
+++ b/sysdeps/unix/sysv/sysv4/sysconf.c
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <limits.h>
#include <unistd.h>
@@ -24,16 +23,17 @@ Cambridge, MA 02139, USA. */
#include <time.h>
#include <sysconfig.h>
-extern int EXFUN(__sysconfig, (int));
+extern int __sysconfig __P ((int));
/* Get the value of the system variable NAME. */
long int
-DEFUN(__sysconf, (name), int name)
+__sysconf (name)
+ int name;
{
switch (name)
{
default:
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
case _SC_ARG_MAX:
diff --git a/sysdeps/unix/sysv/sysv4/waitpid.c b/sysdeps/unix/sysv/sysv4/waitpid.c
index f54df4bf6b..586a374ce9 100644
--- a/sysdeps/unix/sysv/sysv4/waitpid.c
+++ b/sysdeps/unix/sysv/sysv4/waitpid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <sys/wait.h>
#include <sys/types.h>
@@ -53,8 +52,7 @@ extern int __waitid __P ((__idtype_t idtype, __pid_t id,
return status for stopped children; otherwise don't. */
__pid_t
-DEFUN(__waitpid, (pid, stat_loc, options),
- __pid_t pid AND int *stat_loc AND int options)
+__libc_waitpid (__pid_t pid, int *stat_loc, int options)
{
__idtype_t idtype;
__pid_t tmp_pid = pid;
@@ -117,4 +115,5 @@ DEFUN(__waitpid, (pid, stat_loc, options),
return infop.__pid;
}
-weak_alias (__waitpid, waitpid)
+weak_alias (__libc_waitpid, __waitpid)
+weak_alias (__libc_waitpid, waitpid)
diff --git a/sysdeps/unix/sysv/tcdrain.c b/sysdeps/unix/sysv/tcdrain.c
index 37144799e4..92bd7aa3c7 100644
--- a/sysdeps/unix/sysv/tcdrain.c
+++ b/sysdeps/unix/sysv/tcdrain.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
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 <termios.h>
@@ -26,8 +25,9 @@ Cambridge, MA 02139, USA. */
/* Wait for pending output to be written on FD. */
int
-DEFUN(tcdrain, (fd), int fd)
+__libc_tcdrain (int fd)
{
/* With an argument of 1, TCSBRK just waits for output to drain. */
return __ioctl (fd, _TCSBRK, 1);
}
+weak_alias (__libc_tcdrain, tcdrain)
diff --git a/sysdeps/unix/sysv/tcflow.c b/sysdeps/unix/sysv/tcflow.c
index fecb40dd82..ac9e79731d 100644
--- a/sysdeps/unix/sysv/tcflow.c
+++ b/sysdeps/unix/sysv/tcflow.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
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 <termios.h>
@@ -27,7 +26,9 @@ Cambridge, MA 02139, USA. */
/* Suspend or restart transmission on FD. */
int
-DEFUN(tcflow, (fd, action), int fd AND int action)
+tcflow (fd, action)
+ int fd;
+ int action;
{
switch (action)
{
@@ -40,7 +41,7 @@ DEFUN(tcflow, (fd, action), int fd AND int action)
case TCION:
return __ioctl (fd, _TCXONC, 3);
default:
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
}
diff --git a/sysdeps/unix/sysv/tcflush.c b/sysdeps/unix/sysv/tcflush.c
index 88574a5c4b..47250425ef 100644
--- a/sysdeps/unix/sysv/tcflush.c
+++ b/sysdeps/unix/sysv/tcflush.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
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 <termios.h>
@@ -27,7 +26,9 @@ Cambridge, MA 02139, USA. */
/* Flush pending data on FD. */
int
-DEFUN(tcflush, (fd, queue_selector), int fd AND int queue_selector)
+tcflush (fd, queue_selector)
+ int fd;
+ int queue_selector;
{
switch (queue_selector)
{
@@ -38,7 +39,7 @@ DEFUN(tcflush, (fd, queue_selector), int fd AND int queue_selector)
case TCIOFLUSH:
return __ioctl (fd, _TCFLSH, 2);
default:
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
}
diff --git a/sysdeps/unix/sysv/tcgetattr.c b/sysdeps/unix/sysv/tcgetattr.c
index dd914a2955..cd98e0cd67 100644
--- a/sysdeps/unix/sysv/tcgetattr.c
+++ b/sysdeps/unix/sysv/tcgetattr.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
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 <sysv_termio.h>
@@ -25,15 +24,16 @@ Cambridge, MA 02139, USA. */
/* Put the state of FD into *TERMIOS_P. */
int
-DEFUN(__tcgetattr, (fd, termios_p),
- int fd AND struct termios *termios_p)
+__tcgetattr (fd, termios_p)
+ int fd;
+ struct termios *termios_p;
{
struct __sysv_termio buf;
int termio_speed;
if (termios_p == NULL)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
diff --git a/sysdeps/unix/sysv/tcsendbrk.c b/sysdeps/unix/sysv/tcsendbrk.c
index 78fe2c542a..614b52a57c 100644
--- a/sysdeps/unix/sysv/tcsendbrk.c
+++ b/sysdeps/unix/sysv/tcsendbrk.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
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 <signal.h>
@@ -27,7 +26,9 @@ Cambridge, MA 02139, USA. */
/* Send zero bits on FD. */
int
-DEFUN(tcsendbreak, (fd, duration), int fd AND int duration)
+tcsendbreak (fd, duration)
+ int fd;
+ int duration;
{
/* The break lasts 0.25 to 0.5 seconds if DURATION is zero,
and an implementation-defined period if DURATION is nonzero.
@@ -38,6 +39,6 @@ DEFUN(tcsendbreak, (fd, duration), int fd AND int duration)
/* ioctl can't send a break of any other duration for us.
This could be changed to use trickery (e.g. lower speed and
send a '\0') to send the break, but for now just return an error. */
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
diff --git a/sysdeps/unix/sysv/tcsetattr.c b/sysdeps/unix/sysv/tcsetattr.c
index 230a258e42..76d0192e5b 100644
--- a/sysdeps/unix/sysv/tcsetattr.c
+++ b/sysdeps/unix/sysv/tcsetattr.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
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 <termios.h>
@@ -25,7 +24,7 @@ Cambridge, MA 02139, USA. */
#include <sysv_termio.h>
-CONST speed_t __unix_speeds[] =
+const speed_t __unix_speeds[] =
{
0,
50,
@@ -48,8 +47,10 @@ CONST speed_t __unix_speeds[] =
/* Set the state of FD to *TERMIOS_P. */
int
-DEFUN(tcsetattr, (fd, optional_actions, termios_p),
- int fd AND int optional_actions AND CONST struct termios *termios_p)
+tcsetattr (fd, optional_actions, termios_p)
+ int fd;
+ int optional_actions;
+ const struct termios *termios_p;
{
struct __sysv_termio buf;
int ioctl_function;
@@ -57,7 +58,7 @@ DEFUN(tcsetattr, (fd, optional_actions, termios_p),
if (termios_p == NULL)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
switch (optional_actions)
@@ -72,13 +73,13 @@ DEFUN(tcsetattr, (fd, optional_actions, termios_p),
ioctl_function = _TCSETAF;
break;
default:
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
if (termios_p->__ispeed != termios_p->__ospeed)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
buf.c_cflag = -1;
@@ -89,7 +90,7 @@ DEFUN(tcsetattr, (fd, optional_actions, termios_p),
}
if (buf.c_cflag == -1)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
diff --git a/sysdeps/unix/xmknod.c b/sysdeps/unix/xmknod.c
index 81c794a435..21bd3f48bd 100644
--- a/sysdeps/unix/xmknod.c
+++ b/sysdeps/unix/xmknod.c
@@ -31,7 +31,7 @@ __xmknod (int vers, const char *path, mode_t mode, dev_t *dev)
{
if (vers != _MKNOD_VER)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
diff --git a/sysdeps/unix/xstat.c b/sysdeps/unix/xstat.c
index 3b1b112234..1a53c88cf2 100644
--- a/sysdeps/unix/xstat.c
+++ b/sysdeps/unix/xstat.c
@@ -28,7 +28,7 @@ __xstat (int vers, const char *file, struct stat *buf)
{
if (vers != _STAT_VER)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}