+1999-02-07 Ulrich Drepper <drepper@cygnus.com>
+
+ * Versions.def: New version GLIBC_2.1.1 for libc.
+ * stdlib/Versions: Add _Exit, imaxdiv, and imaxdiv to GLIBC_2.1.1.
+ * stdlib/labs.c: Moved to...
+ * sysdeps/generic/labs.c: ...here.
+ * stdlib/llabs.c: Moved to...
+ * sysdeps/generic/llabs.c: ...here.
+ * stdlib/stdlib.h: Allow definition of ldiv_t and lldiv_t in other
+ header. Declare _Exit.
+ * sysdeps/generic/_exit.c: Add alias _Exit.
+ * sysdeps/mach/hurd/_exit.c: Likewise.
+ * sysdeps/standalone/i386/force_cpu386/_exit.c: Likewise.
+ * sysdeps/standalone/i960/nindy960/_exit.c: Likewise.
+ * sysdeps/standalone/m68k/m68020/mvme136/_exit.c: Likewise.
+ * sysdeps/unix/_exit.c: Likewise.
+ * sysdeps/wordsize-32/inttypes.h: Define imaxdiv_t and declare
+ imaxdiv and imaxabs. Declare lldiv_t if necessary.
+ * sysdeps/wordsize-64/inttypes.h: Likewise.
+ * sysdeps/wordsize-32/llabs.c: New file.
+ * sysdeps/wordsize-32/lldiv.c: New file.
+ * sysdeps/wordsize-64/labs.c: New file.
+ * sysdeps/wordsize-64/ldiv.c: New file.
+ * manual/arith.texi: Document imaxabs, imaxdiv_t, and imaxdiv.
+ * manual/startup.texi: Document _Exit.
+
+1999-02-07 Andreas Jaeger <aj@arthur.rhein-neckar.de>
+
+ * nscd/cache.c: Include <arpa/inet.h> for inet_ntop.
+
1999-02-06 Ulrich Drepper <drepper@cygnus.com>
* Versions.def: Add versions for ld.so.
-GNU C Library NEWS -- history of user-visible changes. 1999-02-02
+GNU C Library NEWS -- history of user-visible changes. 1999-02-07
Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 99 Free Software Foundation, Inc.
See the end for copying conditions.
<bugs@gnu.org>. Questions and suggestions should be send to
<bug-glibc@gnu.org>.
\f
+Version 2.1.1
+
+* New ISO C 9x function _exit, imaxabs, and imaxdiv are added.
+\f
Version 2.1
* Richard Henderson corrected size of struct timeval on Linux/Alpha to
libc {
GLIBC_2.0
GLIBC_2.1 GLIBC_2.0
+ GLIBC_2.1.1 GLIBC_2.1
}
libcrypt {
GLIBC_2.0
@pindex math.h
@pindex stdlib.h
Prototypes for @code{abs}, @code{labs} and @code{llabs} are in @file{stdlib.h};
+@code{imaxabs} is declared in @file{inttypes.h};
@code{fabs}, @code{fabsf} and @code{fabsl} are declared in @file{math.h}.
@code{cabs}, @code{cabsf} and @code{cabsl} are declared in @file{complex.h}.
@comment stdlib.h
@comment ISO
@deftypefunx {long long int} llabs (long long int @var{number})
+@comment inttypes.h
+@comment ISO
+@deftypefunx intmax_t imaxabs (intmax_t @var{number})
These functions return the absolute value of @var{number}.
Most computers use a two's complement integer representation, in which
the absolute value of @code{INT_MIN} (the smallest possible @code{int})
cannot be represented; thus, @w{@code{abs (INT_MIN)}} is not defined.
-@code{llabs} is new to @w{ISO C 9x}
+@code{llabs} and @code{imaxdiv} are new to @w{ISO C 9x}.
@end deftypefun
@comment math.h
The @code{lldiv} function was added in @w{ISO C 9x}.
@end deftypefun
+@comment inttypes.h
+@comment ISO
+@deftp {Data Type} imaxdiv_t
+This is a structure type used to hold the result returned by the @code{imaxdiv}
+function. It has the following members:
+
+@table @code
+@item intmax_t quot
+The quotient from the division.
+
+@item intmax_t rem
+The remainder from the division.
+@end table
+
+(This is identical to @code{div_t} except that the components are of
+type @code{intmax_t} rather than @code{int}.)
+@end deftp
+
+@comment inttypes.h
+@comment ISO
+@deftypefun imaxdiv_t imaxdiv (intmax_t @var{numerator}, intmax_t @var{denominator})
+The @code{imaxdiv} function is like the @code{div} function, but the
+arguments are of type @code{intmax_t} and the result is returned as
+a structure of type @code{imaxdiv_t}.
+
+The @code{imaxdiv} function was added in @w{ISO C 9x}.
+@end deftypefun
+
@node Parsing of Numbers
@section Parsing of Numbers
@code{on_exit}.
@end deftypefun
+@comment stdlib.h
+@comment ISO
+@deftypefun void _Exit (int @var{status})
+The @code{_Exit} function is the @w{ISO C} equivalent to @code{_exit}.
+The @w{ISO C} committee members were not sure whether the definitions of
+@code{_exit} and @code{_Exit} were compatible so they have not used the
+POSIX name.
+
+This function was introduced in @w{ISO C9x} and is declared in
+@file{stdlib.h}.
+@end deftypefun
+
When a process terminates for any reason---either by an explicit
termination call, or termination as a result of a signal---the
following things happen:
-/* Copyright (c) 1998 Free Software Foundation, Inc.
+/* Copyright (c) 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
#include <limits.h>
#include <stdlib.h>
#include <string.h>
+#include <arpa/inet.h>
#include <rpcsvc/nis.h>
#include <sys/param.h>
#include <sys/stat.h>
# s*
strtoimax; strtoumax; swapcontext;
}
+ GLIBC_2.1.1 {
+ # _*
+ _Exit;
+
+ # i*
+ imaxabs; imaxdiv;
+ }
}
+++ /dev/null
-/* Copyright (C) 1991, 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. */
-
-#include <stdlib.h>
-
-#undef labs
-
-
-/* Return the absolute value of I. */
-long int
-labs (long int i)
-{
- return i < 0 ? -i : i;
-}
+++ /dev/null
-/* `long long int' absolute value.
- Copyright (C) 1991, 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. */
-
-#include <stdlib.h>
-
-#undef llabs
-
-
-/* Return the absolute value of I. */
-long long int
-llabs (i)
- long long int i;
-{
- return i < 0 ? -i : i;
-}
} div_t;
/* Returned by `ldiv'. */
+#ifndef __ldiv_t_defined
typedef struct
{
long int quot; /* Quotient. */
long int rem; /* Remainder. */
} ldiv_t;
+# define __ldiv_t_defined 1
+#endif
-#ifdef __USE_ISOC9X
+#if defined __USE_ISOC9X && !defined __lldiv_t_defined
/* Returned by `lldiv'. */
__extension__ typedef struct
{
long long int quot; /* Quotient. */
long long int rem; /* Remainder. */
} lldiv_t;
+# define __lldiv_t_defined 1
#endif
perform stdio cleanup, and terminate program execution with STATUS. */
extern void exit __P ((int __status)) __attribute__ ((__noreturn__));
+#ifdef __USE_ISOC9X
+/* Terminate the program with STATUS without calling any of the
+ functions registered with `atexit' or `on_exit'. */
+extern void _Exit __P ((int __status)) __attribute__ ((__noreturn__));
+#endif
+
/* Return the value of envariable NAME, or NULL if it doesn't exist. */
extern char *getenv __P ((__const char *__name));
-/* Copyright (C) 1991, 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 94, 95, 96, 97, 99 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
status &= 0xff;
abort ();
}
+weak_alias (_exit, _Exit)
stub_warning (_exit)
#include <stub-tag.h>
--- /dev/null
+/* Copyright (C) 1991, 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. */
+
+#include <stdlib.h>
+
+#undef labs
+
+
+/* Return the absolute value of I. */
+long int
+labs (long int i)
+{
+ return i < 0 ? -i : i;
+}
--- /dev/null
+/* `long long int' absolute value.
+ Copyright (C) 1991, 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. */
+
+#include <stdlib.h>
+
+#undef llabs
+
+
+/* Return the absolute value of I. */
+long long int
+llabs (i)
+ long long int i;
+{
+ return i < 0 ? -i : i;
+}
-/* Copyright (C) 1993, 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 94, 95, 96, 97, 99 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
{
_hurd_exit (W_EXITCODE (status, 0));
}
+weak_alias (_exit, _Exit)
-/* Copyright (C) 1991, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1997, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil),
On-Line Applications Research Corporation.
/* status is ignored */
Bsp_cleanup();
}
+weak_alias (_exit, _Exit)
#ifdef HAVE_GNU_LD
-/* Copyright (C) 1991, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1997, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil),
On-Line Applications Research Corporation.
* application if the user types "go".
*/
}
+weak_alias (_exit, _Exit)
#ifdef HAVE_GNU_LD
-/* Copyright (C) 1994, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1997, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil),
On-Line Applications Research Corporation.
M68Kvec[ 45 ] = __exit_trap; /* install exit_trap handler */
asm volatile( "trap #13" ); /* insures SUPV mode */
}
+weak_alias (_exit, _Exit)
-/* Copyright (C) 1991, 1992, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1997, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
PSEUDO (_exit, exit, 1)
/* Shouldn't get here. */
PSEUDO_END(_exit)
+weak_alias (_exit, _Exit)
-/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
__BEGIN_DECLS
+/* We have to define the `uintmax_t' type using `lldiv_t'. */
+#ifndef _STDLIB_H
+/* Returned by `lldiv'. */
+__extension__ typedef struct
+ {
+ long long int quot; /* Quotient. */
+ long long int rem; /* Remainder. */
+ } lldiv_t;
+# define __lldiv_t_defined 1
+#endif
+
+/* Returned by `imaxdiv'. */
+typedef lldiv_t imaxdiv_t;
+
+
+/* Compute absolute value of N. */
+extern intmax_t imaxabs __P ((intmax_t __n)) __attribute__ ((__const__));
+
+/* Return the `imaxdiv_t' representation of the value of NUMER over DENOM. */
+extern imaxdiv_t imaxdiv __P ((intmax_t __numer, intmax_t __denom))
+ __attribute__ ((__const__));
+
/* Like `strtol' but convert to `intmax_t'. */
extern intmax_t strtoimax __P ((__const char *__restrict __nptr,
char **__restrict __endptr, int __base));
#ifdef __USE_EXTERN_INLINES
+/* We ant to use the appropriate functions from <stdlib.h> but cannot
+ assume the header is read already. */
+__extension__ extern long long int llabs __P ((long long int __x))
+ __attribute__ ((__const__));
+__extension__ extern lldiv_t lldiv __P ((long long int __numer,
+ long long int __denom))
+ __attribute__ ((__const__));
+
+
+/* Compute absolute value of N. */
+extern __inline intmax_t
+imaxabs (intmax_t __n) __THROW
+{
+ return llabs (__n);
+}
+
+/* Return the `imaxdiv_t' representation of the value of NUMER over DENOM. */
+extern __inline imaxdiv_t
+imaxdiv (intmax_t __numer, intmax_t __denom) __THROW
+{
+ return lldiv (__numer, __denom);
+}
+
/* Like `strtol' but convert to `intmax_t'. */
# ifndef __strtoll_internal_defined
__extension__
--- /dev/null
+/* Copyright (C) 1999 Free Software 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. */
+
+#include <inttypes.h>
+
+#include <sysdeps/generic/llabs.c>
+
+weak_alias (llabs, imaxabs)
--- /dev/null
+/* Copyright (C) 1999 Free Software 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. */
+
+#include <inttypes.h>
+
+#include <sysdeps/generic/lldiv.c>
+
+weak_alias (lldiv, imaxdiv)
-/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
__BEGIN_DECLS
+/* We have to define the `uintmax_t' type using `ldiv_t'. */
+#ifndef _STDLIB_H
+/* Returned by `ldiv'. */
+typedef struct
+ {
+ long int quot; /* Quotient. */
+ long int rem; /* Remainder. */
+ } ldiv_t;
+# define __ldiv_t_defined 1
+#endif
+
+/* Returned by `imaxdiv'. */
+typedef ldiv_t imaxdiv_t;
+
+
+/* Compute absolute value of N. */
+extern intmax_t imaxabs __P ((intmax_t __n)) __attribute__ ((__const__));
+
+/* Return the `imaxdiv_t' representation of the value of NUMER over DENOM. */
+extern imaxdiv_t imaxdiv __P ((intmax_t __numer, intmax_t __denom))
+ __attribute__ ((__const__));
+
/* Like `strtol' but convert to `intmax_t'. */
extern intmax_t strtoimax __P ((__const char *__restrict __nptr,
char **__restrict __endptr, int __base));
#ifdef __USE_EXTERN_INLINES
+/* We ant to use the appropriate functions from <stdlib.h> but cannot
+ assume the header is read already. */
+__extension__ extern long int labs __P ((long int __x))
+ __attribute__ ((__const__));
+__extension__ extern ldiv_t ldiv __P ((long int __numer, long int __denom))
+ __attribute__ ((__const__));
+
+
+/* Compute absolute value of N. */
+extern __inline intmax_t
+imaxabs (intmax_t __n) __THROW
+{
+ return labs (__n);
+}
+
+/* Return the `imaxdiv_t' representation of the value of NUMER over DENOM. */
+extern __inline imaxdiv_t
+imaxdiv (intmax_t __numer, intmax_t __denom) __THROW
+{
+ return ldiv (__numer, __denom);
+}
+
/* Like `strtol' but convert to `intmax_t'. */
# ifndef __strtol_internal_defined
extern long int __strtol_internal __P ((__const char *__restrict __nptr,
--- /dev/null
+/* Copyright (C) 1999 Free Software 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. */
+
+#include <inttypes.h>
+
+#include <sysdeps/generic/labs.c>
+
+weak_alias (labs, imaxabs)
--- /dev/null
+/* Copyright (C) 1999 Free Software 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. */
+
+#include <inttypes.h>
+
+#include <sysdeps/generic/ldiv.c>
+
+weak_alias (ldiv, imaxdiv)