mirror of
https://sourceware.org/git/glibc.git
synced 2025-01-03 00:10:10 +00:00
Update.
1998-09-23 15:25 Ulrich Drepper <drepper@cygnus.com> * libio/stdio.h: Define __need_getopt and include getopt.h to define getopt stuff. * posix/unistd.h: Likewise. * stdio/stdio.h: Likewise. * posix/getopt.h: Remove _GNU_SOURCE use. If __need_getopt is defined define only getopt and the variables. (CPPFLAGS): Add -DUSE_LIBDB1
This commit is contained in:
parent
34a4b66d93
commit
a379e56acc
11
ChangeLog
11
ChangeLog
@ -1,3 +1,12 @@
|
|||||||
|
1998-09-23 15:25 Ulrich Drepper <drepper@cygnus.com>
|
||||||
|
|
||||||
|
* libio/stdio.h: Define __need_getopt and include getopt.h to define
|
||||||
|
getopt stuff.
|
||||||
|
* posix/unistd.h: Likewise.
|
||||||
|
* stdio/stdio.h: Likewise.
|
||||||
|
* posix/getopt.h: Remove _GNU_SOURCE use. If __need_getopt is defined
|
||||||
|
define only getopt and the variables.
|
||||||
|
|
||||||
1998-09-23 Andreas Jaeger <aj@arthur.rhein-neckar.de>
|
1998-09-23 Andreas Jaeger <aj@arthur.rhein-neckar.de>
|
||||||
|
|
||||||
* scripts/test-installation.pl (installation_problem): Don't link
|
* scripts/test-installation.pl (installation_problem): Don't link
|
||||||
@ -14,7 +23,7 @@
|
|||||||
(distribute): Add $(db1-headers).
|
(distribute): Add $(db1-headers).
|
||||||
(install-others): Define to install symlink libdb.so.NN and the
|
(install-others): Define to install symlink libdb.so.NN and the
|
||||||
$(db1-headers).
|
$(db1-headers).
|
||||||
(CPPFLAGS): Add -USE_LIBDB1
|
(CPPFLAGS): Add -DUSE_LIBDB1
|
||||||
Remove rules to build makedb.
|
Remove rules to build makedb.
|
||||||
* db/Versions: Rename libdb to libdb1.
|
* db/Versions: Rename libdb to libdb1.
|
||||||
* include/db.h: If USE_LIBDB1 is defined include db/db.h.
|
* include/db.h: If USE_LIBDB1 is defined include db/db.h.
|
||||||
|
52
FAQ
52
FAQ
@ -39,6 +39,7 @@ please let me know.
|
|||||||
librt? I don't even use threads.
|
librt? I don't even use threads.
|
||||||
1.14. What's the problem with configure --enable-omitfp?
|
1.14. What's the problem with configure --enable-omitfp?
|
||||||
1.15. I get failures during `make check'. What shall I do?
|
1.15. I get failures during `make check'. What shall I do?
|
||||||
|
1.16. What is symbol versioning good for? Do I need it?
|
||||||
|
|
||||||
2. Installation and configuration issues
|
2. Installation and configuration issues
|
||||||
|
|
||||||
@ -182,8 +183,8 @@ a local mirror first.
|
|||||||
|
|
||||||
You should always try to use the latest official release. Older versions
|
You should always try to use the latest official release. Older versions
|
||||||
may not have all the features GNU libc requires. The current releases of
|
may not have all the features GNU libc requires. The current releases of
|
||||||
egcs (1.0.2) and GNU CC (2.8.1) should work with the GNU C library (for
|
egcs (1.0.3 and 1.1) and GNU CC (2.8.1) should work with the GNU C library
|
||||||
powerpc see question question 1.5).
|
(for powerpc see question question 1.5).
|
||||||
|
|
||||||
|
|
||||||
1.3. When I try to compile glibc I get only error messages.
|
1.3. When I try to compile glibc I get only error messages.
|
||||||
@ -210,6 +211,10 @@ system's tools.
|
|||||||
Always get the newest release of GNU binutils available. Older releases are
|
Always get the newest release of GNU binutils available. Older releases are
|
||||||
known to have bugs that prevent a successful compilation.
|
known to have bugs that prevent a successful compilation.
|
||||||
|
|
||||||
|
{AJ} Please don't use binutils 2.7. That release contains some bugs which
|
||||||
|
might make it necessary that you've got to recompile all your glibc2
|
||||||
|
binaries when upgrading the GNU C library.
|
||||||
|
|
||||||
{ZW} As of release 2.1 a linker supporting symbol versions is required. For
|
{ZW} As of release 2.1 a linker supporting symbol versions is required. For
|
||||||
Linux, get binutils-2.8.1.0.23 or later. Other systems may have native
|
Linux, get binutils-2.8.1.0.23 or later. Other systems may have native
|
||||||
linker support, but it's moot right now, because glibc has not been ported
|
linker support, but it's moot right now, because glibc has not been ported
|
||||||
@ -300,11 +305,10 @@ new options.
|
|||||||
1.8. The compiler hangs while building iconvdata modules. What's
|
1.8. The compiler hangs while building iconvdata modules. What's
|
||||||
wrong?
|
wrong?
|
||||||
|
|
||||||
{ZW} This is a problem with all current releases of GCC. Initialization of
|
{ZW} This is a problem of older GCC. Initialization of large static arrays
|
||||||
large static arrays is very slow. The compiler will eventually finish; give
|
is very slow. The compiler will eventually finish; give it time.
|
||||||
it time.
|
|
||||||
|
|
||||||
The problem will be fixed in egcs 1.1 but probably not before then.
|
The problem is fixed in egcs 1.1 but not in earlier releases.
|
||||||
|
|
||||||
|
|
||||||
1.9. When I run `nm -u libc.so' on the produced library I still
|
1.9. When I run `nm -u libc.so' on the produced library I still
|
||||||
@ -426,15 +430,32 @@ command line which failed and run the test from the subdirectory for this
|
|||||||
test in the sources.
|
test in the sources.
|
||||||
|
|
||||||
There are some failures which are not directly related to the GNU libc:
|
There are some failures which are not directly related to the GNU libc:
|
||||||
- Some compiler produce buggy code. The current egcs snapshots are ok and
|
- Some compiler produce buggy code. The egcs 1.1 release should be ok. gcc
|
||||||
the not yet released egcs 1.1 should be ok. gcc 2.8.1 might cause some
|
2.8.1 might cause some failures, gcc 2.7.2.x is so buggy, that explicit
|
||||||
failures, gcc 2.7.2.x is so buggy, that explicit checks have been used so
|
checks have been used so that you can't build with it.
|
||||||
that you can't build with it.
|
|
||||||
- The kernel might have bugs. For example on Linux/Alpha 2.0.34 the
|
- The kernel might have bugs. For example on Linux/Alpha 2.0.34 the
|
||||||
floating point handling has quite a number of bugs and therefore most of
|
floating point handling has quite a number of bugs and therefore most of
|
||||||
the test cases in the math subdirectory will fail. The current Linux 2.1
|
the test cases in the math subdirectory will fail. The current Linux 2.1
|
||||||
development kernels have fixes for the floating point support on Alpha.
|
development kernels have fixes for the floating point support on Alpha.
|
||||||
|
|
||||||
|
|
||||||
|
1.16. What is symbol versioning good for? Do I need it?
|
||||||
|
|
||||||
|
{AJ} Symbol versioning solves problems that are related to interface
|
||||||
|
changes. One version of an interface might have been introduced in a
|
||||||
|
previous version of the GNU C library but the interface or the semantics of
|
||||||
|
the function has been changed in the meantime. For binary compatibility
|
||||||
|
with the old library, a newer library needs to still have the old interface
|
||||||
|
for old programs. On the other hand new programs should use the new
|
||||||
|
interface. Symbol versioning is the solution for this problem. The GNU
|
||||||
|
libc version 2.1 uses by default symbol versioning if the binutils support
|
||||||
|
it.
|
||||||
|
|
||||||
|
We don't advise to build without symbol versioning since you lose binary
|
||||||
|
compatibility if you do - for ever! The binary compatibility you lose is
|
||||||
|
not only against the previous version of the GNU libc (version 2.0) but also
|
||||||
|
against future versions.
|
||||||
|
|
||||||
|
|
||||||
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
|
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
|
||||||
|
|
||||||
@ -556,11 +577,14 @@ US.
|
|||||||
user specifies a -dynamic-linker argument. This is the name of the libc5
|
user specifies a -dynamic-linker argument. This is the name of the libc5
|
||||||
dynamic linker, which does not work with glibc.
|
dynamic linker, which does not work with glibc.
|
||||||
|
|
||||||
For casual use of GNU libc you can just specify
|
For casual use of GNU libc you can just specify to the linker
|
||||||
-dynamic-linker=/lib/ld-linux.so.2
|
--dynamic-linker=/lib/ld-linux.so.2
|
||||||
|
|
||||||
which is the glibc dynamic linker, on Linux systems. On other systems the
|
which is the glibc dynamic linker, on Linux systems. On other systems the
|
||||||
name is /lib/ld.so.1.
|
name is /lib/ld.so.1. When linking via gcc, you've got to add
|
||||||
|
-Wl,--dynamic-linker=/lib/ld-linux.so.2
|
||||||
|
|
||||||
|
to the gcc command line.
|
||||||
|
|
||||||
To change your environment to use GNU libc for compiling you need to change
|
To change your environment to use GNU libc for compiling you need to change
|
||||||
the `specs' file of your gcc. This file is normally found at
|
the `specs' file of your gcc. This file is normally found at
|
||||||
@ -749,7 +773,7 @@ file is usually the culprit.
|
|||||||
|
|
||||||
{AJ} If you have an entry "db" in /etc/nsswitch.conf you should also create
|
{AJ} If you have an entry "db" in /etc/nsswitch.conf you should also create
|
||||||
the database files. The glibc sources contain a Makefile which does the
|
the database files. The glibc sources contain a Makefile which does the
|
||||||
neccessary conversion and calls to create those files. The file is
|
necessary conversion and calls to create those files. The file is
|
||||||
`db-Makefile' in the subdirectory `nss' and you can call it with `make -f
|
`db-Makefile' in the subdirectory `nss' and you can call it with `make -f
|
||||||
db-Makefile'. Please note that not all services are capable of using a
|
db-Makefile'. Please note that not all services are capable of using a
|
||||||
database. Currently passwd, group, ethers, protocol, rpc, services shadow
|
database. Currently passwd, group, ethers, protocol, rpc, services shadow
|
||||||
|
27
FAQ.in
27
FAQ.in
@ -59,8 +59,8 @@ a local mirror first.
|
|||||||
|
|
||||||
You should always try to use the latest official release. Older versions
|
You should always try to use the latest official release. Older versions
|
||||||
may not have all the features GNU libc requires. The current releases of
|
may not have all the features GNU libc requires. The current releases of
|
||||||
egcs (1.0.2) and GNU CC (2.8.1) should work with the GNU C library (for
|
egcs (1.0.3 and 1.1) and GNU CC (2.8.1) should work with the GNU C library
|
||||||
powerpc see question ?powerpc).
|
(for powerpc see question ?powerpc).
|
||||||
|
|
||||||
?? When I try to compile glibc I get only error messages.
|
?? When I try to compile glibc I get only error messages.
|
||||||
What's wrong?
|
What's wrong?
|
||||||
@ -176,11 +176,10 @@ new options.
|
|||||||
?? The compiler hangs while building iconvdata modules. What's
|
?? The compiler hangs while building iconvdata modules. What's
|
||||||
wrong?
|
wrong?
|
||||||
|
|
||||||
{ZW} This is a problem with all current releases of GCC. Initialization of
|
{ZW} This is a problem of older GCC. Initialization of large static arrays
|
||||||
large static arrays is very slow. The compiler will eventually finish; give
|
is very slow. The compiler will eventually finish; give it time.
|
||||||
it time.
|
|
||||||
|
|
||||||
The problem will be fixed in egcs 1.1 but probably not before then.
|
The problem is fixed in egcs 1.1 but not in earlier releases.
|
||||||
|
|
||||||
?? When I run `nm -u libc.so' on the produced library I still
|
?? When I run `nm -u libc.so' on the produced library I still
|
||||||
find unresolved symbols. Can this be ok?
|
find unresolved symbols. Can this be ok?
|
||||||
@ -295,10 +294,9 @@ command line which failed and run the test from the subdirectory for this
|
|||||||
test in the sources.
|
test in the sources.
|
||||||
|
|
||||||
There are some failures which are not directly related to the GNU libc:
|
There are some failures which are not directly related to the GNU libc:
|
||||||
- Some compiler produce buggy code. The current egcs snapshots are ok and
|
- Some compiler produce buggy code. The egcs 1.1 release should be ok. gcc
|
||||||
the not yet released egcs 1.1 should be ok. gcc 2.8.1 might cause some
|
2.8.1 might cause some failures, gcc 2.7.2.x is so buggy, that explicit
|
||||||
failures, gcc 2.7.2.x is so buggy, that explicit checks have been used so
|
checks have been used so that you can't build with it.
|
||||||
that you can't build with it.
|
|
||||||
- The kernel might have bugs. For example on Linux/Alpha 2.0.34 the
|
- The kernel might have bugs. For example on Linux/Alpha 2.0.34 the
|
||||||
floating point handling has quite a number of bugs and therefore most of
|
floating point handling has quite a number of bugs and therefore most of
|
||||||
the test cases in the math subdirectory will fail. The current Linux 2.1
|
the test cases in the math subdirectory will fail. The current Linux 2.1
|
||||||
@ -435,11 +433,14 @@ US.
|
|||||||
user specifies a -dynamic-linker argument. This is the name of the libc5
|
user specifies a -dynamic-linker argument. This is the name of the libc5
|
||||||
dynamic linker, which does not work with glibc.
|
dynamic linker, which does not work with glibc.
|
||||||
|
|
||||||
For casual use of GNU libc you can just specify
|
For casual use of GNU libc you can just specify to the linker
|
||||||
-dynamic-linker=/lib/ld-linux.so.2
|
--dynamic-linker=/lib/ld-linux.so.2
|
||||||
|
|
||||||
which is the glibc dynamic linker, on Linux systems. On other systems the
|
which is the glibc dynamic linker, on Linux systems. On other systems the
|
||||||
name is /lib/ld.so.1.
|
name is /lib/ld.so.1. When linking via gcc, you've got to add
|
||||||
|
-Wl,--dynamic-linker=/lib/ld-linux.so.2
|
||||||
|
|
||||||
|
to the gcc command line.
|
||||||
|
|
||||||
To change your environment to use GNU libc for compiling you need to change
|
To change your environment to use GNU libc for compiling you need to change
|
||||||
the `specs' file of your gcc. This file is normally found at
|
the `specs' file of your gcc. This file is normally found at
|
||||||
|
@ -710,15 +710,8 @@ extern void funlockfile __P ((FILE *__stream));
|
|||||||
/* The X/Open standard requires some functions and variables to be
|
/* The X/Open standard requires some functions and variables to be
|
||||||
declared here which do not belong into this header. But we have to
|
declared here which do not belong into this header. But we have to
|
||||||
follow. In GNU mode we don't do this nonsense. */
|
follow. In GNU mode we don't do this nonsense. */
|
||||||
|
# define __need_getopt
|
||||||
/* For more information on these symbols look in <getopt.h>. */
|
# include <getopt.h>
|
||||||
extern char *optarg;
|
|
||||||
extern int optind;
|
|
||||||
extern int opterr;
|
|
||||||
extern int optopt;
|
|
||||||
|
|
||||||
extern int getopt __P ((int __argc, char *__const *__argv,
|
|
||||||
__const char *__shortopts));
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
__END_DECLS
|
__END_DECLS
|
||||||
|
@ -18,7 +18,10 @@
|
|||||||
Boston, MA 02111-1307, USA. */
|
Boston, MA 02111-1307, USA. */
|
||||||
|
|
||||||
#ifndef _GETOPT_H
|
#ifndef _GETOPT_H
|
||||||
#define _GETOPT_H 1
|
|
||||||
|
#ifndef __need_getopt
|
||||||
|
# define _GETOPT_H 1
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@ -55,7 +58,7 @@ extern int opterr;
|
|||||||
|
|
||||||
extern int optopt;
|
extern int optopt;
|
||||||
|
|
||||||
#ifdef _GNU_SOURCE
|
#ifndef __need_getopt
|
||||||
/* Describe the long-named options requested by the application.
|
/* Describe the long-named options requested by the application.
|
||||||
The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector
|
The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector
|
||||||
of `struct option' terminated by an element containing a name which is
|
of `struct option' terminated by an element containing a name which is
|
||||||
@ -96,9 +99,33 @@ struct option
|
|||||||
# define no_argument 0
|
# define no_argument 0
|
||||||
# define required_argument 1
|
# define required_argument 1
|
||||||
# define optional_argument 2
|
# define optional_argument 2
|
||||||
#endif /* GNU source */
|
#endif /* need getopt */
|
||||||
|
|
||||||
|
|
||||||
|
/* Get definitions and prototypes for functions to process the
|
||||||
|
arguments in ARGV (ARGC of them, minus the program name) for
|
||||||
|
options given in OPTS.
|
||||||
|
|
||||||
|
Return the option character from OPTS just read. Return -1 when
|
||||||
|
there are no more options. For unrecognized options, or options
|
||||||
|
missing arguments, `optopt' is set to the option letter, and '?' is
|
||||||
|
returned.
|
||||||
|
|
||||||
|
The OPTS string is a list of characters which are recognized option
|
||||||
|
letters, optionally followed by colons, specifying that that letter
|
||||||
|
takes an argument, to be placed in `optarg'.
|
||||||
|
|
||||||
|
If a letter in OPTS is followed by two colons, its argument is
|
||||||
|
optional. This behavior is specific to the GNU `getopt'.
|
||||||
|
|
||||||
|
The argument `--' causes premature termination of argument
|
||||||
|
scanning, explicitly telling `getopt' that there are no more
|
||||||
|
options.
|
||||||
|
|
||||||
|
If OPTS begins with `--', then non-option arguments are treated as
|
||||||
|
arguments to the option '\0'. This behavior is specific to the GNU
|
||||||
|
`getopt'. */
|
||||||
|
|
||||||
#if defined __STDC__ && __STDC__
|
#if defined __STDC__ && __STDC__
|
||||||
# ifdef __GNU_LIBRARY__
|
# ifdef __GNU_LIBRARY__
|
||||||
/* Many other libraries have conflicting prototypes for getopt, with
|
/* Many other libraries have conflicting prototypes for getopt, with
|
||||||
@ -109,7 +136,7 @@ extern int getopt (int argc, char *const *argv, const char *shortopts);
|
|||||||
extern int getopt ();
|
extern int getopt ();
|
||||||
# endif /* __GNU_LIBRARY__ */
|
# endif /* __GNU_LIBRARY__ */
|
||||||
|
|
||||||
# ifdef _GNU_SOURCE
|
# ifdef __need_getopt
|
||||||
extern int getopt_long (int argc, char *const *argv, const char *shortopts,
|
extern int getopt_long (int argc, char *const *argv, const char *shortopts,
|
||||||
const struct option *longopts, int *longind);
|
const struct option *longopts, int *longind);
|
||||||
extern int getopt_long_only (int argc, char *const *argv,
|
extern int getopt_long_only (int argc, char *const *argv,
|
||||||
@ -124,7 +151,7 @@ extern int _getopt_internal (int argc, char *const *argv,
|
|||||||
# endif
|
# endif
|
||||||
#else /* not __STDC__ */
|
#else /* not __STDC__ */
|
||||||
extern int getopt ();
|
extern int getopt ();
|
||||||
# ifdef _GNU_SOURCE
|
# ifndef __need_getopt
|
||||||
extern int getopt_long ();
|
extern int getopt_long ();
|
||||||
extern int getopt_long_only ();
|
extern int getopt_long_only ();
|
||||||
|
|
||||||
@ -136,4 +163,7 @@ extern int _getopt_internal ();
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Make sure we later can get all the definitions and declarations. */
|
||||||
|
#undef __need_getopt
|
||||||
|
|
||||||
#endif /* getopt.h */
|
#endif /* getopt.h */
|
||||||
|
@ -718,37 +718,11 @@ extern int setlogin __P ((__const char *__name));
|
|||||||
|
|
||||||
|
|
||||||
#ifdef __USE_POSIX2
|
#ifdef __USE_POSIX2
|
||||||
/* Process the arguments in ARGV (ARGC of them, minus
|
/* Get definitions and prototypes for functions to process the
|
||||||
the program name) for options given in OPTS.
|
arguments in ARGV (ARGC of them, minus the program name) for
|
||||||
|
options given in OPTS. */
|
||||||
If `opterr' is zero, no messages are generated
|
# define __need_getopt
|
||||||
for invalid options; it defaults to 1.
|
# include <getopt.h>
|
||||||
`optind' is the current index into ARGV.
|
|
||||||
`optarg' is the argument corresponding to the current option.
|
|
||||||
Return the option character from OPTS just read.
|
|
||||||
Return -1 when there are no more options.
|
|
||||||
For unrecognized options, or options missing arguments,
|
|
||||||
`optopt' is set to the option letter, and '?' is returned.
|
|
||||||
|
|
||||||
The OPTS string is a list of characters which are recognized option
|
|
||||||
letters, optionally followed by colons, specifying that that letter
|
|
||||||
takes an argument, to be placed in `optarg'.
|
|
||||||
|
|
||||||
If a letter in OPTS is followed by two colons, its argument is optional.
|
|
||||||
This behavior is specific to the GNU `getopt'.
|
|
||||||
|
|
||||||
The argument `--' causes premature termination of argument scanning,
|
|
||||||
explicitly telling `getopt' that there are no more options.
|
|
||||||
|
|
||||||
If OPTS begins with `--', then non-option arguments
|
|
||||||
are treated as arguments to the option '\0'.
|
|
||||||
This behavior is specific to the GNU `getopt'. */
|
|
||||||
extern int getopt __P ((int __argc, char *__const * __argv,
|
|
||||||
__const char *__opts));
|
|
||||||
extern int opterr;
|
|
||||||
extern int optind;
|
|
||||||
extern int optopt;
|
|
||||||
extern char *optarg;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -832,15 +832,8 @@ extern void funlockfile __P ((FILE *__stream));
|
|||||||
/* The X/Open standard requires some functions and variables to be
|
/* The X/Open standard requires some functions and variables to be
|
||||||
declared here which do not belong into this header. But we have to
|
declared here which do not belong into this header. But we have to
|
||||||
follow. In GNU mode we don't do this nonsense. */
|
follow. In GNU mode we don't do this nonsense. */
|
||||||
|
# define __need_getopt
|
||||||
/* For more information on these symbols look in <getopt.h>. */
|
# include <getopt.h>
|
||||||
extern char *optarg;
|
|
||||||
extern int optind;
|
|
||||||
extern int opterr;
|
|
||||||
extern int optopt;
|
|
||||||
|
|
||||||
extern int getopt __P ((int __argc, char *__const *__argv,
|
|
||||||
__const char *__shortopts));
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
__END_DECLS
|
__END_DECLS
|
||||||
|
Loading…
Reference in New Issue
Block a user