mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-05 21:00:05 +00:00
26dee9c49c
1997-04-05 03:11 Ulrich Drepper <drepper@cygnus.com> * inet/arpa/inet.h: Rewrite. Don't use the ugly BSD way to write headers but instead add comments and parameter names. Don't use BSD specific types in prototypes. * manual/nss.texi: Correct a few typos and errors. * sysdeps/libm-ieee754/s_cbrt.c: Complete rewrite based on better algorithm. * sysdeps/libm-ieee754/s_cbrtf.c: Likewise. * sysdeps/libm-ieee754/s_cbrtl.c: Likewise. * sysdeps/libm-i387/s_cbrt.S: New file. Optimized assembler version with new algorithm. * sysdeps/libm-i387/s_cbrtf.S: New file. * sysdeps/libm-i387/s_cbrtl.S: New file. * sysdeps/libm-i387/s_frexp.S: Optimize even more. * sysdeps/libm-i387/s_frexpf.S: Likewise. * sysdeps/libm-i387/s_frexpl.S: Likewise. 1997-04-04 18:55 Thorsten Kukuk <kukuk@vt.uni-paderborn.de> * nis/Makefile: Remove CFLAGS-*, add publickey to databases. * nis/nis_call.c: Add MASTER_ONLY and HARD_LOOKUP flags, compile DES part only with secure RPC add-on. * nis/nis_names.c (nis_modify): Fix rpc function number. * nis/nis_server.c: Fix typos. * nis/nss_compat/compat-grp.c: Add NIS+ support. * nis/nss_compat/compat-pwd.c: Likewise. * nis/nss_compat/compat-spwd.c: Likewise. * nis/nss_nis/nis-grp.c: Only a return value > 0 from parse_line signals success. * nis/nss_nis/nis-publickey.c: Changes for compiling with/without secure RPC. * nis/nss_nisplus/nisplus-publickey.c: Likewise. * nis/ypclnt.c: Likewise. * nis/nis_intern.h: Likewise. * nis/nss_nisplus/nisplus-alias.c: Correct parser return code. * nis/nss_nisplus/nisplus-ethers.c: Likewise. * nis/nss_nisplus/nisplus-hosts.c: Likewise. * nis/nss_nisplus/nisplus-network.c: Likewise. * nis/nss_nisplus/nisplus-proto.c: Likewise. * nis/nss_nisplus/nisplus-pwd.c: Likewise. * nis/nss_nisplus/nisplus-rpc.c: Likewise. * nis/nss_nisplus/nisplus-service.c: Likewise. * nis/nss_nisplus/nisplus-spwd.c: Likewise. * nis/nss_nisplus/nisplus-grp.c: Rewrite parser for fixing errors and speedup. * nis/nss_nisplus/nisplus-netgrp.c: Likewise. 1997-04-04 17:03 Ulrich Drepper <drepper@cygnus.com> * math/libm-test.c (cbrt_test): Add tests for +-inf and NaN arguments. 1997-04-03 19:24 H.J. Lu <hjl@gnu.ai.mit.edu> * sysdeps/unix/sysv/linux/sigset.h (__sigisemptyset): Fix a typo. 1997-04-03 16:10 Andreas Jaeger <aj@arthur.pfalz.de> * sysdeps/libm-ieee754/s_nanf.c: * sysdeps/libm-ieee754/s_nan.c: * sysdeps/libm-ieee754/s_nanl.c: Include <stdio.h> for declaration of sprintf. 1997-04-03 13:37 Ulrich Drepper <drepper@cygnus.com> * sysdeps/libm-ieee754/s_cexp.c: Fix type: string_alias -> strong_alias. Reported by sun <asun@zoology.washington.edu>. * rpc/auth.h: Removed. * rpc/auth_des.h: Removed. * sunrpc/rpc/auth.h: Moved to ... * sysdeps/generic/rpc/auth.h: ...here. * sunrpc/rpc/auth_des.h: Moved to ... * sysdeps/generic/rpc/auth_des.h: ...here. 1997-04-03 04:28 Ulrich Drepper <drepper@cygnus.com> * sysdeps/libm-i387/s_frexp.S: New file. ix87 optimized version. * sysdeps/libm-i387/s_frexpf.S: New file. * sysdeps/libm-i387/s_frexpl.S: New file. 1997-04-01 10:11 H.J. Lu <hjl@gnu.ai.mit.edu> * sysdeps/unix/sysv/linux/Makefile [$(subdir)=inet] (sysdep_headers): Remove netinet/icmp.h. Describe `inf', `infinity', `nan', `nan(...)' inputs for strtod * sysdeps/i386/memcmp.S: Likewise. * time/antarctica: Likewise. * time/australasia: Likewise.
124 lines
4.5 KiB
C
124 lines
4.5 KiB
C
/* __sig_atomic_t, __sigset_t, and related definitions. Linux version.
|
|
Copyright (C) 1991, 1992, 1994, 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 Library General Public License as
|
|
published by the Free Software Foundation; either version 2 of the
|
|
License, or (at your option) any later version.
|
|
|
|
The GNU C Library is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Library General Public License for more details.
|
|
|
|
You should have received a copy of the GNU Library General Public
|
|
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
|
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
Boston, MA 02111-1307, USA. */
|
|
|
|
#ifndef _SIGSET_H_types
|
|
#define _SIGSET_H_types 1
|
|
|
|
typedef int __sig_atomic_t;
|
|
|
|
/* A `sigset_t' has a bit for each signal. */
|
|
|
|
#define _SIGSET_NWORDS (1024 / (8 * sizeof (unsigned long int)))
|
|
typedef struct
|
|
{
|
|
unsigned long int __val[_SIGSET_NWORDS];
|
|
} __sigset_t;
|
|
|
|
#endif
|
|
|
|
|
|
/* We only want to define these functions if <signal.h> was actually
|
|
included; otherwise we were included just to define the types. Since we
|
|
are namespace-clean, it wouldn't hurt to define extra macros. But
|
|
trouble can be caused by functions being defined (e.g., any global
|
|
register vars declared later will cause compilation errors). */
|
|
|
|
#if !defined (_SIGSET_H_fns) && defined (_SIGNAL_H)
|
|
#define _SIGSET_H_fns 1
|
|
|
|
#ifndef _EXTERN_INLINE
|
|
#define _EXTERN_INLINE extern __inline
|
|
#endif
|
|
|
|
/* Return a mask that includes the bit for SIG only. */
|
|
#define __sigmask(sig) \
|
|
(((unsigned long) 1) << (((sig) - 1) % (8 * sizeof (unsigned long int))))
|
|
|
|
/* Return the word index for SIG. */
|
|
#define __sigword(sig) (((sig) - 1) / (8 * sizeof (unsigned long int)))
|
|
|
|
#if defined __GNUC__ && __GNUC__ >= 2
|
|
# define __sigemptyset(set) \
|
|
(__extension__ ({ int __cnt = _SIGSET_NWORDS; \
|
|
sigset_t *__set = (set); \
|
|
while (--__cnt >= 0) __set->__val[__cnt] = 0; \
|
|
0; }))
|
|
# define __sigfillset(set) \
|
|
(__extension__ ({ int __cnt = _SIGSET_NWORDS; \
|
|
sigset_t *__set = (set); \
|
|
while (--__cnt >= 0) __set->__val[__cnt] = ~0UL; \
|
|
0; }))
|
|
|
|
# ifdef _GNU_SOURCE
|
|
/* The POSIX does not specify for handling the whole signal set in one
|
|
command. This is often wanted and so we define three more functions
|
|
here. */
|
|
# define __sigisemptyset(set) \
|
|
(__extension__ ({ int __cnt = _SIGSET_NWORDS; \
|
|
const sigset_t *__set = (set); \
|
|
int __ret = __set->__val[--__cnt]; \
|
|
while (!__ret && --__cnt >= 0) \
|
|
__ret = __set->__val[__cnt]; \
|
|
__ret == 0; }))
|
|
# define __sigandset(dest, left, right) \
|
|
(__extension__ ({ int __cnt = _SIGSET_NWORDS; \
|
|
sigset_t *__dest = (dest); \
|
|
const sigset_t *__left = (left); \
|
|
const sigset_t *__right = (right); \
|
|
while (--__cnt >= 0) \
|
|
__dest->__val[__cnt] = (__left->__val[__cnt] \
|
|
& __right->__val[__cnt]); \
|
|
0; }))
|
|
# define __sigorset(dest, left, right) \
|
|
(__extension__ ({ int __cnt = _SIGSET_NWORDS; \
|
|
sigset_t *__dest = (dest); \
|
|
const sigset_t *__left = (left); \
|
|
const sigset_t *__right = (right); \
|
|
while (--__cnt >= 0) \
|
|
__dest->__val[__cnt] = (__left->__val[__cnt] \
|
|
| __right->__val[__cnt]); \
|
|
0; }))
|
|
# endif
|
|
#endif
|
|
|
|
/* These functions needn't check for a bogus signal number -- error
|
|
checking is done in the non __ versions. */
|
|
|
|
extern int __sigismember (__const __sigset_t *, int);
|
|
extern int __sigaddset (__sigset_t *, int);
|
|
extern int __sigdelset (__sigset_t *, int);
|
|
|
|
#define __SIGSETFN(NAME, BODY, CONST) \
|
|
_EXTERN_INLINE int \
|
|
NAME (CONST __sigset_t *__set, int __sig) \
|
|
{ \
|
|
unsigned long int __mask = __sigmask (__sig); \
|
|
unsigned long int __word = __sigword (__sig); \
|
|
return BODY; \
|
|
}
|
|
|
|
__SIGSETFN (__sigismember, (__set->__val[__word] & __mask) ? 1 : 0, __const)
|
|
__SIGSETFN (__sigaddset, ((__set->__val[__word] |= __mask), 0), )
|
|
__SIGSETFN (__sigdelset, ((__set->__val[__word] &= ~__mask), 0), )
|
|
|
|
#undef __SIGSETFN
|
|
|
|
|
|
#endif /* ! _SIGSET_H_fns. */
|