(init): Use USE_NONONPTION_FLAG ifdef for __getopt_clean_environment.

This commit is contained in:
Ulrich Drepper 2001-09-22 21:19:47 +00:00
parent 9fb957cdf1
commit 9461da69cc

View File

@ -56,7 +56,9 @@ char **__libc_argv;
static void static void
init (int argc, char **argv, char **envp) init (int argc, char **argv, char **envp)
{ {
#ifdef USE_NONOPTION_FLAGS
extern void __getopt_clean_environment (char **); extern void __getopt_clean_environment (char **);
#endif
/* The next variable is only here to work around a bug in gcc <= 2.7.2.2. /* The next variable is only here to work around a bug in gcc <= 2.7.2.2.
If the address would be taken inside the expression the optimizer If the address would be taken inside the expression the optimizer
would try to be too smart and throws it away. Grrr. */ would try to be too smart and throws it away. Grrr. */
@ -77,8 +79,10 @@ init (int argc, char **argv, char **envp)
__libc_init (argc, argv, envp); __libc_init (argc, argv, envp);
#ifdef USE_NONOPTION_FLAGS
/* This is a hack to make the special getopt in GNU libc working. */ /* This is a hack to make the special getopt in GNU libc working. */
__getopt_clean_environment (envp); __getopt_clean_environment (envp);
#endif
#ifdef SHARED #ifdef SHARED
__libc_global_ctors (); __libc_global_ctors ();