Version 2.0 Announcement, GNU C Library


Version 2.0

* GNU extensions are no longer declared by default.  To enable them you
  must define the macro `_GNU_SOURCE' in your program or compile with
  `-D_GNU_SOURCE'.

* The library has changed from using GNU ld symbol aliases to using weak
  symbols where available.  The ELF object file format supports weak
  symbols; GNU ld also supports weak symbols in the a.out format.  (There
  is also now support for other GNU ld extensions in ELF.  Use the
  `--with-elf' option to configure to indicate you have ELF, and
  `--with-gnu-ld' if using GNU ld.)  This change resulted in the deletion
  of many files which contained only symbol aliases, reducing the size of
  the source and the compiled library; many other files were renamed to
  less cryptic names previously occupied by the symbol alias files.
  There is a new header file <elf.h> for programs which operate on
  files in the ELF format.

* Converted to Autoconf version 2, so `configure' has more options.
  Run `configure --help' to see the details.

* The library can now be configured to build profiling, highly-optimized
  (but undebuggable), and/or shared libraries (ELF with GNU ld only).  The
  `--enable-profile', `--enable-omitfp', and `--enable-shared' options to
  `configure' enable building these extra libraries.  The shared library is
  built by default when using both ELF and GNU ld.  When shared libraries
  are enabled, the new library `-ldl' is available for arbitrary run-time
  loading of shared objects; its interface is defined in <dlfcn.h>.  The
  new header file <link.h> gives access to the internals of the run-time
  dynamic linker, `ld.so'.  The shell script `ldd' is similar to the
  application of same name on other systems and it provides information
  about dynamically linked binaries.

* The C library now provides the run-time support code for profiling
  executables compiled with `-pg'.  Programs can control the profiling code
  through the interface in <sys/gmon.h>.  The `gmon.out' files written by
  the GNU C library can be read only by GNU `gprof' (from GNU binutils);
  the support for this file format was contributed by David Mosberger-Tang.

* The math code has been replaced with a math library based on fdlibm from
  Sun, and modified by JT Conklin and Ulrich Drepper with i387 support, by
  Ian Taylor with `float' functions and by Ulrich Drepper with `long double'
  functions.  The math functions now reside in a separate library,  so
  programs using them will need to use `-lm' their linking commands.

* John C. Bowman contributed optimized ix87 assembler inline functions.

* Ulrich Drepper has contributed support for an `/etc/nsswitch.conf'
  mechanism similar to that found in Solaris 2.  This is now used for the
  group, passwd, hosts, networks, services, protocols, rpc, ethers,
  shadow, netgroup, publickey, and alias databases.  The `nsswitch.conf'
  file controls what services are used for each individual database.  This
  works by loading shared libraries with names specified in `nsswitch.conf',
  so service modules can be changed or added at any time without even
  relinking any program.  Currently there are the file, db, and NIS based
  NSS services available.

* The new functions `strtoq' and `strtouq' parse integer values from
  strings, like `strtol' and `strtoul', but they return `long long int' and
  `unsigned long long int' values, respectively (64-bit quantities).

* The new functions `strtof' and `strtold' parse floating-point values from
  strings, like `strtod', but they return `float' and `long double' values,
  respectively (on some machines `double' and `long double' are the same).

* Ulrich Drepper has contributed new implementations of the floating-point
  printing and reading code used in the `printf' family of functions and
  `strtod', `strtof', and `strtold'.  These new functions are perfectly
  accurate, and much faster than the old ones.

* The implementation of the POSIX locale model was completely rewritten by
  Ulrich Drepper.  This includes the new programs `localedef' and `locale'
  to compile the POSIX locale definition.

* The former dummy implementations of the strcoll and strxfrm function are
  now replaced by fully functional code contributed by Ulrich Drepper.  The
  collation information comes from the POSIX locale definitions.

* The new header <langinfo.h> defines an interface for accessing
  various locale-dependent data (using the locale chosen with `setlocale').

* Ulrich Drepper has contributed a new suite of functions for operation on
  wide-character and multibyte-character strings, in <wchar.h>;
  and classification and case conversion of wide characters, in <wctype.h>.
  These new functions are conforming to the ISO C, Amendement 1 specification.

* There is now a second implementation of the standard I/O library available.
  It comes from GNU libg++ as was written by Per Bothner, heavily modified
  by Hongjiu Lu and made thread safe by Ulrich Drepper.

* You can now use positional parameter specifications in format strings
  for the `printf' and `scanf' families of functions.  For example,
  `printf ("Number %2$d, Mr %1$s\n", "Jones", 6);'' prints
  ``Number 6, Mr Jones''.  This is mainly useful when providing different
  format strings for different languages, whose grammars may dictate
  different orderings of the values being printed.  To support this
  feature, the interface for `register_printf_handler' has changed; see
  the header file <printf.h> for details.

* The `printf' and `scanf' families of functions now understand a new
  formatting flag for numeric conversions: the ' flag (e.g. %'d or %'f) says
  to group numbers as indicated by the locale; for `scanf' and friends, this
  says to accept as valid only a number with all the proper grouping
  separators in the right places.  In the default "C" locale, numbers are
  not grouped; but locales for specific countries will define the usual
  conventions (i.e. separate thousands with `,' in the US locale).

* The pgrp functions have been regularized, slightly incompatibly but much
  less confusingly.  The core functions are now `getpgid' and `setpgid',
  which take arguments for the PID to operate on; the POSIX.1 `getpgrp' (no
  argument) and BSD `setpgrp' (identical to `setpgid') functions are
  provided for compatibility.  There is no longer an incompatible `getpgrp'
  with an argument declared under _BSD_SOURCE; no BSD code uses it.

* The new header file <fts.h> and suite of functions simplify programs that
  operate on directory trees.  This code comes from 4.4 BSD.

* The resolver code has been updated from the BIND 4.9.5-P1 release.
  Parts of the code were heavily modified by Ulrich Drepper to fit in the
  NSS scheme used in glibc.

* The new function `malloc_find_object_address' finds the starting address
  of a malloc'd block, given any address within the block;
  `malloc_object_allocated_size' returns the size of an allocated block;
  and `malloc_walk' lets you walk through all allocated blocks.  These can
  be useful for debugging; see <malloc.h> for the interfaces.

* There is a new malloc debugging hook `__memalign_hook'.

* There are new typedefs `ushort' for `unsigned short int' and `uint' for
  `unsigned int' in <sys/types.h>.  These are for compatibility only and
  their use is discouraged.

* The `-lmcheck' library to enable standard malloc debugging hooks is now
  done differently, so that it works even without GNU ld.

* New function `euidaccess' checks allowed access to a file like `access',
  but using the effective IDs instead of the real IDs.

* The time zone data files have been updated for the latest and greatest
  local time conventions of the countries of the world.

* The new function `dirfd' extracts the file descriptor used by a DIR stream;
  see <dirent.h>.

* The new functions `ecvt', `fcvt', and `gcvt' provide an obsolete interface
  for formatting floating-point numbers.  They are provided only for
  compatibility; new programs should use `sprintf' instead.  There are
  also equivalent function for the `long double' floating-point type and
  all functions also exist in a reentrant form.

* The new auxiliary library `-lutil' from 4.4 BSD contains various
  functions for maintaining the login-record files (primarily of use to
  system programs such as `login'), and convenient functions for
  allocating and initializing a pseudo-terminal (pty) device.

* Ulrich Drepper has contributed new support for System V style
  shared memory and IPC on systems that support it.

* Ulrich Drepper has contributed several miscellaneous new functions found
  in System V: The `hsearch' family of functions provide an effective
  implementation of hash tables; `a64l' and `l64a' provide a very simple
  binary to ASCII mapping; `drand48' and friends provide a 48-bit random
  number generator.

* Ulrich Drepper has contributed new reentrant counterparts for the
  `random' and `hsearch' families of functions; `random_r', `hsearch_r', etc.

* Ulrich Drepper has contributed new, highly-optimized versions of several
  string functions for the i486/Pentium family of processors.

* Ulrich Drepper has updated the Linux-specific code, based largely
  on work done in Hongjiu Lu's version of GNU libc for Linux.
  The GNU library now supports Linux versions 2.0.10 and later,
  using the ELF object file format (i[3456]86-*-linux).

* Andreas Schwab has ported the C library to Linux/m68k (m68k-*-linux).

* David Mosberger-Tang and Richard Henderson have ported the C library
  to Linux/Alpha (alpha-*-linux).  Richard Henderson contributed the
  dynamic linking support for ELF/Alpha.

* Richard Henderson contributed several Alpha optimized assembler function
  for arithmetic and string handling.

* Ulrich Drepper has contributed a new set of message catalog functions to
  support multiple languages using the <libintl.h> interface, for use with
  his new package GNU gettext.  Translation volunteers have contributed
  catalogs of the library's messages in Spanish, German, and Korean.

* For compatibility with XPG4, Ulrich Drepper has contributed the `gencat'
  program and the `catgets' function for reading the catalog files it
  creates.  (The <libintl.h> interface is preferred; we include the
  <nl_types.h> interface using `catgets' only for source compatibility with
  programs already written to use it.)

* New header file <values.h> gives SVID-compatible names for <limits.h>
  constants.

* Various new macros, declarations, and small header files for compatibility
  with 4.4 BSD.

* New function `group_member' is a convenient way to check if a process has
  a given effective group ID.

* When using GCC 2.7 and later, the socket functions are now declared in a
  special way so that passing an argument of type `struct sockaddr_in *',
  `struct sockaddr_ns *', or `struct sockaddr_un *' instead of the generic
  `struct sockaddr *' type, does not generate a type-clash warning.

* New function `error' declared in header file <error.h> is a convenient
  function for printing error messages and optionally exiting; this is the
  canonical function used in GNU programs.  The new functions `err', `warn',
  and friends in header file <err.h> are the canonical 4.4 BSD interface for
  doing the same thing.

* The <glob.h> interface has several new flags from 4.4 BSD that extend the
  POSIX.2 `glob' function to do ~ and {...} expansion.

* New function `unsetenv' complements `setenv' for compatibility with 4.4 BSD.
  `clearenv' which is used in POSIX.9 is also available.

* New function `getsid' returns session ID number on systems that support it.

* We have incorporated the 4.4 BSD `db' library (version 1.85).  New header
  files <db.h> and <mpool.h> provide a rich set of functions for several
  types of simple databases stored in memory and in files, and <ndbm.h> is
  an old `ndbm'-compatible interface using the `db' functions.  Link with
  `-ldb' to get these functions.

* New macro `strdupa' copies a string like `strdup', but uses local stack
  space from `alloca' instead of dynamic heap space from `malloc'.

* New function `strnlen' is like `strlen' but searches only a given maximum
  number of characters for the null terminator.  `stpncpy', `strndup' and
  `strndupa' are similar variants for the `stpcpy', `strdup' and `strdupa'
  function.

* New function `statfs' in header <sys/statfs.h>.

* The new <argz.h> and <envz.h> interfaces contributed by Miles Bader
  provide convenient functions for operating on blocks of null-terminated
  strings.

* A new suite of functions in <utmp.h> handle all the details of reading
  and writing the utmp file.

* An implementation of the NIS/YP(tm) based NSS service was contributed by
  Thorsten Kukuk.

* Paul Eggert and Ulrich Drepper modified the `strftime' function to be
  completely POSIX compliant and also implemented the extended functionality
  to handle alternate digit representation and alternate era date formats.

* Ulrich Drepper provided an implementation of the `strptime' function
  defined in XPG4.2 which transforms a string into a `struct tm' value.

* Paul Eggert provided the tzselect shell script as part of the timezone
  code.  The shell script makes it easy to select the correct timezone
  specification.

* The implementation of the malloc family of functions is completely replaced
  by a new implementation by Doug Lea with many improvements by Wolfram Gloger.
  The implementation uses the mmap function (if available) and it is
  optimized for the use in multi threaded programs.

* Ulrich Drepper contributed a MD5 "encryption" for the crypt family of
  functions.  This new functionality is usable by specifying a special
  salt string and it is compatible with implementation on *BSD systems.

* Lots of functions from the XPG4.2 standard were added by Ulrich Drepper:
  `getsubopt' to handle second level command line options, `bsd_signal'
  to access BSD style `signal' functionality, the obsolete `regexp' style
  expression matcher.

* the `lchown' function is available on system which support this
  functionality.

* The implementation of the shadow password handling function was contributed
  by Ulrich Drepper.

* David Mosberger-Tang changed the SunRPC implementation to be 64bit safe.

* POSIX.1g support was added.  The <sys/select.h> header is available,
  `isfdtype' and `pselect' are implemented.  Craig Metz contributed an
  implementation of `getaddrinfo'.


Return to GNU's home page.

Please send FSF & GNU inquiries & questions to gnu@prep.ai.mit.edu. There are also other ways to contact the FSF.

Please send comments on these web pages to webmasters@www.gnu.ai.mit.edu, send other questions to gnu@prep.ai.mit.edu.

Copyright (C) 1996, 1997 Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA

Verbatim copying and distribution is permitted in any medium, provided this notice is preserved.

Updated: 22 Feb 1997 tower