diff options
author | Roland McGrath <roland@gnu.org> | 1995-02-18 01:27:10 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 1995-02-18 01:27:10 +0000 |
commit | 28f540f45bbacd939bfd07f213bcad2bf730b1bf (patch) | |
tree | 15f07c4c43d635959c6afee96bde71fb1b3614ee /sysdeps/unix/sysv/sco3.2.4 | |
download | glibc-28f540f45bbacd939bfd07f213bcad2bf730b1bf.tar glibc-28f540f45bbacd939bfd07f213bcad2bf730b1bf.tar.gz glibc-28f540f45bbacd939bfd07f213bcad2bf730b1bf.tar.bz2 glibc-28f540f45bbacd939bfd07f213bcad2bf730b1bf.zip |
initial import
Diffstat (limited to 'sysdeps/unix/sysv/sco3.2.4')
23 files changed, 545 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/sco3.2.4/Dist b/sysdeps/unix/sysv/sco3.2.4/Dist new file mode 100644 index 0000000000..462b9fb1a6 --- /dev/null +++ b/sysdeps/unix/sysv/sco3.2.4/Dist @@ -0,0 +1,2 @@ +pgrpsys.S +sco_getgrp.S diff --git a/sysdeps/unix/sysv/sco3.2.4/Makefile b/sysdeps/unix/sysv/sco3.2.4/Makefile new file mode 100644 index 0000000000..23525e527d --- /dev/null +++ b/sysdeps/unix/sysv/sco3.2.4/Makefile @@ -0,0 +1,3 @@ +ifeq (posix,$(subdir)) +sysdep_routines := $(sysdep_routines) pgrpsys sco_getgrp +endif diff --git a/sysdeps/unix/sysv/sco3.2.4/__setpgid.c b/sysdeps/unix/sysv/sco3.2.4/__setpgid.c new file mode 100644 index 0000000000..3c4304c633 --- /dev/null +++ b/sysdeps/unix/sysv/sco3.2.4/__setpgid.c @@ -0,0 +1,30 @@ +/* Copyright (C) 1994 Free Software Foundation, Inc. + +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, +Cambridge, MA 02139, USA. */ + +#include <ansidecl.h> +#include <errno.h> +#include <unistd.h> +#include <sys/types.h> + +extern int __pgrpsys __P ((int type, ...)); + +/* Get the process group ID of process PID. */ +int +DEFUN(__setpgid, (pid, pgid), pid_t pid AND pid_t pgid) +{ + return __pgrpsys (2, pid, pgid); +} diff --git a/sysdeps/unix/sysv/sco3.2.4/confname.h b/sysdeps/unix/sysv/sco3.2.4/confname.h new file mode 100644 index 0000000000..0408951863 --- /dev/null +++ b/sysdeps/unix/sysv/sco3.2.4/confname.h @@ -0,0 +1,50 @@ +/* `sysconf', `pathconf', and `confstr' NAME values. Generic version. +Copyright (C) 1993 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 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, +Cambridge, MA 02139, USA. */ + +/* Values for the NAME argument to `pathconf' and `fpathconf'. */ +#define _PC_LINK_MAX 0 +#define _PC_MAX_CANON 1 +#define _PC_MAX_INPUT 2 +#define _PC_NAME_MAX 3 +#define _PC_PATH_MAX 4 +#define _PC_PIPE_BUF 5 +#define _PC_CHOWN_RESTRICTED 6 +#define _PC_NO_TRUNC 7 +#define _PC_VDISABLE 8 + +/* Values for the argument to `sysconf'. */ +#define _SC_ARG_MAX 0 +#define _SC_CHILD_MAX 1 +#define _SC_CLK_TCK 2 +#define _SC_NGROUPS_MAX 3 +#define _SC_OPEN_MAX 4 +#define _SC_JOB_CONTROL 5 +#define _SC_SAVED_IDS 6 +#define _SC_VERSION 7 +#define _SC_PASS_MAX 8 +#define _SC_XOPEN_VERSION 9 +#define _SC_TZNAME_MAX 666 /* Not handled by SCO's system call. */ + +#ifdef __USE_POSIX2 +/* Values for the NAME argument to `confstr'. */ +enum + { + _CS_PATH /* The default search path. */ + }; +#endif diff --git a/sysdeps/unix/sysv/sco3.2.4/direct.h b/sysdeps/unix/sysv/sco3.2.4/direct.h new file mode 100644 index 0000000000..b3eaa54c8b --- /dev/null +++ b/sysdeps/unix/sysv/sco3.2.4/direct.h @@ -0,0 +1,22 @@ +#ifndef MAXNAMLEN +#define MAXNAMLEN 512 +#endif +#define DIRBUF 1048 /* minimum buffer size for call to getdents */ + +struct direct + { + unsigned short int d_fileno; + short int d_pad; + long int d_off; + unsigned short int d_reclen; + char d_name[1]; /* Actually longer. */ + }; + +#include <stddef.h> + +/* We calculate the length of the name by taking the length of the whole + `struct direct' record, subtracting the size of everything before the + name, and subtracting one for the terminating null. */ + +#define D_NAMLEN(d) \ + ((d)->d_reclen - offsetof (struct direct, d_name) - 1) diff --git a/sysdeps/unix/sysv/sco3.2.4/getgroups.c b/sysdeps/unix/sysv/sco3.2.4/getgroups.c new file mode 100644 index 0000000000..68966bc5df --- /dev/null +++ b/sysdeps/unix/sysv/sco3.2.4/getgroups.c @@ -0,0 +1,45 @@ +/* Copyright (C) 1994, 1995 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 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, +Cambridge, MA 02139, USA. */ + +#include <ansidecl.h> +#include <sys/types.h> +#include <unistd.h> +#include <limits.h> +#include <alloca.h> + +extern int __sco_getgroups __P ((int size, unsigned short int *list)); + +int +DEFUN(__getgroups, (size, list), int size AND gid_t *list) +{ + int i; + unsigned short int *shortlist; + + if (size <= 0) + return __sco_getgroups (size, NULL); + + shortlist = __alloca (size * sizeof (*shortlist)); + + size = __sco_getgroups (size, shortlist); + for (i = 0; i < size; ++i) + list[i] = shortlist[i]; + + return size; +} + +weak_alias (__getgroups, getgroups) diff --git a/sysdeps/unix/sysv/sco3.2.4/getpgid.c b/sysdeps/unix/sysv/sco3.2.4/getpgid.c new file mode 100644 index 0000000000..3b47d9dee2 --- /dev/null +++ b/sysdeps/unix/sysv/sco3.2.4/getpgid.c @@ -0,0 +1 @@ +#include <sysdeps/unix/sysv/sysv4/getpgid.c> diff --git a/sysdeps/unix/sysv/sco3.2.4/pathconf.S b/sysdeps/unix/sysv/sco3.2.4/pathconf.S new file mode 100644 index 0000000000..1c4dd9571c --- /dev/null +++ b/sysdeps/unix/sysv/sco3.2.4/pathconf.S @@ -0,0 +1,24 @@ +/* Copyright (C) 1993, 1995 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 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, +Cambridge, MA 02139, USA. */ + +#include <sysdep.h> + +SYSCALL__ (pathconf, 2) + ret + +weak_alias (__pathconf, pathconf) diff --git a/sysdeps/unix/sysv/sco3.2.4/pgrpsys.S b/sysdeps/unix/sysv/sco3.2.4/pgrpsys.S new file mode 100644 index 0000000000..2c7d994c28 --- /dev/null +++ b/sysdeps/unix/sysv/sco3.2.4/pgrpsys.S @@ -0,0 +1 @@ +#include <sysdeps/unix/sysv/sysv4/pgrpsys.S> diff --git a/sysdeps/unix/sysv/sco3.2.4/pipestream.c b/sysdeps/unix/sysv/sco3.2.4/pipestream.c new file mode 100644 index 0000000000..b768e62043 --- /dev/null +++ b/sysdeps/unix/sysv/sco3.2.4/pipestream.c @@ -0,0 +1,3 @@ +/* SCO 3.2v4 does have `waitpid'. + Avoid unix/pipestream.c, which says we don't. */ +#include <sysdeps/posix/pipestream.c> diff --git a/sysdeps/unix/sysv/sco3.2.4/sco_getgrp.S b/sysdeps/unix/sysv/sco3.2.4/sco_getgrp.S new file mode 100644 index 0000000000..e68c300821 --- /dev/null +++ b/sysdeps/unix/sysv/sco3.2.4/sco_getgrp.S @@ -0,0 +1,22 @@ +/* Copyright (C) 1994 Free Software Foundation, Inc. +This file is part of the GNU C Library. + +The GNU C Library is free software; you can redistribute it and/or +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, +Cambridge, MA 02139, USA. */ + +#include <sysdep.h> + +PSEUDO (__sco_getgroups, getgroups, 2) + ret diff --git a/sysdeps/unix/sysv/sco3.2.4/setpgid.c b/sysdeps/unix/sysv/sco3.2.4/setpgid.c new file mode 100644 index 0000000000..cc9c4cd61b --- /dev/null +++ b/sysdeps/unix/sysv/sco3.2.4/setpgid.c @@ -0,0 +1 @@ +#include <sysdeps/unix/sysv/sysv4/setpgid.c> diff --git a/sysdeps/unix/sysv/sco3.2.4/setsid.c b/sysdeps/unix/sysv/sco3.2.4/setsid.c new file mode 100644 index 0000000000..6337652552 --- /dev/null +++ b/sysdeps/unix/sysv/sco3.2.4/setsid.c @@ -0,0 +1 @@ +#include <sysdeps/unix/sysv/sysv4/setsid.c> diff --git a/sysdeps/unix/sysv/sco3.2.4/sigaction.S b/sysdeps/unix/sysv/sco3.2.4/sigaction.S new file mode 100644 index 0000000000..dc1bb418d6 --- /dev/null +++ b/sysdeps/unix/sysv/sco3.2.4/sigaction.S @@ -0,0 +1,29 @@ +/* Copyright (C) 1993, 1994, 1995 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 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, +Cambridge, MA 02139, USA. */ + +#include <sysdep.h> + +.globl C_SYMBOL_NAME(__sigreturn) + +ENTRY (__sigaction) + movl $C_SYMBOL_NAME(__sigreturn), %ecx + DO_CALL (sigaction, 3) + jb syscall_error + ret + +weak_alias (__sigaction, sigaction) diff --git a/sysdeps/unix/sysv/sco3.2.4/sigaction.h b/sysdeps/unix/sysv/sco3.2.4/sigaction.h new file mode 100644 index 0000000000..c6344f0810 --- /dev/null +++ b/sysdeps/unix/sysv/sco3.2.4/sigaction.h @@ -0,0 +1,39 @@ +/* The proper definitions for SCO's sigaction. +Copyright (C) 1993, 1994 Free Software Foundation, Inc. +This file is part of the GNU C Library. + +The GNU C Library is free software; you can redistribute it and/or +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, 1992 Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* Structure describing the action to be taken when a signal arrives. */ +struct sigaction + { + /* Signal handler. */ + __sighandler_t sa_handler; + + /* Additional set of signals to be blocked. */ + __sigset_t sa_mask; + + /* Special flags. */ + int sa_flags; + }; + +/* Bits in `sa_flags'. */ +#define SA_NOCLDSTOP 0x01 /* Don't send SIGCHLD when children stop. */ + +/* Values for the HOW argument to `sigprocmask'. */ +#define SIG_SETMASK 0 /* Set the set of blocked signals. */ +#define SIG_BLOCK 1 /* Block signals. */ +#define SIG_UNBLOCK 2 /* Unblock signals. */ diff --git a/sysdeps/unix/sysv/sco3.2.4/sigpending.S b/sysdeps/unix/sysv/sco3.2.4/sigpending.S new file mode 100644 index 0000000000..bc05b2ef6e --- /dev/null +++ b/sysdeps/unix/sysv/sco3.2.4/sigpending.S @@ -0,0 +1,22 @@ +/* Copyright (C) 1993 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 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, +Cambridge, MA 02139, USA. */ + +#include <sysdep.h> + +SYSCALL (sigpending, 1) + ret diff --git a/sysdeps/unix/sysv/sco3.2.4/sigprocmask.S b/sysdeps/unix/sysv/sco3.2.4/sigprocmask.S new file mode 100644 index 0000000000..ff199158a4 --- /dev/null +++ b/sysdeps/unix/sysv/sco3.2.4/sigprocmask.S @@ -0,0 +1,24 @@ +/* Copyright (C) 1993, 1995 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 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, +Cambridge, MA 02139, USA. */ + +#include <sysdep.h> + +SYSCALL__ (sigprocmask, 3) + ret + +weak_alias (__sigprocmask, sigprocmask) diff --git a/sysdeps/unix/sysv/sco3.2.4/sigsuspend.S b/sysdeps/unix/sysv/sco3.2.4/sigsuspend.S new file mode 100644 index 0000000000..9bce3878fd --- /dev/null +++ b/sysdeps/unix/sysv/sco3.2.4/sigsuspend.S @@ -0,0 +1 @@ +#include <sysdeps/unix/sysv/sysv4/sigsuspend.S> diff --git a/sysdeps/unix/sysv/sco3.2.4/syscall.h b/sysdeps/unix/sysv/sco3.2.4/syscall.h new file mode 100644 index 0000000000..316bd0d0ce --- /dev/null +++ b/sysdeps/unix/sysv/sco3.2.4/syscall.h @@ -0,0 +1,107 @@ +/* From Scott Bartram. */ + +#ifndef _SYSCALL_H +#define _SYSCALL_H + +#define SYS_access 33 +#define SYS_acct 51 +#define SYS_advfs 70 +#define SYS_alarm 27 +#define SYS_break 17 +#define SYS_brk 17 +#define SYS_chdir 12 +#define SYS_chmod 15 +#define SYS_chown 16 +#define SYS_chroot 61 +#define SYS_chsize 0x0a28 +#define SYS_close 6 +#define SYS_creat 8 +#define SYS_dup 41 +#define SYS_exec 11 +#define SYS_exece 59 +#define SYS_exit 1 +#define SYS_fcntl 62 +#define SYS_fork 2 +#define SYS_fpathconf 0x2f28 +#define SYS_fstat 28 +#define SYS_fstatfs 38 +#define SYS_ftime 0x0b28 +#define SYS_getdents 81 +#define SYS_getgid 47 +#define SYS_getgroups 0x2b28 +#define SYS_getitimer 0x3728 +#define SYS_getmsg 85 +#define SYS_getpid 20 +#define SYS_getuid 24 +#define SYS_gtty 32 +#define SYS_ioctl 54 +#define SYS_kill 37 +#define SYS_link 9 +#define SYS_lock 45 +#define SYS_lseek 19 +#define SYS_lstat 91 +#define SYS_mkdir 80 +#define SYS_mknod 14 +#define SYS_mount 21 +#define SYS_msgsys 49 +#define SYS_nap 0x0c28 +#define SYS_nice 34 +#define SYS_open 5 +#define SYS_pathconf 0x2e28 +#define SYS_pause 29 +#define SYS_pgrpsys 39 +#define SYS_pipe 42 +#define SYS_plock 45 +#define SYS_poll 87 +#define SYS_prof 44 +#define SYS_ptrace 26 +#define SYS_putmsg 86 +#define SYS_rdebug 76 +#define SYS_read 3 +#define SYS_readlink 92 +#define SYS_rename 0x3028 +#define SYS_rfstart 74 +#define SYS_rfstop 77 +#define SYS_rfsys 78 +#define SYS_rmdir 79 +#define SYS_rmount 72 +#define SYS_rumount 73 +#define SYS_seek 19 +#define SYS_select 0x2428 +#define SYS_semsys 53 +#define SYS_setgid 46 +#define SYS_setgroups 0x2c28 +#define SYS_setitimer 0x3828 +#define SYS_setpgrp 39 +#define SYS_setuid 23 +#define SYS_shmsys 52 +#define SYS_sigaction 0x2728 +#define SYS_signal 48 +#define SYS_sigpending 0x2928 +#define SYS_sigprocmask 0x2828 +#define SYS_sigsuspend 0x2a28 +#define SYS_stat 18 +#define SYS_statfs 35 +#define SYS_stime 25 +#define SYS_stty 31 +#define SYS_symlink 90 +#define SYS_sync 36 +#define SYS_sys3b 50 +#define SYS_sysacct 51 +#define SYS_sysconf 0x2d28 +#define SYS_sysfs 84 +#define SYS_sysi86 50 +#define SYS_time 13 +#define SYS_times 43 +#define SYS_uadmin 55 +#define SYS_ulimit 63 +#define SYS_umask 60 +#define SYS_umount 22 +#define SYS_unadvfs 71 +#define SYS_unlink 10 +#define SYS_utime 30 +#define SYS_utssys 57 +#define SYS_wait 7 +#define SYS_write 4 + +#endif diff --git a/sysdeps/unix/sysv/sco3.2.4/sysconf.S b/sysdeps/unix/sysv/sco3.2.4/sysconf.S new file mode 100644 index 0000000000..631e5e977a --- /dev/null +++ b/sysdeps/unix/sysv/sco3.2.4/sysconf.S @@ -0,0 +1,30 @@ +/* Copyright (C) 1993, 1994, 1995 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 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, +Cambridge, MA 02139, USA. */ + +#include <sysdep.h> +#include <confname.h> + +.globl __tzname_max +ENTRY (__sysconf) + cmpl $_SC_TZNAME_MAX, 4(%esp) /* Is the arg _SC_TZNAME_MAX? */ + je tzname + DO_CALL (sysconf, 1) /* No; use the SCO system call. */ + ret +tzname: jmp C_SYMBOL_NAME(__tzname_max) /* Yes; bounce to __tzname_max (). */ + +weak_alias (__sysconf, sysconf) diff --git a/sysdeps/unix/sysv/sco3.2.4/system.c b/sysdeps/unix/sysv/sco3.2.4/system.c new file mode 100644 index 0000000000..06dc066b88 --- /dev/null +++ b/sysdeps/unix/sysv/sco3.2.4/system.c @@ -0,0 +1,10 @@ +/* SCO has a bug where `waitpid' will never return if SIGCHLD is blocked. + They have acknowledged that this is a bug but I have not seen nor heard + of any forthcoming fix. */ + +#define WAITPID_CANNOT_BLOCK_SIGCHLD + +/* SCO 3.2v4 does have `waitpid'. + Avoid unix/system.c, which says we don't. */ + +#include <sysdeps/posix/system.c> diff --git a/sysdeps/unix/sysv/sco3.2.4/uname.S b/sysdeps/unix/sysv/sco3.2.4/uname.S new file mode 100644 index 0000000000..a22d18a3e6 --- /dev/null +++ b/sysdeps/unix/sysv/sco3.2.4/uname.S @@ -0,0 +1,42 @@ +/* Copyright (C) 1993, 1994 Free Software Foundation, Inc. + Contributed by Scott Bartram. + +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, +Cambridge, MA 02139, USA. */ + +#include <sysdep.h> + +/* + before lcall, stack contents should be: + + 4(%esp) -> name + 8(%esp) -> unspecified + 12(%esp) -> 0 + */ + +ENTRY (uname) + pushl $0x0 /* Push the discriminator flag. */ + pushl $0x0 /* Push dummy placeholder. */ + pushl 12(%esp,1) /* Push NAME (ptr to struct utsname) */ + subl $0x4, %esp /* Adjust stack pointer. */ + DO_CALL (utssys, 3) + jb error /* Test for error. */ + addl $0x10, %esp /* Adjust the stack pointer. */ + xorl %eax, %eax /* Clear return value. */ + ret +error: addl $0x10, %esp /* Adjust the stack pointer. */ + jmp syscall_error diff --git a/sysdeps/unix/sysv/sco3.2.4/waitpid.S b/sysdeps/unix/sysv/sco3.2.4/waitpid.S new file mode 100644 index 0000000000..523ef37e53 --- /dev/null +++ b/sysdeps/unix/sysv/sco3.2.4/waitpid.S @@ -0,0 +1,36 @@ +/* Copyright (C) 1993, 1994, 1995 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 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, +Cambridge, MA 02139, USA. */ + +#include <sysdep.h> + +ENTRY (__waitpid) + /* The `waitpid' system call is distinguished from plain + `wait' by setting lots of bits in the processor flags. */ + pushfl /* Push the flags word. */ + popl %eax /* Pop it into the accumulator. */ + orl $0x8c4, %eax /* Set lots of bits. */ + pushl %eax /* Push the new flags word. */ + popfl /* Pop it into the flags. */ + DO_CALL (wait, 2) + movl 8(%esp), scratch /* Put status pointer in scratch register. */ + testl scratch, scratch /* Is it non-nil? */ + je null + movl r1, (scratch) /* Yes; store the status there. */ +null: ret + +weak_alias (__waitpid, waitpid) |