This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
PATCH: glibc port to solaris2
- To: ohme at dialeasy dot de
- Subject: PATCH: glibc port to solaris2
- From: esp5 <esp5 at rama dot comp dot pge dot com>
- Date: Tue, 9 Oct 2001 12:30:10 -0700 (PDT)
- Cc: bug-glibc at gnu dot org, libc-alpha at sources dot redhat dot com
- Reply-To: esp5 <esp5 at rama dot comp dot pge dot com>
ok, here's a patch to make glibc-2.2.4 compile on solaris2.6... well,
it compiles 99% of the way through, and gets to the following segfault
../elf/ld.so.1 --library-path ..:../math:../elf:../dlfcn:../nss:../nis:../rt:../
resolv:../crypt ./rpcgen -Y `gcc -print-file-name=cpp | sed 's|/cpp$||'` -c rpcs
vc/bootparam_prot.x -o xbootparam_prot.T
make[1]: *** [xbootparam_prot.stmp] Segmentation Fault
make[1]: Leaving directory `/opt/builds/glibc-2.2.4/sunrpc'
make: *** [sunrpc/others] Error 2
I think I have an idea of why this is failing (has to do with the ` `
expression coming out as '/usr/ccs/lib') but I'm wondering what this statement
is attempting to do..
Anyways, here's the patch. Its not the cleanest, let me know what I need to do
to make it include-able inside of glibc...
Apply with patch -p1 -d glib_dir < solaris2_6_patch..
Cheers,
Ed
diff -rcP glibc-2.2.4.old/include/signal.h glibc-2.2.4/include/signal.h
*** glibc-2.2.4.old/include/signal.h Tue Oct 2 16:39:58 2001
--- glibc-2.2.4/include/signal.h Mon Oct 8 13:58:33 2001
***************
*** 1,8 ****
--- 1,10 ----
#ifndef _SIGNAL_H
#if defined __need_sig_atomic_t || defined __need_sigset_t
# include <signal/signal.h>
+ #include <bits/sigset.h>
#else
# include <signal/signal.h>
+ #include <bits/sigset.h>
/* Now define the internal interfaces. */
extern __sighandler_t __bsd_signal (int __sig, __sighandler_t __handler);
diff -rcP glibc-2.2.4.old/include/sys/socket.h glibc-2.2.4/include/sys/socket.h
*** glibc-2.2.4.old/include/sys/socket.h Tue Oct 2 16:40:00 2001
--- glibc-2.2.4/include/sys/socket.h Fri Oct 5 17:58:36 2001
***************
*** 32,39 ****
#ifdef _HAVE_SA_LEN
# define SA_LEN(_x) (_x)->sa_len
#else
! # define SA_LEN(_x) __libc_sa_len((_x)->sa_family)
! extern int __libc_sa_len (sa_family_t __af) __THROW;
#endif
#endif
--- 32,41 ----
#ifdef _HAVE_SA_LEN
# define SA_LEN(_x) (_x)->sa_len
#else
! # ifndef NO_LIBC_SA_LEN
! # define SA_LEN(_x) __libc_sa_len((_x)->sa_family)
! extern int __libc_sa_len (sa_family_t __af) __THROW;
! # endif
#endif
#endif
diff -rcP glibc-2.2.4.old/inet/rexec.c glibc-2.2.4/inet/rexec.c
*** glibc-2.2.4.old/inet/rexec.c Tue Oct 2 16:46:17 2001
--- glibc-2.2.4/inet/rexec.c Fri Oct 5 17:34:28 2001
***************
*** 121,131 ****
perror("getsockname");
(void) __close(s2);
goto bad;
! } else if (sa2len != SA_LEN((struct sockaddr *)&sa2)) {
__set_errno(EINVAL);
(void) __close(s2);
goto bad;
}
port = 0;
if (!getnameinfo((struct sockaddr *)&sa2, sa2len,
NULL, 0, servbuff, sizeof(servbuff),
--- 121,135 ----
perror("getsockname");
(void) __close(s2);
goto bad;
! }
!
! #ifdef _HAVE_SA_LEN
! else if (sa2len != SA_LEN((struct sockaddr *)&sa2)) {
__set_errno(EINVAL);
(void) __close(s2);
goto bad;
}
+ #endif
port = 0;
if (!getnameinfo((struct sockaddr *)&sa2, sa2len,
NULL, 0, servbuff, sizeof(servbuff),
diff -rcP glibc-2.2.4.old/sunrpc/clnt_gen.c glibc-2.2.4/sunrpc/clnt_gen.c
*** glibc-2.2.4.old/sunrpc/clnt_gen.c Tue Oct 2 16:48:55 2001
--- glibc-2.2.4/sunrpc/clnt_gen.c Sat Oct 6 17:25:18 2001
***************
*** 54,60 ****
size_t prtbuflen;
char *prttmpbuf;
struct sockaddr_in sin;
! struct sockaddr_un sun;
int sock;
struct timeval tv;
CLIENT *client;
--- 54,60 ----
size_t prtbuflen;
char *prttmpbuf;
struct sockaddr_in sin;
! struct sockaddr_un _sun; /* there is a #define sun someplace in gcc */
int sock;
struct timeval tv;
CLIENT *client;
***************
*** 62,72 ****
if (strcmp (proto, "unix") == 0)
{
! __bzero ((char *)&sun, sizeof (sun));
! sun.sun_family = AF_UNIX;
! strcpy (sun.sun_path, hostname);
sock = RPC_ANYSOCK;
! client = clntunix_create (&sun, prog, vers, &sock, 0, 0);
if (client == NULL)
return NULL;
#if 0
--- 62,72 ----
if (strcmp (proto, "unix") == 0)
{
! __bzero ((char *)&_sun, sizeof (_sun));
! _sun.sun_family = AF_UNIX;
! strcpy (_sun.sun_path, hostname);
sock = RPC_ANYSOCK;
! client = clntunix_create (&_sun, prog, vers, &sock, 0, 0);
if (client == NULL)
return NULL;
#if 0
diff -rcP glibc-2.2.4.old/sysdeps/generic/dl-sysdep.c glibc-2.2.4/sysdeps/generic/dl-sysdep.c
*** glibc-2.2.4.old/sysdeps/generic/dl-sysdep.c Tue Oct 2 16:40:22 2001
--- glibc-2.2.4/sysdeps/generic/dl-sysdep.c Wed Oct 3 22:06:08 2001
***************
*** 55,62 ****
ElfW(Addr) _dl_base_addr;
#endif
int __libc_enable_secure;
! int __libc_multiple_libcs = 0; /* Defining this here avoids the inclusion
! of init-first. */
/* This variable contains the lowest stack address ever used. */
void *__libc_stack_end;
static ElfW(auxv_t) *_dl_auxv;
--- 55,63 ----
ElfW(Addr) _dl_base_addr;
#endif
int __libc_enable_secure;
! extern int __libc_multiple_libcs;
! /* Defining this here avoids the inclusion of init-first. */
!
/* This variable contains the lowest stack address ever used. */
void *__libc_stack_end;
static ElfW(auxv_t) *_dl_auxv;
diff -rcP glibc-2.2.4.old/sysdeps/generic/getpeername.c glibc-2.2.4/sysdeps/generic/getpeername.c
*** glibc-2.2.4.old/sysdeps/generic/getpeername.c Tue Oct 2 16:40:48 2001
--- glibc-2.2.4/sysdeps/generic/getpeername.c Mon Oct 8 11:33:34 2001
***************
*** 22,28 ****
/* Put the address of the peer connected to socket FD into *ADDR
(which is *LEN bytes long), and its actual length into *LEN. */
int
! getpeername (fd, addr, len)
int fd;
__SOCKADDR_ARG addr;
socklen_t *len;
--- 22,28 ----
/* Put the address of the peer connected to socket FD into *ADDR
(which is *LEN bytes long), and its actual length into *LEN. */
int
! __getpeername (fd, addr, len)
int fd;
__SOCKADDR_ARG addr;
socklen_t *len;
***************
*** 30,35 ****
--- 30,37 ----
__set_errno (ENOSYS);
return -1;
}
+
+ weak_alias(__getpeername, getpeername);
stub_warning (getpeername)
diff -rcP glibc-2.2.4.old/sysdeps/generic/htonl.c glibc-2.2.4/sysdeps/generic/htonl.c
*** glibc-2.2.4.old/sysdeps/generic/htonl.c Tue Oct 2 16:40:23 2001
--- glibc-2.2.4/sysdeps/generic/htonl.c Fri Oct 5 00:38:11 2001
***************
*** 21,29 ****
#undef htonl
#undef ntohl
! u_int32_t
! htonl (x)
! u_int32_t x;
{
#if BYTE_ORDER == BIG_ENDIAN
return x;
--- 21,28 ----
#undef htonl
#undef ntohl
! __uint32_t
! htonl (__uint32_t x)
{
#if BYTE_ORDER == BIG_ENDIAN
return x;
diff -rcP glibc-2.2.4.old/sysdeps/generic/htons.c glibc-2.2.4/sysdeps/generic/htons.c
*** glibc-2.2.4.old/sysdeps/generic/htons.c Tue Oct 2 16:40:23 2001
--- glibc-2.2.4/sysdeps/generic/htons.c Fri Oct 5 00:39:19 2001
***************
*** 21,29 ****
#undef htons
#undef ntohs
! u_int16_t
htons (x)
! u_int16_t x;
{
#if BYTE_ORDER == BIG_ENDIAN
return x;
--- 21,29 ----
#undef htons
#undef ntohs
! __uint16_t
htons (x)
! __uint16_t x;
{
#if BYTE_ORDER == BIG_ENDIAN
return x;
diff -rcP glibc-2.2.4.old/sysdeps/generic/poll.c glibc-2.2.4/sysdeps/generic/poll.c
*** glibc-2.2.4.old/sysdeps/generic/poll.c Tue Oct 2 16:40:25 2001
--- glibc-2.2.4/sysdeps/generic/poll.c Mon Oct 8 13:06:33 2001
***************
*** 26,32 ****
or -1 for errors. */
int
! poll (fds, nfds, timeout)
struct pollfd *fds;
nfds_t nfds;
int timeout;
--- 26,32 ----
or -1 for errors. */
int
! __poll (fds, nfds, timeout)
struct pollfd *fds;
nfds_t nfds;
int timeout;
***************
*** 36,39 ****
--- 36,40 ----
}
stub_warning (poll)
+ weak_alias(__poll, poll)
#include <stub-tag.h>
diff -rcP glibc-2.2.4.old/sysdeps/generic/signal.c glibc-2.2.4/sysdeps/generic/signal.c
*** glibc-2.2.4.old/sysdeps/generic/signal.c Tue Oct 2 16:40:47 2001
--- glibc-2.2.4/sysdeps/generic/signal.c Mon Oct 8 20:05:48 2001
***************
*** 19,24 ****
--- 19,25 ----
#include <errno.h>
#include <signal.h>
+ sigset_t _sigintr; /* Set by siginterrupt. */
/* Set the handler for the signal SIG to HANDLER,
returning the old handler, or SIG_ERR on error. */
diff -rcP glibc-2.2.4.old/sysdeps/unix/syscalls.list glibc-2.2.4/sysdeps/unix/syscalls.list
*** glibc-2.2.4.old/sysdeps/unix/syscalls.list Tue Oct 2 16:44:29 2001
--- glibc-2.2.4/sysdeps/unix/syscalls.list Mon Oct 8 13:56:48 2001
***************
*** 27,33 ****
lseek - lseek i:iii __libc_lseek __lseek lseek
mkdir - mkdir i:si __mkdir mkdir
open - open i:siv __libc_open __open open
! profil - profil i:piii profil
ptrace - ptrace i:iiii ptrace
read - read i:ibn __libc_read __read read
readlink - readlink i:spi __readlink readlink
--- 27,33 ----
lseek - lseek i:iii __libc_lseek __lseek lseek
mkdir - mkdir i:si __mkdir mkdir
open - open i:siv __libc_open __open open
! profil - profil i:piii __profil profil
ptrace - ptrace i:iiii ptrace
read - read i:ibn __libc_read __read read
readlink - readlink i:spi __readlink readlink
***************
*** 47,53 ****
setsid - setsid i: __setsid setsid
settimeofday - settimeofday i:PP __settimeofday settimeofday
setuid - setuid i:i __setuid setuid
! sigsuspend - sigsuspend i:p sigsuspend
sstk - sstk b:i sstk
statfs - statfs i:sp __statfs statfs
swapoff - swapoff i:s swapoff
--- 47,53 ----
setsid - setsid i: __setsid setsid
settimeofday - settimeofday i:PP __settimeofday settimeofday
setuid - setuid i:i __setuid setuid
! sigsuspend - sigsuspend i:p __sigsuspend sigsuspend
sstk - sstk b:i sstk
statfs - statfs i:sp __statfs statfs
swapoff - swapoff i:s swapoff
diff -rcP glibc-2.2.4.old/sysdeps/unix/sysv/syscalls.list glibc-2.2.4/sysdeps/unix/sysv/syscalls.list
*** glibc-2.2.4.old/sysdeps/unix/sysv/syscalls.list Tue Oct 2 16:44:27 2001
--- glibc-2.2.4/sysdeps/unix/sysv/syscalls.list Mon Oct 8 20:42:38 2001
***************
*** 4,16 ****
ftime - ftime i:p ftime
nice - nice i:i nice
pause - pause i: pause
- poll - poll i:pii poll
s_getdents getdents getdents i:ipi __getdents
setrlimit - setrlimit i:ip __setrlimit setrlimit
settimeofday - settimeofday i:PP __settimeofday settimeofday
! signal - signal i:ii signal
stime - stime i:p stime
time - time i:P time
times - times i:p __times times
ulimit - ulimit i:ii ulimit
utime - utime i:sP utime
--- 4,16 ----
ftime - ftime i:p ftime
nice - nice i:i nice
pause - pause i: pause
s_getdents getdents getdents i:ipi __getdents
setrlimit - setrlimit i:ip __setrlimit setrlimit
settimeofday - settimeofday i:PP __settimeofday settimeofday
! # signal - signal i:ii signal
stime - stime i:p stime
time - time i:P time
+ poll - poll i:pii __poll poll
times - times i:p __times times
ulimit - ulimit i:ii ulimit
utime - utime i:sP utime
diff -rcP glibc-2.2.4.old/sysdeps/unix/sysv/sysv4/Makefile glibc-2.2.4/sysdeps/unix/sysv/sysv4/Makefile
*** glibc-2.2.4.old/sysdeps/unix/sysv/sysv4/Makefile Tue Oct 2 16:44:22 2001
--- glibc-2.2.4/sysdeps/unix/sysv/sysv4/Makefile Wed Oct 3 15:31:41 2001
***************
*** 18,29 ****
ifeq ($(subdir),posix)
! sysdep_routines := $(sysdep_routines) sysconfig pgrpsys __waitid
endif
ifeq ($(subdir),misc)
! sysdep_routines := $(sysdep_routines) sysinfo
endif
--- 18,29 ----
ifeq ($(subdir),posix)
! sysdep_routines := $(sysdep_routines) sysconfig pgrpsys
endif
ifeq ($(subdir),misc)
! sysdep_routines := $(sysdep_routines) sysinfo __waitid
endif
diff -rcP glibc-2.2.4.old/sysdeps/unix/sysv/sysv4/bits/sigset.h glibc-2.2.4/sysdeps/unix/sysv/sysv4/bits/sigset.h
*** glibc-2.2.4.old/sysdeps/unix/sysv/sysv4/bits/sigset.h Tue Oct 2 16:44:23 2001
--- glibc-2.2.4/sysdeps/unix/sysv/sysv4/bits/sigset.h Mon Oct 8 16:42:21 2001
***************
*** 48,57 ****
--- 48,87 ----
#define __SSELT(s) ((s) / __NSSBITS)
#define __SSMASK(s) (1 << ((s) % __NSSBITS))
+
#ifdef __USE_EXTERN_INLINES
# ifndef _EXTERN_INLINE
# define _EXTERN_INLINE extern __inline
# endif
+
+ _EXTERN_INLINE int
+ __sigisemptyset( const __sigset_t *__set)
+ {
+ return(__set->__sigbits[0] == __set->__sigbits[1] ==
+ __set->__sigbits[2] == __set->__sigbits[3] == 0L);
+ }
+
+ _EXTERN_INLINE int
+ __sigorset( __sigset_t *dest, __sigset_t *left, __sigset_t *right)
+ {
+ dest->__sigbits[0] = left->__sigbits[0] | right->__sigbits[0];
+ dest->__sigbits[1] = left->__sigbits[1] | right->__sigbits[1];
+ dest->__sigbits[2] = left->__sigbits[2] | right->__sigbits[2];
+ dest->__sigbits[3] = left->__sigbits[3] | right->__sigbits[3];
+ return 0;
+ }
+
+
+ _EXTERN_INLINE int
+ __sigandset( __sigset_t *dest, __sigset_t *left, __sigset_t *right)
+ {
+ dest->__sigbits[0] = left->__sigbits[0] & right->__sigbits[0];
+ dest->__sigbits[1] = left->__sigbits[1] & right->__sigbits[1];
+ dest->__sigbits[2] = left->__sigbits[2] & right->__sigbits[2];
+ dest->__sigbits[3] = left->__sigbits[3] & right->__sigbits[3];
+ return 0;
+ }
+
_EXTERN_INLINE int
__sigemptyset (__sigset_t *__set)
diff -rcP glibc-2.2.4.old/sysdeps/unix/sysv/sysv4/ftruncate.c glibc-2.2.4/sysdeps/unix/sysv/sysv4/ftruncate.c
*** glibc-2.2.4.old/sysdeps/unix/sysv/sysv4/ftruncate.c Tue Oct 2 16:44:23 2001
--- glibc-2.2.4/sysdeps/unix/sysv/sysv4/ftruncate.c Mon Oct 8 11:24:17 2001
***************
*** 24,30 ****
/* Truncate the file FD refers to to LENGTH bytes. */
int
! ftruncate (fd, length)
int fd;
off_t length;
{
--- 24,30 ----
/* Truncate the file FD refers to to LENGTH bytes. */
int
! __ftruncate (fd, length)
int fd;
off_t length;
{
***************
*** 35,37 ****
--- 35,39 ----
fl.l_start = length;
return fcntl (fd, F_FREESP, &fl);
}
+
+ weak_alias(__ftruncate, ftruncate);
diff -rcP glibc-2.2.4.old/sysdeps/unix/sysv/sysv4/solaris2/Implies glibc-2.2.4/sysdeps/unix/sysv/sysv4/solaris2/Implies
*** glibc-2.2.4.old/sysdeps/unix/sysv/sysv4/solaris2/Implies Wed Dec 31 17:00:00 1969
--- glibc-2.2.4/sysdeps/unix/sysv/sysv4/solaris2/Implies Fri Oct 5 12:38:19 2001
***************
*** 0 ****
--- 1,13 ----
+ # The gnu subdirectory exists for things common to both Linux-based and
+ # Hurd-based GNU systems.
+
+ # Linux shares most of the syscalls which are also common to BSD and SVR4.
+ unix/common
+
+ # Linux as of version 1.3.29 has all functions of the mmap family
+ # which are described in POSIX.4. Missing is only madvise() so
+ # we define a stub here.
+ unix/mman
+
+ # Linux has network support in the kernel.
+ unix/inet
diff -rcP glibc-2.2.4.old/sysdeps/unix/sysv/sysv4/solaris2/Makefile glibc-2.2.4/sysdeps/unix/sysv/sysv4/solaris2/Makefile
*** glibc-2.2.4.old/sysdeps/unix/sysv/sysv4/solaris2/Makefile Fri Oct 5 16:41:42 2001
--- glibc-2.2.4/sysdeps/unix/sysv/sysv4/solaris2/Makefile Mon Oct 8 13:27:44 2001
***************
*** 4,6 ****
--- 4,14 ----
# with the libc.a being *constructed* in $(objdir). As a work-around,
# we add this to each native-compile.
ALL_BUILD_CFLAGS += -L/lib
+
+ ifeq ($(subdir),csu)
+ sysdep_routines += errno-loc
+ endif
+
+ #ifeq ($(subdir),io)
+ #sysdep_routines += poll
+ #endif
diff -rcP glibc-2.2.4.old/sysdeps/unix/sysv/sysv4/solaris2/bits/dirent.h glibc-2.2.4/sysdeps/unix/sysv/sysv4/solaris2/bits/dirent.h
*** glibc-2.2.4.old/sysdeps/unix/sysv/sysv4/solaris2/bits/dirent.h Tue Oct 2 16:44:21 2001
--- glibc-2.2.4/sysdeps/unix/sysv/sysv4/solaris2/bits/dirent.h Wed Oct 3 11:32:56 2001
***************
*** 31,36 ****
--- 31,37 ----
#endif
unsigned short int d_reclen;
char d_name[256]; /* We must not include limits.h! */
+ unsigned char d_type;
};
#ifdef __USE_LARGEFILE64
diff -rcP glibc-2.2.4.old/sysdeps/unix/sysv/sysv4/solaris2/bits/errno.h glibc-2.2.4/sysdeps/unix/sysv/sysv4/solaris2/bits/errno.h
*** glibc-2.2.4.old/sysdeps/unix/sysv/sysv4/solaris2/bits/errno.h Tue Oct 2 16:44:21 2001
--- glibc-2.2.4/sysdeps/unix/sysv/sysv4/solaris2/bits/errno.h Wed Oct 3 22:18:30 2001
***************
*** 165,170 ****
--- 165,179 ----
/* SUN Network File System. */
# define ESTALE 151 /* Stale NFS file handle. */
+
+ # ifndef __ASSEMBLER__
+ # ifndef errno
+ extern int errno;
+ # endif
+ # endif
+
+
#endif
+
#define __set_errno(val) errno = (val)
diff -rcP glibc-2.2.4.old/sysdeps/unix/sysv/sysv4/solaris2/bits/fcntl.h glibc-2.2.4/sysdeps/unix/sysv/sysv4/solaris2/bits/fcntl.h
*** glibc-2.2.4.old/sysdeps/unix/sysv/sysv4/solaris2/bits/fcntl.h Wed Oct 3 10:57:48 2001
--- glibc-2.2.4/sysdeps/unix/sysv/sysv4/solaris2/bits/fcntl.h Thu Oct 4 19:19:20 2001
***************
*** 0 ****
--- 1,123 ----
+ /* O_*, F_*, FD_* bit values for general Unix system.
+ Copyright (C) 1991, 1992, 1995, 1997, 2000 Free Software 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 Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+ #ifndef _FCNTL_H
+ # error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
+ #endif
+
+
+ /* File access modes for `open' and `fcntl'. */
+ #define O_RDONLY 0 /* Open read-only. */
+ #define O_WRONLY 1 /* Open write-only. */
+ #define O_RDWR 2 /* Open read/write. */
+
+
+ /* Bits OR'd into the second argument to open. */
+ #define O_CREAT 0x0100 /* Create file if it doesn't exist. */
+ #define O_EXCL 0x0400 /* Fail if file already exists. */
+ #define O_TRUNC 0x0200 /* Truncate file to zero length. */
+ #define O_NOCTTY 0x0800 /* Don't assign a controlling terminal. */
+ #ifdef __USE_MISC
+ # define O_ASYNC 0x0040 /* Send SIGIO to owner when data is ready. */
+ # define O_FSYNC 0x0010 /* Synchronous writes. */
+ # define O_SYNC O_FSYNC
+ # define O_DSYNC 0x40 /* synchronized data update option */
+ #endif
+
+ /* File status flags for `open' and `fcntl'. */
+ #define O_APPEND 0x0008 /* Writes append to the file. */
+ #define O_NONBLOCK 0x0080 /* Non-blocking I/O. */
+
+ #ifdef __USE_MISC
+ # define O_NDELAY 0x0004
+ #endif
+
+ #ifdef __USE_MISC
+ /* Bits in the file status flags returned by F_GETFL.
+ These are all the O_* flags, plus FREAD and FWRITE, which are
+ independent bits set by which of O_RDONLY, O_WRONLY, and O_RDWR, was
+ given to `open'. */
+ # define FREAD 1
+ # define FWRITE 2
+
+ /* Traditional Unix names the O_* bits. */
+ # define FASYNC O_ASYNC
+ # define FCREAT O_CREAT
+ # define FEXCL O_EXCL
+ # define FTRUNC O_TRUNC
+ # define FNOCTTY O_NOCTTY
+ # define FFSYNC O_FSYNC
+ # define FSYNC O_SYNC
+ # define FAPPEND O_APPEND
+ # define FNONBLOCK O_NONBLOCK
+ # define FNONBIO O_NONBLOCK
+ # define FNDELAY O_NDELAY
+ #endif
+
+ /* Mask for file access modes. This is system-dependent in case
+ some system ever wants to define some other flavor of access. */
+ #define O_ACCMODE (O_RDONLY|O_WRONLY|O_RDWR)
+
+ /* Values for the second argument to `fcntl'. */
+ #define F_DUPFD 0 /* Duplicate file descriptor. */
+ #define F_GETFD 1 /* Get file descriptor flags. */
+ #define F_SETFD 2 /* Set file descriptor flags. */
+ #define F_GETFL 3 /* Get file status flags. */
+ #define F_SETFL 4 /* Set file status flags. */
+ #if defined __USE_BSD || defined __USE_XOPEN2K
+ # define F_GETOWN 23 /* Get owner (receiver of SIGIO). */
+ # define F_SETOWN 24 /* Set owner (receiver of SIGIO). */
+ #endif
+ #define F_GETLK 14 /* Get record locking info. */
+ #define F_SETLK 6 /* Set record locking info (non-blocking). */
+ #define F_SETLKW 7 /* Set record locking info (blocking). */
+ #ifdef __USE_SVID
+ # define F_ALLOCSP 10 /* Allocate space in the file. */
+ # define F_FREESP 11 /* Free space in the file. */
+ # define F_RGETLK 20 /* Get remote record locking info. */
+ # define F_RSETLK 21 /* Set remote locking info (non-blocking). */
+ # define F_RSETLKW 22 /* Set remote locking info (blocking). */
+ #endif
+
+ /* File descriptor flags used with F_GETFD and F_SETFD. */
+ #define FD_CLOEXEC 1 /* Close on exec. */
+
+
+ #include <bits/types.h>
+
+ /* The structure describing an advisory lock. This is the type of the third
+ argument to `fcntl' for the F_GETLK, F_SETLK, and F_SETLKW requests. */
+ struct flock
+ {
+ short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
+ short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
+ __off_t l_start; /* Offset where the lock begins. */
+ __off_t l_len; /* Size of the locked area; zero means until EOF. */
+ long int l_sysid; /* System ID where locking process resides. */
+ __pid_t l_pid; /* Process holding the lock. */
+ long int pad[4]; /* Reserved for future use. */
+ };
+
+ /* Values for the `l_type' field of a `struct flock'. */
+ #define F_RDLCK 1 /* Read lock. */
+ #define F_WRLCK 2 /* Write lock. */
+ #define F_UNLCK 3 /* Remove lock. */
+
+ #define O_LARGEFILE 0x2000 /* bleah! got to be a better way than copying the
+ *whole file* */
diff -rcP glibc-2.2.4.old/sysdeps/unix/sysv/sysv4/solaris2/bits/ioctls.h glibc-2.2.4/sysdeps/unix/sysv/sysv4/solaris2/bits/ioctls.h
*** glibc-2.2.4.old/sysdeps/unix/sysv/sysv4/solaris2/bits/ioctls.h Wed Oct 3 10:57:48 2001
--- glibc-2.2.4/sysdeps/unix/sysv/sysv4/solaris2/bits/ioctls.h Sat Oct 6 17:29:01 2001
***************
*** 0 ****
--- 1,142 ----
+ #ifndef _SYS_IOCTL_H
+ # error "Never use <bits/ioctls.h> directly; include <sys/ioctl.h> instead."
+ #endif
+
+
+ #define IOCPARM_MASK 0xff /* parameters must be < 256 bytes */
+ #define IOC_VOID 0x20000000 /* no parameters */
+ #define IOC_OUT 0x40000000 /* copy out parameters */
+ #define IOC_IN 0x80000000 /* copy in parameters */
+ #define IOC_INOUT (IOC_IN|IOC_OUT)
+ /* the 0x20000000 is so we can distinguish new ioctl's from old */
+ #define _IO(x, y) (IOC_VOID|(x<<8)|y)
+ #define _IOR(x, y, t) \
+ (IOC_OUT|((((int)sizeof (t))&IOCPARM_MASK)<<16)|(x<<8)|y)
+ #define _IORN(x, y, t) (IOC_OUT|(((t)&IOCPARM_MASK)<<16)|(x<<8)|y)
+ #define _IOW(x, y, t) (IOC_IN|((((int)sizeof (t))&IOCPARM_MASK)<<16)|(x<<8)|y)
+ #define _IOWN(x, y, t) (IOC_IN|(((t)&IOCPARM_MASK)<<16)|(x<<8)|y)
+ /* this should be _IORW, but stdio got there first */
+ #define _IOWR(x, y, t) \
+ (IOC_INOUT|((((int)sizeof (t))&IOCPARM_MASK)<<16)|(x<<8)|y)
+
+ struct bsd_compat_ioctltab {
+ int cmd; /* ioctl cookie, encoded or otherwise */
+ int flag; /* one of IOC_VOID, IOC_IN, IOC_OUT, or IOC_INOUT */
+ unsigned int size; /* The amount of data to copyin/copyout */
+ };
+
+ #define SIOCSHIWAT _IOW('s', 0, int) /* set high watermark */
+ #define SIOCGHIWAT _IOR('s', 1, int) /* get high watermark */
+ #define SIOCSLOWAT _IOW('s', 2, int) /* set low watermark */
+ #define SIOCGLOWAT _IOR('s', 3, int) /* get low watermark */
+ #define SIOCATMARK _IOR('s', 7, int) /* at oob mark? */
+ #define SIOCSPGRP _IOW('s', 8, int) /* set process group */
+ #define SIOCGPGRP _IOR('s', 9, int) /* get process group */
+
+ #define SIOCADDRT _IOW('r', 10, struct rtentry) /* add route */
+ #define SIOCDELRT _IOW('r', 11, struct rtentry) /* delete route */
+ /* For multicast routing. These might change in future release */
+ #define SIOCGETVIFCNT _IOWR('r', 20, struct sioc_vif_req)
+ /* get vif pkt count */
+ #define SIOCGETSGCNT _IOWR('r', 21, struct sioc_sg_req)
+ /* get src,grp pkt count */
+
+ #define SIOCSIFADDR _IOW('i', 12, struct ifreq) /* set ifnet address */
+ #define SIOCGIFADDR _IOWR('i', 13, struct ifreq) /* get ifnet address */
+ #define SIOCSIFDSTADDR _IOW('i', 14, struct ifreq) /* set p-p address */
+ #define SIOCGIFDSTADDR _IOWR('i', 15, struct ifreq) /* get p-p address */
+ #define SIOCSIFFLAGS _IOW('i', 16, struct ifreq) /* set ifnet flags */
+ #define SIOCGIFFLAGS _IOWR('i', 17, struct ifreq) /* get ifnet flags */
+ #define SIOCSIFMEM _IOW('i', 18, struct ifreq) /* set interface mem */
+ #define SIOCGIFMEM _IOWR('i', 19, struct ifreq) /* get interface mem */
+ #define SIOCGIFCONF _IOWR('i', 20, struct ifconf) /* get ifnet list */
+ #define SIOCSIFMTU _IOW('i', 21, struct ifreq) /* set if_mtu */
+ #define SIOCGIFMTU _IOWR('i', 22, struct ifreq) /* get if_mtu */
+
+ /* from 4.3BSD */
+ #define SIOCGIFBRDADDR _IOWR('i', 23, struct ifreq) /* get broadcast addr */
+ #define SIOCSIFBRDADDR _IOW('i', 24, struct ifreq) /* set broadcast addr */
+ #define SIOCGIFNETMASK _IOWR('i', 25, struct ifreq) /* get net addr mask */
+ #define SIOCSIFNETMASK _IOW('i', 26, struct ifreq) /* set net addr mask */
+ #define SIOCGIFMETRIC _IOWR('i', 27, struct ifreq) /* get IF metric */
+ #define SIOCSIFMETRIC _IOW('i', 28, struct ifreq) /* set IF metric */
+
+ #define SIOCSARP _IOW('i', 30, struct arpreq) /* set arp entry */
+ #define SIOCGARP _IOWR('i', 31, struct arpreq) /* get arp entry */
+ #define SIOCDARP _IOW('i', 32, struct arpreq) /* delete arp entry */
+ #define SIOCUPPER _IOW('i', 40, struct ifreq) /* attach upper layer */
+ #define SIOCLOWER _IOW('i', 41, struct ifreq) /* attach lower layer */
+ #define SIOCSETSYNC _IOW('i', 44, struct ifreq) /* set syncmode */
+ #define SIOCGETSYNC _IOWR('i', 45, struct ifreq) /* get syncmode */
+ #define SIOCSSDSTATS _IOWR('i', 46, struct ifreq) /* sync data stats */
+ #define SIOCSSESTATS _IOWR('i', 47, struct ifreq) /* sync error stats */
+
+ #define SIOCSPROMISC _IOW('i', 48, int) /* request promisc */
+ /* mode on/off */
+ #define SIOCADDMULTI _IOW('i', 49, struct ifreq) /* set m/c address */
+ #define SIOCDELMULTI _IOW('i', 50, struct ifreq) /* clr m/c address */
+
+ /* protocol i/o controls */
+ #define SIOCSNIT _IOW('p', 0, struct nit_ioc) /* set nit modes */
+ #define SIOCGNIT _IOWR('p', 1, struct nit_ioc) /* get nit modes */
+
+ /* STREAMS based socket emulation */
+
+ #define SIOCGETNAME _IOR('s', 52, struct sockaddr) /* getsockname */
+ #define SIOCGETPEER _IOR('s', 53, struct sockaddr) /* getpeername */
+ #define IF_UNITSEL _IOW('s', 54, int) /* set unit number */
+ #define SIOCXPROTO _IO('s', 55) /* empty proto table */
+
+ #define SIOCIFDETACH _IOW('i', 56, struct ifreq) /* detach interface */
+ #define SIOCGENPSTATS _IOWR('i', 57, struct ifreq) /* get ENP stats */
+ #define SIOCX25XMT _IOWR('i', 59, struct ifreq) /* start a slp proc */
+ /* n x25if */
+ #define SIOCX25RCV _IOWR('i', 60, struct ifreq) /* start a slp proc */
+ /* in x25if */
+ #define SIOCX25TBL _IOWR('i', 61, struct ifreq) /* xfer lun table to */
+ /* kernel */
+ #define SIOCSLGETREQ _IOWR('i', 71, struct ifreq) /* wait for switched */
+ /* SLIP request */
+ #define SIOCSLSTAT _IOW('i', 72, struct ifreq) /* pass SLIP info to */
+ /* kernel */
+ #define SIOCSIFNAME _IOW('i', 73, struct ifreq) /* set interface name */
+ #define SIOCGENADDR _IOWR('i', 85, struct ifreq) /* Get ethernet addr */
+ #define SIOCGIFNUM _IOR('i', 87, int) /* get number of ifs */
+
+ #define SIOCGIFMUXID _IOWR('i', 88, struct ifreq) /* get intrf muxid */
+ #define SIOCSIFMUXID _IOW('i', 89, struct ifreq) /* set intrf muxid */
+
+ #define SIOCGIFINDEX _IOWR('i', 90, struct ifreq) /* get intrf index */
+ #define SIOCSIFINDEX _IOW('i', 91, struct ifreq) /* set intrf index */
+
+
+ #define FIOCLEX _IO('f', 1) /* set exclusive use on fd */
+ #define FIONCLEX _IO('f', 2) /* remove exclusive use */
+ /* another local */
+ #define FIONREAD _IOR('f', 127, int) /* get # bytes to read */
+ #define FIONBIO _IOW('f', 126, int) /* set/clear non-blocking i/o */
+ #define FIOASYNC _IOW('f', 125, int) /* set/clear async i/o */
+ #define FIOSETOWN _IOW('f', 124, int) /* set owner */
+ #define FIOGETOWN _IOR('f', 123, int) /* get owner */
+
+ /*
+ * ioctl's for Online: DiskSuite.
+ * WARNING - the support for these ioctls may be withdrawn
+ * in future OS releases.
+ */
+ #define _FIOLFS _IO('f', 64) /* file system lock */
+ #define _FIOLFSS _IO('f', 65) /* file system lock status */
+ #define _FIOFFS _IO('f', 66) /* file system flush */
+ #define _FIOAI _FIOOBSOLETE67 /* get allocation info is */
+ #define _FIOOBSOLETE67 _IO('f', 67) /* obsolete and unsupported */
+ #define _FIOSATIME _IO('f', 68) /* set atime */
+ #define _FIOSDIO _IO('f', 69) /* set delayed io */
+ #define _FIOGDIO _IO('f', 70) /* get delayed io */
+ #define _FIOIO _IO('f', 71) /* inode open */
+ #define _FIOISLOG _IO('f', 72) /* disksuite/ufs protocol */
+ #define _FIOISLOGOK _IO('f', 73) /* disksuite/ufs protocol */
+ #define _FIOLOGRESET _IO('f', 74) /* disksuite/ufs protocol */
+
+ #define _FIOISBUSY _IO('f', 75) /* networker/ufs protocol */
+ #define _FIODIRECTIO _IO('f', 76) /* directio */
+ #define _FIOTUNE _IO('f', 77) /* tuning */
diff -rcP glibc-2.2.4.old/sysdeps/unix/sysv/sysv4/solaris2/bits/termios.h glibc-2.2.4/sysdeps/unix/sysv/sysv4/solaris2/bits/termios.h
*** glibc-2.2.4.old/sysdeps/unix/sysv/sysv4/solaris2/bits/termios.h Wed Oct 3 10:57:48 2001
--- glibc-2.2.4/sysdeps/unix/sysv/sysv4/solaris2/bits/termios.h Thu Oct 4 21:22:18 2001
***************
*** 0 ****
--- 1,438 ----
+ /* termios type and macro definitions. 4.4 BSD/generic GNU version.
+ Copyright (C) 1993,94,96,97,99,2001 Free Software 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 Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+ #ifndef _TERMIOS_H
+ # error "Never include <bits/termios.h> directly; use <termios.h> instead."
+ #endif
+
+ /* These macros are also defined in some <bits/ioctls.h> files (with
+ numerically identical values), but this serves to shut up cpp's
+ complaining. */
+ #ifdef __USE_BSD
+
+ # ifdef MDMBUF
+ # undef MDMBUF
+ # endif
+ # ifdef FLUSHO
+ # undef FLUSHO
+ # endif
+ # ifdef PENDIN
+ # undef PENDIN
+ # endif
+
+ #endif /* __USE_BSD */
+
+ #ifdef ECHO
+ # undef ECHO
+ #endif
+ #ifdef TOSTOP
+ # undef TOSTOP
+ #endif
+ #ifdef NOFLSH
+ # undef NOFLSH
+ #endif
+
+
+ /* These definitions match those used by the 4.4 BSD kernel.
+ If the operating system has termios system calls or ioctls that
+ correctly implement the POSIX.1 behavior, there should be a
+ system-dependent version of this file that defines `struct termios',
+ `tcflag_t', `cc_t', `speed_t' and the `TC*' constants appropriately. */
+
+ /* Type of terminal control flag masks. */
+ typedef unsigned long int tcflag_t;
+
+ /* Type of control characters. */
+ typedef unsigned char cc_t;
+
+ /* Type of baud rate specifiers. */
+ typedef long int speed_t;
+
+ /* Terminal control structure. */
+ struct termios
+ {
+ /* Input modes. */
+ tcflag_t c_iflag;
+ #define IGNBRK (1 << 0) /* Ignore break condition. */
+ #define BRKINT (1 << 1) /* Signal interrupt on break. */
+ #define IGNPAR (1 << 2) /* Ignore characters with parity errors. */
+ #define PARMRK (1 << 3) /* Mark parity and framing errors. */
+ #define INPCK (1 << 4) /* Enable input parity check. */
+ #define ISTRIP (1 << 5) /* Strip 8th bit off characters. */
+ #define INLCR (1 << 6) /* Map NL to CR on input. */
+ #define IGNCR (1 << 7) /* Ignore CR. */
+ #define ICRNL (1 << 8) /* Map CR to NL on input. */
+ #define IXON (1 << 9) /* Enable start/stop output control. */
+ #define IXOFF (1 << 10) /* Enable start/stop input control. */
+ #ifdef __USE_BSD
+ # define IXANY (1 << 11) /* Any character will restart after stop. */
+ # define IMAXBEL (1 << 13) /* Ring bell when input queue is full. */
+ #endif
+ #ifdef __USE_GNU
+ # define IUCLC (1 << 14) /* Translate upper case input to lower case. */
+ #endif
+
+ /* Output modes. */
+ tcflag_t c_oflag;
+ #define OPOST (1 << 0) /* Perform output processing. */
+ #ifdef __USE_BSD
+ # define ONLCR (1 << 1) /* Map NL to CR-NL on output. */
+ # define OXTABS (1 << 2) /* Expand tabs to spaces. */
+ # define ONOEOT (1 << 3) /* Discard EOT (^D) on output. */
+ #endif
+ #ifdef __USE_GNU
+ # define OLCUC (1 << 9) /* Translate lower case output to upper case */
+ #endif
+
+ /* Control modes. */
+ tcflag_t c_cflag;
+ #ifdef __USE_BSD
+ # define CIGNORE (1 << 0) /* Ignore these control flags. */
+ #endif
+ #define CSIZE (CS5|CS6|CS7|CS8) /* Number of bits per byte (mask). */
+ #define CS5 0 /* 5 bits per byte. */
+ #define CS6 (1 << 8) /* 6 bits per byte. */
+ #define CS7 (1 << 9) /* 7 bits per byte. */
+ #define CS8 (CS6|CS7) /* 8 bits per byte. */
+ #define CSTOPB (1 << 10) /* Two stop bits instead of one. */
+ #define CREAD (1 << 11) /* Enable receiver. */
+ #define PARENB (1 << 12) /* Parity enable. */
+ #define PARODD (1 << 13) /* Odd parity instead of even. */
+ #define HUPCL (1 << 14) /* Hang up on last close. */
+ #define CLOCAL (1 << 15) /* Ignore modem status lines. */
+ #ifdef __USE_BSD
+ # define CCTS_OFLOW (1 << 16) /* CTS flow control of output. */
+ # define CRTS_IFLOW (1 << 17) /* RTS flow control of input. */
+ # define CRTSCTS (CCTS_OFLOW|CRTS_IFLOW) /* CTS/RTS flow control. */
+ # define MDMBUF (1 << 20) /* Carrier flow control of output. */
+ #endif
+
+ /* Local modes. */
+ tcflag_t c_lflag;
+ #ifdef __USE_BSD
+ # define ECHOKE (1 << 0) /* Visual erase for KILL. */
+ #endif
+ #define _ECHOE (1 << 1) /* Visual erase for ERASE. */
+ #define ECHOE _ECHOE
+ #define _ECHOK (1 << 2) /* Echo NL after KILL. */
+ #define ECHOK _ECHOK
+ #define _ECHO (1 << 3) /* Enable echo. */
+ #define ECHO _ECHO
+ #define _ECHONL (1 << 4) /* Echo NL even if ECHO is off. */
+ #define ECHONL _ECHONL
+ #ifdef __USE_BSD
+ # define ECHOPRT (1 << 5) /* Hardcopy visual erase. */
+ # define ECHOCTL (1 << 6) /* Echo control characters as ^X. */
+ #endif
+ #define _ISIG (1 << 7) /* Enable signals. */
+ #define ISIG _ISIG
+ #define _ICANON (1 << 8) /* Do erase and kill processing. */
+ #define ICANON _ICANON
+ #ifdef __USE_BSD
+ # define ALTWERASE (1 << 9) /* Alternate WERASE algorithm. */
+ #endif
+ #define _IEXTEN (1 << 10) /* Enable DISCARD and LNEXT. */
+ #define IEXTEN _IEXTEN
+ #define EXTPROC (1 << 11) /* External processing. */
+ #define _TOSTOP (1 << 22) /* Send SIGTTOU for background output. */
+ #define TOSTOP _TOSTOP
+ #ifdef __USE_BSD
+ # define FLUSHO (1 << 23) /* Output being flushed (state). */
+ # define NOKERNINFO (1 << 25) /* Disable VSTATUS. */
+ # define PENDIN (1 << 29) /* Retype pending input (state). */
+ #endif
+ #define _NOFLSH (1 << 31) /* Disable flush after interrupt. */
+ #define NOFLSH _NOFLSH
+
+ /* Control characters. */
+ #define VEOF 0 /* End-of-file character [ICANON]. */
+ #define VEOL 1 /* End-of-line character [ICANON]. */
+ #ifdef __USE_BSD
+ # define VEOL2 2 /* Second EOL character [ICANON]. */
+ #endif
+ #define VERASE 3 /* Erase character [ICANON]. */
+ #ifdef __USE_BSD
+ # define VWERASE 4 /* Word-erase character [ICANON]. */
+ #endif
+ #define VKILL 5 /* Kill-line character [ICANON]. */
+ #ifdef __USE_BSD
+ # define VREPRINT 6 /* Reprint-line character [ICANON]. */
+ #endif
+ #define VINTR 8 /* Interrupt character [ISIG]. */
+ #define VQUIT 9 /* Quit character [ISIG]. */
+ #define VSUSP 10 /* Suspend character [ISIG]. */
+ #ifdef __USE_BSD
+ # define VDSUSP 11 /* Delayed suspend character [ISIG]. */
+ #endif
+ #define VSTART 12 /* Start (X-ON) character [IXON, IXOFF]. */
+ #define VSTOP 13 /* Stop (X-OFF) character [IXON, IXOFF]. */
+ #ifdef __USE_BSD
+ # define VLNEXT 14 /* Literal-next character [IEXTEN]. */
+ # define VDISCARD 15 /* Discard character [IEXTEN]. */
+ #endif
+ #define VMIN 16 /* Minimum number of bytes read at once [!ICANON]. */
+ #define VTIME 17 /* Time-out value (tenths of a second) [!ICANON]. */
+ #ifdef __USE_BSD
+ # define VSTATUS 18 /* Status character [ICANON]. */
+ #endif
+ #define NCCS 20 /* Value duplicated in <hurd/tioctl.defs>. */
+ cc_t c_cc[NCCS];
+
+ /* Input and output baud rates. */
+ speed_t __ispeed, __ospeed;
+ #define B0 0 /* Hang up. */
+ #define B50 50 /* 50 baud. */
+ #define B75 75 /* 75 baud. */
+ #define B110 110 /* 110 baud. */
+ #define B134 134 /* 134.5 baud. */
+ #define B150 150 /* 150 baud. */
+ #define B200 200 /* 200 baud. */
+ #define B300 300 /* 300 baud. */
+ #define B600 600 /* 600 baud. */
+ #define B1200 1200 /* 1200 baud. */
+ #define B1800 1800 /* 1800 baud. */
+ #define B2400 2400 /* 2400 baud. */
+ #define B4800 4800 /* 4800 baud. */
+ #define B9600 9600 /* 9600 baud. */
+ #define B19200 19200 /* 19200 baud. */
+ #define B38400 38400 /* 38400 baud. */
+ #ifdef __USE_MISC
+ # define EXTA 19200
+ # define EXTB 38400
+ #endif
+ #define B57600 57600
+ #define B115200 115200
+ #define B230400 230400
+ #define B460800 460800
+ #define B500000 500000
+ #define B576000 576000
+ #define B921600 921600
+ #define B1000000 1000000
+ #define B1152000 1152000
+ #define B1500000 1500000
+ #define B2000000 2000000
+ #define B2500000 2500000
+ #define B3000000 3000000
+ #define B3500000 3500000
+ #define B4000000 4000000
+ };
+
+ #define _IOT_termios /* Hurd ioctl type field. */ \
+ _IOT (_IOTS (tcflag_t), 4, _IOTS (cc_t), NCCS, _IOTS (speed_t), 2)
+
+ /* Values for the OPTIONAL_ACTIONS argument to `tcsetattr'. */
+ #define TCSANOW 0 /* Change immediately. */
+ #define TCSADRAIN 1 /* Change when pending output is written. */
+ #define TCSAFLUSH 2 /* Flush pending input before changing. */
+ #ifdef __USE_BSD
+ # define TCSASOFT 0x10 /* Flag: Don't alter hardware state. */
+ #endif
+
+ #define _TIOC ('T'<<8)
+ #define TIOC _TIOC
+
+ #define TCGETA (_TIOC|1)
+ #define TCSETA (_TIOC|2)
+ #define TCSETAW (_TIOC|3)
+ #define TCSETAF (_TIOC|4)
+ #define TCSBRK (_TIOC|5)
+ #define TCXONC (_TIOC|6)
+ #define TCFLSH (_TIOC|7)
+
+ /* Slots reserved for 386/XENIX compatibility - keyboard control */
+
+ #define TIOCKBON (_TIOC|8)
+ #define TIOCKBOF (_TIOC|9)
+ #define KBENABLED (_TIOC|10)
+
+ #ifndef IOCTYPE
+ #define IOCTYPE 0xff00
+ #endif
+
+ #define TCDSET (_TIOC|32)
+ #define RTS_TOG (_TIOC|33) /* 386 - "RTS" toggle define 8A1 protocol */
+
+ #define TIOCGWINSZ (_TIOC|104)
+ #define TIOCSWINSZ (_TIOC|103)
+
+ /*
+ * Softcarrier ioctls
+ */
+ #define TIOCGSOFTCAR (_TIOC|105)
+ #define TIOCSSOFTCAR (_TIOC|106)
+
+
+ /* termios ioctls */
+
+ #define TCGETS (_TIOC|13)
+ #define TCSETS (_TIOC|14)
+ /* #define TCSANOW (_TIOC|14) */
+ #define TCSETSW (_TIOC|15)
+ /* #define TCSADRAIN (_TIOC|15) */
+ #define TCSETSF (_TIOC|16)
+
+ /*
+ * NTP PPS ioctls
+ */
+ #define TIOCGPPS (_TIOC|125)
+ #define TIOCSPPS (_TIOC|126)
+ #define TIOCGPPSEV (_TIOC|127)
+
+ /* #define TCSAFLUSH (_TIOC|16) */
+
+ /* termios option flags */
+
+ #define TCIFLUSH 0 /* flush data received but not read */
+ #define TCOFLUSH 1 /* flush data written but not transmitted */
+ #define TCIOFLUSH 2 /* flush both data both input and output queues */
+
+ #define TCOOFF 0 /* suspend output */
+ #define TCOON 1 /* restart suspended output */
+ #define TCIOFF 2 /* suspend input */
+ #define TCION 3 /* restart suspended input */
+
+ /* TIOC ioctls for BSD, ptys, job control and modem control */
+
+ #define tIOC ('t'<<8)
+
+ /* Slots for 386/XENIX compatibility */
+ /* BSD includes these ioctls in ttold.h */
+
+ #define TIOCGETD (tIOC|0)
+ #define TIOCSETD (tIOC|1)
+ #define TIOCHPCL (tIOC|2)
+ #define TIOCGETP (tIOC|8)
+ #define TIOCSETP (tIOC|9)
+ #define TIOCSETN (tIOC|10)
+ #define TIOCEXCL (tIOC|13)
+ #define TIOCNXCL (tIOC|14)
+ #define TIOCFLUSH (tIOC|16)
+ #define TIOCSETC (tIOC|17)
+ #define TIOCGETC (tIOC|18)
+ /*
+ * BSD ioctls that are not the same as XENIX are included here.
+ * There are also some relevant ioctls from SUN/BSD sys/ttycom.h
+ * BSD pty ioctls like TIOCPKT are not supported in SVR4.
+ */
+
+ #define TIOCLBIS (tIOC|127) /* bis local mode bits */
+ #define TIOCLBIC (tIOC|126) /* bic local mode bits */
+ #define TIOCLSET (tIOC|125) /* set entire local mode word */
+ #define TIOCLGET (tIOC|124) /* get local modes */
+ #define TIOCSBRK (tIOC|123) /* set break bit */
+ #define TIOCCBRK (tIOC|122) /* clear break bit */
+ #define TIOCSDTR (tIOC|121) /* set data terminal ready */
+ #define TIOCCDTR (tIOC|120) /* clear data terminal ready */
+ #define TIOCSLTC (tIOC|117) /* set local special chars */
+ #define TIOCGLTC (tIOC|116) /* get local special chars */
+ #define TIOCOUTQ (tIOC|115) /* driver output queue size */
+ #define TIOCNOTTY (tIOC|113) /* void tty association */
+ #define TIOCSTOP (tIOC|111) /* stop output, like ^S */
+ #define TIOCSTART (tIOC|110) /* start output, like ^Q */
+
+ /* POSIX job control ioctls */
+
+ #if (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || \
+ defined(__EXTENSIONS__)
+ #define TIOCGPGRP (tIOC|20) /* get pgrp of tty */
+ #define TIOCSPGRP (tIOC|21) /* set pgrp of tty */
+ #define TIOCGSID (tIOC|22) /* get session id on ctty */
+ #define TIOCSSID (tIOC|24) /* set session id on ctty */
+
+ /* Miscellaneous */
+ #define TIOCSTI (tIOC|23) /* simulate terminal input */
+
+ /* Modem control */
+ #define TIOCMSET (tIOC|26) /* set all modem bits */
+ #define TIOCMBIS (tIOC|27) /* bis modem bits */
+ #define TIOCMBIC (tIOC|28) /* bic modem bits */
+ #define TIOCMGET (tIOC|29) /* get all modem bits */
+ #define TIOCM_LE 0001 /* line enable */
+ #define TIOCM_DTR 0002 /* data terminal ready */
+ #define TIOCM_RTS 0004 /* request to send */
+ #define TIOCM_ST 0010 /* secondary transmit */
+ #define TIOCM_SR 0020 /* secondary receive */
+ #define TIOCM_CTS 0040 /* clear to send */
+ #define TIOCM_CAR 0100 /* carrier detect */
+ #define TIOCM_CD TIOCM_CAR
+ #define TIOCM_RNG 0200 /* ring */
+ #define TIOCM_RI TIOCM_RNG
+ #define TIOCM_DSR 0400 /* data set ready */
+
+ /* pseudo-tty */
+
+ #define TIOCREMOTE (tIOC|30) /* remote input editing */
+ #define TIOCSIGNAL (tIOC|31) /* pty: send signal to slave */
+
+
+ /* Some more 386 xenix stuff */
+
+ #define LDIOC ('D'<<8)
+
+ #define LDOPEN (LDIOC|0)
+ #define LDCLOSE (LDIOC|1)
+ #define LDCHG (LDIOC|2)
+ #define LDGETT (LDIOC|8)
+ #define LDSETT (LDIOC|9)
+
+ /* Slots for 386 compatibility */
+
+ #define LDSMAP (LDIOC|110)
+ #define LDGMAP (LDIOC|111)
+ #define LDNMAP (LDIOC|112)
+ #define LDEMAP (LDIOC|113)
+ #define LDDMAP (LDIOC|114)
+
+ /*
+ * These are retained for 386/XENIX compatibility.
+ */
+
+ #define DIOC ('d'<<8)
+ #define DIOCGETP (DIOC|8) /* V7 */
+ #define DIOCSETP (DIOC|9) /* V7 */
+
+ /*
+ * Returns a non-zero value if there
+ * are characters in the input queue.
+ *
+ * XXX - somebody is confused here. V7 had no such "ioctl", although XENIX may
+ * have added it; 4BSD had FIONREAD, which returned the number of characters
+ * waiting, and was supposed to work on all descriptors (i.e., every driver
+ * should make a stab at implementing it).
+ */
+ #define FIORDCHK (('f'<<8)|3) /* V7 */
+ #endif /* (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE))... */
+
+ #ifndef _SYS_TTOLD_H
+ #ifndef _SYS_PTEM_H
+
+ #if (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || \
+ defined(__EXTENSIONS__)
+ /* Windowing structure to support JWINSIZE/TIOCSWINSZ/TIOCGWINSZ */
+ struct winsize {
+ unsigned short ws_row; /* rows, in characters */
+ unsigned short ws_col; /* columns, in character */
+ unsigned short ws_xpixel; /* horizontal size, pixels */
+ unsigned short ws_ypixel; /* vertical size, pixels */
+ };
+ #endif /* (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE))... */
+
+ #endif /* end _SYS_PTEM_H */
+ #endif /* end _SYS_TTOLD_H */
+
diff -rcP glibc-2.2.4.old/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h glibc-2.2.4/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h
*** glibc-2.2.4.old/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h Tue Oct 2 16:44:21 2001
--- glibc-2.2.4/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h Fri Oct 5 18:10:33 2001
***************
*** 23,28 ****
--- 23,30 ----
#ifndef _BITS_TYPES_H
#define _BITS_TYPES_H 1
+ #define NO_LIBC_SA_LEN 1
+
#include <features.h>
#define __need_size_t
***************
*** 79,84 ****
--- 81,88 ----
typedef long int __daddr_t; /* The type of a disk address. */
typedef char *__caddr_t;
typedef long int __time_t;
+ typedef int __timer_t;
+ typedef int __clockid_t;
typedef unsigned int __useconds_t;
typedef int __suseconds_t;
typedef long int __swblk_t; /* Type of a swap block maybe? */
diff -rcP glibc-2.2.4.old/sysdeps/unix/sysv/sysv4/solaris2/bits/utmp.h glibc-2.2.4/sysdeps/unix/sysv/sysv4/solaris2/bits/utmp.h
*** glibc-2.2.4.old/sysdeps/unix/sysv/sysv4/solaris2/bits/utmp.h Wed Oct 3 10:58:16 2001
--- glibc-2.2.4/sysdeps/unix/sysv/sysv4/solaris2/bits/utmp.h Thu Oct 4 20:52:34 2001
***************
*** 0 ****
--- 1,70 ----
+ /* The `struct utmp' type, describing entries in the utmp file. System V.
+ Copyright (C) 1996, 1997 Free Software 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 Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+ #ifndef _UTMP_H
+ # error "Never include <bits/utmp.h> directly; use <utmp.h> instead."
+ #endif
+
+
+ #include <time.h>
+
+ #define _PATH_UTMP "/var/adm/utmp"
+ #define _PATH_WTMP "/var/adm/wtmp"
+ #define _PATH_LASTLOG "/var/adm/lastlog"
+
+
+ struct utmp
+ {
+ #define ut_name ut_user
+ char ut_user[8];
+ char ut_id[4];
+ char ut_line[12];
+ short int ut_pid;
+ short int ut_type;
+ struct exit_status
+ {
+ short int e_termination;
+ short int e_exit;
+ } ut_exit;
+ __time_t ut_time;
+ struct timeval ut_tv;
+ };
+
+
+ /* Tell the user that we have a modern system with UT_HOST, UT_TYPE, UT_ID
+ and UT_TV fields. */
+ #define _HAVE_UT_TYPE 1
+ #define _HAVE_UT_ID 1
+ #define _HAVE_UT_TV 1
+ #define _HAVE_UT_HOST 0
+
+ #define UT_NAMESIZE 8
+ #define UT_LINESIZE 12
+ #define UT_HOSTSIZE 16
+
+ #define EMPTY 0
+ #define RUN_LVL 1
+ #define BOOT_TIME 2
+ #define OLD_TIME 3
+ #define NEW_TIME 4
+ #define INIT_PROCESS 5 /* Process spawned by "init" */
+ #define LOGIN_PROCESS 6 /* A "getty" process waiting for login */
+ #define USER_PROCESS 7 /* A user process */
+ #define DEAD_PROCESS 8
+
diff -rcP glibc-2.2.4.old/sysdeps/unix/sysv/sysv4/solaris2/init-first.c glibc-2.2.4/sysdeps/unix/sysv/sysv4/solaris2/init-first.c
*** glibc-2.2.4.old/sysdeps/unix/sysv/sysv4/solaris2/init-first.c Wed Dec 31 17:00:00 1969
--- glibc-2.2.4/sysdeps/unix/sysv/sysv4/solaris2/init-first.c Wed Oct 3 22:03:17 2001
***************
*** 0 ****
--- 1,61 ----
+ /* Initialization code run first thing by the ELF startup code. Stub version.
+ Copyright (C) 1995, 1997, 1998, 2001 Free Software 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 Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+ #include <unistd.h>
+ #include <sys/types.h>
+
+ int __libc_multiple_libcs = 1;
+ int __libc_argc;
+ char **__libc_argv;
+
+ extern void __libc_init (int, char **, char **);
+ #ifdef USE_NONOPTION_FLAGS
+ extern void __getopt_clean_environment (char **);
+ #endif
+
+ #ifdef SHARED
+ void
+ __libc_init_first (void)
+ {
+ }
+ #endif
+
+ #ifdef SHARED
+ /* NOTE! The linker notices the magical name `_init' and sets the DT_INIT
+ pointer in the dynamic section based solely on that. It is convention
+ for this function to be in the `.init' section, but the symbol name is
+ the only thing that really matters!! */
+ void _init
+ #else
+ void __libc_init_first
+ #endif
+ (int argc, char *arg0, ...)
+ {
+ char **argv = &arg0, **envp = &argv[argc + 1];
+
+ __libc_argv = argv;
+ __libc_argc = argc;
+ __environ = envp;
+ __libc_init (argc, argv, envp);
+
+ #ifdef USE_NONOPTION_FLAGS
+ /* This is a hack to make the special getopt in GNU libc working. */
+ __getopt_clean_environment (envp);
+ #endif
+ }
diff -rcP glibc-2.2.4.old/sysdeps/unix/sysv/sysv4/solaris2/net/if.h glibc-2.2.4/sysdeps/unix/sysv/sysv4/solaris2/net/if.h
*** glibc-2.2.4.old/sysdeps/unix/sysv/sysv4/solaris2/net/if.h Wed Dec 31 17:00:00 1969
--- glibc-2.2.4/sysdeps/unix/sysv/sysv4/solaris2/net/if.h Thu Oct 4 22:29:58 2001
***************
*** 0 ****
--- 1,132 ----
+ #include <sys/socket.h>
+
+ #ifndef _NET_IF_H
+ #define _NET_IF_H
+
+ #define IFF_UP 0x1 /* interface is up */
+ #define IFF_BROADCAST 0x2 /* broadcast address valid */
+ #define IFF_DEBUG 0x4 /* turn on debugging */
+ #define IFF_LOOPBACK 0x8 /* is a loopback net */
+ #define IFF_POINTOPOINT 0x10 /* interface is point-to-point link */
+ #define IFF_NOTRAILERS 0x20 /* avoid use of trailers */
+ #define IFF_RUNNING 0x40 /* resources allocated */
+ #define IFF_NOARP 0x80 /* no address resolution protocol */
+ #define IFF_PROMISC 0x100 /* receive all packets */
+ #define IFF_ALLMULTI 0x200 /* receive all multicast packets */
+ #define IFF_INTELLIGENT 0x400 /* protocol code on board */
+ #define IFF_MULTICAST 0x800 /* supports multicast */
+ #define IFF_MULTI_BCAST 0x1000 /* multicast using broadcast address */
+ #define IFF_UNNUMBERED 0x2000 /* non-unique address */
+ #define IFF_DHCPRUNNING 0x4000 /* DHCP controls this interface */
+ #define IFF_PRIVATE 0x8000 /* do not advertise */
+
+ /*
+ * The ifaddr structure contains information about one address
+ * of an interface. They are maintained by the different address families,
+ * are allocated and attached when an address is set, and are linked
+ * together so all addresses for an interface can be located.
+ */
+ struct ifaddr {
+ struct sockaddr ifa_addr; /* address of interface */
+ union {
+ struct sockaddr ifu_broadaddr;
+ struct sockaddr ifu_dstaddr;
+ } ifa_ifu;
+ struct ifnet *ifa_ifp; /* back-pointer to interface */
+ struct ifaddr *ifa_next; /* next address for interface */
+ };
+
+ #define ifa_broadaddr ifa_ifu.ifu_broadaddr /* broadcast address */
+ #define ifa_dstaddr ifa_ifu.ifu_dstaddr /* other end of p-to-p link */
+
+ /*
+ * Interface request structure used for socket
+ * ioctl's. All interface ioctl's must have parameter
+ * definitions which begin with ifr_name. The
+ * remainder may be interface specific.
+ */
+ struct ifreq {
+ #define IFNAMSIZ 16
+ char ifr_name[IFNAMSIZ]; /* if name, e.g. "en0" */
+ union {
+ struct sockaddr ifru_addr;
+ struct sockaddr ifru_dstaddr;
+ char ifru_oname[IFNAMSIZ]; /* other if name */
+ struct sockaddr ifru_broadaddr;
+ struct sockaddr ifru_netmask;
+ struct sockaddr ifru_hwaddr;
+ int ifru_index; /* interface index */
+ short ifru_flags;
+ int ifru_metric;
+ char ifru_data[1]; /* interface dependent data */
+ char ifru_enaddr[6];
+ int if_muxid[2]; /* mux id's for arp and ip */
+
+ /* Struct for FDDI ioctl's */
+ struct ifr_dnld_reqs {
+ caddr_t v_addr;
+ caddr_t m_addr;
+ caddr_t ex_addr;
+ u_int size;
+ } ifru_dnld_req;
+
+ /* Struct for FDDI stats */
+ struct ifr_fddi_stats {
+ u_int stat_size;
+ caddr_t fddi_stats;
+ } ifru_fddi_stat;
+
+ struct ifr_netmapents {
+ u_int map_ent_size, /* size of netmap structure */
+ entry_number; /* index into netmap list */
+ caddr_t fddi_map_ent; /* pointer to user structure */
+ } ifru_netmapent;
+
+ /* Field for generic ioctl for fddi */
+
+ struct ifr_fddi_gen_struct {
+ int ifru_fddi_gioctl; /* field for gen ioctl */
+ caddr_t ifru_fddi_gaddr; /* Generic ptr to a field */
+ } ifru_fddi_gstruct;
+
+ } ifr_ifru;
+ };
+
+ #define ifr_addr ifr_ifru.ifru_addr /* address */
+ #define ifr_dstaddr ifr_ifru.ifru_dstaddr /* other end of p-to-p link */
+ #define ifr_oname ifr_ifru.ifru_oname /* other if name */
+ #define ifr_broadaddr ifr_ifru.ifru_broadaddr /* broadcast address */
+ #define ifr_flags ifr_ifru.ifru_flags /* flags */
+ #define ifr_metric ifr_ifru.ifru_metric /* metric */
+ #define ifr_data ifr_ifru.ifru_data /* for use by interface */
+ #define ifr_enaddr ifr_ifru.ifru_enaddr /* ethernet address */
+ #define ifr_index ifr_ifru.ifru_index /* interface index */
+
+ /* FDDI specific */
+ #define ifr_dnld_req ifr_ifru.ifru_dnld_req
+ #define ifr_fddi_stat ifr_ifru.ifru_fddi_stat
+ #define ifr_fddi_netmap ifr_ifru.ifru_netmapent /* FDDI network map entries */
+ #define ifr_fddi_gstruct ifr_ifru.ifru_fddi_gstruct
+
+ #define ifr_ip_muxid ifr_ifru.if_muxid[0]
+ #define ifr_arp_muxid ifr_ifru.if_muxid[1]
+
+ /*
+ * Structure used in SIOCGIFCONF request.
+ * Used to retrieve interface configuration
+ * for machine (useful for programs which
+ * must know all networks accessible).
+ */
+ struct ifconf {
+ int ifc_len; /* size of associated buffer */
+ union {
+ caddr_t ifcu_buf;
+ struct ifreq *ifcu_req;
+ } ifc_ifcu;
+ };
+
+ #define ifc_buf ifc_ifcu.ifcu_buf /* buffer address */
+ #define ifc_req ifc_ifcu.ifcu_req /* array of structures returned */
+
+ #define ifr_netmask ifr_ifru.ifru_netmask /* interface net mask */
+ #endif
diff -rcP glibc-2.2.4.old/sysdeps/unix/sysv/sysv4/solaris2/sparc/Makefile glibc-2.2.4/sysdeps/unix/sysv/sysv4/solaris2/sparc/Makefile
*** glibc-2.2.4.old/sysdeps/unix/sysv/sysv4/solaris2/sparc/Makefile Tue Oct 2 16:44:21 2001
--- glibc-2.2.4/sysdeps/unix/sysv/sysv4/solaris2/sparc/Makefile Mon Oct 8 11:02:53 2001
***************
*** 5,11 ****
sysdep-CFLAGS := $(sysdep-CFLAGS) -mhard-quad-float
ifeq ($(subdir),crypt)
- crypt := crypt.solar
- endif
--- 5,16 ----
sysdep-CFLAGS := $(sysdep-CFLAGS) -mhard-quad-float
ifeq ($(subdir),crypt)
+ crypt := crypt.solar
+ endif
+
+ #ifeq ($(subdir),misc)
+ # sysdep_routines += div64.c mul64.S rem64.c syscall.S udiv64.c urem64.c
+ #endif
+
diff -rcP glibc-2.2.4.old/sysdeps/unix/sysv/sysv4/solaris2/sparc/sparc32/Makefile glibc-2.2.4/sysdeps/unix/sysv/sysv4/solaris2/sparc/sparc32/Makefile
*** glibc-2.2.4.old/sysdeps/unix/sysv/sysv4/solaris2/sparc/sparc32/Makefile Wed Dec 31 17:00:00 1969
--- glibc-2.2.4/sysdeps/unix/sysv/sysv4/solaris2/sparc/sparc32/Makefile Mon Oct 8 11:36:01 2001
***************
*** 0 ****
--- 1,16 ----
+ # This flag is necessary because GCC now tries to call _Q_{mul, etc...}
+ # instead of doing the stuff the hard way. For now, printf_fp.o, __vfscanf.o,
+ # and difftime.o don't work because of this. The long-term fix is to actually
+ # implement what they're doing, but for the short-term, we must do this.
+ sysdep-CFLAGS := $(sysdep-CFLAGS) -mhard-quad-float
+
+ ifeq ($(subdir),crypt)
+ crypt := crypt.solar
+ endif
+
+ ifeq ($(subdir),misc)
+ sysdep_routines += div64 mul64 rem64 syscall udiv64 urem64
+ endif
+
+
+
diff -rcP glibc-2.2.4.old/sysdeps/unix/sysv/sysv4/solaris2/sparc/sparc32/div64.c glibc-2.2.4/sysdeps/unix/sysv/sysv4/solaris2/sparc/sparc32/div64.c
*** glibc-2.2.4.old/sysdeps/unix/sysv/sysv4/solaris2/sparc/sparc32/div64.c Wed Dec 31 17:00:00 1969
--- glibc-2.2.4/sysdeps/unix/sysv/sysv4/solaris2/sparc/sparc32/div64.c Mon Oct 8 10:27:35 2001
***************
*** 0 ****
--- 1,43 ----
+ /* __div64:
+ Division of signed long long 's
+
+ Contributed by Gert Ohme (ohme@dialeasy.de)
+
+ Copyright (C) 2001 Free Software 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 Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+ long long
+ __div64 ( long long x, long long y )
+ {
+ unsigned long long a = (x < 0) ? -x : x;
+ unsigned long long b = (y < 0) ? -y : y;
+ unsigned long long res = 0, d = 1;
+
+
+ if (b > 0) while (b < a) b <<= 1, d <<= 1;
+
+ do
+ {
+ if ( a >= b ) a -= b, res += d;
+ b >>= 1;
+ d >>= 1;
+ } while (d);
+
+
+ return ( ((x ^ y) & (1ll<<63)) == 0) ? res : -(long long)res;
+ }
diff -rcP glibc-2.2.4.old/sysdeps/unix/sysv/sysv4/solaris2/sparc/sparc32/mul64.S glibc-2.2.4/sysdeps/unix/sysv/sysv4/solaris2/sparc/sparc32/mul64.S
*** glibc-2.2.4.old/sysdeps/unix/sysv/sysv4/solaris2/sparc/sparc32/mul64.S Wed Dec 31 17:00:00 1969
--- glibc-2.2.4/sysdeps/unix/sysv/sysv4/solaris2/sparc/sparc32/mul64.S Mon Oct 8 10:27:35 2001
***************
*** 0 ****
--- 1,233 ----
+ /* __mul64:
+ SPARC32-routine for multiplication of `unsigned long long'
+
+ Contributed by Gert Ohme (ohme@dialeasy.de)
+
+ Copyright (C) 2001 Free Software 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 Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA.
+
+ Description:
+ The input in terms of unsigned long long's
+ +-------------------+ +-------------------+
+ | a | * | b |
+ +-------------------+ +-------------------+
+ means in terms of unsigned longs
+ +---------+---------+ +---------+---------+
+ | a0 | a1 | * | b0 | b1 |
+ +---------+---------+ +---------+---------+
+ which translates into registers at call time
+ +---------+---------+ +---------+---------+
+ | %o0 | %o1 | * | %o2 | %o3 |
+ +---------+---------+ +---------+---------+
+ -----------------------------------------------------
+ Elementary algebraics lead to:
+ +-------------------+
+ | a1 * b1 |
+ +-------------------+
+ +-----------------------+
+ + | a0 * b1 |
+ +-----------------------+
+ +-----------------------+
+ + | a1 * b0 |
+ +-----------------------+
+ +-------------------+
+ + | a0 * b0 |
+ +-------------------+
+ -----------------------------------------------------
+ or in terms of registers (where we omit the unused
+ high value 64 bits):
+ +-------------------+
+ Step 1: | %o1 * %o3 |
+ +-------------------+
+ +-----------------------+
+ Step 2: | %o0 * %o3 |
+ +-----------------------+
+ +-----------------------+
+ Step 3: | %o1 * %o2 |
+ +-----------------------+
+
+ Step 4: sum up
+ -----------------------------------------------------
+ With the usage of the %y-register the output of the partial
+ multiplications looks like (where we again omit all high value
+ bits 64 and above):
+ +---------+---------+
+ Step 1: | %o4 | %y |
+ +---------+---------+
+ +---------+---------+
+ Step 2: | | %y |
+ +---------+---------+
+ +---------+---------+
+ Step 3: | | %y |
+ +---------+---------+
+
+ Step 4: sum up
+ -----------------------------------------------------
+ The result
+ +-------------------+
+ | result |
+ +-------------------+
+ is placed into the registers %o0 and %o1 for the calling program:
+ +---------+---------+
+ | %o0 | %o1 |
+ +---------+---------+
+ */
+
+ .section ".text"
+ .align 4;
+ .global __mul64 ;
+ .type __mul64 ,@function;
+ __mul64:
+ /* This is a leaf routine. So we can leave %fp alone */
+
+ /* Step 1 */
+ mov %o1, %y ! multiplier -> Y
+ nop
+ andcc %g0, %g0, %o4 ! zero the partial product and clear N and V
+
+ mulscc %o4, %o3, %o4 ! 1
+ mulscc %o4, %o3, %o4 ! 2
+ mulscc %o4, %o3, %o4 ! 3
+ mulscc %o4, %o3, %o4 ! 4
+ mulscc %o4, %o3, %o4 ! 5
+ mulscc %o4, %o3, %o4 ! 6
+ mulscc %o4, %o3, %o4 ! 7
+ mulscc %o4, %o3, %o4 ! 8
+ mulscc %o4, %o3, %o4 ! 9
+ mulscc %o4, %o3, %o4 ! 10
+ mulscc %o4, %o3, %o4 ! 11
+ mulscc %o4, %o3, %o4 ! 12
+ mulscc %o4, %o3, %o4 ! 13
+ mulscc %o4, %o3, %o4 ! 14
+ mulscc %o4, %o3, %o4 ! 15
+ mulscc %o4, %o3, %o4 ! 16
+ mulscc %o4, %o3, %o4 ! 17
+ mulscc %o4, %o3, %o4 ! 18
+ mulscc %o4, %o3, %o4 ! 19
+ mulscc %o4, %o3, %o4 ! 20
+ mulscc %o4, %o3, %o4 ! 21
+ mulscc %o4, %o3, %o4 ! 22
+ mulscc %o4, %o3, %o4 ! 23
+ mulscc %o4, %o3, %o4 ! 24
+ mulscc %o4, %o3, %o4 ! 25
+ mulscc %o4, %o3, %o4 ! 26
+ mulscc %o4, %o3, %o4 ! 27
+ mulscc %o4, %o3, %o4 ! 28
+ mulscc %o4, %o3, %o4 ! 29
+ mulscc %o4, %o3, %o4 ! 30
+ mulscc %o4, %o3, %o4 ! 31
+ mulscc %o4, %o3, %o4 ! 32
+ mulscc %o4, %g0, %o4 ! Final shift
+ mov %y, %l1 ! Y -> lower result
+ /* sign bit correction for unsigned ;
+ this sign bit would be visible in %o0 at the time of retl */
+ sra %o3, 31, %o5 ! make mask from sign bit
+ and %o1, %o5, %o5 ! %o5 = 0 or %o1, depending on sign of %o1
+ addcc %o4, %o5, %l4 ! add compensation and put upper half in place
+
+
+ /* Step 2 */
+ mov %o0, %y ! multiplier -> Y
+ nop
+ andcc %g0, %g0, %o4 ! zero the partial product and clear N and V
+ mulscc %o4, %o3, %o4 ! 1
+ mulscc %o4, %o3, %o4 ! 2
+ mulscc %o4, %o3, %o4 ! 3
+ mulscc %o4, %o3, %o4 ! 4
+ mulscc %o4, %o3, %o4 ! 5
+ mulscc %o4, %o3, %o4 ! 6
+ mulscc %o4, %o3, %o4 ! 7
+ mulscc %o4, %o3, %o4 ! 8
+ mulscc %o4, %o3, %o4 ! 9
+ mulscc %o4, %o3, %o4 ! 10
+ mulscc %o4, %o3, %o4 ! 11
+ mulscc %o4, %o3, %o4 ! 12
+ mulscc %o4, %o3, %o4 ! 13
+ mulscc %o4, %o3, %o4 ! 14
+ mulscc %o4, %o3, %o4 ! 15
+ mulscc %o4, %o3, %o4 ! 16
+ mulscc %o4, %o3, %o4 ! 17
+ mulscc %o4, %o3, %o4 ! 18
+ mulscc %o4, %o3, %o4 ! 19
+ mulscc %o4, %o3, %o4 ! 20
+ mulscc %o4, %o3, %o4 ! 21
+ mulscc %o4, %o3, %o4 ! 22
+ mulscc %o4, %o3, %o4 ! 23
+ mulscc %o4, %o3, %o4 ! 24
+ mulscc %o4, %o3, %o4 ! 25
+ mulscc %o4, %o3, %o4 ! 26
+ mulscc %o4, %o3, %o4 ! 27
+ mulscc %o4, %o3, %o4 ! 28
+ mulscc %o4, %o3, %o4 ! 29
+ mulscc %o4, %o3, %o4 ! 30
+ mulscc %o4, %o3, %o4 ! 31
+ mulscc %o4, %o3, %o4 ! 32
+ mulscc %o4, %g0, %o4 ! Final shift
+ mov %y, %l2 ! Y -> lower result
+ nop
+
+ /* Step 3 */
+ mov %o2, %y ! multiplier -> Y
+ nop
+ andcc %g0, %g0, %o4 ! zero the partial product and clear N and V
+ mulscc %o4, %o1, %o4 ! 1
+ mulscc %o4, %o1, %o4 ! 2
+ mulscc %o4, %o1, %o4 ! 3
+ mulscc %o4, %o1, %o4 ! 4
+ mulscc %o4, %o1, %o4 ! 5
+ mulscc %o4, %o1, %o4 ! 6
+ mulscc %o4, %o1, %o4 ! 7
+ mulscc %o4, %o1, %o4 ! 8
+ mulscc %o4, %o1, %o4 ! 9
+ mulscc %o4, %o1, %o4 ! 10
+ mulscc %o4, %o1, %o4 ! 11
+ mulscc %o4, %o1, %o4 ! 12
+ mulscc %o4, %o1, %o4 ! 13
+ mulscc %o4, %o1, %o4 ! 14
+ mulscc %o4, %o1, %o4 ! 15
+ mulscc %o4, %o1, %o4 ! 16
+ mulscc %o4, %o1, %o4 ! 17
+ mulscc %o4, %o1, %o4 ! 18
+ mulscc %o4, %o1, %o4 ! 19
+ mulscc %o4, %o1, %o4 ! 20
+ mulscc %o4, %o1, %o4 ! 21
+ mulscc %o4, %o1, %o4 ! 22
+ mulscc %o4, %o1, %o4 ! 23
+ mulscc %o4, %o1, %o4 ! 24
+ mulscc %o4, %o1, %o4 ! 25
+ mulscc %o4, %o1, %o4 ! 26
+ mulscc %o4, %o1, %o4 ! 27
+ mulscc %o4, %o1, %o4 ! 28
+ mulscc %o4, %o1, %o4 ! 29
+ mulscc %o4, %o1, %o4 ! 30
+ mulscc %o4, %o1, %o4 ! 31
+ mulscc %o4, %o1, %o4 ! 32
+ mulscc %o4, %g0, %o4 ! Final shift
+ mov %y, %l3 ! Y -> lower result
+ nop
+
+ /* Step 4 */
+ add %l2, %l3, %o0 ! add high value result
+ add %o0, %l4, %o0 ! add high value result
+
+
+ retl
+ mov %l1, %o1 ! low value result
+
+ .LLfe1:
+ .size __mul64,.LLfe1-__mul64
diff -rcP glibc-2.2.4.old/sysdeps/unix/sysv/sysv4/solaris2/sparc/sparc32/rem64.c glibc-2.2.4/sysdeps/unix/sysv/sysv4/solaris2/sparc/sparc32/rem64.c
*** glibc-2.2.4.old/sysdeps/unix/sysv/sysv4/solaris2/sparc/sparc32/rem64.c Wed Dec 31 17:00:00 1969
--- glibc-2.2.4/sysdeps/unix/sysv/sysv4/solaris2/sparc/sparc32/rem64.c Mon Oct 8 10:27:35 2001
***************
*** 0 ****
--- 1,41 ----
+ /* __rem64:
+ Remainder of a division of signed long long 's
+
+ Contributed by Gert Ohme (ohme@dialeasy.de)
+
+ Copyright (C) 2001 Free Software 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 Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+ long long
+ __rem64 ( long long x, long long y )
+ {
+ unsigned long long a = (x < 0) ? -x : x;
+ unsigned long long b = (y < 0) ? -y : y;
+ unsigned long long d = 1;
+
+ if (b > 0) while (b < a) b <<= 1, d <<= 1;
+
+ do
+ {
+ if ( a >= b ) a -= b;
+ b >>= 1;
+ d >>= 1;
+ } while (d);
+
+ return ( ( x & (1ll<<63) ) == 0) ? a : -(long long)a;
+ }
diff -rcP glibc-2.2.4.old/sysdeps/unix/sysv/sysv4/solaris2/sparc/sparc32/udiv64.c glibc-2.2.4/sysdeps/unix/sysv/sysv4/solaris2/sparc/sparc32/udiv64.c
*** glibc-2.2.4.old/sysdeps/unix/sysv/sysv4/solaris2/sparc/sparc32/udiv64.c Wed Dec 31 17:00:00 1969
--- glibc-2.2.4/sysdeps/unix/sysv/sysv4/solaris2/sparc/sparc32/udiv64.c Mon Oct 8 10:27:35 2001
***************
*** 0 ****
--- 1,45 ----
+ /* __udiv64:
+ Division of unsigned long long 's
+
+ Contributed by Gert Ohme (ohme@dialeasy.de)
+
+ Copyright (C) 2001 Free Software 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 Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+ unsigned long long
+ __udiv64 ( unsigned long long x, unsigned long long y )
+ {
+ unsigned long long res = 0, d = 1;
+ unsigned long long e = 1ll<<63;
+
+ if (x == 0) return (0);
+
+ while ((x & e) == 0)
+ e >>= 1;
+
+ if (y > 0) while (y < e) y <<= 1, d <<= 1;
+
+ do
+ {
+ if (x >= y) x -= y, res += d;
+ y >>= 1;
+ d >>= 1;
+ } while (d);
+
+ return res;
+ }
diff -rcP glibc-2.2.4.old/sysdeps/unix/sysv/sysv4/solaris2/sparc/sparc32/urem64.c glibc-2.2.4/sysdeps/unix/sysv/sysv4/solaris2/sparc/sparc32/urem64.c
*** glibc-2.2.4.old/sysdeps/unix/sysv/sysv4/solaris2/sparc/sparc32/urem64.c Wed Dec 31 17:00:00 1969
--- glibc-2.2.4/sysdeps/unix/sysv/sysv4/solaris2/sparc/sparc32/urem64.c Mon Oct 8 10:27:35 2001
***************
*** 0 ****
--- 1,45 ----
+ /* __urem64:
+ Remainder of a division of unsigned long long 's
+
+ Contributed by Gert Ohme (ohme@dialeasy.de)
+
+ Copyright (C) 2001 Free Software 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 Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+ unsigned long long
+ __urem64 ( unsigned long long x, unsigned long long y )
+ {
+ unsigned long long d = 1;
+ unsigned long long e = 1ll<<63;
+
+ if (x == 0) return (0);
+
+ while ((x & e) == 0)
+ e >>= 1;
+
+ if (y > 0) while (y < e) y <<= 1, d <<= 1;
+
+ do
+ {
+ if (x >= y) x -= y;
+ y >>= 1;
+ d >>= 1;
+ } while (d);
+
+ return x;
+ }
diff -rcP glibc-2.2.4.old/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.S glibc-2.2.4/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.S
*** glibc-2.2.4.old/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.S Tue Oct 2 16:44:21 2001
--- glibc-2.2.4/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.S Wed Oct 3 22:36:30 2001
***************
*** 20,25 ****
--- 20,33 ----
#include <sysdep.h>
#define _ERRNO_H
#include <bits/errno.h>
+ /* need to define errno someplace!!! snarfed from linux. everything else is
+ extern */
+
+ .globl C_SYMBOL_NAME(errno)
+ .type C_SYMBOL_NAME(errno),@object
+ .lcomm C_SYMBOL_NAME(errno),4
+
+ weak_alias (errno, _errno)
ENTRY(syscall_error)
/* If it was a syscall that got interrupted, but can
diff -rcP glibc-2.2.4.old/sysdeps/unix/sysv/sysv4/solaris2/syscalls.list glibc-2.2.4/sysdeps/unix/sysv/sysv4/solaris2/syscalls.list
*** glibc-2.2.4.old/sysdeps/unix/sysv/sysv4/solaris2/syscalls.list Tue Oct 2 16:44:22 2001
--- glibc-2.2.4/sysdeps/unix/sysv/sysv4/solaris2/syscalls.list Mon Oct 8 13:56:09 2001
***************
*** 1,7 ****
# File name Caller Syscall name # args Strong name Weak names
sigaction - sigaction 3 __sigaction sigaction
! sigaltstack - sigaltstack 2 sigaltstack
sigpending - sigpending 2 __syscall_sigpending
sigqueue - sigqueue 3 __sigqueue sigqueue
sigtimedwait - sigtimedwait 3 __sigtimedwait sigtime
--- 1,12 ----
# File name Caller Syscall name # args Strong name Weak names
sigaction - sigaction 3 __sigaction sigaction
! sigaltstack - sigaltstack 2 __sigaltstack sigaltstack
sigpending - sigpending 2 __syscall_sigpending
sigqueue - sigqueue 3 __sigqueue sigqueue
sigtimedwait - sigtimedwait 3 __sigtimedwait sigtime
+ ftruncate - ftruncate 2 __ftruncate ftruncate __ftruncate64 ftruncate64
+ getpeername - getpeername i:ipp __getpeername getpeername
+ s_getdents getdents getdents i:ipi __getdents
+
+
diff -rcP glibc-2.2.4.old/sysdeps/unix/sysv/sysv4/waitpid.c glibc-2.2.4/sysdeps/unix/sysv/sysv4/waitpid.c
*** glibc-2.2.4.old/sysdeps/unix/sysv/sysv4/waitpid.c Tue Oct 2 16:44:23 2001
--- glibc-2.2.4/sysdeps/unix/sysv/sysv4/waitpid.c Wed Oct 3 11:32:56 2001
***************
*** 1,3 ****
--- 1,5 ----
+
+
/* Copyright (C) 1993, 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
***************
*** 26,44 ****
typedef enum __idtype
{
/* Look for processes based upon a given PID. */
! P_PID,
/* Look for processes based upon a given process-group ID. */
! P_PGID = 2,
/* Look for any process. */
! P_ALL = 7,
} __idtype_t;
! extern __pid_t __getpgid __P ((__pid_t pid));
! extern int __waitid __P ((__idtype_t idtype, __pid_t id,
__siginfo_t *infop, int options));
/* Wait for a child matching PID to die.
If PID is greater than 0, match any process whose process ID is PID.
If PID is (pid_t) -1, match any process.
--- 28,47 ----
typedef enum __idtype
{
/* Look for processes based upon a given PID. */
! _P_PID, /* conflict with wait.h... renamed for solaris2. */
/* Look for processes based upon a given process-group ID. */
! _P_PGID = 2, /* conflict with wait.h... renamed for solaris2. */
/* Look for any process. */
! _P_ALL = 7, /* conflict with wait.h... renamed for solaris2. */
} __idtype_t;
! extern __pid_t __getpgid __P ((__pid_t pid));
! extern int __waitid __P ((__idtype_t idtype, __pid_t id,
__siginfo_t *infop, int options));
+
/* Wait for a child matching PID to die.
If PID is greater than 0, match any process whose process ID is PID.
If PID is (pid_t) -1, match any process.
***************
*** 64,90 ****
if (pid == WAIT_ANY)
{
/* Request the status for any child. */
! idtype = P_ALL;
}
else if (pid == WAIT_MYPGRP)
{
/* Request the status for any child process that has
a pgid that's equal to that of our parent. */
tmp_pid = __getpgid (0);
! idtype = P_PGID;
}
else /* PID < -1 */
{
/* Request the status for any child whose pgid is equal
to the absolute value of PID. */
tmp_pid = pid & ~0; /* XXX not pseudo-insn */
! idtype = P_PGID;
}
}
else
{
/* Request the status for the child whose pid is PID. */
! idtype = P_PID;
}
if (__waitid (idtype, tmp_pid, &infop, options | WEXITED | WTRAPPED) < 0)
--- 67,93 ----
if (pid == WAIT_ANY)
{
/* Request the status for any child. */
! idtype = _P_ALL;
}
else if (pid == WAIT_MYPGRP)
{
/* Request the status for any child process that has
a pgid that's equal to that of our parent. */
tmp_pid = __getpgid (0);
! idtype = _P_PGID;
}
else /* PID < -1 */
{
/* Request the status for any child whose pgid is equal
to the absolute value of PID. */
tmp_pid = pid & ~0; /* XXX not pseudo-insn */
! idtype = _P_PGID;
}
}
else
{
/* Request the status for the child whose pid is PID. */
! idtype = _P_PID;
}
if (__waitid (idtype, tmp_pid, &infop, options | WEXITED | WTRAPPED) < 0)